/new WeakMap(),\n  /**\n  * Default configuration of the view's Controller card.\n  *\n  * @type {cards.ControllerCardOptions}\n  * @private\n  */\n  _viewControllerCardConfig = /*#__PURE__*/new WeakMap();\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * MediaPlayer View Class.\n *\n * Used to create a view for entities of the media_player domain.\n *\n * @class MediaPlayerView\n * @extends AbstractView\n */\nvar MediaPlayerView = /*#__PURE__*/function (AbstractView) {\n  \"use strict\";\n\n  _inherits(MediaPlayerView, AbstractView);\n  function MediaPlayerView() {\n    var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n    _class_call_check(this, MediaPlayerView);\n    var _this;\n    var _Helper_strategyOptions_domains_media_player;\n    _this = _call_super(this, MediaPlayerView, [_class_static_private_field_spec_get(MediaPlayerView, MediaPlayerView, _domain)]), _class_private_field_init(_this, _defaultConfig, {\n      writable: true,\n      value: {\n        title: \"MediaPlayers\",\n        icon: \"mdi:cast\",\n        subview: false\n      }\n    }), _class_private_field_init(_this, _viewControllerCardConfig, {\n      writable: true,\n      value: {\n        title: \"\".concat(_Helper__WEBPACK_IMPORTED_MODULE_20__.Helper.localize(\"component.media_player.entity_component._.name\"), \"s\")\n      }\n    });\n    _this.config = Object.assign(_this.config, _class_private_field_get(_this, _defaultConfig), options);\n    // Create a Controller card to switch all entities of the domain.\n    _this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_21__.ControllerCard(_object_spread({}, _class_private_field_get(_this, _viewControllerCardConfig), (_Helper_strategyOptions_domains_media_player = _Helper__WEBPACK_IMPORTED_MODULE_20__.Helper.strategyOptions.domains.media_player) === null || _Helper_strategyOptions_domains_media_player === void 0 ? void 0 : _Helper_strategyOptions_domains_media_player.controllerCardOptions), _class_static_private_field_spec_get(MediaPlayerView, MediaPlayerView, _domain)).createCard();\n    return _this;\n  }\n  return MediaPlayerView;\n}(_AbstractView__WEBPACK_IMPORTED_MODULE_22__.AbstractView);\n/**\n   * Domain of the view's entities.\n   *\n   * @type {string}\n   * @static\n   * @private\n   */\nvar _domain = {\n  writable: true,\n  value: \"media_player\"\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL3dvcmtzcGFjZXMvTGludXMtRGFzaGJvYXJkL25vZGVfbW9kdWxlcy9iYWJlbC1sb2FkZXIvbGliL2luZGV4LmpzPz9ydWxlU2V0WzFdLnJ1bGVzWzBdLnVzZVswXSFidWlsdGluOnN3Yy1sb2FkZXIhL3dvcmtzcGFjZXMvTGludXMtRGFzaGJvYXJkL3NyYy92aWV3cy9NZWRpYVBsYXllclZpZXcudHMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9saW51cy1kYXNoYm9hcmQvLi9zcmMvdmlld3MvTWVkaWFQbGF5ZXJWaWV3LnRzP2M1NTUiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSGVscGVyIH0gZnJvbSBcIi


 out2!=null){throw new RuntimeException("Error - cannot define out2 without defining out1.");}

		//Adjust interleaved settings based on number of output files
		if(!setInterleaved){
			assert(in1!=null && (out1!=null || out2==null)) : "\nin1="+in1+"\nin2="+in2+"\nout1="+out1+"\nout2="+out2+"\n";
			if(in2!=null){ //If there are 2 input streams.
				FASTQ.FORCE_INTERLEAVED=FASTQ.TEST_INTERLEAVED=false;
				outstream.println("Set INTERLEAVED to "+FASTQ.FORCE_INTERLEAVED);
			}else{ //There is one input stream.
				if(out2!=null){
					FASTQ.FORCE_INTERLEAVED=true;
					FASTQ.TEST_INTERLEAVED=false;
					outstream.println("Set INTERLEAVED to "+FASTQ.FORCE_INTERLEAVED);
				}
			}
		}

		assert(out1==null || out1.contains("%")) : "Output filename must contain '%' symbol, which will be replaced by affix.";
		assert(out2==null || out2.contains("%")) : "Output filename must contain '%' symbol, which will be replaced by affix.";
		assert(qfout1==null || qfout1.contains("%")) : "Output filename must contain '%' symbol, which will be replaced by affix.";
		assert(qfout2==null || qfout2.contains("%")) : "Output filename must contain '%' symbol, which will be replaced by affix.";

		//Ensure output files can be written
		if(!Tools.testOutputFiles(overwrite, append, false, out1, out2)){
			outstream.println((out1==null)+", "+(out2==null)+", "+out1+", "+out2);
			throw new RuntimeException("\n\noverwrite="+overwrite+"; Can't write to output files "+out1+", "+out2+"\n");
		}

		//Ensure input files can be read
		if(!Tools.testInputFiles(false, true, in1, in2)){
			throw new RuntimeException("\nCan't read some input files.\n");
		}

		//Ensure that no file was specified multiple times
		if(!Tools.testForDuplicateFiles(true, in1, in2, out1, out2)){
			throw new RuntimeException("\nSome file names were specified multiple times.\n");
		}

		//Create output FileFormat objects
		if(out1==null){
			ffout1=ffout2=null;
			qfout1Array=qfout2Array=null;
		}else{
			ffout1=new FileFormat[ways];
			ffout2=new FileFormat[ways];
			qfout1Array=new String[ways];
			qfout2Array=new String[ways];
			for(int i=0; i<ways; i++){
				String temp1=out1==null ? null : out1.replaceFirst("%", ""+i);
				String temp2=out2==null ? null : out2.replaceFirst("%", ""+i);
				ffout1[i]=FileFormat.testOutput(temp1, FileFormat.FASTQ, extout, true, overwrite, append, false);
				ffout2[i]=FileFormat.testOutput(temp2, FileFormat.FASTQ, extout, true, overwrite, append, false);

				qfout1Array[i]=qfout1==null ? null : qfout1.replaceFirst("%", ""+i);
				qfout2Array[i]=qfout2==null ? null : qfout2.replaceFirst("%", ""+i);
			}
		}

		//Create input FileFormat objects
		ffin1=FileFormat.testInput(in1, FileFormat.FASTQ, extin, true, true);
		ffin2=FileFormat.testInput(in2, FileFormat.FASTQ, extin, true, true);

		useSharedHeader=(ffin1.samOrBam() && ffout1!=null && ffout1.length>0 && ffout1[0]!=null && ffout1[0].samOrBam());
	}

	/*--------------------------------------------------------------*/
	/*----------------         Outer Methods        ----------------


-corners.gif), sides:url(images/btn/btn-default-toolbar-small-sides.gif)" !important;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:445 */
.x-btn-default-toolbar-small {
    border-color: #e1e1e1;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:452 */
.x-btn-button-default-toolbar-small {
    min-height: 16px;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:457 */
.x-ie9m .x-btn-button-default-toolbar-small {
    min-height: auto;
    height: 16px;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:464 */
.x-btn-inner-default-toolbar-small {
    font: bold 12px/16px helvetica, arial, verdana, sans-serif;
    color: #666;
    padding: 0 5px;
    max-width: 100%;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:479 */
.x-btn-icon-right > .x-btn-inner-default-toolbar-small,
.x-btn-icon-left > .x-btn-inner-default-toolbar-small {
    max-width: calc(100% - 16px);
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:487 */
.x-ie10p .x-btn-inner-default-toolbar-small {
    max-width: none;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:492 */
.x-btn-icon-el-default-toolbar-small {
    font-size: 16px;
    height: 16px;
    color: #666;
    line-height: 16px;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:498 */
.x-btn-icon-left > .x-btn-icon-el-default-toolbar-small,
.x-btn-icon-right > .x-btn-icon-el-default-toolbar-small {
    width: 16px;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:503 */
.x-btn-icon-top > .x-btn-icon-el-default-toolbar-small,
.x-btn-icon-bottom > .x-btn-icon-el-default-toolbar-small {
    min-width: 16px;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:508 */
.x-btn-icon-el-default-toolbar-small.x-btn-glyph {
    opacity: 0.5;
}
/* /Users/space/buildAgent/work/8cc7421dd8da164c/staging/classic/theme-neutral/sass/src/button/Button.scss:525 */
.x-ie8 .x-btn-icon-e


有哪些值得注意的事项？|
| 美国政治 | 您认为当前美国的政治氛围如何？ |
| 健康饮食 | 对于一位想要拥有健康饮食习惯的人来说，您会提供哪些建议？ |
| 新兴科技 | 您觉得在未来几年中，最具有潜力的新兴科技是什么？ |
| 育儿教育 | 您认为家长应该如何培养孩子的独立性和自主性？|
| 电商行业 | 针对刚刚进入电商行业的小型企业，您会给予哪些经营建议？|
| 社交媒体| 在社交媒体上如何防止用户发布不良信息？|
| 数字化转型 | 如何推动公司实现数字化转型？|
| 节能环保 | 对于一个想要更加注重节能环保的家庭来说，您会提供哪些可行的建议？|
| 缓解压力 | 在工作压力大的情况下，您会如何调整心态缓解压力？|
| 在线学习 | 在线学习与传统面授课程相比，其优势和劣势分别是什么？|
| 分类 | 这篇文章属于哪个类别？ |
| 摘要 | 请用一句话概括这篇文章的主旨。 |
| 开放性生成 | 请你写一篇关于XX的短文。 |
| 建议 | 你能为我提供一些应对XX问题的建议吗？ |
| 行业趋势 | 当前XX行业有哪些发展趋势？ |
| 编辑修改 | 可以帮我修改一下这段文字，使其更加流畅易读吗？ |
| 实体属性 | XX实体的相关属性有哪些？ |
| 对比分析 | 与竞争对手相比，我们公司的优势在哪里？ |
| 知识来源 | 这个观点的来源是什么？ |
| 推断判断 | 根据数据推断，未来XX趋势会如何发展？ |
| 文化 | 请详细描述一下中国传统文化中的“礼”是如何体现的？|
| 新闻报道 | 最近有哪些国际新闻事件引起了人们的广泛关注？|
| 科技 | 在当今科技高速发展的时代，智能手机的未来发展方向有哪些？|
| 食品安全 | 如何保证农产品的食品安全？请列举出具体的措施。|
| 医学 | 什么是遗传病？它对患者和家庭会造成


-- ===========================================================================
--	Single Player Create Game w/ Advanced Options
-- ===========================================================================
include("InstanceManager");
include("PlayerSetupLogic");
include("Civ6Common");
include("SupportFunctions");
include("PopupDialog");

-- ===========================================================================
-- ===========================================================================

-- YnAMP <<<<<
--print ("loading AdvancedSetup with include for mods... (from Yet (not) Another Maps Pack)")
print("loading AdvancedSetup for Yet (not) Another Maps Pack...")
print("Game version : ".. tostring(UI.GetAppVersion()))
ExposedMembers.ConfigYnAMP 		= ExposedMembers.ConfigYnAMP or {}
ExposedMembers.YnAMP_Loading	= ExposedMembers.YnAMP_Loading or {}
ExposedMembers.YnAMP			= { RiverMap = {}, PlayerToRemove = {}}
YnAMP_Loading 	= ExposedMembers.YnAMP_Loading
ConfigYnAMP 	= ExposedMembers.ConfigYnAMP
YnAMP			= ExposedMembers.YnAMP
------------------------------------------------------------------------------
-- YnAMP defines
------------------------------------------------------------------------------
local currentSelectedNumberMajorCivs	= 2		-- To track change to the number of selected player
local bUpdatePlayerCount				= false	-- To tell when to update player count to prevent UI lag
local bFinishedGameplayContentConfigure	= false	-- Wait before starting to check parameters for YnAMP
local autoSaveConfigName				= "AutoSaveYnAMP"
local availableLeaderList				= {}	-- List of leaders available for Random slots
local maxSupportedMapSize				= 120*62
local maxWorkingMapSize					= 140*74
local maxLoadingMapSize					= 200*104
local maxTotalPlayers					= 62	-- max is 64 but 1 slot is required for barbarian and 1 slot for free cities
local bStartDisabledByYnAMP 			= false
local bStartDisabledBySetup 			= false
--ConfigYnAMP.SavedParameter			= ConfigYnAMP.SavedParameter or {}	-- Saved values for disabled parameters
local SavedParameter					= {}	--ConfigYnAMP.SavedParameter
local cityStatesQuery					= "SELECT DISTINCT Parameters.ConfigurationId, Parameters.Name from Parameters JOIN ParameterDependencies ON Parameters.ParameterId = ParameterDependencies.ParameterId WHERE ParameterDependencies.ConfigurationId ='SelectCityStates' AND Parameters.ConfigurationId LIKE '%LEADER%'" --"SELECT * from Parameters where ConfigurationId LIKE '%LEADER_MINOR_CIV%' and GroupId='MapOptions'"
local slotStatusString					= {}
local civLevelString					= {}
SlotStatus.SS_RESERVED					= 5
for key, v in pairs(SlotStatus) do
	slotStatusString[v] = key
end
for key, v in pairs(CivilizationLevelTypes) do
	civLevelString[v] = key
end

-- There must be a cleaner way to get that...
local RulesetPlayerDomain	= {
	["RULESET_STANDARD"]	= "Players:StandardPlayers",
	["RULESET_EXPANSION_1"]	= "Players:Expansion1_Players",
	["RULESET_EXPANSION_2"]	= "Players:Expansion2_Players"
}

-- MapSizeS default table, rebuild and completed by custom map sizes when loading the database
ConfigYnAMP.MapSizes = ConfigYnAMP.MapSizes or {
	["MAPSIZE_DUEL"] 		= {Width = 44 ,	Height = 26 , Size = 44 * 26 },
	["MAPSIZE_TINY"] 		= {Width = 60 ,	Height = 36 , Size = 60 * 36 },
	["MAPSIZE_SMALL"] 		= {Width = 74 ,	Height = 46 , Size = 74 * 46 },
	["MAPSIZE_STANDARD"] 	= {Width = 84 ,	Height = 54 , Size = 84 * 54 },
	["MAPSIZE_LARGE"] 		= {Width = 96 ,	He


R5 R6 K12 ["ContextServices"]
  GETTABLEKS R6 R5 K13 ["withContext"]
  GETTABLEKS R7 R2 K14 ["PureComponent"]
  LOADK R9 K15 ["VoteButton"]
  NAMECALL R7 R7 K16 ["extend"]
  CALL R7 2 1
  DUPCLOSURE R8 K17 [PROTO_2]
  SETTABLEKS R8 R7 K18 ["init"]
  DUPCLOSURE R8 K19 [PROTO_


: x[1],
            label: x[1],
            styles: {
              node: {
                padding: {
                  top: 15,
                  bottom: 15,
                  left: 15,
                  right: 15,
                },
              },
              shape: {
                styles: { fill: '#fff', stroke: '#000' },
                className: 'n',
              },
            },
          });
          break;
        case 'removeNode':
          let index3 = data.edges.findIndex(
            (v: EdgeOptions) => v.from === x[1] || v.to === x[1]
          );
          while (index3 !== -1) {
            data.edges.splice(index3, 1);
            index3 = data.edges.findIndex(
              (v: EdgeOptions) => v.from === x[1] || v.to === x[1]
            );
          }
          const index = data.nodes.findIndex((v: NodeOptions) => v.id === x[1]);
          data.nodes.splice(index, 1);
          break;
        case 'setMilestone':
          data.nodes.push({
            id: x[1],
            shape: 'diamond',
            styles: {
              node: {
                padding: {
                  top: 15,
                  bottom: 15,
                  left: 15,
                  right: 15,
                },
              },
              shape: {
                styles: { fill: '#fff', stroke: '#000' },
                className: 'n',
              },
            },
            label: x[1],
          });
          break;
        case 'AddCoherenceEdge':
          data.edges.push({ from: x[1], to: x[2] });
          break;
        case 'AddDependencyEdge':
          data.edges.push({ from: x[1], to: x[2], label: 'added' });
          break;
        case 'MakeRedundantEdge':
          const index4 = data.edges.findIndex(
            (v: EdgeOptions) => v.from === x[1] && v.to === x[2]
          );
          data.edges.splice(index4, 1);
          data.edges.push({
            from: x[1],
            to: x[2],
            styles: {
              label: {
                styles: { stroke: '#aaa' },
              },
              edge: {
                styles: {
                  stroke: '#aaa',
                  strokeDasharray: '5, 10',
                  fillOpacity: '0',
                },
              },
              marker: {
                styles: { fill: '#aaa' },
              },
            },
            label: 'pruned',
          });
          break;
        case 'RemoveEdge':
          const index2 = data.edges.findIndex(
            (v: EdgeOptions) => v.from === x[1] && v.to === x[2]
          );
          data.edges.splice(index2, 1);
          break;

        default:
          console.log('Schedule Network element ' + x + ' is not implemented');
      }
    });
    callback(data);
  };

  let index = 0;
  return window.setInterval(() => {
    if (index < steps.length) {
      const step = steps[index];
      animateFrame(step);
      index += 1;
    }
  }, interFrameTime);
};

export const steps = [
  [['setActivity', 'Project']],
  [
    ['removeNode', 'Project'],


emerald/';
  'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/versions/generation-iv/platinum/';

export default class GameScene extends Phaser.Scene {
  monstersList: Array<{ name: string; texture: string }>;
  monsterIndex: number;
  currentMonster: Monster;
  numCorrect: number;
  monsters: Phaser.GameObjects.Group;

  constructor() {
    super('game');

    // todo get random X number of monsters
    this.monstersList = monstersList.results.map(
      ({ name, url }: { name: string; url: string }) => {
        const trimmed = url.slice(0, -1);
        const id = trimmed.substr(trimmed.lastIndexOf('/') + 1);
        return { name, texture: id };
      }
    );
  }

  preload() {
    this.load.image('sky', skyImg);
    this.load.bitmapFont(
      'carrier_command',
      'https://raw.githubusercontent.com/photonstorm/phaser-examples/master/examples/assets/fonts/bitmapFonts/carrier_command.png',
      'https://raw.githubusercontent.com/photonstorm/phaser-examples/master/examples/assets/fonts/bitmapFonts/carrier_command.xml'
    );

    this.load.spritesheet('explosion', explodeImg, {
      frameWidth: 33,
      frameHeight: 33
    });

    for (const { texture } of this.monstersList) {
      this.load.image(`monster${texture}`, `${imagePath}${texture}.png`);
    }
  }

  create() {
    // randomise
    this.monstersList = this.monstersList.sort(() => Math.random() - 0.5);

    this.monsterIndex = 0;
    this.currentMonster = null;
    this.numCorrect = 0;

    const { width: gameWidth, height: gameHeight } = this.game.config;

    // bg
    this.add
      .image(Number(gameWidth) / 2, Number(gameHeight) / 2, 'sky')
      .setScale(2);

    // monsters
    this.monsters = this.add.group();
    this.createMonster();
    this.time.addEvent({
      delay: modes[mode].spawnSpeed,
      loop: true,
      callback: () => {
        if (this.monsterIndex < this.monstersList.length) {
          this.createMonster();
        }
      }
    });

    // explosion
    this.anims.create({
      key: 'explode',
      frames: this.anims.generateFrameNames('explosion'),
      frameRate: 10,
      repeat: 0,
      hideOnComplete: true
    });

    // input
    this.input.keyboard.on('keyup', this.keyPress, this);
  }

  createMonster() {
    const { width: gameWidth } = this.game.config;
    const { name, texture } = this.monstersList[this.monsterIndex];
    const monster = new Monster(
      this,
      Phaser.Math.Between(monsterMaxWidth, Number(gameWidth) - monsterMaxWidth),
      // Phaser.Math.Between(35, 400),
      -monsterMaxWidth,
      `monster${texture}`,
      name.toUpperCase(),
      Phaser.Math.Between(modes[mode].dropSpeedMin, modes[mode].dropSpeedMax)
    );
    this.monsters.add(monster, true);
    this.monsterIndex += 1;
  }

  keyPress(event: Phaser.Input.Keyboard.Key) {
    // if currently typing a monster, must continue
    if (this.currentMonster) {
      const { name, correctCount } = this.currentMonster;
      if (name.charCodeAt(correctCount) === event.keyCode) {
        this.currentMonster.correctCount += 1;
        if (this.currentMonster.correctCount >= name.length) {
          // word is finished
          this.monsters.remove(


ect from inventory
; ID is passed in reg AS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ObjectOutOfInventory
.(
	jsr getInventoryEntry
	cpx #$ff
	bne doit
	rts
doit
	; Copy rest of list over this position
loop
	cpx nObjectsInventory
	beq endl
	lda inventory_id+1,x
	sta inventory_id,x
	lda inventory_flags+1,x
	sta inventory_flags,x
	stx savx+1

	lda #<inventory_names
	sta tmp0
	lda #>inventory_names
	sta tmp0+1
	jsr getObjNameEntryEx

	lda tmp0
	clc
	adc #OBJ_NAME_LEN
	sta tmp1
	lda tmp0+1
	adc #0
	sta tmp1+1

	ldy #OBJ_NAME_LEN-1
loopn
	lda (tmp1),y
	sta (tmp0),y
	dey
	bpl loopn

savx
	ldx #0
	inx
	bne loop	; Always jumps
endl
	lda #SFX_DROP
	jsr _PlaySfx
	dec nObjectsInventory
	lda #0
	sta first_item_shown
	jmp UpdateInventory
.)


ction(){    require.async(["searchdetail:widget/sning1/sning1"], function (sning) {
        sning.init({
            id: 'sning1',
            label: '1'
        });
    });
}();
!function(){require.async(['common:widget/ui/base/base','searchdetail:widget/ui/statistic/statistic-core'], function ($, statistic) {
	$(document.body).on('ecomLoaded',function () {
	    var titles = '';
		var $adCard = $('#sider #adCard');
		if($adCard.find('.sma-container').size()>0 && $adCard.find('.sma-container .sma-body>li').size()>0){
			statistic.send('5.1010000', {tn:'baiduimagedetail',tag: 'card', fm:'sma'});
		}
		if($adCard.find('#imContainer').size()>0 && $adCard.find('#imContainer .EC_im').size()>0){
			$adCard.find('#imContainer').find('h5 a').each(function(i, linkItem) {
		        titles += $(linkItem).text() + '*';
		    });
			statistic.send('5.1010000', {
			    tn: 'baiduimagedetail',
			    tag: 'card',
			    fm: 'ecim',
			    adText: encodeURIComponent(titles)
			});
		}

		$adCard.find('#imContainer').find('a').each(function(i, linkItem) {
			linkItem = $(linkItem);
			var linkUrl = linkItem.parents('.EC_im').find('a span').text();
			if(linkUrl) {
				var logExt = linkItem.attr('log-ext') || '';
				linkItem.attr('log-click', 'p=5.15&tag=card&fm=ecim'
										+ '&site=' + encodeURIComponent(linkUrl)
										+ '&adText=' + encodeURIComponent(linkItem.parents('.EC_im').find('h5 a').text())
										+ '&pos=' + (linkItem.attr('log-pos') || '')
										+ '&ext=' + encodeURIComponent(logExt));
			}
		});
	})
})
}();
!function(){
		window.bid = 9;

	if(!window.passport){
	    var script = document.createElement("script");
	    script.src = '//passport.baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=' + (new Date).getTime();
	    document.body.appendChild(script);
	}
	require.async(["common:widget/loginbar/loginbar"],function(loginbar){

	    loginbar.init();

	});

}();
!function(){
        require.async(['searchdetail:widget/ui/app/app'], function (app) {
            require.async(['searchdetail:widget/ui/action/base/base']);
            // appinit时间
            window.speed && speed.mark('app_init');
            app.setPageInfo({
                tpl: '',
                gsm: '0',
                gsms: '',
                is_inner_ip: '',
                word:'卡通 艺术家',
                urlword:'%E5%8D%A1%E9%80%9A%20%E8%89%BA%E6%9C%AF%E5%AE%B6',
                gbkword:'%BF%A8%CD%A8%20%D2%D5%CA%F5%BC%D2',
                tn:'baiduimagedetail',
                cg:'',
                z:'0',
                resTabs:[],
                spaceGBKWord:'%BF%A8%CD%A8%20%D2%D5%CA%F5%BC%D2',
                ie:'utf-8',
                oe:'utf-8',
                queryPageType : '0',
                aspSID : '',

                statNum:'',//实验区分编号，send时发送
                investId:'new_dep',
                investTpl:'new_dep_tpl',
                listNum:'1',
                dispNum:'1',
                bdIsClustered:'0',
                frStr:'&fr=',
                sme:'',
                queryWordEnc:'%E5%8D%A1%E9%80%9A%20%E8%89%


			jumpDes.Statement.SimpleNameStringWithRegisterAnnotation(rMap),
									jdFromAIndices, jdFromAKey[:len(jdFromAIndices)])
							}
							jd.RegisterSegment = j.registers.Slice(jdFromNode.BeforeRegisterSize, jumpDes.BeforeRegisterSize)
							if jumpDes == targetNode {
								jd.Dest = targetNode
							}
						} else {
							if tt.DebugOut != nil {
								tt.DebugOut("OldOpLaneAJump from %v to %v on AIndex %v AVId %v\n",
									jdFromNode.Statement.SimpleNameStringWithRegisterAnnotation(rMap),
									jumpDes.Statement.SimpleNameStringWithRegisterAnnotation(rMap),
									jdFromAIndices, jdFromAKey[:len(jdFromAIndices)])
								cmptypes.MyAssert(jd.FieldHistorySegment == nil)
								jd.RegisterSegment.AssertEqual(j.registers.Slice(jdFromNode.BeforeRegisterSize, jumpDes.BeforeRegisterSize))
								if jumpDes == targetNode {
									cmptypes.MyAssert(jd.Next == nil)
									cmptypes.MyAssert(jd.Dest == targetNode)
								}
							}
						}
					}

					if jumpDes == targetNode {
						break
					}

					for i := 0; i < len(newADeps); i += OP_JUMP_KEY_SIZE {
						start := i
						end := start + OP_JUMP_KEY_SIZE
						if end > len(newADeps) {
							end = len(newADeps)
						}
						aIndices := newADeps[start:end]
						aKey, aOk := GetOpJumKey(j.accountHistory, aIndices)
						if DEBUG_TRACER {
							cmptypes.MyAssert(aOk)
						}
						ajn := jd.Next
						if ajn == nil {
							if tt.DebugOut != nil {
								tt.DebugOut("NewOpLaneAJump #%v of %v on AIndex %v with AVId %v\n",
									aNodeSeq, jumpDes.Statement.SimpleNameStringWithRegisterAnnotation(rMap),
									aIndices, aKey[:len(aIndices)])
							}
							aNodeSeq++
							ajn = NewOpSearchTrieNode(jumpDes)
							ajn.IsAccountJump = true
							ajn.VIndices = CopyUArray(aIndices)

							fjn, ok := nodeIndexToFJumpNodes[jumpDes.Seq]
							if ok {
								cmptypes.MyAssert(fjn.OpNode == jumpDes)
								cmptypes.MyAssert(fjn.IsAccountJump == false)
								ajn.Exit = &OpNodeJumpDef{Next: fjn}
							}
							jd.Next = ajn
							nodeBudget--
							if nodeBudget <= 0 {
								if tt.DebugOut != nil {
									tt.DebugOut("Out of node Budget, stop creating more OpLaneAJump\n")
								}
								break
							}
						} else {
							if tt.DebugOut != nil {
								tt.DebugOut("OldOpLaneAJump #%v of %v on AIndex %v with AVId %v\n",
									aNodeSeq, jumpDes.Statement.SimpleNameStringWithRegisterAnnotation(rMap),
									aIndices, aKey[:len(aIndices)])
							}
							aNodeSeq++
							AssertUArrayEqual(ajn.VIndices, aIndices)
							cmptypes.MyAssert(ajn.IsAccountJump == true)
							cmptypes.MyAssert(ajn.OpNode == jumpDes)
							if ajn.Exit != nil {
								fjn, ok := nodeIndexToFJumpNodes[jumpDes.Seq]
								cmptypes.MyAssert(ok)
								cmptypes.MyAssert(ajn.Exit.Next == fjn)
								cmptypes.MyAssert(fjn.OpNode


);
    }

    /**
     * Unwraps a value
     *
     * @param value wrapped value
     * @return an unwrapped representation of the value
     */
    protected byte unwrapValue( Object value ) {
        return ( ( Byte ) value ).byteValue();
    }

    // Implements Externalizable
    public void readExternal( ObjectInput in )
        throws IOException, ClassNotFoundException {

        // VERSION
        in.readByte();

        // MAP
        _map = ( TLongByteMap ) in.readObject();
    }

    // Implements Externalizable
    public void writeExternal( ObjectOutput out ) throws IOException {
        // VERSION
        out.writeByte(0);

        // MAP
        out.writeObject( _map );
    }

} // TLongByteHashMapDecorator
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2002, Eric D. Friedman All Rights Reserved.
// Copyright (c) 2009, Robert D. Eden All Rights Reserved.
// Copyright (c) 2009, Jeff Randall All Rights Reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
///////////////////////////////////////////////////////////////////////////////

package gnu.trove.decorator;

import gnu.trove.map.TByteShortMap;
import gnu.trove.iterator.TByteShortIterator;

import java.io.*;
import java.util.*;

//////////////////////////////////////////////////
// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! //
//////////////////////////////////////////////////

/**
 * Wrapper class to make a TByteShortMap conform to the <tt>java.util.Map</tt> API.
 * This class simply decorates an underlying TByteShortMap and translates the Object-based
 * APIs into their Trove primitive analogs.
 *

 * Note that wrapping and unwrapping primitive values is extremely inefficient.  If
 * possible, users of this class should override the appropriate methods in this class
 * and use a table of canonical values.
 *

 * Created: Mon Sep 23 22:07:40 PDT 2002
 *
 * @author Eric D. Friedman
 * @author Robert D. Eden
 * @author Jeff Randall
 */
public class TByteShortMapDecorator extends AbstractMap<Byte, Short>
	implements Map<Byte, Short>, Externalizable, Cloneable {

	static final long serialVersionUID = 1L;

    /** the wrapped primitive map */
    protected TByteShortMap _map;

    /**
     * FOR EXTERNALIZATION ONLY!!
     */
    public TByteShortMapDecorator() {}

    /**
     * Creates a wrapper that decorates the specified primitive map.
     *
     * @param map the <tt>TByteShortMap</tt> to wrap.
     */
    public TByteShortMapDecorator( TByteShortMap map ) {
        super();
        this._map = map;
    }

    /**
     * Returns a reference to the map wrapped by this decorator.
     *
     * @return the wrapped <tt>TByteShortMap</tt> instance.
     */
    public TByteShortMap getMap() {
        return _map;
    }

    /**
     * Inserts a key/value pair into the map.
     *
     * @param key   an Object value
     * @param value an Object value
     * @return the previous value associated with <tt>key</tt>,
     *         or Short(0) if none was found.
     */
    public Short put( Byte key, Short value ) {
        byt


user-drag:none;-webkit-tap-highlight-color:transparent}.memo-upload-image-Gq3HX8 .header-prQhBp .close-btn-JBo0FV:hover{background-color:var(--transparent-grayblue-8)}.memo-upload-image-Gq3HX8 .header-prQhBp .close-btn-JBo0FV:hover{opacity:.8}.memo-upload-image-Gq3HX8 .container-VDGSD3{width:100%;padding:20px 0;box-sizing:border-box;row-gap:4px;border-radius:12px;border:1.5px dashed var(--grayblue-300, #dadee3);background-color:var(--common-white);cursor:pointer;user-select:none;-webkit-user-drag:none;-webkit-tap-highlight-color:transparent;display:flex;justify-content:center;align-items:center;flex-direction:column}.memo-upload-image-Gq3HX8 .container-VDGSD3.default-6aNxTq.dragging-MHlRUu,.memo-upload-image-Gq3HX8 .container-VDGSD3.default-6aNxTq:hover{border:1.5px dashed var(--brand-400, #6841ea);background-color:var(--brand-50, #f5f2fd)}.memo-upload-image-Gq3HX8 .container-VDGSD3 .upload-text-container-IThG8L{padding:0 10px;text-align:center}.memo-upload-image-Gq3HX8 .container-VDGSD3 .upload-title-A99yFP{text-align:center;color:var(--gray-800, #242424);font-size:14px;font-weight:500;line-height:22px;margin-bottom:4px}.memo-upload-image-Gq3HX8 .container-VDGSD3 .upload-text-3nC-U9{color:var(--gray-500, #8c8c8c);font-size:12px;font-weight:400;line-height:18px}.memo-upload-image-Gq3HX8 .container-VDGSD3 .upload-text-3nC-U9:last-child{margin-left:25px;position:relative}.memo-upload-image-Gq3HX8 .container-VDGSD3 .upload-text-3nC-U9:last-child:before{content:"";position:absolute;width:1px;top:50%;transform:translateY(-50%);height:12px;left:-12px;background-color:var(--transparent-grayblue-12, rgba(79, 89, 102, .12))}.memo-upload-image-Gq3HX8 .container-VDGSD3 .uploading-text-iuMk-H{color:var(--gray-800, #242424);font-size:14px;font-weight:400;line-height:22px}.memo-upload-image-Gq3HX8 .container-VDGSD3 .uploading-icon-lgeILA{width:43px;height:43px;border-radius:50%;border:3px solid var(--brand-100);border-right-color:var(--brand-400);animation:loading-sqI97b .75s linear infinite}@keyframes loading-sqI97b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.memo-upload-image-Gq3HX8 .container-VDGSD3 .upload-failed-ic


}
export interface Test<T> {
    id: string;
    date: Date;
    request: T;
    response: any;
    status: TestStatus;
}

export type TestStatus = "success" | "error";
import { DefaultsService } from './../../services/defaults.service';
import { CustomSymbolicDice } from './../../models/customSymbolicDice.model';
import { Component, OnInit } from '@angular/core';
import { DiceResult } from '../../models/diceResult.model';
import { CustomNumericDice } from '../../models/customNumericDice.model';
import { DiceService } from '../../services/dice.service';

@Component({
  selector: 'App',
  templateUrl: 'components/app/app.html'
})
export class AppComponent implements OnInit {

  public results: DiceResult[] = [];
  public diceService = new DiceService();
  public openCategory: string = 'dnd';
  public customNumberDice: CustomNumericDice[] = [];
  public customSymbolicDice: CustomSymbolicDice[] = [];

  private defaultsService: DefaultsService =  new DefaultsService();

  public defaultNumericDice: CustomNumericDice[] = this.defaultsService.getDefaultNumericDice();

  public nr_dice: number = 1;

  //Fudge dice
  public fudgeDice: CustomSymbolicDice = new CustomSymbolicDice('fudge', ['-', 'blank', '+']);
  public coinDice: CustomSymbolicDice =  new CustomSymbolicDice('coin', ['heads', 'tails']);

  //Modal fields
  public modalOpen: boolean = false;
  public modalMode: string = 'numeric';

  // Custom numric dice fields
  public custom_num_name: string = 'My D13';
  public custom_num_min: number = 1;
  public custom_num_max: number = 13;

  // Custom symbolic dice fields
  public custom_sym_name: string = 'My Symbolic Dice';
  public custom_sym_symbols: string = 'axe,staff,dagger';

  public ngOnInit() {
    if (localStorage.getItem('custom_numeric_dice')) {
      this.customNumberDice = JSON.parse(localStorage.getItem('custom_numeric_dice') || '[]');
    }

    if (localStorage.getItem('custom_symbolic_dice')) {
      this.customSymbolicDice = JSON.parse(localStorage.getItem('custom_symbolic_dice') || '[]');
    }
  }

  public setCategory(categoryName: string): void {
    this.openCategory = categoryName;
  }

  public rollDice(index: number): void {
    this.results.unshift(this.diceService.rollCustomNumericDice(this.defaultNumericDice[index], this.nr_dice));
  }

  private rollSymbolicDice(type: string): void {
    switch (type) {
      case 'Fudge': this.results.unshift(this.diceService.rollCustomSymbolicDice(this.fudgeDice, this.nr_dice));
                    break;
      case 'Fudge4': this.results.unshift(this.diceService.rollCustomSymbolicDice(this.fudgeDice, 4 * this.nr_dice));
                    break;
      case 'Coin': this.results.unshift(this.diceService.rollCustomSymbolicDice(this.coinDice, this.nr_dice));
                    break;
      default: console.warn('Invalid dice type ', type);
    }
  }

  public createRandomNumeric(): void {
    this.modalOpen = true;
    this.modalMode = 'numeric';
    this.custom_num_name = 'My D7';
    this.custom_num_min = 1;
    this.custom_num_max = 7;
  }

  public createRandomSymbolic(): void {
    this.modalOpen = true;
    this.modalMode = 'symbolic';
    this.custom_sym_name = 'My Symbolic Dice';
    this.custom_sym_s


import numpy

speed = [32,25,53,35,43,26]

x = numpy.std(speed)
y = numpy.var(speed)
print(x)
print(y)


                      realSumOp = 1e-4
                    if ranMeanNOP_OP < epsilon:
                        ranMeanNOP_OP = 0.1

                    rNOP_OP = (realSumNop / realSumOp - uu) / ranMeanNOP_OP
                    rNOP_OPlist.append(rNOP_OP)

            # 计算偏移指数
            e = math.e
            rindexNS_Slist = []
            for va in rNS_Slist:
                if rALL < epsilon:
                    ri = 0.0
                else:
                    if 0 <= va < epsilon:
                        ri = 0.0
                    elif va > 0:
                        a = float(np.tanh(va)) + 1
                        b = rALL
                        c = - math.log(b + 1, e) * math.log(va + 1, e)
                        ri = 1 - (a ** c)
                    elif va < 0:
                        if float(np.tanh(va)) > -1:
                            a = 1 / (float(np.tanh(va)) + 1)
                        else:  # 如果va的值过于小（负数），tanh由于精确度不够会直接输出-1.0，所以直接将a设置为一个很大的值
                            a = 1E10
                        b = 1 / (rALL)
                        c = - math.log(b + 1, e) * math.log(-va + 1, e)
                        ri = (a ** c) - 1
                rindexNS_Slist.append(ri)

            rindexNOP_OPlist = []
            for va in rNOP_OPlist:
                if ropnop < epsilon:
                    ri = 0.0
                else:
                    if 0 <= va < epsilon:
                        ri = 0.0
                    elif va > 0:
                        a = float(np.tanh(va)) + 1
                        b = ropnop
                        c = - math.log(b + 1, e) * math.log(va + 1, e)
                        ri = 1 - (a ** c)
                    elif va < 0:
                        if float(np.tanh(va)) > -1:
                            a = 1 / (float(np.tanh(va)) + 1)
                        else:  # 如果va的值过于小（负数），tanh由于精确度不够会直接输出-1.0，所以直接将a设置为一个很大的值
                            a = 1E10
                        b = 1 / (ropnop)
                        c = - math.log(b + 1, e) * math.log(-va + 1, e)
                        ri = (a ** c) - 1
                rindexNOP_OPlist.append(ri)

            with open(outputfile910, "w") as output:
                output.write("OffsetDegree_ns/s_" + cladeName + "\n")
                for bb in rNS_Slist:
                    output.write(str(bb) + "\n")

            with open(outputfile1112, "w") as output:
                output.write("OffsetDegree_nop/op_" + cladeName + "\n")
                for bb in rNOP_OPlist:
                    output.write(str(bb) + "\n")

            with open(outputfile17, "w") as output:
                output.write("OffsetIndex_nop/op_" + cladeName + "\n")
                for bb in rindexNOP_OPlist:
                    output.write(str(bb) + "\n")

            with open(outputfile18, "w") as output:
                output.write("OffsetIndex_ns/s_" + cladeName + "\n")
                for bb in rindexNS_Slist:
                    output.write(str(bb) + "\n")

        except ZeroDivisionError:
            print(f"{geneGroupName} has zeroDivision")

        except Exception as e:
            print(f"{geneGroupName} has mistake:  {e}")

print("finished!!!")


led-sc-1j2nu8t-0 ienRZE">

<svg width=20px height=20px viewBox="0 0 20 20" version=1.1 xmlns=http://www.w3.org/2000/svg><g fill=none fill-rule=evenodd stroke-linecap=round stroke-linejoin=round><g transform="translate(-860 -1386)"><g transform="translate(861 1387)"><rect stroke=#AAA width=18 height=18 rx=4></rect><polyline stroke=#208705 stroke-width=2.5 points="4 10.6 6.30769231 13 14 5"></polyline></g></g></g></svg>Mark as Completed

←    Back
Design an Online Stock Brokerage System

Next    →
Design LinkedIn

Stuck? Get help on   DISCUSS

<svg width=25px height=20px viewBox="0 0 51 48"><g id=UI stroke=none stroke-width=1 fill=none fill-rule=evenodd stroke-linecap=round><g transform="translate(-1074.000000, -1165.000000)" id=FeedbackIcon stroke=#000000><g transform="translate(1073.000000, 1168.000000)"><g id=volume stroke-linejoin=round stroke-width=4.39999962><path d="M13.0157749,15.0318872 L4.55277274,15.0318872 L4.86586151,28.201542


and	d2,$46C(a6)
	or.l	d1,$46C(a6)
	move	#$F821,d0
	and	d0,$500(a6)
	or.l	#$3DE07DE,$500(a6)
	and	d0,$504(a6)
	or.l	#$44007DE,$504(a6)
	and	d2,$508(a6)
	or.l	d7,$508(a6)
	and	d2,$50C(a6)
	or.l	#$8800F800,$50C(a6)
	and	#$F833,$5A0(a6)
	or.l	#$4007CC,$5A0(a6)
	or.l	#$7CC07CC,$5A4(a6)
	and	d2,$5A8(a6)
	or.l	d1,$5A8(a6)
	or.l	d3,$5AC(a6)
	move.l	#$F83FF83F,d0
	and	d0,$640(a6)
	or.l	#$4007C0,$640(a6)
	MOVE.L	D0,D4
	NOT.L	D4			;D4=07C007C0
	or.l	d4,$644(a6)
	and	d2,$648(a6)
	or.l	d1,$648(a6)
	or.l	d3,$64C(a6)
	and.l	d0,$6E0(a6)
	move.l	#$3C00440,d1
	or.l	d1,$6E0(a6)


lic void ShowNotFoughtOpponent()
		{
			BattlegroundsBoard.Children.Clear();
			NotFoughtOpponent.Visibility = Visibility.Visible;
			HeroNoMinionsOnBoard.Visibility = Visibility.Collapsed;
			TiersInfo.Visibility = Visibility.Collapsed;
		}

		public void ClearLastKnownBoard()
		{
			BattlegroundsBoard.Children.Clear();
		}

		public void Update(int heroId, BoardSnapshot? state, int turnNumber)
		{
			BattlegroundsBoard.Children.Clear();
			NotFoughtOpponent.Visibility = Visibility.Collapsed;
			HeroNoMinionsOnBoard.Visibility = Visibility.Collapsed;
			TiersInfo.Visibility = Visibility.Visible;
			if(state == null)
			{
				BattlegroundsAge.Text = "";
				NotFoughtOpponent.Visibility = Visibility.Visible;
			} else
			{
				foreach(var e in state.Entities)
					BattlegroundsBoard.Children.Add(new BattlegroundsMinion(e));
				if(!state.Entities.Any())
					HeroNoMinionsOnBoard.Visibility = Visibility.Visible;
				var age = turnNumber - state.Turn;
				BattlegroundsAge.Text = string.Format(LocUtil.Get("Overlay_Battlegrounds_Turns"), age);
			}

			var heroTriples = Core.Game.GetBattlegroundsHeroTriplesByTier(heroId);
			_heroTriples = heroTriples ?? new Dictionary<int, int>();
			OnPropertyChanged(nameof(TriplesTier1));
			OnPropertyChanged(nameof(TriplesTier2));
			OnPropertyChanged(nameof(TriplesTier3));
			OnPropertyChanged(nameof(TriplesTier4));
			OnPropertyChanged(nameof(TriplesTier5));
			OnPropertyChanged(nameof(TriplesTier6));

			var heroTavernUpTurn = Core.Game.GetBattlegroundsHeroLatestTavernUpTurn(heroId);
			_heroTierTurns = heroTavernUpTurn ?? new Dictionary<int, int>();
			OnPropertyChanged(nameof(TurnTier2));
			OnPropertyChanged(nameof(TurnTier3));
			OnPropertyChanged(nameof(TurnTier4));
			OnPropertyChanged(nameof(TurnTier5));
			OnPropertyChanged(nameof(TurnTier6));
		}
	}
}


    targetY += transY;
          currVideoRect = new java.awt.Rectangle(Math.max(0, Math.round(targetX)),
              Math.max(0, Math.round(targetY)), Math.min(vw, Math.round(targetW)),
              Math.min(vh, Math.round(targetH)));
        }

        boolean renderOSDRes;
				if (osdRenderer instanceof OSDRenderingPlugin2)
				{
					renderOSDRes = ((OSDRenderingPlugin2)osdRenderer).updateOSD2(primary, clipRect, currVideoRect);
				}
				else if (clipRect.width*clipRect.height <= primary.getWidth()*primary.getHeight()/2 &&
            osdRenderer.supportsRegionUpdates())
        {
          //if (DBG) System.out.println("Getting subimage to optimize 350 OSD blitting to " + clipRect);
          if (osdMemBuf == null)
            osdMemBuf = new int[primary.getWidth()*primary.getHeight()/2];
          primary.getRGB(clipRect.x, clipRect.y, clipRect.width,
              clipRect.height, osdMemBuf, 0, clipRect.width);
          renderOSDRes = osdRenderer.updateOSD(osdMemBuf, clipRect.width, clipRect.height, clipRect,
              currVideoRect);
        }
        else
        {
          renderOSDRes = osdRenderer.updateOSD(
              ((java.awt.image.DataBufferInt)primary.getRaster().getDataBuffer()).getData(),
              primary.getWidth(), primary.getHeight(), new java.awt.Rectangle(0, 0, primary.getWidth(),
                  primary.getHeight()), currVideoRect);
        }
        //if (DBG) System.out.println("Done with 350 OSD rendering");
        if (!renderOSDRes && Sage.eventTime() - last350ResetTime > 15000)
        {
          if (Sage.DBG) System.out.println("Performing 350 OSD reset...");
          // Failure with the rendering, if we haven't reset it in the past 2 minutes, then do it again.
          last350ResetTime = Sage.eventTime();
          osdRenderer.closeOSD();
          if (vf.hasFile())
          {
            vf.reloadFile();
            try{Thread.sleep(1000);}catch (Exception e){}
          }
          osdRenderer = createOSDRenderer();
          osdBuildTime = Sage.eventTime();
          if (osdRenderer != null)
          {
						if (osdRenderer instanceof OSDRenderingPlugin2)
							ignoreOSD = !((OSDRenderingPlugin2) osdRenderer).openOSD2(primary.getWidth(), primary.getHeight());
						else
              ignoreOSD = !osdRenderer.openOSD();
          }
        }
      }
    }
    else if (osdRenderer != null)
    {
      osdRenderer.closeOSD();
      osdRenderer = null;
      ignoreOSD = false;
    }

    if (refreshVideo)
      vf.refreshVideoSizing();

    markAnimationStartTimes();

    // Don't let the frame rate get out of control
    long currTime = Sage.eventTime();
    long frameTime = currTime - lastPresentTime;
    // This fixes a bug where the UI hangs and then repeats a bunch of events
    frameTime = Math.max(0, frameTime);
    if (frameTime < desiredTime)
    {
      try{Thread.sleep(desiredTime - frameTime); }catch(Exception e){}
    }
    else
    {
      // So we don't max out the CPU with our rendering because we're highest priority thread
      try{Thread.sleep(5); }catch(Exception e){}
    }
    lastPresentTime = currTime;
  }

  public void cleanupRenderer()
  {
    if (primary != null)
    {
      primary.flush();
      primary = null;
    }
    if (osdRenderer != null)
    {
      osdRenderer.closeOSD();


ramPropComplete
        }
        /**
         * 接口调用成功的回调函数
         */
        type ParamPropSuccess = (res: ParamPropSuccessParam) => any
        type ParamPropSuccessParam = {
            /**
             * 图片宽度，单位px
             */
            width: number
            /**
             * 图片高度，单位px
             */
            height: number
            /**
             * 返回图片的本地路径
             */
            path: string
            /**
             * 返回图片的方向，有效值见下表
             *
             * **orientation参数说明：**
             *
             *   枚举值           |  说明
             * -------------------|-----------------
             *   up               |  默认
             *   down             |  180度旋转
             *   left             |  逆时针旋转90度
             *   right            |  顺时针旋转90度
             *   up-mirrored      | 同up，但水平翻转
             *   down-mirrored    |同down，但水平翻转
             *   left-mirrored    |同left，但垂直翻转
             *   right-mirrored   |同right，但垂直翻转
             *
             *
             */
            orientation: string
            /**
             * 返回图片的格式
             *
             *
             */
            type: string
        }
        /**
         * 接口调用失败的回调函数
         */
        type ParamPropFail = (err: any) => any
        /**
         * 接口调用结束的回调函数（调用成功、失败都会执行）
         */
        type ParamPropComplete = () => any
    }
    /**
     * 获取图片信息
     *
     * **示例代码：**
     *
     *     ```javascript
     *     swan.getImageInfo({
     *       src: 'images/a.jpg',
     *       success: function (res) {
     *         console.log(res.width)
     *         console.log(res.height)
     *       }
     *     })
     *
     *     swan.chooseImage({
     *       success: function (res) {
     *         swan.getImageInfo({
     *           src: res.tempFilePaths[0],
     *           success: function (res) {
     *             console.log(res.width)
     *             console.log(res.height)
     *           }
     *         })
     *       }
     *     })
     *     ```
     *
     */
    function getImageInfo(OBJECT: getImageInfo.Param): void

    namespace saveImageToPhotosAlbum {
        type Param = {
            /**
             * 图片文件路径，可以是临时文件路径也可以是永久文件路径，不支持网络图片路径
             */
            filePath: string
            /**
             * 接口调用成功的回调函数
             */
            success?: ParamPropSuccess
            /**
             * 接口调用失败的回调函数
             */
            fail?: ParamPropFail
            /**
             * 接口调用结束的回调函数（调用成功、失败都会执行）
             */
            complete


linejoin:round; stroke-width:4; stroke-opacity:1; fill:none" points="
  3243.46,2772.78 3262.35,2772.78
  "/>
<polyline clip-path="url(#clip570)" style="stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none" points="
  3243.46,2705.99 3262.35,2705.99
  "/>
<polyline clip-path="url(#clip570)" style="stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none" points="
  3243.46,2639.2 3262.35,2639.2
  "/>
<polyline clip-path="url(#clip570)" style="stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none" points="
  3243.46,2572.41 3262.35,2572.41
  "/>
<path clip-path="url(#clip570)" d="M3174.51 2958.96 Q3170.9 2958.96 3169.07 2962.52 Q3167.27 2966.06 3167.27 2973.19 Q3167.27 2980.3 3169.07 2983.86 Q3170.9 2987.4 3174.51 2987.4 Q3178.15 2987.4 3179.95 2983.86 Q3181.78 2980.3 3181.78 2973.19 Q3181.78 2966.06 3179.95 2962.52 Q3178.15 2958.96 3174.51 2958.96 M3174.51 2955.25 Q3180.32 2955.25 3183.38 2959.86 Q3186.46 2964.44 3186.46 2973.19 Q3186.46 2981.92 3183.38 2986.52 Q3180.32 2991.11 3174.51 2991.11 Q3168.7 2991.11 3165.62 2986.52 Q3162.57 2981.92 3162.57 2973.19 Q3162.57 2964.44 3165.62 2959.86 Q3168.7 2955.25 3174.51 2955.25 Z" fill="#000000" fill-rule="evenodd" fill-opacity="1" /><path clip-path="url(#clip570)" d="M3138.38 2919.71 L3154.7 2919.71 L3154.7 2923.65 L3132.75 2923.65 L3132.75 2919.71 Q3135.42 2916.96 3140 2912.33 Q3144.6 2907.67 3145.79 2906.33 Q3148.03 2903.81 3148.91 2902.07 Q3149.81 2900.31 3149.81 2898.62 Q3149.81 2895.87 3147.87 2894.13 Q3145.95 2892.4 3142.85 2892.4 Q3140.65 2892.4 3138.19 2893.16 Q3135.76 2893.92 3132.98 2895.47 L3132.98 2890.75 Q3135.81 2889.62 3138.26 2889.04 Q3140.72 2888.46 3142.75 2888.46 Q3148.12 2888.46 3151.32 2891.15 Q3154.51 2893.83 3154.51 2898.32 Q3154.51 2900.45 3153.7 2902.37 Q3152.92 2904.27 3150.81 2906.86 Q3150.23 2907.53 3147.13 2910.75 Q3144.03 2913.95 3138.38 2919.71 Z" fill="#000000" fill-rule="evenodd" fill-opacity="1" /><path clip-path="url


rypt_shared_preferences/provider.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:shared_preferences/shared_preferences.dart';

/// SharedPreferences is a class to store simple data in key-value pairs.
///
/// [XSharedPreferences] combines the functionality of [FlutterSecureStorage] and [EncryptedSharedPreferences],
/// in order to provide a secure way to store data.
class XSharedPreferences {
  static const String KEY_CIPHER = "XSharedPreferences_cipher";
  static const String KEY_MIGRATED = "XSharedPreferences_migrated";
  static const String PASSWORD_CANDIDATE =
      "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

  final FlutterSecureStorage _keyStore;
  late final EncryptedSharedPreferences _preferences;

  XSharedPreferences._()
      : _keyStore = const FlutterSecureStorage(
          wOptions: WindowsOptions(useBackwardCompatibility: true),
        );

  static XSharedPreferences? _instance;

  static String _generateKey() {
    Random random;
    try {
      random = Random.secure();
    } catch (_) {
      random = Random();
    }
    // generate a 16-character random string using the characters [a-z0-9A-Z].
    String key = List.generate(
            16,
            (_) =>
                PASSWORD_CANDIDATE[random.nextInt(PASSWORD_CANDIDATE.length)])
        .join();
    return key;
  }

  /// Returns the instance of [XSharedPreferences].
  static Future<XSharedPreferences> getInstance() async {
    if (_instance == null) {
      _instance = XSharedPreferences._();
      // initialize the key store if the key does not exist.
      bool hasKey = await _instance!._keyStore.containsKey(key: KEY_CIPHER);
      if (!hasKey) {
        await _instance!._keyStore
            .write(key: KEY_CIPHER, value: _generateKey());
      }
      String key = (await _instance!._keyStore.read(key: KEY_CIPHER))!;
      // initialize the encrypted preferences.
      await EncryptedSharedPreferences.initialize(key,
          encryptor: LegacyAESEncryptor());
      _instance!._preferences = EncryptedSharedPreferences.getInstance();
      // migrate the data from [SharedPreferences] to [EncryptedSharedPreferences]
      // if the data has not been flagged as migrated.
      if (_instance!.getBool(KEY_MIGRATED) != true) {
        SharedPreferences sharedPreferences =
            await SharedPreferences.getInstance();
        for (String oldKey in sharedPreferences.getKeys()) {
          dynamic value = sharedPreferences.get(oldKey);
          if (value is String) {
            await _instance!.setString(oldKey, value);
          } else if (value is int) {
            await _instance!.setInt(oldKey, value);
          } else if (value is double) {
            await _instance!.setDouble(oldKey, value);
          } else if (value is bool) {
            await _instance!.setBool(oldKey, value);
          } else if (value is List<String>) {
            await _instance!.setStringList(oldKey, value);
          }
          await sharedPreferences.remove(oldKey);
        }
        await _instance!.setBool(KEY_MIGRATED, true);
      }
    }
    return _instance!;
  }

  // Proxy methods for [EncryptedSharedPreferences]

  Future<bool> clear() async {
    bool success = await _preferences.clear();
    if (success) {
      // mark the data as migrated after clearing. Or the data written after clearing will be re-migrated.
      await _instance!.setBool(KEY_MIGRATED, true);
    }
    return suc


for {
		if !TRIdIsZeroArrayRec(TRIdxTail) {
			if txr, ok := TransactionsRejected[TRIdxArray[TRIdxTail]]; ok {
				old_txrs = append(old_txrs, txr)
			} else {
				println("ERROR: TRIdxArray cointains bad pointer on non-zero record", TRIdxTail)
			}
		}
		if TRIdxTail == TRIdxHead {
			break
		}
		TRIdxTail = TRIdxNext(TRIdxTail)
	}

	TRIdxArray = make([]btc.BIDX, newcnt)
	TRIdxHead = 0
	TRIdxTail = 0

	var from_idx int
	if (newcnt - 1) < len(old_txrs) { // maximum number of txs we can fit is the array size minus 1
		from_idx = len(old_txrs) - (newcnt - 1)
	}

	for idx, txr := range old_txrs {
		bidx := txr.Id.BIdx()
		if idx < from_idx {
			TransactionsRejectedSize -= uint64(txr.Footprint)
			if txr.Tx != nil {
				txr.cleanup()
			}
			delete(TransactionsRejected, bidx)
		} else {
			txr.ArrIndex = uint16(TRIdxHead)
			TRIdxArray[TRIdxHead] = bidx
			TransactionsRejected[bidx] = txr
			TRIdxHead = TRIdxNext(TRIdxHead)
			if TRIdxHead == TRIdxTail {
				TRIdxTail = TRIdxNext(TRIdxTail)
			}
		}
	}
	if checkRejectedTxs() > 0 || checkRejectedSpentOutputs() > 0 {
		panic("resizeTransactionsRejectedCount failed")
	}
}

func limitRejected() {
	if cnt := int(common.Get(&common.CFG.TXPool.RejectRecCnt)); cnt != len(TRIdxArray) {
		resizeTransactionsRejectedCount(cnt)
		return
	}
	limitRejectedSizeIfNeeded()
}

// Make sure to call it with locked TxMutex.
func InitTransactionsRejected() {
	cnt := common.Get(&common.CFG.TXPool.RejectRecCnt)
	TransactionsRejected = make(map[btc.BIDX]*OneTxRejected, cnt)
	TransactionsRejectedSize = 0

	TRIdxArray = make([]btc.BIDX, cnt)
	TRIdxHead = 0
	TRIdxTail = 0

	WaitingForInputs = make(map[btc.BIDX]*OneWaitingList)
	WaitingForInputsSize = 0
	RejectedSpentOutputs = make(map[uint64][]btc.BIDX)
}
package chain

import (
	"bytes"
	"errors"
	"fmt"
	"time"

	"github.com/piotrnar/gocoin/lib/btc"
	"github.com/piotrnar/gocoin/lib/script"
)

// Make sure to call this function with ch.BlockIndexAccess locked
func (ch *Chain) PreCheckBlock(bl *btc.Block) (dos bool, maybelater bool, er error) {
	// Size limits
	if len(bl.Raw) < 80 {
		er = errors.New("CheckBlock() : size limits failed - RPC_Result:bad-blk-length")
		dos = true
		return
	}

	ver := bl.Version()
	if ver == 0 {
		er = errors.New("CheckBlock() : Block version 0 not allowed - RPC_Result:bad-version")
		dos = true
		return
	}

	// Check proof-of-work
	if !btc.CheckProofOfWork(bl.Hash, bl.Bits()) {
		er = errors.New("CheckBlock() : proof of work failed - RPC_Result:high-hash")
		dos = true
		return
	}

	// Check timestamp (must not be higher than now +2 hours)
	if int64(bl.BlockTime()) > time.Now().Unix()+2*60*60 {
		er = erro


riceRange[0] && price <= priceRange[1];
            const isMaterialMatch = material === materialFilter || materialFilter === 'All';

            if (isPriceInRange && isMaterialMatch) {
                product.style.display = 'block';
            } else {
                product.style.display = 'none';
            }
        });
    }

    function getPriceRange(priceFilter) {
        switch (priceFilter) {
            case '0-20':
                return [0, 20];
            case '21-40':
                return [21, 40];
            case '41-60':
                return [41, 60];
            default:
                return [0, Infinity];
        }
    }
</script>

© 2023 Wallpaper Store. All rights reserved.

<!DOCTYPE html>

상품 선택

    <form name="frmSearch" method="get" th:action="@{/admin/product/popup_select}" autocomplete="off" th:object="${productSearch}">
        <input th:if="${!#strings.isEmpty(param.target)}" type="hidden" name="target" th:value="${param.target}">

                상품분류

                        <input type="checkbox" name="cateCd" th:value="${c.cateCd}" th:field="*{cateCd}" th:id="${'cateCd_' + status.index}">

                등록일

                    <input type="date" name="sdate" th:field="*{sdate}"> ~
                    <input type="date" name="edate" th:field="*{edate}">

                상품상태

                        <input type="checkbox" name="statuses" th:value="${s[0]}" th:field="*{statuses}" th:id="${'statuses_' + status.index}">

                상품명


 is HCLBlock && (element is HCLIdentifier || element is HCLStringLiteral)) {
      if (RootBlockForHCLFiles.accepts(parent)) {
        // may change a last name element in some block types, otherwise name elements are predefined, no sense to report them as typos
        val type = parent.getNameElementUnquoted(0)
        if (element === parent.nameIdentifier && type in TfSpellcheckingUtil.RootBlocksWithChangeableName) {
          return if (element is HCLStringLiteral) StringLiteralTokenizer else TEXT_TOKENIZER
        }
      }
    }
    if (element is HCLStringLiteral) {
      return if (DescriptionProperty.accepts(parent)) StringLiteralTokenizer else EMPTY_TOKENIZER
    }
    if (element is HCLHeredocContent) {
      return HeredocContentTokenizer
    }
    if (element is HCLHeredocMarker) {
      return TEXT_TOKENIZER
    }
    if (element is PsiNameIdentifierOwner) {
      return EMPTY_TOKENIZER
    }
    return EMPTY_TOKENIZER
  }

  override fun isMyContext(element: PsiElement): Boolean {
    return element.containingFile is HCLFile
  }
}
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.intellij.terraform.hcl.psi

import com.intellij.openapi.util.TextRange
import com.intellij.psi.AbstractElementManipulator
import com.intellij.util.IncorrectOperationException
import org.intellij.terraform.hcl.psi.impl.HCLQuoter
import org.intellij.terraform.hcl.psi.impl.HCLStringLiteralMixin

class HCLStringLiteralManipulator : AbstractElementManipulator<HCLStringLiteralMixin>() {
  @Throws(IncorrectOperationException::class)
  override fun handleContentChange(element: HCLStringLiteralMixin, range: TextRange, newContent: String): HCLStringLiteralMixin {
    val escaped = HCLQuoter.escape(newContent, element.isInHCLFileWithInterpolations())
    val replacement = range.replace(element.text, escaped)
    return element.updateText(replacement)
  }

  override fun getRangeInElement(element: HCLStringLiteralMixin): TextRange {
    if (element.textLength == 0) return TextRange.EMPTY_RANGE
    else if (element.textLength == 1) return TextRange(0, element.textLength)
    return TextRange(1, element.textLength - 1)
  }
}
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.intellij.terraform.hcl.psi.impl

import com.intellij.openapi.util.text.StringUtil
import org.intellij.terraform.hcl.psi.HCLPsiUtil
import org.intellij.terraform.hil.ILLanguageInjector

object HCLQuoter {
  /**
   * Returns null if failed to unquote
   */
  fun unquote(text: String, supportInterpolations: Boolean = true, safe: Boolean = false): String {
    val stripQuotes = HCLPsiUtil.stripQuotes(text)
    // FIXME: Fix unescaping for single quoted string
    return unescapeStringCharacters(stripQuotes, supportInterpolations, safe)
  }

  fun escape(text: String, supportInterpolations: Boolean = true): String {
    return escapeStringCharacters(text, supportInterpolations)
  }

  private fun unescapeStringCharacters(s: String, supportInterpolations: Boolean, safe: Boolean): String {
    val buffer = StringBuilder(s.length)
    unescapeStringCharacters(s.length, s, buffer, supportInterpolations, safe)
    return buffer.toString()
  }

  private fun escapeStringCharacters(


 type = ProductDataPanel.DataRepresentationType.PLAIN_TEXT_FIELD;

    	if (label.equals(GUI_FIELD_LABELS[FONT_INDEX])) {
    		type = ProductDataPanel.DataRepresentationType.FONT_FIELD;
    	} else if  (label.equals(GUI_FIELD_LABELS[GRID_INDEX])) {
    		type = ProductDataPanel.DataRepresentationType.COMBO_BOX;
    		type.setComboBoxItems(ProductDataPanel.YesNoChoice.values());
    	} else if (label.equals(GUI_FIELD_LABELS[FOREGROUND_INDEX]) ||
    			   label.equals(GUI_FIELD_LABELS[BACKGROUND_INDEX]) ||
    			   label.equals(GUI_FIELD_LABELS[GRID_COLOR_INDEX])) {
    		type = ProductDataPanel.DataRepresentationType.COLOR_LABEL;
    	} else if (label.equals(GUI_FIELD_LABELS[X_SCALE_INDEX]) ||
    			   label.equals(GUI_FIELD_LABELS[Y_SCALE_INDEX])) {
    		type = ProductDataPanel.DataRepresentationType.COMBO_BOX;
    		type.setComboBoxItems(PlotScaleType.values());
    	} else if (label.equals(GUI_FIELD_LABELS[START_INDEX])     ||
    			   label.equals(GUI_FIELD_LABELS[STOP_INDEX])      ||
    			   label.equals(GUI_FIELD_LABELS[FREQUENCY_INDEX]) ||
    			   label.equals(GUI_FIELD_LABELS[X_MIN_INDEX])     ||
    			   label.equals(GUI_FIELD_LABELS[X_MAX_INDEX])     ||
    			   label.equals(GUI_FIELD_LABELS[Y_MIN_INDEX])     ||
    			   label.equals(GUI_FIELD_LABELS[Y_MAX_INDEX])
    			   ) {
    		type = ProductDataPanel.DataRepresentationType.NUMBER_FIELD;
    	}
    	return type;
    }

    /**
     * Sets data attribute for the specified order number.
     *
     * @param index		The order number of the data fields as shown in GUI.
     * @param value		The value of the GUI component represents.
     *
     */
    public void setData(int index, Object value) {
    	// can't 100% trust str == "", so using "".equals(str) instead !!!
    	String valueStr = null;
    	if (value != null && !("".equals(value.toString().trim()))) {
    		valueStr = value.toString();
    	}

    	switch (index) {
	    	case TITLE_INDEX:
	    		setTitle(valueStr);
	    		break;
	    	case START_INDEX:
	    		setTStart(valueStr);
	    		break;
	    	case STOP_INDEX:
	    		setTStop(valueStr);
	    		break;
	    	case X_AXIS_LABEL_INDEX:
	    		if (xaxis == null) {
	    			xaxis = new ProductAxis(valueStr);
	    			xaxis.setType(ProductAxis.X_AXIS);
	    		} else {
	    			xaxis.setLabel(valueStr);
	    		}
	    		break;
	    	case X_MIN_INDEX:
	    		setXMin(valueStr);
	    		break;
	    	case X_MAX_INDEX:
	    		setXMax(valueStr);
	    		break;
	    	case X_SCALE_INDEX:
	    		setXScale(valueStr);
	    		break;
	    	case Y_AXIS_LABEL_INDEX:
	    		if (yaxis == null) {
	    			yaxis = new ProductAxis(valueStr);
	    			yaxis.setType(ProductAxis.Y_AXIS);
	    		} else {
	    			yaxis.setLabel(valueStr);
	    		}
	    		break;
	    	case Y_MIN_INDEX:
	    		setYMin(valueStr);
	    		break;
	    	case Y_MAX_INDEX:
	    		setYMax(valueStr);
	    		break;
	    	case Y_SCALE_INDEX:
	    		setYScale(valueStr);
	    		break;
	    	case Y_AXIS_FORMAT_INDEX:
	    		if (yaxis == null) {
	    			yaxis = new ProductAxis();
	    			yaxis.setType(ProductAxis.Y_AXIS);
	    		}
	    		yaxis.setFormat


nd parentKey == v.parentKey then
					num = 1
					break
				end
			end
		end
	end
	return 0 ~= num, num
end

--[[
prefabPath  	红点的prefab路径，必须是已经加载好的，默认使用红点
dotNode 		挂在到哪个节点上
keyList 		该红点跟哪些key关联
rejectKeyList 	该红点与哪些红点互斥，互斥的红点有显示的话，那么该红点就不会显示
parentKeyList 	这里的是为了处理类似背包，有很多的cell情况，这样依赖cell红点的其他元素，只需要添加parentKey就行,其他情况基本不需要这个值
--]]
function RedDotManager:CreateDotView(data)
	if data then
		local resPath 	= data.prefabPath or ""
		self.resMgr:LoadAssetAsync(resPath, {"RedDot"}, typeof(GameObject), function(objs)
			if objs ~= nil and objs[0] ~= nil then
				local redDotObj = self.componentMgr:AddComponent(ComponentNames.RedDot, objs[0])
				redDotObj:SetViewNode(data.dotNode)
				redDotObj:Awake()
				redDotObj:UpdateRedDot(data.keyList, data.parentKeyList, data.rejectKeyList)
			end
		end)
	end
	-- return redDotObj
end

-- 供外部修改key
function RedDotManager:UpdateRedDotKey(obj, keyList, parentKeyList, rejectKeyList)
	if obj then obj:UpdateRedDot(keyList, parentKeyList, rejectKeyList) end
end

function RedDotManager:Clear()
	self._cacheData 		= {}
end

return RedDotManager


ementapi20231123104005.azurewebsites.net/';
  // static const String SERVER = 'https://fooddonationdeliverymanagementapi20231123104005.azurewebsites.net/api/v1/';

   static const String SERVER_HUB = 'https://fooddonationdeliverymanagementapi20231220102042.azurewebsites.net/';
  static const String SERVER = 'https://fooddonationdeliverymanagementapi20231220102042.azurewebsites.net/api/v1/';

  static const int LIMIT_No_IMAGE_DONATED_REQUEST = 5;

  static const String TYPE_ACTIVITY_1 = 'Quyên góp';
  static const String TYPE_ACTIVITY_2 = 'Lao động tình nguyện';
  static const String TYPE_ACTIVITY_3 = 'Hỗ trợ phát đồ';

}// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:food_donation_delivery_app/main.dart';

void main() {
  testWidgets('Counter increments smoke test', (WidgetTester tester) async {
    // Build our app and trigger a frame.
    await tester.pumpWidget(const MyApp());

    // Verify that our counter starts at 0.
    expect(find.text('0'), findsOneWidget);
    expect(find.text('1'), findsNothing);

    // Tap the '+' icon and trigger a frame.
    await tester.tap(find.byIcon(Icons.add));
    await tester.pump();

    // Verify that our counter has incremented.
    expect(find.text('0'), findsNothing);
    expect(find.text('1'), findsOneWidget);
  });
}
import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:food_donation_delivery_app/app_config.dart';
import 'package:food_donation_delivery_app/controllers/notification_controller.dart';
import 'package:food_donation_delivery_app/exceptions/my_custom_exception.dart';
import 'package:food_donation_delivery_app/models/notification_list.dart';
import 'package:food_donation_delivery_app/repositories/storage_repository.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
class NotificationService {
  static const String url = "${AppConfig.SERVER}notifications";

   static List<NotificationList> parserNotificationList(String responseBody){
    var data = json.decode(responseBody) ;
    var list = data['data']['notificationResponses'] as List<dynamic>;
    List<NotificationList> notifications = list.map((model) => NotificationList.fromJson(model)).toList();
    return notifications;
  }

  static Future<List<NotificationList>> fetchNotificationList({
    int status = -1,
    int page = 1,
    int pageSize = 20,
    String orderBy = '',
    int sortType = -1
  }) async{

    String options =
        "?pageSize=$pageSize"
        "&page=$page"
    ;

    if (status != -1){
      options += '&status=$status';
    }

    if (orderBy != ''){
      options += '&orderBy=$orderBy';
    }

    if (sortType != -1){
      options += '&sortType=$sortType';
    }

    var headers = {
      'Content-type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer ${await StorageRepository.getAccessToken()}'
    };
    try {
    final response = await http.get(Uri.parse(url + options),headers: headers );
    if (response.statusCode ==200){
     final NotificationController notificationController = Get.find();
     var data = json.decode(response.body) ;
    notificationController.addNumber(data['data']['notSeen']);
      return compute(parserNotificationList,response.body);
    } else{


undsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorTestV25FundsRecoveredIterator, error) {

	logs, sub, err := _VRFCoordinatorTestV25.contract.FilterLogs(opts, "FundsRecovered")
	if err != nil {
		return nil, err
	}
	return &VRFCoordinatorTestV25FundsRecoveredIterator{contract: _VRFCoordinatorTestV25.contract, event: "FundsRecovered", logs: logs, sub: sub}, nil
}

func (_VRFCoordinatorTestV25 *VRFCoordinatorTestV25Filterer) WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorTestV25FundsRecovered) (event.Subscription, error) {

	logs, sub, err := _VRFCoordinatorTestV25.contract.WatchLogs(opts, "FundsRecovered")
	if err != nil {
		return nil, err
	}
	return event.NewSubscription(func(quit <-chan struct{}) error {
		defer sub.Unsubscribe()
		for {
			select {
			case log := <-logs:

				event := new(VRFCoordinatorTestV25FundsRecovered)
				if err := _VRFCoordinatorTestV25.contract.UnpackLog(event, "FundsRecovered", log); err != nil {
					return err
				}
				event.Raw = log

				select {
				case sink <- event:
				case err := <-sub.Err():
					return err
				case <-quit:
					return nil
				}
			case err := <-sub.Err():
				return err
			case <-quit:
				return nil
			}
		}
	}), nil
}

func (_VRFCoordinatorTestV25 *VRFCoordinatorTestV25Filterer) ParseFundsRecovered(log types.Log) (*VRFCoordinatorTestV25FundsRecovered, error) {
	event := new(VRFCoordinatorTestV25FundsRecovered)
	if err := _VRFCoordinatorTestV25.contract.UnpackLog(event, "FundsRecovered", log); err != nil {
		return nil, err
	}
	event.Raw = log
	return event, nil
}

type VRFCoordinatorTestV25MigrationCompletedIterator struct {
	Event *VRFCoordinatorTestV25MigrationCompleted

	contract *bind.BoundContract
	event    string

	logs chan types.Log
	sub  ethereum.Subscription
	done bool
	fail error
}

func (it *VRFCoordinatorTestV25MigrationCompletedIterator) Next() bool {

	if it.fail != nil {
		return false
	}

	if it.done {
		select {
		case log := <-it.logs:
			it.Event = new(VRFCoordinatorTestV25MigrationCompleted)
			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
				it.fail = err
				return false
			}
			it.Event.Raw = log
			return true

		default:
			return false
		}
	}

	select {
	case log := <-it.logs:
		it.Event = new(VRFCoordinatorTestV25MigrationCompleted)
		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
			it.fail = err
			return false
		}
		it.Event.Raw = log
		return true

	case err := <-it.sub.Err():
		it.done = true
		it.fail = err
		return it.Next()
	}
}

func (it *VRFCoordinatorTestV25MigrationCompletedIterator) Error() error {
	return it.fail
}

func (it *VRFCoordinatorTestV25MigrationCompletedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

type VRFCoordinatorTestV25MigrationCompleted struct {


数则压入栈，并回到①；否则执行③。
3. 若扫描到运算符，则弹出两个栈顶元素，执行相应运算，运算结果压回栈顶，回到①。

![后缀表达式计算](imgs-DS/3后缀表达式栈运算.gif)

### 2.4中缀转前缀（手算）

中缀转前缀的手算方法：

1. 确定中缀表达式中各个运算符的运算顺序。
2. 选择下一个运算符，按照「**运算符，左操作数，右操作数**」的方式组合成一个新的操作数。
3. 如果还有运算符没被处理，就继续②**右边**

**“右优先”原则**：只要右边的运算符能先计算，就优先算的。
$$
A+B*(C-D)-E/F\\
↓\\
+A- *B -CD /EF
$$

### ❗2.5==【考点】中缀转后缀（机算）==

**【总结，记忆】数直接放入后缀表达式，运算符暂存在栈。**

[3.3.2_栈在表达式求值中的应用(下)_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1b7411N798/?p=29)

中缀转后缀表达式的机算方法：

初始化一个栈，用于**保存暂时还不能确定运算顺序的运算符**。

**从左到右**处理各个元素，直到末尾。可能遇到三种情况：

1. 遇到**操作数**。（*不入栈*）直接加入后缀表达式。

2. 遇到**界限符**。

   1. 遇到`(`直接入栈；
   2. 遇到`)`则依次弹出栈内运算符并加入后缀表达式，直到弹出`(`为止。

   注意：`(`不加入后缀表达式。

3. 遇到**运算符**。（*需要入栈*）

   1. 依次弹出栈中**已存在**的**优先级高于或等于当前运算符**的所有运算符，并加入后缀表达式；
   2. 若碰到`(`或栈空则停止。之后再把当前运算符入栈。

按上述方法处理完所有字符后，将栈中剩余运算符依次弹出，并加入后缀表达式。

---

最后：

通过中缀表达式转后缀表达式的机算方法、后缀表达式的计算，这**两种方式的结合**，可以直接对中缀表达式进行运算，判断完一个运算符的优先性之后，直接进行运算。

### 2.5表达式树与逆波兰表达式

一种递归分析表达式的方法是，将表达式当成普通的语法规则进行分析，分析后拆分成如图所示的表达式树，然后在树结构上自底向上进行运算。

![img](https://oi-wiki.org/misc/images/bet.png)

对这棵表达式树进行的：

**前序遍历 --> 前缀表达式**

**中序遍历 --> 中缀表达式（需要加界限符）**

**后序遍历 --> 后缀表达式**

### 2.6DAG描述表达式

详见 6.图：有向无环图(DAG)描述表达式

## 3.进制转换

对十进制数进行**取余**之后放入栈中，再出栈（倒序）就是目标结果。

```c++
//c++实现进制转换

#include<iostream>
using namespace std;

#define MaxSize 100				//栈最大可以存放的元素个数
typedef c


//
//  GHTest+JUnitXML.h
//  GHUnit
//
//  Created by Gabriel Handford on 6/4/10.
//  Copyright 2010. All rights reserved.
//
//  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.
//

//! @cond DEV

#import "GHTest.h"

@interface GHTest(JUnitXML)

/*!
 Return test results in JUnit XML format for external parsing use
 (such as a Continuous Integration system like Jenkins).
 */
- (NSString *)JUnitXML;

@end

//! @endcond


.tab-content {
            background-color: unset;
          }
        }

        &:-moz-lwtheme-darktext {
          .tab-content {
            background-color: #{$chrome-light-color};
          }
        }
      }

      &:hover:not([visuallyselected="true"]) .tab-content {
        background-color: darken($base-color, 5%);
        transition: background-color ease 150ms;
      }

      .tab-label-container:not([selected="true"]) {
        opacity: 1;

        .tab-label:not([selected="true"]) {
          color: #fff;
          opacity: 1;
        }
      }

      &:not([visuallyselected="true"]) {

        .tab-close-button:hover {

          .toolbarbutton-icon {
            background-color: darken($base-color, 15%);
          }

          &:-moz-lwtheme {
            background-color: rgba(0, 0, 0, 0.2);
            border-radius: 2px;
          }

          &:-moz-lwtheme-darktext {
            background-color: unset;
            border-radius: unset;
          }
        }

        .toolbarbutton-icon {
          --toolbarbutton-icon-fill-opacity: 1;
          fill:  #fff;
          stroke-opacity: 1;
        }
      }
    }

    .tabs-newtab-button,
    #new-tab-button {
      --toolbarbutton-icon-fill-opacity: 0.75;
      fill: #fff;

      &:hover {
        --toolbarbutton-icon-fill-opacity: 1;
      }
    }
  }
/*!
 * Copyright (c) 2014-present Cliqz GmbH. All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

@import 'configs.scss';
@import 'themes.scss';
@import 'undo-notifications.scss';
@import 'speed-dials.scss';
@import 'url-bar.scss';
@import 'url-bar-with-results.scss';
@import 'news.scss';
@import 'stats.scss';
@import 'settings.scss';
@import 'switch.scss';
@import 'tooltip.scss';
@import 'modal.scss';
@import 'overlay.scss';
@import 'overlayPopup.scss';
@import "mixins";

@mixin container($config, $theme)
{
    $base-configs: map-get($config, base);
    $speed-dials-configs: map-merge($base-configs, map-get($config, speed-dials));
    $url-bar-configs: map-merge($base-configs, map-get($config, url-bar));
    $news-configs: map-get($config, news);
    $stats-configs: map-merge($news-configs, map-get($config, stats));
    $tooltip-configs: map-get($config, tooltip);

    $base-theme: map-get($theme, base);
    $speed-dials-theme: map-get($theme, speed-dials);
    $url-bar-theme: map-get($theme, url-bar);
    $news-theme: map-get($theme, news);

    #app {
        display: flex;
        min-height: 100vh;

        &:before {
            display: block;
            position: fixed;
            z-index: -1;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: map-get($base-theme, background-mask-color);
            content: ' ';
        }
    }

    @include settings(map-get($base-theme, cliqz-settings-bg));

    #cliqz-history {
        background: map-get($base-theme, cliqz-history-bg);
    }

    #cliqz-worldcup:after {
        background: map-get($base-theme, cliqz


mageUrl;
  }
}
export interface UpdateResultOk<T, U = T> {
  type: "ok";
  before: T;
  after: U;
}
export interface UpdateResultFail<T, U = T> {
  type: "same" | "error" | "not matched";
  before?: T;
  after?: U;
}

export type UpdateResult<T, U = T> =
  | UpdateResultOk<T, U>
  | UpdateResultFail<T, U>;
export const VoiceKind = {
  normal: "normal",
  angry: "angry",
  happy: "happy",
  neutral: "neutral",
  sad: "sad",
  mei_angry: "mei_angry",
  mei_bashful: "mei_bashful",
  mei_happy: "mei_happy",
  mei_normal: "mei_normal",
  mei_sad: "mei_sad",
  takumi_angry: "takumi_angry",
  takumi_happy: "takumi_happy",
  takumi_normal: "takumi_normal",
  takumi_sad: "takumi_sad",
  alpha: "alpha",
  beta: "beta",
  gamma: "gamma",
  delta: "delta",
};
export type VoiceKindType = keyof typeof VoiceKind;
export const VoiceKindArray = [...Object.keys(VoiceKind)] as VoiceKindType[];
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { User } from '../types/user';
import { map } from 'rxjs/operators';

export class Issue {
  id: number;
  title: string;
  html_url: string;
  number: number;
  user: User;
}

interface ApiRequestOptions {
  user: string;
  repo: string;
}

@Injectable()

export class IssuesService {

  private baseUrl = 'https://api.github.com/search/issues';

  constructor(private http: HttpClient) {}

  getAll(options: ApiRequestOptions): Observable<Issue[]> {
    const { user, repo } = options;

    const url = `${this.baseUrl}?q=repo:${user}/${repo}+is:open+is:issue`;

    return this.http.get<Issue[]>(url)
      .pipe(
        map((response: { items: Issue[] }) => {
          return response.items;
        })
      );
  }
}
import { KeyCombos } from './KeyCombo.ts'
import { print, println, PREFIX, asPromptText, CLEAR_LINE, highlightText, createRenderer, moveCursor } from './util.ts'
export interface ConfirmOptions {
  /**
   * The default or preferred action. Not specifying it indicates no preference
   * and a boolean of true is positive and a boolean of false is negative.
   */
  defaultValue?: boolean
  /** The text that indicates a positive response. Default is 'Yes' */
  positiveText?: string
  /** The text that indicates a negative response. Default is 'No' */
  negativeText?: string
}
/**
 * Create a confirmation question that resolves to a true or false based on user input. It
 * takes an `undefined`, `true`, or `false` value as the default value. Each of the default
 * value types has an effect on how the prompt looks like.
 *
 * - `undefined` will suffix the prompt with `[y/n]`
 * - `true` will suffix the prompt with `[Y/n]`
 * - `false` will suffix the prompt with `[y/N]`
 *
 * The only valid values are anything starting with y or n uppercase or lowercase. The y and
 * n is derived from the positive and negative labels. You can customize the labels in the
 * options object The prompt can be canceled and will then return `undefined`.
 *
 * Controls:
 * - `Ctrl+c` will have the question canceled and return `undefined`.
 * - `Ctrl+d` will exit the whole script no questions asked with a `Deno.exit()`.
 * - `Up` arrow or `Home` key will move the cursor to the start of the prompt text.
 * - `Down` arrow or `End` key will move the cursor to the end of


 is_float {
            self.push_token(TokenType::Float);
        } else {
            self.push_token(TokenType::Int);
        }
        Ok(())
    }

    fn name(&mut self) -> Result<(), ScanError> {
        use TokenType::*;

        while is_alphanumeric(self.peek()?) {
            self.advance()?;
        }

        let start = self.start;
        let end = self.current;
        let text = &self.source[start..end];

        let tok = match text {
            "and" => And,
            "break" => Break,
            "do" => Do,
            "else" => Else,
            "elseif" => Elseif,
            "end" => End,
            "false" => False,
            "for" => For,
            "function" => Function,
            "goto" => Goto,
            "if" => If,
            "in" => In,
            "local" => Local,
            "nil" => Nil,
            "not" => Not,
            "or" => Or,
            "repeat" => Repeat,
            "return" => Return,
            "then" => Then,
            "true" => True,
            "until" => Until,
            "while" => While,
            _ => Name,
        };

        self.push_token(tok);
        Ok(())
    }

    fn advance(&mut self) -> Result<char, ScanError> {
        let c = self.getchar(self.current as usize)?;
        self.current += 1;
        Ok(c)
    }

    fn test(&mut self, expected: char) -> Result<bool, ScanError> {
        if self.is_at_end() {
            return Ok(false);
        }
        let c = self.getchar(self.current)?;
        if c != expected {
            return Ok(false);
        }

        self.current += 1;
        Ok(true)
    }

    fn getchar(&mut self, nth: usize) -> Result<char, ScanError> {
        self.source
            .chars()
            .nth(nth)
            .ok_or_else(|| ScanError::raise())
    }

    fn peek(&mut self) -> Result<char, ScanError> {
        if self.is_at_end() {
            Ok('\0')
        } else {
            self.getchar(self.current)
        }
    }

    fn peek_next(&mut self) -> Result<char, ScanError> {
        if self.current + 1 >= self.source.len() {
            Ok('\0')
        } else {
            self.getchar(self.current + 1)
        }
    }

    fn is_at_end(&self) -> bool {
        self.current >= self.source.len()
    }

    fn push_token(&mut self, token_type: TokenType) {
        let lexeme = &self.source[self.start..self.current];
        self.tokens.push(Token::new(token_type, lexeme, self.line));
    }
}

fn is_digit(c: char) -> bool {
    c >= '0' && c <= '9'
}

fn is_alpha(c: char) -> bool {
    (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_'
}

fn is_alphanumeric(c: char) -> bool {
    is_alpha(c) || is_digit(c)
}
<gh_stars>0
//! Contains any miscellaneous constants

mod division;
mod queue;
mod region;
mod tier;

pub use division::Division;
pub use queue::Queue;
pub use region::Region;
pub use tier::Tier;
/*
SPDX-FileCopyrightText: 2021 localthomas

SPDX-License-Identifier: MIT OR Apache-2.0
*/

use anyhow::{anyhow, Context, Result};
use discord::Discord;

use crate::{config::Config, status::UnitStatus};

pub mod discord;

/// Provides execution closures for notifications of multiple events.
/// Should be thread safe, so that it can be invoked from multiple threads at the same time.
/// Ideally, the implementations of this trait only hold the configuration necessary to construct
/// the closures.
pub trait NotificationProvider: Send + Sync {
    // TODO: allow multiple Results?


char *buf, int len)
{
  if (m_con && m_http_state==3) return m_con->peek_bytes(buf,len);
  return 0;
}
#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include <winnls.h>
#include <tchar.h>
#include <stdio.h>
#include <map>
#include <string>
#include <vector>
#include <algorithm>

#ifdef _UNICODE
typedef std::wstring tstring;
#else
typedef std::string tstring;
#endif

class CodePageTable
{
public:
   typedef std::map<tstring, UINT> Map;
   typedef std::vector<tstring>    StrVec;

   void Init();
   void AddLanguage(const TCHAR* name, LANGID langid);
   void AddCodePage(const TCHAR* name, UINT langid);
   UINT Find(const TCHAR* name) const;

   // data members
   Map    m_strToCP;
   StrVec m_keys;
};

void CodePageTable::AddLanguage(const TCHAR* name, LANGID langid)
{
   UINT codePage;
   GetLocaleInfo(MAKELCID(langid, SORT_DEFAULT),
                 LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
                 (LPTSTR)&codePage,
                 sizeof(codePage)/sizeof(TCHAR));
   this->m_strToCP[name] = codePage;
   this->m_keys.push_back(name);
}

void CodePageTable::AddCodePage(const TCHAR* name, UINT codePage)
{
   this->m_strToCP[name] = codePage;
   this->m_keys.push_back(name);
}
/*
CodePageTable cpTable[] =
{
   TEXT("ANSI"),                0,
   TEXT("Thai"),                874,
   TEXT("Japanese"),            932,
   TEXT("Simplified_Chinese"),  936,
   TEXT("Korean"),              949,
   TEXT("Traditional_Chinese"), 950,
   TEXT("Central_European"),    1250,
   TEXT("Cyrillic"),            1251,
   TEXT("Latin_I"),             1252,
   TEXT("Greek"),               1253,
   TEXT("Turkish"),             1254,
   TEXT("Hebrew"),              1255,
   TEXT("Arabic"),              1256,
   TEXT("Baltic"),              1257,
   TEXT("Vietnamese"),          1258,
   TEXT("UTF-8"),               65001,
   SUBLANG_ARABIC_IRAQ
};
*/
void CodePageTable::Init()
{
   // Add these first so that langs.h when updated will overwrite these.
   this->AddCodePage(_T("ANSI"), 0);
   this->AddCodePage(_T("CENTRAL_EUROPEAN"), 1250);
   this->AddCodePage(_T("CYRILLIC"), 1251);
   this->AddCodePage(_T("LATIN_I"), 1252);
   this->AddCodePage(_T("BALTIC"), 1257);
   this->AddCodePage(_T("UTF-8"), 65001);
   this->AddCodePage(_T("WELSH"), 1252);
   this->AddCodePage(_T("ZULU"), 1252);
   this->AddCodePage(_T("YAKUT"), 1251);
   this->AddCodePage(_T("SESOTHO"), 1252);
   this->AddCodePage(_T("SAMI"), 1252);
   this->AddCodePage(_T("ROMANSH"), 1252);
   this->AddCodePage(_T("QUECHUA"), 1252);
   this->AddCodePage(_T("MOHAWK"), 1252);
   this->AddCodePage(_T("MALTESE")


using System.Windows;
using System.Windows.Media;
using System.Windows.Shell;
using Microsoft.Xaml.Behaviors;
using LemonApp.Common.WinAPI;
using LemonApp.Common.Configs;

namespace LemonApp.Common.Behaviors;

/// <summary>
/// 提供窗口模糊效果和统一的暗亮色模式管理行为
/// </summary>
public class BlurWindowBehavior : Behavior<Window>
{
    static readonly Dictionary<Window, WindowMaterial> _allWindowMaterialManager = [];
    static BlurWindowBehavior()
    {
        //GlobalService.OnEnergySaverModeChanged += GlobalService_OnEnergySaverModeChanged;
    }

    private static void GlobalService_OnEnergySaverModeChanged(bool isOn)
    {
        foreach(var pair in _allWindowMaterialManager)
        {
            //对于UseWindowCaompositonAPI的窗口有自己的颜色管理
            if(pair.Value is { } material&&pair.Key is { }window&&!material.UseWindowComposition)
            window.SetResourceReference(Window.BackgroundProperty,
                isOn?"BackgroundColor": "WindowBackgroundColor");
        }
    }

    /// <summary>
    /// 是否为ToolWindow
    /// </summary>
    public bool IsToolWindow { get; set; } = false;

    private WindowChrome? _windowChrome = null;
    public WindowChrome? WindowChromeEx
    {
        get => _windowChrome;
        set
        {
            if (_windowChrome != value)
            {
                _windowChrome = value;
                UpdateWindowChromeEx();
            }
        }
    }

    private WindowMaterial? _windowMaterial;

    /// <summary>
    /// 更新所有窗口的暗亮色模式，此方法由主程序调用
    /// </summary>
    /// <param name="isDarkMode"></param>
    public static void SetDarkMode(bool isDarkMode)
    {
        foreach (var wac in _allWindowMaterialManager.Values)
        {
            UpdateWindowBlurMode(wac, isDarkMode);
        }
    }

    private void UpdateWindowChromeEx()
    {
        if (_windowMaterial != null && WindowChromeEx != null)
            _windowMaterial.WindowChromeEx = WindowChromeEx;
    }

    private static void UpdateWindowBlurMode(WindowMaterial wac, bool isDarkMode, float opacity = 0.1f)
    {
        wac.IsDarkMode = isDarkMode;
        wac.CompositonColor = isDarkMode ?
            Color.FromScRgb(opacity, 0, 0, 0) :
            Color.FromScRgb(opacity, 1, 1, 1);
    }

    protected override void OnAttached()
    {
        base.OnAttached();
        AssociatedObject.Closing += AssociatedObject_Closing;
        if (AssociatedObject.IsLoaded)
        {
            InitializeBehavior();
        }
        else


s.Cuda.init({gpuid=string.format('%d', gpuId), fp16 = opt.fp16})

  -- Convert Options
  opt.maxDecoderLength = opt.max_num_tokens + 1 -- since <StartOfSequence> is prepended to the sequence
  opt.maxEncoderLengthWidth = math.floor(opt.max_image_width / 8.0) -- feature maps after CNN become 8 times smaller
  opt.maxEncoderLengthHeight = math.floor(opt.max_image_height / 8.0) -- feature maps after CNN become 8 times smaller

  -- Build Model
  _G.logger:info('Building model')
  local model = WYGIWYS(optim)
  local modelPath = paths.concat(opt.model_dir, 'model_latest')
  if opt.load_model and paths.filep(modelPath) then
    _G.logger:info('Loading model from %s', modelPath)
    model:load(modelPath, opt)
  else
    -- Load Vocabulary
    _G.logger:info('Loading vocabulary from %s', opt.vocab_file)
    _G.idToVocab = tds.Hash() -- vocabulary file is global
    local file, err = io.open(opt.vocab_file, "r")
    if err then
      _G.logger:error('Vocabulary file %s does not exist!', opt.vocab_file)
      os.exit()
    end
    for line in file:lines() do
      local token = onmt.utils.String.strip(line)
      if onmt.utils.String.isEmpty(token) then
        token = ' '
      end
      _G.idToVocab[#_G.idToVocab+1] = token
    end
    opt.targetVocabSize = #_G.idToVocab + 4
    _G.logger:info('Creating model with fresh parameters')
    model:create(opt)
  end

  if not paths.dirp(opt.model_dir) then
    paths.mkdir(opt.model_dir)
  end

  -- Load Data
  _G.logger:info('Image directory: %s', opt.image_dir)
  _G.logger:info('Loading %s data from %s', opt.phase, opt.data_path)
  if opt.phase == 'train' and (not paths.filep(opt.label_path)) then
      _G.logger:error('Label file %s does not exist!', opt.label_path)
      os.exit(1)
  end
  local trainData = DataLoader(opt.image_dir, opt.data_path, opt.label_path, opt.max_image_height, opt.max_image_width, opt.max_num_tokens)
  local dataPath = paths.concat(opt.model_dir, string.format('model_%d-data', model.numSteps or 0))
  if opt.load_model and paths.filep(dataPath) and opt.phase == 'train' then
    _G.logger:info('Loading data state from %s', dataPath)
    trainData:load(dataPath)
  end
  _G.logger:info('Loaded')
  local valData
  if opt.phase == 'train' then
    _G.logger:info('Loading validation data from %s', opt.val_data_path)
    valData = DataLoader(opt.image_dir, opt.val_data_path, opt.label_path, opt.max_image_height, opt.max_image_width, opt.max_num_tokens)
    _G.logger:info('Loaded')
  end

  -- Run Model
  run(model, opt.phase, opt.batch_size, opt.val_batch_size or opt.batch_size, opt.num_epochs, trainData, valData, opt.model_dir, opt.steps_per_checkpoint, opt.beam_size, opt.output_dir, opt.learning_rate, opt.lr_decay)

  model:shutDown()
  _G.logger:shutDown()
end -- function main

main()


(max_iteration_, num_constraint_);

  auto ret = qp_problem.init(h_matrix, g_matrix, affine_constraint_matrix,
                             lower_bound, upper_bound, constraint_lower_bound,
                             constraint_upper_bound, max_iter);
  if (ret != qpOASES::SUCCESSFUL_RETURN) {
    if (ret == qpOASES::RET_MAX_NWSR_REACHED) {
      AERROR << "qpOASES solver failed due to reached max iteration";
    } else {
      AERROR << "qpOASES solver failed due to infeasibility or other internal "
                "reasons";
    }
    std::stringstream ss;
    ss << "ActiveSetQpSolver inputs: " << std::endl;
    ss << "kernel_matrix:\n" << kernel_matrix_ << std::endl;
    ss << "offset:\n" << offset_ << std::endl;
    ss << "affine_inequality_matrix:\n"
       << affine_inequality_matrix_ << std::endl;
    ss << "affine_inequality_boundary:\n"
       << affine_inequality_boundary_ << std::endl;
    ss << "affine_equality_matrix:\n" << affine_equality_matrix_ << std::endl;
    ss << "affine_equality_boundary:\n"
       << affine_equality_boundary_ << std::endl;

    ADEBUG << ss.str();

    return false;
  }

  double result[num_param_];  // NOLINT
  qp_problem.getPrimalSolution(result);

  params_ = Eigen::MatrixXd::Zero(num_param_, 1);
  for (int i = 0; i < num_param_; ++i) {
    params_(i, 0) = result[i];
  }
  return qp_problem.isSolved() == qpOASES::BT_TRUE;
}

void ActiveSetQpSolver::set_qp_eps_num(const double eps) { qp_eps_num_ = eps; }

void ActiveSetQpSolver::set_qp_eps_den(const double eps) { qp_eps_den_ = eps; }

void ActiveSetQpSolver::set_qp_eps_iter_ref(const double eps) {
  qp_eps_iter_ref_ = eps;
}

void ActiveSetQpSolver::set_debug_info(const bool enable) {
  debug_info_ = enable;
}

void ActiveSetQpSolver::set_l_lower_bound(const double l_lower_bound) {
  l_lower_bound_ = l_lower_bound;
}

void ActiveSetQpSolver::set_l_upper_bound(const double l_upper_bound) {
  l_upper_bound_ = l_upper_bound;
}

void ActiveSetQpSolver::set_constraint_upper_bound(
    const double la_upper_bound) {
  constraint_upper_bound_ = la_upper_bound;
}

void ActiveSetQpSolver::set_max_iteration(const int max_iter) {
  max_iteration_ = max_iter;
}

double ActiveSetQpSolver::qp_eps_num() const { return qp_eps_num_; }

double ActiveSetQpSolver::qp_eps_den() const { return qp_eps_den_; }

double ActiveSetQpSolver::qp_eps_iter_ref() const { return qp_eps_iter_ref_; }

bool ActiveSetQpSolver::debug_info() const { return debug_info_; }

double ActiveSetQpSolver::l_lower_bound() const { return l_lower_bound_; }

double ActiveSetQpSolver::l_upper_bound() const { return l_upper_bound_; }

double ActiveSetQpSolver::constraint_upper_bound() const {
  return constraint_upper_bound_;
}

int ActiveSetQpSolver::max_iteration() const { return max_iteration_; }

// pure virtual
bool ActiveSetQpSolver::sanity_check() {
  return kernel_matrix_.rows() == kernel_matrix_.cols() &&
         kernel_matrix_.rows() == affine_inequality_matrix_.cols() &&
         kernel_matrix_.rows() == affine_equality_matrix_.cols() &&
         affine_equality_matrix_.rows() == affine_equality_boundary_.rows() &&
         aff


BEQ.S   L0089
                RTS
L0089:          BSET    #7,D0
                MOVE.B  D0,L0357
                RTS
L008A:          BSET    #0,L035A
                RTS
L008B:          BCLR    #0,L035A
                RTS
L008C:          BSET    #1,L035A
                RTS
L008D:          BCLR    #1,L035A
                RTS
L008E:          LEA     X_MOUSE_REL,A0
                MOVE.B  D0,(A0)+
                MOVE.L  A0,L0368
                MOVE.W  #2,L0369
                RTS
L008F:          MOVEA.L L0368,A0
                MOVE.B  D0,(A0)+
                MOVE.L  A0,L0368
                SUBQ.W  #1,L0369
                BEQ.S   L0090
                RTS
L0090:          MOVE.W  Y_MOUSE_POS,D0
                MOVE.B  Y_MOUSE_REL,D1
                EXT.W   D1
                ADD.W   D1,D0
                BMI.S   L0091
                CMPI.W  #319,D0
                BHI.S   L0091
                MOVE.W  D0,Y_MOUSE_POS
L0091:          MOVE.W  L0367,D0
                MOVE.B  X_MOUSE_POS,D1
                EXT.W   D1
                ADD.W   D1,D0
                BMI.S   L0092
                CMPI.W  #199,D0
                BHI.S   L0092
                MOVE.W  D0,L0367
L0092:          RTS
do_midi_request:LEA     $FFFFFC04.w,A0
                MOVE.B  (A0),D2
                BTST    #7,D2
                BEQ.S   L0095
                BTST    #0,D2
                BEQ     L0094
                BSR     L0096
L0094:
                ANDI.B  #$20,D2
                BEQ     L0095
                MOVE.B  2(A0),D0
L0095:          RTS

L0096:          MOVE.B  2(A0),D0
                ST      L035C
                MOVE.B  $FFFFFC06.w,D0
                BTST    #7,D0
                BNE.S   L009A
                MOVE.B  L035D,D1
                BEQ.S   L0099
                CMPI.B  #1,D1
                BNE.S   L0097
                MOVE.B  D0,L035F
                MOVE.B  #2,L035D
                BRA.S   L0099
L0097:
                MOVE.B  #1,L035D
                TST.B   D0
                BEQ.S   L0098
                MOVE.B  D0,L0360
                MOVE.B  L035F,L035E
                MOVE.B  L035F,L0362
                BRA.S   L0099
L0098:
                MOVE.B  L035F,D0
                CMP.B   L0362,D0
                BNE.S   L0099
                CLR.B   L0360
                ST      L035E
                CLR.B   L0362
L0099:
                RTS

L009A:          ANDI.B  #$F0,D0
                CMPI.B  #$90,D0
                BNE.S   L009B
                MOVE.B  #1,L035D
                RTS
L009B:
                CLR.B   L035D
                RTS

L009C:          MOVE.W  L034F,D0
L009D:


/***************************************************************************
Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Written by Maarten JB van Ettinger.

****************************************************************************/
using System;
using System.Xml;

namespace ECGConversion.aECG
{
	public sealed class aECGName : aECGElement
	{
		public string family;
		public string given;
		public string prefix;
		public string suffix;

		public aECGName() : base("name")
		{
			Emp