0.02" on the website UI interface.
    #          Add "mindrecord_dir='./MindRecord_COCO'" on the website UI interface.
    #          Add "data_path='/cache/data'" on the website UI interface.
    #          Add "ann_file='./annotations/instances_val2017.json'" on the website UI interface.
    #          Add "epoch_size=12" on the website UI interface.
    #          Set "ckpt_path='./ckpt_maskrcnn/mask_rcnn-12_7393.ckpt'" on default_config.yaml file.
    #          (optional)Add "checkpoint_url='s3://dir_to_your_pretrained/'" on the website UI interface.
    #          Add other parameters on the website UI interface.
    # (2) Prepare model code
    # (3) Upload or copy your pretrained model to S3 bucket if you want to finetune.
    # (4) Perform a or b. (suggested option a)
    #       a. First, run "train.py" like the following to create MindRecord dataset locally from coco2017.
    #             "python train.py --only_create_dataset=True --mindrecord_dir=$MINDRECORD_DIR --data_path=$DATA_PATH --ann_file=$ANNO_PATH"
    #          Second, zip MindRecord dataset to one zip file.
    #          Finally, Upload your zip dataset to S3 bucket.(you could also upload the origin mindrecord dataset, but it can be so slow.)
    #       b. Upload the original coco dataset to S3 bucket.
    #           (Data set conversion occurs during training process and costs a lot of time. it happens every time you train.)
    # (5) Set the code directory to "/path/maskrcnn" on the website UI interface.
    # (6) Set the startup file to "train.py" on the website UI interface.
    # (7) Set the "Dataset path" and "Output file path" and "Job log path" to your path on the website UI interface.
    # (8) Create your job.[MINDIR_PATH] [DATA_PATH] [ANN_FILE_PATH]
    #
    # Train 1p with Ascend[MINDIR_PATH] [DATA_PATH] [ANN_FILE_PATH]
    # (1) Perform a or b.
    #       a. Set "enable_modelarts=True" on default_config.yaml file.
    #          Set "need_modelarts_dataset_unzip=True" on default_config.yaml file.
    #          Set "modelarts_dataset_unzip_name='cocodataset'" on default_config.yaml file.
    #          Set "mindrecord_dir='./MindRecord_COCO'" on default_config.yaml file.
    #          Set "data_path='/cache/data'" on default_config.yaml file.
    #          Set "ann_file='./annotations/instances_val2017.json'" on default_config.yaml file.
    #          Set "epoch_size=12" on default_config.yaml file.
    #          Set "ckpt_path='./ckpt_maskrcnn/mask_rcnn-12_7393.ckpt'" on default_config.yaml file.
    #          (optional)Set "checkpoint_url='s3://dir_to_your_pretrained/'" on default_config.yaml file.
    #          Set other parameters on default_config.yaml file you need.
    #       b. Add "enable_modelarts=True" on the website UI interface.
    #          Add "need_modelarts_dataset_unzip=True" on the website UI interface.
    #          Add "modelarts_dataset_unzip_name='cocodataset'" on the website UI interface.
    #          Add "mindrecord_dir='./MindRecord_COCO'" on the website UI interface.
    #          Add "data_path='/cache/data'" on the website UI interface.
    #          Add "ann_file='./annotations/instances_val2017.json'" on the website UI interface.
    #          Add "epoch_size=12" on the website UI interface.
    #          Set "c


83\u591a\u7684\u961f\u5e2e\u52a9\u5de5\u4f5c\uff0c\u7814\u7a76\u63aa\u65bd\uff0c\u8fdb\u884c\u6307\u5bfc\u3002", "type": "paragraph"}, {"text": "\u6765\u6e90\uff1a1963\u5e742\u670810\u65e5\u300a\u4eba\u6c11\u65e5\u62a5\u300b", "type": "paragraph"}]}
  </script>

    [返回索引页面]

   监利县扩大棉田面积力争多产棉花

   日期：1963-2-10 作者：[待确定]

   本报武汉九日电：湖北监利县各人民公社生产队积极恢复和扩大植棉面积，争取今年棉花增产。目前，全县已落实到田的棉花种植面积，由去年实收的二十六万亩扩大到三十五万多亩，广大社员正积极进行播种前的各项准备工作。

   监利县是湖北省产棉地区之一，过去向国家出售的商品棉也较多。在最近几年严重自然灾害袭击的情况下，这里的棉田面积一度减少，产量下降。一九六二年进行全年分配决算时，不少生产队突出地感到虽然粮食收成较好，但因为棉花收成不好，农业总收入却没有增加，给集体生产和社员生活带来一定的困难。在这样的事实面前，干部和社员开始体会到发展棉花生产的重要意义。但是，当具体安排生产计划时，却又有不同的想法。有的生产队怕种多了忙不过来；有的生产队看到近两年棉花收成不好，怕今年又靠不住，不愿用好田种棉。

   根据以上思想情况，监利县各级党政领导机关发动群众讨论了增产棉花的重要意义，具体帮助各


mov     r0, #0x15
	bx      lr

branch_204aebc: @ 204aebc :thumb
	mov     r0, #0x1f
	bx      lr
@ 0x204aec0

