,326L294.45,321.49L282.27,311.88L279.65,319.45L287.88,326zM374.13,269.25L380.43,260.99L381.25,230.52L379.77,207.21L374.51,204.27L365.07,208.2L378.2,213.46L378.23,248.25L363.6,260.43L374.13,269.25zM354.42,187.45L364.26,164.76L355.99,154.41L349.48,160.99L354.42,187.45zM87.59,81.88L94.82,106.62L99.22,107.52L101.49,96.62L87.59,81.88zM4.49,0L0.04,0.68L5.94,2.5L11.95,23.69L18.25,17.02L14.56,11.03L4.49,0z"
				}
			]
		}
	}
};
// (c) ammap.com | SVG (in JSON format) map of Tokelau - Low
// areas: {id:""}
AmCharts.maps.tokelauLow={
	"svg": {
		"defs": {
			"amcharts:ammap": {
				"projection":"mercator",
				"leftLongitude":"-172.5217437744",
				"topLatitude":"-8.5307749243",
				"rightLongitude":"-171.1786651611",
				"bottomLatitude":"-9.4477071661"
			}
		},
		"g":{
			"path":[
				{
					"id":"TK",
					"title":"Tokelau",
					"d":"M784.32,550.46L785.61,550.34L787.51,547.55L786.72,546.06L784.03,547.99L784.32,550.46zM790.43,543.54L789.02,543.83L789.56,544.65L788.67,544.32L789.07,545.99L787.96,544.43L787.76,545.8L788.56,547.02L790.33,544.97L790.43,543.54zM783.77,543.61L784.8,542.56L784.44,541.99L783.12,542.43L783.77,543.61zM781.05,535.63L779.51,536.41L780.43,537.66L781.52,535.94L780.28,536.1L781.05,535.63zM779.33,534.96L778.11,534.85L778.31,535.97L779.48,535.66L779.33,534.96zM789.68,531.76L788.73,532.21L790.09,532.87L790.95,534.89L791.52,539.43L790.43,540.5L791.6,541.23L792.31,539.59L791.95,534.84L791.02,532.13L789.68,531.76zM790.32,531.42L790.75,530.64L789.35,530.93L790.32,531.42zM790.82,528.93L790.57,528.29L789.85,528.61L789.75,530.23L790.83,530.18L790.82,528.93zM773.93,527.52L772.38,527.83L773,529L773.78,528.77L773.93,527.52zM789.55,528.43L790.81,528.09L790.74,527.26L789.71,527


			get
			{
				return this._Type;
			}
			set
			{
				this._Type = value;
			}
		}

		[ProtoMember(3, IsRequired = false, Name = "Barcode", DataFormat = DataFormat.Default), DefaultValue("")]
		public string Barcode
		{
			get
			{
				return this._Barcode;
			}
			set
			{
				this._Barcode = value;
			}
		}

		[ProtoMember(4, IsRequired = false, Name = "Scene", DataFormat = DataFormat.TwosComplement), DefaultValue(0L)]
		public uint Scene
		{
			get
			{
				return this._Scene;
			}
			set
			{
				this._Scene = value;
			}
		}

		IExtension IExtensible.GetExtensionObject(bool createIfMissing)
		{
			return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing);
		}
	}
}


/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef __nsPrintingPromptService_h
#define __nsPrintingPromptService_h

// {E042570C-62DE-4bb6-A6E0-798E3C07B4DF}
#define NS_PRINTINGPROMPTSERVICE_CID \
 {0xe042570c, 0x62de, 0x4bb6, { 0xa6, 0xe0, 0x79, 0x8e, 0x3c, 0x7, 0xb4, 0xdf}}
#define NS_PRINTINGPROMPTSERVICE_CONTRACTID \
 "@mozilla.org/embedcomp/printingprompt-service;1"

#include "nsCOMPtr.h"
#include "nsIPrintingPromptService.h"
#include "nsPIPromptService.h"
#include "nsIWindowWatcher.h"

// Printing Progress Includes
#include "nsPrintProgress.h"
#include "nsIWebProgressListener.h"

class nsPrintingPromptService: public nsIPrintingPromptService,
                               public nsIWebProgressListener
{
public:
  nsPrintingPromptService();

  nsresult Init();

  NS_DECL_NSIPRINTINGPROMPTSERVICE
  NS_DECL_NSIWEBPROGRESSLISTENER
  NS_DECL_ISUPPORTS

protected:
  virtual ~nsPrintingPromptService();

private:
  nsCOMPtr<nsIPrintProgress> mPrintProgress;
};

#endif


    		'800080' : 'Ljubičasta',
    		'808080' : 'Siva',
    		F00 : 'Crvena',
    		FF8C00 : 'Tamno naranđasta',
    		FFD700 : 'Zlatna',
    		'008000' : 'Zelena',
    		'0FF' : 'Cijan',
    		'00F' : 'Plava',
    		EE82EE : 'Ljubičasta',
    		A9A9A9 : 'Mutno siva',
    		FFA07A : 'Svijetli losos',
    		FFA500 : 'Naranđasto',
    		FFFF00 : 'Žuto',
    		'00FF00' : 'Limun',
    		AFEEEE : 'Blijedo tirkizna',
    		ADD8E6 : 'Svijetlo plava',
    		DDA0DD : 'Šljiva',
    		D3D3D3 : 'Svijetlo siva',
    		FFF0F5 : 'Lavanda rumeno',
    		FAEBD7 : 'Antikno bijela',
    		FFFFE0 : 'Svijetlo žuta',
    		F0FFF0 : 'Med',
    		F0FFFF : 'Azurna',
    		F0F8FF : 'Alice plava',
    		E6E6FA : 'Lavanda',
    		FFF : 'Bijela',
    		'1ABC9C' : 'Jaka cijan',
    		'2ECC71' : 'Emerald',
    		'3498DB' : 'Svijetlo plava',
    		'9B59B6' : 'Ametist',
    		'4E5F70' : 'Sivkasto plava',
    		F1C40F : 'Žarka žuta',
    		'16A085' : 'Tamna cijan',
    		'27AE60' : 'Tamna emerald',
    		'2980B9' : 'Jaka plava',
    		'8E44AD' : 'Tamno ljubičasta',
    		'2C3E50' : 'Desatuirarana plava',
    		F39C12 : 'Narančasta',
    		E67E22 : 'Mrkva',
    		E74C3C : 'Blijedo crvena',
    		ECF0F1 : 'Sjana srebrna',
    		'95A5A6' : 'Svijetlo sivkasta cijan',
    		DDD : 'Svijetlo siva',
    		D35400 : 'Tikva',
    		C0392B : 'Jaka crvena',
    		BDC3C7 : 'Srebrna',
    		'7F8C8D' : 'Sivkasto cijan',
    		'999' : 'Tamno siva'
    	},
    	more : 'Više boja...',
    	panelTitle : 'Boje',
    	textColorTitle : 'Boja teksta'
    },
    clipboard :
    {
    	copy : 'Kopiraj',
    	copyError : 'Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tipkovnici (Ctrl/Cmd+C).',
    	cut : 'Izreži',
    	cutError : 'Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog izrezivanja. Molimo koristite kraticu na tipkovnici (Ctrl/Cmd+X).',
    	paste : 'Zalijepi',
    	pasteNotification : 'Vaš preglednik Vam ne dozvoljava lijepljenje običnog teksta na ovaj način. Za lijepljenje, pritisnite %1.',
    	pasteArea : 'Okvir za lijepljenje',
    	pasteMsg : 'Zalijepite vaš sadržaj u okvir ispod i pritisnite OK.'
    },
    blockquote :
    {
    	toolbar : 'Citat'
    },


.H=(A1+=R0.L*R1.H), R3.L=(A0+=R0.L*R1.L) || R0=[P0++] || R1=[I0] ;
/* Pack two vector values while storing a data register using an
Ireg pointer and loading another data register. */
R1=PACK(R1.H,R0.H) || [I0++]=R0 || R2.L=W[I2++] ;

/* Multiply-Accumulate to a Data register while incrementing an
Ireg. */
r6=(a0+=r3.h*r2.h)(fu) || i2-=m0 ;
/* which the assembler expands into:
r6=(a0+=r3.h*r2.h)(fu) || i2-=m0 || nop ; */

/* Test for ensure (m) is not thown


  it("should support skipping disabled scrapers", () => {
    scrapersConfig.scrapers = [
      { name: "united", supportedAirlines: ["staralliance"], disabled: true },
      { name: "delta", supportedAirlines: ["skyteam"] },
      { name: "skiplagged", supportedAirlines: [], cashOnlyFares: true, disabled: true },
    ]
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[0]!, "UA", true)).toBeFalsy()
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[1]!, "DL", true)).toBeTruthy()
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[1]!, "UA", true)).toBeFalsy()
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[2]!, "AA", true)).toBeFalsy()
  })

  it("should support cash-only fares", () => {
    scrapersConfig.scrapers = [
      { name: "skiplagged1", supportedAirlines: [], cashOnlyFares: true, disabled: true },
      { name: "skiplagged2", supportedAirlines: [], cashOnlyFares: true, disabled: false },
    ]
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[0]!, "AA", true)).toBeFalsy()
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[1]!, "AA", true)).toBeTruthy()
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[0]!, "AA", false)).toBeFalsy()
    expect(doesScraperSupportAirline(scrapersConfig.scrapers[1]!, "AA", false)).toBeFalsy()
  })
})

describe("findAwardFlights", () => {
  it("should support a simple search", async () => {
    const flights = await findAwardFlights({origins: ["SFO", "OAK"], destinations: ["HNL"], departureDate: "2023-12-25"})
    expect(flights).toMatchSnapshot()
  })
}, { timeout: 30000 })
export default class DashboardCreateError extends Error {
	constructor(msg: string) {
		const message = `Error creating dashboard: ${msg}`;
		super(message);
		this.name = "DashboardCreateError";
	}
}
///<reference path="../globals.ts" />
///<reference path="deviceDriver.ts" />

/* ----------------------------------
   DeviceDriverKeyboard.ts

   Requires deviceDriver.ts

   The Kernel Keyboard Device Driver.
   ---------------------------------- */

module TSOS {

    // Extends DeviceDriver
    export class DeviceDriverKeyboard extends DeviceDriver {

        constructor() {
            // Override the base method pointers.

            // The code below cannot run because "this" can only be
            // accessed after calling super.
            //super(this.krnKbdDriverEntry, this.krnKbdDispatchKeyPress);
            super();
            this.driverEntry = this.krnKbdDriverEntry;
            this.isr = this.krnKbdDispatchKeyPress;
        }

        public krnKbdDriverEntry() {
            // Initialization routine for this, the kernel-mode Keyboard Device Driver.
            this.status = "loaded";
            // More?
        }

