:5px;padding-right:5px;padding-bottom:5px;min-width:30px;min-height:30px}div.dtsb-searchBuilder div.dtsb-titleRow{margin-bottom:1em}div.dtsb-searchBuilder div.dtsb-titleRow button.dtsb-clearAll{margin-bottom:0px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select{width:auto !important}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-condition{border-color:#21ba45}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-data{border-color:#db2828}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-value{border-color:#2185d0}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer{border-radius:4px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-top:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-logic{border:none;border-radius:0px;flex-grow:1;flex-shrink:0;flex-basis:40px;margin:0px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-clearGroup{border:none;border-radius:0px;width:30px;margin:0px}
div.dt-datetime{position:absolute;background-color:white;z-index:2050;border:1px solid #ccc;box-shadow:0 5px 15px -5px rgba(0, 0, 0, 0.5);padding:0 20px 6px 20px;width:275px}div.dt-datetime.inline{position:relative;box-shadow:none}div.dt-datetime div.dt-datetime-title{text-align:center;padding:5px 0px 3px}div.dt-datetime table{border-spacing:0;margin:12px 0;width:100%}div.dt-datetime table.dt-datetime-table-nospace{margin-top:-12px}div.dt-datetime table th{font-size:.8em;color:#777;font-weight:normal;width:14.285714286%;padding:0 0 4px 0;text-align:center}div.dt-datetime table td{font-size:.9em;color:#444;padding:0}div.dt-datetime table td.selectable{text-align:center;background:#f5f5f5}div.dt-datetime table td.selectable.disabled{color:#aaa;background:white}div.dt-datetime table td.selectable.disabled button:hover{color:#aaa;background:white}div.dt-datetime table td.selectable.now{background-color:#ddd}div.dt-datetime table td.selectable.now button{font-weight:bold}div.dt-datetime table td.selectable.selected button{background:#4e6ca3;color:white;border-radius:2px}div.dt-datetime table td.selectable button:hover{background:#ff8000;color:white;border-radius:2px}div.dt-datetime table td.dt-datetime-week{font-size:.7em}div.dt-datetime table button{width:100%;box-sizing:border-box;border:none;background:transparent;font-size:inherit;color:inherit;text-align:center;padding:4px 0;cursor:pointer;margin:0}div.dt-datetime table button span{display:inline-block;mi


surface
                // This average intensity of a mipmap must be constant and independent of texture size
                // Apply a bump on the curve to avoid getting too dark at small mips
                // Also make the mipmaps having a stronger transparency at smaller mips so that the grid fades away when it is far
                var lumBase = (float)(average / CalculateAverageLuminanceGrid(pixelBuffer.Width));
                var colorBase = (float)Math.Pow(lumBase, 1 / 3.0);
                var alpha = (float)Math.Pow(lumBase, 1 / 3.0);
                var color = (Color)(new Color4(colorBase * alpha, colorBase * alpha, colorBase * alpha, alpha).ToSRgb());

                for (var x = 0; x < pixelBuffer.Width; x++)
                {
                    pixelBuffer.SetPixel(x, 0, color);
                    pixelBuffer.SetPixel(0, x, color);
                    pixelBuffer.SetPixel(x, pixelBuffer.Height - 1, color);
                    pixelBuffer.SetPixel(pixelBuffer.Width - 1, x, color);
                }
            }
            return image;
        }

        private static Image GenerateAxisImage()
        {
            var image = Image.New2D(GridTextureTopSize, GridTextureTopSize, true, PixelFormat.R8G8B8A8_UNorm_SRgb);
            image.Clear();

            var average = CalculateAverageLuminanceOriginAxis(GridTextureTopSize);
            // set the data of the mipmaps
            for (var i = 0; i < image.PixelBuffer.Count; i++)
            {
                var pixelBuffer = image.PixelBuffer[i];

                // Calculate the intensity of the color based on the average bright pi


py of the GNU Library General Public
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/*
 * isinf(x) returns 1 if x is inf, -1 for x == -inf, else 0;
 */

#include <sysdep.h>
#undef ret

ENTRY (__isinf)
{
.mfi
	fclass.m p6, p7 = farg0, @inf|@pos
	;;
}
{
.mfb
(p6)	mov ret0 = 1
(p7)	fclass.m p7, p8 = farg0, @inf|@neg
(p6)	br.ret.sptk.many rp
	;;
}
{
	.pred.rel.mutex p7,p8
(p7)	mov ret0 = -1
(p8)	mov ret0 = 0
	br.ret.sptk.many rp
}
END (__isinf)

strong_alias (__isinf, __isinff)
strong_alias (__isinf, __isinfl)

weak_alias (__isinf, isinf)
weak_alias (__isinff, isinff)
weak_alias (__isinfl, isinfl)


osoft Yahei", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --font-family-normal: Open Sans, PingFangSC-Regular, Microsoft Yahei, WenQuanYi Micro Hei, "Helvetica Neue", Helvetica, Hiragino Sans GB, sans-serif;
}
[data-theme="dark"] {
  --primary: #483d8b;
  --dark-primary: #483d8b;
  --background-color: #1e1e1e;
  --font-color: #cccccc;
  --darker: black;
  --default: #525461;
  --warning: #fb6340;
  --footer-color: #aaa;
  --menubar-background: #fff;
  --menubar-scrollbar-thumb: #f6f9fc;
  --menubar-text-color: #4c4c4c;
  --blue: #5e72e4;
  --indigo: #5603ad;
  --purple: #8965e0;
  --pink: #f3a4b5;
  --red: #f5365c;
  --orange: #fb6340;
  --yellow: #ffd600;
  --green: #2dce89;
  --teal: #11cdef;
  --cyan: #2bffc6;
  --white: #fff;
  --gray: #8898aa;
  --gray-dark: #32325d;
  --light: #ced4da;
  --lighter: #e9ecef;
  --secondary: #f7fafc;
  --success: #2dce89;
  --info: #11cdef;
  --danger: #f5365c;
  --light: #adb5bd;
  --dark: #212529;
  --neutral: #fff;
  --login-form-bg-color: rgba(244, 245, 247, 0.8);
  --blur-radius: 10px;
  --blur-opacity: 0.5;
  --blur-radius-dark: 10px;
  --blur-opacity-dark: 0.5;
  --font-family-sans-serif: "Google Sans", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --font-family-normal: Open Sans, PingFangSC-Regular, Microsoft Yahei, WenQuanYi Micro Hei, "Helvetica Neue", Helvetica, Hiragino Sans GB, sans-serif;
}
html,
body {
  margin: 0px;
  padding: 0px;
  height: 100%;
  font-size: 16px;
  font-family: "Google Sans", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
  font-family: var(--font-family-sans-serif);
}
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
body {
  font-size: 0.875rem;
  background-color: #f4f5f7;
  background-color: var(--background-color);
  color: #525f7f;
  color: var(--font-color);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background-color: #5e72e4;
  background-color: var(


ext(successHandler::accept)
}
/*
 * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
 */

package io.airbyte.workload.launcher.config

import io.airbyte.featureflag.FeatureFlagClient
import io.airbyte.micronaut.runtime.AirbyteWorkerConfig
import io.airbyte.workers.pod.FileConstants
import io.airbyte.workload.launcher.context.WorkloadSecurityContextProvider
import io.airbyte.workload.launcher.pods.KubeContainerInfo
import io.airbyte.workload.launcher.pods.factories.ConnectorPodFactory
import io.airbyte.workload.launcher.pods.factories.ConnectorPodFactory.Companion.CHECK_OPERATION_NAME
import io.airbyte.workload.launcher.pods.factories.ConnectorPodFactory.Companion.DISCOVER_OPERATION_NAME
import io.airbyte.workload.launcher.pods.factories.ConnectorPodFactory.Companion.SPEC_OPERATION_NAME
import io.airbyte.workload.launcher.pods.factories.InitContainerFactory
import io.airbyte.workload.launcher.pods.factories.NodeSelectionFactory
import io.airbyte.workload.launcher.pods.factories.ResourceRequirementsFactory
import io.airbyte.workload.launcher.pods.factories.VolumeFactory
import io.fabric8.kubernetes.api.model.EnvVar
import io.fabric8.kubernetes.api.model.LocalObjectReference
import io.fabric8.kubernetes.api.model.Toleration
import io.micronaut.context.annotation.Factory
import jakarta.inject.Named
import jakarta.inject.Singleton

@Factory
class PodFactoryBeanFactory {
  @Singleton
  @Named("checkPodFactory")
  fun checkPodFactory(
    featureFlagClient: FeatureFlagClient,
    @Named("checkPodTolerations") tolerations: List<Toleration>,
    @Named("checkImagePullSecrets") imagePullSecrets: List<LocalObjectReference>,
    @Named("checkEnvVars") connectorEnvVars: List<EnvVar>,
    @Named("sideCarEnvVars") sideCarEnvVars: List<EnvVar>,
    @Named("sidecarKubeContainerInfo") sidecarContainerInfo: KubeContainerInfo,
    airbyteWorkerConfig: AirbyteWorkerConfig,
    volumeFactory: VolumeFactory,
    initContainerFactory: InitContainerFactory,
    workloadSecurityContextProvider: WorkloadSecurityContextProvider,
    resourceRequirementsFactory: ResourceRequirementsFactory,
    nodeSelectionFactory: NodeSelectionFactory,
  ): ConnectorPodFactory =
    ConnectorPodFactory(
      CHECK_OPERATION_NAME,
      featureFlagClient,
      tolerations,
      imagePullSecrets,
      connectorEnvVars,
      sideCarEnvVars,
      sidecarContainerInfo,
      airbyteWorkerConfig.job.kubernetes.serviceAccount,
      volumeFactory,
      initContainerFactory,
      mapOf(
        "config" to "${FileConstants.CONFIG_DIR}/${FileConstants.CONNECTION_CONFIGURATION_FILE}",
      ),
      workloadSecurityContextProvider,
      resourceRequirementsFactory,
      nodeSelectionFactory,
    )

  @Singleton
  @Named("discoverPodFactory")
  fun discoverPodFactory(
    featureFlagClient: FeatureFlagClient,
    @Named("discoverPodTolerations") tolerations: List<Toleration>,
    @Named("discoverImagePullSecrets") imagePullSecrets: List<LocalObjectReference>,
    @Named("discoverEnvVars") connectorEnvVars: List<EnvVar>,
    @Named("sideCarEnvVars") sideCarEnvVars: List<EnvVar>,
    @Named("sidecarKubeContainerInfo") sidecarContainerInfo: KubeContainerInfo,
    airbyteWorkerConfig: AirbyteWorkerConfig,
    volumeFactory: VolumeFactory,
    initContainerFactory: InitContainerFactory


': 'MO'
  },
  {
    '_id': '64443',
    'city': 'EASTON',
    'loc': [-94.65819399999999, 39.751709],
    'pop': 1189,
    'state': 'MO'
  },
  {
    '_id': '64444',
    'city': 'EDGERTON',
    'loc': [-94.635217, 39.474213],
    'pop': 1427,
    'state': 'MO'
  },
  {
    '_id': '64445',
    'city': 'ELMO',
    'loc': [-95.123564, 40.518492],
    'pop': 481,
    'state': 'MO'
  },
  {
    '_id': '64446',
    'city': 'FAIRFAX',
    'loc': [-95.375075, 40.330193],
    'pop': 1413,
    'state': 'MO'
  },
  {
    '_id': '64448',
    'city': 'FAUCETT',
    'loc': [-94.791276, 39.589124],
    'pop': 1077,
    'state': 'MO'
  },
  {
    '_id': '64449',
    'city': 'FILLMORE',
    'loc': [-94.955496, 40.014212],
    'pop': 514,
    'state': 'MO'
  },
  {
    '_id': '64451',
    'city': 'FOREST CITY',
    'loc': [-95.19159399999999, 39.989708],
    'pop': 450,
    'state': 'MO'
  },
  {
    '_id': '64452',
    'city': 'FORTESCUE',
    'loc': [-95.33158400000001, 40.054712],
    'pop': 208,
    'state': 'MO'
  },
  {
    '_id': '64453',
    'city': 'GENTRY',
    'loc': [-94.414198, 40.341112],
    'pop': 256,
    'state': 'MO'
  },
  {
    '_id': '64454',
    'city': 'GOWER',
    'loc': [-94.596526, 39.602009],
    'pop': 2115,
    'state': 'MO'
  },
  {
    '_id': '64455',
    'city': 'GRAHAM',
    'loc': [-95.012118, 40.201204],
    'pop': 543,
    'state': 'MO'
  },
  {
    '_id': '64456',
    'city': 'GRANT CITY',
    'loc': [-94.397908, 40.492358],
    'pop': 1401,
    'state': 'MO'
  },
  {
    '_id': '64457',
    'city': 'GUILFORD',
    'loc': [-94.695076, 40.174614],
    'pop': 388,
    'state': 'MO'
  },
  {
    '_id': '64458',
    'city': 'HATFIELD',
    'loc': [-94.169059, 40.521853],
    'pop': 141,
    'state': 'MO'
  },
  {
    '_id': '64459',
    'city': 'HELENA',
    'loc': [-94.69212, 39.925122],
    'pop': 1218,
    'state': 'MO'
  },
  {
    '_id': '64461',
    'city': 'HOPKINS',
    'loc': [-94.81894800000001, 40.548328],
    'pop': 869,
    'state': 'MO'
  },
  {
    '_id': '64463',
    'city': 'KING CITY',
    'loc': [-94.52341199999999, 40.065184],
    '


If <var>promise</var>.[[PromiseState]] is "pending", then

Append <var>fulfillReaction</var> as the last element of the <emu-xref href=#sec-list-and-record-specification-type id=_ref_8293>List</emu-xref> that is <var>promise</var>.[[PromiseFulfillReactions]].
Append <var>rejectReaction</var> as the last element of the <emu-xref href=#sec-list-and-record-specification-type id=_ref_8294>List</emu-xref> that is <var>promise</var>.[[PromiseRejectReactions]].

Else if <var>promise</var>.[[PromiseState]] is "fulfilled", then

Let <var>value</var> be <var>promise</var>.[[PromiseResult]].
Perform <emu-xref aoid=EnqueueJob id=_ref_8295>EnqueueJob</emu-xref>("PromiseJobs", <emu-xref aoid=PromiseReactionJob id=_ref_8296>PromiseReactionJob</emu-xref>, « <var>fulfillReaction</var>, <var>value</var> »).

Else,

<emu-xref href=#assert id=_ref_8297>Assert</emu-xref>: The value of <var>promise</var>.[[PromiseState]] is "rejected".
Let <var>reason</var> be <var>promise</var>.[[PromiseResult]].
If <var>promise</var>.[[PromiseIsHandled]] is <emu-val>false</emu-val>, perform <emu-xref aoid=HostPromiseRejectionTracker id=_ref_8298>HostPromiseRejectionTracker</emu-xref>(<var>promise</var>, "handle").
Perform <emu-xref aoid=EnqueueJob id=_ref_8299>EnqueueJob</emu-xref>("PromiseJobs", <emu-xref aoid=PromiseReactionJob id=_ref_8300>PromiseReactionJob</emu-xref>, « <var>rejectReaction</var>, <var>reason</var> »).

Set <var>promise</var>.[[PromiseIsHandled]] to <emu-val>true</emu-val>.
If <var>resultCapability</var> is <emu-val>undefined</emu-val>, then

Return <emu-val>undefined</emu-val>.

Else,

Return <var>resultCapability</var>.[[Promise]].

</emu-alg>
 </emu-clause>
 </emu-clause>
 <emu-clause id=sec-promise.prototype-@@tostringtag>

25.6.5.5Promise.prototype [ @@toStringTag ]

The initial value of the @@toStringTag property is the String value "Promise".

This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.

 </emu-clause>
 </emu-clause>
 <emu-clause id=sec-properties-of-promise-instances>

25.6.6Properties of Promise In


using Jint;
using Jint.Native;
using Jint.Native.Array;
using Jint.Native.Object;
using Newtonsoft.Json;
using System.IO;
using System.Text;

namespace LuYao.Text.Json;

/// <summary>
/// 一个抽象类，用于支持 JSON 数据的可翻译模型。
/// </summary>
/// <typeparam name="T">继承自 TranslatableJsonModel 的具体类型。</typeparam>
public abstract class TranslatableJsonModel<T> where T : TranslatableJsonModel<T>
{
    /// <summary>
    /// 将 JSON 字符串转换为模型对象。
    /// </summary>
    /// <param name="json">JSON 格式的字符串。</param>
    /// <returns>转换后的模型对象。</returns>
    public static T Transform(string json)
    {
        if (string.IsNullOrWhiteSpace(json)) throw new System.ArgumentException(nameof(json), "JSON string cannot be null or empty.");
        using var e = new Engine();
        if (!string.IsNullOrWhiteSpace(json))
        {
            JsonConvert.DeserializeObject(json);
            e.Evaluate($"var model = {json};");
        }

        var result = BuildOutput(e.Evaluate(TranslatableHelper.Get<T>()));
        return JsonConvert.DeserializeObject<T>(result)!;
    }

    /// <summary>
    /// 将对象转换为模型对象。
    /// </summary>
    /// <param name="model">要转换的对象。</param>
    /// <returns>转换后的模型对象。</returns>
    public static T Transform(object model)
    {
        if (model == null) throw new System.ArgumentNullException(nameof(model), "Model cannot be null.");
        using var e = new Engine();
        if (model != null) e.SetValue("model", model);
        var result = BuildOutput(e.Evaluate(TranslatableHelper.Get<T>()));
        return JsonConvert.Deser


"game.gmHandler.command",
args : {
    content : "_0"//内容
},
returns : "GmOperateData",
};
/**
 * 每月签到
 * @args
 * @type welfare
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_dailySignIn = {
type : "welfare",
key : "game_welfare_dailySignIn",
name : "game.welfareHandler.dailySignIn",
returns : "WelfareOperateData",
};
/**
 * 每日签到补签
 * @args
 * @type welfare
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_dailySignInSupply = {
type : "welfare",
key : "game_welfare_dailySignInSupply",
name : "game.welfareHandler.dailySignInSupply",
returns : "WelfareOperateData",
};
/**
 * 累计签到
 * @args {id:"领取id"}
 * @type welfare
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_totalSignIn = {
type : "welfare",
key : "game_welfare_totalSignIn",
name : "game.welfareHandler.totalSignIn",
args : {
    id : "_0"//领取id
},
returns : "WelfareOperateData",
};
/**
 * 登录礼包
 * @args {id:"领取id"}
 * @type welfare
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_loginGiftPack = {
type : "welfare",
key : "game_welfare_loginGiftPack",
name : "game.welfareHandler.loginGiftPack",
args : {
    id : "_0"//领取id
},
returns : "WelfareOperateData",
};
/**
 * 等级礼包
 * @args {id:"领取id"}
 * @type levelAward
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_levelGiftPack = {
type : "levelAward",
key : "game_welfare_levelGiftPack",
name : "game.welfareHandler.levelGiftPack",
args : {
    id : "_0"//领取id
},
returns : "WelfareOperateData",
};
/**
 * 领取等级基金奖励
 * @args {id:"奖励id"}
 * @type welfare
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_getLevelFundReward = {
type : "welfare",
key : "game_welfare_getLevelFundReward",
name : "game.welfareHandler.getLevelFundReward",
args : {
    id : "_0"//奖励id
},
returns : "WelfareOperateData",
};
/**
 * 首充礼包
 * @args {id:"领取id", day:"天数"}
 * @type welfare
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_firstRecharge = {
type : "welfare",
key : "game_welfare_firstRecharge",
name : "game.welfareHandler.firstRecharge",
args : {
    id : "_0"//领取id
    ,day : "_1"//天数
},
returns : "WelfareOperateData",
};
/**
 * 激活码兑换
 * @args {code:"激活码"}
 * @type welfare
 * @isWorker 1
 * @returns WelfareOperateData
 */
public static game_welfare_activationCode = {
type : "welfare",
key : "game_welfare_activationCode",
name : "game.welfareHandler


 = (lb.delay * sample_rate as f32) as usize;

        *lb = LoopBuffer {
            delay: lb.delay,
            data: vec![0.0; len],
            pos: 0,
        };
    }

    vec![
        &mut engine.crankshaft_fluctuation_lp,
        &mut engine.engine_vibration_filter,
        &mut engine.intake_noise_lp,
    ]
    .into_iter()
    .for_each(|lpf| fix_lpf(lpf, sample_rate));

    engine
        .muffler
        .muffler_elements
        .iter_mut()
        .chain(std::iter::once(&mut engine.muffler.straight_pipe))
        .flat_map(|waveguide| vec![&mut waveguide.chamber0, &mut waveguide.chamber1].into_iter())
        .chain(engine.cylinders.iter_mut().flat_map(|cylinder| {
            vec![
                &mut cylinder.exhaust_waveguide.chamber0,
                &mut cylinder.exhaust_waveguide.chamber1,
                &mut cylinder.extractor_waveguide.chamber0,
                &mut cylinder.extractor_waveguide.chamber1,
                &mut cylinder.intake_waveguide.chamber0,
                &mut cylinder.intake_waveguide.chamber1,
            ]
            .into_iter()
        }))
        .for_each(|delay_line| fix_loop_buffer(&mut delay_line.samples, sample_rate));
}
// copyright 2021 <NAME>

pub use super::debugger::run_debugger;
use super::joypad::{PlaybackJoyPad, RecordingJoyPad};
use super::{
    game_pak::GamePak, joypad, tandem, ControllerJoyPad, GameBoyEmulator, GameBoyOps, Result,
};
use crate::io;
use crate::rendering::Renderer;
use crate::sound::{NullSoundStream, SoundStream};
use crate::storage::{OpenMode, PersistentStorage};
use alloc::{string::String, vec::Vec};

pub fn run_emulator<Storage: PersistentStorage>(
    renderer: impl Renderer,
    sound_stream: impl SoundStream,
    storage: Storage,
    game_pak: GamePak<Storage>,
    save_state: Option<Vec<u8>>,
) -> Result<()> {
    let mut ops = GameBoyOps::new(renderer, sound_stream, storage);
    ops.load_game_pak(game_pak);
    ops.plug_in_joy_pad(ControllerJoyPad::new());

    let mut e = GameBoyEmulator::new();

    if let Some(save_state) = save_state {
        e.load_state(ops.game_pak.as_mut(), &save_state[..])?;
    }

    e.run(&mut ops);

    Ok(())
}

pub fn run_in_tandem_with<Storage: PersistentStorage>(
    out: &mut impl io::Write,
    storage: Storage,
    other_emulator_key: &str,
    game_pak: GamePak<Storage>,
    pc_only: bool,
) -> Result<()> {
    log::info!("loading {:?}", &other_emulator_key);

    tandem::run(out, storage, other_emulator_key, game_pak, pc_only)
}

pub(crate) fn run_emulator_until(
    e: &mut GameBoyEmulator,
    ops: &mut GameBoyOps<impl Renderer, impl SoundStream, impl PersistentStorage>,
    ticks: u64,
) {
    while e.cpu.elapsed_cycles < ticks {
        if let Some(c) = e.crashed() {
            panic!("Emulator crashed: {}", c);
        }

        e.tick(ops);
    }
}

fn run_emulator_until_and_take_screenshot(
    mut e: GameBoyEmulator,
    ops: &mut GameBoyOps<impl Renderer, impl SoundStream, impl PersistentStorage>,
    ticks: u64,


interest.
   *
   * The `bounding-poly` column must contain an even number of comma-separated
   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
   * non-negative integers for absolute bounding polygons, and float values
   * in [0, 1] for normalized bounding polygons.
   *
   * The system will resize the image if the image resolution is too
   * large to process (larger than 20MP).
   *

   *
   * string csv_file_uri = 1;
   *
   * @return The csvFileUri.
   */
  java.lang.String getCsvFileUri();

  /**
   *
   *
   *

   * The Google Cloud Storage URI of the input csv file.
   *
   * The URI must start with `gs://`.
   *
   * The format of the input csv file should be one image per line.
   * In each line, there are 8 columns.
   *
   * 1.  image-uri
   * 2.  image-id
   * 3.  product-set-id
   * 4.  product-id
   * 5.  product-category
   * 6.  product-display-name
   * 7.  labels
   * 8.  bounding-poly
   *
   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
   * columns are required. All other columns are optional.
   *
   * If the `ProductSet` or `Product` specified by the `product-set-id` and
   * `product-id` values does not exist, then the system will create a new
   * `ProductSet` or `Product` for the image. In this case, the
   * `product-display-name` column refers to
   * [display_name][google.cloud.vision.v1.Product.display_name], the
   * `product-category` column refers to
   * [product_category][google.cloud.vision.v1.Product.product_category], and
   * the `labels` column refers to
   * [product_labels][google.cloud.vision.v1.Product.product_labels].
   *
   * The `image-id` column is optional but must be unique if provided. If it is
   * empty, the system will automatically assign a unique id to the image.
   *
   * The `product-display-name` column is optional. If it is empty, the system
   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field
   * for the product to a space (" "). You can update the `display_name` later
   * by using the API.
   *
   * If a `Product` with the specified `product-id` already exists, then the
   * system ignores the `product-display-name`, `product-category`, and `labels`
   * columns.
   *
   * The `labels` column (optional) is a line containing a list of
   * comma-separated key-value pairs, in the following format:
   *
   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
   *
   * The `bounding-poly` column (optional) identifies one region of
   * interest from the image in the same manner as `CreateReferenceImage`. If
   * you do not specify the `bounding-poly` column, then the system will try to
   * detect regions of interest automatically.
   *
   * At most one `bounding-poly` column is allowed per line. If the image
   * contains multiple regions of interest, add a line to the CSV file that
   * includes the same product information, and the `bounding-poly` values for
   * each region of interest.
   *
   * The `bounding-poly` column must contain an even number of comma-separated
   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
   * non-negative integers for absolute bounding polygons, and float values
   * in [0, 1] for normalized bounding polygons.
   *
   * The system will resize the image if


r_ecran,a0		* adresse du dbut de l'cran
	move.l #pos_y,d0
	mulu.w #ecran_largeur/8,d0	* adresse de dbut de la 1re ligne
	adda.l d0,a0		* dans a0
	movea.l #sprite,a1		* adresse du sprite dans a1
	move.w #hauteur-1,d0
prg_b1
	move.w #largeur/32-1,d1	* affichage 32 bits par 32 bits
	move.w #pos_x,d2		* premier pixel
prg_b2
	move.l (a1)+,d7		* rcupration des 32 bits  afficher
	bfins d7,(a0){d2:32}		* affichage !
	add.l #32,d2		* pixels suivants
	dbra d1,prg_b2

	adda.l #ecran_largeur/8,a0	* passage  la ligne de l'cran suivante
	dbra d0,prg_b1
	rts

	include "principh.s"

	section DATA
sprite_bin	incbin "sprite.tpi"
sprite	equ sprite_bin+140


ov     r4, #0x0
.arm
branch_20b2438: @ 20b2438 :arm
	ldr     r0, [r4, #0xc]
	tst     r0, #31, 16 @ #0x1f0000
	addeq   sp, sp, #0x6c
	ldmeqfd sp!, {r4-r7,pc}
	ldr     r0, [pc, #0x1cc] @ [0x20b261c] (=0x293130)
	str     r0, [sp, #0x50]
	ldr     r0, [r4, #0x4]
	str     r0, [sp, #0x54]
	ldr     r0, [r4, #0x8]
	str     r0, [sp, #0x58]
	ldr     r1, [r4, #0xc]
	str     r1, [sp, #0x5c]
	ldrh    r0, [r4, #0x1e]
	tst     r0, #0x20
	bicne   r0, r1, #31, 16 @ #0x1f0000
	ldr     r1, [pc, #0x1a4] @ [0x20b2620] (=0x2b2a)
	strne   r0, [sp, #0x5c]
	str     r1, [sp, #0x60]
	ldr     r2, [r4, #0x14]
	ldr     r0, [sp, #0x50]
	str     r2, [sp, #0x64]
	ldrh    r3, [r4, #0x1c]
	add     r1, sp, #0x54
	mov     r2, #0x6
	str     r3, [sp, #0x68]
	bl      Function_20b275c
	ldrh    r0, [r4, #0x1e]
	tst     r0, #0x1
	beq     branch_20b2570
	mov     r2, #0x8
	str     r2, [sp, #0x18]
	ldrh    r1, [r4, #0x20]
	add     r0, r4, #0x2c
	strh    r1, [sp, #0x44]
	ldrh    r1, [r4, #0x22]
	strh    r1, [sp, #0x46]
	ldr     r1, [r4, #0x24]
	str     r1, [sp, #0x48]
	ldr     r1, [r4, #0x28]
	str     r1, [sp, #0x4c]
	ldrh    r1, [r4, #0x1e]
	tst     r1, #0x2
	orrne   r1, r2, #0x1
	strne   r1, [sp, #0x18]
	bne     branch_20b2500
	ldr     r1, [r0]
	str     r1, [sp, #0x30]
	ldr     r1, [r0, #0x4]
	add     r0, r0, #0x8
	str     r1, [sp, #0x34]
.arm
branch_20b2500: @ 20b2500 :arm
	ldrh    r1, [r4, #0x1e]
	tst     r1, #0x4
	ldrne   r1, [sp, #0x18]
	orrne   r1, r1, #0x2
	strne   r1, [sp, #0x18]
	bne     branch_20b252c
	ldrsh   r1, [r0]
	strh    r1, [sp, #0x38]
	ldrsh   r1, [r0, #0x2]
	add     r0, r0, #0x4
	strh    r1, [sp, #0x3a]
.arm
branch_20b252c: @ 20b252c :arm
	ldrh    r1, [r4, #0x1e]
	tst     r1, #0x


\defgroup SAML22G17A_port PORT Definitions */
/*@{*/

#include "pio/saml22g17a.h"
/*@}*/

/* ************************************************************************** */
/**  MEMORY MAPPING DEFINITIONS FOR SAML22G17A */
/* ************************************************************************** */

#define FLASH_SIZE            0x20000UL /* 128 kB */
#define FLASH_PAGE_SIZE       64
#define FLASH_NB_OF_PAGES     2048
#define FLASH_USER_PAGE_SIZE  64
#define HSRAM_SIZE            0x4000UL /* 16 kB */

#define FLASH_ADDR            (0x00000000u) /**< FLASH base address */
#define FLASH_USER_PAGE_ADDR  (0x00800000u) /**< FLASH_USER_PAGE base address */
#define HSRAM_ADDR            (0x20000000u) /**< HSRAM base address */
#define HPB0_ADDR             (0x40000000u) /**< HPB0 base address */
#define HPB1_ADDR             (0x41000000u) /**< HPB1 base address */
#define HPB2_ADDR             (0x42000000u) /**< HPB2 base address */
#define PPB_ADDR              (0xE0000000u) /**< PPB base address */

#define DSU_DID_RESETVALUE    0x1082000BUL
#define NVMCTRL_RWW_EEPROM_SIZE 0x1000UL /* 4 kB */
#define PORT_GROUPS           2

/* ************************************************************************** */
/**  ELECTRICAL DEFINITIONS FOR SAML22G17A */
/* ************************************************************************** */

#ifdef __cplusplus
}
#endif

/*@}*/

#endif /* SAML22G17A_H */


Exception {
        if (xmlSchema == null || xmlSchema.length() == 0) {
            throw new SMSException(IUMSConstants.UMS_BUNDLE_NAME,
                    IUMSConstants.SMSSCHEMA_SERVICE_NOTFOUND, null);
        }
        InputStream in;
        String xmlEncoding = "ISO-8859-1";
        if ((xmlSchema !=null) &&
                (xmlSchema.toLowerCase().indexOf(XML_ENC_UTF8) != -1) ) {
            xmlEncoding = "UTF-8";
        }
        try {
            in = new ByteArrayInputStream(xmlSchema.getBytes(xmlEncoding));
        } catch (Exception ex) {
            SMSEntry.debug.error("SMSSchema: Unsupported encoding ", ex);
            in = new ByteArrayInputStream(xmlSchema.getBytes());
        }
        return in;
    }

    Document getDocument() {
        return document;
    }

    /**
     * The method escapes '&', '<', '>', '"', '''
     */
    public static String escapeSpecialCharacters(String txt) {
        if (txt == null) {
            return txt;
        }

        int len = txt.length();
        if (len == 0) {
            return txt;
        }

        StringBuilder buf = new StringBuilder();

        for (int i = 0; i < len; i++) {
            char c = txt.charAt(i);
            switch (c) {
            case '&':
                buf.append("&");
                break;
            case '<':
                buf.append("<");
                break;
            case '>':
                buf.append(">");
                break;
            case '\"':
                buf.append(""");
                break;
            case '\'':
                buf.append("'");
                break;
            case '/':
                buf.append("/");
                break;
            case '\u00A0':
                buf.append(" ");
                break;
            default:
                buf.append(c);
            }
        }

        return buf.toString();
    }

    /**
     * The method reverses the escape sequence "/" to the character "/".
     */
    public static String unescapeName(String txtName) {
        if (txtName == null) {
            return txtName;
        }

        int len = txtName.length();
        if (len == 0) {
            return txtName;
        }

        int indx;
        for (int i = 0; i < txtName.length(); i++) {
            indx = txtName.indexOf(SLASH_ESC_SEQ);
            if (indx >= 0) {
                String prefixID = txtName.substring(0, indx);
                String postfixID = txtName.substring(indx + 5);
                txtName = prefixID + "/" + postfixID;
            }
        }
        return (txtName);
    }
}
/**
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
 *
 * The contents of this file are subject to the terms
 * of the Common Development and Distribution License
 * (the License). You may not use this file except in
 * compliance with the License.
 *
 * You can obtain a copy of the License at
 * https://opensso.dev.java.net/public/CDDLv1.0.html or
 * opensso/legal/CDDLv1.0.txt
 * See the License for the specific language governing
 * permission and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL
 * Header Notice in each file and include the License file
 * at opensso/legal/CDDLv1.0.txt.
 * If applicable, add the following below the CDDL Header,
 * with the fields enclosed by brackets [] replaced by
 * your own identifying information:
 * "Portions Copyrighted [year] [name of copyright owner]"
 *
 * $Id: SMSObjectDB.java,v 1.4 2008/06/25 05:44:05 qcheng Exp $
 *
 */

/*
 * Portions Copyrighted [2011] [ForgeRock AS]
 */
pac


passed_time': '01月18日',
      'post_id': 61823558,
      'published_at': '2020-01-18 22:27:11',
      'recommend': true,
      'recom_type': '',
      'rewardable': true,
      'reward_list_prefix': [],
      'rewards': '0',
      'rqt_id': '',
      'shares': 0,
      'site': {
        'description': '',
        'domain': '',
        'followers': 12,
        'has_everphoto_note': true,
        'icon':
            'https://lf6-tccdn-tos.pstatp.com/obj/tuchong-avatar/ll_15946115_3',
        'is_bind_everphoto': false,
        'is_following': false,
        'name': 'DIDIL',
        'site_id': '15946115',
        'type': 'user',
        'url': 'https://tuchong.com/15946115/',
        'verification_list': [],
        'verifications': 0,
        'verified': false
      },
      'site_id': '15946115',
      'sites': [],
      'tags': ['胶片人像摄影'],
      'title': '',
      'title_image': null,
      'type': 'multi-photo',
      'update': false,
      'url': 'https://tuchong.com/15946115/61823558/',
      'views': 680
    },
    {
      'author_id': '15946944',
      'collected': false,
      'comment_list_prefix': [],
      'comments': 2,
      'content': '橘子味汽水',
      'created_at': '2020-01-18 20:55:39',
      'data_type': 'post',
      'delete': false,
      'event_tags': [
        '日出日落奇迹时间',
        '胶片人像摄影',
        '暖色调人像',
        '有温度的人像',
        '分享神仙颜值',
        '胶片集',
        '校园摄影师这样拍'
      ],
      'excerpt': '橘子味汽水',
      'favorite_list_prefix': [],
      'favorites': 12,
      'image_count': 12,
      'images': [
        {
          'description': '',
          'excerpt': '',
          'height': 2160,
          'img_id': 217368426,
          'img_id_str': '217368426',
          'title': '1733971',
          'user_id': 15946944,
          'width': 1437
        },
        {
          'description': '',
          'excerpt': '',
          'height': 2160,
          'img_id': 600425986,
          'img_id_str': '600425986',
          'title': '1733968',
          'user_id': 15946944,
          'width': 1440
        },
        {
          'description': '',
          'excerpt': '',
          'height': 2160,
          'img_id': 493864737,
          'img_id_str': '493864737',
          'title': '1733964',
          'user_id': 15946944,
          'width': 1437
        },
        {
          'description': '',
          'excerpt': '',
          'height': 2160,
          'img_id': 214550536,
          'img_id_str': '214550536',
          'title': '1733960',
          'user_id': 15946944,
          'width': 1437
        },
        {
          'description': '',
          'excerpt': '',
          'height': 2160,
          'img_id': 190891765,
          'img_id_str': '190891765',
          'title': '1733955',
          'user_id': 15


duce_op
    /// ```
    ///
    /// These values will be first divided into contiguous chunks of
    /// some size (the precise sizes will depend on how many cores are
    /// present and how active they are). These are folded using
    /// `fold_op`. Here, the chunk `[0, 1, 2, 3]` was folded into `X`
    /// and the chunk `[4, 5, 6]` was folded into `Y`. Note that `X`
    /// and `Y` may, in general, have different types than the
    /// original input sequence. Now the results from these folds are
    /// themselves *reduced* using `reduce_op` (again, in some
    /// unspecified order). So now `X` and `Y` are reduced to `Z`,
    /// which is the final result. Note that `reduce_op` must consume
    /// and produce values of the same type.
    ///
    /// Note that `fold` can always be expressed using map/reduce. For
    /// example, a call `self.fold(identity, fold_op, reduce_op)` could
    /// also be expressed as follows:
    ///
    /// ```
    /// self.map(|elem| fold_op(identity.clone(), elem))
    ///     .reduce_with_identity(identity, reduce_op)
    /// ```
    ///
    /// This is equivalent to an execution of `fold` where the
    /// subsequences that were folded sequentially would up being of
    /// length 1.  However, this would rarely happen in practice,
    /// typically the subsequences would be larger, and hence a call
    /// to `fold` *can* be more efficient than map/reduce,
    /// particularly if the `fold_op` is more efficient when applied
    /// to a large sequence.
    ///
    /// **This method is marked as unstable** because it is
    /// particularly likely to change its name and/or signature, or go
    /// away entirely.
    #[cfg(feature = "unstable")]
    fn fold<I,FOLD_OP,REDUCE_OP>(self,
                                 identity: I,
                                 fold_op: FOLD_OP,
                                 reduce_op: REDUCE_OP)
                                 -> I
        where FOLD_OP: Fn(I, Self::Item) -> I + Sync,
              REDUCE_OP: Fn(I, I) -> I + Sync,
              I: Clone + Sync + Send,
    {
        fold::fold(self, &identity, &fold_op, &reduce_op)
    }

    /// Sums up the items in the iterator.
    ///
    /// Note that the order in items will be reduced is not specified,
    /// so if the `+` operator is not truly commutative and
    /// associative (as is the case for floating point numbers), then
    /// the results are not fully deterministic.
    fn sum(self) -> Self::Item
        where SumOp: ReduceOp<Self::Item>
    {
        reduce(self, SUM)
    }

    /// Multiplies all the items in the iterator.
    ///
    /// Note that the order in items will be reduced is not specified,
    /// so if the `*` operator is not truly commutative and
    /// associative (as is the case for floating point numbers), then
    /// the results are not fully deterministic.
    fn mul(self) -> Self::Item
        where MulOp: ReduceOp<Self::Item>
    {
        reduce(self, MUL)
    }

    /// Computes the minimum of all the items in the iterator.
    ///
    /// Note that the order in items will be reduced is not specified,
    /// so if the `Ord` impl is not truly commutative and associative
    /// (as is the case for floating point numbers), then the results
    /// are not deterministic.
    fn min(self) -> Self::Item
        where MinOp: ReduceOp<Self::Item>
    {
        reduce(self, MIN)
    }

    /// Computes the maximum of all the items in the iterator.
    ///
    /// Note that the order in items will


NUM_TIMESTAMPS * NUM_BACK_BUFFERS;

		result = vkCreateQueryPool(device, &info, NULL, &queryPool);
		if (result != VK_SUCCESS)
		{
			goto error_init_query_pool;
		}

		context->timestampQueryPool = queryPool;
	}
#endif

	return FFX_CACAO_STATUS_OK;

#ifdef FFX_CACAO_ENABLE_PROFILING
	vkDestroyQueryPool(device, context->timestampQueryPool, NULL);
error_init_query_pool:
#endif

	vkDestroyImageView(device, context->loadCounterView, NULL);
error_init_load_counter_view:
	vkDestroyImage(device, context->loadCounter, NULL);
	vkFreeMemory(device, context->loadCounterMemory, NULL);
error_init_load_counter_image:

error_init_constant_buffers:
	for (uint32_t i = 0; i < numConstantBackBuffersInited; ++i)
	{
		for (uint32_t j = 0; j < 4; ++j)
		{
			vkDestroyBuffer(device, context->constantBuffer[i][j], NULL);
			vkFreeMemory(device, context->constantBufferMemory[i][j], NULL);
		}
	}

error_allocate_descriptor_sets:
	vkDestroyDescriptorPool(device, context->descriptorPool, NULL);
error_init_descriptor_pool:

error_init_pipelines:
	for (uint32_t i = 0; i < numPipelinesInited; ++i)
	{
		vkDestroyPipeline(device, context->computePipelines[i], NULL);
	}

error_init_shader_modules:
	for (uint32_t i = 0; i < numShaderModulesInited; ++i)
	{
		vkDestroyShaderModule(device, context->computeShaders[i], NULL);
	}

error_init_pipeline_layouts:
	for (uint32_t i = 0; i < numPipelineLayoutsInited; ++i)
	{
		vkDestroyPipelineLayout(device, context->pipelineLayouts[i], NULL);
	}

error_init_descriptor_set_layouts:
	for (uint32_t i = 0; i < numDescriptorSetLayoutsInited; ++i)
	{
		vkDestroyDescriptorSetLayout(device, context->descriptorSetLayouts[i], NULL);
	}

error_init_samplers:
	for (uint32_t i = 0; i < numSamplersInited; ++i)
	{
		vkDestroySampler(device, context->samplers[i], NULL);
	}

	return errorStatus;
}

FFX_CACAO_Status FFX_CACAO_VkDestroyContext(FFX_CACAO_VkContext* context)
{
	if (context == NULL)
	{
		return FFX_CACAO_STATUS_INVALID_POINTER;
	}
	context = getAlignedVkContextPointer(context);

	VkDevice device = context->device;

#ifdef FFX_CACAO_ENABLE_PROFILING
	vkDestroyQueryPool(device, context->timestampQueryPool, NULL);
#endif

	vkDestroyImageView(device, context->loadCounterView, NULL);
	vkDestroyImage(device, context->loadCounter, NULL);
	vkFreeMemory(device, context->loadCounterMemory, NULL);

	for (uint32_t i = 0; i < NUM_BACK_BUFFERS; ++i)
	{
		for (uint32_t j = 0; j < 4; ++j)
		{
			vkDestroyBuffer(device, context->constantBuffer[i][j], NULL);
			vkFreeMemory(device, context->constantBufferMemory[i][j], NULL);
		}
	}

	vkDestroyDescriptorPool(device, context->descriptorPool, NULL);

	for (uint32_t i = 0; i < NUM_COMPUTE_SHADERS; ++i)
	{
		vkDestroyPipeline(device, context->computePipelines[i], NULL);
	}

	for (uint32_t


 [questKeys.startedBy] = {{28471,28472,28474},nil,nil},
            [questKeys.finishedBy] = {{26471},nil},
            [questKeys.requiredLevel] = 80,
            [questKeys.questLevel] = 80,
            [questKeys.requiredRaces] = raceIDs.ALL_HORDE,
            [questKeys.requiredClasses] = classIDs.DEATH_KNIGHT,
            [questKeys.objectivesText] = {"Use the scroll of teleportation from your inventory to reach Northrend and speak to the Image of Archmage Aethas Sunreaver."},
            [questKeys.requiredSourceItems] = {210046,210047},
            [questKeys.zoneOrSort] = 65,
        },
        [78752] = {
            [questKeys.name] = "Proof of Demise: Titan Rune Protocol Gamma",
            [questKeys.startedBy] = {{20735},nil,nil},
            [questKeys.finishedBy] = {{20735},nil,nil},
            [questKeys.requiredLevel] = 80,
            [questKeys.questLevel] = 80,
            [questKeys.requiredRaces] = raceIDs.NONE,
            [questKeys.objectivesText] = {"Archmage Lan\'dalock in Dalaran wants you to return with the Defiler\'s Medallion from any final dungeon boss.","","This quest may only be completed on any Titan Rune Protocol Gamma dungeon difficulty."},
            [questKeys.objectives] = {nil,nil,{{211206}}},
            [questKeys.zoneOrSort] = 4395,
            [questKeys.questFlags] = 4232,
            [questKeys.specialFlags] = 1,
            [questKeys.reputationReward] = {{factionIDs.KIRIN_TOR,75}},
        },
        [78753] = {
            [questKeys.name] = "Proof of Demise: Threats to Azeroth",
            [questKeys.startedBy] = {{20735},nil,nil},
            [questKeys.finishedBy] = {{20735},nil,nil},
            [questKeys.requiredLevel] = 80,
            [questKeys.questLevel] = 80,
            [questKeys.requiredRaces] = raceIDs.NONE,
            [questKeys.objectivesText] = {"Archmage Lan\'dalock in Dalaran wants you to return with the Mysterious Artifact from any final dungeon boss.","","This quest may only be completed on any Heroic dungeon difficulty."},
            [questKeys.objectives] = {nil,nil,{{211207}}},
            [questKeys.zoneOrSort] = 4395,
            [questKeys.questFlags] = 4232,
            [questKeys.specialFlags] = 1,
            [questKeys.reputationReward] = {{factionIDs.KIRIN_TOR,75}},
        },
        [83713] = {
            [questKeys.name] = "Proof of Demise: Titan Rune Protocol Alpha",
            [questKeys.startedBy] = {{20735},nil,nil},
            [questKeys.finishedBy] = {{20735},nil,nil},
            [questKeys.requiredLevel] = 80,
            [questKeys.questLevel] = 80,
            [questKeys.requiredRaces] = raceIDs.NONE,
            [questKeys.objectivesText] = {"Archmage Lan\'dalock in Dalaran wants you to return with the Defiler\'s Medallion from any final dungeon boss.","","This quest may only be completed on any Titan Rune Protocol Alpha dungeon difficulty."},
            [questKeys.objectives] = {nil,nil,{{211206}}},
            [questKeys.zoneOrSort] = 4395,
            [questKeys.questFlags] = 4232,
            [questKeys.specialFlags] = 1,
            [questKeys.reputationReward] = {{factionIDs.KIRIN_TOR,75}},
        },
        [83714] = {
            [questKeys.name] = "Proof of Demise: Threats to Azeroth",
            [questKeys.startedBy] = {{20735},nil,


�聋塞左，右聋塞右，此导气通闭法也。凡耳窍或损，或塞，或震伤，以致暴聋，或鸣不止者，即宜以手中指于耳窍中轻轻按捺，随捺随放，随放随捺，或轻轻摇动以引其气，捺之数次，其气必至，气至则窍自通矣。凡值此者，若不速为引导，恐因而渐闭，而竟至不开耳。

  薛立斋曰∶按前证若血虚有火，用四物加山栀、柴胡。若中气虚弱，用补中益气汤。若血气俱虚，用八珍汤加柴胡。若怒便聋而或鸣者，属肝胆经气实，用小柴胡加芎、归、山栀，虚用八珍加山栀。若午前甚者，阳气实热也，小柴胡加黄连、山栀。阳气虚，用补中益气汤加柴胡、山栀。午后甚者，阴血虚也，四物加白术、茯苓。若肾虚火动，或痰盛作渴者，必用地黄丸。经云∶头痛耳鸣，九窍不利，肠胃之所生也。脾胃一虚，耳目九窍皆为之病。

  一、 耳脓出明郁散（因五八） 红玉散（因五八） 流脓方（因五九）一、百虫入耳方（因六一）

  上星（灸二七壮，治风聋）、翳风（灸七壮，治耳聋痛）、合谷（灸七壮，治耳聋）、外关、听宫、偏历、肾愈

  抽薪饮（新寒三） 徙薪饮（新寒四） 十全大补汤（补二十） 清化饮（新因十三） 清膈煎（新寒九） 补中益气汤（补三十） 地黄丸（补百二十） 归脾汤（补三二） 大厘清饮（新寒五）加减一阴煎（新补九） 左归丸（新补四） 大补元煎（新补一） 平补镇心丹（补百十） 四物汤（补八） 右归丸（新补五） 肉苁蓉丸（补一五三） 辰砂妙香散（固十五） 八珍汤（十丸）六安煎（新和二） 小柴胡汤（散十九） 当归龙荟丸（寒一六七）

&emsp


组
     */
    ignoreAst: TerminalAst[];
    /**
     * 不符合语法的```Ast```的数组
     */
    errorAst: Ast[];
    /**
     * 不符合词法的```Token```的数组
     */
    errorToken: Token[];
}

/**
 * 语法分析器的类
 */
export class Parser<A extends Ast[], R extends DelayAst<A>> {
    /**
     * 同步的语法分析器由流式的语法分析器```StreamParser```组合实现
     */
    private streamParser: StreamParser<A, R>;
    /**
     * @param root 根规则
     * @param rules 所有规则
     */
    constructor(root: DelayRule<A, R>, rules: Rule[]) {
        this.streamParser = new StreamParser(root, rules);
    }

    /**
     * 对字符串进行语法分析的方法
     * @param str 待分析字符
     * @param skipError 当遇到不符合语法规则的```Ast```时，是否将其忽略，继续进行匹配（默认为```true```）
     */
    match(str: string, skipError = true): ParserResult<R> {
        let res!: ParserResult<R>;

        function getRes(r: ParserResult<R>) {
            res = r;
        }

        this.streamParser.reset(skipError);
        this.streamParser.on("end", getRes);
        this.streamParser.match(str);
        this.streamParser.end();
        this.streamParser.off("end", getRes);

        return res;
    }
}

/**
 * 语法分析器的类
 *
 * （接受流式数据，以事件形式返回结果）
 * @event error     发生词法错误时候触发的事件
 * @event ignore    分析出被忽略```Ast```时触发的事件
 * @event end       语法分析结束时触发的事件
 * @event success   语法分析成功时触发的事件
 * @event fail      语法分析失败时触发的事件
 */
export class StreamParser<A extends Ast[], R extends DelayAst<A>>
    extends EventEmmiter<{
        error: [ParserResult<R>],
        ignore: [ParserResult<R>],
        end: [ParserResult<R>],

        success: [ParserResult<R>],
        fail: [ParserResult<R>],
    }> {
    /**
     * 根规则
     */
    private root: Rule;
    /**
     * 流式词法分析器
     */
    private lex: StreamLex;
    /**
     * 规则匹配栈
     */
    private stack!: List<Matcher>;
    /**
     * 待匹配的```Ast```
     */
    private astArr!: List<Ast>;
    /**
     * 匹配结果
     */
    private res!: ParserResult<R>;

    /**
     * 往规则栈中插入规则的辅助方法
     * @param rule 规则
     */
    private push(rule: Rule) {
        this.stack.push(rule.getMatcher());
    }

    /**
     * 判断当前规则是否左递归的方法
     */
    private isLeftRecursion(): boolean {
        let iterator = this.stack.getReverseIterator();
        let delay = iterator.next().value as DelayMatcher<any, any>;
        for (let it of iterator) {
            let isSameRule = it instanceof DelayMatcher && it.delayRule === delay.delayRule;
            if (isSameRule) return true;

            let notRecursion =
                (it instanceof AndMatcher && it.isNotMatchingFirstRule)

                // todo，这两个判断究竟有没有用？
                || (it instanceof MoreMatcher && it.isNotMatchingFirstTime)
                || (it instanceof Repeat


ipeContext);
  expect(typeRecipe).toBeInstanceOf(NoTypeInfo);
});

test('Should create type recipe for classes', () => {
  const type = TsTestUtils.getClass(
    'TestClass',
    `
class TestClass {
}
`    );

  const expectedRequest: ITypeRecipeRequest = {
    kind: TypeRecipeRequestKind.recipe,
    value: {
      className: 'TestClass',
      fields: []
    }
  };

  const builder = new TypeRecipeBuilderClass();
  const typeRecipe = builder.create(type, {} as ITypeRecipeContext);
  expect(typeRecipe).toEqual(expectedRequest);
});

test('Should create info for explicit constructor', () => {
  const type = TsTestUtils.getClass(
    'TestClass',
    `
class TestClass {
  constructor(a: number, b: number) {}
}
`    );

  const expectedRequest: ITypeRecipeRequest = {
    kind: TypeRecipeRequestKind.recipe,
    value: {
      fields: [],
      className: 'TestClass',
      ctor: {
        name: 'ctor',
        arguments: [
          {name: 'a', typeRecipeRequest: {kind: TypeRecipeRequestKind.number}},
          {name: 'b', typeRecipeRequest: {kind: TypeRecipeRequestKind.number}},
        ]
      }
    }
  };

  const nestedRecipeRequest: ITypeRecipeRequest = {kind: TypeRecipeRequestKind.number};
  const mockContext: Partial<ITypeRecipeContext> = {
    resolveTypeOrThrow: jest.fn(() => nestedRecipeRequest)
  };

  const builder = new TypeRecipeBuilderClass();
  const typeRecipe = builder.create(type, mockContext as ITypeRecipeContext);
  expect(typeRecipe).toEqual(expectedRequest);
});
import { NotionMeta } from '../src/types/notion';
import parseMetaText from '../src/notion/parser/parseMetaText';

describe('parseMetaText', () => {
  it('should parse excerpt 1', () => {
    const meta: NotionMeta = {};
    const parser = parseMetaText(meta);
    expect(parser('!! hello world')).toBeTruthy();
    expect(meta).toEqual({ excerpt: 'hello world' });
  });
  it('should parse excerpt 2', () => {
    const meta: NotionMeta = {};
    const parser = parseMetaText(meta);
    expect(parser('!! hello ')).toBeTruthy();
    expect(meta).toEqual({ excerpt: 'hello' });
  });
  it('should parse slug 1', () => {
    const meta: NotionMeta = {};
    const parser = parseMetaText(meta);
    expect(parser('!slug a-b ')).toBeTruthy();
    expect(meta).toEqual({ slug: 'a-b' });
  });
  it('should parse slug 2', () => {
    const meta: NotionMeta = {};
    const parser = parseMetaText(meta);
    expect(parser('!slug b t/notok')).toBeTruthy();
    expect(meta).toEqual({ slug: 'b-t-notok' });
  });
  it('should parse slug 3', () => {
    const meta: NotionMeta = {};
    const parser = parseMetaText(meta);
    expect(parser('!slug allons enfants / de la patrie')).toBeTruthy();
    expect(meta).toEqual({ slug: 'allons-enfants-de-la-patrie' });
  });
  it('should parse date 1', () => {
    const meta: NotionMeta = {};
    const parser = parseMetaText(meta);
    expect(parser('!date 2020/01/30')).toBeTruthy();
    expect(meta).toEqual({ date: '2020-01-30T00:00:00.000Z' });
  });
  it('should parse date 2', () => {


 R selectInventoryByPharmacy(@PathVariable("pharmacyId") Integer pharmacyId) {
        return R.ok(pharmacyInventoryService.selectInventoryByPharmacy(pharmacyId));
    }

    /**
     * 设置库存
     *
     * @param pharmacyInventory 商家库存信息
     * @return 结果
     */
    @PostMapping("/put/reserve")
    public R putInventory(PharmacyInventory pharmacyInventory) {
        return R.ok(pharmacyInventoryService.putInventory(pharmacyInventory));
    }

    /**
     * 设置库存
     *
     * @param pharmacyInventory 商家库存信息
     * @return 结果
     */
    @PostMapping("/out/reserve")
    public R outInventory(PharmacyInventory pharmacyInventory) {
        return R.ok(pharmacyInventoryService.outInventory(pharmacyInventory));
    }

    /**
     * 获取详情信息
     *
     * @param id id
     * @return 结果
     */
    @GetMapping("/{id}")
    public R detail(@PathVariable("id") Integer id) {
        return R.ok(pharmacyInventoryService.getById(id));
    }

    /**
     * 获取信息列表
     *
     * @return 结果
     */
    @GetMapping("/list")
    public R list() {
        return R.ok(pharmacyInventoryService.list());
    }

    /**
     * 新增商家库存信息
     *
     * @param pharmacyInventory 商家库存信息
     * @return 结果
     */
    @PostMapping
    public R save(PharmacyInventory pharmacyInventory) {
        return R.ok(pharmacyInventoryService.save(pharmacyInventory));
    }

    /**
     * 修改保质期时间
     *
     * @param pharmacyInventory xx
     * @return 结果
     */
    @PutMapping("/date/put")
    public R updateDate(PharmacyInventory pharmacyInventory) {
        // 判断结束日期是否小于今天
        pharmacyInventoryService.updateById(pharmacyInventory);
        return R.ok(DateUtil.between(new Date(), DateUtil.parseDate(pharmacyInventory.getEndDate()), DateUnit.DAY, false));
    }

    /**
     * 修改商家库存信息
     *
     * @param pharmacyInventory 商家库存信息
     * @return 结果
     */
    @PutMapping
    public R edit(PharmacyInventory pharmacyInventory) {
        return R.ok(pharmacyInventoryService.updateById(pharmacyInventory));
    }

    /**
     * 删除商家库存信息
     *
     * @param ids ids
     * @return 商家库存信息
     */
    @DeleteMapping("/{ids}")
    public R deleteByIds(@PathVariable("ids") List<Integer> ids) {
        return R.ok(pharmacyInventoryService.removeByIds(ids));
    }

}
package cc.mrbird.febs.cos.dao;

import cc.mrbird.febs.cos.entity.WarrantyInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;

/**
 * @author FanK
 */
public interface WarrantyInfoMapper extends BaseMapper<WarrantyInfo> {

    /**
     * 分页获取保质期预警信息
     *
     * @param page         分页对象
     * @param warrantyInfo 保质期预警信息
     * @return 结果
     */
    IP


/* libunwind - a platform-independent unwind library
   Copyright (C) 2003-2004 Hewlett-Packard Co
        Contributed by David Mosberger-Tang <davidm@hpl.hp.com>

This file is part of libunwind.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */

#include "unwind-internal.h"

_Unwind_Reason_Code
_Unwind_ForcedUnwind (struct _Unwind_Exception *exception_object,
                      _Unwind_Stop_Fn stop, void *stop_parameter)
{
  struct _Unwind_Context context;
  unw_context_t uc;

  /* We check "stop" here to tell the compiler's inliner that
     exception_object->private_1 isn't NULL when calling
     _Unwind_Phase2().  */
  if (!stop)
    return _URC_FATAL_PHASE2_ERROR;

  if (_Unwind_InitContext (&context, &uc) < 0)
    return _URC_FATAL_PHASE2_ERROR;

  exception_object->private_1 = (unsigned long) stop;
  exception_object->private_2 = (unsigned long) stop_parameter;

  return _Unwind_Phase2 (exception_object, &context);
}

_Unwind_Reason_Code __libunwind_Unwind_ForcedUnwind (struct _Unwind_Exception*,
                                                     _Unwind_Stop_Fn, void *)
     ALIAS (_Unwind_ForcedUnwind);


│   ├── CkipTagger_split_news
│   │   ├── CkipTagger使用範例.py
│   │   ├── CkipTagger與Jieba效能比較.pdf
│   │   ├── news_to_copeopi_script.py
│   │   ├── split_news.log
│   │   ├── split_news.py
│   │   └── 斷詞詞性解釋
│   │       ├── Entity_Types.xlsx
│   │       └── POS_Tags.xlsx
│   ├── CopeOpi_scripts
│   │   ├── CopeOpi_trad.class
│   │   ├── CopeOpi_trad.java
│   │   ├── ckip_to_cope_list.lst
│   │   ├── dic_trad
│   │   │   ├── neg_unigram.txt
│   │   │   ├── negation.txt
│   │   │   ├── negative_new.txt
│   │   │   ├── pos_unigram.txt
│   │   │   └── positive_new.txt
│   │   ├── file_trad.lst
│   │   ├── opinion
│   │   │   ├── OpinionCore_Enhanced.jar
│   │   │   ├── OpinionCore_Enhanced_simp.class
│   │   │   ├── OpinionCore_Enhanced_simp.jar
│   │   │   ├── OpinionCore_Enhanced_trad.class
│   │   │   └── OpinionCore_Enhanced_trad.jar
│   │   ├── run_ckip_news.sh
│   │   ├── run_trad.sh
│   │   ├── test_trad.txt
│   │   └── 請把所有新聞文本的 .txt 與 .lst 檔案都放在這裡.txt
│   ├── HanLP
│   │   ├── __init__.py
│   │   ├── booking_data_cleaning.py
│   │   └── hanlp_senti_plus_cope.py
│   ├── data_processing
│   │   ├── __init__.py
│   │   ├── __pycache__/
│   │   ├── add_djia_in_df.py
│   │   ├── create_lagged_features.py
│   │   ├── create_reg_vars.py
│   │   └── standardize_column.py
│   ├── models
│   │   ├── __init__.py
│   │   ├── format_reg_model.py
│   │   ├── format_significance.py
│   │   ├── run_ols_and_format.py
│   │   └── stepwise_forward_selection.py
│   ├── scripts
│   │   ├── __init__.py
│   │   ├── (0) journal_senti_score.py
│   │   ├── (1) daily_data_preparing.py
│   │   ├── (2) daily_data_preparing_2.py
│   │   ├── (3) daily_return_analyze.py
│   │   ├── (4) daily_return_analyze_2.py
│   │   ├── binary_ML.py
│   │   └──


ols=False)
    raises(ValueError, lambda: _validate_coordinates(u_auxiliary=[s1, ua1]))
    # Test normal function
    t = dynamicsymbols._t
    a = symbols('a')
    f1, f2 = symbols('f1:3', cls=Function)
    _validate_coordinates([f1(a), f2(a)], is_dynamicsymbols=False)
    raises(ValueError, lambda: _validate_coordinates([f1(a), f2(a)]))
    raises(ValueError, lambda: _validate_coordinates(speeds=[f1(a), f2(a)]))
    dynamicsymbols._t = a
    _validate_coordinates([f1(a), f2(a)])
    raises(ValueError, lambda: _validate_coordinates([f1(t), f2(t)]))
    dynamicsymbols._t = t

def test_parse_linear_solver():
    A, b = Matrix(3, 3, symbols('a:9')), Matrix(3, 2, symbols('b:6'))
    assert _parse_linear_solver(Matrix.LUsolve) == Matrix.LUsolve  # Test callable
    assert _parse_linear_solver('LU')(A, b) == Matrix.LUsolve(A, b)

def test_deprecated_moved_functions():
    from sympy.physics.mechanics.functions import (
        inertia, inertia_of_point_mass, gravity)
    N = ReferenceFrame('N')
    with warns_deprecated_sympy():
        assert inertia(N, 0, 1, 0, 1) == (N.x | N.y) + (N.y | N.x) + (N.y | N.y)
    with warns_deprecated_sympy():
        assert inertia_of_point_mass(1, N.x + N.y, N) == (
            (N.x | N.x) + (N.y | N.y) + 2 * (N.z | N.z) -
            (N.x | N.y) - (N.y | N.x))
    p = Particle('P')
    with warns_deprecated_sympy():
        assert gravity(-2 * N.z, p) == [(p.masscenter, -2 * p.mass * N.z)]


[Fact]
    public void Parse_Create_Table_Auto_Increment()
    {
        var create =
            VerifiedStatement<Statement.CreateTable>("CREATE TABLE foo (bar INT PRIMARY KEY AUTO_INCREMENT)");

        Assert.Equal("foo", create.Element.Name);
        Assert.Equal(new ColumnDef[]
        {
            new("bar", new DataType.Int(),
                Options: new ColumnOptionDef[]
                {
                    new(new ColumnOption.Unique(true)),
                    new(new ColumnOption.DialectSpecific(new[] {new Word("AUTO_INCREMENT")}))

                })
        }, create.Element.Columns);
    }

    [Fact]
    public void Parse_Create_Table_Set_Enum()
    {
        var create =
            VerifiedStatement<Statement.CreateTable>("CREATE TABLE foo (bar SET('a', 'b'), baz ENUM('a', 'b'))");

        Assert.Equal("foo", create.Element.Name);
        Assert.Equal(new ColumnDef[]
        {
            new("bar", new DataType.Set(new[] {"a", "b"})),
            new("baz", new DataType.Enum(new[] {"a", "b"}))
        }, create.Element.Columns);
    }

    [Fact]
    public void Parse_Create_Table_Engine_Default_Charset()
    {
        var create =
            VerifiedStatement<Statement.CreateTable>(
                "CREATE TABLE foo (id INT(11)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3");

        Assert.Equal("foo", create.Element.Name);
        Assert.Equal(new TableEngine("InnoDB"), create.Element.Engine);
        Assert.Equal("utf8mb3", create.Element.DefaultCharset);
        Assert.Equal(new ColumnDef[]
        {
            new("id", new DataType.Int(11))

        }, create.Element.Columns);
    }

    [Fact]
    public void Parse_Create_Table_Collate()
    {
        var create =
            VerifiedStatement<Statement.CreateTable>("CREATE TABLE foo (id INT(11)) COLLATE=utf8mb4_0900_ai_ci");

        Assert.Equal("foo", create.Element.Name);
        Assert.Equal("utf8mb4_0900_ai_ci", create.Element.Collation);
        Assert.Equal(new ColumnDef[] { new("id", new DataType.Int(11)) }, create.Element.Columns);
    }

    [Fact]
    public void Parse_Create_Table_Comment_Character_Set()
    {
        var create =
            VerifiedStatement<Statement.CreateTable>(
                "CREATE TABLE foo (s TEXT CHARACTER SET utf8mb4 COMMENT 'comment')");

        Assert.Equal("foo", create.Element.Name);
        Assert.Equal(new ColumnDef[]
        {
            new("s", new DataType.Text(),
                Options: new ColumnOptionDef[]
                {
                    new(new ColumnOption.CharacterSet("utf8mb4")),
                    new(new ColumnOption.Comment("comment"))
                })
        }, create.Element.Columns);
    }

    [Fact]
    public void Parse_Quote_Identifiers()
    {
        var create = VerifiedStatement<Statement.CreateTable>("CREATE TABLE `PRIMARY` (`BEGIN` INT PRIMARY KEY)");

        Assert.Equal("`PRIMARY`", create.Element.Name);
        Assert.Equal(new ColumnDef[]
        {
            new(new Ident("BEGIN", Symbols.Backtick), new DataType.Int(), Options: new ColumnOptionDef[]
            {
                new(new ColumnOption.Unique(true))
            })
        }, create.Element.Columns);
    }

    [Fact]
    public void Parse_Escaped_Quote_Identifiers_With_Escape()
    {
        var query = VerifiedStatement<Statement.Select>("SELECT `quoted `` identifier`", unescape: true);
        var body = new SetExpression.SelectExpression(new Select(new[]
        {
            new SelectItem.UnnamedExpression(new


rd > .actions .input-group-append a + .input-group-text,
  .input-group-append .input-group-text + .input-group-text,
  .input-group-append .input-group-text + .btn,
  .input-group-append .fc .input-group-text + button,
  .fc .input-group-append .input-group-text + button,
  .input-group-append .ajax-upload-dragdrop .input-group-text + .ajax-file-upload,
  .ajax-upload-dragdrop .input-group-append .input-group-text + .ajax-file-upload,
  .input-group-append .swal2-modal .swal2-buttonswrapper .input-group-text + .swal2-styled,
  .swal2-modal .swal2-buttonswrapper .input-group-append .input-group-text + .swal2-styled,
  .input-group-append .wizard > .actions .input-group-text + a,
  .wizard > .actions .input-group-append .input-group-text + a {
    margin-left: -1px; }

.input-group-prepend {
  margin-right: -1px; }

.input-group-append {
  margin-left: -1px; }

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.56rem 0.75rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1;
  color: #495057;
  text-align: center;
  white-space: nowrap;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 2px; }
  .input-group-text input[type="radio"],
  .input-group-text input[type="checkbox"] {
    margin-top: 0; }

.input-group-lg > .form-control:not(textarea), .input-group-lg > .asColorPicker-input:not(textarea), .dataTables_wrapper .input-group-lg > select:not(textarea), .jsgrid .jsgrid-table .jsgrid-filter-row .input-group-lg > input:not(textarea)[type=text],
.jsgrid .jsgrid-table .jsgrid-filter-row .input-group-lg > select:not(textarea), .jsgrid .jsgrid-table .jsgrid-filter-row .input-group-lg > input:not(textarea)[type=number], .select2-container--default .input-group-lg > .select2-selection--single:not(textarea), .select2-container--default .select2-selection--single .input-group-lg > .select2-search__field:not(textarea), .input-group-lg > .typeahead:not(textarea),
.input-group-lg > .tt-query:not(textarea),
.input-group-lg > .tt-hint:not(textarea),
.input-group-lg > .custom-select {
  height: 3.175rem; }

.input-group-lg > .form-control, .input-group-lg > .asColorPicker-input, .dataTables_wrapper .input-group-lg > select, .jsgrid .jsgrid-table .jsgrid-filter-row .input-group-lg > input[type=text],
.jsgrid .jsgrid-table .jsgrid-filter-row .input-group-lg > select, .jsgrid .jsgrid-table .jsgrid-filter-row .input-group-lg > input[type=number], .select2-container--default .input-group-lg > .select2-selection--single, .select2-container--default .select2-selection--single .input-group-lg > .select2-search__field, .input-group-lg > .typeahead,
.input-group-lg > .tt-query,
.input-group-lg > .tt-hint,


# 超时，需要优化

# 方案：拆解成 001 two sum题目

class Solution(object):
    flag = {}

    def two_sum(self, cur_value, nums, target):
        # 输入数组，输出 和为target 的 两个idx 的数组
        rst = []
        record = {}
        for idx, value in enumerate(nums):
            if (target - value) in record.keys():
                rst.append(tuple(sorted([cur_value, value, target - value])))
            else:
                record[value] = idx
        return rst

    def threeSum(self, nums):
        """
        :type nums: List[int]
        :rtype: List[List[int]]
        """
        rst = []
        # 小于3 返回false
        if len(nums) < 3:
            return
        # 等于3 若数组和为0 返回true 否则 false
        elif len(nums) == 3:
            if sum(nums) == 0:
                return [nums]
        # 大于三，拆成1+2 并对2进行two_sum判断
        else:
            for idx, value in enumerate(nums):
                tmp = nums[0:idx] + nums[idx + 1 :] if idx != len(nums) else nums[0:idx]
                rst.extend(self.two_sum(value, tmp, -value))
            return set(rst)


            Entry {},
            Entries({}, {}),
            report = {},
            reportInGroup = {}
        )
        // TODO type parameter should not be necessary: https://youtrack.jetbrains.com/issue/KT-60976/overload-ambiguity-mismatch-in-case-of-covariance-and-only-in-conjunction-with-Any
        star = star.toContain.inOrder.only.grouped.within.inAnyOrder<Any, Collection<*>>(
            Entry {},
            Entries({}, {}),
            report = {},
            reportInGroup = {}
        )

        nList = nList.toContain.inOrder.only.grouped.within.inAnyOrder(Entry(null), Entries({}, null))
        // TODO type parameter should not be necessary: https://youtrack.jetbrains.com/issue/KT-60976/overload-ambiguity-mismatch-in-case-of-covariance-and-only-in-conjunction-with-Any
        star = star.toContain.inOrder.only.grouped.within.inAnyOrder(Entry<Number>(null), Entries<Number>(null, {}))

        nList = nList.toContain.inOrder.only.grouped.within.inAnyOrder(Entry(null), Entries({}, null), report = {})
        // TODO type parameter should not be necessary: https://youtrack.jetbrains.com/issue/KT-60976/overload-ambiguity-mismatch-in-case-of-covariance-and-only-in-conjunction-with-Any
        star = star.toContain.inOrder.only.grouped.within.inAnyOrder(
            Entry<Number>(null),
            Entries<Number>(null, {}),
            report = {})

        nList = nList.toContain.inOrder.only.grouped.within.inAnyOrder(
            Entry(null),
            Entries({}, null),
            reportInGroup = {}
        )
        // TODO type parameter should not be necessary: https://youtrack.jetbrains.com/issue/KT-60976/overload-ambiguity-mismatch-in-case-of-covariance-and-only-in-conjunction-with-Any
        star = star.toContain.inOrder.only.grouped.within.inAnyOrder<Any, Collection<Any?>>(
            Entry(null),
            Entries(null, {}),
            reportInGroup = {})

        nList = nList.toContain.inOrder.only.grouped.within.inAnyOrder(
            Entry(null),
            Entries({}, null),
            report = {},
            reportInGroup = {})

        // TODO type parameter should not be necessary: https://youtrack.jetbrains.com/issue/KT-60976/overload-ambiguity-mismatch-in-case-of-covariance-and-only-in-conjunction-with-Any
        star = star.toContain.inOrder.only.grouped.within.inAnyOrder<Any, Collection<Any?>>(
            Entry(null),
            Entries(null, {}),
            report = {},
            reportInGroup = {})
    }
}
package ch.tutteli.atrium.api.fluent.en_GB.samples

import ch.tutteli.atrium.api.fluent.en_GB.*
import ch.tutteli.atrium.api.verbs.expect
import kotlin.test.Test

class MapLikeToContainInAnyOrderOnlyCreatorSamples {

    @Test
    fun entry() {
        expect(mapOf(1 to "a")).toContain.inAnyOrder.only.entry(1 to "a")

        fails { // because subject has additional entries
            expect(mapOf(1 to "a", 2 to "b"))
                .toContain.inAnyOrder.only.entry(1 to "a")
        }
    }

    @Test
    fun entryKeyValue() {
        expect(mapOf(1 to "apple")).toContain.inAnyOrder.only.entry(
            KeyValue(1) { toStartWith("a") },
        )

        fails { // because subject has additional entries
            expect


-std/src/main.rs
// ~/software/rust/async-std/target/release/async-std
// $ cargo build --release
// % async-std

// Local Variables: //
// mode: c++ //
// tab-width: 4 //
// End: //
<filename>machine_manager/src/config/machine_config.rs
// Copyright (c) 2020 Huawei Technologies Co.,Ltd. All rights reserved.
//
// StratoVirt is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan
// PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
//         http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
// See the Mulan PSL v2 for more details.

extern crate serde;
extern crate serde_json;

use std::str::FromStr;

use serde::{Deserialize, Serialize};

use super::errors::{ErrorKind, Result, ResultExt};
use crate::config::{CmdParser, ConfigCheck, ExBool, VmConfig};

const DEFAULT_CPUS: u8 = 1;
const DEFAULT_MEMSIZE: u64 = 256;
const MAX_NR_CPUS: u64 = 254;
const MIN_NR_CPUS: u64 = 1;
const MAX_MEMSIZE: u64 = 549_755_813_888;
const MIN_MEMSIZE: u64 = 268_435_456;
const M: u64 = 1024 * 1024;
const G: u64 = 1024 * 1024 * 1024;

#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)]
pub enum MachineType {
    None,
    MicroVm,
    StandardVm,
}

impl FromStr for MachineType {
    type Err = ();

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        match s.to_lowercase().as_str() {
            "none" => Ok(MachineType::None),
            "microvm" => Ok(MachineType::MicroVm),
            #[cfg(target_arch = "x86_64")]
            "q35" => Ok(MachineType::StandardVm),
            #[cfg(target_arch = "aarch64")]
            "virt" => Ok(MachineType::StandardVm),
            _ => Err(()),
        }
    }
}

/// Config that contains machine's memory information config.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct MachineMemConfig {
    pub mem_size: u64,
    pub mem_path: Option<String>,
    pub dump_guest_core: bool,
    pub mem_share: bool,
}

impl Default for MachineMemConfig {
    fn default() -> Self {
        MachineMemConfig {
            mem_size: DEFAULT_MEMSIZE * M,
            mem_path: None,
            dump_guest_core: true,
            mem_share: false,
        }
    }
}

/// Config struct for machine-config.
/// Contains some basic Vm config about cpu, memory, name.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct MachineConfig {
    pub mach_type: MachineType,
    pub nr_cpus: u8,
    pub mem_config: MachineMemConfig,
}

impl Default for MachineConfig {
    /// Set default config for `machine-config`.
    fn default() -> Self {
        MachineConfig {
            mach_type: MachineType::MicroVm,
            nr_cpus: DEFAULT_CPUS,
            mem_config: MachineMemConfig::default(),
        }
    }
}

impl ConfigCheck for MachineConfig {
    fn check(&self) -> Result<()> {
        if self.mem_config.mem_size < MIN_MEMSIZE || se


                            ScreenShot.TakeCameraImage(Camera.main, tex);

                            var bytes = EncodeImage(tex);
                            SafeDestroy(tex);
                            System.IO.File.WriteAllBytes(path, bytes);
                        }
                    }
                }
			#endregion

			#region Pipeline
                void SafeDestroy(UnityEngine.Object obj) {

                    if( Application.isPlaying )
                    {
                        UnityEngine.Object.Destroy(obj);
                    }
                    else
                    {
                        UnityEngine.Object.DestroyImmediate(obj);
                    }
                }

                string ChooseSavePath() {
                    var ext = (m_format==ImageFormat.JPG) ? "jpg" : (m_format==ImageFormat.PNG) ? "png" : "exr";

                    return EditorUtility.SaveFilePanel("Save Screenshot", EditorApplication.applicationPath, "", ext);
                }

                Texture2D CreateTexture() {

                    int w = Camera.main.pixelWidth, h=Camera.main.pixelHeight;
                    if( m_customResolution )
                    {
                        w = m_imageWidth;
                        h = m_imageHeight;
                    }
                    return new Texture2D(w, h, (m_format==ImageFormat.DXR) ? TextureFormat.RGBAHalf : TextureFormat.ARGB32, false );
                }

                byte[] EncodeImage(Texture2D tex) {

                    byte[] bytes = null;

                    switch(m_format)
                    {
                        case ImageFormat.JPG:
                            bytes = tex.EncodeToJPG();
                            break;
                        case ImageFormat.PNG:
                            bytes = tex.EncodeToPNG();
                            break;
                        case ImageFormat.DXR:
                            bytes = tex.EncodeToEXR();
                            break;
                        default:
                            break;
                    }
                    return bytes;
                }
			#endregion
		#endregion
	}
}


eration order in Go is deliberately randomised, so must open Load/Base
	// prior to iterating.
	for _, lib := range luaLibs {
		ls.Push(ls.NewFunction(lib.libFunc))
		ls.Push(LString(lib.libName))
		ls.Call(1, 0)
	}
}
package lua

func OpenCoroutine(L *LState) int {
	// TODO: Tie module name to contents of linit.go?
	mod := L.RegisterModule(CoroutineLibName, coFuncs)
	L.Push(mod)
	return 1
}

var coFuncs = map[string]LGFunction{
	"create":  coCreate,
	"yield":   coYield,
	"resume":  coResume,
	"running": coRunning,
	"status":  coStatus,
	"wrap":    coWrap,
}

func coCreate(L *LState) int {
	fn := L.CheckFunction(1)
	newthread, _ := L.NewThread()
	base := 0
	newthread.stack.Push(callFrame{
		Fn:         fn,
		Pc:         0,
		Base:       base,
		LocalBase:  base + 1,
		ReturnBase: base,
		NArgs:      0,
		NRet:       MultRet,
		Parent:     nil,
		TailCall:   0,
	})
	L.Push(newthread)
	return 1
}

func coYield(L *LState) int {
	return -1
}

func coResume(L *LState) int {
	th := L.CheckThread(1)
	if L.G.CurrentThread == th {
		msg := "can not resume a running thread"
		if th.wrapped {
			L.RaiseError(msg)
			return 0
		}
		L.Push(LFalse)
		L.Push(LString(msg))
		return 2
	}
	if th.Dead {
		msg := "can not resume a dead thread"
		if th.wrapped {
			L.RaiseError(msg)
			return 0
		}
		L.Push(LFalse)
		L.Push(LString(msg))
		return 2
	}
	th.Parent = L
	L.G.CurrentThread = th
	if !th.isStarted() {
		cf := th.stack.Last()
		th.currentFrame = cf
		th.SetTop(0)
		nargs := L.GetTop() - 1
		L.XMoveTo(th, nargs)
		cf.NArgs = nargs
		th.initCallFrame(cf)
		th.Panic = panicWithoutTraceback
	} else {
		nargs := L.GetTop() - 1
		L.XMoveTo(th, nargs)
	}
	top := L.GetTop()
	threadRun(th)
	return L.GetTop() - top
}

func coRunning(L *LState) int {
	if L.G.MainThread == L {
		L.Push(LNil)
		return 1
	}
	L.Push(L.G.CurrentThread)
	return 1
}

func coStatus(L *LState) int {
	L.Push(LString(L.Status(L.CheckThread(1))))
	return 1
}

func wrapaux(L *LState) int {
	L.Insert(L.ToThread(UpvalueIndex(1)), 1)
	return coResume(L)
}

func coWrap(L *LState) int {
	coCreate(L)
	L.CheckThread(L.GetTop()).wrapped = true
	v := L.Get(L.GetTop())
	L.Pop(1)
	L.Push(L.NewClosure(wrapaux, v))
	return 1
}

//
package lua

import (
	"os"
	"strings"
	"time"
)

var startedAt time.Time

func init() {
	startedAt = time.Now()
}

func getIntField(L *LState, tb *LTable, key string, v int) int {
	ret := tb.RawGetString(key)

	switch lv := ret.(type) {
	case LNumber:
		return int(lv)
	case LString:
		slv := string(lv)
		slv = strings.TrimLeft(slv, " ")
		if strings.HasPrefix(slv, "0") && !strings.HasPrefix(slv, "0x") &&


count_codes/lookup?code=discountCode
     */
    public lookup(priceRuleId: number, code: string) {
        return this.createRequest<PriceRuleDiscountCode>("GET", this.getPath(priceRuleId, `discount_codes/lookup?code=${code}`));
    }

    /**
     * Updates a single discount code for a given price rule.
     */
    public update(priceRuleId: number, id: number, discount: PriceRuleDiscountCode) {
        return this.createRequest<PriceRuleDiscountCode>("PUT", this.getPath(priceRuleId, `${id}.json`), "discount_code", { discount_code: discount });
    }

    /**
     * Deletes an existing discount code object.
     */
    public delete(priceRuleId: number, id: number) {
        return this.createRequest<void>("DELETE", this.getPath(priceRuleId, `${id}.json`));
    }
}

export default PriceRuleDiscounts;import * as moment from 'moment';

export class Helper {
  public static fromApiToTime(date: string) {
    return moment(date).isValid() ? moment(date).format('HH:mm') : null;
  }
}
import { expect } from 'chai'

import { Individual } from '../individual'

import { Generation } from './generation'
import { configGeneration, configIndividual, seed } from '../mocks'

describe('Generation', () => {
  const baseConfig = Object.assign({}, configGeneration, configIndividual)
  let generation: Generation

  beforeEach(() => {
    generation = new Generation(baseConfig)
  })

  it('can add individuals to itself', () => {
    const entity = seed()
    const config = Object.assign({}, { entity }, configIndividual)
    const individual = new Individual(config)

    expect(generation.individuals.length)
      .to.equal(0)
    generation.add(individual)
    expect(generation.individuals.length)
      .to.equal(1)
  })

  it('can populate itself', () => {
    expect(generation.individuals.length)
      .to.equal(0)

    generation.populate('test')
    expect(generation.individuals.length)
      .to.equal(10)
  })

  it('won\'t overfill it self', () => {
    expect(generation.individuals.length)
      .to.equal(0)

    generation.populate('test')
    expect(generation.individuals.length)
      .to.equal(10)

    const entity = seed()
    const config = Object.assign({}, { entity }, configIndividual)
    const individual = new Individual(config)

    expect(generation.individuals.length)
      .to.equal(10)
    generation.add(individual)
    expect(generation.individuals.length)
      .to.equal(10)
  })

  it('can evaluate individuals', async () => {
    generation.populate(seed)
    const sampleIndividualFitness = generation.individuals[0].fitness
    await generation.evaluate()

    expect(sampleIndividualFitness)
      .to.be.undefined
    expect(generation.individuals[0].fitness)
      .to.not.equal(0)
    expect(generation.individuals[0].fitness)
      .to.not.equal(sampleIndividualFitness)
  })

  describe('sort and stats', () => {
    const sorts = ['Max', 'Min']

    beforeEach(async () => {
      const config = Object.assign({}, baseConfig, { optimizeKey: sorts.shift()})
      generation = new Generation(config)

      generation.populate(seed)
      await generation.evaluate()

      generation.sort()
    })

    it('can max', () => {
      expect(generation.individuals[0].fitness)
        .to.be.greaterThan(generation.individuals[9].fitness)

      const stats = generation.stats


WordPress中将每个潜在客户转化为销售
**介绍**：什么是 Poptics？Poptics 是一个先进的 WordPress 弹窗构建插件。它旨在创建引人注目的弹窗，瞬间生成潜在客户、提升转化率并增加销售🚀！
**产品网站**: [立即访问](https://www.producthunt.com/r/FZFTCUYTKZUOQD?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)
**Product Hunt**: [查看 Product Hunt 页面](https://www.producthunt.com/posts/poptics?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)

![Poptics](https://ph-files.imgix.net/2e23a8b2-abae-4910-811e-aab55725db31.jpeg?auto=format&fit=crop&frame=1&h=512&w=1024)

**关键词**：-, 产品名称：Poptics, -, 标语：在WordPress中将每个线索转化为销售, -, 简述：Poptics是一款先进的WordPress弹窗构建插件，旨在创建引人注目的弹窗，快速生成潜在客户、提升转化率和增加销售额🚀！, 关键词：弹窗构建插件，快速生成潜在客户，提升转化率，增加销售额
**票数**: 🔺43
**是否精选**：否
**发布时间**：2025年02月18日 PM04:01 (北京时间)

---

## [25. NextStep](https://www.producthunt.com/posts/nextstep-2?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)
**标语**：轻量级的Next.js和React应用程序入职库
**介绍**：NextStep 是一个开源库，适用于 Next.js（v1）和 React（v2-beta），使得创建互动产品导览变得简单。它支持流畅的 Framer Motion 动画，用户可以自定义这些动画，包括：逐步引导的入门导览，以及基于事件触发的自定义导览，以提升用户参与度。
**产品网站**: [立即访问](https://www.producthunt.com/r/VYSW6FSMTN7FYO?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28ID%3A+151633%29)
**Product Hunt**: [查看 Product Hunt 页面](https://www.producthunt.com/posts/nextstep-2?utm_campaign=producthunt-api&utm_medium=api-v2&utm_source=Application%3A+nextauth+%28


點)航速，炮擊屬性提高15.0%",
		name = "尚武之魂",
		desc = "增加$1點航速，炮擊屬性提高$2",
		type = 1,
		max_level = 10,
		id = 10950,
		system_transform = {},
		desc_get_add = {},
		desc_add = {
			{
				{
					"3",
					"+0.5"
				},
				{
					"3.5",
					"+0.5"
				},
				{
					"4",
					"+0.5"
				},
				{
					"4.5",
					"+0.5"
				},
				{
					"5",
					"+0.5"
				},
				{
					"5.5",
					"+0.5"
				},
				{
					"6",
					"+0.5"
				},
				{
					"6.5",
					"+0.5"
				},
				{
					"7",
					"+1"
				},
				{
					"8"
				}
			},
			{
				{
					"3.0%",
					"+0.8%"
				},
				{
					"3.8%",
					"+0.8%"
				},
				{
					"4.6%",
					"+1.0%"
				},
				{
					" 5.6%",
					"+1.2%"
				},
				{
					"6.8%",
					"+1.2%"
				},
				{
					"8.0%",
					"+1.5%"
				},
				{
					"9.5%",
					"+1.5%"
				},
				{
					"11.0%",
					"+2.0%"
				},
				{
					"13.0%",
					"+2.0%"
				},
				{
					"15.0%"
				}
			}
		}
	},
	[10960] = {
		desc_get = "出擊時，隊伍中特型驅逐艦的炮擊、機動提高15.0%(滿級30%)，雷擊提高4%(滿級10%)",
		name = "特型領艦",
		desc = "出擊時，隊伍中特型驅逐艦的炮擊、機動提高$1，雷擊提高$2",
		type = 3,
		max_level = 10,
		id = 10960,
		system_transform = {},
		desc_get_add = {
			{
				"15.0%",
				"30.0%"
			},
			{
				"4.0%",
				"10.0%"
			}
		},
		desc_add = {
			{
				{
					"15.0%",
					"+1.0%"
				},
				{
					"16.0%",
					"+1.0%"
				},
				{
					"17.0%",
					"+2.0%"
				},
				{
					"19.0%",
					"+1.0 %"
				},
				{
					"20.0%",
					"+1.0%"
				},
				{
					"21.0%",
					"+2.0%"
				},
				{
					"23.0%",
					"+2.0%"
				},
				{
					"25.0%",
					" +2.0%"
				},
				{
					"27.0%",
					"+3.0%"
				},
				{
					"30.0%"
				}
			},
			{
				{
					"4.0%",
					"+0.6%"
				},
				{
					"4.6%",
					"+0.6 %"
				},
				{
					"5.2%",
					"+0.8%"
				},
				{
					"6.0%


 threshold)时，开始执行拥塞避免算法，拥塞窗口大小不再指数增加，而是线性增加，即每经过一个传输轮次只增加1MSS.
> 无论在慢开始阶段还是在拥塞避免阶段，只要发送方判断网络出现拥塞（其根据就是没有收到确认），就要把慢开始门限ssthresh设置为出现拥塞时的发送方窗口值的一半（但不能小于2）。然后把拥塞窗口cwnd重新设置为1，执行慢开始算法。**（这是不使用快重传的情况）**

3. 快重传：快重传要求接收方在收到一个失序的报文段后就立即发出**重复确认**（为的是使发送方及早知道有报文段没有到达对方）而不要等到自己发送数据时捎带确认。快重传算法规定，发送方只要一连收到三个重复确认就应当立即重传对方尚未收到的报文段，而不必继续等待设置的重传计时器时间到期。

![快重传](_v_images/image-20221216124900832.png)

4. 快恢复：当发送方连续收到三个重复确认时，就把慢开始门限减半，然后执行拥塞避免算法。不执行慢开始算法的原因：因为如果网络出现拥塞的话就不会收到好几个重复的确认，所以发送方认为现在网络可能没有出现拥塞。
也有的快重传是把开始时的拥塞窗口cwnd值再增大一点，即等于 ssthresh + 3*MSS 。这样做的理由是：既然发送方收到三个重复的确认，就表明有三个分组已经离开了网络。这三个分组不再消耗网络的资源而是停留在接收方的缓存中。可见现在网络中减少了三个分组。因此可以适当把拥塞窗口扩大些。

### TCP如何最大利用带宽？

TCP速率受到三个因素影响

- 窗口：即滑动窗口大小，见[TCP如何实现流量控制？](#TCP如何实现流量控制)
- 带宽：这里带宽是指单位时间内从发送端到接收端所能通过的“最高数据率”，是一种硬件限制。TCP发送端和接收端的数据传输数不可能超过两点间的带宽限制。发送端和接收端之间带宽取所通过线路的带宽最小值（如通过互联网连接）。
- RTT：即Round Trip Time，表示从发送端到接收端的一去一回需要的时间，TCP在数据传输过程中会对RTT进行采样（即对发送的数据包及其ACK的时间差进行测量，并根据测量值更新RTT值），TCP根据得到的RTT值更新RTO值，即Retransmission TimeOut，就是重传间隔，发送端


     if is_in_obj(gpr):  # df.groupby(df['name'])
            in_axis = True
            exclusions.add(gpr.name)

        elif is_in_axis(gpr):  # df.groupby('name')
            if obj.ndim != 1 and gpr in obj:
                if validate:
                    obj._check_label_or_level_ambiguity(gpr, axis=axis)
                in_axis, name, gpr = True, gpr, obj[gpr]
                if gpr.ndim != 1:
                    # non-unique columns; raise here to get the name in the
                    # exception message
                    raise ValueError(f"Grouper for '{name}' not 1-dimensional")
                exclusions.add(name)
            elif obj._is_level_reference(gpr, axis=axis):
                in_axis, level, gpr = False, gpr, None
            else:
                raise KeyError(gpr)
        elif isinstance(gpr, Grouper) and gpr.key is not None:
            # Add key to exclusions
            exclusions.add(gpr.key)
            in_axis = True
        else:
            in_axis = False

        # create the Grouping
        # allow us to passing the actual Grouping as the gpr
        ping = (
            Grouping(
                group_axis,
                gpr,
                obj=obj,
                level=level,
                sort=sort,
                observed=observed,
                in_axis=in_axis,
                dropna=dropna,
            )
            if not isinstance(gpr, Grouping)
            else gpr
        )

        groupings.append(ping)

    if len(groupings) == 0 and len(obj):
        raise ValueError("No group keys passed!")
    if len(groupings) == 0:
        groupings.append(Grouping(Index([], dtype="int"), np.array([], dtype=np.intp)))

    # create the internals grouper
    grouper = ops.BaseGrouper(group_axis, groupings, sort=sort, dropna=dropna)
    return grouper, frozenset(exclusions), obj

def _is_label_like(val) -> bool:
    return isinstance(val, (str, tuple)) or (val is not None and is_scalar(val))

def _convert_grouper(axis: Index, grouper):
    if isinstance(grouper, dict):
        return grouper.get
    elif isinstance(grouper, Series):
        if grouper.index.equals(axis):
            return grouper._values
        else:
            return grouper.reindex(axis)._values
    elif isinstance(grouper, MultiIndex):
        return grouper._values
    elif isinstance(grouper, (list, tuple, Index, Categorical, np.ndarray)):
        if len(grouper) != len(axis):
            raise ValueError("Grouper and axis must be same length")

        if isinstance(grouper, (list, tuple)):
            grouper = com.asarray_tuplesafe(grouper)
        return grouper
    else:
        return grouper


#ifndef __OggSoundStream_h__
#define __OggSoundStream_h__

/***************************************************************************

    file                 : OggSoundStream.h
    created              : Fri Dec 23 17:35:18 CET 2011
    copyright            : (C) 2011 Bernhard Wymann
    email                : berniw@bluewin.ch
    version              : $Id: OggSoundStream.h,v 1.1.2.3 2014/02/05 09:54:43 berniw Exp $

 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/* Concrete implementation for ogg sound streams */

#define OV_EXCLUDE_STATIC_CALLBACKS

#include <vorbis/vorbisfile.h>
#include "SoundStream.h"

class OggSoundStream : public SoundStream
{
	public:
		OggSoundStream(char* path);
		virtual ~OggSoundStream();

		virtual int getRateInHz() { return rateInHz; }
		virtual SoundFormat getSoundFormat() { return format; }

		virtual bool read(char* buffer, const int bufferSize, int* resultSize, const char** error);
		virtual void rewind();
		virtual void display();
		virtual bool isValid() { return valid; }

	protected:

	private:
		const char* errorString(int code);

		OggVorbis_File	oggStream;
		bool			valid;
		int				rateInHz;
		SoundFormat		format;
};

#endif // __OggSoundStream_h__


  }

  forkJoinStreams(){
    let first = Observable.of({source:1,value:1});

    let second = Observable.of({source:2,value:1});

    Observable.forkJoin(first,second)
              .subscribe((res:Array<any>) => this.forkJoinStream = res);
  }

}/**
 * 条件类型：T extends U ? X : Y
 */

type ConObj<T> = T extends string ? 'str' :
  T extends number ? 'number' :
  T extends boolean ? 'boolean' :
  'obj'

type con = ConObj<string>
type con2 = ConObj<Function>

/**
 * 分布式条件类型：(A | B) extends U ? X : Y
 * 分为 (A extends U ? X : Y) | (B extends U ? X : Y)
 */

type con3 = ConObj<string | number>

// 实现类型过滤
// ts中对应Exclude<T,U>
type Diff<T,U> = T extends U ? never : T

type diff = Diff<'a' | 'b' | 'c', 'a' | 'e'>

// 过滤掉null，undefined
// ts中对应NonNullable<T>
type NotNullable<T> = Diff<T, null | undefined >

type notNull = NotNullable<string | null | number | undefined>

// ts中Extract<T,U>，从T中抽取符合U的类型
type extract = Extract<'a' | 'b' | 'c', 'a' | 'e'>

// ts中ReturnType<T>, 获取函数返回值

type ret = ReturnType<() => any>export class PasswordValidator {
  hello: string;
  public validate(control) {
      let matched: Boolean = false;
      if (control.parent) {
         matched  = ((control.parent.value.password === control.value) && ((control.value !== '')));
      }
      return matched ? null : {'passwordMatchValidator': {value: control.value}};
 }
}
import { LocalUser } from "./types";
import { LOCAL } from "./client/constant";

export function getUserStorage(): LocalUser {
  const userString = (typeof localStorage !== 'undefined') && localStorage.getItem(LOCAL.MARK_LOGIN)
  let user = {}
  try {
    user = JSON.parse(userString as string) || {}
  } catch (error) {
    console.error('getUserStorage e', error)
  }
  return user
}
export function setUserStorage(user: LocalUser) {
  localStorage.setItem(LOCAL.MARK_LOGIN, JSON.stringify(user))
}
export function getStorage(key: string): string | undefined | null | false {
  const color = (typeof localStorage !== 'undefined') && localStorage.getItem(key)
  return color
}
export function setStorage(key: string, color: string) {
  localStorage.setItem(key, color)
}

export function mParseInt(x: string | string[]) {
  return parseInt(mValue(x))
}
export function mValue(x: string | string[]) {
  return x instanceof Array ? x[0] : x
}

export function getCookie(name: string) {
  const reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
  const arr = document.cookie.match(reg)

  if (arr)
    return unescape(arr[2]);
  else
    return null;
}

export function delCookie(name: string, path?: string) {
  const cval = getCookie(name);

  console.log('getCookie %s val', name, cval);

  if (cval != null)
    document.cookie = `${generateCookie({ [name]: escape(cval), expires: getExpire('s-1'), path })}`
}

const generateCookie = (obj: any = {}): string => {
  return Object.keys(obj).length === 0
    ? ''


            let tag_set_name = ele.xpath_text(r#"./td[1]/text()"#)?[0]
                .trim_matches(':')
                .to_owned();
            let tag = ele.xpath_text(r#"./td[2]/div/a/text()"#)?;
            tags.push((tag_set_name, tag));
        }
        debug!("tags: {:?}", tags);

        // 评分
        let rating = html.xpath_text(r#"//td[@id="rating_label"]/text()"#)?[0]
            .split(' ')
            .nth(1)
            .context("找不到评分")?
            .to_owned();
        debug!("评分: {}", rating);

        // 收藏
        let fav_cnt = html.xpath_text(r#"//td[@id="favcount"]/text()"#)?[0]
            .split(' ')
            .next()
            .context("找不到收藏数")?
            .to_owned();
        debug!("收藏数: {}", fav_cnt);

        // 图片页面
        let mut img_pages = html.xpath_text(r#"//div[@id="gdt"]//a/@href"#)?;

        // 继续翻页 (如果有
        while let Ok(next_page) = html.xpath_text(r#"//table[@class="ptt"]//td[last()]/a/@href"#) {
            debug!("下一页: {:?}", next_page);
            // TODO: 干掉此处的 block_on
            let text = block_in_place(|| {
                block_on(async { send!(self.client.get(&next_page[0]))?.text().await })
            })?;
            html = parse_html(text)?;
            img_pages.extend(html.xpath_text(r#"//div[@id="gdt"]//a/@href"#)?);
        }

        Ok(FullGalleryInfo {
            client: self.client,
            url: self.url.clone(),
            limit: self.limit,
            title,
            title_jp,
            rating,
            fav_cnt,
            img_pages,
            tags,
        })
    }
}

/// 画廊信息
#[derive(Debug)]
pub struct FullGalleryInfo<'a> {
    client: &'a Client,
    /// 画廊标题
    pub title: String,
    /// 画廊日文标题
    pub title_jp: Option<String>,
    /// 画廊地址
    pub url: String,
    /// 评分
    pub rating: String,
    /// 收藏次数
    pub fav_cnt: String,
    /// 标签
    pub tags: Vec<(String, Vec<String>)>,
    /// 图片 URL
    pub img_pages: Vec<String>,
    /// 是否限制图片数量
    pub limit: bool,
}

impl<'a> FullGalleryInfo<'a> {
    /// 返回调整数量后的图片页面链接
    pub fn get_image_lists(&self) -> &[String] {
        if !self.limit {
            return &self.img_pages;
        }
        let limit = CONFIG.exhentai.max_img_cnt;
        let img_cnt = self.img_pages.len().min(limit);
        info!("保留图片数量: {}", img_cnt);
        &self.img_pages[..img_cnt]
    }

    /// 将画廊里的图片上传至 telegraph，返回上传后的图片链接
    pub async fn upload_images_to_telegraph(&self) -> Result<Vec<String>> {
        let img_pages = self.get_image_lists();
        let img_cnt = img_pages.len();
        let idx = Arc::new(Atomi


rev = self
            .map
            .get(&key)
            .map(|x| x.downcast_ref::<Vec<u8>>().unwrap());
        if let Some(val) = prev {
            if val == &bytes.as_ref().to_vec() {
                Ok(())
            } else {
                Err(Error::ChecksumMismatch)
            }
        } else {
            self.map.insert(key, Box::new(bytes.as_ref().to_vec()));
            Ok(())
        }
    }

    fn iter_script_pubkeys(&self, script_type: Option<ScriptType>) -> Result<Vec<Script>, Error> {
        let key = MapKey::Path((script_type, None)).as_map_key();
        self.map
            .range::<Vec<u8>, _>((Included(&key), Excluded(&after(&key))))
            .map(|(_, v)| Ok(v.downcast_ref().cloned().unwrap()))
            .collect()
    }

    fn iter_utxos(&self) -> Result<Vec<UTXO>, Error> {
        let key = MapKey::UTXO(None).as_map_key();
        self.map
            .range::<Vec<u8>, _>((Included(&key), Excluded(&after(&key))))
            .map(|(k, v)| {
                let outpoint = deserialize(&k[1..]).unwrap();
                let (txout, is_internal) = v.downcast_ref().cloned().unwrap();
                Ok(UTXO {
                    outpoint,
                    txout,
                    is_internal,
                })
            })
            .collect()
    }

    fn iter_raw_txs(&self) -> Result<Vec<Transaction>, Error> {
        let key = MapKey::RawTx(None).as_map_key();
        self.map
            .range::<Vec<u8>, _>((Included(&key), Excluded(&after(&key))))
            .map(|(_, v)| Ok(v.downcast_ref().cloned().unwrap()))
            .collect()
    }

    fn iter_txs(&self, include_raw: bool) -> Result<Vec<TransactionDetails>, Error> {
        let key = MapKey::Transaction(None).as_map_key();
        self.map
            .range::<Vec<u8>, _>((Included(&key), Excluded(&after(&key))))
            .map(|(k, v)| {
                let mut txdetails: TransactionDetails = v.downcast_ref().cloned().unwrap();
                if include_raw {
                    let txid = deserialize(&k[1..])?;
                    txdetails.transaction = self.get_raw_tx(&txid)?;
                }

                Ok(txdetails)
            })
            .collect()
    }

    fn get_script_pubkey_from_path(
        &self,
        script_type: ScriptType,
        path: u32,
    ) -> Result<Option<Script>, Error> {
        let key = MapKey::Path((Some(script_type), Some(path))).as_map_key();
        Ok(self
            .map
            .get(&key)
            .map(|b| b.downcast_ref().cloned().unwrap()))
    }

    fn get_path_from_script_pubkey(
        &self,
        script: &Script,
    ) -> Result<Option<(ScriptType, u32)>, Error> {
        let key = MapKey::Script(Some(script)).as_map_key();
        Ok(self.map.get(&key).map(|b| {
            let mut val: serde_json::Value = b.downcast_ref().cloned().unwrap();
            let st = serde_json::from_value(val["t"].take()).unwrap();
            let path = serde_json::from_value(val["p"].take()).unwrap();

            (st, path)
        }))
    }

    fn get_utxo(&self, outpoint: &OutPoint) -> Result<Option<UTXO>, Error