Op.userClusterMonitoring, "user-cluster-monitoring", false, "Enable monitoring in user cluster.")
	flag.StringVar(&runOp.monitoringAgentScrapeConfigPrefix, "monitoring-agent-scrape-config-prefix", "monitoring-scraping", fmt.Sprintf("The name prefix of ConfigMaps in namespace %s, which will be used to add customized scrape configs for user cluster monitoring Agent.", resources.UserClusterMLANamespace))
	flag.BoolVar(&runOp.ccmMigration, "ccm-migration", false, "Enable ccm migration in user cluster.")
	flag.BoolVar(&runOp.ccmMigrationCompleted, "ccm-migration-completed", false, "cluster has been successfully migrated.")
	flag.BoolVar(&runOp.nutanixCSIEnabled, "nutanix-csi-enabled", false, "enable Nutanix CSI")
	flag.BoolVar(&runOp.isKonnectivityEnabled, "konnectivity-enabled", false, "Enable Konnectivity.")
	flag.StringVar(&runOp.konnectivityServerHost, "konnectivity-server-host", "", "Konnectivity Server host.")
	flag.IntVar(&runOp.konnectivityServerPort, "konnectivity-server-port", 6443, "Konnectivity Server port.")
	flag.StringVar(&runOp.konnectivityKeepaliveTime, "konnectivity-keepalive-time", "1m", "Konnectivity keepalive time.")
	flag.StringVar(&runOp.applicationCache, "application-cache", "", "Path to Application cache directory.")
	flag.BoolVar(&runOp.kubeVirtVMIEvictionController, "kv-vmi-eviction-controller", false, "Start the KubeVirt VMI eviction controller")
	flag.StringVar(&runOp.kubeVirtInfraKubeconfig, "kv-infra-kubeconfig", "", "Path to the KubeVirt infra kubeconfig.")
	flag.StringVar(&runOp.kubeVirtInfraNamespace, "kv-infra-namespace", "", "Kubevirt infra namespace where workload will be deployed")
	flag.BoolVar(&runOp.kyvernoEnabled, "kyverno-enabled", false, "Enable Kyverno in user cluster.")
	flag.Parse()

	rawLog := kubermaticlog.New(logOpts.Debug, logOpts.Format)
	log := rawLog.Sugar()
	ctrlruntimelog.SetLogger(zapr.NewLogger(rawLog.WithOptions(zap.AddCallerSkip(1))))

	// make sure the logging flags actually affect the global (deprecated) logger instance
	kubermaticlog.Logger = log
	reconciling.Configure(log)

	versions := kubermatic.GetVersions()
	cli.Hello(log, "User-Cluster Controller-Manager", &versions)

	kubeconfigFlag := flag.Lookup("kubeconfig")
	if kubeconfigFlag == nil { // Should not be possible.
		log.Fatal("can not get kubeconfig flag")
	}

	if runOp.namespace == "" {
		log.Fatal("-namespace must be set")
	}
	if runOp.clusterURL == "" {
		log.Fatal("-cluster-url must be set")
	}
	if runOp.clusterName == "" {
		log.Fatal("-cluster-name must be set")
	}
	if runOp.dnsClusterIP == "" {
		log.Fatal("-dns-cluster-ip must be set")
	}
	if runOp.kasSecurePort == int(envoyagent.StatsPort) {
		log.Fatalf("-kas-secure-port \"%d\" is reserved and must not be used", runOp.kasSecurePort)
	}
	clusterURL, err := url.Parse(runOp.clusterURL)
	if err != nil {
		log.Fatalw("Failed parsing clusterURL", zap.Error(err))
	}
	if !runOp.isKonnectivityEnabled && runOp.openvpnServerPort == 0 {
		log.Fat


 setup_logger():
+     logger = logging.getLogger()
+     logger.setLevel(getattr(logging, LOG_LEVEL))
+
+     # 文件处理器
+     file_handler = logging.FileHandler(LOG_FILE)
+     file_handler.setFormatter(log_format)
+     logger.addHandler(file_handler)
+
+     # 控制台处理器
+     console_handler = logging.StreamHandler()
+     console_handler.setFormatter(log_format)
+     logger.addHandler(console_handler)
+
+     return logger
+
+ # 初始化日志记录器
+ logger = setup_logger()
```

---

现在创建百度OCR API模块：

---

```diff
-
+ import os
+ import time
+ import base64
+ import requests
+ import logging
+ from config import BAIDU_OCR_API_KEY, BAIDU_OCR_SECRET_KEY, BAIDU_OCR_MAX_RETRIES
+
+ logger = logging.getLogger(__name__)
+
+ class BaiduOCR:
+     """百度OCR服务集成类"""
+
+     # 百度OCR API接口URL
+     TOKEN_URL = 'https://aip.baidubce.com/oauth/2.0/token'
+     OCR_URL_PREFIX = 'https://aip.baidubce.com/rest/2.0/ocr/v1'
+
+     # 发票类型映射
+     INVOICE_TYPES = {
+         'VAT': 'vat_invoice',              # 增值税发票
+         'General': 'invoice',               # 通用发票
+         'Receipt': 'receipt',               # 收据
+         'Form': 'form',                     # 表单
+         'Auto': 'accurate_basic'            # 自动（通用高精度）
+     }
+
+     def __init__(self):
+         """初始化百度OCR客户端"""
+         self.access_token = None
+         self.token_expiry = 0
+         logger.info("Initializing Baidu OCR client")
+
+     def get_access_token(self):
+         """获取百度API访问令牌，如果已过期则重新获取"""
+         current_time = time.time()
+
+         # 如果令牌尚未获取或已过期，则获取新令牌
+         if self.access_token is None or current_time >= self.token_expiry:
+             logger.info("Getting new Baidu OCR access token")
+             params = {
+                 'grant_type': 'client_credentials',
+                 'client_id': BAIDU_OCR_API_KEY,
+                 'client_secret': BAIDU_OCR_SECRET_KEY
+             }
+
+             try:
+                 response = requests.post(self.TOKEN_URL, params=params)
+                 response.raise_for_status()
+                 result = response.json()
+
+                 self.access_token = result.get('access_token')
+                 # 令牌有效期通常为30天，但设置为提前1小时过期以确保安全
+                 expires_in = result.get('expires_in', 2592000) - 3600
+                 self.token_expiry = current_time + expires_in
+
+                 logger.info("Successfully obtained Baidu OCR access token")
+                 return self.access_token
+             except Exception as e:
+                 logger.error(f"Failed to get Baidu OCR access token: {str(e)}")
+                 raise
+
+         return self.access_token
+
+     def _encode_image(self, image_path):
+         """将图像编码为base64格式"""
+         with open(image_path, 'rb') as f:
+


rawStringA(string s, Font font, Brush brush, StringFormat format, ColorA colorA, PointA pointA);

		void DrawImageA(Image image, RectangleA destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs);

		void FillRectangleA(Brush brush, ColorA color, ColorA secondColor, RectangleA rect);

		void FillEllipseA(Brush brush, ColorA color, ColorA secondColor, RectangleA rect);

		void FillPolygonA(Brush brush, ColorA color, ColorA secondColor, PointA[] points);
	}
}