        public krnKbdDispatchKeyPress(params) {
            // Parse the params.    TODO: Check that the params are valid and osTrapError if not.
            var keyCode: number = params[0];
            var isShifted: boolean = params[1];
            // console.log("Key Code: " + keyCode);
            //


					IPRanges: []ec2model.IPRange{
						{
							CIDRIP: "127.100.0.1/24",
						},
					},
				},
				{
					IPProtocol: "tcp",
					FromPort:   awssdk.Int32(80),
					ToPort:     awssdk.Int32(80),
					IPRanges: []ec2model.IPRange{
						{
							CIDRIP: "127.200.0.1/24",
						},
					},
				},
			},
		},
		{
			name: "ipv4 - udp - with source range",
			lbConf: elbv2gw.LoadBalancerConfiguration{
				Spec: elbv2gw.LoadBalancerConfigurationSpec{
					SourceRanges: &[]string{
						"127.0.0.1/24",
						"127.100.0.1/24",
						"127.200.0.1/24",
					},
				},
			},
			gateway: &gwv1.Gateway{
				Spec: gwv1.GatewaySpec{
					Listeners: []gwv1.Listener{
						{
							Name:     "udp",
							Port:     80,
							Protocol: gwv1.UDPProtocolType,
						},
					},
				},
			},
			expected: []ec2model.IPPermission{
				{
					IPProtocol: "udp",
					FromPort:   awssdk.Int32(80),
					ToPort:     awssdk.Int32(80),
					IPRanges: []ec2model.IPRange{
						{
							CIDRIP: "127.0.0.1/24",
						},
					},
				},
				{
					IPProtocol: "udp",
					FromPort:   awssdk.Int32(80),
					ToPort:     awssdk.Int32(80),
					IPRanges: []ec2model.IPRange{
						{
							CIDRIP: "127.100.0.1/24",
						},
					},
				},
				{
					IPProtocol: "udp",
					FromPort:   awssdk.Int32(80),
					ToPort:     awssdk.Int32(80),
					IPRanges: []ec2model.IPRange{
						{
							CIDRIP: "127.200.0.1/24",
						},
					},
				},
			},
		},
		{
			name: "ipv4 - udp - with source range - icmp enabled",
			lbConf: elbv2gw.LoadBalancerConfiguration{
				Spec: elbv2gw.LoadBalancerConfigurationSpec{
					SourceRanges: &[]string{
						"127.0.0.1/24",
					},
					EnableICMP: awssdk.Bool(true),
				},
			},
			gateway: &gwv1.Gateway{
				Spec: gwv1.GatewaySpec{
					Listeners: []gwv1.Listener{
						{
							Name:     "udp",
							Port:     80,
							Protocol: gwv1.UDPProtocolType,
						},
					},
				},
			},
			expected: []ec2model.IPPermission{
				{
					IPProtocol: "udp",
					FromPort:   awssdk.Int32(80),
					ToPort:     awssdk.Int32(80),
					IPRanges: []ec2model.IPRange{
						{
							CIDRIP: "127.0.0.1/24",
						},
					},
				},
				{
					IPProtocol: "icmp",
					FromPort:   awssdk.Int32(2),
					ToPort:     awssdk.Int32(3),
					IPRanges: []ec2model.IPRange{
						{
							CIDRIP: "127.0.0.1/24",
						},
					},
				},
			},
		},
		{
			name: "ipv4 - with multiple l7 listeners - with source range - multiple ports",
			lbConf: elb


// File format
const (
	UnknownFormat Format = "unknown"
	// input formats
	Excel Format = "xlsx"
	CSV   Format = "csv"
	XML   Format = "xml"
	YAML  Format = "yaml"
	// output formats
	JSON Format = "json"
	Bin  Format = "binpb"
	Text Format = "txtpb"
)

// File format extension
const (
	UnknownExt string = ".unknown"
	// input formats
	ExcelExt string = ".xlsx"
	CSVExt   string = ".csv"
	XMLExt   string = ".xml"
	YAMLExt  string = ".yaml"
	// output formats
	JSONExt string = ".json"
	BinExt  string = ".binpb"
	TextExt string = ".txtpb"
)

// GetFormat returns the file's format by filename extension.
func GetFormat(filename string) Format {
	return Ext2Format(filepath.Ext(filename))
}

func Ext2Format(ext string) Format {
	switch ext {
	case ExcelExt:
		return Excel
	case CSVExt:
		return CSV
	case XMLExt:
		return XML
	case YAMLExt:
		return YAML
	case JSONExt:
		return JSON
	case BinExt:
		return Bin
	case TextExt:
		return Text
	default:
		return UnknownFormat
	}
}

func Format2Ext(fmt Format) string {
	switch fmt {
	case Excel:
		return ExcelExt
	case CSV:
		return CSVExt
	case XML:
		return XMLExt
	case YAML:
		return YAMLExt
	case JSON:
		return JSONExt
	case Bin:
		return BinExt
	case Text:
		return TextExt
	default:
		return UnknownExt
	}
}

var InputFormats = []Format{Excel, CSV, XML, YAML}
var OutputFormats = []Format{JSON, Bin, Text}

var inputDocumentFormats = map[Format]bool{
	XML:  true,
	YAML: true,
}

// IsInputFormat checks whether the fmt belongs to [InputFormats], such as
// Excel, CSV, XML, YAML.
func IsInputFormat(fmt Format) bool {
	for _, f := range InputFormats {
		if f == fmt {
			return true
		}
	}
	return false
}

// IsInputDocumentFormat checks whether the fmt belongs to input document
// formats, such as XML, YAML.
func IsInputDocumentFormat(fmt Format) bool {
	return inputDocumentFormats[fmt]
}

func Amongst(fmt Format, formats []Format) bool {
	var found bool
	for _, f := range formats {
		if f == fmt {
			found = true
			break
		}
	}
	return found
}

// FilterInput checks if this input format need to be converted.
func FilterInput(inputFormat Format, allowedInputFormats []Format) bool {
	if !IsInputFormat(inputFormat) {
		return false
	}

	if len(allowedInputFormats) == 0 || Amongst(inputFormat, allowedInputFormats) {
		return true
	}
	return false
}
package main

import (
	"fmt"
	"os"

	_ "time/tzdata"

	"github.com/spf13/cobra"
	"github.com/tableauio/tableau"
	"github.com/tableauio/tableau/format"
	"github.com/tableauio/tableau/log"
	"github.com/tableauio/tableau/options"
	"github.com/tableauio/tableau/xerrors"
	"gopkg.in/yaml.v3"
)

const version = "0.14.3"
const (
	ModeDefault = "default" // generate both proto and conf files
	ModeProto   = "proto"   // generate proto files only
	ModeConf    = "conf"    // generate conf files only.
)

var (
	protoPackage string
	indir        string
	outdir       string

	confInputIgnoreUnknownWorkbook bool
	confOutputSubdir               string
	confOutputFormats              []


端。指针（HEAD）用来标明当前处于哪个分支的哪个版本。

### 1.2 使用分支
```
git branch                     # 查看分支，查询结果中 *表示当前所在分支
git branch ‘分支名称’	 	    # 创建一个新的分支
git checkout ‘分支名称’	 	    # 切换分支
git checkout -b deeveloper 	    # 创建并切到developer分支
git merge ‘分支名称’ 		    # 合并分支
git branch -d ‘分支名称’ 	    # 删除分支
git branch -a				    # 查看远程主机分支个数
```

新的分支会在当前分支原有历史版本的结点上进行创建，我称其为子分支,新建的子分支会继承父分支的所有提交历史。

```
git merge ‘说明’		    # 合并分支时需要告诉Git合并到哪个分支
git merge master            # 即将master分支的修改内容加入到了hotfix下。
git push origin “本地分支名称:远程分支名称”将本地分支推送至远程仓库，
git push origin hotfix（通常的写法）相当于
git push origin hotfix:hotfix
git push origin hotfix:newfeature
```

本地仓库分支名称和远程仓库分支名称一样的情况下可以简写成一个，即git push “仓库地址” “分支名称”，如果远程仓库没有对应分支，将会自动创建:
```
删除远程分支git push origin --delete 分支名称
删除远程分支git purigin sh o:分支名称
```

### 1.3 分支使用步骤示例

```txt
# 查看当前分支
git branch

# 创建一个新分支 login
git checkout -b login

# 提交完成的代码到 login分支
git add .
git commit -m "完成 login"

# 提交分支到远程
git branch      # 查看本地分支，多出一个 login，而远程没有
git push -u origin login

# 合并本地分支到master
git checkout master
git merge login

# 提交master到远程
git push
```
## 一 Kafka简介

Kafka是由Linkedin公司基于Scala语言开发的分布式消息系统，具备高吞吐特性，一般用于大数据场景中的日志系统中。

目前Kafka支持多种客户端语言，包括：Java、Go、C++、NodeJS等。

Kafka虽然是一个分布式消息中间件,但是并不符合JMS规范，即使消息已经被消费，也不会被马上删除，当消息保留一段时间后，会被批量删除，无论消息是否被消费过，该方式可以极大降低磁盘IO。

Kafka的一些架构优点：
- 高性能：具备极高吞吐量，即使存储了许多TB的消息，也能发挥出稳定的性能，非常适合大数据场景。
-


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

package com.tencent.bkrepo.common.storage.innercos.endpoint

/**
 * 默认解析器实现，直接访问域名
 */
class DefaultEndpointResolver : EndpointResolver {

    override fun resolveEndpoint(endpoint: String): String {
        return endpoint
    }
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2020 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.tencent.bkrepo.common.storage.innercos.response.handler

import com.tencent.bkrepo.common.storage.innercos.http.Headers
import com.tencent.bkrepo.common.storage.innercos.http.HttpResponseHandler
import com.tencent.bkrepo.common.storage.innercos.response.UploadPartResponse
import okhttp3.Response

class UploadPartResponseHandler : HttpResponseHandler<UploadPartResponse>() {
    override fun handle(response: Response): UploadPartResponse {
        val eTag = response.header(Headers.ETAG)!!.trim('"')
        return UploadPartResponse(eTag)
    }
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2020 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR


/*
MIT License

Copyright (c) 2018 Benjamin Hglinger

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

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

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

#pragma once

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "imgui.h"

#include <Indicium/Engine/IndiciumCore.h>
#include <Indicium/Engine/IndiciumDirect3D9.h>
#include <Indicium/Engine/IndiciumDirect3D10.h>
#include <Indicium/Engine/IndiciumDirect3D11.h>

typedef LRESULT(WINAPI *t_WindowProc)(
	_In_ HWND hWnd,
	_In_ UINT Msg,
	_In_ WPARAM wParam,
	_In_ LPARAM lParam
	);

LRESULT WINAPI DetourDefWindowProc(
    _In_ HWND hWnd,
    _In_ UINT Msg,
    _In_ WPARAM wParam,
    _In_ LPARAM lParam
);

LRESULT WINAPI DetourWindowProc(
    _In_ HWND hWnd,
    _In_ UINT Msg,
    _In_ WPARAM wParam,
    _In_ LPARAM lParam
);

void HookWindowProc(HWND hWnd);
void RenderScene();

bool ImGui_ImplWin32_UpdateMouseCursor();
IMGUI_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);

EVT_INDICIUM_GAME_HOOKED EvtIndiciumGameHooked;
EVT_INDICIUM_GAME_UNHOOKED EvtIndiciumGameUnhooked;

EVT_INDICIUM_D3D9_PRESENT EvtIndiciumD3D9Present;
EVT_INDICIUM_D3D9_RESET EvtIndiciumD3D9PreReset;
EVT_INDICIUM_D3D9_RESET EvtIndiciumD3D9PostReset;
EVT_INDICIUM_D3D9_PRESENT_EX EvtIndiciumD3D9PresentEx;
EVT_INDICIUM_D3D9_RESET_EX EvtIndiciumD3D9PreResetEx;
EVT_INDICIUM_D3D9_RESET_EX EvtIndiciumD3D9PostResetEx;

EVT_INDICIUM_D3D10_PRESENT EvtIndiciumD3D10Present;
EVT_INDICIUM_D3D10_RESIZE_BUFFERS EvtIndiciumD3D10PreResizeBuffers;
EVT_INDICIUM_D3D10_RESIZE_BUFFERS EvtIndiciumD3D10PostResizeBuffers;

EVT_INDICIUM_D3D11_PRE_PRESENT EvtIndiciumD3D11Present;
EVT_INDICIUM_D3D11_PRE_RESIZE_BUFFERS EvtIndiciumD3D11PreResizeBuffers;
EVT_INDICIUM_D3D11_POST_RESIZE_BUFFERS EvtIndiciumD3D11PostResizeBuffers;

/**
 * \fn	TOGGLE_STATE(int key, bool& toggle)
 *
 * \brief	Overly complicated key toggle helper
 *
 * \author	Benjamin "Nefarius" Hglinger-Stelzer
 * \date	7/09/2018
 *
 * \param 		  	key   	The key.
 * \param [in,out]	toggle	The value to toggle.
 */
VOID
FORCEINLINE
TOGGLE_STATE(int key, bool& toggle)
{
	static auto pressedPast = false, pressedNow = false;

	if (GetAsyncKeyState(key) & 0x8000)
	{
		pressedNow = true;
	}
	else
	{
		pressedPast = false;
		pressedNow = false;
	}

	if (!pressedPast && pressedNow)
	{
		toggle = !toggle;

		pressedPast = true;
	}
}


klch(0.145 0 0);
	--primary: oklch(0.205 0 0);
	--primary-foreground: oklch(0.985 0 0);
	--secondary: oklch(0.97 0 0);
	--secondary-foreground: oklch(0.205 0 0);
	--muted: oklch(0.97 0 0);
	--muted-foreground: oklch(0.556 0 0);
	--accent: oklch(0.97 0 0);
	--accent-foreground: oklch(0.205 0 0);
	--destructive: oklch(0.577 0.245 27.325);
	--border: oklch(0.922 0 0);
	--input: oklch(0.922 0 0);
	--ring: oklch(0.708 0 0);
	--radius: 0.625rem;
}

:root.dark {
	--background: oklch(0.145 0 0);
	--foreground: oklch(0.985 0 0);
	--card: oklch(0.205 0 0);
	--card-foreground: oklch(0.985 0 0);
	--popover: oklch(0.205 0 0);
	--popover-foreground: oklch(0.985 0 0);
	--primary: oklch(0.922 0 0);
	--primary-foreground: oklch(0.205 0 0);
	--secondary: oklch(0.269 0 0);
	--secondary-foreground: oklch(0.985 0 0);
	--muted: oklch(0.269 0 0);
	--muted-foreground: oklch(0.708 0 0);
	--accent: oklch(0.269 0 0);
	--accent-foreground: oklch(0.985 0 0);
	--destructive: oklch(0.704 0.191 22.216);
	--border: oklch(1 0 0 / 10%);
	--input: oklch(1 0 0 / 15%);
	--ring: oklch(0.556 0 0);
}

@layer base {
	* {
		@apply border-border;
	}
}

@theme {
	--animate-scan-line: scanning 1.5s linear infinite;
}

@keyframes scanning {
	0% {
		top: 0%;
	}
	50% {
		top: 100%;
	}
	100% {
		top: 0%;
	}
}
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom animations */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    font-feature-settings: "rlig" 1, "calt" 1;
  }

  /* Smooth transitions for interactive elements */
  button, a, input, select, textarea {
    @apply transition-all duration-200;
  }

  /* Focus styles */
  *:focus-visible {
    @apply outline-none ring-2 ring-primary/20 ring-offset-2;
  }
  :root {
    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer components {
  /* Animation utilities */
  .animate-in {
    animation-fill-mode: both;
    animation-duration: 0.5s;
  }

  .fade-in {
    animation-name: fadeIn;
  }


end {
        if nums[i] == target {
            result += 1;
        }
    }

    result + complex_calculation(nums, start + 1, end, target)
}
```

### MauQueue 优化

```rust
use mau::memo;

#[memo]
fn optimized_calculation(nums: &Vec<i32>, n: usize) -> i32 {
    match n {
        0 => return 0,
        _ => {
            let start = n.saturating_sub(4);
            let end = n.saturating_sub(1);

            // MauQueue 会被转换为高效的循环代码
            let result = MauQueue(
                move || start,
                move || end,
                |i| {
                    let current_value = nums[i];
                    let prev_max = optimized_calculation(nums, i);
                    std::cmp::max(prev_max, prev_max + current_value)
                }
            );
            result
        }
    }
}
```

## 实际应用示例

### 1. 守望者的逃离 (P1095) - 递归优化

```rust
use mau::memo;

#[memo]
fn max_distance(magic: i32, time_left: i32, distance_left: i32) -> i32 {
    match (time_left <= 0, distance_left <= 0) {
        (true, true) => 0,
        (true, false) => -distance_left,
        (false, true) => 0, // 已经到达
        (false, false) => {
            let mut max_dist = -distance_left;

            // 选择1: 跑步 (17m/s)
            let run_result = match distance_left <= 17 {
                true => 0,
                false => max_distance(magic, time_left - 1, distance_left - 17),
            };
            max_dist = max_dist.max(run_result);

            // 选择2: 闪烁 (60m/s, 消耗10魔法)
            let blink_result = match (magic >= 10, distance_left <= 60) {
                (true, true) => 0,
                (true, false) => max_distance(magic - 10, time_left - 1, distance_left - 60),
                (false, _) => i32::MIN,
            };
            if blink_result != i32::MIN {
                max_dist = max_dist.max(blink_result);
            }

            // 选择3: 休息 (恢复4魔法)
            let rest_result = max_distance((magic + 4).min(1000), time_left - 1, distance_left);
            max_dist = max_dist.max(rest_result);

            max_dist
        }
    }
}
```

### 2. 动态规划 - 最长公共子序列

```rust
use mau::memo;

#[memo]
fn lcs(s1: &str, s2: &str, i: usize, j: usize) -> usize {
    match (i == 0, j == 0) {
        (true, _


367, _mk_build_metadata(NULL, eb, comment));
  mk_write_queue(mk, &q);

  if (mk->error) {
    mk->m_errors++;
    return -1;
  }

  return 0;
}

/**
 * Close the muxer and append trailer to output
 */
static int
mkv_muxer_close(muxer_t *m)
{
  mk_muxer_t *mk = (mk_muxer_t*)m;

  if(mk_mux_close(mk)) {
    mk->m_errors++;
    return -1;
  }

  pktref_clear_queue(&mk->holdq);

  return 0;
}

/**
 * Free all memory associated with the muxer
 */
static void
mkv_muxer_destroy(muxer_t *m)
{
  mk_muxer_t *mk = (mk_muxer_t*)m;
  mk_chapter_t *ch;

  pktref_clear_queue(&mk->holdq);

  while((ch = TAILQ_FIRST(&mk->chapters)) != NULL) {
    TAILQ_REMOVE(&mk->chapters, ch, link);
    free(ch);
  }

  free(mk->filename);
  free(mk->tracks);
  free(mk->title);
  muxer_config_free(&mk->m_config);
  muxer_hints_free(mk->m_hints);
  free(mk);
}

/**
 * Create a new builtin muxer
 */
muxer_t*
mkv_muxer_create(const muxer_config_t *m_cfg,
                 const muxer_hints_t *hints)
{
  mk_muxer_t *mk;
  const char *agent = hints ? hints->mh_agent : NULL;

  if(m_cfg->m_type != MC_MATROSKA && m_cfg->m_type != MC_WEBM)
    return NULL;

  mk = calloc(1, sizeof(mk_muxer_t));
  mk->m_open_stream  = mkv_muxer_open_stream;
  mk->m_open_file    = mkv_muxer_open_file;
  mk->m_mime         = mkv_muxer_mime;
  mk->m_init         = mkv_muxer_init;
  mk->m_reconfigure  = mkv_muxer_reconfigure;
  mk->m_add_marker   = mkv_muxer_add_marker;
  mk->m_write_meta   = mkv_muxer_write_meta;
  mk->m_write_pkt    = mkv_muxer_write_pkt;
  mk->m_close        = mkv_muxer_close;
  mk->m_destroy      = mkv_muxer_destroy;
  mk->webm           = m_cfg->m_type == MC_WEBM;
  mk->dvbsub_reorder = m_cfg->u.mkv.m_dvbsub_reorder;
  mk->fd             = -1;

  /*
   * VLC has no support for MKV S_DVBSUB codec format
   */
  if (agent)
    mk->dvbsub_skip  = strstr(agent, "LibVLC/") != NULL;

  TAILQ_INIT(&mk->holdq);

  return (muxer_t*)mk;
}


rg.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

@ExtendWith(MockitoExtension.class)
class DefaultMappingTest {

  @Mock ConvertingCodecFactory codecFactory;
  @Mock ConvertingCodec<String, Instant> instantCodec;
  @Mock ConvertingCodec<String, String> textCodec;
  @Mock ConvertingCodec<String, Boolean> booleanCodec;

  @Test
  void should_create_mapping() {

    ImmutableSetMultimap<Field, CQLWord> fieldsToVariables =
        ImmutableSetMultimap.<Field, CQLWord>builder()
            .put(new DefaultMappedField("f1"), CQLWord.fromInternal("c1"))
            .put(new DefaultMappedField("f2"), CQLWord.fromInternal("c2"))
            .build();

    when(codecFactory.createConvertingCodec(DataTypes.TEXT, GenericType.STRING, true))
        .thenAnswer(invocation -> textCodec);
    when(codecFactory.createConvertingCodec(DataTypes.BOOLEAN, GenericType.STRING, true))
        .thenAnswer(invocation -> booleanCodec);

    DefaultMapping mapping = new DefaultMapping(fieldsToVariables, codecFactory, ImmutableSet.of());

    assertThat(mapping.fieldToVariables(new MappedMappingField("f1")))
        .containsExactly(CQLWord.fromInternal("c1"));
    assertThat(mapping.fieldToVariables(new MappedMappingField("f2")))
        .containsExactly(CQLWord.fromInternal("c2"));
    assertThat(mapping.fieldToVariables(new MappedMappingField("nonexistent"))).isEmpty();

    assertThat(mapping.variableToFields(CQLWord.fromInternal("c1")))
        .containsExactly(new MappedMappingField("f1"));
    assertThat(mapping.variableToFields(CQLWord.fromInternal("c2")))
        .containsExactly(new MappedMappingField("f2"));
    assertThat(mapping.variableToFields(CQLWord.fromInternal("nonexistent"))).isEmpty();

    assertThat(mapping.codec(CQLWord.fromInternal("f1"), DataTypes.TEXT, GenericType.STRING))
        .isSameAs(textCodec);
    assertThat(mapping.codec(CQLWord.fromInternal("f2"), DataTypes.BOOLEAN, GenericType.STRING))
        .isSameAs(booleanCodec);
  }

  @Test
  void should_detect_writetime_variable() {

    when(codecFactory.createConvertingCodec(DataTypes.TIMESTAMP, GenericType.STRING, true))
        .thenAnswer(invocation -> instantCodec);

    DefaultMapping mapping =
        new DefaultMapping(
            ImmutableSetMultimap.of(),
            codecFactory,
            ImmutableSet.of(CQLWord.fromInternal("myWriteTimeVar")));

    assertThat(
            mapping.codec(
                CQLWord.fromInternal("myWriteTimeVar"), DataTypes.BIGINT, GenericType.STRING))
        .isNotNull()
        .isInstanceOf(WriteTimeCodec.class);
  }
}
/*
 * Copyright DataStax, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.datastax.oss.dsbulk.mapping;

import com.datastax.oss.driver.api.core.type.DataType;
import edu.umd.cs.findbugs.annotations.NonNull;

public class TypedCQLLiteral extends CQLLiteral implements MappingField {

  private final DataType dataType;

  public TypedCQLLiteral(@NonNull String literal, @NonNull DataType dataType)


	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.SurfaceIntensity#="+Str(t.visuals.SurfaceIntensity_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.SurfaceRed#="+Str(t.visuals.SurfaceRed_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.SurfaceGreen#="+Str(t.visuals.SurfaceGreen_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.SurfaceBlue#="+Str(t.visuals.SurfaceBlue_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.Specular#="+Str(t.visuals.Specular_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.SurfaceSunFactor#="+Str(t.visuals.SurfaceSunFactor_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.DistanceTransitionStart#="+Str(t.visuals.DistanceTransitionStart_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.DistanceTransitionRange#="+Str(t.visuals.DistanceTransitionRange_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.CameraNEAR#="+Str(t.visuals.CameraNEAR_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.CameraFAR#="+Str(t.visuals.CameraFAR_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.CameraFOV#="+Str(t.visuals.CameraFOV_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.WeaponFOV#="+Str(t.visuals.WeaponFOV_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.CameraFOVZoomed#="+Str(t.visuals.CameraFOVZoomed_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.TerrainLOD1#="+Str(t.visuals.TerrainLOD1_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.TerrainLOD2#="+Str(t.visuals.TerrainLOD2_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.TerrainLOD3#="+Str(t.visuals.TerrainLOD3_f);
	WriteString (  1, t.strwork.Get() );
	t.strwork = ""; t.strwork = t.strwork +"visuals.TerrainSize#="+Str(t.visuals.TerrainSize_f);
	WriteString (  1, t.strwork.Get


instruction is added by load_g_cx in the same file and is either 1 or 2
// MOVs.
var prologuesAMD64 []opcodeSeq

func init() {
	var tinyStacksplit = opcodeSeq{uint64(x86asm.CMP), uint64(x86asm.JBE)}
	var smallStacksplit = opcodeSeq{uint64(x86asm.LEA), uint64(x86asm.CMP), uint64(x86asm.JBE)}
	var bigStacksplit = opcodeSeq{uint64(x86asm.MOV), uint64(x86asm.CMP), uint64(x86asm.JE), uint64(x86asm.LEA), uint64(x86asm.SUB), uint64(x86asm.CMP), uint64(x86asm.JBE)}
	var unixGetG = opcodeSeq{uint64(x86asm.MOV)}
	var windowsGetG = opcodeSeq{uint64(x86asm.MOV), uint64(x86asm.MOV)}

	prologuesAMD64 = make([]opcodeSeq, 0, 2*3)
	for _, getG := range []opcodeSeq{unixGetG, windowsGetG} {
		for _, stacksplit := range []opcodeSeq{tinyStacksplit, smallStacksplit, bigStacksplit} {
			prologue := make(opcodeSeq, 0, len(getG)+len(stacksplit))
			prologue = append(prologue, getG...)
			prologue = append(prologue, stacksplit...)
			prologuesAMD64 = append(prologuesAMD64, prologue)
		}
	}
}

var amd64AsmRegisters = map[int]asmRegister{
	// 8-bit
	int(x86asm.AL):   {regnum.AMD64_Rax, 0, mask8},
	int(x86asm.CL):   {regnum.AMD64_Rcx, 0, mask8},
	int(x86asm.DL):   {regnum.AMD64_Rdx, 0, mask8},
	int(x86asm.BL):   {regnum.AMD64_Rbx, 0, mask8},
	int(x86asm.AH):   {regnum.AMD64_Rax, 8, mask8},
	int(x86asm.CH):   {regnum.AMD64_Rcx, 8, mask8},
	int(x86asm.DH):   {regnum.AMD64_Rdx, 8, mask8},
	int(x86asm.BH):   {regnum.AMD64_Rbx, 8, mask8},
	int(x86asm.SPB):  {regnum.AMD64_Rsp, 0, mask8},
	int(x86asm.BPB):  {regnum.AMD64_Rbp, 0, mask8},
	int(x86asm.SIB):  {regnum.AMD64_Rsi, 0, mask8},
	int(x86asm.DIB):  {regnum.AMD64_Rdi, 0, mask8},
	int(x86asm.R8B):  {regnum.AMD64_R8, 0, mask8},
	int(x86asm.R9B):  {regnum.AMD64_R9, 0, mask8},
	int(x86asm.R10B): {regnum.AMD64_R10, 0, mask8},
	int(x86asm.R11B): {regnum.AMD64_R11, 0, mask8},
	int(x86asm.R12B): {regnum.AMD64_R12, 0, mask8},
	int(x86asm.R13B): {regnum.AMD64_R13, 0, mask8},
	int(x86asm.R14B): {regnum.AMD64_R14, 0, mask8},
	int(x86asm.R15B): {regnum.AMD64_R15, 0, mask8},

	// 16-bit
	int(x86asm.AX):   {regnum.AMD64_Rax, 0, mask16},
	int(x86asm.CX):   {regnum.AMD64_Rcx, 0, mask16},
	int(x86asm.DX):   {regnum.AMD64_Rdx, 0, mask16},
	int(x86asm.BX):   {regnum.AMD64_Rbx, 0, mask16},
	int(x86asm.SP):   {regnum.AMD64_Rsp, 0, mask16},
	int(x86asm.BP):   {regnum.AMD64_


6 reg, u16 value)
{
	/* Register 1 is a 32-bit register. */
	B43_WARN_ON(dev->phy.rev < 7 && reg == 1);

	b43_write16f(dev, B43_MMIO_RADIO_CONTROL, reg);
	b43_write16(dev, B43_MMIO_RADIO_DATA_LOW, value);
}

/* https://bcm-v4.sipsolutions.net/802.11/Radio/Switch%20Radio */
static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,
					bool blocked)
{
	struct b43_phy *phy = &dev->phy;

	if (b43_read32(dev, B43_MMIO_MACCTL) & B43_MACCTL_ENABLED)
		b43err(dev->wl, "MAC not suspended\n");

	if (blocked) {
		if (phy->rev >= 19) {
			/* TODO */
		} else if (phy->rev >= 8) {
			b43_phy_mask(dev, B43_NPHY_RFCTL_CMD,
				     ~B43_NPHY_RFCTL_CMD_CHIP0PU);
		} else if (phy->rev >= 7) {
			/* Nothing needed */
		} else if (phy->rev >= 3) {
			b43_phy_mask(dev, B43_NPHY_RFCTL_CMD,
				     ~B43_NPHY_RFCTL_CMD_CHIP0PU);

			b43_radio_mask(dev, 0x09, ~0x2);

			b43_radio_write(dev, 0x204D, 0);
			b43_radio_write(dev, 0x2053, 0);
			b43_radio_write(dev, 0x2058, 0);
			b43_radio_write(dev, 0x205E, 0);
			b43_radio_mask(dev, 0x2062, ~0xF0);
			b43_radio_write(dev, 0x2064, 0);

			b43_radio_write(dev, 0x304D, 0);
			b43_radio_write(dev, 0x3053, 0);
			b43_radio_write(dev, 0x3058, 0);
			b43_radio_write(dev, 0x305E, 0);
			b43_radio_mask(dev, 0x3062, ~0xF0);
			b43_radio_write(dev, 0x3064, 0);
		}
	} else {
		if (phy->rev >= 19) {
			/* TODO */
		} else if (phy->rev >= 7) {
			if (!dev->phy.radio_on)
				b43_radio_2057_init(dev);
			b43_switch_channel(dev, dev->phy.channel);
		} else if (phy->rev >= 3) {
			if (!dev->phy.radio_on)
				b43_radio_init2056(dev);
			b43_switch_channel(dev, dev->phy.channel);
		} else {
			b43_radio_init2055(dev);
		}
	}
}

/* https://bcm-v4.sipsolutions.net/802.11/PHY/Anacore */
static void b43_nphy_op_switch_analog(struct b43_wldev *dev, bool on)
{
	struct b43_phy *phy = &dev->phy;
	u16 override = on ? 0x0 : 0x7FFF;
	u16 core = on ? 0xD : 0x00FD;

	if (phy->rev >= 19) {
		/* TODO */
	} else if (phy->rev >= 3) {
		if (on) {
			b43_phy_write(dev, B43_NPHY_AFECTL_C1, core);
			b43_phy_write(dev, B43_NPHY_AFECTL_OVER1, override);
			b43_phy_write(dev, B43_NPHY_AFECTL_C2, core);
			b43_phy_write(dev, B43_NPHY_AFECTL_OVER, override);
		} else {
			b43_phy_write(dev, B43_NPHY_AFECTL_OVER1, override);
			b43_phy_write(dev, B43_NPHY_AFECTL_C1, core);
			b43_phy_write(dev, B43_NPHY_AFECTL_OVER, override);
			b43_phy_write(dev, B43_NPHY_AFECTL_C2, core);
		}
	} else {
		b43_phy_write(dev, B43_NPHY_AFECTL_OVER, override);
	}
}

static int b43_nphy_op_switch_channel(struct b43_wldev *dev,
				      unsigned int new_channel)
{
	struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan;
	enum nl80211_channel_type channel_type =
		cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef);

	if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
		if ((new_channel < 1) || (new_channel > 14))
			return -EINVAL;
	} else {
		if (new_channel > 200)
			return -EINVAL;
	}

	return b43_nphy_set_channel(dev, channel, channel_type);
}