.thumb
.globl Function_204aec0
Function_204aec0: @ 204aec0 :thumb
	push    {r4,lr}
	mov     r4, r0
	ldrb    r0, [r4, #0xf]
	cmp     r0, #0x6
	bne     branch_204aed0
	bl      PRNG
	pop     {r4,pc}

branch_204aed0: @ 204aed0 :thumb
	ldr     r0, [r4, #0x8]
	bl      Function_206bff0
	ldr     r1, [pc, #0xc] @ 0x204aee4, (=0xffff)
	str     r0, [r4, #0x8]
	blx     _u32_div_f
	lsl     r0, r0, #16
	lsr     r0, r0, #16
	pop     {r4,pc}
@ 0x204aee4

.word 0xffff @ 0x204aee4

.thumb
Function_204aee8: @ 204aee8 :thumb
	push    {r3-r7,lr}
	add     sp, #-0x20
	mov     r4, r0
	mov     r7, r1
	str     r2, [sp, #0x8]
	mov     r0, #0xe
	mov     r1, #0x4
	str     r3, [sp, #0xc]
	ldr     r5, [sp, #0x38]
	bl      Function_2023790
	mov     r6, r0
	mov     r0, #0x2
	mov     r1, #0x4
	bl      Function_2023790
	str     r0, [sp, #0x1c]
	mov     r0, r4
	bl      LoadPokedexDataAdress
	mov     r2, #0x67
	str     r0, [sp, #0x18]

	mov     r0, #0x1
	mov     r1, #PlMsg_Narc
	lsl     r2, r2, #2
	mov     r3, #0x4
	bl      LoadFromNARC_9
	str     r0, [sp, #0x10]
	mov     r0, #0x13
	mov     r1, #0xe
	mov     r2, #0x4
	bl      Function_200b368
	mov     r1, #0x0
	str     r1, [sp, #0x0]
	mov     r3, #0x1
	mov     r2, r7
	str     r0, [sp, #0x14]
	str     r3, [sp, #0x4]
	bl      Function_200b60c
	mov     r4, #0x0
branch_204af3e: @ 204af3e :thumb
	mov     r0, r4
	bl      Function_2078824
	mov     r7, r0
	ldr     r0, [sp, #0x18]
	mov     r1, r7
	bl      WasPkmnSeen
	cmp     r0, #0x0
	beq     branch_204af78
	ldr     r0, [sp, #0x10]
	mov     r1, r7
	mov     r2, r6
	bl      Function_200b1b8_CallMsgDecrypt
	ldr     r0, [sp, #0xc]
	mov     r2, r6
	str     r0, [sp, #0x0]
	mov     r0, #0x2
	str


Array<MappingPart>
    ) {
        if (builder == null) {
            return
        }

        if (parts.size > namespaceCount) {
            builder.error("Unexpected number of names present", FileCoords(lineNum))
            return
        }

        builder.field(lineNum.highPriority) {
            for (i in parts.indices) {
                with(parts[i].asField().ns(i))
            }
        }
    }

    private fun parseMethod(
        builder: ClassMappingBuilder?,
        namespaceCount: Int,
        lineNum: Int,
        parts: Array<MappingPart>,
        methodDesc: MethodDescriptor,
    ): MethodMappingBuilder? {
        if (builder == null) {
            return null
        }

        if (parts.size - 1 > namespaceCount) {
            builder.error("Unexpected number of names present", FileCoords(lineNum))
            return null
        }

        return builder.method(lineNum.highPriority) {
            desc = methodDesc
            // We default static to false, it will be set to true later if we see the static keyword
            meta = meta.copy(isStatic = Tristate.FALSE)

            with(parts[0].asMethod().ns(0))

            for (i in parts.indicesFrom(2)) {
                with(parts[i].asMethod().ns(i - 1))
            }
        }
    }

    private fun parseMethodMember(
        builder: MethodMappingBuilder?,
        namespaceCount: Int,
        lineNum: Int,
        parts: Array<MappingPart>
    ) {
        if (builder == null) {
            return
        }

        if (parts.size == 1 && parts[0].value == "static") {
            builder.meta = builder.meta.copy(isStatic = Tristate.TRUE)
            return
        }

        if (parts.size - 1 > namespaceCount) {
            builder.error("Unexpected number of names present", FileCoords(lineNum))
            return
        }

        if (parts.isEmpty()) {
            return
        }
        val index = parts[0].value.toIntOrNull()
        if (index == null) {
            builder.error("Method parameter index is not an integer", FileCoords(lineNum, parts[0]))
            return
        }

        builder.param(index.asParamIndex(), lineNum.highPriority) {
            for (i in parts.indicesFrom(1)) {
                with(parts[i].asParam().ns(i - 1))
            }
        }
    }

    private fun getNamespaces(line: String?): Array<String>? {
        if (line == null) {
            return null
        }

        val header = line.splitMappingLine()
        if (header.size < 3) {
            return null
        }

        if (header[0].value != "tsrg2") {
            return null
        }

        val namespaces = arrayOfNulls<String?>(header.size - 1)
        for (index in header.indicesFrom(1)) {
            namespaces[index - 1] = header[index].value
        }

        @Suppress("UNCHECKED_CAST")
        return namespaces as Array<String>
    }
}
/*
 * Minecraft Development for IntelliJ
 *
 * https://mcdev.io/
 *
 * Copyright (C) 2025 minecraft-dev
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, version 3.0 only.
 *
 * 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 Lesser General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package io.mcdev.obfex.formats


ar",
  [11865] = "Rancor Boots",
  [11866] = "Nagmara\'s Whipping Belt",
  [11867] = "Maddening Gauntlets",
  [11868] = "Choking Band",
  [11869] = "Sha\'ni\'s Ring",
  [11870] = "Oblivion Orb",
  [11871] = "Snarkshaw Spaulders",
  [11872] = "Eschewal Greaves",
  [11873] = "Ethereal Mist Cape",
  [11874] = "Clouddrift Mantle",
  [11875] = "Breezecloud Bracers",
  [11876] = "Plainstalker Tunic",
  [11882] = "Outrider Leggings",
  [11883] = "A Dingy Fanny Pack",
  [11884] = "Moonlit Amice",
  [11885] = "Shadowforge Torch",
  [11886] = "Urgent Message",
  [11887] = "Cenarion Circle Cache",
  [11888] = "Quintis\' Research Gloves",
  [11889] = "Bark Iron Pauldrons",
  [11902] = "Linken\'s Sword of Mastery",
  [11903] = "Cat Carrier (Corrupted Kitten)",
  [11904] = "Spirit of Aquementas",
  [11905] = "Linken\'s Boomerang",
  [11906] = "Beastsmasher",
  [11907] = "Beastslayer",
  [11908] = "Archaeologist\'s Quarry Boots",
  [11909] = "Excavator\'s Utility Belt",
  [11910] = "Bejeweled Legguards",
  [11911] = "Treetop Leggings",
  [11912] = "Package of Empty Ooze Containers",
  [11913] = "Clayridge Helm",
  [11914] = "Empty Cursed Ooze Jar",
  [11915] = "Shizzle\'s Drizzle Blocker",
  [11916] = "Shizzle\'s Muzzle",
  [11917] = "Shizzle\'s Nozzle Wiper",
  [11918] = "Grotslab Gloves",
  [11919] = "Cragplate Greaves",
  [11920] = "Wraith Scythe",
  [11921] = "Impervious Giant",
  [11922] = "Blood-etched Blade",
  [11923] = "The Hammer of Grace",
  [11924] = "Robes of the Royal Crown",
  [11925] = "Ghostshroud",
  [11926] = "Deathdealer Breastplate",
  [11927] = "Legplates of the Eternal Guardian",
  [11928] = "Thaurissan\'s Royal Scepter",
  [11929] = "Haunting Specter Leggings",
  [11930] = "The Emperor\'s New Cape",
  [11931] = "Dreadforge Retaliator",
  [11932] = "Guiding Stave of Wisdom",
  [11933] = "Imperial Jewel",
  [11934] = "Emperor\'s Seal",
  [11935] = "Magmus Stone",
  [11936] = "Relic Hunter Belt",
  [11937] = "Fat Sack of Coins",
  [11938] = "Sack of Gems",
  [11939] = "Shiny Bracelet",
  [11940] = "Sparkly Necklace",
  [11941] = "False Documents",
  [11942] = "Legal Documents",
  [11943] = "Deed to Thandol Span",
  [11944] = "Dark Iron Baby Booties",
  [11945] = "Dark Iron Ring",
  [11946] = "Fire Opal Necklace",
  [11947] = "Filled Cursed Ooze Jar",
  [1194


)
	if err != nil {
		setupLog.Error(err, "invalid "+kedautil.BoundServiceAccountTokenExpiryEnvVar)
		os.Exit(1)
	}

	globalHTTPTimeout := time.Duration(globalHTTPTimeoutMS) * time.Millisecond
	eventRecorder := mgr.GetEventRecorderFor("keda-operator")

	kubeClientset, err := kubernetes.NewForConfig(cfg)
	if err != nil {
		setupLog.Error(err, "Unable to create kube clientset")
		os.Exit(1)
	}
	objectNamespace, err := kedautil.GetClusterObjectNamespace()
	if err != nil {
		setupLog.Error(err, "Unable to get cluster object namespace")
		os.Exit(1)
	}
	// the namespaced kubeInformerFactory is used to restrict secret informer to only list/watch secrets in KEDA cluster object namespace,
	// refer to https://github.com/kedacore/keda/issues/3668
	kubeInformerFactory := kubeinformers.NewSharedInformerFactoryWithOptions(kubeClientset, 1*time.Hour, kubeinformers.WithNamespace(objectNamespace))
	secretInformer := kubeInformerFactory.Core().V1().Secrets()

	scaleClient, kubeVersion, err := k8s.InitScaleClient(mgr)
	if err != nil {
		setupLog.Error(err, "unable to init scale client")
		os.Exit(1)
	}

	authClientSet := &authentication.AuthClientSet{
		CoreV1Interface: kubeClientset.CoreV1(),
		SecretLister:    secretInformer.Lister(),
	}

	scaledHandler := scaling.NewScaleHandler(mgr.GetClient(), scaleClient, mgr.GetScheme(), globalHTTPTimeout, eventRecorder, authClientSet)
	eventEmitter := eventemitter.NewEventEmitter(mgr.GetClient(), eventRecorder, k8sClusterName, authClientSet)

	if err = (&kedacontrollers.ScaledObjectReconciler{
		Client:       mgr.GetClient(),
		Scheme:       mgr.GetScheme(),
		ScaleClient:  scaleClient,
		ScaleHandler: scaledHandler,
		EventEmitter: eventEmitter,
	}).SetupWithManager(mgr, controller.Options{
		MaxConcurrentReconciles: scaledObjectMaxReconciles,
	}); err != nil {
		setupLog.Error(err, "unable to create controller", "controller", "ScaledObject")
		os.Exit(1)
	}
	if err = (&kedacontrollers.ScaledJobReconciler{
		Client:            mgr.GetClient(),
		Scheme:            mgr.GetScheme(),
		GlobalHTTPTimeout: globalHTTPTimeout,
		EventEmitter:      eventEmitter,
		AuthClientSet:     authClientSet,
	}).SetupWithManager(mgr, controller.Options{
		MaxConcurrentReconciles: scaledJobMaxReconciles,
	}); err != nil {
		setupLog.Error(err, "unable to create controller", "controller", "ScaledJob")
		os.Exit(1)
	}
	if err = (&kedacontrollers.TriggerAuthenticationReconciler{
		Client:       mgr.GetClient(),
		EventHandler: eventEmitter,
	}).SetupWithManager(mgr); err != nil {
		setupLog.Error(err, "unable to create controller", "controller", "TriggerAuthentication")
		os.Exit(1)
	}
	if err = (&kedacontrollers.ClusterTriggerAuthenticationReconciler{
		Client:       mgr.GetClient(),
		EventHandler: eventEmitter,
	}).SetupWithManager(mgr); err != nil {
		setupLog.Error(err, "unable to


files_to_process = [
        {"pdf": "Ocak-2024.pdf", "ay": "ocak", "yil": 2024},
        {"pdf": "Subat-2024.pdf", "ay": "subat", "yil": 2024},
        {"pdf": "Mart-2024.pdf", "ay": "mart", "yil": 2024},
        {"pdf": "Nisan_2024.pdf", "ay": "nisan", "yil": 2024},
        {"pdf": "Mayis_2024.pdf", "ay": "mayis", "yil": 2024},
        {"pdf": "Haziran_2024.pdf", "ay": "haziran", "yil": 2024},
        {"pdf": "Temmuz_2024.pdf", "ay": "temmuz", "yil": 2024},
        {"pdf": "Agustos_2024.pdf", "ay": "agustos", "yil": 2024},
        {"pdf": "Eylul_2024.pdf", "ay": "eylul", "yil": 2024},
        {"pdf": "Ekim_2024.pdf", "ay": "ekim", "yil": 2024},
        {"pdf": "Kasim_2024.pdf", "ay": "kasim", "yil": 2024},
        {"pdf": "Aralik_2024.pdf", "ay": "aralik", "yil": 2024}
    ]

    # Her dosya için işlem yap
    for file_info in files_to_process:
        pdf_path = file_info["pdf"]

        # Dosyanın varlığını kontrol et
        if not os.path.exists(pdf_path):
            print(f"Dosya bulunamadı: {pdf_path}")
            continue

        # JSON dosya adını oluştur
        output_file = f"iller_{file_info['ay']}_{file_info['yil']}.json"

        try:
            # PDF'yi işle
            json_data = process_pdf(pdf_path, file_info["ay"], file_info["yil"])

            # JSON dosyasına kaydet
            with open(output_file, "w", encoding="utf-8") as file:
                json.dump(json_data, file, ensure_ascii=False, indent=4)

            print(f"{output_file} dosyası başarıyla kaydedildi!")

        except Exception as e:
            print(f"Hata oluştu ({pdf_path}): {str(e)}")

if __name__ == "__main__":
    main()


同义词替换
        4. 调整段落组织方式
        5. 保持专业性和逻辑性
        6. 差异化程度控制在30-40%

        改写要求：
        - 不能改变技术方案的核心内容
        - 保持专业术语的准确性
        - 确保改写后内容仍然符合投标要求
        - 避免产生歧义或错误理解
        """

        user_prompt = f"请对以下内容进行差异化改写：\n\n{original_content}"

        try:
            messages = [
                SystemMessage(content=system_prompt),
                HumanMessage(content=user_prompt)
            ]

            response = await self.llm.ainvoke(messages)

            return {
                "differentiated_content": response.content,
                "status": "success"
            }
        except Exception as e:
            logger.error(f"差异化处理失败: {e}")
            return {
                "differentiated_content": original_content,
                "status": "error",
                "error": str(e)
            }

    async def generate_iptv_outline(self, document_content: str) -> Dict[str, Any]:
        """生成IPTV领域的投标方案提纲 - 使用优化的prompt"""
        # 从配置管理器获取优化后的prompt
        system_prompt = config_manager.get_prompt("outline_generation_prompt", """
        请基于招标文档生成IPTV系统技术方案提纲。

        要求：
        1. 使用规范的数字编号格式（1. 1.1 1.1.1）
        2. 层次清晰，逻辑合理，深度不超过4级
        3. 全面覆盖招标文档中的技术需求点
        4. 避免通用性章节，突出项目特色
        5. 体现IPTV专业特色和技术创新
        6. 章节标题简洁明了，避免冗长表述

        输出格式示例：
        1. 项目概述
        1.1 项目背景
        1.2 建设目标
        1.3 建设依据
        2. 需求理解与分析
        2.1 功能需求分析
        2.2 性能需求分析
        2.3 安全需求分析
        3. 技术方案设计
        3.1 总体架构设计
        3.2 核心功能实现
        3.3 关键技术选型
        """)

        user_prompt = f"请基于以下招标文档生成IPTV技术方案提纲：\n\n{document_content}"

        try:
            messages = [
                SystemMessage(content=system_prompt),
                HumanMessage(content=user_prompt)
            ]

            # 使用新的LLM管理器生成（支持重试和格式验证）
            result = await self.llm_manager.generate_with_retry(messages)

            if result["status"] == "success":
                return {
                    "outline": result["content"],
                    "status": "success"
                }
            else:
                # 回退到直接调用
                response = await self.llm.ainvoke(messages)
                return {
                    "outline": response.content,
                    "status": "success"
                }
        except Exception as e:
            logger.error(f"IPTV提纲生成失败: {e}")
            return {
                "outline": "",
                "status": "error",
                "error": str(e)
            }

    async def generate_iptv_section_content(self, section_title: str, section_path: str,
                                          document_content: str) -> Dict[str, Any]:
        """生成IPTV领域的章节内容 - 使用优化的prompt"""
        # 从配置管理器获取优化后的prompt
        system_prompt = config_manager.get_prompt("iptv_expert_prompt", """
        你是一位资深的广电IPTV领域技术专家，具有15年以上的行业经验和丰富的投标方案编写经验。

        核心要求：
        1. 严格基于招标文档要求，紧扣具体需求点，避免泛泛而谈
        2. 使用行业专业术语，体现技术深度和专业水准
        3. 避免涉及具体技术栈名称（如Vue、Spring等），采用通用技术描述
        4. 避免输出售后、验收、质量保障等通用内容
        5. 内容要有针对性，体现对招标需求的深度理解
        6. 语言表达要简洁明了，逻辑清晰
        7. 字数控制在1000-1800字

        表达要求：
        - 使用"基于先进的前端框架"而非"基于Vue3.0"
        - 使用"采用微服务架构"而非"采用Spring Cloud"
        - 使用"分布式缓存技术"而非"Redis集群"
        - 重点描述技术方案的优势和创新点
        - 确保内容专业、准确、有说服力
        """)

        # 添加输出格式要求
        format_requirements = """
        输出格式要求（严格遵循）：
        - 严格输出纯文本格式，绝对不要使用markdown格式
        - 不要使用*号、#号、-号、```等任何markdown标记
        - 不要使用列表符号（如• - *）
        - 段落之间用空行分隔
        - 重点内容用数字编号或中文序号
        - 确保内容专业、准确、有深度
        """

        full_system_prompt = system_prompt + "\n\n" + format_requirements

        user_prompt = f"""
        请为以下章节生成专业的IPTV技术方案内容：

        章节标题：{section_title}
        章节路径：{section_path}

        招标文档完整内容：
        {document_content}

        请基于招标文档的具体要求，生成该章节的详细技术方案内容。
        要求：
        1. 内容专业详实，逻辑清晰
        2. 紧扣招标需求，体现技术实力
        3. 严格使用纯文本格式，不要任何markdown标记
        4. 确保内容阅读流畅，能够无缝融入完整投标方案
        """

        try:
            messages = [
                SystemMessage(content=full_system_prompt),
                HumanMessage(content=user_prompt)
            ]

            response = await self.llm.ainvoke(messages)

            return {
                "content": response.content,
                "status": "success"
            }
        except Exception as e:
            logger.error(f"IPTV章节内容生成失败: {e}")
            return {
                "content": "",
                "status": "err


// -----------
// This file was generated by riscv_ctg (https://gitlab.com/incoresemi/riscv-compliance/riscv_ctg)
// version   : 0.4.1
// timestamp : Tue Dec 15 15:36:11 2020 GMT
// usage     : riscv_ctg \
//                  -- cgf ('/scratch/git-repo/incoresemi/riscv-compliance/riscv_ctg/sample_cgfs/dataset.cgf', '/scratch/git-repo/incoresemi/riscv-compliance/riscv_ctg/sample_cgfs/rv32i.cgf') \
//                  -- xlen 32 \
// -----------
//
// -----------
// Copyright (c) 2020. RISC-V International. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the xori instruction of the RISC-V I extension for the xori covergroup.
//
#include "model_test.h"
#include "arch_test.h"
RVTEST_ISA("RV32I")

.section .text.init
.globl rvtest_entry_point
rvtest_entry_point:
RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1

RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",xori)

RVTEST_SIGBASE( x2,signature_x2_1)

inst_0:
// rs1 != rd, rs1==x24, rd==x10, imm_val == (-2**(12-1)), imm_val == -2048, rs1_val != imm_val, rs1_val > 0 and imm_val < 0
// opcode: xori ; op1:x24; dest:x10; op1val:0x33333334;  immval:-0x800
TEST_IMM_OP( xori, x10, x24, 0xcccccb34, 0x33333334, -0x800, x2, 0, x13)

inst_1:
// rs1 == rd, rs1==x18, rd==x18, imm_val == 0, rs1_val == 4, rs1_val==4 and imm_val==0
// opcode: xori ; op1:x18; dest:x18; op1val:0x4;  immval:0x0
TEST_IMM_OP( xori, x18, x18, 0x4, 0x4, 0x0, x2, 4, x13)

inst_2:
// rs1==x15, rd==x24, imm_val == (2**(12-1)-1), rs1_val < 0 and imm_val > 0, imm_val == 2047
// opcode: xori ; op1:x15; dest:x24; op1val:-0x4;  immval:0x7ff
TEST_IMM_OP( xori, x24, x15, 0xfffff803, -0x4, 0x7ff, x2, 8, x13)

inst_3:
// rs1==x11, rd==x20, imm_val == 1, rs1_val > 0 and imm_val > 0, rs1_val == 2
// opcode: xori ; op1:x11; dest:x20; op1val:0x2;  immval:0x1
TEST_IMM_OP( xori, x20, x11, 0x3, 0x2, 0x1, x2, 12, x13)

inst_4:
// rs1==x7, rd==x21, rs1_val == (-2**


DEDATE,VOLUME,NUMTRADES&limit=20&from=2023-08-28">https://iss.moex.com/iss/history/engines/stock/markets/bonds/boards/TQCB/securities/RU000A103JR3.json?iss.meta=off&iss.only=history&history.columns=SECID,TRADEDATE,VOLUME,NUMTRADES&limit=20&from=2023-08-28.

Поиск оборота. Во всех 11 днях оборот по бумаге RU000A103JR3 был больше, чем 1500 шт каждый день.

Поиск оборота. Итоговый оборот в бумагах (объем сделок, шт) за 11 дней: 55545 шт нарастающим итогом.

Поиск выплат. Купоны для RU000A103JR3 выплачиваются в 2,5,8,11 месяцы.

Результат № 19: ["Джи-групп 002P-01","RU000A103JR3",101.12,55545,12.23,2.96,"–––-фев-–––-–––-май-–––-–––-авг-–––-–––-ноя-–––"].

Строка 1255 из 2245: Маныч-Агро 02 (RU000A103K20): цена=96.76%, доходность=14.23%, дюрация=22.13 мес.

Строка 1256 из 2245: Банк ГПБ ГПБ-Т2-04Д (RU000A103K38): цена=99%, доходность=0%, дюрация=0 мес.

Строка 1257 из 2245: ООО Мираторг Финанс 001Р-01 (RU000A103KA7): цена=97.5%, доходность=11.27%, дюрация=11 мес.

Поиск оборота. Ссылка: https://iss.moex.com/iss/history/engines/stock/markets/bonds/boards/TQCB/securities/RU000A103KA7.json?iss.meta=off&iss.only=history&history.columns=SECID,TRADEDATE,VOLUME,NUMTRADES&limit=20&from=2023-08-28.

Поиск оборота. На 1-й день (2023-08-28) из 11 оборот по бумаге RU000A103KA7 меньше чем 1500: 253 шт.

Поиск оборота. На 2-й день (2023-08-29) из 11 оборот по бумаге RU000A103KA7 меньше чем 1500: 1077 шт.

Поиск оборота. На 3-й день (2023-08-30) из 11 оборот по бумаге RU000A103KA7 меньше чем 1500: 1031 шт.

Поиск оборота. На 4-й день (2023-08-31) из 11 оборот по бумаге RU000A103KA7 меньше чем 1500: 322 шт.
<li


 (2014)
  $googleplus-sq:       "\e03a";
  $googleplus-r1:       "\e03b";
  $googleplus-r2:       "\e03c";
  $googleplus-r3:       "\e03d";
  $googleplus-cir:      "\e03e";
  $googleplus-icon:     "\e03f";

  $googleplus-c0:       $btn-shape-c0-default !default; // red bg
  $googleplus-c1:       $googleplus-icon; // white "g+"
  $googleplus-c2:       "\e00e"; // bottom shape shadow (optional)

// IMDB (2014)
  $imdb-sq:             "\e211";
  $imdb-r1:             "\e212";
  $imdb-r2:             "\e213";
  $imdb-r3:             "\e214";
  $imdb-cir:            "\e215";
  $imdb-icon:           "\e216";
  $imdb-icon-alt:       "\e217"; // reversed - ticket sized

  $imdb-c0:             $btn-shape-c0-default !default;
  $imdb-c1:             "\e21a"; // spotlight l rounded1
  $imdb-c3:             $imdb-icon; // black - add white text-shadow for glow
  $imdb-c3-alt:         $imdb-icon-alt;

  $imdb-c0-alt0:        $btn-shape-sq;
  $imdb-c0-alt1:        $btn-shape-r1; // gold rounded1 - don't override
  $imdb-c0-alt2:        $btn-shape-r2; // gold rounded2 - don't override
  $imdb-c0-alt3:        $btn-shape-r3; // gold rounded3 - don't override
  $imdb-c0-alt4:        $btn-shape-cir; // gold circle - don't override

  $imdb-c1-alt0:        "\e218"; // spotlight l sq
  $imdb-c1-alt1:        "\e21a"; // spotlight l rounded1
  $imdb-c1-alt2:        "\e21b"; // spotlight l rounded2
  $imdb-c1-alt3:        "\e21c"; // spotlight l rounded3
  $imdb-c1-alt4:        "\e21e"; // spotlight l circle

  $imdb-c2-alt0:        "\e219"; // spotlight r sq
  $imdb-c2-alt1:        $imdb-c2-alt0; // spotlight r r1
  $imdb-c2-alt2:        $imdb-c2-alt0; // spotlight r r2
  $imdb-c2-alt3:        "\e21d"; // spotlight r rounded3
  $imdb-c2-alt4:        "\e21f"; // spotlight r circle

// INSTAGRAM (2014 - official)
  $instagram-sq:        "\e221";
  $instagram-r1:        "\e222";
  $instagram-r2:        "\e223";
  $instagram-r3:        "\e224";
  $instagram-cir:       "\e225";
  $instagram-icon:      "\e226";

  $instagram-c0:        $btn-shape-c0-default !default;
  $instagram-c1:        "\e220"; // full camera bg
  $instagram-c1-alt:    "\e228"; // just the beige bottom
  $instagram-c2:        $instagram-icon; // tan outline
  $instagram-c3:        "\e227"; // brown top
  $instagram-c4:        "\e229"; // lens
  $instagram-c4-alt:    "\e250"; // lens & flash

  // color bars - need 2 extra spans
  $instagram-


t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#en


2_AddMoney::InDelayBeforeAnim' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, IsPlaySE) == 0x00000C, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::IsPlaySE' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, IsReflectGameData) == 0x00000D, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::IsReflectGameData' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, __WorldContext) == 0x000010, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::__WorldContext' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, CallFunc_GetGameInstance_ReturnValue) == 0x000018, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::CallFunc_GetGameInstance_ReturnValue' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, K2Node_DynamicCast_AsBPI_UIManager) == 0x000020, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::K2Node_DynamicCast_AsBPI_UIManager' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, K2Node_DynamicCast_bSuccess) == 0x000030, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::K2Node_DynamicCast_bSuccess' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, CallFunc_BPI_GetUIManager_UIManager) == 0x000038, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::CallFunc_BPI_GetUIManager_UIManager' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, K2Node_DynamicCast_AsBPI_UIManager_1) == 0x000040, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::K2Node_DynamicCast_AsBPI_UIManager_1' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, K2Node_DynamicCast_bSuccess_1) == 0x000050, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::K2Node_DynamicCast_bSuccess_1' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, CallFunc_BPI_GetMakkaWindowCtrl2_outActor) == 0x000058, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::CallFunc_BPI_GetMakkaWindowCtrl2_outActor' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, K2Node_DynamicCast_AsBPI_Makka_Window_Ctrl_2) == 0x000060, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::K2Node_DynamicCast_AsBPI_Makka_Window_Ctrl_2' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, K2Node_DynamicCast_bSuccess_2) == 0x000070, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::K2Node_DynamicCast_bSuccess_2' has a wrong offset!");
static_assert(offsetof(BPL_UIManager_C_MakkaWindow2_AddMoney, CallFunc_BPI_AddMoney_NotUse) == 0x000071, "Member 'BPL_UIManager_C_MakkaWindow2_AddMoney::CallFunc_BPI_AddMoney_NotUse' has a wrong offset!");

// Function BPL_UIManager.BPL_UIManager_C.MakkaWindow2_AddTotal
// 0x0078 (0x0078 - 0x0000)
struct BPL_UIManager_C_MakkaWindow2_AddTotal final
{
public:
	int32                                         InNumber;


T, R>(R)
    where
        T: Debug,
        R: Deref<Target = Node<T>>;

impl<T, R> Debug for WithParent<T, R>
    where
        T: Debug,
        R: Deref<Target = Node<T>>,
{
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        let node = self.0.deref();
        let parent = &node
            .parent
            .as_ref()
            .map(|parent| WithParent(parent.borrow()));

        f.debug_struct("Node")
            .field("value", &node.value)
            .field("parent", parent)
            .finish()
    }
}

struct WithChildren<T, R>(R)
    where
        T: Debug,
        R: Deref<Target = Node<T>>;

impl<T, R> Debug for WithChildren<T, R>
    where
        T: Debug,
        R: Deref<Target = Node<T>>,
{
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        let node = self.0.deref();

        f.debug_struct("Node")
            .field("value", &node.value)
            .field(
                "children",
                &node
                    .children
                    .iter()
                    .map(|child| WithChildren(child.borrow()))
                    .collect::<Vec<_>>(),
            )
            .finish()
    }
}<reponame>ldicocco/rsl10-pac
#[doc = "Reader of register SPI0_STATUS"]
pub type R = crate::R<u32, super::SPI0_STATUS>;
#[doc = "Writer for register SPI0_STATUS"]
pub type W = crate::W<u32, super::SPI0_STATUS>;
#[doc = "Register SPI0_STATUS `reset()`'s with value 0"]
impl crate::ResetValue for super::SPI0_STATUS {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Indicate that the transmission of the data is completed\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SPI0_TRANSMIT_STATUS_A {
    #[doc = "0: SPI data transmit flag not set"]
    SPI0_TRANSMIT_FALSE = 0,
    #[doc = "1: SPI transmit data sent"]
    SPI0_TRANSMIT_TRUE = 1,
}
impl From<SPI0_TRANSMIT_STATUS_A> for bool {
    #[inline(always)]
    fn from(variant: SPI0_TRANSMIT_STATUS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `SPI0_TRANSMIT_STATUS`"]
pub type SPI0_TRANSMIT_STATUS_R = crate::R<bool, SPI0_TRANSMIT_STATUS_A>;
impl SPI0_TRANSMIT_STATUS_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SPI0_TRANSMIT_STATUS_A {
        match self.bits {
            false => SPI0_TRANSMIT_STATUS_A::SPI0_TRANSMIT_FALSE,
            true => SPI0_TRANSMIT_STATUS_A::SPI0_TRANSMIT_TRUE,
        }
    }
    #[doc = "Checks if the value of the field is `SPI0_TRANSMIT_FALSE`"]
    #[inline(always)]
    pub fn is_spi0_transmit_false(&self) -> bool {
        *self == SPI0_TRANSMIT_STATUS_A::SPI0_TRANSMIT


tDocumentSyncCapability::Options(
            TextDocumentSyncOptions {
                open_close: Some(true),
                change: Some(TextDocumentSyncKind::INCREMENTAL),
                will_save: None,
                will_save_wait_until: None,
                // we don't need text here since we already processed in didchange
                save: Some(TextDocumentSyncSaveOptions::SaveOptions(SaveOptions {
                    include_text: Some(false),
                })),
            },
        )),
        completion_provider: Some(CompletionOptions {
            resolve_provider: None,
            trigger_characters: Some(vec![".".to_string()]),
            all_commit_characters: None,
            work_done_progress_options: WorkDoneProgressOptions {
                work_done_progress: None,
            },
        }),
        declaration_provider: Some(DeclarationCapability::Simple(true)),
        definition_provider: Some(OneOf::Left(true)),
        references_provider: Some(OneOf::Left(true)),
        rename_provider: None,
        document_symbol_provider: None,
        hover_provider: None,
        signature_help_provider: None,
        type_definition_provider: None,
        implementation_provider: None,
        document_highlight_provider: None,
        workspace_symbol_provider: None,
        code_action_provider: None,
        code_lens_provider: None,
        document_formatting_provider: Some(OneOf::Left(true)),
        document_range_formatting_provider: None,
        document_on_type_formatting_provider: None,
        selection_range_provider: None,
        folding_range_provider: None,
        linked_editing_range_provider: None,
        document_link_provider: None,
        color_provider: None,
        execute_command_provider: None,
        workspace: None,
        call_hierarchy_provider: None,
        semantic_tokens_provider: None,
        moniker_provider: None,
        experimental: None,
    };

    merge_capabilities(client_caps, server_caps)
}

fn merge_capabilities(
    _client_caps: ClientCapabilities,
    server_caps: ServerCapabilities,
) -> ServerCapabilities {
    server_caps
}
<reponame>wolflo/evmodin
use crate::{
    tracing::*,
    util::{mocked_host::*, *},
    *,
};
use bytes::Bytes;
use educe::Educe;
use ethereum_types::{Address, U256};
use std::{future::Future, pin::Pin, sync::Arc};

async fn exec(host: &mut MockedHost, revision: Revision, message: Message, code: Bytes) -> Output {
    // Add EIP-2929 tweak.
    if revision >= Revision::Berlin {
        host.access_account(message.sender).await.unwrap();
        host.access_account(message.destination).await.unwrap();
    }
    AnalyzedCode::analyze(code)
        .execute(host, &mut StdoutTracer::default(), message, revision)
        .await
}

#[derive(Clone, Copy, Debug)]
enum GasCheck {
    Used(i64),
    Left(i64),
}

#[allow(clippy::type_complexity)]
#[derive(Clone)]
enum ApplyHostFn {
    Sync(Arc<dyn Fn(&mut MockedHost, &Message) + 'static>),
    Async(
        Arc<
            dyn Fn(MockedHost, Message) -> Pin<Box<dyn Future<Output = (MockedHost, Message)>>>
                + 'static,
        >,
    ),
}

/// Tester that executes EVM bytecode with `MockedHost` context and runs set checks.
#[derive(Clone, Educe)]
#[educe(Debug)]
#[must_use]
pub struct EvmTester {
    host: MockedHost,
    #[educe(Debug(ignore))]
    apply_host_fns: Vec<ApplyHostFn>,
    #[educe(Debug(ignore))]
    inspect_output_fn: Arc<dyn Fn(&[u8]) + 'static>,
    #[educe(Debug(ignore))]
    inspect_host_fn: Arc<dyn Fn(&MockedHost, &Message) + 'static>,
    #[educe(Debug(ignore


local closeDungeonTimerView = function()
  Z.UIMgr:CloseView("dungeon_timer_window")
end
local openDungeonTimerView = function(ignoreChange)
  local dungeonTimerData = Z.DataMgr.Get("dungeon_timer_data")
  if dungeonTimerData.DungeonHideTag and dungeonTimerData.MainViewHideTag then
    local viewData = {ignoreChange = ignoreChange}
    Z.UIMgr:OpenView("dungeon_timer_window", viewData)
  elseif Z.UIMgr:IsActive("dungeon_timer_window") then
    Z.UIMgr:GetView("dungeon_timer_window"):Hide()
  end
end
local setMainViewHideTag = function(isVisible)
  local dungeonTimerData = Z.DataMgr.Get("dungeon_timer_data")
  dungeonTimerData:SetMainViewHideTag(isVisible)
  openDungeonTimerView(true)
end
local setDungeonHideTag = function(isVisib


x),
                     toScreenY(vp.y));
    } while(std::abs(angle1-ea1)<dA);

    vp.set(std::cos(ea2)*radius1,
           -std::sin(ea2)*radius2);
    vp.rotate(angleVector);
    vp.move(cp);
    pa<<QPoint(toScreenX(vp.x),
                 toScreenY(vp.y));
}

void RS_PainterOld::drawRect(const RS_Vector& p1, const RS_Vector& p2) {
    drawPolygon(QRect(int(p1.x+0.5), int(p1.y+0.5), int(p2.x - p1.x+0.5), int(p2.y - p1.y+0.5)));
    //    drawLine(RS_Vector(p1.x, p1.y), RS_Vector(p2.x, p1.y));
    //    drawLine(RS_Vector(p2.x, p1.y), RS_Vector(p2.x, p2.y));
    //    drawLine(RS_Vector(p2.x, p2.y), RS_Vector(p1.x, p2.y));
    //    drawLine(RS_Vector(p1.x, p2.y), RS_Vector(p1.x, p1.y));
}

void RS_PainterOld::drawHandle(const RS_Vector& p, const RS_Color& c, int size) {
    if (size<0) { // fixme - remove redundant check in painting
        size = 2;
    }
    int doubleSize = 2 * size;
    fillRect((int)(p.x - size), (int)(p.y - size), doubleSize, doubleSize, c);
}

int RS_PainterOld::toScreenX(double x) const {
    return RS_Math::round(offset.x + x);
}

int RS_PainterOld::toScreenY(double y) const{
    return RS_Math::round(offset.y + y);
}

/****************************************************************************
**
** This file is part of the LibreCAD project, a 2D CAD program
**
** Copyright (C) 2025 LibreCAD (librecad.org)
** Copyright (C) 2025 Dongxu Li github.com/dxli
**
**
** 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
**
** This copyright notice MUST APPEAR in all copies of the script!
**
**********************************************************************/
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
#include <QString>

#include "rs_debug.h"
#include "rs_math.h"
namespace {
constexpr double E


5mm; width: 4.5mm; border-right: 1px solid #000000; border-bottom: 1px solid #000000;} page[size="A4"] { width: 21cm; height: 29.7cm; display: block; margin: 0 auto; margin-bottom: 0.5cm; box-shadow: 0 0 0.5cm rgba(0,0,0,0.5); } @media print { body, page[size="A4"] { margin: 0; box-shadow: 0; -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; } } </style>
Gurdurr

⇦ Timburr

!

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

0


.strategyEvaluation.getStrategyToEvaluate(j, i);
            if (this.ruleEvaluation) {
                options.ruleEvaluation = this.ruleEvaluation;
            }
            // options.callingRuleEvaluation = this.callingRuleEvaluation;

            if (blacklist) {
                options.ruleBlacklist = blacklist;
            }

            playerMap[this.playerNames[i]] = new Player(options)
        }
        return playerMap;
    };
}import colors from '../colors'

export const generateColorFromSeed = (seed?: string) => {
  if (!seed) {
    return colors.trueBlue
  }

  const hash = seed
    .split('')
    .reduce((acc, letter) => letter.charCodeAt(0) + ((acc << 5) - acc), 0)

  const hashBase16 = (hash & 0x00ffffff).toString(16).toUpperCase()
  const rgbCode = '00000'.substring(0, 6 - hashBase16.length) + hashBase16

  return `#${rgbCode}`
}
// Learn TypeScript:
//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/typescript.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Label)
    label: cc.Label = null;

    @property
    text: string = 'hello';

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {

    }

    // update (dt) {}
}

/*

    着色器 Shader

    顶点着色器 （3D图形由一个个三角面片租成）
        计算每个三角面片上的顶点 ？？？

    片断着色器 （像素着色器）
        以片断为单位、计算光照、颜色的一系列算法

    简单来说：Shader 其实就是一段代码，这段代码的作用是告诉GPU具体怎样去绘制模型的每一个顶点的颜色以及最终每一个像素点的颜色

    Shader 是一段代码，主要用这三种语言来写
    1.GLSL
        OpenGl Shading Language
    其他不写，会1种就够了

    Unity 3种Shader
    1.Surface Shaders 表面着色器
    2.Vertex/Fragment Shaders 顶点/片断着色器
    3.不重要

    解析effect

    GLSL

    基本类型
    void	跟C语言的void类似，表示空类型。作为函数的返回类型，表示这个函数不返回值。
    bool	布尔类型，可以是true 和false，以及可以产生布尔型的表达式。
    int	整型 代表至少包含16位的有符号的整数。可以是十进制的，十六进制的，八进制的。
    float	浮点型
    bvec2	包含2个布尔成分的向量
    bvec3	包含3个布尔成分的向量
    bvec4	包含4个布尔成分的向量
    ivec2	包含2个整型成分的向量
    ivec3	包含3个整型成分的向量
    ivec4	包含4个整型成分的向量
    mat2 或者 mat2x2	2×2的浮点数矩阵类型
    mat3或者mat3x3	3×3的浮点数矩阵类型
    mat4x4	4×4的浮


',	'704300201',	'',	'1',	'1',	'1',	'1',	'2',	'2',	'1',	'2',	'1',	'',	'4004,4104',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'704300301',	'',	'5',	'运势',	'己方受到暴击伤害减少15%，队友受到致命攻击时可以消耗自身耐久，50%消耗的耐久转移给受击队友',	'704300301',	'',	'1',	'',	'704300301',	'',	'1',	'3',	'',	'',	'3',	'2',	'1',	'2',	'1',	'',	'',	'',	'',	'',	'',	'704300301',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'704300302',	'',	'5',	'运势',	'己方受到暴击伤害减少20%，队友受到致命攻击时可以消耗自身耐久，50%消耗的耐久转移给受击队友',	'704300301',	'',	'1',	'',	'704300301',	'',	'1',	'3',	'',	'',	'3',	'2',	'1',	'2',	'1',	'',	'',	'',	'',	'',	'',	'704300302',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'704300303',	'',	'5',	'运势',	'己方受到暴击伤害减少25%，队友受到致命攻击时可以消耗自身耐久，75%消耗的耐久转移给受击队友',	'704300301',	'',	'1',	'',	'704300301',	'',	'1',	'3',	'',	'',	'3',	'2',	'1',	'2',	'1',	'',	'',	'',	'',	'',	'',	'704300303',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'704300304',	'',	'5',	'运势',	'己方受到暴击伤害减少30%，队友受到致命攻击时可以消耗自身耐久，75%消耗的耐久转移给受击队友',	'704300301',	'',	'1',	'',	'704300301',	'',	'1',	'3',	'',	'',	'3',	'2',	'


return values are {@code null} or no suppliers are provided
     * then {@code null} is returned.
     *
     *

     * ObjectUtils.firstNonNullLazy(null, () -> null) = null
     * ObjectUtils.firstNonNullLazy(() -> null, () -> "") = ""
     * ObjectUtils.firstNonNullLazy(() -> "", () -> throw new IllegalStateException()) = ""
     * ObjectUtils.firstNonNullLazy(() -> null, () -> "zz) = "zz"
     * ObjectUtils.firstNonNullLazy() = null
     *

     *
     * @param <T> the type of the return values
     * @param suppliers  the suppliers returning the values to test.
     *                   {@code null} values are ignored.
     *                   Suppliers may return {@code null} or a value of type @{code T}
     * @return the first return value from {@code suppliers} which is not {@code null},
     *  or {@code null} if there are no non-null values
     * @since 3.10
     */
    @SafeVarargs
    public static <T> T getFirstNonNull(final Supplier<T>... suppliers) {
        return Streams.of(suppliers).map(s -> s != null ? s.get() : null).filter(Objects::nonNull).findFirst().orElse(null);
    }

    /**
     * Returns the given {@code object} is it is non-null, otherwise returns the Supplier's {@link Supplier#get()}
     * value.
     *
     *

     * The caller responsible for thread-safety and exception handling of default value supplier.
     *

     *
     *

     * ObjectUtils.getIfNull(null, () -> null)     = null
     * ObjectUtils.getIfNull(null, null)              = null
     * ObjectUtils.getIfNull(null, () -> "")       = ""
     * ObjectUtils.getIfNull(null, () -> "zz")     = "zz"
     * ObjectUtils.getIfNull("abc", *)                = "abc"
     * ObjectUtils.getIfNull(Boolean.TRUE, *)         = Boolean.TRUE
     *

     *
     * @param <T> the type of the object
     * @param object the {@link Object} to test, may be {@code null}
     * @param defaultSupplier the default value to return, may be {@code null}
     * @return {@code object} if it is not {@code null}, {@code defaultValueSupplier.get()} otherwise
     * @since 3.10
     */
    public static <T> T getIfNull(final T object, final Supplier<T> defaultSupplier) {
        return object != null ? object : Suppliers.get(defaultSupplier);
    }

    /**
     * Gets the hash code of an object returning zero when the
     * object is {@code null}.
     *
     *

     * ObjectUtils.hashCode(null)   = 0
     * ObjectUtils.hashCode(obj)    = obj.hashCode()
     *

     *
     * @param obj  the object to obtain the hash code of, may be {@code null}
     * @return the hash code of the object, or zero if null
     * @since 2.1
     * @deprecated this method has been replaced by {@code java.util.Objects.hashCode(Object)} in Java 7 and will be
     * removed in future releases
     */
    @Deprecated
    public static int hashCode(final Object obj) {
        // hashCode(Object) for performance vs. hashCodeMulti(Object[]), as hash code is often critical
        return Objects.hashCode(obj);
    }

    /**
     * Returns the hex hash code for the given object per {@link Objects#hashCode(Object)}.
     *

     * Short hand for {@code Integer.toHexString(Objects.hashCode(object))}.
     *

     *
     * @param object object for which the hashCode is to be calculated
     * @return Hash code in hexadecimal format.
     * @since 3.13.0
     */
    public static String hashCodeHex(final


// Capitalization reference: http://hcmup.edu.vn/index.php?option=com_content&view=article&id=4106%3Avit-hoa-trong-vn-bn-hanh-chinh&catid=2345%3Atham-kho&Itemid=4103&lang=vi&site=134

const eraValues = {
  narrow: ['TCN', 'SCN'] as const,
  abbreviated: ['trước CN', 'sau CN'] as const,
  wide: ['trước Công Nguyên', 'sau Công Nguyên'] as const,
}

const quarterValues = {
  narrow: ['1', '2', '3', '4'] as const,
  abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'] as const,
  wide: ['Quý 1', 'Quý 2', 'Quý 3', 'Quý 4'] as const,
}

const formattingQuarterValues = {
  narrow: ['1', '2', '3', '4'] as const,
  abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'] as const,
  // I notice many news outlet use this "quý II/2018"
  wide: ['quý I', 'quý II', 'quý III', 'quý IV'] as const,
}

// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
  narrow: [
    '1',
    '2',
    '3',
    '4',
    '5',
    '6',
    '7',
    '8',
    '9',
    '10',
    '11',
    '12',
  ] as const,
  abbreviated: [
    'Thg 1',
    'Thg 2',
    'Thg 3',
    'Thg 4',
    'Thg 5',
    'Thg 6',
    'Thg 7',
    'Thg 8',
    'Thg 9',
    'Thg 10',
    'Thg 11',
    'Thg 12',
  ] as const,
  wide: [
    'Tháng Một',
    'Tháng Hai',
    'Tháng Ba',
    'Tháng Tư',
    'Tháng Năm',
    'Tháng Sáu',
    'Tháng Bảy',
    'Tháng Tám',
    'Tháng Chín',
    'Tháng Mười',
    'Tháng Mười Một',
    'Tháng Mười Hai',
  ] as const,
}
// In Vietnamese date formatting, month number less than 10 expected to have leading zero
const formattingMonthValues = {
  narrow: [
    '01',
    '02',
    '03',
    '04',
    '05',
    '06',
    '07',
    '08',
    '09',
    '10',
    '11',
    '12',
  ] as const,
  abbreviated: [
    'thg 1',
    'thg 2',
    'thg 3',
    'thg 4',
    'thg 5',
    'thg 6',
    'thg 7',
    'thg 8',
    'thg 9',
    'thg 10',
    'thg 11',
    'thg 12',
  ] as const,
  wide: [
    'tháng 01',
    'tháng 02',
    'tháng 03',
    'tháng 04',
    'tháng 05',
    'tháng 06',
    'tháng 07',
    'tháng 08',
    'tháng 09',
    'tháng 10',
    'tháng 11',
    'tháng 12',


white-space: nowrap;
}
ul.jd_menu li li {
	width: 120px;
}
ul.jd_menu li a {
	color: #000000;
	font-weight: bold;
	text-decoration: none;
}

ul.jd_menu li.jdm_hover,
ul.jd_menu li.jdm_active {
	background-color: #404040;
	color: #FFFFFF;
	padding: 2px 5px 1px 5px;
	border: 2px solid #FC8100;
	margin: 0px 10px 0px 10px;
	/*border-left: 1px solid #9CF;
	border-top: 1px solid #9CF;*/
}

ul.jd_menu li li.jdm_hover,
ul.jd_menu li li.jdm_active {
	margin: 0px 0px 0px 0px;
	color: #FFFFFF;
}

ul.jd_menu li li.jdm_hover a { /* Itens ativos no sub-menu */
	color: #FFFFFF !important;
}

ul.jd_menu li.jdm_hover a { /* Itens ativos sem sub-menu */
	color: #FFFFFF;
}

ul.jd_menu li ul.jdm_events a { /* Itens nao ativos no sub-menu */
	color: #000000;
}
/*
 * FullCalendar v1.5.2 Stylesheet
 *
 * Copyright (c) 2011 Adam Shaw
 * Dual licensed under the MIT and GPL licenses, located in
 * MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
 *
 * Date: Sun Aug 21 22:06:09 2011 -0700
 *
 */

.fc {
	direction: ltr;
	text-align: left;
	}

.fc table {
	border-collapse: collapse;
	border-spacing: 0;
	}

html .fc,
.fc table {
	font-size: 1em;
	}

.fc td,
.fc th {
	padding: 0;
	vertical-align: top;
	}

/* Header
------------------------------------------------------------------------*/

.fc-header td {
	white-space: nowrap;
	}

.fc-header-left {
	width: 25%;
	text-align: left;
	}

.fc-header-center {
	text-align: center;
	}

.fc-header-right {
	width: 25%;
	text-align: right;
	}

.fc-header-title {
	display: inline-block;
	vertical-align: top;
	}

span.fc-header-title {
	height: 25px;
}

span.fc-header-title h2{
	font-size: 12px;
	margin: 0;
	line-height: 25px;
}

.fc .fc-header-space {
	padding-left: 10px;
	}

.fc-header .fc-button {
	margin-bottom: 1em;
	vertical-align: top;
	}

/* buttons edges butting together */

.fc-header .fc-button {
	margin-right: -1px;
	}

.fc-header .fc-corner-right {
	margin-right: 1px; /* back to normal */
	}

.fc-header .ui-corner-right {
	margin-right: 0; /* back to normal */
	}

/* button layering (for border precedence) */

.fc-header .fc-state-hover,
.fc-header .ui-state-hover {
	z-index: 2;
	}

.fc-header .fc-state-down {
	z-index: 3;
	}

.fc-header .fc-state-active,
.fc-header .ui-state-active {
	z-index: 4;
	}

/* Content
------------------------------------------------------------------------


 checkOutOfBoundsThrows(() => struct64.getField(4));
  checkOutOfBoundsThrows(() => struct64.getWord(25));
  // Reset field 1 to original value to use when testing with Struct
  // below.
  struct64.setField(1, -1);

  // Do a test using the platform specific word size.
  var memint;
  var expected;
  if (Foreign.machineWordSize == 4) {
    memint = fl.lookup('memuint32');
    expected = struct32;
  } else {
    assert(Foreign.machineWordSize == 8);
    memint = fl.lookup('memint64');
    expected = struct64;
  }
  foreignPointer = memint.pcall$0();
  var struct = new Struct.fromAddress(foreignPointer.address, 4);
  Expect.equals(struct.address, foreignPointer.address);
  Expect.equals(expected.getField(0), struct.getField(0));
  Expect.equals(expected.getWord(0 * expected.wordSize),
      struct.getWord(0 * struct.wordSize));
  Expect.equals(expected.getField(1), struct.getField(1));
  Expect.equals(expected.getWord(1 * expected.wordSize),
      struct.getWord(1 * struct.wordSize));
  Expect.equals(expected.getField(2), struct.getField(2));
  Expect.equals(expected.getWord(2 * expected.wordSize),
      struct.getWord(2 * struct.wordSize));
  Expect.equals(expected.getField(3), struct.getField(3));
  Expect.equals(expected.getWord(3 * expected.wordSize),
      struct.getWord(3 * struct.wordSize));
  struct.setField(1, 42);
  Expect.equals(expected.getField(0), struct.getField(0));
  Expect.equals(42, struct.getField(1));
  Expect.equals(expected.getField(2), struct.getField(2));
  Expect.equals(expected.getField(3), struct.getField(3));
  checkOutOfBoundsThrows(() => struct.getField(4));
  checkOutOfBoundsThrows(() => struct.getWord(3 * struct.wordSize + 1));

  // Check misaligned write and read.
  struct.setWord(struct.wordSize ~/ 2, 42);
  Expect.equals(42, struct.getWord(struct.wordSize ~/ 2));
  struct64.setWord(4, 42);
  Expect.equals(42, struct64.getWord(4));
  struct32.setWord(2, 42);
  Expect.equals(42, struct32.getWord(2));

  struct.free();
  struct64.free();
  struct32.free();
}

void testExternalFinalizer() {
  var libPath = ForeignLibrary.bundleLibraryName('ffi_test_library');
  ForeignLibrary fl = new ForeignLibrary.fromName(libPath);

  var makeA = fl.lookup("make_a_thing");
  var makeB = fl.lookup("make_b_thing");
  var finalizer = fl.lookup("free_thing");
  var check = fl.lookup("get_things");

  var a = makeA.pcall$0();
  var b = makeB.pcall$0();

  Expect.equals(3, check.icall$0());

  a.registerFinalizer(finalizer, a.address);
  b.registerFinalizer(finalizer, b.address);
  Expect.isTrue(b.removeFinalizer(finalizer));
  Expect.isFalse(b.removeFinalizer(finalizer));
  Expect.isFalse(b.removeFinalizer(makeA));

  a = null;
  b = null;

  // Make a GC happen...
  var x = new List(1024);
  x[1023] = 42;
  for (int i = 0; i < 100; i++) {
    var y = new List(1024);
    y[1023] = x[1023];
    x = y;
  }
  Expect.equals(42, x[1023]);

  Expect.equals(


   self.criterion = torch.nn.MSELoss()
        self.offset = offset

    def forward(self, outputs, targets):
        """Calculate forward propagation.
        Args:
            outputs (Tensor): Batch of prediction durations in log domain (B, T)
            targets (LongTensor): Batch of groundtruth durations in linear domain (B, T)
        Returns:
            Tensor: Mean squared error loss value.
        Note:
            `outputs` is in log domain but `targets` is in linear domain.
        """
        # NOTE: outputs is in log domain while targets in linear
        loss = self.criterion(outputs, targets)

        return loss


tion`] type from the [`subtle`] crate
/// in order to handle overflows in constant time.
#[derive(Copy, Clone, Debug)]
pub struct Checked<T>(pub CtOption<T>);

impl<T> Checked<T> {
    /// Create a new checked arithmetic wrapper for the given value.
    pub fn new(val: T) -> Self {
        Self(CtOption::new(val, Choice::from(1)))
    }
}

impl<T> Default for Checked<T>
where
    T: Default,
{
    fn default() -> Self {
        Self::new(T::default())
    }
}

impl<T: ConditionallySelectable> ConditionallySelectable for Checked<T> {
    #[inline]
    fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self {
        Self(CtOption::conditional_select(&a.0, &b.0, choice))
    }
}

impl<T: ConstantTimeEq> ConstantTimeEq for Checked<T> {
    #[inline]
    fn ct_eq(&self, rhs: &Self) -> Choice {
        self.0.ct_eq(&rhs.0)
    }
}

impl<T> From<Checked<T>> for CtOption<T> {
    fn from(checked: Checked<T>) -> CtOption<T> {
        checked.0
    }
}

impl<T> From<CtOption<T>> for Checked<T> {
    fn from(ct_option: CtOption<T>) -> Checked<T> {
        Checked(ct_option)
    }
}

impl<T> From<Checked<T>> for Option<T> {
    fn from(checked: Checked<T>) -> Option<T> {
        checked.0.into()
    }
}
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

//! Provides utilities to bind and open a VFIO PCI device.

#![allow(dead_code)]

use std::fs::write;
use std::sync::Arc;

use anyhow::{anyhow, bail, ensure, Context, Result};
use sync::Mutex;

use crate::vfio::{VfioContainer, VfioDevice};

#[derive(PartialEq, Eq, Debug)]
pub struct PciSlot {
    domain: u16,
    bus: u8,
    slot: u8,
    func: u8,
}

impl std::fmt::Display for PciSlot {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            "{:04x}:{:02x}:{:02x}.{}",
            self.domain, self.bus, self.slot, self.func
        )
    }
}

impl PciSlot {
    /// Creates a new `PciSlot` instance by parsing the given string which is of the form of
    /// `<domain>:<bus>:<slot>.<func>`, which is same as ones that
    /// [`lspci -s`](https://man7.org/linux/man-pages/man8/lspci.8.html) expects but we don't
    /// allow omitting 0s.
    pub fn new(s: &str) -> Result<Self> {
        let v: Vec<_> = s.split('.').collect();
        if v.len() != 2 {
            bail!("PCI slot must be specified like <domain>:<bus>:<slot>.<func>, but the number of '.' is incorrect: {}", s);
        }
        let func = u8::from_str_radix(v[1], 16).context("failed to parse func")?;

        let v2: Vec<_> = v[0].split(':').collect();
        if v2.len() != 3 {
            bail!("PCI slot must be specified like <domain>:<bus>:<slot>.<func>, but the number of ':' is incorrect: {}", s);
        }

        let domain = u16::from_str_radix(v2[0], 16).context("failed to parse domain")?;
        let bus = u8::from_str_radix(


			draw_button("Waiting for others", split / 2 + song_x_off, 375 + jacket_size, 600, function()
					missing_song = false
					mpScreen.SelectSong()
				end)
			else
				draw_button("Ready", split / 2 + song_x_off, 375 + jacket_size, 600, ready_up)
			end
		elseif host == nil then
			draw_button("Waiting for game to end", split / 2 + song_x_off, 375 + jacket_size, 600, function() end)
		elseif missing_song then
			draw_button("Missing Song!", split / 2 + song_x_off, 375 + jacket_size, 600, function() end)
		elseif selected_song ~= nil then
			if user_ready then
				draw_button("Cancel", split / 2 + song_x_off, 375 + jacket_size, 600, ready_up)
			else
				draw_button("Ready", split / 2 + song_x_off, 375 + jacket_size, 600, ready_up)
			end
		else
			draw_button("Waiting for host", split / 2 + song_x_off, 375 + jacket_size, 600, function() end)
		end
	end

	draw_checkbox("Excessive", split / 2 + song_x_off - 150, 375 + jacket_size + 70, toggle_hard, hard_mode,
		not start_game_soon)
	draw_checkbox("Mirror", split / 2 + song_x_off, 375 + jacket_size + 70, toggle_mirror, mirror_mode, not start_game_soon)

	draw_checkbox("Rotate Host", split / 2 + song_x_off + 150 + 20, 375 + jacket_size + 70, toggle_rotate, do_rotate,
		(owner == user_id or host == user_id) and not start_game_soon)

	if selected_song ~= nil then
		gfx.FillColor(255, 255, 255)
		gfx.FontSize(20)
		gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_TOP)
		if selected_song.min_bpm ~= selected_song.max_bpm then
			gfx.Text(string.format("BPM: %.0f-%.0f, Start BPM: %.0f, Hispeed: %.0f x %.1f = %.0f",
					selected_song.min_bpm, selected_song.max_bpm, selected_song.start_bpm,
					selected_song.speed_bpm, selected_song.hispeed, selected_song.speed_bpm * selected_song.hispeed),
				split / 2 + song_x_off, 375 + jacket_size + 70 + 30)
		else
			gfx.Text(string.format("BPM: %.0f, Hispeed: %.0f x %.1f = %.0f",
					selected_song.min_bpm,
					selected_song.speed_bpm, selected_song.hispeed, selected_song.speed_bpm * selected_song.hispeed),
				split / 2 + song_x_off, 375 + jacket_size + 70 + 30)
		end
	end
end

function render_room_list(deltaTime)
	draw_rooms(175, resY - 290)

	-- Draw cover for rooms out of view
	gfx.BeginPath()
	gfx.FillColor(20, 20, 20)
	gfx.Rect(0, 0, resX, 145)
	gfx.Rect(0, resY - 170, resX, 170)
	gfx.Fill()

	gfx.BeginPath()
	gfx.FillColor(60, 60, 60)
	gfx.Rect(0, 145, resX, 2)
	gfx.Rect(0, resY - 170 - 2, resX, 2)
	gfx.Fill()

	gfx.FillColor(255, 255, 255)
	gfx.TextAlign(gfx.TEXT_ALIGN_CENTER, gfx.TEXT_ALIGN_BOTTOM)
	gfx.FontSize(70)
	gfx.Text("Multiplayer Rooms", resX / 2, 100)

	if not loading then
		draw_button("Create


ata: Dict[str, Any] = field(default_factory=dict)

@dataclass
class WeightComponents:
    """权重组件"""
    confidence_score: float = 0.0
    context_score: float = 0.0
    complexity_score: float = 0.0
    business_score: float = 0.0

@dataclass
class ProcessingResult:
    """处理结果"""
    processed_placeholders: List[ProcessedPlaceholder]
    processing_metrics: ProcessingMetrics
    quality_score: float
    recommendations: List[str] = field(default_factory=list)
    errors: List[str] = field(default_factory=list)
    success: bool = True

# ==================== 辅助数据结构 ====================

@dataclass
class TimeRange:
    """时间范围"""
    start: datetime
    end: datetime
    period_type: str

    @classmethod
    def parse(cls, time_str: str) -> 'TimeRange':
        """解析时间范围字符串"""
        # 实现时间字符串解析逻辑
        # 例如: "2024-01" -> 2024年1月的开始和结束
        # 这里简化实现，实际需要更复杂的解析逻辑
        if "-" in time_str and len(time_str) == 7:  # YYYY-MM格式
            year, month = map(int, time_str.split("-"))
            start = datetime(year, month, 1)
            if month == 12:
                end = datetime(year + 1, 1, 1)
            else:
                end = datetime(year, month + 1, 1)
            return cls(start=start, end=end, period_type="monthly")

        raise ValueError(f"Unsupported time format: {time_str}")

@dataclass
class FilterCondition:
    """过滤条件"""
    field: str
    operator: str
    value: str

    @classmethod
    def parse(cls, condition_str: str) -> 'FilterCondition':
        """解析条件字符串"""
        # 简化实现，实际需要更复杂的解析逻辑
        if "=" in condition_str:
            field, value = condition_str.split("=", 1)
            return cls(field=field.strip(), operator="=", value=value.strip())
        elif ">" in condition_str:
            field, value = condition_str.split(">", 1)
            return cls(field=field.strip(), operator=">", value=value.strip())

        raise ValueError(f"Unsupported condition format: {condition_str}")

@dataclass
class SortSpec:
    """排序规格"""
    order: str  # "asc" or "desc"
    limit: int

@dataclass
class TemplateAnalysis:
    """模板分析结果"""
    template_id: str
    placeholder_count: int
    complexity_score: float
    quality_score: float
    syntax_types: Dict[str, int] = field(default_factory=dict)
    statistical_types: Dict[str, int] = field(default_factory=dict)
    issues_found: List[str] = field(default_factory=list)
    recommendations: List[str] = field(default_factory=list)
    analysis_timestamp: datetime = field(default_factory=datetime.now)

# ==================== 接口定义 ====================

class PlaceholderParserInterface(ABC):
    """占位符解析器接口"""

    @abstractmethod
    async def parse(self, placeholder_text: str) -> PlaceholderSpec:
        """解析占位符文本"""
        pass

    @abstractmethod
    def supports_syntax(self, syntax_type: SyntaxType) -> bool:
        """是否支持指定语法类型"""
        pass

class ContextAnalyzerInterface(ABC):
    """上下文分析器接口"""

    @abstractmethod
    async def analyze(
        self,
        placeholder: PlaceholderSpec,
        document_context: DocumentContext,
        business_context: BusinessContext,
        time_context: TimeContext
    ) -> ContextAnalysisResult:
        """分析上下文"""
        pass

class WeightCalculatorInterface(ABC):
    """权重计算器接口"""

    @abstractmethod
    async def calculate_weights(
        self,
        placeholder_spec: PlaceholderSpec,
        context_analysis: ContextAnalysisResult
    ) -> ContextWeight:
        """计算上下文权重"""
        pass

class PlaceholderOrchestratorInterface(ABC):
    """占位符编排器接口"""

    @abstractmethod
    async def analyze_with_context(
        self,
        template_id: str,
        time_context: TimeContext,
        business_context: BusinessContext,
        document_context: DocumentContext
    ) -> BatchAnalysisResult:
        """带上下文的占位符分析"""
        pass

    @abstractmethod
    async def analyze_for_debug(
        self,
        template_content: str,
        debug_context: Dict[str, Any]
    ) -> BatchAnalysisResult:
        """调试模式分析"""
        pass

# ==================== 异常定义 ====================

class PlaceholderError(Exception):
    """占位符处理基础异常"""
    pass

class PlaceholderSyntaxError(PlaceholderError):
    """占位符语法错误"""
    pass

class PlaceholderAnalysisError(PlaceholderError):
    """占位符分析错误"""
    pass

class ContextAnalysisError(PlaceholderError):
    """上下文分析错误"""
    pass

class WeightCalculationError(Placeholde


ext-react/packages/ext-react-classic-demo/node_modules/@sencha/ext-classic-theme-neutral/sass/var/button/Button.scss:3267 */
.x-keyboard-mode .x-nbr .x-segmented-button-item.x-btn-focus.x-btn-menu-active.x-btn-default-large:after,
.x-keyboard-mode .x-nbr .x-segmented-button-item.x-btn-focus.x-btn-pressed.x-btn-default-large:after {
    border-width: 1px;
    border-color: #ced8e1;
}
/* /Users/marcgusmano/_git/sencha/ext-react/packages/ext-react-classic-demo/node_modules/@sencha/ext-classic-theme-base/sass/etc/mixins/slicer.scss:83 */
.x-cmd-slicer.x-btn-focus.x-btn-default-large:before {
    /*<if slicer>*/
    display: none;
    content: "x-slicer:, stretch:bottom, frame:2px 2px 2px 2px, corners:url(images/btn/btn-default-large-focus-corners.gif), sides:url(images/btn/btn-default-large-focus-sides.gif)" !important;
}
/* /Users/marcgusmano/_git/sencha/ext-react/packages/ext-react-classic-demo/node_modules/@sencha/ext-classic-theme-base/sass/etc/mixins/slicer.scss:83 */
.x-cmd-slicer.x-btn-over.x-btn-default-large:before {
    /*<if slicer>*/
    display: none;
    content: "x-slicer:, stretch:bottom, frame:2px 2px 2px 2px, corners:url(images/btn/btn-default-large-over-corners.gif), sides:url(images/btn/btn-default-large-over-sides.gif)" !important;
}
/* /Users/marcgusmano/_git/sencha/ext-react/packages/ext-react-classic-demo/node_modules/@sencha/ext-classic-theme-base/sass/etc/mixins/slicer.scss:83 */
.x-cmd-slicer.x-btn-focus.x-btn-over.x-btn-default-large:before {
    /*<if slicer>*/
    display: none;
    content: "x-slicer:, stretch:bottom, frame:2px 2px 2px 2px, corners:url(images/btn/btn-default-large-focus-over-corners.gif), sides:url(images/btn/btn-default-large-focus-over-sides.gif)" !important;
}
/* /Users/marcgusmano/_git/sencha/ext-react/packages/ext-react-classic-demo/node_modules/@sencha/ext-classic-theme-base/sass/etc/mixins/slicer.scss:83 */
.x-cmd-slicer.x-btn-pressed.x-btn-default-large:before {
    /*<if slicer>*/
    display: none;
    content: "x-slicer:, stretch:bottom, frame:2px 2px 2px 2px, corners:url(images/btn/btn-default-large-pressed-corners.gif), sides:url(images/btn/btn-default-large-pressed-sides.gif)" !important;
}
/* /Users/marcgusmano/_git/sencha/ext-react/packages/ext-react-classic-demo/node_modules/@sencha/ext-classic-theme-base/sass/etc/mixins/slicer.scss:83 */
.x-cmd-slicer.x-btn-focus.x-btn-pressed.x-btn-default-large:before {
    /*<if slicer>*/
    display: none;
    content: "x-slicer:, stretch:bottom, f


 input2= """
       {
            "testString": "hello",
            "testReference": {
                "foo": [1, 2, 3.14],
                "bool": true,
                "array": [
                     {
                        "hidden": {
                            "configSecret": $passwordsObject
                        }
                     },
                     {"visible":"stuff"}
                 ]
           }
       }
    """.trimIndent()

    private val helper = ConfigSecretHelper()

    @Test
    fun `test secrets`() {
        val inputNode = convertJSONToNode(input)!!
        val secrets = helper.hideSecrets(inputNode)

        assertThat(inputNode["testReference"]["hidden"].textValue()).isEqualTo(MaskedSecretsLookupService.MASK_VALUE)
        assertThat(inputNode["testString"].textValue()).isEqualTo("hello")

        helper.insertSecrets(inputNode, secrets)

        val secretsNode = convertJSONToNode(passwordsObject)!!

        assertThat(inputNode["testReference"]["hidden"][ConfigKeys.SECRET_KEY]).isEqualTo(secretsNode)
        assertThat(inputNode["testString"].textValue()).isEqualTo("hello")
    }

    @Test
    fun `test secrets including array`() {
        val inputNode = convertJSONToNode(input2)!!
        val secrets = helper.hideSecrets(inputNode)

        assertThat(inputNode["testReference"]["array"][0]["hidden"].textValue()).isEqualTo(MaskedSecretsLookupService.MASK_VALUE)
        assertThat(inputNode["testString"].textValue()).isEqualTo("hello")

        helper.insertSecrets(inputNode, secrets)

        val secretsNode = convertJSONToNode(passwordsObject)!!

        assertThat(inputNode["testReference"]["array"][0]["hidden"][ConfigKeys.SECRET_KEY]).isEqualTo(secretsNode)
        assertThat(inputNode["testString"].textValue()).isEqualTo("hello")
    }

    private fun convertJSONToNode(json: String?): JsonNode? {
        val mapper = ObjectMapper()
        return mapper.readTree(json)
    }
}
package net.corda.libs.configuration.schema.p2p

class LinkManagerConfiguration {

    companion object {
        const val MAX_MESSAGE_SIZE_KEY = "maxMessageSize"
        const val MESSAGE_REPLAY_PERIOD_KEY = "messageReplayPeriod"
        const val BASE_REPLAY_PERIOD_KEY = "baseReplayPeriod"
        const val REPLAY_PERIOD_CUTOFF_KEY = "replayPeriodCutoff"
        const val MAX_REPLAYING_MESSAGES_PER_PEER = "maxReplayingMessages"
        const val SESSION_TIMEOUT_KEY = "sessionTimeout"
        const val REPLAY_ALGORITHM_KEY = "replayAlgorithm"
        const val REVOCATION_CHECK_KEY = "revocationCheck.mode"
        const val INBOUND_SESSIONS_CACHE_SIZE = "sessionCache.inboundSessionsCacheSize"
        const val OUTBOUND_SESSIONS_CACHE_SIZE = "sessionCache.outboundSessionsCacheSize"
        const val DELIVERY_TRACKER_MAX_CACHE_SIZE_MEGABYTES = "deliveryTracker.maxCacheSizeMegabytes"
        const val DELIVERY_TRACKER_MAX_CACHE_OFFSET_AGE = "deliveryTracker.maxCacheOffsetAge"
        const val DELIVERY_TRACKER_STATE_PERSISTENCE_PERIOD_SECONDS = "deliveryTracker.statePersistencePeriodSeconds"
        const val DELIVERY_TRACKER_OUTBOUND_BATCH_PROCESSING_TIMEOUT_SECONDS = "deliveryTracker.outboundBatchProcessingTimeoutSeconds"
        const val DELIVERY_TRACKER_MAX_NUMBER_OF_PERSISTENCE_RETRIES = "deliveryTracker.maxNumberOfPersistenceRetries"
    }

    enum class ReplayAlgorithm {
        Constant, ExponentialBackoff;
        fun configKeyName(): String {
            return this.name.replaceFirstChar { it.lowercase() }


_tx_thread_dont_save_ts:
    /* Clear the current task pointer.  */
    /* _tx_thread_current_ptr =  TX_NULL;  */

    /* Return to the scheduler.  */
    /* _tx_thread_schedule();  */

    STORE   x0, _tx_thread_current_ptr, t0              // Clear current thread pointer*/
    /* }  */

_tx_thread_idle_system_restore:
    /* Just return back to the scheduler!  */
    j       _tx_thread_schedule                         // Return to scheduler

/* }  */


PR_CPP_INCLUDE
#	define TESTSPR_TEST_FUNCTION testspr::algorithm_upper_bound_test
#	include <testspr/include_main.hpp>
#endif

#endif	// #ifndef SPROUT_LIBS_ALGORITHM_TEST_UPPER_BOUND_CPP
/*=============================================================================
  Copyright (c) 2011-2019 Bolero MURAKAMI
  https://github.com/bolero-MURAKAMI/Sprout

  Distributed under the Boost Software License, Version 1.0. (See accompanying
  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#ifndef SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_CPP
#define SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_CPP

#include <sprout/algorithm/recurrence.hpp>
#include <sprout/array.hpp>
#include <sprout/sub_array.hpp>
#include <sprout/container.hpp>
#include <testspr/tools.hpp>

namespace testspr {
	static void algorithm_recurrence_test() {
		using namespace sprout;
		{
			SPROUT_STATIC_CONSTEXPR auto arr1 = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};

			// generate
			{
				SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::recurrence(
					arr1,
					testspr::x2<int>(),
					2
					);
				TESTSPR_BOTH_ASSERT(testspr::equal(
					recurrenced,
					array<int, 10>{{2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}}
					));
			}
			{
				SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::fit::recurrence(
					arr1,
					testspr::x2<int>(),
					2
					);
				TESTSPR_BOTH_ASSERT(testspr::equal(
					recurrenced,
					array<int, 10>{{2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}}
					));
			}
			// generate
			// from sub range
			{
				SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::recurrence(
					sprout::sub(arr1, 2, 8),
					testspr::x2<int>(),
					2
					);
				TESTSPR_BOTH_ASSERT(testspr::equal(
					recurrenced,
					array<int, 6>{{2, 4, 8, 16, 32, 64}}
					));
				TESTSPR_BOTH_ASSERT(testspr::equal(
					sprout::get_internal(recurrenced),
					array<int, 10>{{1, 2, 2, 4, 8, 16, 32, 64, 9, 10}}
					));
			}
			{
				SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::fit::recurrence(
					sprout::sub(arr1, 2, 8),
					testspr::x2<int>(),
					2
					);
				TESTSPR_BOTH_ASSERT(testspr::equal(
					recurrenced,
					array<int, 6>{{2, 4, 8, 16, 32, 64}}
					));
				TESTSPR_BOTH_ASSERT(testspr::equal(
					sprout::get_internal(recurrenced),
					array<int, 10>{{1, 2, 2, 4, 8, 16, 32, 64, 9, 10}}
					));
			}
		}
	}
}	// namespace testspr

#ifndef TESTSPR_CPP_INCLUDE
#	define TESTSPR_TEST_FUNCTION testspr::algorithm_recurrence_test
#	include <testspr/include_main.hpp>
#endif

#endif	// #ifndef SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_CPP
/*================================================================


sourceExists 检查资源是否已存在
// @Summary 检查资源是否已存在
// @Description 根据TMDB ID或标题检查资源是否已存在
// @Tags TMDB
// @Accept json
// @Produce json
// @Param tmdb_id query int false "TMDB ID"
// @Param title query string false "资源标题"
// @Success 200 {object} gin.H
// @Failure 400 {object} gin.H
// @Failure 500 {object} gin.H
// @Router /api/tmdb/check-exists [get]
func CheckResourceExists(c *gin.Context) {
	tmdbIDStr := c.Query("tmdb_id")
	title := c.Query("title")

	// 至少需要提供一个参数
	if tmdbIDStr == "" && title == "" {
		c.JSON(http.StatusBadRequest, gin.H{"error": "必须提供TMDB ID或标题"})
		return
	}

	var exists bool
	var existingResource models.Resource

	// 首先按TMDB ID查询
	if tmdbIDStr != "" {
		tmdbID, err := strconv.Atoi(tmdbIDStr)
		if err != nil {
			c.JSON(http.StatusBadRequest, gin.H{"error": "无效的TMDB ID"})
			return
		}

		// 查询数据库
		err = models.DB.Get(&existingResource, `SELECT * FROM resources WHERE tmdb_id = ?`, tmdbID)
		if err == nil {
			// 找到资源
			exists = true
		}
	}

	// 如果按TMDB ID没找到，再按标题查询
	if !exists && title != "" {
		// 查询数据库
		err := models.DB.Get(&existingResource, `SELECT * FROM resources WHERE title = ? OR title_en = ?`, title, title)
		if err == nil {
			// 找到资源
			exists = true
		}
	}

	if exists {
		c.JSON(http.StatusOK, gin.H{
			"exists": true,
			"resource": existingResource,
		})
	} else {
		c.JSON(http.StatusOK, gin.H{
			"exists": false,
		})
	}
} package utils

import (
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"os"
	"strings"
	"time"
)

// TMDB API 配置
const (
	DEFAULT_TMDB_API_KEY = "" // 默认API密钥，仅作为回退使用
	BASE_URL     = "https://api.tmdb.org/3"
	POSTER_W     = "w500"
	BACKDROP_W   = "w1280"
	IMAGE_BASE_URL = "https://image.tmdb.org/t/p"
	TMDB_SETTINGS_KEY = "tmdb_config" // 管理后台配置键名
)

// 当前使用的TMDB API密钥
var currentTMDBAPIKey string

// 获取TMDB API密钥，按照优先级：
// 1. 使用已缓存的值（如果有）
// 2. 从环境变量获取
// 3. 使用默认值（如果前两者均未设置）
func GetTMDBAPIKey() string {
	// 如果已经有缓存的值，直接返回
	if currentTMDBAPIKey != "" {
		return currentTMDBAPIKey
	}

	// 从环境变


�息不满。

   （7）对浪费柴禾不满。夜间耕作、收种点火把、烧堆火以及燻土肥浪费很多柴草，这主要在烧草奇缺的地方。

   （8）对少数干部违法乱纪，体罚打骂群众不满。

   （9）对社队之间无计划的乱调东西不满。有些丰产社外调粮食过多，影响社员生活，违背多劳多得的社会主义分配原则。蒙城周庄外调多，使该庄社员生活发生困难，一个老头不满的说：“王主任（周明庄乡长王治国）正[整]天叫力登上游，力登上游，把群众登的吊蛋毛桃”。

   （10）对食堂过大不满。有的食堂过大，影响生产，群众有意见。潘集陈巷子食堂100余人吃饭，用3口锅蒸饭，吃一顿饭需做18锅，一天要作54锅。该食堂系三庄并成，远者吃饭往返跑三、四里路，群众最发愁阴雨天。

   徐士奇1959年元月27日

    [返回索引页面]

   Copyright (C)  2024  Marxist-Leninist-Maoist.

   Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

  <title>
   中共中央、中南局对河南省委《关于潘复生同志‘右倾机会主义错误’的平反决议》的批示 - 1962-4-24 - CCRD 中国当代政治运动史数据库
  </title>
  <link href="../../../../Emblem_of_the_PCP-Shining_Path.svg.ico" rel="icon" type="image/x-icon"/>

  <meta content="中共中央、中南局对河南省委《关于潘复生同志‘右倾机会主义错误’的平反决议》的批示" property="title"/>
  <meta content="1962-4-24" property="date"/>
  <meta content="" property="authors"/>


   }
        else
        {
            results = true;
        }
    }
    else if ( elementType == ONEFLOW::QUAD_4 )
    {
        if ( ONEFLOW::IsTwoD() )
        {
            results = false;
        }
        else
        {
            results = true;
        }
    }
    return results;
}

bool UnitElement::IsFaceElementTypeAtLeast( int elementType )
{
    bool results = IsUnitElementType( elementType );

    if ( elementType == ONEFLOW::BAR_2 )
    {
        if ( ONEFLOW::IsOneD() )
        {
            results = true;
        }
        else
        {
            results = false;
        }
    }
    return results;
}

bool UnitElement::IsBasicVolumeElementType( int elementType )
{
    if ( ONEFLOW::IsOneD() )
    {
        bool results = false;
        if ( elementType == ONEFLOW::CGNS_ENUMV( BAR_2 ) )
        {
            results = true;
        }
        return results;
    }
    else if ( ONEFLOW::IsTwoD() )
    {
        bool results = false;
        if ( elementType == ONEFLOW::CGNS_ENUMV( TRI_3 ) )
        {
            results = true;
        }
        else if ( elementType == ONEFLOW::CGNS_ENUMV( QUAD_4 ) )
        {
            results = true;
        }
        return results;
    }
    else
    {
        bool results = false;
        if ( elementType == ONEFLOW::TETRA_4 )
        {
            results = true;
        }
        else if ( elementType == ONEFLOW::PYRA_5 )
        {
            results = true;
        }
        else if ( elementType == ONEFLOW::PENTA_6 )
        {
            results = true;
        }
        else if ( elementType == ONEFLOW::HEXA_8 )
        {
            results = true;
        }
        return results;
    }
}

void UnitElement::PushElementFace( int faceType, int p1 )
{
    faceTypeContainer.push_back( faceType );

    IntField face;
    face.push_back( p1 );
    for ( int iPoint = 0; iPoint < face.size(); ++ iPoint )
    {
        face[ iPoint ] -= 1;
    }
    faceList.push_back( face );
}

void UnitElement::PushElementFace( int faceType, int p1, int p2 )
{
    faceTypeContainer.push_back( faceType );

    IntField face;
    face.push_back( p1 );
    face.push_back( p2 );
    for ( int iPoint = 0; iPoint < face.size(); ++ iPoint )
    {
        face[ iPoint ] -= 1;
    }
    faceList.push_back( face );
}

void UnitElement::PushElementFace( int faceType, int p1, int p2, int p3 )
{
    faceTypeContainer.push_back( faceType );

    IntField face;
    face.push_back( p1 );
    face.push_back( p2 );
    face.push_back( p3 );
    for ( int iPoint = 0; iPoint < face.size(); ++ iPoint )
    {
        face[ iPoint ] -= 1;
    }
    faceList.push_back( face );
}

void UnitElement::PushElementFace( int faceType, int p1, int p2, int p3, int p4 )
{
    faceTypeContainer.push_back( faceType );

    IntField face;
    face.push_back( p1 );
    face.push_back( p2 );
    face.push_back( p3 );
    face.push_back( p


(OptionGroup group, int index) {
    if (renderingOptions == null) return null;

    return renderingOptions.maxInitialOptionsShown(group, index);
  }

  @ViewChildren(MaterialTreeGroupComponent)
  List<MaterialTreeGroupComponent> treeGroupNodes;

  /// Collapses all tree groups.
  ///
  /// Remember to set expandAll to false in your component. This will not
  /// override that behavior.
  void collapseAllTreeGroups() {
    for (var tree in treeGroupNodes) {
      tree.clearExpansions();
    }
  }

  /// Expands all tree groups.
  ///
  /// Remember to set expandAll to true in your component. This will not
  /// override that behavior.
  void expandAllTreeGroups() {
    for (var tree in treeGroupNodes) {
      tree.expandAllOptions();
    }
  }

  /// Whether to show a flat list of items with multi-selection.
  bool get showFlatCheck => selection is MultiSelectionModel;

  /// Whether to show a flat list of items without any selection.
  bool get showFlatList => selection is NullSelectionModel;

  /// Whether to show a flat list of items with single-selection.
  bool get showFlatRadio => !showFlatList && !showFlatCheck;

  /// The ARIA role to use for the host element.
  @HostBinding('attr.role')
  String get role {
    if (supportsHierarchy) {
      return "tree";
    } else if (showFlatCheck || showFlatRadio) {
      return "listbox";
    } else {
      return "list";
    }
  }

  @HostBinding('attr.aria-multiselectable')
  String get hostMultiselectable => '$showFlatCheck';

  @HostBinding('attr.aria-readonly')
  String get hostReadonly => '$showFlatList';
}
import 'dart:io';

import 'package:path/path.dart' as p;
import 'package:angular_ast/angular_ast.dart';

RecoveringExceptionHandler exceptionHandler = RecoveringExceptionHandler();

List<StandaloneTemplateAst> parse(String template) => const NgParser().parse(
      template,
      sourceUrl: '/test/parser_test.dart#inline',
      exceptionHandler: exceptionHandler,
      desugar: false,
    );

void main() {
  String input;
  if (exceptionHandler is RecoveringExceptionHandler) {
    exceptionHandler.exceptions.clear();
  }
  var fileDir = p.join('test', 'ast_cli_tester_source.html');
  var file = File(fileDir.toString());
  input = file.readAsStringSync();
  //input = stdin.readLineSync(encoding: UTF8);
  var ast = parse(input);
  print('----------------------------------------------');
  if (exceptionHandler is ThrowingExceptionHandler) {
    print('CORRECT!');
    print(ast);
  }
  if (exceptionHandler is RecoveringExceptionHandler) {
    var exceptionsList = exceptionHandler.exceptions;
    if (exceptionsList.isEmpty) {
      print('CORRECT!');
      print(ast);
    } else {
      var visitor = const HumanizingTemplateAstVisitor();
      var fixed = ast.map((t) => t.accept(visitor)).join('');
      print('ORGNL: $input');
      print('FIXED: $fixed');

      print('\n\nERRORS:');
      exceptionHandler.exceptions.forEach((e) {
        var context = input.substring(e.offset!, e.offset! + e.length!);
        print('${e.errorCode.message} :: $context at ${e.offset}');
      });
    }
  }
}
import 'package:test/test.dart';
import 'package:angular_ast/angular_ast.dart';

final recoveringExceptionHandler = RecoveringExceptionHandler();

List<StandaloneTemplateAst> pa


) {
			runtime, err := NewContainerRuntime(&execer, tc.criSocket)
			if err != nil {
				t.Fatalf("unexpected NewContainerRuntime error: %v, criSocket: %s", err, tc.criSocket)
			}

			err = runtime.PullImage(tc.image)
			if !tc.isError && err != nil {
				t.Errorf("unexpected PullImage error: %v, criSocket: %s, image: %s", err, tc.criSocket, tc.image)
			}
			if tc.isError && err == nil {
				t.Errorf("unexpected PullImage success, criSocket: %s, image: %s", tc.criSocket, tc.image)
			}
		})
	}
}

func TestImageExists(t *testing.T) {
	fcmd := fakeexec.FakeCmd{
		RunScript: []fakeexec.FakeRunAction{
			func() ([]byte, []byte, error) { return nil, nil, nil },
			func() ([]byte, []byte, error) { return nil, nil, &fakeexec.FakeExitError{Status: 1} },
			func() ([]byte, []byte, error) { return nil, nil, nil },
			func() ([]byte, []byte, error) { return nil, nil, &fakeexec.FakeExitError{Status: 1} },
		},
	}
	execer := fakeexec.FakeExec{
		CommandScript: genFakeActions(&fcmd, len(fcmd.RunScript)),
		LookPathFunc:  func(cmd string) (string, error) { return "/usr/bin/crictl", nil },
	}

	cases := []struct {
		name      string
		criSocket string
		image     string
		result    bool
	}{
		{"valid: test if image exists using CRI", "unix:///var/run/crio/crio.sock", "image1", false},
		{"invalid: CRI inspecti failure", "unix:///var/run/crio/crio.sock", "image2", true},
		{"valid: test if image exists using docker", constants.DefaultDockerCRISocket, "image1", false},
		{"invalid: docker inspect failure", constants.DefaultDockerCRISocket, "image2", true},
	}

	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			runtime, err := NewContainerRuntime(&execer, tc.criSocket)
			if err != nil {
				t.Fatalf("unexpected NewContainerRuntime error: %v, criSocket: %s", err, tc.criSocket)
			}

			result, err := runtime.ImageExists(tc.image)
			if !tc.result != result {
				t.Errorf("unexpected ImageExists result: %t, criSocket: %s, image: %s, expected result: %t", err, tc.criSocket, tc.image, tc.result)
			}
		})
	}
}

func TestIsExistingSocket(t *testing.T) {
	// this test is not expected to work on Windows
	if runtime.GOOS == "windows" {
		return
	}

	const tempPrefix = "test.kubeadm.runtime.isExistingSocket."
	tests := []struct {
		name string
		proc func(*testing.T)
	}{
		{
			name: "Valid domain socket is detected as such",
			proc: func(t *testing.T) {
				tmpFile, err := ioutil.TempFile("", tempPrefix)
				if err != nil {
					t.Fatalf("unexpected error by TempFile: %v", err)
				}
				theSocket := tmpFile.Name()
				os.Remove(theSocket)
				tmpFile.Close()

				con, err := net.Listen("unix", theSocket)
				if err != nil {
					t.Fatalf("unexpected error while dialing a socket: %v", err)
				}
				defer con.Close()

				if !isExistingSocket(theSocket) {
					t.Fatalf("isExistingSocket(%q) gave unexpected result. Should have been true, instead of false", theSocket)
				}
			},
		},
		{


uctible<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value&&                          // NOLINT(misc-redundant-expression)
    is_nothrow_move_assignable<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value)
{
    j1.swap(j2);
}

#endif

}  // namespace std

#if JSON_USE_GLOBAL_UDLS
    using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers)
    using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers)
#endif

#include <nlohmann/detail/macro_unscope.hpp>

#endif  // INCLUDE_NLOHMANN_JSON_HPP_
//     __ _____ _____ _____
//  __|  |   __|     |   | |  JSON for Modern C++ (supporting code)
// |  |  |__   |  |  | | | |  version 3.11.2
// |_____|_____|_____|_|___|  https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#include "doctest_compatibility.h"

#include <nlohmann/json.hpp>
using nlohmann::json;
using nlohmann::ordered_json;

TEST_CASE("ordered_json")
{
    json j;
    ordered_json oj;

    j["element3"] = 3;
    j["element1"] = 1;
    j["element2"] = 2;

    oj["element3"] = 3;
    oj["element1"] = 1;
    oj["element2"] = 2;

    CHECK(j.dump() == "{\"element1\":1,\"element2\":2,\"element3\":3}");
    CHECK(oj.dump() == "{\"element3\":3,\"element1\":1,\"element2\":2}");

    CHECK(j == json(oj));
    CHECK(ordered_json(json(oj)) == ordered_json(j));

    j.erase("element1");
    oj.erase("element1");

    CHECK(j.dump() == "{\"element2\":2,\"element3\":3}");
    CHECK(oj.dump() == "{\"element3\":3,\"element2\":2}");

    // remove again and nothing changes
    j.erase("element1");
    oj.erase("element1");

    CHECK(j.dump() == "{\"element2\":2,\"element3\":3}");
    CHECK(oj.dump() == "{\"element3\":3,\"element2\":2}");

    // There are no dup keys cause constructor calls emplace...
    json const multi {{"z", 1}, {"m", 2}, {"m", 3}, {"y", 4}, {"m", 5}};
    CHECK(multi.size() == 3);
    CHECK(multi.dump() == "{\"m\":2,\"y\":4,\"z\":1}");

    ordered_json multi_ordered {{"z", 1}, {"m", 2}, {"m", 3}, {"y", 4}, {"m", 5}};
    CHECK(multi_ordered.size() == 3);
    CHECK(multi_ordered.dump() == "{\"z\":1,\"m\":2,\"y\":4}");
    CHECK(multi_ordered.erase("m") == 1);
    CHECK(multi_ordered.dump() == "{\"z\":1,\"y\":4}");

    // Ranged insert test.
    // It seems that values shouldn't be overwritten. Only new values are added
    json j1 {{"c", 1}, {"b", 2}, {"a", 3}};
    const json j2 {{"c", 77}, {"d", 42}, {"a", 4}};
    j1.insert( j2.cbegin(), j2.cend() );
    CHECK(j1.size() == 4);
    CHECK(j1.dump() == "{\"a\":3


type: WHITE_TEMP
   name: Outdoor Marchesa-C
   model: EMarchesa_C
   manufacturer: EGLO

-  product_id: 0x8A
   device_type: WHITE_TEMP
   name: Outdoor Francari-C
   model: EFrancari_C
   manufacturer: EGLO

-  product_id: 0x92
   device_type: RGB
   name: EPanel square
   model: EPanel_36W_square
   manufacturer: EGLO

-  product_id: 0x94
   device_type: DIM
   name: EGLOBulb Filament ST64
   model: ESMLFm-w6w-ST64
   manufacturer: EGLO

-  product_id: 0x95
   device_type: DIM
   name: EGLOBulb Filament G95
   model: ESMLFm-w6w-G95
   manufacturer: EGLO

-  product_id: 0x96
   device_type: RGB
   name: EGLO RGB+TW
   model: EGLO-RGB-TW
   manufacturer: EGLO

-  product_id: 0x97
   device_type: WHITE_TEMP
   name: EGLO Tunable White
   model: EGLO-TW
   manufacturer: EGLO

-  product_id: 0x99
   device_type: RGB
   name: EGLO RGB+TW
   model: EGLO-RGB-TW
   manufacturer: EGLO

-  product_id: 0x9A
   device_type: WHITE_TEMP
   name: EGLO Tunable White
   model: JBT_Gen_CCT_1
   manufacturer: EGLO

-  product_id: 0x9B
   device_type: DIM
   name: EGLO Tunable White
   model: JBT_Gen_Dim_1
   manufacturer: EGLO

-  product_id: 0xA1
   device_type: RGB
   name: EGLOLed Relax
   model: ELedRelax
   manufacturer: EGLO

-  product_id: 0xA2
   device_type: RGB
   name: EGLOLed Stripe
   model: ELedStripe
   manufacturer: EGLO

-  product_id: 0xA3
   device_type: RGB
   name: EGLOLed Plus
   model: ELedPlus
   manufacturer: EGLO

-  product_id: 0xA4
   device_type: WHITE_TEMP
   name: EGLOLed Plus TW
   model: ELedPlus-TW
   manufacturer: EGLO

-  product_id: 0xA5
   device_type: DIM
   name: EGLOLed Plus Dimmable
   model: ELedPlus-Dimm
   manufacturer: EGLO

-  product_id: 0xA6
   device_type: WHITE_TEMP
   name: EGLOBulb
   model: ESMLFm-w6-TW
   manufacturer: EGLO

-  product_id: 0xA7
   device_type: DIM
   name: EGLOBulb
   model: ESMLFm-w6-Dimm
   manufacturer: EGLO

-  product_id: 0xA8
   device_type: RGB
   name: ECeiling square
   model: ECeiling-24W-square
   manufacturer: EGLO

-  product_id: 0xA9
   device_type: RGB
   name: EGLO RGB+TW
   model: EGLO-RGB-TW-IPSU
   manufacturer: EGLO

-  product_id: 0xAA
   device_type: WHITE_TEMP
   name: EGLO Tunable White
   model: EGLO-TW-IPSU
   manufacturer: EGLO

-  product_id: 0xAC
   device_type: RGB
   name: EGLO fram


nclude <geos/geom/Polygon.h>
#include <geos/geom/GeometryCollection.h>
#include <geos/geom/GeometryFactory.h>
#include <geos/geom/IntersectionMatrix.h>
#include <geos/geom/PrecisionModel.h>
#include <geos/geom/BinaryOp.h>
#include <geos/operation/overlay/OverlayOp.h>
#include <geos/operation/buffer/BufferBuilder.h>
#include <geos/operation/buffer/BufferParameters.h>
#include <geos/operation/buffer/BufferOp.h>
#include <geos/util.h>
//#include <geos/geomgraph.h>
#include <geos/io/WKBReader.h>
#include <geos/io/WKBWriter.h>
#include <geos/io/WKTReader.h>
#include <geos/io/WKTWriter.h>
#include <geos/opRelate.h>
#include <geos/opPolygonize.h>
#include <geos/opLinemerge.h>
#include <geos/profiler.h>
#include <geos/unload.h>
#include <geos/opValid.h>
#include "XMLTester.h"
#include "BufferResultMatcher.h"
#include "SingleSidedBufferResultMatcher.h"

#include <cassert>
#include <cctype>
#include <cstdlib>
#include <fstream>
#include <functional>
#include <iostream>
#include <sstream>
#include <cstring>
#include <memory>
#include <functional>
#include <stdexcept>
#include <cmath>
#include <stdexcept>
#include <algorithm>

#if defined(_MSC_VER) && defined(GEOS_TEST_USE_STACKWALKER)
#include <windows.h>
#include "Stackwalker.h"
#endif

// Geometry methods do use BinaryOp internally
#undef USE_BINARYOP

using namespace geos;
using namespace geos::operation::polygonize;
using namespace geos::operation::linemerge;
using std::runtime_error;

namespace {

// a utility function defining a very simple method to indent a line of text
const char * getIndent( unsigned int numIndents )
{
    static const char * pINDENT = "                                      + ";
    static const unsigned int LENGTH = strlen( pINDENT );

    if ( numIndents > LENGTH ) numIndents = LENGTH;

    return &pINDENT[ LENGTH-numIndents ];
}

void dump_to_stdout( const TiXmlNode * pParent, unsigned int indent = 0 )
{
    if ( !pParent ) return;

    const TiXmlText *pText;
    int t = pParent->Type();
    printf( "%s", getIndent( indent));

    switch ( t )
    {
    case TiXmlNode::DOCUMENT:
        printf( "Document" );
        break;

    case TiXmlNode::ELEMENT:
        printf( "Element \"%s\"", pParent->Value() );
        break;

    case TiXmlNode::COMMENT:
        printf( "Comment: \"%s\"", pParent->Value());
        break;

    case TiXmlNode::UNKNOWN:
        printf( "Unknown" );
        break;

    case TiXmlNode::TEXT:
        pText = pParent->ToText();
        printf( "Text: [%s]", pText->Value() );
        break;

    case TiXmlNode::DECLARATION:
        printf( "Declaration" );
        break;
    default:
        break;
    }
    printf( "\n" );

    const TiXmlNode * pChild;

    for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling())
    {
        dump_to_stdout( pChild, indent+2 );
    }
}

}

void
tolower(std::string& str)
{
    std::transform(str.begin(), str.end(), str