, certificado.cert)
      assert.equal(recepcao.config.key, certificado.key)
    })
  })

  describe('#enviarEvento()', function () {
    it('Lote não informado', async function () {
      const config = {
        pfx: certificado.pfx,
        passphrase: certificado.passphrase,
        tpAmb: '2',
        cnpj: '12345678901234',
      }

      const recepcao = new RecepcaoEvento(config)

      await assert.rejects(
        async () => {
          recepcao.enviarEvento({ idLote: '1337' })
        },
        (err) => {
          assert.strictEqual(err.message, 'Lote não informado.')
          return true
        }
      )
    })

    it('Um lote deve possuir no mínimo 1 e no máximo 20 eventos (0 Eventos)', async function () {
      const config = {
        pfx: certificado.pfx,
        passphrase: certificado.passphrase,
        tpAmb: '2',
        cnpj: '12345678901234',
      }

      const recepcao = new RecepcaoEvento(config)
      const lote = []

      await assert.rejects(
        async () => {
          recepcao.enviarEvento({ idLote: '1337', lote: lote })
        },
        (err) => {
          assert.strictEqual(
            err.message,
            'Um lote deve possuir no mínimo 1 e no máximo 20 eventos.'
          )
          return true
        }
      )
    })

    it('Um lote deve possuir no mínimo 1 e no máximo 20 eventos (30 Eventos)', async function () {
      const config = {
        pfx: certificado.pfx,
        passphrase: certificado.passphrase,
        tpAmb: '2',
        cnpj: '12345678901234',
      }

      const recepcao = new RecepcaoEvento(config)
      const lote = [
        1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3,
        4, 5, 6, 7, 8, 9, 10,
      ]

      await assert.rejects(
        async () => {
          recepcao.enviarEvento({ idLote: '1337', lote: lote })
        },
        (err) => {
          assert.strictEqual(
            err.message,
            'Um lote deve possuir no mínimo 1 e no máximo 20 eventos.'
          )
          return true
        }
      )
    })

    it('Chave da NF-e não informada', async function () {
      const config = {
        pfx: certificado.pfx,
        passphrase: certificado.passphrase,
        tpAmb: '2',
        cnpj: '12345678901234',
      }

      const recepcao = new RecepcaoEvento(config)
      const lote = [{}]

      await assert.rejects(
        async () => {
          recepcao.enviarEvento({ idLote: '1337', lote: lote })
        },
        (err) => {
          assert.strictEqual(err.message, 'Chave da NF-e não informada.')
          return true
        }
      )
    })

    it('Tipo Evento não informado', async function () {
      const config = {
        pfx: certificado.pfx,
        passphrase: certificado.passphrase,
        tpAmb: '2',
        cnpj: '12345678901234',
      }

      const recepcao = new RecepcaoEvento(config)
      const lote = [
        {
          chNFe: '41000000000000000000000000000000000000000041',
        },
      ]

      await assert.rejects(
        async () =


2)>>2]}e=d+(c>>>3&536870908)|0;i[e>>2]=i[e>>2]|1<<c;b=b+((b>>>0)%3|0?-1:2)|0;if((b|0)!=-1){a=i[i[h>>2]+(b<<2)>>2]}b=1<<a;a=d+(a>>>3&536870908)|0;c=i[a>>2];break c}a=d+536870908|0;b=i[d+536870908>>2];c=-2147483648}i[a>>2]=b|c}}function ob(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=J-16|0;J=c;i[a+12>>2]=b;i[a+8>>2]=0;i[a>>2]=0;i[a+4>>2]=0;yb(a+16|0);ze(a+528|0);ve(a+544|0);ve(a+564|0);ve(a+584|0);i[a+612>>2]=0;i[a+604>>2]=0;i[a+608>>2]=0;a:{if(b){if(b>>>0>=1073741824){break a}f=b<<2;d=Dm(f);i[a+604>>2]=d;e=d+f|0;i[a+612>>2]=e;qn(d,0,f);i[a+608>>2]=e}i[a+616>>2]=0;i[a+620>>2]=0;i[a+624>>2]=0;if(b){f=b<<2;d=Dm(f);i[a+616>>2]=d;e=d+f|0;i[a+624>>2]=e;qn(d,0,f);i[a+620>>2]=e}i[c+8>>2]=0;i[c>>2]=0;i[c+4>>2]=0;g=a+628|0;f=b<<5|1;if(b){d=b<<2;e=Dm(d);i[c>>2]=e;h=d+e|0;i[c+8>>2]=h;qn(e,0,d);i[c+4>>2]=h}tb(g,f,c);d=i[c>>2];if(d){i[c+4>>2]=d;nn(d)}i[c+8>>2]=0;i[c>>2]=0;i[c+4>>2]=0;e=a+640|0;if(b){b=b<<2;d=Dm(b);i[c>>2]=d;g=b+d|0;i[c+8>>2]=g;qn(d,0,b);i[c+4>>2]=g}tb(e,f,c);b=i[c>>2];if(b){i[c+4>>2]=b;nn(b)}J=c+16|0;return a}Sm();x()}function xi(a,b,c,d,e){var f=0,h=0,k=0,l=0,m=0,n=0,p=0,q=0;h=J-16|0;J=h;a:{b:{switch(c+ -1|0){case 0:f=yi(a,b,d,e);break a;case 2:f=zi(a,b,d,e);break a;case 4:f=Ai(a,b,d,e);break a;case 1:f=Bi(a,b,d,e);break a;case 3:f=Ci(a,b,d,e);break a;case 5:f=Di(a,b,d,e);break a;case 8:break b;default:break a}}l=g[b+24|0];m=l<<2;a=i[a+80>>2];if((o(m,a)|0)!=(d


 specify the messages and associated read states to be changed.
        /// </summary>
        public MessageReadState[] MessageReadStates;

        /// <summary>
        /// Parse the RopSynchronizationImportReadStateChangesRequest structure.
        /// </summary>
        protected override void Parse()
        {
            RopId = ParseT<RopIdType>();
            LogonId = ParseT<byte>();
            InputHandleIndex = ParseT<byte>();
            MessageReadStatesSize = ParseT<ushort>();

            var interValue = new List<MessageReadState>();
            parser.PushCap(MessageReadStatesSize);
            while (!parser.Empty)
            {
                interValue.Add(Parse<MessageReadState>());
            }
            parser.PopCap();
            MessageReadStates = interValue.ToArray();
        }

        protected override void ParseBlocks()
        {
            Text = "RopSynchronizationImportReadStateChangesRequest";
            AddChildBlockT(RopId, "RopId");
            AddChildBlockT(LogonId, "LogonId");
            AddChildBlockT(InputHandleIndex, "InputHandleIndex");
            AddChildBlockT(MessageReadStatesSize, "MessageReadStatesSize");
            AddLabeledChildren(MessageReadStates, "MessageReadStates");
        }
    }
}


"
L["sticker_warcrimes.compactname"] = "战争罪"
L["sticker_warcrimes.description"] = [[你们已经在做了，为什么不大声喊出来呢？谁会阻止你，联合国吗？
设计者为 Rimuchii. 使用Project Sekai sticker base制作.

贴纸包含在 ARC9 Base.]]

L["sticker_sillycat.printname"] = "傻猫"
L["sticker_sillycat.compactname"] = "傻猫"
L["sticker_sillycat.description"] = [[我是蠢逼我是蠢逼我是蠢逼我是蠢逼我是蠢逼我是蠢逼我是蠢逼我是蠢逼
设计者为 Stan_Jacobs.

贴纸包含在 ARC9 Base.]]

L["sticker_muertosskull.printname"] = "亡灵节 Calavera"
L["sticker_muertosskull.compactname"] = "亡灵"
L["sticker_muertosskull.description"] = [["我想这应该是我的最终版本了，除非有人建议我修改它，名称：“Dia de los muertos calavera”，描述：我想不出来，关于墨西哥亡灵日头骨的描述，等等等等。"
设计者为 rooneyviz.

贴纸包含在 ARC9 Base.]]

L["sticker_bandaid.printname"] = "创可贴"
L["sticker_bandaid.compactname"] = "创可贴"
L["sticker_bandaid.description"] = [[把它涂在你的逼上然后亲吻它，一切都会好起来的.
设计者为 Itzal.

贴纸包含在 ARC9 Base.]]

L["sticker_peacedove.printname"] = "通过强大火力实现和平"
L["sticker_peacedove.compactname"] = "PTSF"
L["sticker_peacedove.description"] = [[鸽子带来和平，而枪炮通过强大的火力带来和平.
设计者为 Xipil.

贴纸包含在 ARC9 Base.]]

L["sticker_borntomodify.printname"] = "为改造而生"
L["sticker_borntomodify.compactname"] = "BTM"
L["sticker_borntomodify.description"] = [[另一个瞄准镜 - 另一个瞄准镜 - 一个榴弹发射器，这里和那里...
设计者为 Duck.

贴纸包含在 ARC9 Base.]]

L["sticker_cad.printname"] = "cad"
L["sticker_cad.compactname"] = "cad"
L["sticker_cad.description"] = [[cad
设计者为 Opt1ca.

贴纸包含在 ARC9 Base.]]

L["sticker_fumo.printname"] = "Fumo"
L["sticker_fumo.compactname"] = "Fumo"
L["sticker_fumo.description"] = [[别这样看着我，来福君...
设计者为 Itzal.

贴纸包含在 ARC9 Base.]]

L["sticker_hotlead.printname"] = "热导"
L["sticker_hotlead.compactname"] = "热导"
L["sticker_hotlead.description"] = [[小心点!这


erom.dol", 0x5F4C54, 0x4
.global lbl_806A4BB8
lbl_806A4BB8:
	.incbin "baserom.dol", 0x5F4C58, 0x4
.global lbl_806A4BBC
lbl_806A4BBC:
	.incbin "baserom.dol", 0x5F4C5C, 0x4
.global lbl_806A4BC0
lbl_806A4BC0:
	.incbin "baserom.dol", 0x5F4C60, 0x4
.global lbl_806A4BC4
lbl_806A4BC4:
	.incbin "baserom.dol", 0x5F4C64, 0x4
.global lbl_806A4BC8
lbl_806A4BC8:
	.incbin "baserom.dol", 0x5F4C68, 0x4
.global lbl_806A4BCC
lbl_806A4BCC:
	.incbin "baserom.dol", 0x5F4C6C, 0x4
.global lbl_806A4BD0
lbl_806A4BD0:
	.incbin "baserom.dol", 0x5F4C70, 0x4
.global lbl_806A4BD4
lbl_806A4BD4:
	.incbin "baserom.dol", 0x5F4C74, 0x4
.global lbl_806A4BD8
lbl_806A4BD8:
	.incbin "baserom.dol", 0x5F4C78, 0x4
.global lbl_806A4BDC
lbl_806A4BDC:
	.incbin "baserom.dol", 0x5F4C7C, 0x4
.global lbl_806A4BE0
lbl_806A4BE0:
	.incbin "baserom.dol", 0x5F4C80, 0x4
.global lbl_806A4BE4
lbl_806A4BE4:
	.incbin "baserom.dol", 0x5F4C84, 0x4
.global lbl_806A4BE8
lbl_806A4BE8:
	.incbin "baserom.dol", 0x5F4C88, 0x4
.global lbl_806A4BEC
lbl_806A4BEC:
	.incbin "baserom.dol", 0x5F4C8C, 0x4
.global lbl_806A4BF0
lbl_806A4BF0:
	.incbin "baserom.dol", 0x5F4C90, 0x4
.global lbl_806A4BF4
lbl_806A4BF4:
	.incbin "baserom.dol", 0x5F4C94, 0x4
.global lbl_806A4BF8
lbl_806A4BF8:
	.incbin "baserom.dol", 0x5F4C98, 0x8
.global lbl_806A4C00
lbl_806A4C00:
	.incbin "baserom.dol", 0x5F4CA0, 0x4
.global lbl_806A4C04
lbl_806A4C04:
	.incbin "baserom.dol", 0x5F4CA4, 0x4
.global lbl_806A4C08
lbl_806A4C08:
	.incbin "baserom.dol", 0x5F4CA8, 0x4
.global lbl_806A4C0C
lbl_806A4C0C:
	.incbin "baserom.dol", 0x5F4CAC, 0x4
.global lbl_806A4C10
lbl_806A4C10:
	.incbin "baserom.do


oadSaveMenu.gm_fnmDirectory.PrintF("SaveGame\\Player%d\\Quick\\", _pGame->gm_iSinglePlayer);
  gmLoadSaveMenu.gm_fnmSelected = CTString("");
  gmLoadSaveMenu.gm_fnmExt = CTString(".sav");
  gmLoadSaveMenu.gm_pAfterFileChosen = &LSLoadSinglePlayer;
  SetQuickLoadNotes();

  gmLoadSaveMenu.gm_pgmParentMenu = pgmCurrentMenu;
  ChangeToMenu( &gmLoadSaveMenu);
}

void StartSinglePlayerLoadMenu(void)
{
  _gmMenuGameMode = GM_SINGLE_PLAYER;

  mgLoadSaveTitle.mg_strText = TRANS("LOAD");
  gmLoadSaveMenu.gm_bAllowThumbnails = TRUE;
  gmLoadSaveMenu.gm_iSortType = LSSORT_FILEDN;
  gmLoadSaveMenu.gm_bSave = FALSE;
  gmLoadSaveMenu.gm_bManage = TRUE;
  gmLoadSaveMenu.gm_fnmDirectory.PrintF("SaveGame\\Player%d\\", _pGame->gm_iSinglePlayer);
  gmLoadSaveMenu.gm_fnmSelected = CTString("");
  gmLoadSaveMenu.gm_fnmExt = CTString(".sav");
  gmLoadSaveMenu.gm_pAfterFileChosen = &LSLoadSinglePlayer;
  mgLoadSaveNotes.mg_strText = "";

  gmLoadSaveMenu.gm_pgmParentMenu = pgmCurrentMenu;
  ChangeToMenu( &gmLoadSaveMenu);
}
void StartSinglePlayerSaveMenu(void)
{
  if( _gmRunningGameMode != GM_SINGLE_PLAYER) return;
  // if no live players
  if (_pGame->GetPlayersCount()>0 && _pGame->GetLivePlayersCount()<=0) {
    // do nothing
    return;
  }
  _gmMenuGameMode = GM_SINGLE_PLAYER;
  mgLoadSaveTitle.mg_strText = TRANS("SAVE");
  gmLoadSaveMenu.gm_bAllowThumbnails = TRUE;
  gmLoadSaveMenu.gm_iSortType = LSSORT_FILEDN;
  gmLoadSaveMenu.gm_bSave = TRUE;
  gmLoadSaveMenu.gm_bManage = TRUE;
  gmLoadSaveMenu.gm_fnmDirectory.PrintF("SaveGame\\Player%d\\", _pGame->gm_iSinglePlayer);
  gmLoadSaveMenu.gm_fnmSelected = CTString("");
  gmLoadSaveMenu.gm_fnmBaseName = CTString("SaveGame");
  gmLoadSaveMenu.gm_fnmExt = CTString(".sav");
  gmLoadSaveMenu.gm_pAfterFileChosen = &LSSaveAnyGame;
  mgLoadSaveNotes.mg_strText = "";
  gmLoadSaveMenu.gm_strSaveDes = _pGame->GetDefaultGameDescription(TRUE);

  gmLoadSaveMenu.gm_pgmParentMenu = pgmCurrentMenu;
  ChangeToMenu( &gmLoadSaveMenu);
}
void StartDemoLoadMenu(void)
{
  _gmMenuGameMode = GM_DEMO;

  mgLoadSaveTitle.mg_strText = TRANS("PLAY DEMO");
  gmLoadSaveMenu.gm_bAllowThumbnails = TRUE;
  gmLoadSaveMenu.gm_iSortType = LSSORT_FILEDN;
  gmLoadSaveMenu.gm_bSave = FALSE;
  gmLoadSaveMenu.gm_bManage = TRUE;
  gmLoadSaveMenu.gm_fnmDirectory = CTString("Demos\\");
  gmLoadSaveMenu.gm_fnmSelected = CTString("");
  gmLoadSaveMenu.gm_fnmExt = CTString(".dem");
  gmLoadSaveMenu.gm_pAfterFileChosen = &LSLoadDemo;
  mgLoadSaveNotes.mg_strText = "";

  gmLoadSaveMenu.gm_pgmParentMenu = pgmCurrentMenu;


break;
		default:
			if (index < 256) {
				addOpcode(Opcode.opc_dstore);
				addByte(index);
			} else {
				addOpcode(Opcode.opc_wide);
				addByte(Opcode.opc_dstore);
				addShort(index);
			}
			break;
		}

		stackHeight -= 2;
	}

	public void visit_astore(final Instruction inst) {
		final int index = ((LocalVariable) inst.operand()).index();

		if (index + 1 > maxLocals) {
			maxLocals = index + 1;
		}

		if (inst.useSlow()) {
			if (index < 256) {
				addOpcode(Opcode.opc_astore);
				addByte(index);
			} else {
				addOpcode(Opcode.opc_wide);
				addByte(Opcode.opc_astore);
				addShort(index);
			}
			stackHeight--;
			return;
		}

		switch (index) {
		case 0:
			addOpcode(Opcode.opc_astore_0);
			break;
		case 1:
			addOpcode(Opcode.opc_astore_1);
			break;
		case 2:
			addOpcode(Opcode.opc_astore_2);
			break;
		case 3:
			addOpcode(Opcode.opc_astore_3);
			break;
		default:
			if (index < 256) {
				addOpcode(Opcode.opc_astore);
				addByte(index);
			} else {
				addOpcode(Opcode.opc_wide);
				addByte(Opcode.opc_astore);
				addShort(index);
			}
			break;
		}

		stackHeight--;
	}

	/*
	 * Store into an array. Pop 3+ items off the stack.
	 */
	public void visit_iastore(final Instruction inst) {
		addOpcode(Opcode.opc_iastore);
		stackHeight -= 3;
	}

	public void visit_lastore(final Instruction inst) {
		addOpcode(Opcode.opc_lastore);
		stackHeight -= 4;
	}

	public void visit_fastore(final Instruction inst) {
		addOpcode(Opcode.opc_fastore);
		stackHeight -= 3;
	}

	public void visit_dastore(final Instruction inst) {
		addOpcode(Opcode.opc_dastore);
		stackHeight -= 4;
	}

	public void visit_aastore(final Instruction inst) {
		addOpcode(Opcode.opc_aastore);
		stackHeight -= 3;
	}

	public void visit_bastore(final Instruction inst) {
		addOpcode(Opcode.opc_bastore);
		stackHeight -= 3;
	}

	public void visit_castore(final Instruction inst) {
		addOpcode(Opcode.opc_castore);
		stackHeight -= 3;
	}

	public void visit_sastore(final Instruction inst) {
		addOpcode(Opcode.opc_sastore);
		stackHeight -= 3;
	}

	public void visit_pop(final Instruction inst) {
		addOpcode(Opcode.opc_pop);
		stackHeight--;
	}

	public void visit_pop2(final Instruction inst) {
		addOpcode(Opcode.opc_pop2);
		stackHeight -= 2;
	}

	public void visit_dup(final Instruction inst) {
		addOpcode(Opcode.opc_dup);
		stackHeight++;
	}

	public void visit_dup_x1(final Instruction inst) {
		addOpcode(Opcode.opc_dup_x1);
		stackHeight++;
	}

	public void visit_dup_x2(final Instruction inst) {
		addOpcode(Opcode.opc_dup_x2);
		stackHeight++;
	}

	public void visit_dup2(final Instruction inst) {
		addOpcode(Opcode.opc_dup2);


e den kubectl-Completion-Code f\u00fcr zsh[1] in die aktuelle Shell\n\t\tsource <(kubectl completion zsh)\x00\n\t\t# Liste alle Pods im ps-Format auf.\n\t\tkubectl get pods\n\n\t\t# Liste alle Pods im ps-Format mit zus\u00e4tzlichen Informationen (wie dem Knotennamen) auf.\n\t\tkubectl get pods -o wide\n\n\t\t# Liste alle einzelnen ReplicationController mit dem angegebenen Namen im ps-Format auf.\n\t\tkubectl get replicationcontroller web\n\n\t\t# Liste einen einzelnen Pod im JSON-Format auf.\n\t\tkubectl get -o json pod web-pod-13je7\n\n\t\t# Liste einen Pod mit Typ und Namen aus \"pod.yaml\" im JSON-Format auf.\n\t\tkubectl get -f pod.yaml -o json\n\n\t\t# Gib nur den phase-Wert des angegebenen Pods zur\u00fcck.\n\t\tkubectl get -o template pod/web-pod-13je7 --template={{.status.phase}}\n\n\t\t# Liste alle ReplicationController und Services im ps-Format auf.\n\t\tkubectl get rc,services\n\n\t\t# Liste eine oder mehrere Resourcen \u00fcber ihren Typ und Namen auf.\n\t\tkubectl get rc/web service/frontend pods/web-pod-13je7\n\n\t\t# Liste alle Resourcen mit verschiedenen Typen auf.\n\t\tkubectl get all\x00\n\t\t# H\u00f6rt lokal auf Port 5000 und 6000 und leitet Daten zum/vom Port 5000 und 6000 weiter an den Pod\n\t\tkubectl port-forward mypod 5000 6000\n\n\t\t# H\u00f6rt lokal auf Port 8888 und leitet an Port 5000 des Pods weiter\n\t\tkubectl port-forward mypod 8888:5000\n\n\t\t# H\u00f6rt auf einen zuf\u00e4lligen lokalen Port und leitet an Port 5000 des Pods weiter\n\t\tkubectl port-forward mypod :5000\n\n\t\t# H\u00f6rt auf einen zuf\u00e4lligen lokalen Port und leitet an Port 5000 des Pods weiter\n\t\tkubectl port-forward mypod 0:5000\x00\n\t\t# Markiere Knoten \"foo\" als schedulable.\n\t\t$ kubectl uncordon foo\x00\n\t\t# Markiere Knoten \"foo\" als unschedulable.\n\t\tkubectl cordon foo\x00\n\t\t# Aktualisiere einen Knoten teilweise mit einem Strategic-Merge-Patch\n\t\tkubectl patch node k8s-node-1 -p '{\"spec\":{\"unschedulable\":true}}'\n\n\t\t# Aktualisiere einen Knoten, mit type und name aus \"node.json\", mit einem Strategic-Merge-Patch\n\t\tkubectl patch -f node.json -p '{\"spec\":{\"unschedulable\":true}}'\n\n\t\t# Aktualisiere das Image eines Containers; spec.containers[*].name ist erforderlich, da es der Merge-Key ist\n\t\tkubectl patch pod valid-pod -p '{\"spec\":{\"containers\":[{\"name\":\"kubernetes-serve-hostname\",\"image\":\"new image\"}]}}'\n\n\t\t# Aktualisiere das Image eines Containers mit einem JSON-Patch mit Positional-Arrays\n\t\tkubectl patch pod valid-pod


= {
				"Gekkan", -- [1]
				"-5925", -- [2]
				"Сглаз на ТЕБЕ", -- [3]
				20, -- [4]
				237561, -- [5]
				["id"] = 1509,
			},
			["breath"] = {
				"Chromaggus", -- [1]
				"breath", -- [2]
				"Дыхание (1)", -- [3]
				30, -- [4]
				134400, -- [5]
				["id"] = 616,
			},
			["144485"] = {
				"Iron Juggernaut", -- [1]
				"144485", -- [2]
				"Шоковый импульс (1)", -- [3]
				15, -- [4]
				136025, -- [5]
				["id"] = 1600,
			},
			["breaths"] = {
				"Megaera", -- [1]
				"breaths", -- [2]
				"Дыхания", -- [3]
				5, -- [4]
				134154, -- [5]
				["id"] = 1578,
			},
			["-8034"] = {
				"Paragons of the Klaxxi", -- [1]
				"-8034", -- [2]
				"Выбор катализатора", -- [3]
				21, -- [4]
				878223, -- [5]
				["id"] = 1593,
			},
			["full_power"] = {
				"Conclave of Wind", -- [1]
				"full_power", -- [2]
				"Полная сила", -- [3]
				90, -- [4]
				136018, -- [5]
				["id"] = 1035,
			},
			["189009"] = {
				"Fel Lord Zakuun", -- [1]
				"189009", -- [2]
				"Пульсация", -- [3]
				36.5, -- [4]
				460959, -- [5]
				["id"] = 1777,
			},
			["207881"] = {
				"Talixae Flamewreath", -- [1]
				"207881", -- [2]
				"Инфернальное извержение", -- [3]
				19, -- [4]
				451164, -- [5]
				["id"] = 1869,
			},
			["188693"] = {
				"Socrethar the Eternal", -- [1]
				"188693", -- [2]
				"Апокалиптический взрыв Скверны (1)", -- [3]
				34, -- [4]
				135800, -- [5]
				["id"] = 1794,
			},
			["-20560"] = {
				"Carapace of N'Zoth", -- [1]
				"-20560", -- [2]
				"Покрытое наростами щупальце (1)", -- [3]
				30, -- [4]
				"Interface\\Icons\\INV_MISC_MONSTERHORN_04", -- [5]
				["id"] = 2337,
			},
			["260551"] = {
				"Soulbound Goliath", -- [1]
				"260551", -- [2]
				"Шипы души", -- [3]
				10, -- [4]
				1016245, -- [5]
				["id"] = 2114,
			},
			["263424"] = {
				"Adderis and Aspix", -- [1]
				"263424", -- [2]
				"Грозовой рывок", -- [3]
				20, -- [4]
				1041234, -- [5]
				["id"] = 2124,
			},
			["288212"] = {
				"Lady Jaina Proudmoore", -- [1]


    // Test Setup
    private val mainThreadSurrogate = newSingleThreadContext("UI thread")

    @Before
    fun setUp() {
        Dispatchers.setMain(mainThreadSurrogate)
        extension.setSettings(MockedSettings())
        runBlocking {
            extension.onInitialize()
            extension.onExtensionSelected()
            if (extension is LoginClient) extension.setLoginUser(user)
        }
    }

    @After
    fun tearDown() {
        Dispatchers.resetMain() // reset the main dispatcher to the original Main dispatcher
        mainThreadSurrogate.close()
    }

    private fun testIn(title: String, block: suspend CoroutineScope.() -> Unit) = runBlocking {
        println("\n-- $title --")
        block.invoke(this)
        println("\n")
    }
}package dev.brahmkshatriya.echo.extension.spotify.models

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class UserProfileView (
    val uri: String? = null,
    val name: String? = null,

    @SerialName("image_url")
    val imageUrl: String? = null,

    @SerialName("followers_count")
    val followersCount: Long? = null,

    @SerialName("following_count")
    val followingCount: Long? = null,

    @SerialName("public_playlists")
    val publicPlaylists: List<PublicPlaylist>? = null,

    @SerialName("total_public_playlists_count")
    val totalPublicPlaylistsCount: Long? = null,

    @SerialName("has_spotify_name")
    val hasSpotifyName: Boolean? = null,

    @SerialName("has_spotify_image")
    val hasSpotifyImage: Boolean? = null,

    val color: Long? = null,

    @SerialName("allow_follows")
    val allowFollows: Boolean? = null,

    @SerialName("show_follows")
    val showFollows: Boolean? = null
) {

    @Serializable
    data class PublicPlaylist(
        val uri: String? = null,
        val name: String? = null,

        @SerialName("image_url")
        val imageUrl: String? = null,

        @SerialName("owner_name")
        val ownerName: String? = null,

        @SerialName("owner_uri")
        val ownerUri: String? = null,

        @SerialName("followers_count")
        val followersCount: Long? = null
    )
}
package dev.brahmkshatriya.echo.extension.spotify.mercury

import java.math.BigInteger
import java.util.Arrays
import kotlin.random.Random

class DiffieHellman {
    private val privateKey: BigInteger
    private val publicKey: BigInteger

    init {
        val keyData = ByteArray(95)
        Random.nextBytes(keyData)

        privateKey = BigInteger(1, keyData)
        publicKey = GENERATOR.modPow(privateKey, PRIME)
    }

    fun computeSharedKey(remoteKeyBytes: ByteArray): BigInteger {
        val remoteKey = BigInteger(1, remoteKeyBytes)
        return remoteKey.modPow(privateKey, PRIME)
    }

    fun publicKeyArray() = toByteArray(publicKey)

    companion object {
        fun toByteArray(i: BigInteger): ByteArray {
            var array = i.toByteArray()
            if (array[0].toInt() == 0) array = Arrays.copyOfRange(array, 1, array.size)
            return array
        }

        private val GENERATOR: BigInteger = BigInteger.valueOf(2)
        private val PRIME = BigInteger(
            "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff",
            16
        )
    }
}package dev.brahmkshatriya.echo.extension

import dev.brahmkshatriya.echo.common.clients.ExtensionClient
import dev.


eckbox label{display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url('data:image/svg+xml;charset=utf-8,<svg width="10" height="8" viewBox="3 7 10 8" xmlns="http://www.w3.org/2000/svg"><path fill="%2341474E" fill-rule="evenodd" d="M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z"/></svg>') 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;flex:1;font-family:sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:monospace;font-weight:600;color:#3b4151}.swagger-ui .model .deprecated span,.swagger-ui .model .deprecated td{color:#a0a0a0!important}.swagger-ui .model .deprecated>td:first-of-type{text-decoration:line-through}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:transform .15s ease-in;transform:rotate(90deg);transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{transform:rotate(0deg)}.swagger-ui .model


ulps	%xmm7,  %xmm2

	subps	%xmm3,  %xmm5
	subps	%xmm2,  %xmm5

	movaps	-28 * SIZE(BB), %xmm4

	pshufd	 $0xee, %xmm4, %xmm6
	pshufd	 $0xbb, %xmm4, %xmm7

	pshufd	 $0xa0, %xmm5, %xmm3
	pshufd	 $0xf5, %xmm5, %xmm5

#ifndef CONJ
	xorps	 %xmm0, %xmm5
#else
	xorps	 %xmm0, %xmm3
#endif

	mulps	%xmm6,  %xmm3
	mulps	%xmm7,  %xmm5

	addps	%xmm3,  %xmm5
#endif

#ifdef RT
	movaps	-28 * SIZE(BB), %xmm4

	pshufd	 $0xee, %xmm4, %xmm6
	pshufd	 $0xbb, %xmm4, %xmm7

	pshufd	 $0xa0, %xmm5, %xmm3
	pshufd	 $0xf5, %xmm5, %xmm5

#ifndef CONJ
	xorps	 %xmm0, %xmm5
#else
	xorps	 %xmm0, %xmm3
#endif

	mulps	%xmm6,  %xmm3
	mulps	%xmm7,  %xmm5

	addps	%xmm3,  %xmm5

	pshufd	 $0x44, %xmm4, %xmm6
	pshufd	 $0x11, %xmm4, %xmm7

	pshufd	 $0xa0, %xmm5, %xmm3
	pshufd	 $0xf5, %xmm5, %xmm2

#ifndef CONJ
	xorps	 %xmm0, %xmm2
#else
	xorps	 %xmm0, %xmm3
#endif

	mulps	%xmm6,  %xmm3
	mulps	%xmm7,  %xmm2

	subps	%xmm3,  %xmm1
	subps	%xmm2,  %xmm1

	movaps	-32 * SIZE(BB), %xmm4

	pshufd	 $0x44, %xmm4, %xmm6
	pshufd	 $0x11, %xmm4, %xmm7

	pshufd	 $0xa0, %xmm1, %xmm3
	pshufd	 $0xf5, %xmm1, %xmm1

#ifndef CONJ
	xorps	 %xmm0, %xmm1
#else
	xorps	 %xmm0, %xmm3
#endif

	mulps	%xmm6,  %xmm3
	mulps	%xmm7,  %xmm1

	addps	%xmm3,  %xmm1
#endif

#ifdef LN
	subl	$4 * SIZE, CO1
#endif

#if defined(LN) || defined(LT)
	movaps	%xmm2,  -32 * SIZE(BB)
	movaps	%xmm3,  -28 * SIZE(BB)

	movlps	%xmm2,   0 * SIZE(CO1)
	movlps	%xmm3,   2 * SIZE(CO1)
	movhps	%xmm2,   0 * SIZE(CO1, LDC)
	movhps	%xmm3,   2 * SIZE(CO1, LDC)
#else
	movaps	%xmm1,  -32 * SIZE(AA)
	movaps	%xmm5,  -28 * SIZE(AA)

	movlps	%xmm1,   0 * SIZE(CO1)
	movhps	%xmm1,   2 * SIZE(CO1)

	movlps	%xmm5,   0 * SIZE(CO1, LDC)
	movhps	%xmm5,   2 * SIZE(CO1, LDC)
#endif

#ifndef LN
	addl	$4 * SIZE,


 .sm\:group-hover\:scale-y-90 {
    --tw-scale-y: .9;
  }

  .group:hover .sm\:group-hover\:scale-y-95 {
    --tw-scale-y: .95;
  }

  .group:hover .sm\:group-hover\:scale-y-100 {
    --tw-scale-y: 1;
  }

  .group:hover .sm\:group-hover\:scale-y-105 {
    --tw-scale-y: 1.05;
  }

  .group:hover .sm\:group-hover\:scale-y-110 {
    --tw-scale-y: 1.1;
  }

  .group:hover .sm\:group-hover\:scale-y-125 {
    --tw-scale-y: 1.25;
  }

  .group:hover .sm\:group-hover\:scale-y-150 {
    --tw-scale-y: 1.5;
  }

  .sm\:animate-none {
    animation: none;
  }

  .sm\:animate-spin {
    animation: spin 1s linear infinite;
  }

  .sm\:animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
  }

  .sm\:animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  .sm\:animate-bounce {
    animation: bounce 1s infinite;
  }

  .sm\:cursor-auto {
    cursor: auto;
  }

  .sm\:cursor-default {
    cursor: default;
  }

  .sm\:cursor-pointer {
    cursor: pointer;
  }

  .sm\:cursor-wait {
    cursor: wait;
  }

  .sm\:cursor-text {
    cursor: text;
  }

  .sm\:cursor-move {
    cursor: move;
  }

  .sm\:cursor-help {
    cursor: help;
  }

  .sm\:cursor-not-allowed {
    cursor: not-allowed;
  }

  .sm\:select-none {
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }

  .sm\:select-text {
    -webkit-user-select: text;
       -moz-user-select: text;
            user-select: text;
  }

  .sm\:select-all {
    -webkit-user-select: all;
       -moz-user-select: all;
            user-select: all;
  }

  .sm\:select-auto {
    -webkit-user-select: auto;
       -moz-user-select: auto;
            user-select: auto;
  }

  .sm\:resize-none {
    resize: none;
  }

  .sm\:resize-y {
    resize: vertical;
  }

  .sm\:resize-x {
    resize: horizontal;
  }

  .sm\:resize {
    resize: both;
  }

  .sm\:list-inside {
    list-style-position: inside;
  }

  .sm\:list-outside {
    list-style-position: outside;
  }

  .sm\:list-none {
    list-style-type: none;
  }

  .sm\:list-disc {
    list-style-type: disc;
  }

  .sm\


ulateChapterGap(episode(99.0), episode(-1.0)) shouldBe 0

        calculateChapterGap(-1.0, 10.0) shouldBe 0
        calculateChapterGap(99.0, -1.0) shouldBe 0
    }

    private fun episode(number: Double) = Episode.create().copy(
        episodeNumber = number,
    )
}
package tachiyomi.domain.anime.interactor

import io.kotest.matchers.shouldBe
import io.mockk.mockk
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode
import tachiyomi.domain.episode.model.Episode
import java.time.ZoneOffset
import java.time.ZonedDateTime
import kotlin.time.Duration
import kotlin.time.Duration.Companion.days
import kotlin.time.Duration.Companion.hours
import kotlin.time.DurationUnit
import kotlin.time.toDuration
import kotlin.time.toJavaDuration

@Execution(ExecutionMode.CONCURRENT)
class FetchIntervalTest {

    private val testTime = ZonedDateTime.parse("2020-01-01T00:00:00Z")
    private val testZoneId = ZoneOffset.UTC
    private var episode = Episode.create().copy(
        dateFetch = testTime.toEpochSecond() * 1000,
        dateUpload = testTime.toEpochSecond() * 1000,
    )

    private val fetchInterval = FetchInterval(mockk())

    @Test
    fun `returns default interval of 7 days when not enough distinct days`() {
        val episodesWithUploadDate = (1..50).map {
            episodeWithTime(episode, 1.days)
        }
        fetchInterval.calculateInterval(episodesWithUploadDate, testZoneId) shouldBe 7

        val episodesWithoutUploadDate = episodesWithUploadDate.map {
            it.copy(dateUpload = 0L)
        }
        fetchInterval.calculateInterval(episodesWithoutUploadDate, testZoneId) shouldBe 7
    }

    @Test
    fun `returns interval based on more recent episodes`() {
        val oldEpisodes = (1..5).map {
            episodeWithTime(episode, (it * 7).days) // Would have interval of 7 days
        }
        val newEpisodes = (1..10).map {
            episodeWithTime(episode, oldEpisodes.lastUploadDate() + it.days)
        }

        val episodes = oldEpisodes + newEpisodes

        fetchInterval.calculateInterval(episodes, testZoneId) shouldBe 1
    }

    @Test
    fun `returns interval based on smaller subset of recent episodes if very few episodes`() {
        val oldEpisodes = (1..3).map {
            episodeWithTime(episode, (it * 7).days)
        }
        // Significant gap between episodes
        val newEpisodes = (1..3).map {
            episodeWithTime(episode, oldEpisodes.lastUploadDate() + 365.days + (it * 7).days)
        }

        val episodes = oldEpisodes + newEpisodes

        fetchInterval.calculateInterval(episodes, testZoneId) shouldBe 7
    }

    @Test
    fun `returns interval of 7 days when multiple episodes in 1 day`() {
        val episodes = (1..10).map {
            episodeWithTime(episode, 10.hours)
        }
        fetchInterval.calculateInterval(episodes, testZoneId) shouldBe 7
    }

    @Test
    fun `returns interval of 7 days when multiple episodes in 2 days`() {
        val episodes = (1..2).map {
            episodeWithTime(episode, 1.days)
        } + (1..5).map {
            episodeWithTime(episode, 2.days)
        }
        fetchInterval.calculateInterval(episodes, testZoneId) shouldBe 7
    }

    @Test
    fun `returns interval


//Copyright  2014 Sony Computer Entertainment America LLC. See License.txt.

using System.Drawing;
using System.Drawing.Printing;
using System.IO;

namespace Sce.Atf.Applications
{
    ///
    /// PrintDocument class to handle text files
    public class TextPrintDocument : PrintDocument
    {
        ///
        /// Constructor
        /// <param name="fileName">Path to file</param>
        public TextPrintDocument(string fileName)
        {
            m_fileName = fileName;
        }

        ///
        /// Constructor
        /// <param name="stream">Text stream</param>
        public TextPrintDocument(Stream stream)
        {
            m_stream = stream;
        }

        ///
        /// Performs processing when printing begins
        /// <param name="e">Event args</param>
        protected override void OnBeginPrint(PrintEventArgs e)
        {
            base.OnBeginPrint(e);
            m_font = new Font("Courier", 10);

            if (m_fileName != null)
            {
                try
                {
                    m_streamReader = new StreamReader(m_fileName);
                }
                catch (FileNotFoundException)
                {
                    e.Cancel = true;
                }
            }
            else if (m_stream != null)
            {
                m_streamReader = new StreamReader(m_stream);

            }
            else
                e.Cancel = true;

        }

        ///
        /// Performs processing after printing ends


  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
  /* IE10+ */
  background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
  /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
  /* IE6-9 */
}
.edui-dialog-image .edui-image-wrapper{font-size: 12px;margin: 15px;}

/*upload*/
.edui-dialog-image .edui-image-upload1{position: absolute;top:50%;left:50%;width:44px;height:38px;margin-top:-19px; margin-left: -22px;}
.edui-dialog-image .edui-image-upload2{position:relative;float:left;width:120px;height:120px;margin:5px 0 0 5px;}

.edui-dialog-image .edui-image-form{position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;opacity: 0;cursor: pointer;}
.edui-dialog-image .edui-image-form .edui-image-file{width: 100%;height:100%;filter: alpha(opacity=0)}

.edui-dialog-image .edui-image-upload1 .edui-image-icon{display: inline-block;width:44px;height:38px;background-image: url('images/upload1.png')}
.edui-dialog-image .edui-image-upload1 .edui-image-icon.hover{background-position: -50px 0;}
.edui-dialog-image .edui-image-upload2 .edui-image-icon{display: inline-block;width:120px;height:120px;background-image: url('images/upload2.png')}

.edui-dialog-image .edui-image-dragTip{position: absolute;display:none;top:50%;left:50%;margin-top:30px;margin-left: -60px;
    color: #222;font-size:14px;text-shadow: 0px 2px 3px #555;}

.edui-dialog-image .edui-image-content{height:330px;width:100%;position: relative;}

.edui-dialog-image .edui-image-mask{display: none;position: absolute;top:0;left:0;width: 100%; height: 100%;background-color:#fff;
    text-align: center;line-height:300px;color:#000;font-size:14px;font-weight:bold;opacity: 0.6;filter: alpha(opacity=60);}
.edui-dialog-image .edui-image-mask.edui-active{display: block;}

/*network*/
.edui-dialog-image .edui-image-searchBar{margin: 10px;}
.edui-dialog-image .edui-image-searchBar .edui-image-searchTxt{display: inline-block !important;*display: inline !important;*zoom:1;width:400px; border: 1px solid #c5d2ff; height: 20px; line-height: 18px; font-size: 14px; padding: 3px; margin: 0;outline:0;}
.edui-dialog-image .edui-image-searchBar .edui-image-searchAdd{display: inline-block !important;*display: inline !important;*zoom:1;
    width:60px; text-align:c


utils.TPStatProfile{
		{
			TPid:        "TP1",
			Tenant:      "cgrates.org",
			ID:          "Stats1",
			FilterIDs:   []string{"FLTR_1"},
			QueueLength: 100,
			TTL:         "1s",
			Metrics: []*utils.MetricWithFilters{
				{
					MetricID: utils.MetaASR,
				},
			},
			ThresholdIDs: []string{"*none"},
			Weight:       20.0,
			Stored:       true,
			MinItems:     1,
		},
	}

	if err := storDB.SetTPStats(eTPs); err != nil {
		t.Error(err)
	}
	// READ
	if rcv, err := storDB.GetTPStats("TP1", utils.EmptyString, utils.EmptyString); err != nil {
		t.Error(err)
	} else if !reflect.DeepEqual(eTPs[0], rcv[0]) {
		t.Errorf("Expecting: %+v,\n received: %+v", utils.ToJSON(eTPs[0]), utils.ToJSON(rcv[0]))
	}

	// UPDATE
	eTPs[0].Metrics = []*utils.MetricWithFilters{
		{
			MetricID: utils.MetaACD,
		},
	}
	if err := storDB.SetTPStats(eTPs); err != nil {
		t.Error(err)
	}
	// READ
	if rcv, err := storDB.GetTPStats("TP1", utils.EmptyString, utils.EmptyString); err != nil {
		t.Error(err)
	} else if eTPs[0].Metrics[0].MetricID != rcv[0].Metrics[0].MetricID {
		t.Errorf("Expecting: %+v,\n received:  %+v", utils.ToJSON(eTPs[0]), utils.ToJSON(rcv[0]))
	}

	// REMOVE
	if err := storDB.RemTpData(utils.TBLTPStats, "TP1", nil); err != nil {
		t.Error(err)
	}
	// READ
	if ids, err := storDB.GetTPStats("TP1", utils.EmptyString, utils.EmptyString); err != utils.ErrNotFound {
		t.Error(err)
		t.Error(utils.ToJSON(ids))
	}
}

func TestIDBTPThresholds(t *testing.T) {

	storDB, err := NewInternalDB(nil, nil, false, nil, config.CgrConfig().StorDbCfg().Items)
	if err != nil {
		t.Error(err)
	}
	//READ
	if _, err := storDB.GetTPThresholds("TH1", utils.EmptyString, utils.EmptyString); err != utils.ErrNotFound {
		t.Error(err)
	}

	//WRITE
	tpThresholds := []*utils.TPThresholdProfile{
		{
			TPid:      "TP1",
			Tenant:    "cgrates.org",
			ID:        "Th1",
			FilterIDs: []string{"*string:~*req.Account:1002", "*string:~*req.DryRun:*default"},
			MaxHits:   -1,
			MinSleep:  "1s",
			Blocker:   true,
			Weight:    10,
			ActionIDs: []string{"ACT_TOPUP_RST"},
			Async:     true,
		},
		{
			TPid:      "TP1",
			Tenant:    "cgrates.org",
			ID:        "Th2",
			FilterIDs: []string{"*string:~*req.Destination:10"},
			MaxHits:   -1,
			MinSleep:  "1s",
			Blocker:   true,
			Weight:    20,
			ActionIDs: []string{"ACT_LOG_WARNING"},
			Async:     true,
		},
	}
	if err := storDB.SetTPThresholds(tpThresholds); err != nil


aff_boum	move.l ad_bboum1,a6
	lea 2(a6),a0
	clr.w (a6)		aucunes explosion aff.
	lea tmp_boum,a4
	lea boum,a5
	moveq #3,d6
aff_boums3	move.l a4,a3
	bsr.s aff_boums0
	lea 14*4(a4),a4
	dbra d6,aff_boums3
	rts
aff_boums0	move.l (a3)+,d7	nb explos.
	add.w d7,(a6)		nb total a effacer.
aff_boums1	subq.w #1,d7
	bmi.s aff_boums2
	move.w (a3)+,d0	crd x explo.
	move.w (a3)+,d1	crd y
	move.l a5,a1
	jsr aff_persos2
	bra.s aff_boums1
aff_boums2	rts

aff_bomb	move.l ad_bbomb1,a0
	lea players,a6
	moveq #3,d7
aff_bombs1	move.l #-1,(a0)
	move.w crd_bx(a6),d0
	bmi.s aff_bombs2
	move.w crd_by(a6),d1
	lea bombes,a1
	move.w num_b(a6),d2
	mulu #8*16,d2
	add.w d2,


void main(String[] args) throws Throwable {
        final Runtime rt = Runtime.getRuntime();
        final String[] pidPrinter = {"/bin/sh", "-c", "echo $$"};
        final Process minedProcess = rt.exec(pidPrinter);
        int minedPid = 0;
        final InputStream is = minedProcess.getInputStream();
        int c;
        while ((c = is.read()) >= '0' && c <= '9')
            minedPid = 10 * minedPid + (c - '0');
        System.out.printf("minedPid=%d%n", minedPid);
        minedProcess.waitFor();

        final String[] magnum = {
            "perl", "-e",
            "my $punk = getppid();" +
            "open TTY, '> /dev/tty';" +
            "print TTY \"punk=$punk\\n\";" +
            "for (my $i = 0; $i < 32768; $i++) {" +
            "  my $pid = fork();" +
            "  if ($pid == 0) {" +
            "    if ($$ == " + minedPid + ") {" +
            "      print TTY \"MATCH $$ $punk\\n\";" +
            "      $SIG{TERM} = sub {" +
            "        print TTY \"Got TERM $$ $punk\\n\";" +
            "        kill 9, $punk;" +
            "        exit; };" +
            "      $| = 1; print 'Go ahead.  Make my day.';" +
            "      sleep 100;" +
            "    }" +
            "    exit;" +
            "  } else { " +
            "    waitpid($pid,0);" +
            "    break if $pid == " + minedPid + ";" +
            "  }" +
            "}"
        };

        Process p = rt.exec(magnum);
        if (p.getInputStream().read() != -1) {
            System.out.println("got a char");
            minedProcess.destroy();
            Thread.sleep(1000);
        }
    }
}
/*
 * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code 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
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @bug 4242173 5017980 6576055
 * @summary Test Byte.decode method
 * @author madbot
 * @author Joseph D. Darcy
 */

/**
 * There are six methods in java.lang.Byte which transform strings
 * into a byte or Byte value:
 *
 * public Byte(String s)
 * public static Byte decode(String nm)
 * public static byte parseByte(String s, int radix)
 * public static byte parseByte(String s)
 * public static Byte valueOf(String s, int radix)
 * public static Byte valueOf(String s)
 *
 * However, of these only decode has a nontrivial implementation
 * in that class.
 */
public class Decode {

    private static void check(String val, byte expected) {
        byte n = (Byte.decode(val)).byteValue();
        if (n != expected)
            throw new RuntimeException("Byte.decode failed. String:" +
                                                val + " Result:" + n);
    }

    private static void checkFailure(String val, String message) {
        try {
            byte n = (Byte.decode(val)).byteValue();
            throw new Runtime


konkrétní pokyny. Pokud například požadujete, aby kupující před dokončením obchodu předložil účtenku jako doklad o zaplacení nebo pokud potřebujete, aby kupující poskytl ID, je to místo, kde to uvést. Chcete-li si udělat představu o tom, co obsahují dobré obchodní podmínky, můžete se podívat na inzeráty jiných obchodníků na způsob platby, který chcete použít.

  Další možnosti

  Omezit částky na
 Inzerát můžete omezit tak, že budete moci otevírat obchody pouze za konkrétní částky. Pokud do pole zadáte 20,30,60, potenciální obchodní partner může otevřít obchod pouze za 20, 30 nebo 60 EUR.

  Platební údaje
 Zde zadejte konkrétní informace týkající se toho, jak by měl kupující platit, může to být číslo vašeho bankovního účtu nebo e-mailová adresa (např. pro PayPal).

  Požadované minimální skóre zpětné vazby
 Minimum zpětné vazby vám umožňuje nastavit minimální požadované skóre zpětné vazby, abyste mohli otevřít obchod pomocí vaší reklamy.

  První časový limit ($assetSymbol)
 Toto je konkrétní maximální limit transakcí pro nové uživatele. Pokud s vámi chce otevřít obchod kupující bez předchozí obchodní historie, je to největší částka, za kterou může obchod otevřít.

  Platební okno
 Doba, kterou má kupující na dokončení platby, než bude prodávající moci zrušit obchod.

  Sledování maximální částky likvidity
 Povolení sledování likvidity snižuje maximální limit reklamy o částku, která je aktuálně zadržena v otevřených obchodech.

  Rychlé tipy k identifikaci podvodníků

Podvodní kupující často spěchají. Čím více zákazník požaduje, tím více spěcháte. měli byste být, skuteční zákazníci mají vždy trpělivost.

Podvodní kupující často navrhují provést celou transakci nebo její část mimo systém ochrany arbitrážních dluhopisů a poté svou část transakce nedokončí.

 Buďte opatrní ohledně důkazu o platbě pomocí photoshopu, nedokončujte obchod, dokud nepotvrdíte, že jste obdrželi peníze. Nejste povinni dokončit obchod, dokud neověříte, že jste obdrželi platbu kupujícího.

Neotvírejte žá


 === cardInfo.cardNumberFieldValue ? cardInfo : card);

            return {
                ...state,
                cards: found ? newCards : [...state.cards, cardInfo],
            }
        }
        default:
            return state;
    }
};
import { spawnSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
import { findPkgPath, updatePkg } from './util';

/**
 * Builder options
 */
export interface BuilderOptions {
  /**
   * Entry file
   */
  readonly entry: string;

  /**
   * The output directory
   */
  readonly outDir: string;

  /**
   * Expose modules as UMD under this name
   */
  readonly global: string;

  /**
   * Minify
   */
  readonly minify?: boolean;

  /**
   * Include source maps
   */
  readonly sourceMaps?: boolean;

  /**
   * The cache directory
   */
  readonly cacheDir?: string;

  /**
   * The node version to use as target for Babel
   */
  readonly nodeVersion?: string;
}

/**
 * Builder
 */
export class Builder {
  private readonly parcelBinPath: string;

  constructor(private readonly options: BuilderOptions) {
    let parcelPkgPath: string;
    try {
      parcelPkgPath = require.resolve('parcel-bundler/package.json'); // This will throw if `parcel-bundler` cannot be found
    } catch (err) {
      throw new Error('It looks like parcel-bundler is not installed. Please install v1.x of parcel-bundler with yarn or npm.');
    }
    const parcelDir = path.dirname(parcelPkgPath);
    const parcelPkg = JSON.parse(fs.readFileSync(parcelPkgPath, 'utf8'));

    if (!parcelPkg.version || !/^1\./.test(parcelPkg.version)) { // Peer dependency on parcel v1.x
      throw new Error(`This module has a peer dependency on parcel-bundler v1.x. Got v${parcelPkg.version}.`);
    }

    this.parcelBinPath = path.join(parcelDir, parcelPkg.bin.parcel);
  }

  public build(): void {
    const pkgPath = findPkgPath();
    let originalPkg;

    try {
      if (this.options.nodeVersion && pkgPath) {
        // Update engines.node (Babel target)
        originalPkg = updatePkg(pkgPath, {
          engines: { node: `>= ${this.options.nodeVersion}` }
        });
      }

      const args = [
        'build', this.options.entry,
        '--out-dir', this.options.outDir,
        '--out-file', 'index.js',
        '--global', this.options.global,
        '--target', 'node',
        '--bundle-node-modules',
        '--log-level', '2',
        !this.options.minify && '--no-minify',
        !this.options.sourceMaps && '--no-source-maps',
        ...this.options.cacheDir
          ? ['--cache-dir', this.options.cacheDir]
          : [],
      ].filter(Boolean) as string[];

      const parcel = spawnSync(this.parcelBinPath, args);

      if (parcel.error) {
        throw parcel.error;
      }

      if (parcel.status !== 0) {
        throw new Error(parcel.stdout.toString().trim());
      }
    } catch (err) {
      throw new Error(`Failed to build file at ${this.options.entry}: ${err}`);
    } finally { // Always restore package.json to original
      if (pkgPath && originalPkg) {
        fs.writeFileSync(pkgPath, originalPkg);
      }
    }
  }
}
import { Component, Input,ViewChild, ViewContainerRef, ComponentFactory, ComponentFactoryResolver, Compiler } from '@angular/core';

@Component({
  selector: 'hello',
  providers: [],
  template: `<h1>{{message}}!</h1>`
})
export class HelloComponent {
  @Input() message:string = "defaultValue";
  constr


n:0.5s all;
	/*background:#011D4A!mportant;*/
}
a:focus, a:active, a:hover ,a.dropdown-toggle{
    outline: none;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
	text-decoration:none;
}
a {
    background-color:none;
}
body p{
  font-family: 'Roboto', sans-serif;
}
h1, h2, h3, h4, h5 {
    	font-family: 'Montserrat', sans-serif;
}
a {
  color: #333333;
  font-weight:400;
}
a:hover { transition: all 200ms ease-in-out; }

.page-container {
  min-width: 1260px;
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin: 0px auto;
}
.left-content {
    float: right;
    width: 87%;
}
a.sidebar-icon:hover{
	color:#333333;
}
.page-container.sidebar-collapsed {
  transition: all 100ms linear;
  transition-delay: 300ms;
}
li.breadcrumb-item i.fa.fa-angle-right {
    font-size: 25px;
    padding: 0 8px;
    color: #000;
	vertical-align: middle;
}
.breadcrumb > li {
    color: #bc6c25 ! important;
    font-size: 16px ! important;
    vertical-align: middle ! important;
}
.page-container.sidebar-collapsed .left-content {
   float: right;
   width: 97%;
}
.page-container.sidebar-collapsed-back {
    transition: all 100ms linear;
}
.page-container.sidebar-collapsed-back .left-content {
  transition: all 100ms linear;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  transition: all 0.3s ease;
	float: right;
    width:87%;
	padding: 0 2em;
}
 .left-content {
    width:87%;
	padding: 0 2em;
}
.page-container.sidebar-collapsed .sidebar-menu {
  width: 65px;
  transition: all 100ms ease-in-out;
  transition-delay: 300ms;
}
.page-container.sidebar-collapsed-back .sidebar-menu {
  width: 230px;
  transition: all 100ms ease-in-out;
}
.page-container.sidebar-collapsed .sidebar-icon {
   transform: rotate(90deg);
   transition: all 300ms ease-in-out;
   margin-right: 0em;
    margin-top: -8px;
	color: #fff;
    background: #333333;
    border-radius: 0;
}
.page-container.sidebar-collapsed-back .sidebar-icon {


****。先祖是外姓，上宗别人儿。纵必家和顺，官司亦被欺。**

凡乱首课皆主杂乱之姓，上祖必假名异姓。若上祖是如今之姓，老少和睦，亦遭官司。主家乱不利，占上祖别人之嗣。

乱首，日往加辰受辰克。赘婿，辰来加日被日克。乱首下欺上，赘婿上凌下。悖逆紊乱，绝上下之义。若更将得卯酉、神得后合，则主男女讹杂。更值魁罡勾陈，以至有不可形容之事。

《订讹》

乱首，干临支被克，为自取乱首。支临干克干，为上门乱首，更兼发用尤的。干为尊上如首，支为卑下如足，卑下无礼作乱，故名乱首。上门乱首发用，又名反常课。占主少害长，下犯上，家门背逆，不可举事。

自取乱首，尊上自失礼，为支所犯，事体稍轻。

上门乱首，尊不惹卑，卑下敢来犯上，事体重。

自取乱首，事发于内而起于外，兵不利客，亦不宜攻，惟可固守解围。

上门乱首，事发于外而起于内，兵不利主，贼来格战，总主来人迟，营寨多有刑伤。若见卯酉后合，主男女讹杂，不分长幼。

自取乱首，若四课俱下贼上，不免窝犯丑声，祸自内出。

此课或主祖宗别姓。如将得青龙，来意因幼小不知别籍异居之事，三传年命克制乱我之神，名曰患门有救。

附：干临支生支曰偃蹇，泄耗甚也。受生曰俯就，先难后乐也。同类曰培本，比和相助也。

凌犯，干克支，下贼上为用；支克干，上克下为用。日克辰乃上凌下，却得下贼上为用。辰克日，乃下犯上，却得上克下为用。互相凌犯，故名凌犯。占主尊卑不分，君骄臣逆，或主篡弑事。初传官鬼祸尤速。克下外事起，克上内事起。

**度厄课**：剥卦，六亲冰炭。度厄三课上下克，上下相克长幼惊。

凡四课内三上克下，或三下贼上，为度厄课。盖上为尊，下为卑。三上克下，则长


ERIPLEASEVISITMISSIONENIGMAINSWITZERLAND', [12, 8, 6, 0]),
          ]
        },
      {
        'input' : 'CONGRATULATIONYOUHAVEDECRYPTSUCCESSFULTHEENIGMAGEOCOINBYFERANDERIPLEASEVISITMISSIONENIGMAINSWITZERLAND',
        'key' : EnigmaKey(
            [
              EnigmaRotorConfiguration(const EnigmaRotor('ETW, Enigma I \'Wehrmacht\'', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', type: EnigmaRotorType.ENTRY_ROTOR)),
              EnigmaRotorConfiguration(const EnigmaRotor('III, Enigma I \'Wehrmacht\'', 'BDFHJLCPRTXVZNYEIWGAKMUSQO', turnovers: 'V'), offset: 'E', setting: 'O'),
              EnigmaRotorConfiguration(const EnigmaRotor('VI, M3 + M4 \'Wehrmacht\'', 'JPGVOUMFYQBENHZRDKASXLICTW', turnovers: 'ZM'), offset: 'U', setting: 'E'),
              EnigmaRotorConfiguration(const EnigmaRotor('I, Enigma I \'Wehrmacht\'', 'EKMFLGDQVZNTOWYHXUSPAIBRCJ', turnovers: 'Q'), offset: 'F', setting: 'G'),
              EnigmaRotorConfiguration(const EnigmaRotor('UKW C, M3 + M4 \'Wehrmacht\'', 'FVPJIAOYEDRZXWGCTKUQSBNMHL', type: EnigmaRotorType.REFLECTOR)),
            ],
            plugboard: {'W':'S', 'R':'F', 'Z': 'H', 'B': 'U', 'D': 'C', 'G': 'N', 'J': 'M', 'A': 'E'}
        ),
        'expectedOutput' : [
            IntegerListText('TVWBZXPDUMYUCRNPLNOQDURZLAVGXOGURQIORHNRDKMAIKVUVCXBSHDELVXIIEHCRMJPQWJIANTPWNKDRGPBBEKPSPDCZBNTFKUWBY', [0, 12, 8, 6, 0]),
          ]
      },
      {
        'input' : 'GEOGEOCTYQLIZYHXOTOLWEEDTPQXCDHNCUHZBNXEOXTCVWUOIVZMIOSTPTLJAPYOKVYSXSQBIRGEGKHOOYPJZZUWGRWZHMEXRLPYOENEPDZG',
        'key' : EnigmaKey(
            [
              EnigmaRotorConfiguration(const EnigmaRotor('ETW, Enigma I \'Wehrmacht\'', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', type: EnigmaRotorType.ENTRY_ROTOR)),
              EnigmaRotorConfiguration(const EnigmaRotor('III, Enigma I \'Wehrmacht\'', 'BDFHJLCPRTXVZNYEIWGAKMUSQO', turnovers: 'V'), offset: 'E', setting: 'C'),
              EnigmaRotorConfiguration(const EnigmaRotor('VI, M3 + M4 \'Wehrmacht\'', 'JPGVOUMFYQBENHZRDKASXLICTW', turnovers: 'ZM'), offset: 'U', setting: 'G'),
              EnigmaRotorConfiguration(const EnigmaRotor('I, Enigma I \'Wehrmacht\'', 'EKMFLGDQVZNTOWYHXUSPAIBRCJ', turnovers: 'Q'), offset: 'F', setting: 'E'),
              EnigmaRotorConfiguration(const EnigmaRotor('UKW C, M3 + M4 \'Wehrmacht\'', 'FVPJIAOYEDRZXWGCTKUQSBNMHL', type: EnigmaRotorType.REFLECTOR)),


N_TYPE_TEXT, false, false );

    ColumnInfo type = new ColumnInfo( BaseMessages.getString( PKG, "KafkaConsumerInputDialog.Column.Type" ),
      ColumnInfo.COLUMN_TYPE_CCOMBO, supportedTypes, false );

    // don't let the user edit the type for anything other than key & msg fields
    type.setDisabledListener( rowNumber -> {
      String ref = fieldsTable.getTable().getItem( rowNumber ).getText( 1 );
      KafkaConsumerField.Name refName = KafkaConsumerField.Name.valueOf( ref.toUpperCase() );

      return !( refName == KafkaConsumerField.Name.KEY || refName == KafkaConsumerField.Name.MESSAGE );
    } );

    return new ColumnInfo[] { referenceName, name, type };
  }

  private ColumnInfo[] getOptionsColumns() {

    ColumnInfo optionName = new ColumnInfo( BaseMessages.getString( PKG, "KafkaConsumerInputDialog.NameField" ),
      ColumnInfo.COLUMN_TYPE_TEXT, false, false );

    ColumnInfo value = new ColumnInfo( BaseMessages.getString( PKG, "KafkaConsumerInputDialog.Column.Value" ),
      ColumnInfo.COLUMN_TYPE_TEXT, false, false );
    value.setUsingVariables( true );

    return new ColumnInfo[] { optionName, value };
  }

  private void populateFieldData() {
    List<KafkaConsumerField> fieldDefinitions = consumerMeta.getFieldDefinitions();
    int rowIndex = 0;
    for ( KafkaConsumerField field : fieldDefinitions ) {
      TableItem key = fieldsTable.getTable().getItem( rowIndex++ );

      if ( field.getKafkaName() != null ) {
        key.setText( 1, field.getKafkaName().toString() );
      }

      if ( field.getOutputName() != null ) {
        key.setText( 2, field.getOutputName() );
      }

      if ( field.getOutputType() != null ) {
        key.setText( 3, field.getOutputType().toString() );
      }
    }
  }

  private void populateOptionsData() {
    int rowIndex = 0;
    for ( Map.Entry<String, String> entry : consumerMeta.getConfig().entrySet() ) {
      TableItem key = optionsTable.getTable().getItem( rowIndex++ );
      key.setText( 1, entry.getKey() );
      key.setText( 2, entry.getValue() );
    }
  }

  private void populateTopicsData() {
    List<String> topics = consumerMeta.getTopics();
    int rowIndex = 0;
    for ( String topic : topics ) {
      TableItem key = topicsTable.getTable().getItem( rowIndex++ );
      if ( topic != null ) {
        key.setText( 1, topic );
      }
    }
  }

  private void buildTopicsTable( Composite parentWidget, Control controlAbove, Control controlBelow ) {
    ColumnInfo[] columns =
      new ColumnInfo[] { new ColumnInfo( BaseMessages.getString( PKG, "KafkaConsumerInputDialog.NameField" ),
        ColumnInfo.COLUMN_TYPE_CCOMBO, new String[ 1 ], false ) };

    columns[ 0 ].setUsingVariables( true );

    int topicsCount = consumerMeta.getTopics().size();

    Listener lsFocusInTopic =  e -> {
      CCombo ccom = (CCombo) e.widget;
      ComboVar cvar = (ComboVar) ccom.getParent();

      KafkaDialogHelper kdh = getDialogHelper( cvar );
      kdh.clusterNameChanged( e );
    };
    topicsTable = new TableView(
      transMeta,
      parentWidget,
      SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI,
      columns,
      topicsCount,
      false,
      lsMod,
      props,
      false,
      lsFocusInTopic
    );

    topicsTable.setSortable( false );
    topicsTable.getTable().addListener( SWT.Resize, event -> {
      Table table = (Table) event.widget;
      table.getColumn( 1 ).setWidth( 316


D_FOR: &[char]        = &['f', 'o', 'r'];
pub const KEYWORD_FUNCTION: &[char]   = &['f', 'u', 'n', 'c', 't', 'i', 'o', 'n'];
pub const KEYWORD_IF: &[char]         = &['i', 'f'];
pub const KEYWORD_IMPORT: &[char]     = &['i', 'm', 'p', 'o', 'r', 't'];
pub const KEYWORD_IN: &[char]         = &['i', 'n'];
pub const KEYWORD_INSTANCEOF: &[char] = &['i', 'n', 's', 't', 'a', 'n', 'c', 'e', 'o', 'f'];
pub const KEYWORD_NEW: &[char]        = &['n', 'e', 'w'];
pub const KEYWORD_RETURN: &[char]     = &['r', 'e', 't', 'u', 'r', 'n'];
pub const KEYWORD_SUPER: &[char]      = &['s', 'u', 'p', 'e', 'r'];
pub const KEYWORD_SWITCH: &[char]     = &['s', 'w', 'i', 't', 'c', 'h'];
pub const KEYWORD_THIS: &[char]       = &['t', 'h', 'i', 's'];
pub const KEYWORD_THROW: &[char]      = &['t', 'h', 'r', 'o', 'w'];
pub const KEYWORD_TRY: &[char]        = &['t', 'r', 'y'];
pub const KEYWORD_TYPEOF: &[char]     = &['t', 'y', 'p', 'e', 'o', 'f'];
pub const KEYWORD_VAR: &[char]        = &['v', 'a', 'r'];
pub const KEYWORD_VOID: &[char]       = &['v', 'o', 'i', 'd'];
pub const KEYWORD_WHILE: &[char]      = &['w', 'h', 'i', 'l', 'e'];
pub const KEYWORD_WITH: &[char]       = &['w', 'i', 't', 'h'];
pub const KEYWORD_YIELD: &[char]      = &['y', 'i', 'e', 'l', 'd'];
pub const KEYWORD_LET: &[char]        = &['l', 'e', 't'];
pub const KEYWORD_STATIC: &[char]     = &['s', 't', 'a', 't', 'i', 'c'];
pub const KEYWORD_ENUM: &[char]       = &['e', 'n', 'u', 'm'];
pub const KEYWORD_IMPLEMENTS: &[char] = &['i', 'm', 'p', 'l', 'e', 'm', 'e', 'n', 't', 's'];
pub const KEYWORD_PROTECTED: &[char]  = &['p', 'r', 'o', 't', 'e', 'c', 't', 'e', 'd'];
pub const KEYWORD_INTERFACE: &[char]  = &['i', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e'];
pub const KEYWORD_PRIVATE: &[char]    = &['p', 'r', 'i', 'v', 'a', 't', 'e'];
pub const KEYWORD_PUBLIC: &[char]     = &['p', 'u', 'b', 'l', 'i', 'c'];

// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-keywords
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
pub enum Keyword {
    Async,
    Await,
    Break,
    Case,
    Catch,
    Class,
    Const,
    Continue,
    Debugger,
    Default,
    Delete,
    Do,
    Else,
    Export,
    Extends,
    Finally,
    For,
    Function,
    If,
    Import,
    In,
    Instanceof,
    New,
    Return,
    Super,
    Switch,
    This,
    Throw,
    Try,
    Typeof,
    Var,
    Void,
    While,
    With,


 CHECK(member.field_no == 3);
  //         CHECK(member.field_name == "y");
  //       },
  //       val2->second);
  // }
  {
    test_variant st1 = {5, "Hello, variant!", 3.14};
    std::string str;
    iguana::to_pb(st1, str);
    test_variant st2;
    iguana::from_pb(st2, str);
    CHECK(st1.z == st2.z);
    CHECK(std::get<std::string>(st2.y) == "Hello, variant!");
  }
  {
    test_variant st1 = {5, 3.88, 3.14};
    std::string str;
    iguana::to_pb(st1, str);
    test_variant st2;
    iguana::from_pb(st2, str);
    CHECK(st1.z == st2.z);
    CHECK(std::get<double>(st2.y) == 3.88);
  }
}
#endif

DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4007)
int main(int argc, char **argv) { return doctest::Context(argc, argv).run(); }
DOCTEST_MSVC_SUPPRESS_WARNING_POP
#include <deque>
#include <iterator>
#include <list>
#include <vector>

#define DOCTEST_CONFIG_IMPLEMENT
// #define SEQUENTIAL_PARSE
#include <iguana/json_util.hpp>
#include <iguana/json_writer.hpp>
#include <iostream>
#include <optional>

#include "doctest.h"
#include "iguana/json_reader.hpp"
#include "test_headers.h"

TEST_CASE("test parse item num_t") {
  {
    std::string str{"1.4806532964699196e-22"};
    double p{};
    iguana::from_json(p, str.begin(), str.end());
    CHECK(p == 1.4806532964699196e-22);

    std::error_code ec;
    iguana::from_json(p, str.begin(), str.end(), ec);
    CHECK(p == 1.4806532964699196e-22);
    CHECK(!ec);
  }
  {
    std::string str{""};
    double p{};

    CHECK_THROWS(iguana::from_json(p, str.begin(), str.end()));
    std::error_code ec;
    iguana::from_json(p, str.begin(), str.end(), ec);
    CHECK(ec);
  }
  {
    std::string str{"1"};
    int p{};
    iguana::from_json(p, str.begin(), str.end());
    CHECK(p == 1);
  }
  {
    std::string str{"3000000"};
    long long p{};
    iguana::from_json(p, str.begin(), str.end());
    CHECK(p == 3000000);

    iguana::from_json(p, str.data(), str.size());
    CHECK(p == 3000000);

    std::error_code ec;
    iguana::from_json(p, str.data(), str.size(), ec);
    CHECK(!ec);
    CHECK(p == 3000000);
  }
  {
    std::string str;
    str.append(300, '1');
    int p{};
    CHECK_THROWS(iguana::from_json(p, str.begin(), str.end()));
  }
  {
    std::list<char> arr{'[', '0', '.', '9', ']'};
    std::vector<double> test;
    iguana::from_json(test, arr);
    CHECK(test[0] == 0.9);

    std::error_code ec;
    iguana::from_json(test, arr, ec);
    CHECK(!ec);
    CHECK(test[0] == 0.9);

    std::deque<char> arr1{'[', '0', '.', '9',


    populate_international(forecast_list)
    generate_locationkeys(forecast_list)
    for key in forecast_list.keys():
        if (
            not matches_country_code(forecast_list, key)
            or get_region(forecast_list, key) == ""
        ):
            shortcount += 1
        if key in cache and cache[key] == get_all(forecast_list, key):
            cached += 1
        else:
            q.put([forecast_list, key])
    q.join()
    status = 2
    parse_data(forecast_list)
    cities += citycount
    status = 3
    data = generate_data(forecast_list, bins)
    status = 4
    make_bins(forecast_list, data)
    lists += 1

time.sleep(REFRESH_RATE)
close_threads()
dump_db()

if config["production"]:
    purge_cache()

    if config["send_stats"]:
        # log stuff to Datadog
        statsd.increment("forecast.api_requests", apirequests)
        statsd.increment("forecast.retry_count", retrycount)
        statsd.increment("forecast.elapsed_time", elapsed_time)
        statsd.increment("forecast.bandwidth_usage", bandwidth)
        statsd.increment("forecast.cities", cities)
        statsd.increment("forecast.errors", errors)
    if config["send_webhooks"]:
        # this will use a webhook to log that the script has been ran.
        data = {
            "username": "Forecast Bot",
            "content": "Weather Data has been updated!",
            "avatar_url": "https://rc24.xyz/images/logo-small.png",
            "attachments": [
                {
                    "fallback": "Weather Data Update",
                    "color": "#0381D7",
                    "author_name": "RiiConnect24 Forecast Script",
                    "author_icon": "https://rc24.xyz/images/webhooks/forecast/profile.png",
                    "text": "Weather Data has been updated!",
                    "title": "Update!",
                    "fields": [
                        {
                            "title": "Script",
                            "value": "Forecast Channel",
                            "short": "false",
                        }
                    ],
                    "thumb_url": "https://rc24.xyz/images/webhooks/forecast/accuweather.png",
                    "footer": "RiiConnect24 Script",
                    "footer_icon": "https://rc24.xyz/images/logo-small.png",
                    "ts": int(calendar.timegm(datetime.utcnow().timetuple())),
                }
            ],
        }
        for url in config["webhook_urls"]:
            post_webhook = requests.post(url, json=data, allow_redirects=True)

print("Completed Successfully")


pub struct _PA1_OVER;
#[doc = "`read()` method returns [pa1_over::R](pa1_over::R) reader structure"]
impl crate::Readable for PA1_OVER {}
#[doc = "`write(|w| ..)` method takes [pa1_over::W](pa1_over::W) writer structure"]
impl crate::Writable for PA1_OVER {}
#[doc = "This is the overide configuration register for each pad."]
pub mod pa1_over;
#[doc = "This is the overide configuration register for each pad.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pa2_over](pa2_over) module"]
pub type PA2_OVER = crate::Reg<u32, _PA2_OVER>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _PA2_OVER;
#[doc = "`read()` method returns [pa2_over::R](pa2_over::R) reader structure"]
impl crate::Readable for PA2_OVER {}
#[doc = "`write(|w| ..)` method takes [pa2_over::W](pa2_over::W) writer structure"]
impl crate::Writable for PA2_OVER {}
#[doc = "This is the overide configuration register for each pad."]
pub mod pa2_over;
#[doc = "This is the overide configuration register for each pad.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pa3_over](pa3_over) module"]
pub type PA3_OVER = crate::Reg<u32, _PA3_OVER>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _PA3_OVER;
#[doc = "`read()` method returns [pa3_over::R](pa3_over::R) reader structure"]
impl crate::Readable for PA3_OVER {}
#[doc = "`write(|w| ..)` method takes [pa3_over::W](pa3_over::W) writer structure"]
impl crate::Writable for PA3_OVER {}
#[doc = "This is the overide configuration register for each pad."]
pub mod pa3_over;
#[doc = "This is the overide configuration register for each pad.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pa4_over](pa4_over) module"]
pub type PA4_OVER = crate::Reg<u32, _PA4_OVER>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _PA4_OVER;
#[doc = "`read()` method returns [pa4_over::R](pa4_over::R) reader structure"]
impl crate::Readable for PA4_OVER {}
#[doc = "`write(|w| ..)` method takes [pa4_over::W](pa4_over::W) writer structure"]
impl crate::Writable for PA4_OVER {}
#[doc = "This


 Interceptor.Chain): Response {
        var request = chain.request()
        if (NetworkUtil.isNetworkAvailable(context)) {
            val response = chain.proceed(request)
            // read from cache for 60 s
            val maxAge = 60
            return response.newBuilder()
                    .removeHeader("Pragma")
                    .removeHeader("Cache-Control")
                    .header("Cache-Control", "public, max-age=$maxAge")
                    .build()
        } else {
            //读取缓存信息
            request = request.newBuilder()
                    .cacheControl(CacheControl.FORCE_CACHE)
                    .build()
            val response = chain.proceed(request)
            //set cache times is 3 days
            val maxStale = 60 * 60 * 24 * 3
            return response.newBuilder()
                    .removeHeader("Pragma")
                    .removeHeader("Cache-Control")
                    .header("Cache-Control", "public, only-if-cached, max-stale=$maxStale")
                    .build()
        }
    }
}
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.

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.
==============================================================================
*/

package lyi.linyi.lite.examples.posemon.tracker

import android.graphics.RectF
import androidx.test.ext.junit.runners.AndroidJUnit4
import junit.framework.TestCase.assertEquals
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.tensorflow.posemon.data.Person
import org.tensorflow.posemon.tracker.BoundingBoxTracker
import org.tensorflow.posemon.tracker.Track
import org.tensorflow.posemon.tracker.TrackerConfig

@RunWith(AndroidJUnit4::class)
class BoundingBoxTrackerTest {
    companion object {
        private const val MAX_TRACKS = 4
        private const val MAX_AGE = 1000 // Unit: milliseconds.
        private const val MIN_SIMILARITY = 0.5f
    }

    private lateinit var boundingBoxTracker: BoundingBoxTracker

    @Before
    fun setup() {
        val trackerConfig = TrackerConfig(MAX_TRACKS, MAX_AGE, MIN_SIMILARITY)
        boundingBoxTracker = BoundingBoxTracker(trackerConfig)
    }

    @Test
    fun testIoU() {
        val persons = Person(
            -1, listOf(), RectF(
                0f,
                0f,
                2f / 3,
                1f
            ), 1f
        )

        val track =
            Track(
                Person(
                    -1,
                    listOf(),
                    RectF(
                        1 / 3f,
                        0.0f,
                        1f,
                        1f,
                    ), 1f
                ), 1000000
            )
        val computedIoU = boundingBoxTracker.iou(persons, track.person)
        assertEquals("Wrong IoU value.", 1f / 3, computedIoU, 0.000001f)
    }

    @Test
    fun testIoUFullOverlap() {
        val persons = Person(
            -1, listOf(),
            RectF(
                0f,
                0f,
                1f,
                1f
            ), 1f
        )

        val track =
            Track(
                Person(
                    -1,
                    listOf(),
                    RectF(
                        0f,
                        0f,
                        1f,
                        1f,
                    ), 1f
                ), 1000000
            )
        val compute


p_vicap_config_desc), layout)
    s = uctypes.struct(uctypes.addressof(buf), video_def.vb_mgmt_dump_vicap_config_desc, layout)
    video_def.vb_mgmt_dump_vicap_config_parse(s, kwargs)
    return s

def vb_mgmt_vicap_image(**kwargs):
    layout = uctypes.NATIVE
    buf = bytearray(uctypes.sizeof(video_def.vb_mgmt_vicap_image_desc), layout)
    s = uctypes.struct(uctypes.addressof(buf), video_def.vb_mgmt_vicap_image_desc, layout)
    video_def.vb_mgmt_vicap_image_parse(s, kwargs)
    return s

def is_vb_mgmt_vicap_image(obj):
    if isinstance(obj, uctypes.struct):
        return uctypes.sizeof(video_def.vb_mgmt_vicap_image_desc) == uctypes.sizeof(obj)
    return False


*************************
 * DesktopLink Server Routines
 ********************************************************************/
#pragma mark *Function Prototypes*

#ifdef __cplusplus
extern "C" {
#endif

//
// SERVER API
//

// * RETURNED:	0 if session ended successfully; otherwise: dlkErrParam,
// *				dlkErrNoSession, dlkErrLostConnection, dlkErrMemory,
//	*				dlkErrUserCan
extern Err	DlkStartServer(DlkServerParamPtr paramP)
							SYS_TRAP(sysTrapDlkStartServer);

extern Err	DlkGetSyncInfo(ULongPtr succSyncDateP, ULongPtr lastSyncDateP,
			DlkSyncStateType* syncStateP, CharPtr nameBufP,
			CharPtr logBufP, ULongPtr logLenP)
							SYS_TRAP(sysTrapDlkGetSyncInfo);

// DOLATER... this is a temporary function for debugging modem manager.
// remove it when done.
extern void	DlkSetLogEntry(CharPtr textP, Int textLen, Boolean append)
							SYS_TRAP(sysTrapDlkSetLogEntry);

// Dispatch a DesktopLink request (exposed for patching)
extern Err DlkDispatchRequest(DlkServerSessionPtr sessP)
							SYS_TRAP(sysTrapDlkDispatchRequest);

extern Err DlkControl(DlkCtlEnum op, VoidPtr param1P, VoidPtr param2P)
				SYS_TRAP(sysTrapDlkControl);

#ifdef __cplusplus
}
#endif

/********************************************************************
 * DLK Macros
 ********************************************************************/

#endif	// __DL_SERVER_H__


# coding: utf-8

import os
import torch
import re

from utils.datautils import check_dir
from model.bert import Bert, BertCRF, BertBiLSTMCRF
from model.bilstm import BiLSTM, BiLSTMCRF
from pytorch_transformers.modeling_bert import BertConfig
from pytorch_transformers.tokenization_bert import BertTokenizer
from dataset.embedding import build_word_embed

def load_pretrain(configs, model_class, fine_tune_dir, processor, eval = False):
	"""
	configs: 配置文件
	model_class: 模型名称
	fine_tune_dir: 微调模型保存路径
	processor: DataProcessor
	eval: 是否验证
	"""

	model_class_map = {
			'Bert': Bert,
			'BertCRF': BertCRF,
			'BertBiLSTMCRF': BertBiLSTMCRF,
			'BiLSTM': BiLSTM,
			'BiLSTMCRF': BiLSTMCRF
		}
	model_class_ = model_class_map[model_class]
	label_list = processor.get_labels()

	check_dir(fine_tune_dir)
	if eval:
		model_pretrained_path = fine_tune_dir
	else:
		model_pretrained_path = configs['pretrained_model_dir']
	tokenizer = BertTokenizer.from_pretrained(model_pretrained_path, do_lower_case = configs['lower_case'])

	if model_class in ['Bert', 'BertCRF', 'BertBiLSTMCRF']:
		bert_config = BertConfig.from_pretrained(model_pretrained_path,
											num_labels = len(label_list),
											finetuning_task="ner")
		model = model_class_.from_pretrained(model_pretrained_path, config = bert_config, model_configs = configs)

	elif model_class in ['BiLSTM', 'BiLSTMCRF']:
		configs['num_labels'] = len(label_list)
		if configs['use_pretrained_embedding']:
			pretrained_word_embed = build_word_embed(tokenizer,
				pretrain_embed_file = configs['pretrain_embed_file'],
				pretrain_embed_pkl =  configs['pretrain_embed_pkl'])
			configs['word_vocab_size'] = pretrained_word_embed.shape[0]
			configs['word_embedding_dim'] = pretrained_word_embed.shape[1]
		else:
			pretrained_word_embed = None
		if eval:
			model_pretrained_path = fine_tune_dir
			model = model_class_.from_pretrained(model_pretrained_path, pretrained_word_embed)
		else:
			model = model_class_(configs, pretrained_word_embed)
	else:
		raise ValueError("Invalid Model Class")
	return model, tokenizer


(KeyboardFocus.Canvas != canvas)
        {
            return false;
        }

        if (!KeyboardFocus.IsVisibleInTree)
        {
            return false;
        }

        var iKey = (int) key;
        if (down)
        {
            if (!KeyData.KeyState[iKey])
            {
                KeyData.KeyState[iKey] = true;
                KeyData.NextRepeat[iKey] = Platform.Neutral.GetTimeInSeconds() + KeyRepeatDelay;
                KeyData.Target = KeyboardFocus;

                return KeyboardFocus.InputKeyPressed(key);
            }
        }
        else
        {
            if (KeyData.KeyState[iKey])
            {
                KeyData.KeyState[iKey] = false;

                // BUG BUG. This causes shift left arrow in textboxes
                // to not work. What is disabling it here breaking?
                //m_KeyData.Target = NULL;

                return KeyboardFocus.InputKeyPressed(key, false);
            }
        }

        return false;
    }

    private static void UpdateHoveredControl(Canvas canvas)
    {
        Base? componentAtPosition = canvas.GetComponentAt(MousePosition.X, MousePosition.Y);

        UpdateMouseFocus(canvas, componentAtPosition, passing: false);
    }

    public static void PassMouseFocusTo(Canvas canvas, Base? nextHoveredControl)
    {
        MouseFocus = nextHoveredControl;
        UpdateMouseFocus(canvas, nextHoveredControl, passing: true);
    }

    private static void UpdateMouseFocus(Canvas canvas, Base? nextNode, bool passing)
    {


ext.Context, parsedEvents []interface{}) error {
	b := &backoff.Backoff{
		Factor: 2,
		Jitter: true,
		Min:    3 * time.Millisecond,
		Max:    2 * time.Second,
	}
	timeout := time.Duration(0)

	for {
		select {
		case <-ctx.Done():
			return fmt.Errorf("context canceled while storing events: %w", ctx.Err())
		case <-time.After(timeout):
			err := c.consumerDB.StoreEvents(ctx, parsedEvents)
			if err != nil {
				logger.Errorf("Error storing events: %v", err)
				timeout = b.Duration()
				continue
			}
			return nil
		}
	}
}

const maxAttempt = 20

type retryableFunc func(ctx context.Context) error

// retryWithBackoff will retry to get data with a backoff.
func (c *ChainBackfiller) retryWithBackoff(ctx context.Context, doFunc retryableFunc) error {
	b := &backoff.Backoff{
		Factor: 2,
		Jitter: true,
		Min:    1 * time.Second,
		Max:    3 * time.Second,
	}

	timeout := time.Duration(0)
	attempts := 0
	for attempts < maxAttempt {
		select {
		case <-ctx.Done():
			return fmt.Errorf("%w while retrying", ctx.Err())
		case <-time.After(timeout):
			err := doFunc(ctx)
			if err != nil {
				timeout = b.Duration()
				attempts++
			} else {
				return nil
			}
		}
	}
	return fmt.Errorf("max attempts reached while retrying")
}
package testutil

import (
	"context"
	"fmt"
	"github.com/synapsecns/sanguine/core/metrics"
	"net/http"
	"testing"
	"time"

	"github.com/Flaque/filet"
	"github.com/phayes/freeport"
	"github.com/stretchr/testify/assert"
	"github.com/synapsecns/sanguine/ethergo/backends"
	"github.com/synapsecns/sanguine/ethergo/backends/geth"
	"github.com/synapsecns/sanguine/services/explorer/consumer/client"
	"github.com/synapsecns/sanguine/services/explorer/db"
	"github.com/synapsecns/sanguine/services/explorer/db/sql"
	gqlServer "github.com/synapsecns/sanguine/services/explorer/graphql/server"
	"github.com/synapsecns/sanguine/services/explorer/testutil/clickhouse"
	"github.com/synapsecns/sanguine/services/scribe/api"
	scribedb "github.com/synapsecns/sanguine/services/scribe/db"
	"github.com/synapsecns/sanguine/services/scribe/db/datastore/sql/sqlite"
	"github.com/synapsecns/sanguine/services/scribe/graphql/server"
	"go.uber.org/atomic"
	"k8s.io/apimachinery/pkg/util/wait"
)

// NewTestEnvDB sets up the test env with a database.
func NewTestEnvDB(ctx context.Context, t *testing.T, handler metrics.Handler) (db db.ConsumerDB, eventDB scribedb.EventDB, gqlClient *client.Client, logIndex atomic.Int64, cleanup func(), testBackend backends.SimulatedTestBackend, deployManager *DeployManager) {
	t.Helper()
	dbPath := filet.TmpDir(t, "")

	sqliteStore, err := sqlite.NewSqliteStore(ctx, dbPath, handler, false)
	assert.Nil(t, err)

	eventDB = sqliteStore

	logIndex.Store(0)

	freePort := freeport.GetPort()

	go func() {
		assert.Nil(t, api.Start(ctx, api.Config{
			Port:     uint16(freePort),
			Database: "sqlite",


память только один раз.
 Удаленный серверный сканер ( <tt>clamd-stream-client</tt> )
 Эту опцию можно выбрать, если <tt>сервер</tt> антивирусного сканирования <tt>clamd</tt> работает в удаленной системе и настроен на прием сетевых подключений от других хостов. Это полезно для переноса задачи сканирования в другую систему, отличную от той, которая принимает электронную почту.
 Другая программа
 Эта опция позволяет вам указать Virtualmin использовать совершенно другую программу, например, собственный скрипт-обертку для ClamAV.
 Имя базы данных по умолчанию  Virtualmin позволяет очень гибкое создание базы данных и разрешений. В этом поле можно указать имя по умолчанию для баз данных, созданных как часть доменов, созданных из этого шаблона. По умолчанию Virtualmin использует переменную ${PREFIX}, которая является первой частью имени домена и, как правило, также будет именем входа владельца домена для Webmin. Может быть полезно изменить это, в некоторых случаях включить префикс, который указывает шаблон, из которого он был сгенерирован, или включить дополнительную информацию о базе данных. Можно комбинировать переменные и любые символы, которые разрешены в базе данных PostgreSQL и / или MySQL (в зависимости от того, какие базы данных доступны).
<include subs>Die folgenden Substitutionen können hier verwendet werden. Sie werden bei Verwendung der Vorlage durch die tatsächlichen Werte aus der Domäne ersetzt:

 <tt>${DOM}</tt> 	  Der Domainname, z. B. <tt>foo.com</tt>

 <tt>${IP}</tt> 	  Die IP-Adresse des virtuellen Servers, wie <tt>1.2.3.4</tt>

 <tt>${DNS_IP}</tt> 	  Die externe IP-Adresse des virtuellen Servers, die in DNS-Einträgen verwendet wird

 <tt>${USER}</tt> 	  Das Administrations-Login des Servers, z. B. <tt>foo</tt>

 <tt>${GROUP}</tt> 	  Die Unix-Gruppe für diesen virtuellen Server.

 <tt>${UID} and ${GID}</tt> 	  Die Unix-Benutzer-ID und die Gruppen-ID des Servers

 <tt>${HOME}</tt> 	  Das Home-Verzeichnis des Servers, wie <tt>/home/foo</tt>

 <tt><


from odoo.tests.common import HttpCase, tagged

@tagged('post_install_l10n', 'post_install', '-at_install')
class TestUi(HttpCase):
    def setUp(self):
        super(TestUi, self).setUp()
        self.env['product.product'].create({
            'name': 'Storage Box',
            'standard_price': 70.0,
            'list_price': 79.0,
            'website_published': True,
        })
        # set current company's fiscal country to italy
        company = self.env['website'].get_current_website().company_id
        company.account_fiscal_country_id = company.country_id = self.env.ref('base.it')

    def test_checkout_address(self):
        self.start_tour("/", 'shop_checkout_address')

    def test_public_user_codice_fiscale(self):
        self.start_tour('/shop', 'shop_checkout_address_create_partner')
        new_partner = self.env['res.partner'].search([('name', '=', 'abc')])
        self.assertEqual(
            new_partner.l10n_it_codice_fiscale,
            '12345670017',
            "The new partner should have the Codice Fiscale filled according to the VAT",
        )


j j h n f.f.g.f.g.o.b.o.b.4.b.o.b.o.b.4.o.o.b.b.4.o.M ) g.b.b.h.b.b.g.g.b.f.f.f.a.a.a.2 a.8 x ) [           ] o + + 1 1 < g 5 5 q x 1 g g g f g a g d 5 NX            kXo o + 9 & & NX            V.o X # # @ ; d ; & & $ O O X X & O & : : NX            NX. X O O & & V..           NXo X O & @ & 0 d a a ; a ; a @ a ; a ; ; V.X           ] X X O O # ; @ ; f s q a d % : f ; f ; : V.&           %XO O + @ = ; f f f , s > > : f f > > : > ] %           & & % % & % & % & % & % % & % % & % & % & % .           & ^ & ; > h o.o.5.5.5.n.5.5.5.5.5.5.t.Z.Z.D.",
        "gXhX<XR [ [ x [ 3 g NXVX] % d 4 5 R d ,XgXgXgXgXgXgXgXgXhXhXgXhXgXgXgXgX,X<XhXhXhXhX<X<X#X/.#X=X/.-X).<X<X<X<X(.(.<X<X<X<X<X<X<X,X,X<X>X*X>X>X:X;X;X;X;X=X<X-X<X<X<X<X<X=X<X<X=X<X=X=X=X=X=X=X=X=X&XI.}.}.}.&X&XI.I.I.I./.&XI.I.I.I.I.I.I.I.P.I.Y.J.L.U.P.U.P.U.P.I.I.I.I.I././.^././.P.T././.T.T.T./././.I.^.I././.U.P.P./.P.P.P.U.P.P.P.P.L.L.J.L.U.L.Q.L.L.Q.Q.'.W.'.Q././.Q.L.Q.W.Q.W.Q.T.R.XXQ.Q.E.E.G G E.Q.G J J L N N S F S F J H H H R.H H E.H H ' K F K K ' K K K K E.K K K F K H K J A D S ( S ( D ( f ( ( ( S D f > > ( > > > > > : : : : = , > > k h h h | r | ..|  ..... ... . . ... .2.| | | | j p  .p p O.p O.p i i w i i w p w w w p p p p p p p p u v p p v p z v v m v z v v m v v b j o. . . .M O. .k .. . . .h  .j j |  .;.j v f.f.g.M b.o.5.o.b.o.b.b.4.4.b.b.4.4.4.o.) 4.o.b.b.b.b.b.b.g.b.g.m f.a.a.a.a.a.a.i z ) R         . ] o + # # 1 < w 2 g t a g g g g f d a f a g NX            e.o o # # @ 5 NX            ] X X O & & ; ; ; ; ; & O O O X O & & % % CX            ] o X + O & # NX.           ] o X + # & @ @ a @ : ;


unpckhpd	xmm30, xmm29, [rdx+1016]{1to2}	 # AVX512{F,VL} Disp8
	vunpckhpd	xmm30, xmm29, [rdx+1024]{1to2}	 # AVX512{F,VL}
	vunpckhpd	xmm30, xmm29, [rdx-1024]{1to2}	 # AVX512{F,VL} Disp8
	vunpckhpd	xmm30, xmm29, [rdx-1032]{1to2}	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, ymm28	 # AVX512{F,VL}
	vunpckhpd	ymm30{k7}, ymm29, ymm28	 # AVX512{F,VL}
	vunpckhpd	ymm30{k7}{z}, ymm29, ymm28	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, YMMWORD PTR [rcx]	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, YMMWORD PTR [rax+r14*8+0x1234]	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, [rcx]{1to4}	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, YMMWORD PTR [rdx+4064]	 # AVX512{F,VL} Disp8
	vunpckhpd	ymm30, ymm29, YMMWORD PTR [rdx+4096]	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, YMMWORD PTR [rdx-4096]	 # AVX512{F,VL} Disp8
	vunpckhpd	ymm30, ymm29, YMMWORD PTR [rdx-4128]	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, [rdx+1016]{1to4}	 # AVX512{F,VL} Disp8
	vunpckhpd	ymm30, ymm29, [rdx+1024]{1to4}	 # AVX512{F,VL}
	vunpckhpd	ymm30, ymm29, [rdx-1024]{1to4}	 # AVX512{F,VL} Disp8
	vunpckhpd	ymm30, ymm29, [rdx-1032]{1to4}	 # AVX512{F,VL}
	vunpckhps	xmm30, xmm29, xmm28	 # AVX512{F,VL}
	vunpckhps	xmm30{k7}, xmm29, xmm28	 # AVX512{F,VL}
	vunpckhps	xmm30{k7}{z}, xmm29, xmm28	 # AVX512{F,VL}
	vunpckhps	xmm30, xmm29, XMMWORD PTR [rcx]	 # AVX512{F,VL}
	vunpckhps	xmm30, xmm29, XMMWORD PTR [rax+r14*8+0x1234]	 # AVX512{F,VL}
	vunpckhps	xmm30, xmm29, [rcx]{1to4}	 # AVX512{F,VL}
	vunpckhps	xmm30, xmm29, XMMWORD PTR [rdx+2032]	 # AVX512{F,VL} Disp8
	vunpckhps	xmm30, xmm29, XMMWORD PTR [rdx+2048]	 # AVX512{F,VL}
	vunpckhps	xmm30, xmm29, XMMWORD PTR [rdx-2048]	 # AVX512{F,VL} Disp8
	vunp


) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tf


/* Copyright (C) 2018, Project Pluto

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

This program 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 General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */

// find_orb.h : main header file for the FIND_ORB application
//

#ifndef __AFXWIN_H__
   #error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"      // main symbols

/////////////////////////////////////////////////////////////////////////////
// CFind_orbApp:
// See find_orb.cpp for the implementation of this class
//

class CFind_orbApp : public CWinApp
{
public:
   CFind_orbApp();

// Overrides
   virtual BOOL InitInstance();

private:
// Implementation

   //{{AFX_MSG(CFind_orbApp)
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////


084.L      Trap #1 (GEMDOS interface calls)
//   $088.L      Trap #2 (Extended DOS calls)
//   $08C.L      Trap #3
//   $090.L      Trap #4
//   $094.L      Trap #5
//   $098.L      Trap #6
//   $09C.L      Trap #7
//   $0A0.L      Trap #8
//   $0A4.L      Trap #9
//   $0A8.L      Trap #10
//   $0AC.L      Trap #11
//   $0B0.L      Trap #12
//   $0B4.L      Trap #13 (BIOS interface calls)
//   $0B8.L      Trap #14 (XBIOS interface calls)
//   $0BC.L      Trap #15
//   $0C0-$0FF   Unassigned

// MFP hardware bound interrupt vectors

//   $100.L      Parallel port interrupt_0 (Centronics Busy)
//   $104.L      RS232 carrier detect (dcd) interrupt_1
//   $108.L      RS232 clear to send (cts) interrupt_2
//   $10C.L      Graphics blt done interrupt_3
//   $110.L      RS232 baud rate generator (Timer D)
//   $114.L      200 Hz system clock (Timer C)
//   $118.L      Keyboard/MIDI (6850) interrupt_4
//   $11C.L      Polled fdc/_hdc interrupt_5
//   $120.L      Horizontal blank counter (Timer C)
//   $124.L      RS232 transmit error interrupt
//   $128.L      RS232 transmit buffer empty interrupt
//   $12C.L      RS232 receive error interrupt
//   $130.L      RS232 receive buffer full interrupt
//   $134.L      User/application (Timer A)
//   $138.L      RS232 ring indicator interrupt_6
//   $13C.L      Polled monochrome detect interrupt_7
//   $140-$1FF   Unassigned

// Application interrupts

//   $200-$37F   Reserved for Other Equipment Manufacturers (OEMs)

// Processor state (Post mortem dump area)

//   $380.L      Proc_lives
//   $384.L      Proc_regs (saved D0)
//   $388.L      Proc_regs (saved D1)
//   $38C.L      Proc_regs (saved D2)
//   $390.L      Proc_regs (saved D3)
//   $394.L      Proc_regs (saved D4)
//   $398.L      Proc_regs (saved D5)
//   $39C.L      Proc_regs (saved D6)
//   $3A0.L      Proc_regs (saved D7)
//   $3A4.L      Proc_regs (saved A0)
//   $3A8.L      Proc_regs (saved A1)
//   $3AC.L      Proc_regs (saved A2)
//   $3B0.L      Proc_regs (saved A3)
//   $3B4.L      Proc_regs (saved A4)
//   $3B8.L      Proc_regs (saved A5)
//   $3BC.L      Proc_regs (saved A6)
//   $3C0.L      Proc_regs (saved A7_ssp)
//   $3C4.L      Proc_pc
//   $3C8.L      Proc_usp
//   $3CC.W      Proc_stk (total of 16 words)
//   $3CE.W      Proc_stk
//   $3D0.W      Proc_stk
//   $3D2.W      Proc_stk
//   $3D4.W      Proc_stk
//   $3D6.W      Proc_stk
//   $3D8.W      Proc_stk
//   $3DA.W      Proc_stk
//   $3DC.W      Proc_stk
//   $3DE.W      Proc_stk
//   $3E0.W      Proc_stk
//   $3