static unsigned int b43_nphy_op_get_default_chan(struct b43_wldev *dev)
{
	if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
		return 1;
	return 36;
}

const struct b43_phy_operations b43_phyops_n = {
	.allocate		= b43_nphy_op_allocate,
	.free			= b43_nphy_op_free,
	.prepare_structs	= b43_nphy_op_prepare_structs,
	.init			= b43_nphy_op_init,
	.phy_maskset		= b43_nphy_op_maskset,
	.radio_read		= b43_nphy_op_radio_read,
	.radio_write		= b43_nphy_op_radio_write,
	.software_rfkill	= b43_nphy_op_software_rfkill,
	.switch_analog		= b43_nphy_op_switch_analog,
	.switch_channel		= b43_nphy_op_switch_channel,
	.get_default_chan	= b43_nphy_op_get_default_chan,
	.recalc_txpower		= b43_nphy_op_recalc_txpower,
};


H56YPp5nXH6dH5C4YjPam3rLKW2Ae1LaYKW9ZA9ckIBP11dFysY+VmyBq7my/6xr81g7Nv3xx91j9Hg50KLZEkPe0rVmFrD7JdxLXTAYcfPCHUvhpeklsy7UNK95JW04l+K+Z+LX0rCJ+VXcxNs3dcM2dG/e0J3+p38XUzXfEf+pJWdepDAj4JAZo9jbWTLR5M+sshtUHum29Ru2l/Esh8B0FSbaCKgXXOTtgK0X5moBAC0iBJAO0SLmMOAtpUGbZ6T7mSi2CDnfStpfuZ/XqG/0OYE+MB4efUwY/PfePHrnPSO++kllK45WfRXCTwYoLThvzOU7MWKJiUgsXz36JuCAJDQCzzwYnohqAOAPy6lET7ow2kqXRUgiIHJRwwuGVFcFmJxzEIBR1Rh1Qm45gJBkZejRY3NzpDFAij0BwWEQRAxuPOI4u4iFhcWcMz+rTqI+0sgcHR1SlFuQ25fBEbhyZ6oczwHLV9vO1ugqp+Iu9EIbbTYv5DcZVFT1rHiD8yQ+rvkfWxVAwXhid7BFRXjyLQI93BaJtVlW1Uh7YZKx9PqVlsCDAUesU5Ix2GzYEbVLU6xCvR2nyDaGRmS3k6o7C8QmdbBlZFGqc5HH/a5TLtjqJvtRS1VowHpTQWbkPdRRWFEBYws6dYeVXRUKdXIW2xVuL9Q1l7265yO9SwAgbK/FEMoYQlHdCSG8CT22b8fIhE9xHtf8E7HbsY5fKcXi9llPFvmYTIypLuuI82fgtmzdArJxK1xlaHazfG82/46lx4jFGct+1YrAA==") format("woff2"),url(/static-dist/app/fonts/iconfont.woff) format("woff"),url(/static-dist/app/fonts/iconfont.ttf) format("truetype"),url(/static-dist/app/fonts/iconfont.svg#ib-icon) format("svg")}.ibs-vue .ib-icon{font-family:ib-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ibs-vue .ib-icon-add-outline:before{content:"\e6ea"}.ibs-vue .ib-icon-edit:before{content:"\e696"}.ibs-vue .ib-icon-pause:before{content:"\e6a8"}.ibs-vue .ib-icon-bookmark-outline:before{content:"\e60a"}.ibs-vue .ib-icon-bookmark:before{content:"\e60b"}.ibs-vue .ib-icon-favoriteoutline:before{content:"\e622"}.ibs-vue .ib-icon-favorite:before{content:"\e623"}.ibs-vue .ib-icon-setting:before{content:"\e62b"}.ibs-vue .ib-icon-info:before{content:"\e63c"}.ibs-vue .ib-icon-delete:before{content:"\e6ec"}.ibs-vue .ib-icon-add:before{content:"\e989"}/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;border-radius:3px;box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;border-radius:2px 2px 0 0;box-shadow:0 1px 0 #fff ins


/* get thread info */
	lwi	r19, r6, TI_FLAGS /* get flags in thread info */
	bnei	r19, work_pending /* do an extra work if any bits are set */
no_work_pending:
	disable_irq

2:
	/* save r31 */
	swi	r31, r0, PER_CPU(CURRENT_SAVE)
	/* save mode indicator */
	lwi	r18, r1, PT_MODE
	swi	r18, r0, PER_CPU(KM)
//restore_context:
	/* special purpose registers */
	lwi	r18, r1, PT_FSR
	mts	rfsr, r18
	lwi	r18, r1, PT_ESR
	mts	resr, r18
	lwi	r18, r1, PT_EAR
	mts	rear, r18
	lwi	r18, r1, PT_MSR
	mts	rmsr, r18

	lwi	r31, r1, PT_R31
	lwi	r30, r1, PT_R30
	lwi	r29, r1, PT_R29
	lwi	r28, r1, PT_R28
	lwi	r27, r1, PT_R27
	lwi	r26, r1, PT_R26
	lwi	r25, r1, PT_R25
	lwi	r24, r1, PT_R24
	lwi	r23, r1, PT_R23
	lwi	r22, r1, PT_R22
	lwi	r21, r1, PT_R21
	lwi	r20, r1, PT_R20
	lwi	r19, r1, PT_R19
	lwi	r18, r1, PT_R18
	lwi	r17, r1, PT_R17
	lwi	r16, r1, PT_R16
	lwi	r15, r1, PT_R15
	lwi	r14, r1, PT_PC
	lwi	r13, r1, PT_R13
	lwi	r12, r1, PT_R12
	lwi	r11, r1, PT_R11
	lwi	r10, r1, PT_R10
	lwi	r9, r1, PT_R9
	lwi	r8, r1, PT_R8
	lwi	r7, r1, PT_R7
	lwi	r6, r1, PT_R6
	lwi	r5, r1, PT_R5
	lwi	r4, r1, PT_R4		/* return val */
	lwi	r3, r1, PT_R3		/* return val */
	lwi	r2, r1, PT_R2
	lwi	r1, r1, PT_R1

	rtid	r14, 0
	nop

sys_rt_sigreturn_wrapper:
	addk	r30, r0, r0		/* no restarts for this one */
	brid	sys_rt_sigreturn
	addk	r5, r1, r0

	/* Interrupt vector table */
	.section	.init.ivt, "ax"
	.org 0x0
	brai	_reset
	brai	_user_exception
	brai	_interrupt
	brai	_break
	brai	_hw_exception_handler
	.org 0x60
	brai	_debug_exception

.section .rodata,"a"
#include "syscall_table.S"

syscall_table_size=(.-sys_call_table)

type_SYSCALL:
	.ascii "SYSCALL\0"
type_IRQ:
	.ascii "IRQ\0"
type_IRQ_PREEMPT:
	.ascii "IRQ (PREEMPTED)\0"
type_SYSCALL_PREEMPT:
	.ascii " SYSCALL (PREEMPTED)\0"

	/*
	 * Trap decoding for stack unwinder
	 * Tuples are (


	require.NoErrorf(t, err, "Storage file should have been created at %s", storageFile)
	})

	t.Run("StorageUpdateDisabled", func(t *testing.T) {
		storageFile := filepath.Join(globalconfig.GetGlobalDdevDir(), ".remote-config")
		os.Remove(storageFile)

		// Test with storage update disabled
		out, err := exec.RunHostCommand(DdevBin, "debug", "remote-data", "--type=remote-config", "--update-storage=false")
		require.NoError(t, err, "Should successfully download without updating storage, output='%v'", out)
		require.NotContains(t, out, "Local remote config storage updated successfully")

		// Verify that no storage file was created
		_, err = os.Stat(storageFile)
		require.Error(t, err, "Storage file should not have been created")
	})
}

// TestJSONValidation tests that the output is always valid JSON
func TestJSONValidation(t *testing.T) {
	t.Run("RemoteConfigValidJSON", func(t *testing.T) {
		out, err := exec.RunHostCommandSeparateStreams(DdevBin, "debug", "remote-data", "--type=remote-config", "--update-storage=false")
		require.NoError(t, err, "Should successfully download remote config, output='%v'", out)

		// Test that it's valid JSON by unmarshaling to interface{}
		var jsonData interface{}
		err = json.Unmarshal([]byte(out), &jsonData)
		require.NoError(t, err, "Output should be valid JSON")

		// Test that it can be re-marshaled (round-trip test)
		_, err = json.Marshal(jsonData)
		require.NoError(t, err, "JSON should be serializable")
	})

	t.Run("SponsorshipDataValidJSON", func(t *testing.T) {
		out, err := exec.RunHostCommandSeparateStreams(DdevBin, "debug", "remote-data", "--type=sponsorship-data", "--update-storage=false")
		require.NoError(t, err, "Should successfully download sponsorship data, output='%v'", out)

		// Test that it's valid JSON
		var jsonData interface{}
		err = json.Unmarshal([]byte(out), &jsonData)
		require.NoError(t, err, "Output should be valid JSON")

		// Test round-trip
		_, err = json.Marshal(jsonData)
		require.NoError(t, err, "JSON should be serializable")
	})
}
package cmd

import (
	"testing"

	"github.com/spf13/cobra"
	"github.com/spf13/pflag"
	asrt "github.com/stretchr/testify/assert"
)

const (
	commandName = "command"
	script      = "script"
)

// getSubject returns a new, initialized Flags struct.
func getSubject() Flags {
	var subject Flags
	subject.Init(commandName, script)
	return subject
}

// TestUnitCmdFlagsInit tests the Init method.
func TestUnitCmdFlagsInit(t *testing.T) {
	assert := asrt.New(t)
	subject := getSubject()

	assert.Exactly(commandName, subject.CommandName)
	assert.Exactly(script, subject.Script)
}

// TestCmdFlagsLoadFromJSON checks LoadFromJSON works correctly and handles
// user errors.
func TestUnitCmdFlagsLoadFromJSON(t *testing.T) {
	assert := asrt.New(t)
	subject := getSubject()

	// No data
	assert.NoError(subject.LoadFromJSON(``))

	// Invalid JSON
	assert.Error(subject.LoadFromJSON(`this is no valid JSON`))

	// Empty array
	assert.NoError(subject.LoadFromJSON(`[]`))

	// Minimal
	assert.NoError(subject.LoadFromJSON(`[{"Name":"test","Usage":"Usage of test"}]`))
	assert.EqualValues("test", subject.Definiti


料解答这道题。

不过啊，那些答案都有一些笼统，今天我会尽量详细地为你梳理一下这个过程。跟着我学完这节课，你就能明白，为什么面试官对这道题青睐有加了。

这里我先给你概括一下全过程，让你有个整体印象。

1\.常规的网络交互过程是从客户端发起网络请求，用户态的应用程序（浏览器）会生成HTTP请求报文、并通过DNS协议查找到对应的远端IP地址。

 2\.在套接字生成之后进入内核态，浏览器会委托操作系统内核协议栈中的上半部分，也就是TCP/UDP协议发起连接请求。

 3\.然后经由协议栈下半部分的IP协议进行封装，使数据包具有远程定位能力。

 4\.经过MAC层处理，找到接收方的目标MAC地址。

 5\.最终数据包在经过网卡转化成电信号经过交换机、路由器发送到服务端，服务端经过处理拿到数据，再通过各种网络协议把数据响应给客户端。

 6\.客户端拿到数据进行渲染。

 7\.客户端和服务端之间反复交换数据，客户端的页面数据就会发生变化。

你有没有发现，刚才的过程中，我们提到了多个层级和网络协议，那么网络为什么要分层呢？网络协议又是什么呢？请听我给你一一道来。

## 前置知识：网络分层和网络协议

在计算机网络时代初期，各大厂商推出了不同的网络架构和标准，为统一标准，国际标准化组织ISO推出了统一的OSI参考模型。

当前网络主要遵循的IEEE 802.3标准，就是基于OSI模型提出的，主要定义的是**物理层和数据链路层有线物理数据流传输的标准**。

那么问题来了，网络为什么要分层呢？

我们都知道网络是复杂的。对于复杂的问题，我们自然要**通过分层处理简化问题难度，降低复杂度**，由于分层后的各层之间相互独立，我们可以把大问题分割成小问题。同样，分层也保证了网络的松耦合和相对的灵活，分层拆分后易于各层的实现和维护，也方便了各层的后续扩展。

网络分层解决了网络复杂的问题，在网络中传输数据中，我们对**不同设备之间的传输数据的格式，需要定义一个数据标准，所以就有了网络协议。**

网络协议是双方通信的一种约定，以便双方都可以理


        }

        @Override
        public  Number next() {
            try {  j  = -1;
                switch (type) {
                    case DOUBLE:
                        return NumericUtils.sortableLongToDouble(/***/ values.longValue());
                    case FLOAT :
                        return NumericUtils. sortableIntToFloat ((int) values.longValue());
                    case INT:
                        return (int) values.longValue();
                    default :
                        return /***/ values.longValue();
                }
            } catch (IOException e ) {
                throw new CruxExemption(e);
            }
        }

    }

    /**
     * 数字集合类型值
     */
    public static class NumberSetValues extends Values<Number> {

        protected final TYPE type;
        protected int   j  =  -1 ;
        protected SortedNumericDocValues values = null;

        public NumberSetValues(String field, TYPE type) {
            super(field);
            this.type = type;
        }

        @Override
        public Object getDocValues() {
            return values;
        }

        @Override
        public void prepare(LeafReader r) throws IOException {
            values = r.getSortedNumericDocValues(field);
        }

        @Override
        public void collect(int i) throws IOException {
            if (values != null
            &&  values.advanceExact(i)) {
                j =  0;
            } else {
                j = -1;
            }
        }

        @Override
        public boolean hasNext() {
            return j != -1 && j < values.docValueCount();
        }

        @Override
        public  Number next() {
            try {  j ++ ;
                switch (type) {
                    case DOUBLE:
                        return NumericUtils.sortableLongToDouble(/***/ values.nextValue());
                    case FLOAT :
                        return NumericUtils. sortableIntToFloat ((int) values.nextValue());
                    case INT:
                        return (int) values.nextValue();
                    default :
                        return /***/ values.nextValue();
                }
            } catch (IOException e ) {
                throw new CruxExemption(e);
            }
        }

    }

    /**
     * 数字区间
     */
    public static class Range implements Comparable {
        public final double min;
        public final double max;
        public final boolean ge;
        public final boolean le;

        public Range(double n) {
            min  = n ;
            max  = n ;
            ge   = true;
            le   = true;
        }

        public Range(Number n) {
            double v = n.doubleValue();
            min  = v ;
            max  = v ;
            ge   = true;
            le   = true;
        }

        public Range(Object s) {
            Object[] a = Synt.toRange(s);
            if (a != null) {
                min = Synt.declare(a[0], Double.NEGATIVE_INFINITY);
                max = Synt.declare(a[1], Double.POSITIVE_INFINITY);
                ge  = (boolean) a[2];
                le  = (boolean) a[3];
            } else {
                min = Double.NEGATIVE_INFINITY;
                max = Double.POSITIVE_INFINITY;
                ge  = true;
                le  = true;
            }
        }

        public boolean covers(double n) {
            if (ge) { if (n <  min) {
                return false;
            }} else { if (n <= min) {
                return false;
            }}
            if (le) { if (n >  max) {
                return false;
            }} else { if (n >= max) {
                return false;
            }}
            return true;
        }

        public boolean covers(Number n) {
            double x = n.doubleValue( );
            return cover


-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the license found in the LICENSE file in
-- the root directory of this source tree. An additional grant of patent rights
-- can be found in the PATENTS file in the same directory.
--
--[[ A plain implementation of Nesterov's momentum
Implements Nesterov's momentum using the simplified
formulation of https://arxiv.org/pdf/1212.0901.pdf
ARGS:
- `opfunc` : a function that takes a single input (X), the point
             of a evaluation, and returns f(X) and df/dX
- `x`      : the initial point
- `config` : a table with configuration parameters for the optimizer
- `config.learningRate`      : learning rate
- `config.momentum`          : momentum
- `state`  : a table describing the state of the optimizer; after each
             call the state is modified
- `state.evalCounter`        : evaluation counter (optional: 0, by default)


;
      return null;
    }
  }

  /// Set nội dung clipboard
  Future<bool> setContent(ClipboardContent content) async {
    try {
      bool success = false;

      if (Platform.isMacOS) {
        switch (content.type) {
          case ClipboardContentType.text:
            Pasteboard.writeText(content.asText);
            success = true;
            break;
          case ClipboardContentType.image:
            await Pasteboard.writeImage(content.asImage);
            success = true;
            break;
          case ClipboardContentType.files:
            await Pasteboard.writeFiles(content.asFiles);
            success = true;
            break;
          default:
            debugPrint(
                'ClipboardWatcher: Unsupported content type for macOS: ${content.type}');
        }
      } else {
        if (content.type == ClipboardContentType.text) {
          await FlutterClipboard.copy(content.asText);
          success = true;
        } else {
          debugPrint('ClipboardWatcher: Only text supported on this platform');
        }
      }

      if (success) {
        // Cập nhật nội dung cuối cùng để tránh trigger false positive
        _lastClipboardContent = content;
      }

      return success;
    } catch (e) {
      debugPrint('ClipboardWatcher: Error setting content - $e');
      return false;
    }
  }

  /// Convenience method để set text
  Future<bool> setText(String text) async {
    return await setContent(ClipboardContent.text(text));
  }

  /// Dispose resources
  void dispose() {
    stopWatching();
    _changeController.close();
  }
}

/// Mixin để dễ dàng sử dụng ClipboardWatcher trong StatefulWidget
mixin ClipboardWatcherMixin<T extends StatefulWidget> {
  StreamSubscription<ClipboardChangeEvent>? _clipboardSubscription;

  /// Override method này để xử lý thay đổi clipboard
  void onClipboardChanged(ClipboardChangeEvent event) {}

  /// Bắt đầu lắng nghe clipboard
  void startListeningClipboard({
    Duration? pollingInterval,
    bool autoStartWatching = true,
  }) {
    _clipboardSubscription =
        ClipboardWatcher.instance.onClipboardChanged.listen(
      onClipboardChanged,
      onError: (error) {
        debugPrint('ClipboardWatcherMixin: Error - $error');
      },
    );

    if (autoStartWatching && !ClipboardWatcher.instance.isWatching) {
      ClipboardWatcher.instance.startWatching(pollingInterval: pollingInterval);
    }
  }

  /// Dừng lắng nghe clipboard
  void stopListeningClipboard({bool stopWatcher = false}) {
    _clipboardSubscription?.cancel();
    _clipboardSubscription = null;

    if (stopWatcher) {
      ClipboardWatcher.instance.stopWatching();
    }
  }
}

/// Static helper functions cho clipboard operations
class ClipboardHelper {
  /// Quick start watching với default settings
  static Future<void> startWatching({
    Duration pollingInterval = const Duration(milliseconds: 500),
  }) async {
    await ClipboardWatcher.instance.startWatching(
      pollingInterval: pollingInterval,
    );
  }

  /// Quick stop watching
  static void stopWatching() {
    ClipboardWatcher.instance.stopWatching();
  }

  /// Listen to clipboard changes
  static StreamSubscription<ClipboardChangeEvent> listen(
    void Function(ClipboardChangeEvent) onChanged, {
    Duration? pollingInterval,
    bool autoStart = true,
  }) {
    if (autoStart && !ClipboardWatcher.instance.isWatching) {


-origin:50% 75%;transform-origin:50% 75%}.ui.scale.down.bottom.sidebar~.pusher{-webkit-transform-origin:50% 25%;transform-origin:50% 25%}.ui.animating.scale.down>.visible.ui.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.animating.scale.down.sidebar~.pusher,.ui.visible.scale.down.sidebar~.pusher{display:block!important;width:100%;height:100%;overflow:hidden!important}.ui.visible.scale.down.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.scale.down.sidebar~.pusher{-webkit-transform:scale(.75);transform:scale(.75)}
/*!
 * # Semantic UI 2.2.7 - Popup
 * http://github.com/semantic-org/semantic-ui/
 *
 *
 * Released under the MIT license
 * http://opensource.org/licenses/MIT
 *
 */.ui.popup{display:none;position:absolute;top:0;right:0;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;z-index:1900;border:1px solid #D4D4D5;line-height:1.4285em;max-width:250px;background:#FFF;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.14285714em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.71428571em;height:.71428571em;background:#FFF;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #bababc}[data-tooltip]{position:relative}[data-tooltip]:not([data-position]):before{top:auto;right:auto;bottom:100%;left:50%;background:#FFF;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-tooltip]:not([data-position]):after{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:100%;margin-bottom:.5em}[data-tooltip]:after,[data-tooltip]:before{pointer-events:none;visibility:hidden}[data-tooltip]:before{position:absolute;content:'';font-size:1rem;width:.71428571em;height:.71428571em;background:#FFF;z-index:2;box-shadow:1px 1px 0 0 #bababc;opacity:0;-webkit-transform:rotate(45deg) scale(0)!important;transform:rotate(45deg) scale(0)!important;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:after{content:attr(data-tooltip);position:absolute;text-transform:none;text-align:left;white-space:nowrap;font-size:1rem;border:1px solid #D4D4D5;line-height:1.4285em;max-width:none;background:#FFF;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);z-index:1;opacity:1;-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:hover:after,[data-too


ého hříšníka. Viděli jsme, jaký chaos vnesla Davidova lenost do jeho rodiny. Bez ohledu na to, v jaké se nacházíte životní situaci, přemýšlejte o svých zodpovědnostech a o tom, jak váš vnitřní život ovlivňuje lidi okolo vás. Jak si stojíte? Je zapotřebí něco změnit? Předložte to Bohu v modlitbě a požádejte ho, aby vám ve vaší péči o druhé požehnal.
## 50. **„Otec lži“**

Snažme se být tento den otevření Boží otcovské lásce.

Ptejme se: Jak mám tuto lásku projevovat těm, kdo jsou svěřeni do mé péče?

**Stáváme se svědky chaosu v Davidově domácnosti**. Hříchy krále Davida, zejména to, jak zanedbává své děti, mají katastrofální důsledky pro jednotlivé osoby i pro celý národ. Nechť je nám to připomínkou toho, abychom si vážili daru duchovního otcovství.

Modlete se, aby vás Pán osvobodil od lenosti a přijali jste královské poslání, které vám svěřil.

Modlete se za milost svobody a pokory pro všechny muže Exodu, stejně jako se oni modlí za vás.

_Ve jménu Otce i Syna i Ducha svatého. Amen._

_Pane a Učiteli mého života, osvoboď mě od ducha lhostejnosti, zoufalství, touhy po moci a planého tlachání. Místo toho mě, svého služebníka, obdaruj duchem poctivosti, pokory, trpělivosti a lásky. Ano, Pane a Králi, dej, ať vidím své vlastní hříchy a nesoudím své bratry a sestry, neboť ty jsi požehnaný na věky věků. Amen._

### Čtení z druhé knihy Samuelovy 15,7-12

_Když Abšalóm dovršil čtyřicet let, řekl králi: „Dovol mi jít do Chebrónu splnit slib, který jsem učinil Hospodinu. Tvůj služebník totiž, když bydlel v Gešúru v Aramu, učinil takovýto slib: Dá-li Hospodin, abych se vrátil do Jeruzaléma, budu sloužit Hospodinu.“ Král mu řekl: „Jdi v pokoji!“ A on hned odešel do Chebrónu. Abšalóm poslal do všech izraelských kmenů zvědy s rozkazem: „Jakmile uslyšíte polnici, provolejte: Abšalóm se stal v Chebrónu králem!“ S Abšalómem šlo z Jeruzaléma dvě stě mužů. Byli pozváni, šli bezelstně, nic netušili. Abšalóm též poslal pro Achítofela Gíloského, rádce Davidova, do jeho města Gíla, zatímco připravoval obětní hody. Spiknutí nabývalo síly a s Abšalómem šlo stále více lid


index": totalCount - index,
        transform: `${scaleClause} ${translateClause}`,
        filter: `brightness(${(totalCount - index) / totalCount})`,
    };
}

// eslint-disable no-magic-numbers
export const cardStack = trigger("cardStack", [
    state("0", style(calculateStyles(0, cardCount))),
    state("1", style(calculateStyles(1, cardCount))),
    state("2", style(calculateStyles(2, cardCount))),
    state("3", style(calculateStyles(3, cardCount))),
    state("4", style(calculateStyles(4, cardCount))),
    state("void", style({ ...calculateStyles(5, 5), opacity: 0 })),
    transition(":leave", [
        style({ opacity: 1 }),
        animate("500ms linear", style({ opacity: 0, transform: "scale(0.5) translateY(10rem)" })),
    ]),
    transition("* <=> *", animate("500ms cubic-bezier(0.68, -0.55, 0.27, 1.55)"))
]);
// eslint-enable no-magic-numbers

export class ImageDetectionReq {
    public url?: string;
    public image?: string;
    private 'moderation_rule'?: string;
    public categories?: Array<ImageDetectionReqCategoriesEnum> | Array<string>;
    private 'ad_categories'?: Array<string>;
    public threshold?: number;
    private 'show_ocr_text'?: boolean;
    public constructor() {
    }
    public withUrl(url: string): ImageDetectionReq {
        this['url'] = url;
        return this;
    }
    public withImage(image: string): ImageDetectionReq {
        this['image'] = image;
        return this;
    }
    public withModerationRule(moderationRule: string): ImageDetectionReq {
        this['moderation_rule'] = moderationRule;
        return this;
    }
    public set moderationRule(moderationRule: string  | undefined) {
        this['moderation_rule'] = moderationRule;
    }
    public get moderationRule(): string | undefined {
        return this['moderation_rule'];
    }
    public withCategories(categories: Array<ImageDetectionReqCategoriesEnum> | Array<string>): ImageDetectionReq {
        this['categories'] = categories;
        return this;
    }
    public withAdCategories(adCategories: Array<string>): ImageDetectionReq {
        this['ad_categories'] = adCategories;
        return this;
    }
    public set adCategories(adCategories: Array<string>  | undefined) {
        this['ad_categories'] = adCategories;
    }
    public get adCategories(): Array<string> | undefined {
        return this['ad_categories'];
    }
    public withThreshold(threshold: number): ImageDetectionReq {
        this['threshold'] = threshold;
        return this;
    }
    public withShowOcrText(showOcrText: boolean): ImageDetectionReq {
        this['show_ocr_text'] = showOcrText;
        return this;
    }
    public set showOcrText(showOcrText: boolean  | undefined) {
        this['show_ocr_text'] = showOcrText;
    }
    public get showOcrText(): boolean | undefined {
        return this['show_ocr_text'];
    }
}

/**
    * @export
    * @enum {string}
    */
export enum ImageDetectionReqCategoriesEnum {
    POLITICS = 'politics',
    TERRORISM = 'terrorism',
    PORN = 'porn',
    AD = 'ad',
    ALL = 'all'
}
namespace Exercise2_4 {

    export interface AvatarPart {
        image: string;
        part: string;
    }

    export interface AllAvatarParts {
        faces: AvatarPart[];
        shirts: AvatarPart[];
        pants: AvatarPart[];
    }

    export interface Avatar {
    face: AvatarPart;
    shirt: AvatarPart;
    pant: AvatarPart;


143a2.807 2.807 0 001.918.813.8.8 0 01.553.227l9.468 9.468-2.216 2.216Zm-5.56-12.821a3.78 3.78 0 00-.836-.695l2.7-2.7.765.766-2.629 2.629Zm9.07-3.623-.5 2.837a.6.6 0 01-.162.315.55.55 0 01-.393.167.558.558 0 01-.395-.164L19.862 7.76l3.666-3.666 4.138 4.138a4.543 4.543 0 011.263 3.99Z"/></svg>';
  static const String hammer_and_wrench =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="m16.154 3.901-2.492 2.492 1.768 1.768a1.5 1.5 0 01.293 1.707l1.357 1.358 1.939-1.952a6.07 6.07 0 011.715-5.567l.003-.003a6.062 6.062 0 015.65-1.53c1.214.296 1.617 1.8.75 2.668L24.88 7.1l1.026 1.026 2.254-2.254c.89-.908 2.384-.435 2.672.745l.001.003a6.061 6.061 0 01-7.122 7.371l-1.925 1.94 7.16 7.16a4 4 0 11-5.657 5.656l-7.14-7.14-1.375 1.384a6.07 6.07 0 01-1.727 5.512l-.003.003a6.062 6.062 0 01-5.651 1.53c-1.213-.297-1.616-1.802-.75-2.668l2.259-2.258-1.026-1.026-2.253 2.253c-.89.909-2.385.436-2.673-.745l-.001-.003A6.061 6.061 0 016.8 18.444a1.23 1.23 0 01-.096-.087L.366 12.02a1.251 1.251 0 010-1.768l.788-.788a3 3 0 012.52-.852 2 2 0 01.089-.1l7.073-7.073a1.5 1.5 0 011.219-.43l3.2.338a1.5 1.5 0 01.904 2.555h-.005ZM5.53 9.575l3.894 3.888 4.242-4.243-1.6-1.6a1.688 1.688 0 01-.466-1.626c.15-.606.566-1 1.31-1.704.306-.29.668-.634 1.09-1.066l-1.918-.2L5.53 9.575Zm3.205 8.518c.466-.008.933.038 1.39.137l1.318-1.327-1.31-1.31a2.987 2.987 0 01-.874 1.975l-.524.525Zm4.118-2.61 2.818-2.838-1.302-1.302-2.828 2.828 1.312 1.312Zm4.704 4.704 7.145 7.145a2 2 0 002.828-2.828l-7.155-7.154-2.818 2.837ZM2.569 10.879l-.258.258 5.276 5.276.258-.258a1 1 0 000-1.414l-3.862-3.862a1 1 0 00-1.414 0Zm19.556-5.734a4.078 4.078 0 00-1.043 4.136l.179.575L10.699 20.49l-.587-.194a4.058 4.


{
      TextWriter tw = new StreamWriter(file);
      tw.WriteLine("digraph callgraph {");

      foreach (Method node in this.callGraph.Nodes) {
        WriteNode(tw, node);

        foreach (Pair<Unit, Method> edge in this.callGraph.Successors(node)) {
          WriteEdge(tw, node, edge.Two);
        }
      }

      tw.WriteLine("}");
      tw.Close();
    }

    string MethodID(Method node)
    {
      retu


р","tools":"Кораллар"},"toolbars":"Editor toolbars"},"elementspath":{"eleLabel":"Elements path","eleTitle":"%1 элемент"},"find":{"find":"Эзләү","findOptions":"Эзләү көйләүләре","findWhat":"Нәрсә эзләргә:","matchCase":"Баш һәм юл хәрефләрен исәпкә алу","matchCyclic":"Кабатлап эзләргә","matchWord":"Сүзләрне тулысынча гына эзләү","notFoundMsg":"Эзләнгән текст табылмады.","replace":"Алмаштыру","replaceAll":"Барысын да алмаштыру","replaceSuccessMsg":"%1 урында(ларда) алмаштырылган.","replaceWith":"Нәрсәгә алмаштыру:","title":"Эзләп табу һәм алмаштыру"},"fakeobjects":{"anchor":"Якорь","flash":"Флеш анимациясы","hiddenfield":"Яшерен кыр","iframe":"IFrame","unknown":"Танылмаган объект"},"flash":{"access":"Script Access","accessAlways":"Һəрвакыт","accessNever":"Беркайчан да","accessSameDomain":"Same domain","alignAbsBottom":"Иң аска","alignAbsMiddle":"Төгәл уртада","alignBaseline":"Таяныч сызыгы","alignTextTop":"Текст өсте","bgcolor":"Фон төсе","chkFull":"Allow Fullscreen","chkLoop":"Әйләнеш","chkMenu":"Enable Flash Menu","chkPlay":"Auto Play","flashvars":"Variables for Flash","hSpace":"Горизонталь ара","properties":"Флеш үзлекләре","propertiesTab":"Үзлекләр","quality":"Сыйфат","qualityAutoHigh":"Авто югары сыйфат","qualityAutoLow":"Авто түбән сыйфат","qualityBest":"Иң югары сыйфат","qualityHigh":"Югары","qualityLow":"Түбəн","qualityMedium":"Уртача","scale":"Зурлык","scaleAll":"Барысын күрсәтү","scaleFit":"Exact Fit","scaleNoBorder":"Чиксез","title":"Флеш үзлекләре","vSpace":"Вертикаль ара","validateHSpace":"Горизонталь ара  сан булырга тиеш.","validateSrc":"URL буш булмаска тиеш.","validateVSpace":"Вертикаль ара  сан булырга тиеш.","windowMode":"Тəрəзə тәртибе","windowModeOpaque":"Үтә күренмәле","windowModeTransparent":"Үтə күренмəле","windowModeWindow":"Тəрəзə"},"font":{"fontSize":{"label":"Зурлык","voiceLabel":"Шрифт зурлыклары","panelTitle":"Шрифт зурлыклары"},"label":"Шрифт","panelTitle":"Шрифт исеме","voiceLabel":"Шрифт"},"forms":{"button":{"title":"Төймә үзлекләре","text":"Текст (күләм)","type":"Төр","typeBtn":"Төймә","typeSbm":"Җиб�


build !fuzzlight

package keccakf

import (
	"testing"

	"github.com/consensys/linea-monorepo/prover/crypto/keccak"
	"github.com/consensys/linea-monorepo/prover/maths/field"
	"github.com/stretchr/testify/assert"
)

func TestLookupsBaseAToBaseB(t *testing.T) {

	baseADirty, baseBClean := valBaseXToBaseY(BaseA, BaseB, 0)

	for i := 0; i < BaseAPow4; i++ {
		// baseADirty is equal to i
		dirtyA := baseADirty.Get(i)
		assert.Equal(t, uint64(i), dirtyA.Uint64(), "base A dirty")

		// cleanB is consistent with the declaration that dirty
		cleanB := baseBClean.Get(i)
		assert.Equal(t, BaseXToU64(dirtyA, &BaseAFr), BaseXToU64(cleanB, &BaseBFr), "base B clean")

		if t.Failed() {
			t.Fatalf("BaseA to BaseB failed")
		}
	}
}

func TestLookupsBaseBToBaseA(t *testing.T) {

	baseBDirty, baseAClean := valBaseXToBaseY(BaseB, BaseA, 1)

	for i := 0; i < BaseBPow4; i++ {
		// baseBDirty is equal to i
		dirtyB := baseBDirty.Get(i)
		assert.Equal(t, uint64(i), dirtyB.Uint64(), "base B dirty")

		// cleanA is consistent with the declaration that dirty
		cleanA := baseAClean.Get(i)
		assert.Equal(
			t,
			BaseXToU64(dirtyB, &BaseBFr, 1),
			BaseXToU64(cleanA, &BaseAFr),
			"base A clean",
		)

		if t.Failed() {
			t.Fatalf("BaseB to BaseA failed at %v", i)
		}
	}
}

func TestVectorBaseBToBaseA(t *testing.T) {

	baseBDirty, baseAClean := valBaseXToBaseY(BaseB, BaseA, 1)

	cases := []struct {
		pos   int
		baseB field.Element
		baseA field.Element
	}{
		{pos: 1872, baseB: field.NewElement(1872), baseA: field.NewElement(1)},
		{pos: 642, baseB: field.NewElement(642), baseA: field.NewElement(12)},
		{pos: 7777, baseB: field.NewElement(7777), baseA: field.NewElement(12)},
	}

	for _, c := range cases {
		dirtyB, cleanA := baseBDirty.Get(c.pos), baseAClean.Get(c.pos)
		assert.Equal(t, c.baseB.String(), dirtyB.String(), "wrong baseB")
		assert.Equal(t, c.baseA.String(), cleanA.String(), "wrong baseA")
	}
}

func TestRC(t *testing.T) {

	rc := valRCBase2Pattern()

	for i := range rc {
		expected := keccak.RC[i]
		actual := BaseXToU64(rc[i], &BaseBFr)
		assert.Equal(t, expected, actual, "row %v", i)
	}
}
package execution

import (
	"fmt"
	"path/filepath"

	"github.com/consensys/gnark-crypto/ecc"
	"github.com/consensys/linea-monorepo/prover/circuits"
	"github.com/consensys/linea-monorepo/prover/circuits/dummy"
	"github.com/consensys/linea-monorepo/prover/circuits/execution"
	"github.com/consensys/linea-monorepo/prover/config"
	public_input "github.com/consensys/linea-monorepo/prover/public-input"
	"github.com/consensys/linea-monorepo/prover/utils"
	"github.com/consensys/linea-monorepo/prover/utils/exit"
	"github.com/consensys/linea-monorepo/prover/utils/profiling"
	"github.com/consensys/linea-monorepo/prover/zkevm"
	"github.com/s


ize>, Option<(usize, (usize, &'input str), usize)>, __Nonterminal<>);
        match __lookahead {
            None => {
                let __sym0 = __sym0.take().unwrap();
                let __nt = super::__action1(input, __sym0);
                return Ok((__lookbehind, __lookahead, __Nonterminal::Term(__nt)));
            }
            _ => {
                return Err(__ParseError::UnrecognizedToken {
                    token: __lookahead,
                    expected: vec![],
                });
            }
        }
    }

    // State 4
    //   Num = r#"[0-9]+"# (*) [EOF]
    //
    //   EOF -> Reduce(Num = r#"[0-9]+"# => Call(ActionFn(3));)
    //
    pub fn __state4<
        'input,
        __TOKENS: Iterator<Item=Result<(usize, (usize, &'input str), usize),__ParseError<usize,(usize, &'input str),()>>>,
    >(
        input: &'input str,
        __lookbehind: Option<usize>,
        __tokens: &mut __TOKENS,
        __sym0: &mut Option<&'input str>,
    ) -> Result<(Option<usize>, Option<(usize, (usize, &'input str), usize)>, __Nonterminal<>), __ParseError<usize,(usize, &'input str),()>>
    {
        let mut __result: (Option<usize>, Option<(usize, (usize, &'input str), usize)>, __Nonterminal<>);
        let __lookahead = match __tokens.next() {
            Some(Ok(v)) => Some(v),
            None => None,
            Some(Err(e)) => return Err(e),
        };
        match __lookahead {
            None => {
                let __sym0 = __sym0.take().unwrap();
                let __nt = super::__action3(input, __sym0);
                return Ok((__lookbehind, __lookahead, __Nonterminal::Num(__nt)));
            }
            _ => {
                return Err(__ParseError::UnrecognizedToken {
                    token: __lookahead,
                    expected: vec![],
                });
            }
        }
    }

    // State 5
    //   Num = r#"[0-9]+"# (*) [")"]
    //
    //   ")" -> Reduce(Num = r#"[0-9]+"# => Call(ActionFn(3));)
    //
    pub fn __state5<
        'input,
        __TOKENS: Iterator<Item=Result<(usize, (usize, &'input str), usize),__ParseError<usize,(usize, &'input str),()>>>,
    >(
        input: &'input str,
        __lookbehind: Option<usize>,
        __tokens: &mut __TOKENS,
        __sym0: &mut Option<&'input str>,
    ) -> Result<(Option<usize>, Option<(usize, (usize, &'input str), usize)>, __Nonterminal<>), __ParseError<usize,(usize, &'input str),()>>
    {
        let mut __result: (Option<usize>, Option<(usize, (usize, &'input str), usize)>, __Nonterminal<>);
        let __lookahead = match __tokens.next() {
            Some(Ok(v)) => Some(v),
            None => None,
            Some(Err(e)) => return Err(e),
        };
        match __lookahead {
            Some((_, (0, _), _)) => {
                let __sym0 = __sym0.take().unwrap();
                let __nt = super::__action3(input, __sym0);
                return Ok((__lookbehind, __lookahead, __Nonterminal::Num(__nt)));
            }
            _ => {
                return Err(__ParseError::UnrecognizedToken {
                    token: __lookahead,


    self.assertFalse(gfile.Exists(base_dir))
    for p in xrange(3):
      gfile.MakeDirs(os.path.join(base_dir, "%d" % p))
    # add a base_directory to ignore
    gfile.MakeDirs(os.path.join(base_dir, "ignore"))

    self.assertEqual(
        gc.get_paths(base_dir, _create_parser(base_dir)), [
            gc.Path(os.path.join(base_dir, "0"), 0),
            gc.Path(os.path.join(base_dir, "1"), 1),
            gc.Path(os.path.join(base_dir, "2"), 2)
        ])

  def testMixedStrTypes(self):
    temp_dir = compat.as_bytes(test.get_temp_dir())

    for sub_dir in ["str", b"bytes", u"unicode"]:
      base_dir = os.path.join(
          (temp_dir
           if isinstance(sub_dir, bytes) else temp_dir.decode()), sub_dir)
      self.assertFalse(gfile.Exists(base_dir))
      gfile.MakeDirs(os.path.join(compat.as_str_any(base_dir), "42"))
      gc.get_paths(base_dir, _create_parser(base_dir))

if __name__ == "__main__":
  test.main()


anager, mock)

	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	height := int64(42)
	if ok := bo.processBlock(ctx, height); !ok {
		t.Fatalf("processBlock returned false")
	}

	// Expect 3 messages (one per tx)
	eventTypeToAttrCount := make(map[string]int)
	eventTypeToAttrNames := make(map[string]map[string]int)
	for i := 0; i < 3; i++ {
		select {
		case <-time.After(1 * time.Second):
			t.Fatalf("timeout waiting for event %d", i)
		case ev := <-bo.Queue.Out:
			if ev == nil {
				t.Fatalf("nil event")
			}
			if ev.Result.Data.Type != "tendermint/event/Tx" {
				t.Fatalf("unexpected type: %s", ev.Result.Data.Type)
			}
			if ev.Result.Events["tx.height"][0] != strconv.FormatInt(height, 10) {
				t.Fatalf("tx.height mismatch: %v", ev.Result.Events["tx.height"])
			}
			// Our mock emits inference_finished.inference_id
			if len(ev.Result.Events["inference_finished.inference_id"]) == 0 {
				t.Fatalf("expected inference_finished.inference_id in events")
			}

			// accumulate stats by event type
			for k, vals := range ev.Result.Events {
				parts := strings.SplitN(k, ".", 2)
				etype := parts[0]
				eventTypeToAttrCount[etype] += len(vals)
				if _, ok := eventTypeToAttrNames[etype]; !ok {
					eventTypeToAttrNames[etype] = make(map[string]int)
				}
				aname := ""
				if len(parts) > 1 {
					aname = parts[1]
				}
				eventTypeToAttrNames[etype][aname] += len(vals)
			}
		}
	}

	// Log stats for mock
	types := make([]string, 0, len(eventTypeToAttrCount))
	for k := range eventTypeToAttrCount {
		types = append(types, k)
	}
	sort.Strings(types)
	for _, et := range types {
		attrMap := eventTypeToAttrNames[et]
		attrNames := make([]string, 0, len(attrMap))
		for n := range attrMap {
			attrNames = append(attrNames, n)
		}
		sort.Strings(attrNames)
		// print top-level count and a compact attribute list
		t.Logf("mock stats: type=%s total_attrs=%d distinct_attrs=%d", et, eventTypeToAttrCount[et], len(attrNames))
	}
}

// TestProcessBlock_RealNodeParse hits a real node if env vars are set.
// Env: DAPI_TEST_RPC_URL, DAPI_TEST_BLOCK_HEIGHT
func TestProcessBlock_RealNodeParse(t *testing.T) {
	url := os.Getenv("DAPI_TEST_RPC_URL")
	heightStr := os.Getenv("DAPI_TEST_BLOCK_HEIGHT")
	if url == "" || heightStr == "" {
		t.Skip("set DAPI_TEST_RPC_URL and DAPI_TEST_BLOCK_HEIGHT to run this test")
	}

	h, err := strconv.ParseInt(heightStr, 10, 64)
	if err != nil {
		t.Fatalf("invalid DAPI_TEST_BLOCK_HEIGHT: %v", err)
	}

	client, err := cosmosclient.NewRpcClient(url)
	if err != nil {
		t.Fatalf("failed to create rpc client: %v", err)
	}

	// Probe expected tx count first
	ctx := context.Background()
	res, err := client.BlockResults(ctx, &h)
	if err != nil || res == nil {
		t.Fatalf("failed BlockResults probe: %v", err)
	}
	expected := len(res.TxsResults)

	manager := &apiconfig.ConfigManager{}
	bo := NewBlockObserverWithClient(manager, client)

	if ok := bo.processBlock(ctx, h); !ok {
		t.


�
            val concurrencyGroupRunning = pipelineRuntimeService.getBuildInfoListByConcurrencyGroup(
                projectId = projectId,
                concurrencyGroup = concurrencyGroup,
                status = listOf(BuildStatus.RUNNING)
            ).toMutableList()

            // #8143 兼容旧流水线版本 TODO 待模板设置补上漏洞，后期下掉 #8143
            if (concurrencyGroup == pipelineId) {
                concurrencyGroupRunning.addAll(
                    0,
                    pipelineRuntimeService.getBuildInfoListByConcurrencyGroupNull(
                        projectId = projectId,
                        pipelineId = pipelineId,
                        status = listOf(BuildStatus.RUNNING)
                    )
                )
            }

            LOG.info("ENGINE|$buildId|$source|CHECK_GROUP_TYPE|$concurrencyGroup|${concurrencyGroupRunning.count()}")
            if (concurrencyGroupRunning.isNotEmpty()) {
                // 需要重新入队等待
                pipelineRuntimeService.updateBuildInfoStatus2Queue(
                    projectId = projectId,
                    buildId = buildId,
                    oldStatus = BuildStatus.QUEUE_CACHE,
                    showMsg = I18nUtil.getCodeLanMessage(
                        messageCode = BUILD_QUEUE_FOR_CONCURRENCY,
                        defaultMessage = "QUEUE: concurrency for group($concurrencyGroup)",
                        params = arrayOf(concurrencyGroup)
                    )
                )
                if (setting.concurrencyCancelInProgress) {
                    val detailUrl = pipelineUrlBean.genBuildDetailUrl(
                        projectCode = projectId,
                        pipelineId = buildInfo.pipelineId,
                        buildId = buildInfo.buildId,
                        position = null,
                        stageId = null,
                        needShortUrl = false
                    )
                    concurrencyGroupRunning.forEach { (pipelineId, buildId) ->
                        pipelineRuntimeService.concurrencyCancelBuildPipeline(
                            projectId = projectId,
                            pipelineId = pipelineId,
                            buildId = buildId,
                            userId = buildInfo.startUser,
                            groupName = concurrencyGroup,
                            detailUrl = detailUrl
                        )
                    }
                }
                val detailUrl = pipelineUrlBean.genBuildDetailUrl(
                    projectCode = projectId,
                    pipelineId = concurrencyGroupRunning.first().first,
                    buildId = concurrencyGroupRunning.first().second,
                    position = null,
                    stageId = null,
                    needShortUrl = false
                )
                buildLogPrinter.addLine(
                    message = I18nUtil.getCodeLanMessage(
                        messageCode = ProcessMessageCode.BK_BUILD_QUEUE_WAIT_FOR_CONCURRENCY,
                        params = arrayOf(
                            setting.runLockType.name, concurrencyGroup,
                            concurrencyGroupRunning.count().toString(),
                            "${concurrencyGroupRunning.first().second}"
                        )
                    ),
                    buildId = buildId, tag = TAG, containerHashId = JOB_ID, executeCount = executeCount,
                    jobId = null, stepId = TAG
                )
                checkStart = false
            }
        }
        return checkStart
    }

    private fun PipelineBuildStartEvent.checkRunningCountWithLimit(
        setting: PipelineSetting,
        executeCount: Int,
        limitCount: Int
    ): Boolean {
        val runningCount = pipelineRuntimeService.getRunningBuildCount(projectId, pipelineId)
        if (runningCount >= limitCount) {
            // 需要重新入队等待
            pipelineRuntimeService.updateBuildInfoStatus2Queue(


l	TEMP1, 0 + ZBASE_SHIFT, TEMP2
	sll	TEMP1, 1 + ZBASE_SHIFT, TEMP1
	add	AORIG, TEMP2, AO
	add	B,     TEMP1, BO
#endif

	FADD2	c02, t1, c02
	FADD4	c04, t2, c04
	FADD2	c06, t3, c06
	FADD4	c08, t4, c08

	FADD	c01, c04, c01
	FADD	c02, c03, c02
	FADD	c05, c08, c05
	FADD	c06, c07, c06

#if defined(LN) || defined(LT)
	LDF	[BO +  0 * SIZE], a1
	LDF	[BO +  1 * SIZE], a2
	LDF	[BO +  2 * SIZE], a3
	LDF	[BO +  3 * SIZE], a4

	FSUB	a1, c01, c01
	FSUB	a2, c02, c02
	FSUB	a3, c05, c05
	FSUB	a4, c06, c06

#else
	LDF	[AO +  0 * SIZE], a1
	LDF	[AO +  1 * SIZE], a2
	LDF	[AO +  2 * SIZE], a3
	LDF	[AO +  3 * SIZE], a4

	FSUB	a1, c01, c01
	FSUB	a2, c02, c02
	FSUB	a3, c05, c05
	FSUB	a4, c06, c06
#endif

#ifdef LN
	LDF	[AO +  0 * SIZE], a1
	LDF	[AO +  1 * SIZE], a2

	FMUL	a1, c01, t1
	FMUL	a2, c02, t2
	FMUL	a1, c02, t3
	FMUL	a2, c01, t4

	FMUL	a1, c05, t5
	FMUL	a2, c06, t6
	FMUL	a1, c06, t7
	FMUL	a2, c05, t8

	FADD4	t1, t2, c01
	FADD2	t3, t4, c02
	FADD4	t5, t6, c05
	FADD2	t7, t8, c06
#endif

#ifdef LT
	LDF	[AO +  0 * SIZE], a1
	LDF	[AO +  1 * SIZE], a2

	FMUL	a1, c01, t1
	FMUL	a2, c02, t2
	FMUL	a1, c02, t3
	FMUL	a2, c01, t4

	FMUL	a1, c05, t5
	FMUL	a2, c06, t6
	FMUL	a1, c06, t7
	FMUL	a2, c05, t8

	FADD4	t1, t2, c01
	FADD2	t3, t4, c02
	FADD4	t5, t6, c05
	FADD2	t7, t8, c06
#endif

#ifdef RN
	LDF	[BO +  0 * SIZE], a1
	LDF	[BO +  1 * SIZE], a2
	LDF	[BO +  2 * SIZE], a3
	LDF	[BO +  3 * SIZE], a4
	LDF	[BO +  6 * SIZE], b1
	LDF	[BO +  7 * SIZE], b2

	FMUL	a1, c01, t1
	FMUL	a2, c02, t2
	FMUL	a1, c02, t3
	FMUL	a2, c01, t4

	FADD4	t1, t2, c01
	FADD3	t3, t4, c02

	FMUL	a3,


(v_degree == 0)
            return Double.NaN;
        if (v_degree == 1)
            return 1;

        double v_constraint = aggregateConstraint(v);

        double numerator = 0;
        for (V w : g.getNeighbors(v)) {

            if (v != w)
            {
                double sl_constraint = localConstraint(v, w) / (v_constraint / v_degree);
                numerator += sl_constraint * Math.log(sl_constraint);
            }
        }

        return numerator / (v_degree * Math.log(v_degree));
    }

    /**
     * Returns the local constraint on v1 from a lack of primary holes
     * around its neighbor v2.
     * Based on Burt's equation 2.4.  Formally:
     *

     * localConstraint(v1, v2) = ( p(v1,v2) + ( sum_{w in N(v)} p(v1,w) * p(w, v2) ) )^2
     *

     * where
     *

     *
N(v) = v.getNeighbors()
     *
p(v,w) = normalized mutual edge weight of v and w
     *

     * @param v1 the first vertex whose local constraint is desired
     * @param v2 the second vertex whose local constraint is desired
     * @return the local constraint on (v1, v2)
     * @see #normalizedMutualEdgeWeight(Object, Object)
     */
    public double localConstraint(V v1, V v2)
    {
        double nmew_vw = normalizedMutualEdgeWeight(v1, v2);
        double inner_result = 0;
        for (V w : g.getNeighbors(v1)) {

            inner_result += normalizedMutualEdgeWeight(v1,w) *
                normalizedMutualEdgeWeight(w,v2);
        }
        return (nmew_vw + inner_result) * (nmew_vw + inner_result);
    }

    /**
     * The aggregate constraint on v.  Based on Burt's equation 2.7.
     * Formally:
     *

     * aggregateConstraint(v) = sum_{w in N(v)} localConstraint(v,w) * O(w)
     *

     * where
     *

     *
N(v) = v.getNeighbors()
     *
O(w) = organizationalMeasure(w)
     *

     *
     * @param v the vertex whose properties are being measured
     * @return the aggregate constraint on v
     */
    public double aggregateConstraint(V v)
    {
        double result = 0;
        for (V w : g.getNeighbors(v)) {

            result += localConstraint(v, w) * organizationalMeasure(g, w);
        }
        return result;
    }

    /**
     * A measure of the organization of individuals within the subgraph
     * centered on v.  Burt's text suggests that this is
     * in some sense a measure of how "replaceable" v is by
     * some other element of this subgraph.  Should be a number in the
     * closed interval [0,1].
     *
     *
This implementation returns 1.  Users may wish to override this
     * method in order to define their own behavior.
     * @param g the subgraph centered on v
     * @param v the vertex whose properties are being measured
     * @return 1.0 (in this implementation)
     */
    protected double organizationalMeasure(Graph<V,E> g, V v) {
        return 1.0;
    }

    /**
     * Returns the proportion of v1's network time and energy invested
     * in the relationship with v2.  Formally:
     * <pre


lic SimpleDialogWithResult(final String title, final String message, final DialogButton<R>... buttons) {
        this(title, message, new ImageIcon(Images.QUESTION_64_URL), buttons);

    }

    public SimpleDialogWithResult(final String title, final String message, final ImageIcon imageIcon, final DialogButton<R>... buttons) {
        super(title, buttons);
        this.message = message;
        this.imageIcon = imageIcon;
    }

    protected JPanel createContentPane(final List<DialogButton<R>> buttons) {
        final IconComponent icon = new IconComponent(imageIcon);

        final JTextArea messageLabel = new JTextArea(message);
        messageLabel.setEditable(false);
        messageLabel.setBackground(null);
        messageLabel.setWrapStyleWord(true);
        messageLabel.setLineWrap(true);
        messageLabel.setColumns(50);

        final JPanel messageWrapperPanel = new JPanel();
        messageWrapperPanel.setLayout(LayoutFactory.createBorderLayout(12, 12));
        messageWrapperPanel.add(icon, BorderLayout.WEST);
        messageWrapperPanel.add(messageLabel, BorderLayout.CENTER);

        final JPanel actionWrapperPanel = new JPanel();
        actionWrapperPanel.setLayout(LayoutFactory.createBoxLayout(actionWrapperPanel, BoxLayout.LINE_AXIS));
        actionWrapperPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
        actionWrapperPanel.add(Box.createHorizontalGlue());

        buttons.forEach(b -> {
            final JButton button = new JButton(b.getText());
            if (b.getDescription() != null) {
                button.setToolTipText(b.getDescription());
            }
            button.addActionListener(e -> {
                final R result = b.getOnAction().get();
                closeWithResult(result);
            });
            actionWrapperPanel.add(button);
        });

        final JPanel contentPanel = new JPanel();
        contentPanel.setLayout(LayoutFactory.createBorderLayout(12, 12));
        contentPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
        contentPanel.add(messageWrapperPanel, BorderLayout.CENTER);
        contentPanel.add(actionWrapperPanel, BorderLayout.SOUTH);
        return contentPanel;
    }

    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        final String msg1 = "This is a long text that should be displayed in more than 1 line. This is a long text that should be displayed in more than 1 line. This is a long text that should be displayed in more than 1 line.";
        final String msg2 = "Connection failed for URL: https://docs.oracle.com/javase/tutorialJWS/samples/uiswing/AccessibleScrollDemoProject/AccessibleScrollDemo.jnlp." +
                "\n\nDo you want to continue with no proxy or exit the application?";
        final DialogButton<Integer> exitButton = new DialogButton<>("Exit", () -> 0);

        new SimpleDialogWithResult<>("Title", msg1, exitButton).showAndWait();
        new SimpleDialogWithResult<>("Title", msg2, new ImageIcon(Images.NETWORK_64_URL), exitButton).showAndWait();
    }
}
package com.openwebstart.app.ui.actions;

import com.openwebstart.app.Application;
import com.openwebstart.jvm.ui.dialogs.DialogFactory;
import com.openwebstart.os.MenuAndDesktopEntryHandler;
import com.openwebstart.ui.BasicAction;
import net.adoptopenjdk.icedteaweb.Assert;
import net.adoptopenjdk.icedteaweb.i18n.Translator;
import net.adoptopenjdk.icedteaweb.logging.Logger;
import net.adoptopenjdk.icedteaweb.logging.LoggerFactory;

public class CreateShortcutAction extends BasicAction<Application> {
    static final Logger LOG = LoggerFactory.getLogger(CreateShort


	dbResult.Recs[0][5],
				dbResult.Recs[0][10],
				dbResult.Recs[0][11]
			}
		};
	}

	[Test]
	public async Task scavenging_goes_as_expected() {
		await CheckRecords();
	}

	[Test]
	public async Task the_stream_is_absent_logically() {
		Assert.AreEqual(ReadEventResult.NoStream, (await ReadIndex.ReadEvent(_deletedStream, 0, CancellationToken.None)).Result);
		Assert.AreEqual(ReadStreamResult.NoStream,
			(await ReadIndex.ReadStreamEventsForward(_deletedStream, 0, 100, CancellationToken.None)).Result);
		Assert.AreEqual(ReadStreamResult.NoStream,
			(await ReadIndex.ReadStreamEventsBackward(_deletedStream, -1, 100, CancellationToken.None)).Result);
	}

	[Test]
	public async Task the_metastream_is_absent_logically() {
		Assert.AreEqual(ReadEventResult.NotFound, (await ReadIndex.ReadEvent(_deletedMetaStream, 0, CancellationToken.None)).Result);
		Assert.AreEqual(ReadStreamResult.Success,
			(await ReadIndex.ReadStreamEventsForward(_deletedMetaStream, 0, 100, CancellationToken.None)).Result);
		Assert.AreEqual(ReadStreamResult.Success,
			(await ReadIndex.ReadStreamEventsBackward(_deletedMetaStream, -1, 100, CancellationToken.None)).Result);
	}

	[Test]
	public async Task the_stream_is_absent_physically() {
		var headOfTf = new TFPos(Db.Config.WriterCheckpoint.Read(), Db.Config.WriterCheckpoint.Read());
		Assert.IsEmpty((await ReadIndex.ReadAllEventsForward(new TFPos(0, 0), 1000, CancellationToken.None)).Records
			.Where(x => x.Event.EventStreamId == _deletedStream));
		Assert.IsEmpty((await ReadIndex.ReadAllEventsBackward(headOfTf, 1000, CancellationToken.None)).Records
			.Where(x => x.Event.EventStreamId == _deletedStream));
	}

	[Test]
	public async Task the_metastream_is_absent_physically() {
		var headOfTf = new TFPos(Db.Config.WriterCheckpoint.Read(), Db.Config.WriterCheckpoint.Read());
		Assert.IsEmpty((await ReadIndex.ReadAllEventsForward(new TFPos(0, 0), 1000, CancellationToken.None)).Records
			.Where(x => x.Event.EventStreamId == _deletedMetaStream));
		Assert.IsEmpty((await ReadIndex.ReadAllEventsBackward(headOfTf, 1000, CancellationToken.None)).Records
			.Where(x => x.Event.EventStreamId == _deletedMetaStream));
	}

	[Test]
	public async Task the_kept_stream_is_present() {
		Assert.AreEqual(ReadEventResult.Success, (await ReadIndex.ReadEvent(_keptStream, 0, CancellationToken.None)).Result);
		Assert.AreEqual(ReadStreamResult.Success, (await ReadIndex.ReadStreamEventsForward(_keptStream, 0, 100, CancellationToken.None)).Result);
		Assert.AreEqual(ReadStreamResult.Success, (await ReadIndex.ReadStreamEventsBackward(_keptStream, -1, 100, CancellationToken.None)).Result);
	}
}


namespace QuickDate.Library.Anjo.Share.Abstractions
{
    /// <summary>
    /// Platform specific Share Options
    /// </summary>
    public class ShareOptions
    {
        /// <summary>
        /// Android: Gets or sets the title of the app chooser popup.
        /// If null (default) the system default title is used.
        /// </summary>
        public string ChooserTitle { get; set; } = null;

        /// <summary>
        /// Tizen: Excluded App Types
        /// </summary>
        public ShareAppControlType ExcludedAppControlTypes { get; se


* B1D178 800A5FD8 8FA70060 */  lw    $a3, 0x60($sp)
/* B1D17C 800A5FDC 016C6821 */  addu  $t5, $t3, $t4
/* B1D180 800A5FE0 8FA80054 */  lw    $t0, 0x54($sp)
/* B1D184 800A5FE4 15C0000D */  bnez  $t6, .L800A601C
/* B1D188 800A5FE8 01A61821 */   addu  $v1, $t5, $a2
/* B1D18C 800A5FEC 00077880 */  sll   $t7, $a3, 2
/* B1D190 800A5FF0 006FC021 */  addu  $t8, $v1, $t7
/* B1D194 800A5FF4 8F020000 */  lw    $v0, ($t8)
/* B1D198 800A5FF8 00024900 */  sll   $t1, $v0, 4
/* B1D19C 800A5FFC 00095702 */  srl   $t2, $t1, 0x1c
/* B1D1A0 800A6000 000A5880 */  sll   $t3, $t2, 2
/* B1D1A4 800A6004 008B6021 */  addu  $t4, $a0, $t3
/* B1D1A8 800A6008 8D8D0000 */  lw    $t5, ($t4)
/* B1D1AC 800A600C 0045C824 */  and   $t9, $v0, $a1
/* B1D1B0 800A6010 032D7021 */  addu  $t6, $t9, $t5
/* B1D1B4 800A6014 01C67821 */  addu  $t7, $t6, $a2
/* B1D1B8 800A6018 8DE8000C */  lw    $t0, 0xc($t7)
.L800A601C:
/* B1D1BC 800A601C 11000023 */  beqz  $t0, .L800A60AC
/* B1D1C0 800A6020 02002025 */   move  $a0, $s0
/* B1D1C4 800A6024 3C098016 */  lui   $t1, %hi(D_801600C0) # $t1, 0x8016
/* B1D1C8 800A6028 252900C0 */  addiu $t1, %lo(D_801600C0) # addiu $t1, $t1, 0xc0
/* B1D1CC 800A602C 0007C180 */  sll   $t8, $a3, 6
/* B1D1D0 800A6030 03092821 */  addu  $a1, $t8, $t1
/* B1D1D4 800A6034 0C029F9C */  jal   func_800A7E70
/* B1D1D8 800A6038 AFA80054 */   sw    $t0, 0x54($sp)
/* B1D1DC 800A603C 1040001B */  beqz  $v0, .L800A60AC
/* B1D1E0 800A6040 8FA80054 */   lw    $t0, 0x54($sp)
/* B1D1E4 800A6044 8E0302C0 */  lw    $v1, 0x2c0($s0)
/* B1D1E8 800A6048 3C0BDA38 */  lui   $t3, 0xda38
/* B1D1EC 800A604C 3C19DE00 */  lui   $t9, 0xde00
/* B1D1F0 800A6050 246A0008 */  addiu $t2, $v1, 8
/* B1D1F4 800A6054 AE0A02C0 */  sw    $t2, 0x2c0($s0)
/* B1