Y3

	// Store 2 outputs
	VMOVDQU Y2, (BX)
	ADDQ    $0x20, BX
	VMOVDQU Y3, (DX)
	ADDQ    $0x20, DX

	// Prepare for next loop
	DECQ AX
	JNZ  mulAvxGFNI_1x2_loop
	VZEROUPPER

mulAvxGFNI_1x2_end:
	RET

// func mulGFNI_1x2_64Xor(matrix []uint64, in [][]byte, out [][]byte, start int, n int)
// Requires: AVX, AVX512DQ, AVX512F, GFNI
TEXT ·mulGFNI_1x2_64Xor(SB), $0-88
	// Loading all tables to registers
	// Destination kept in GP registers
	// Full registers estimated 6 YMM used
	MOVQ            n+80(FP), AX
	MOVQ            matrix_base+0(FP), CX
	SHRQ            $0x06, AX
	TESTQ           AX, AX
	JZ              mulGFNI_1x2_64Xor_end
	VBROADCASTF32X2 (CX), Z0
	VBROADCASTF32X2 8(CX), Z1
	MOVQ            in_base+24(FP), CX
	MOVQ            (CX), CX
	MOVQ            out_base+48(FP), DX
	MOVQ            out_base+48(FP), DX
	MOVQ            (DX), BX
	MOVQ            24(DX), DX
	MOVQ            start+72(FP), SI

	// Add start offset to output
	ADDQ SI, BX
	ADDQ SI, DX

	// Add start offset to input
	ADDQ SI, CX

mulGFNI_1x2_64Xor_loop:
	// Load 2 outputs
	VMOVDQU64 (BX), Z2
	VMOVDQU64 (DX), Z3

	// Load and process 64 bytes from input 0 to 2 outputs
	VMOVDQU64      (CX), Z4
	ADDQ           $0x40, CX
	VGF2P8AFFINEQB $0x00, Z0, Z4, Z5
	VXORPD         Z2, Z5, Z2
	VGF2P8AFFINEQB $0x00, Z1, Z4, Z5
	VXORPD         Z3, Z5, Z3

	// Store 2 outputs
	VMOVDQU64 Z2, (BX)
	ADDQ      $0x40, BX
	VMOVDQU64 Z3, (DX)
	ADDQ      $0x40, DX

	// Prepare for next loop
	DECQ AX
	JNZ  mulGFNI_1x2_64Xor_loop
	VZEROUPPER

mulGFNI_1x2_64Xor_end:
	RET

// func mulAvxGFNI_1x2Xor(matrix []uint64, in [][]byte, out [][]byte, start int, n int)
// Requires: AVX, GFNI
TEXT ·mulAvxGFNI_1x2Xor(SB), $0-88
	// Loading all tables to registers
	// Destination kept in GP registers
	// Full registers estimated 6 YMM used
	MOVQ         n+80(FP), AX
	MOVQ         matrix_base+0(FP), CX
	SHRQ         $0x05, AX
	TESTQ        AX, AX
	JZ           mulAvxGFNI_1x2Xor_end
	VBROADCASTSD (CX), Y0
	VBROADCASTSD 8(CX), Y1
	MOVQ         in_base+24(FP), CX
	MOVQ         (CX), CX
	MOVQ         out_base+48(FP), DX
	MOVQ         out_base+48(FP), DX
	MOVQ         (DX), BX
	MOVQ         24(DX), DX
	MOVQ         start+72(FP), SI

	// Add start offset to o


 Credits & Thanks:
 * https://www.unlok.ca/credits-thanks/
 *
 * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
 * https://github.com/WaywardGame/types/wiki
 */
export default class HashSet<T> {
    private readonly hash;
    private readonly internalMap;
    get size(): number;
    constructor(hash: (value: T) => string);
    add(...values: T[]): this;
    addAll(...valuesIterables: Array<Iterable<T> | Falsy>): this;
    /**
     * Adds the given values to the set, first removing any values that share the same hashes.
     */
    replace(...values: T[]): this;
    /**
     * Adds the given values to the set, first removing any values that share the same hashes.
     */
    replaceAll(...valuesIterables: Array<Iterable<T> | Falsy>): this;
    remove(...values: T[]): boolean;
    removeAll(...valuesIterables: Array<Iterable<T> | Falsy>): boolean;
    toggle(has: boolean, ...values: T[]): this;
    toggleAll(has: boolean, ...valuesIterables: Array<Iterable<T> | Falsy>): this;
    has(...values: T[]): boolean;
    hasAll(...valuesIterables: Array<Iterable<T> | Falsy>): boolean;
    clear(): this;
    keys(): IterableIterator<string>;
    values(): IterableIterator<T>;
    entries(): IterableIterator<[string, T]>;
    keyStream(): import("@wayward/goodstream").default<string>;
    valueStream(): import("@wayward/goodstream").default<T>;
    entryStream(): T extends T ? import("@wayward/goodstream").default<[string, T]> : never;
    forEach(consumer: (value: T, key: string) => any): void;
    [Symbol.iterator](): IterableIterator<T>;
    toArray(): T[];
    retainNot(value: T): boolean;
    get(hash: string): T | undefined;
    intersects(set: HashSet<T>): boolean;
}
import { Knex } from 'knex'
import { Config } from '..'
import { EnumDefinition } from './AdapterInterface'

/**
 * Retrieves all table defined enums from the database.
 *
 * @export
 * @param {Knex} db The database context to use.
 * @param {Config} config The configuration to use.
 * @returns {Promise<EnumDefinition[]>}
 */
export async function getTableEnums (db: Knex, config: Config): Promise<EnumDefinition[]> {
  const tableEnums = config.tableEnums
  const allEnums = Object.entries(tableEnums).map(async ([key, enums]) => {
    const split = key.split('.')
    const schema = split[0]
    const table = split[1]
    const rows = (
      await db(table)
        .select(`${enums.key} as Key`, `${enums.value} as Value`)
      )
      .reduce((acc, curr) => {
        acc[curr.Key] = curr.Value
        return acc
      }, {}) as { [key: string]: string | number }
    return {
      name: table,
      schema,
      values: rows
    }
  })
  return await Promise.all(allEnums)
}

impor


;

                          /* If a GET request was received and a file is ready to
                           * be sent, then fall through to send the file.
                           */

                          if (conn->conn_state != CNST_SENDING)
                            {
                              break;
                            }
                        }

                      case CNST_SENDING:
                        {
                          /* Send a file -- this really should be performed on a
                           * separate thread to keep the serve from locking up during
                           * the write.
                           */

                          handle_send(conn, &tv);
                        }
                        break;

                      case CNST_LINGERING:
                        {
                          /* Linger close the connection */

                          handle_linger(conn, &tv);
                        }
                        break;
                    }
                }
            }
        }
      tmr_run(&tv);
    }

  /* The main loop terminated */

  shut_down();
  ndbg("Exiting\n");
  exit(0);
}

#endif /* CONFIG_THTTPD */


芯片到芯片通信对于节点内AI加速器之间的数据传输至关重要，这显著影响了LLM训练的效率。传统上，这种通信依赖于PCI Express（PCIe）[122]，它采用树形拓扑结构——一个分层结构，多个设备连接到单个根复杂体。多年来，PCIe已经提高了其带宽：PCIe 3.0每条线路提供大约1 GB/s的带宽，对于16条线路的配置总计约16 GB/s；PCIe 4.0将带宽翻倍至每条线路2 GB/s，而PCIe 5.0进一步将其增加到每条线路4 GB/s。尽管这些增强，PCIe在带宽、延迟和可扩展性方面的固有限制使其对LLM训练不太理想[123]。为了解决这些限制，像NVLink[45]这样的专用芯片到芯片互连越来越多地被用于LLM训练。与传统PCIe相比，这些高级互连通过使用各种拓扑结构：立方体网格、全连接和3D-环面，提供了显著更高的带宽和更低的延迟。此外，共享内存模型、专门的通信协议和同步机制也起着至关重要的作用。

立方体网格拓扑。 NVLink-1.0[45]为GPU提供了直接和高速的连接，每个链路提供160 GB/s的双向带宽。这种架构能够在四个GPU之间形成平面网格结构，在八个GPU之间形成立方体网格拓扑，可以配置成DGX-1服务器。这种立方体网格配置，尽管不是全到全连接，但显著提高了GPU上的数据通信效率和训练性能。

全连接拓扑。 许多互连使用基于交换机的或基于P2P的全连接拓扑来提高芯片到芯片通信性能。NVIDIA使用NVSwitch[46]实现GPU之间的基于交换机的全到全互连。在DGX-2[124]系统中，六个NVSwitch完全连接了十六个GPU，提供了任何两个GPU之间300 GB/s的双向带宽。这个带宽在NVSwitch 2.0中增加到600 GB/s，在NVSwitch 3.0中进一步增加到900 GB/s。Intel、AMD和华为Ascend使用基于P2P的全连接拓扑为他们的加速器，其中每个芯片使用以太网或无限Fabric[47]直接连接到同一节点中的每个其他芯片。与传统的基于交换机的拓扑相比，基于P2P拓扑中两个GPU之


c1  $zero, $f0
/* 0B84DC 80157A9C 3C01800E */  lui   $at, 0x800e
/* 0B84E0 80157AA0 8D4B0000 */  lw    $t3, ($t2)
/* 0B84E4 80157AA4 24040006 */  li    $a0, 6
/* 0B84E8 80157AA8 24050006 */  li    $a1, 6
/* 0B84EC 80157AAC 000B6080 */  sll   $t4, $t3, 2
/* 0B84F0 80157AB0 002C0821 */  addu  $at, $at, $t4
/* 0B84F4 80157AB4 0C048BDB */  jal   set_kirby_action_1
/* 0B84F8 80157AB8 E4203210 */   swc1  $f0, 0x3210($at)
/* 0B84FC 80157ABC 10000055 */  b     .L80157C14_ovl3
/* 0B8500 80157AC0 24070001 */   li    $a3, 1
.L80157AC4_ovl3:
/* 0B8504 80157AC4 8DADE7F0 */  lw    $t5, -0x1810($t5)
/* 0B8508 80157AC8 24040006 */  li    $a0, 6
/* 0B850C 80157ACC 11A00051 */  beqz  $t5, .L80157C14_ovl3
/* 0B8510 80157AD0 00000000 */   nop
/* 0B8514 80157AD4 0C048BDB */  jal   set_kirby_action_1
/* 0B8518 80157AD8 24050006 */   li    $a1, 6
/* 0B851C 80157ADC 1000004D */  b     .L80157C14_ovl3
/* 0B8520 80157AE0 24070001 */   li    $a3, 1
.L80157AE4_ovl3:
/* 0B8524 80157AE4 0C054E61 */  jal   func_80153984_ovl3
/* 0B8528 80157AE8 AFA7001C */   sw    $a3, 0x1c($sp)
/* 0B852C 80157AEC 3C068013 */  lui   $a2, %hi(gKirbyState) # $a2, 0x8013
/* 0B8530 80157AF0 24C6E7C0 */  addiu $a2, %lo(gKirbyState) # addiu $a2, $a2, -0x1840
/* 0B8534 80157AF4 8CC3002C */  lw    $v1, 0x2c($a2)
/* 0B8538 80157AF8 8FA7001C */  lw    $a3, 0x1c($sp)
/* 0B853C 80157AFC 2405000A */  li    $a1, 10
/* 0B8540 80157B00 2C640001 */  sltiu $a0, $v1, 1
/* 0B8544 80157B04 246EFFFF */  addiu $t6, $v1, -1
/* 0B8548 80157B08 10800042 */  beqz  $a0, .L80157C14_ovl3
/* 0B854C 80157B0C ACCE002C */   sw    $t6, 0x2c($a2)
/* 0B8550 80157B10 ACC00030 */  sw    $zero, 0x30($a2)
/* 0B8554 80157B14 0C048BDB */  jal   set_kirby_action_1
/* 0B8558 80157B18 2404000D */   li    $a0, 13
/* 0B855C 80157B1C 1000003D */  b     .L80157C14_ovl3
/* 0B8560 80157B


character("LATIN SMALL LETTER A"), Some('a'));
/// assert_eq!(unicode_names2::character("latin SMALL letter A"), Some('a'));
/// assert_eq!(unicode_names2::character("latin small letter a"), Some('a'));
/// assert_eq!(unicode_names2::character("BLACK STAR"), Some('★'));
/// assert_eq!(unicode_names2::character("SNOWMAN"), Some('☃'));
///
/// assert_eq!(unicode_names2::character("nonsense"), None);
/// ```
pub fn character(name: &str) -> Option<char> {
    // + 1 so that we properly handle the case when `name` has a
    // prefix of the longest name, but isn't exactly equal.
    let mut buf = [0u8; MAX_NAME_LENGTH + 1];
    for (place, byte) in buf.iter_mut().zip(name.bytes()) {
        *place = ASCII_UPPER_MAP[byte as usize]
    }
    let search_name = &buf[..name.len()];

    // try `HANGUL SYLLABLE <choseong><jungseong><jongseong>`
    if search_name.starts_with(HANGUL_SYLLABLE_PREFIX.as_bytes()) {
        let remaining = &search_name[HANGUL_SYLLABLE_PREFIX.len()..];
        let (choseong, remaining) = jamo::slice_shift_choseong(remaining);
        let (jungseong, remaining) = jamo::slice_shift_jungseong(remaining);
        let (jongseong, remaining) = jamo::slice_shift_jongseong(remaining);
        match (choseong, jungseong, jongseong, remaining) {
            (Some(choseong), Some(jungseong), Some(jongseong), b"") => {
                let c = 0xac00 + (choseong * 21 + jungseong) * 28 + jongseong;
                return char::from_u32(c);
            }
            (_, _, _, _) => {
                // there are no other names starting with `HANGUL SYLLABLE `
                // (verified by `generator/...`).
                return None;
            }
        }
    }

    // try `CJK UNIFIED IDEOGRAPH-<digits>`
    if search_name.starts_with(CJK_UNIFIED_IDEOGRAPH_PREFIX.as_bytes()) {
        let remaining = &search_name[CJK_UNIFIED_IDEOGRAPH_PREFIX.len()..];
        if remaining.len() > 5 { return None; } // avoid overflow

        let mut v = 0u32;
        for &c in remaining.iter() {
            match c {
                b'0'..=b'9' => v = (v << 4) | (c - b'0') as u32,
                b'A'..=b'F' => v = (v << 4) | (c - b'A' + 10) as u32,
                _ => return None,
            }
        }
        let ch = match char::from_u32(v) {
            Some(ch) => ch,
            None => return None,
        };

        // check if the resulting code is indeed in the known ranges
        if is_cjk_unified_ideograph(ch) {
            return Some(ch);
        } else {
            // there are no other names starting with `CJK UNIFIED ID


using System.Runtime.InteropServices;
using NvAPIWrapper.Native.Attributes;
using NvAPIWrapper.Native.General.Structures;
using NvAPIWrapper.Native.Interfaces;

namespace NvAPIWrapper.Native.GPU.Structures
{
    /// <summary>
    ///     Contains information regarding GPU voltage boost status
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 8)]
    [StructureVersion(1)]
    public struct PrivateVoltageStatusV1 : IInitializable
    {
        internal const int MaxNumberOfUnknown2 = 8;
        internal const int MaxNumberOfUnknown3 = 8;


nd_suite = 0,
	rand_suite = false
}

--================================================================
--
-- 小组配置
--
--================================================================

suites = {
	{
		-- suite_id = 1,
		-- description = ,
		monsters = { 676001 },
		gadgets = { 676002 },
		regions = { },
		triggers = { "ANY_MONSTER_DIE_676003" },
		rand_weight = 100
	}
}

--================================================================
--
-- 触发器
--
--================================================================

-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_676003(context, evt)
	-- 判断剩余怪物数量是否是0
	if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
		return false
	end

	return true
end

-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_676003(context, evt)
	-- 将configid为 676002 的物件更改为状态 GadgetState.Default
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 676002, GadgetState.Default) then
			return -1
		end

	-- 运营数据埋点，匹配LD定义的规则使用
	    if 0 ~= ScriptLib.MarkPlayerAction(context, 4000, 3, 1) then
	      return -1
	    end

	return 0
end


成了习惯，你怎么可能成为真正的骑士。和加贝拉王族没有血缘关系的你，一生都只能当一个『见习骑士』罢了。好好掂掂自己的分量！”

看似已经快要没有退路的士兵突然把藏在背后的东西拿到身前。十字弓，是被固定在细长的底座上的弓，只要一扣扳机，箭就会被射出。

在这刹那，穿着甲胄的年轻人飘然侧身。如舞蹈似的转了个圈，避开箭矢，缩短双方距离，将士兵的头砍飞了出去。毫无停顿，被砍下的头在空中飞舞，撞上了家中的墙壁，摔落在地上。

“加贝拉是骑士之国。如果你们要继续玷污其名的话，还不如就此接受战死的荣誉吧。”

无论是端正的容貌，战斗的风范，还是口中吐出的话语，都仿佛是欧鲁巴过去阅读的书中出现的英雄再世。

“队长，发生什么事了！”

对从门外投来的声音，他回应了一句“没事”，并将剑上的鲜血拭去。

“是梅菲乌斯的孩子吗？”

欧鲁巴对向他提出的这个问题，一瞬间，不知道该如何回答。脑中从来没有意识过“梅菲乌斯”这个国家的名字。对欧鲁巴以及村里的人来说，村子以及周围大约十几公里的土地就是他们所生活世界的全部了，对国家也好，领土纷争也好，没有任何兴趣。

男人对没有回答的欧鲁巴露出了淡淡的微笑，瞄了一眼躺在血泊中的士兵。欧鲁巴顿时绷紧身体，更加用力地抱住母亲的肩膀。视线四下乱扫，寻找手边有没有可以用来当作武器的东西，

“赶快离开这里吧。”

年轻人说道。

“为了保护母亲——吗。你的心中所拥有的更像是一个骑士。比忘却了骑士为何的加贝拉人更像一个骑士。好了，快离开这里吧。虽然我想要尽力制止掠夺和暴行，可我毕竟不能掌握所有的情况。”

他的目光，总感觉有些许地方很像哥哥罗安。扶着抽泣不停的母�


").text() to
                doc.selectFirst("table.wp-block-table tr a")?.attr("href").let { link ->
                    app.get(link ?: return null).document.select("div#text-url a")
                        .mapIndexed { index, element ->
                            element.attr("href") to element.parent()?.textNodes()?.getOrNull(index)
                                ?.text()
                        }.filter { it.second?.contains("Subtitles", true) == false }
                        .map { it.first }
                }.lastOrNull()
    } else {
        doc.select("div.vc_tta-panels div#Season-$season table.wp-block-table tr:last-child td:first-child")
            .text() to
                doc.select("div.vc_tta-panels div#Season-$season table.wp-block-table tr a")
                    .mapNotNull { ele ->
                        app.get(ele.attr("href")).document.select("div#text-url a")
                            .mapIndexed { index, element ->
                                element.attr("href") to element.parent()?.textNodes()
                                    ?.getOrNull(index)?.text()
                            }.find { it.second?.contains("Episode $episode", true) == true }?.first
                    }.lastOrNull()
    }
}

suspend fun getSfServer() = sfServer ?: fetchSfServer().also { sfServer = it }

suspend fun fetchSfServer(): String {
    return app.get("https://raw.githubusercontent.com/hexated/cloudstream-resources/main/sfmovies_server").text
}

suspend fun getFilmxyCookies(url: String) =
    filmxyCookies ?: fetchFilmxyCookies(url).also { filmxyCookies = it }

suspend fun fetchFilmxyCookies(url: String): Map<String, String> {

    val defaultCookies =
        mutableMapOf("G_ENABLED_IDPS" to "google", "true_checker" to "1", "XID" to "1")
    session.get(
        url,
        headers = mapOf(
            "Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"
        ),
        cookies = defaultCookies,
    )
    val phpsessid = session.baseClient.cookieJar.loadForRequest(url.toHttpUrl())
        .first { it.name == "PHPSESSID" }.value
    defaultCookies["PHPSESSID"] = phpsessid

    val userNonce =
        app.get(
            "$filmxyAPI/login/?redirect_to=$filmxyAPI/",
            cookies = defaultCookies
        ).document.select("script")
            .find { it.data().contains("var userNonce") }?.data()?.let {
                Regex("var\\suserNonce.*?\"(\\S+?)\";").find(it)?.groupValues?.get(1)
            }

    val cookieUrl = "${filmxyAPI}/wp-admin/admin-ajax.php"

    session.post(
        cookieUrl,
        data = mapOf(
            "action" to "guest_login",
            "nonce" to "$userNonce",
        ),
        headers = mapOf(
            "X-Requested-With" to "XMLHttpRequest",
        ),
        cookies = defaultCookies
    )
    val cookieJar = session.baseClient.cookieJar.loadForRequest(cookieUrl.toHttpUrl())
        .associate { it.name to it.value }.toMutableMap()

    return cookieJar.plus(defaultCookies)
}

fun Document.findTvMoviesIframe(): String? {
    return this.selectFirst("script:containsData(var seconds)")?.data()?.substringAfter("href='")
        ?.substrin


function Tetris_Load ()
	--allgemeine variablen
    if (not Tetris) then
        Tetris={ };
        Tetris["game"]= { };
        Tetris["game"]["feld"]= { };
        Tetris["game"]["s_temp"]= { };
		Tetris["game"]["s_temp"]["temp"]= { };
        Tetris["game"]["s_NS_temp"]= { };
        Tetris["highscore"]= { };
        Tetris["options"]= { };
        Tetris["options"]["stones"]= { };
		--spiel typ
		Tetris["game"]["gametyp"]="ms-dos";
        --x spalten
        Tetris["game"]["x"]=10;
        --y zeilen
        Tetris["game"]["y"]=20;
        --x NS spalten
        Tetris["game"]["NS_x"]=4;
        --y NS zeilen
        Tetris["game"]["NS_y"]=3;
        --nummer des nchsten bausteins
        Tetris["game"]["s_next"]=0;
        --nummer des aktuellen bausteins
        Tetris["game"]["s"]=0;
        --anz_steine des aktuellen bausteins
        Tetris["game"]["s_anz_s"]=0;
        --anz_lagen aktuellen bausteins
        Tetris["game"]["s_anz_l"]=0;
        --aktuelle lage des bausteins
		Tetris["game"]["s_lage"]=0;
		--x pos des hauptbausteins
		Tetris["game"]["s_pos_x"]=0;
		--y pos des hauptbausteins
		Tetris["game"]["s_pos_y"]=0;
		--timer
		Tetris["game"]["timer"] = 0.5;
		--luft der timer?
		Tetris["game"]["timer_go"] = 0;
		--scores
		Tetris["game"]["score"] = {};
		Tetris["game"]["score"]["points"]=0;
		Tetris["game"]["score"]["lvl"]=0;
		Tetris["game"]["score"]["linie"]=0;
		--GF_Gamewindow-------------------
        --button hhe des gamewindow button
        Tetris["options"]["b_hohe"]=20;
        --button breite des gamewindow button
        Tetris["options"]["b_breite"]=20;
        --x randabstand des gamewindow
        Tetris["options"]["r_abstand_x"]=15;
        --y randabstand des gamewindow
        Tetris["options"]["r_abstand_y"]=15;
        --x offset des gamewindow
        Tetris["options"]["r_a-faktor_x"]=180;
        --y offset des gamewindow
        Tetris["options"]["r_a-faktor_y"]=25;
        ----------------------------------
        ----GF_NS_Window------------------
        --button hhe des gamewindow button
        Tetris["options"]["b_NS_hohe"]=20;
        --button breite des gamewindow button
        Tetris["options"]["b_NS_breite"]=20;
        --x randabstand des gamewindow
        Tetris["options"]["r_NS_abstand_x"]=15;
        --y randabstand des gamewindow
        Tetris["options"]["r_NS_abstand_y"]=15;
        --x offset des NS window
        Tetris["options"]["r_a_NS-faktor_x"]=0;
        --y offset de


         []ScanOption
		expectCompleted bool
		expectKeyPolicy ScanStartKeyPolicy
		expectKeys      [][]byte
	}{
		{
			shard:           metapb.Shard{},
			options:         []ScanOption{WithScanStartKey(nil), WithScanEndKey(nil)},
			expectCompleted: true,
			expectKeyPolicy: None,
			expectKeys:      [][]byte{[]byte("a"), []byte("b"), []byte("c"), []byte("d")},
		},
		{
			shard:           metapb.Shard{},
			options:         []ScanOption{WithScanStartKey(nil), WithScanEndKey(nil), WithScanFilterFunc(func(b []byte) bool { return string(b) == "c" })},
			expectCompleted: true,
			expectKeyPolicy: None,
			expectKeys:      [][]byte{[]byte("c")},
		},
		{
			shard:           metapb.Shard{},
			options:         []ScanOption{WithScanStartKey(nil), WithScanEndKey(nil), WithScanCountLimit(1)},
			expectCompleted: false,
			expectKeyPolicy: GenWithResultLastKey,
			expectKeys:      [][]byte{[]byte("a")},
		},
		{
			shard:           metapb.Shard{},
			options:         []ScanOption{WithScanStartKey(nil), WithScanEndKey(nil), WithScanBytesLimit(2)},
			expectCompleted: false,
			expectKeyPolicy: GenWithResultLastKey,
			expectKeys:      [][]byte{[]byte("a"), []byte("b")},
		},
		{
			shard:           metapb.Shard{},
			options:         []ScanOption{WithScanStartKey([]byte("a")), WithScanEndKey([]byte("c"))},
			expectCompleted: true,
			expectKeyPolicy: None,
			expectKeys:      [][]byte{[]byte("a"), []byte("b")},
		},
		{
			shard:           metapb.Shard{Start: []byte("a"), End: []byte("c")},
			options:         []ScanOption{WithScanStartKey(nil), WithScanEndKey(nil)},
			expectCompleted: false,
			expectKeyPolicy: UseShardEnd,
			expectKeys:      [][]byte{[]byte("a"), []byte("b")},
		},
		{
			shard:           metapb.Shard{Start: []byte("a"), End: []byte("c")},
			options:         []ScanOption{WithScanStartKey([]byte("c")), WithScanEndKey(nil)},
			expectCompleted: false,
			expectKeyPolicy: UseShardEnd,
		},
		{
			shard:           metapb.Shard{Start: []byte("a"), End: []byte("c")},
			options:         []ScanOption{WithScanStartKey([]byte("a")), WithScanEndKey([]byte("d"))},
			expectCompleted: false,
			expectKeyPolicy: UseShardEnd,
			expectKeys:      [][]byte{[]byte("a"), []byte("b")},
		},
	}

	for i, c := range cases {
		var keys [][]byte
		completed, policy, err := scanner.Scan(c.shard, func(key, value []byte) error {
			keys = append(keys, copyBytes(key))
			return nil
		}, c.options...)
		assert.NoError(t, err, "index %d", i)
		assert.Equal(t, c.expectCompleted, completed, "index %d", i)
		assert.Equal(t, c.expectKeyPolicy, policy, "index %d", i)
		assert.Equal(t, c.expectKeys, keys, "index %d", i)
	}
}

func copyBytes(src []byte) []byte {
	dst := make([]byte, len(src))
	copy(dst, src)
	return dst
}
package matrixprofile

import (
	"fmt"

	"github.com/matrix-profile-foundation/go-matrixprofile/siggen"
)

func ExampleMatrixProfile_DiscoverSegm


using System.ComponentModel;
using System.Drawing;
using System.Xml.Serialization;

namespace WebServiceStudio
{
    [TypeConverter(typeof (ExpandableObjectConverter))]
    public class UiProperties
    {
        private static readonly FontConverter fontConverter = new FontConverter();
        private Font messageFont;
        private Font reqRespFont;
        private Font wsdlFont;

        [XmlIgnore, TypeConverter(typeof (FontConverter))]
        public Font MessageFont
        {
            get
            {
                if (messageFont == null)
                {
                    messageFont = new Font("Lucida Sans Unicode", 9.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
                }
                return messageFont;
            }
            set { messageFont = value; }
        }

        [Browsable(false), XmlElement("MessageFont")]
        public string MessageFontX
        {
            get { return (string) fontConverter.ConvertTo(null, null, messageFont, typeof (string)); }
            set { messageFont = (Font) fontConverter.ConvertFrom(null, null, value); }
        }

        [TypeConverter(typeof (FontConverter)), XmlIgnore]
        public Font ReqRespFont
        {
            get
            {
                if (reqRespFont == null)
                {


.ts" />
'use strict';
namespace com.d_project.image {

  import OutputStream = com.d_project.io.OutputStream;
  import ByteArrayOutputStream = com.d_project.io.ByteArrayOutputStream;
  import Base64 = com.d_project.io.Base64;

  /**
   * GIF Image (B/W)
   * @author Kazuhiko Arase
   */
  export class GIFImage {

    private width : number;
    private height : number;
    private data : number[];

    constructor(width : number, height : number) {
      this.width = width;
      this.height = height;
      var size = width * height;
      this.data = [];
      for (var i = 0; i < size; i += 1) {
        this.data.push(0);
      }
    }

    public setPixel(x : number, y : number, pixel : number) : void {
      if (x < 0 || this.width  <= x) throw '!' + x;
      if (y < 0 || this.height <= y) throw '!' + y;
      this.data[y * this.width + x] = pixel;
    }

    public getPixel(x : number, y : number) : number {
      if (x < 0 || this.width  <= x) throw '!' + x;
      if (y < 0 || this.height <= y) throw '!' + y;
      return this.data[y * this.width + x];
    }

    public write(out : OutputStream) : void {

      //---------------------------------
      // GIF Signature

      out.writeByte('G'.charCodeAt(0) );
      out.writeByte('I'.charCodeAt(0) );
      out.writeByte('F'.charCodeAt(0) );
      out.writeByte('8'.charCodeAt(0) );
      out.writeByte('7'.charCodeAt(0) );
      out.writeByte('a'.charCodeAt(0) );

      //---------------------------------
      // Screen Descriptor

      this.writeWord(out, this.width);
      this.writeWord(out, this.height);

      out.writeByte(0x80); // 2bit
      out.writeByte(0);
      out.writeByte(0);

      //---------------------------------
      // Global Color Map

      // black
      out.writeByte(0x00);
      out.writeByte(0x00);
      out.writeByte(0x00);

      // white
      out.writeByte(0xff);
      out.writeByte(0xff);
      out.writeByte(0xff);

      //---------------------------------
      // Image Descriptor

      out.writeByte(','.charCodeAt(0) );
      this.writeWord(out, 0);
      this.writeWord(out, 0);
      this.writeWord(out, this.width);
      this.writeWord(out, this.height);
      out.writeByte(0);

      //---------------------------------
      // Local Color Map

      //---------------------------------
      // Raster Data

      var lzwMinCodeSize = 2;
      var raster = this.getLZWRaster(lzwMinCodeSize);

      out.writeByte(lzwMinCodeSize);

      var offset : number = 0;

      while (raster.length - offset > 255) {
        out.writeByte(255);
        this.writeBytes(out, raster, offset, 255);
        offset += 255;
      }

      out.writeByte(raster.length - offset);
      this.writeBytes(out, raster, offset, raster.length - offset);
      out.writeByte(0x00);

      //---------------------------------
      // GIF Terminator
      out.writeByte(';'.charCodeAt(0) );
    }

    private getLZWRaster(lzwMinCodeSize : number) : number[] {

      var clearCode = 1 << lzwMinCodeSize;
      var endCode   = (1 << lzwMinCodeSize) + 1;
      var bitLength = lzwMinCodeSize + 1;

      // Setup LZWTable
      var table = new LZWTable();

      for (var i


 16v2h1v-2zM8.095 3.876l.765 1.848l.924-.383l-.765-1.847zm6.123 14.783l.765 1.847l.924-.382l-.765-1.848zm.765-15.165l-.765 1.847l.924.383l.765-1.848zM8.86 18.276l-.765 1.848l.924.382l.765-1.848zM21.001 11.5h-2v1h2zm-16 0h-2v1h2zm15.458 3.616l-1.835-.795l-.397.918l1.835.794zM5.775 8.76L3.94 7.967l-.397.918l1.835.794zm14.35-.667l-1.848.765l.383.924l1.847-.765zM5.342 14.217l-1.847.765l.382.924l1.848-.765zM18.72 18.01l-1.415-1.414l-.707.707l1.414 1.415zM7.404 6.697L5.99 5.282l-.708.708l1.415 1.414zm3.908 4.615l3.611-2.235l-2.235 3.61z'/%3E%3C/svg%3E");
}

.ri-safari-line {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='m17.813 6.503l-4.398 6.911l-6.911 4.398A7.973 7.973 0 0 0 11 19.938V18h2v1.938a7.96 7.96 0 0 0 3.906-1.618l-1.37-1.37l1.414-1.414l1.37 1.37A7.96 7.96 0 0 0 19.939 13h-1.938v-2h1.938a7.974 7.974 0 0 0-2.126-4.497m-.315-.315a7.973 7.973 0 0 0-4.497-2.126V6h-2V4.062A7.96 7.96 0 0 0 7.095 5.68l1.37 1.37l-1.414 1.414l-1.37-1.37A7.96 7.96 0 0 0 4.063 11H6v2H4.063a7.973 7.973 0 0 0 2.126 4.497l4.398-6.911zM12.001 22c-5.523 0-10-4.477-10-10s4.477-10 10-10s10 4.477 10 10s-4.477 10-10 10'/%3E%3C/svg%3E");
}

.ri-safe-2-fill {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M10.005 20h-4v2h-2v-2h-1a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7V1.59a.5.5 0 0 1 .582-.493L21.17 2.86a1 1 0 0 1 .836.986V6h1v2h-1v7h1v2h-1v2.153a1 1 0 0 1-.836.986l-1.164.194V22h-2v-1.334l-7.418 1.237a.5.5 0 0 1-.582-.493zm2-.361l8-1.334V4.694l-8-1.333zm4.5-5.64c-.828 0-1.5-1


SCIMITAR_23330),
	ITEM_RUNE_SCIMITAR_ORNAMENT_KIT_GUTHIX(RUNE_SCIMITAR_ORNAMENT_KIT_GUTHIX, RUNE_SCIMITAR_23330),
	ITEM_RUNE_SCIMITAR_SARADOMIN(RUNE_SCIMITAR, RUNE_SCIMITAR_23332),
	ITEM_RUNE_SCIMITAR_ORNAMENT_KIT_SARADOMIN(RUNE_SCIMITAR_ORNAMENT_KIT_SARADOMIN, RUNE_SCIMITAR_23332),
	ITEM_RUNE_SCIMITAR_ZAMORAK(RUNE_SCIMITAR, RUNE_SCIMITAR_23334),
	ITEM_RUNE_SCIMITAR_ORNAMENT_KIT_ZAMORAK(RUNE_SCIMITAR_ORNAMENT_KIT_ZAMORAK, RUNE_SCIMITAR_23334),
	ITEM_RUNE_DEFENDER(RUNE_DEFENDER, RUNE_DEFENDER_T),
	ITEM_RUNE_DEFENDER_ORNAMENT_KIT(RUNE_DEFENDER_ORNAMENT_KIT, RUNE_DEFENDER_T),

	// Godsword ornament kits
	ITEM_ARMADYL_GODSWORD(ARMADYL_GODSWORD, ARMADYL_GODSWORD_OR),
	ITEM_ARMADYL_GODSWORD_ORNAMENT_KIT(ARMADYL_GODSWORD_ORNAMENT_KIT, ARMADYL_GODSWORD_OR),
	ITEM_BANDOS_GODSWORD(BANDOS_GODSWORD, BANDOS_GODSWORD_OR),
	ITEM_BANDOS_GODSWORD_ORNAMENT_KIT(BANDOS_GODSWORD_ORNAMENT_KIT, BANDOS_GODSWORD_OR),
	ITEM_ZAMORAK_GODSWORD(ZAMORAK_GODSWORD, ZAMORAK_GODSWORD_OR),
	ITEM_ZAMORAK_GODSWORD_ORNAMENT_KIT(ZAMORAK_GODSWORD_ORNAMENT_KIT, ZAMORAK_GODSWORD_OR),
	ITEM_SARADOMIN_GODSWORD(SARADOMIN_GODSWORD, SARADOMIN_GODSWORD_OR),
	ITEM_SARADOMIN_GODSWORD_ORNAMENT_KIT(SARADOMIN_GODSWORD_ORNAMENT_KIT, SARADOMIN_GODSWORD_OR),

	// Jewellery ornament kits
	ITEM_AMULET_OF_TORTURE(AMULET_OF_TORTURE, AMULET_OF_TORTURE_OR),
	ITEM_TORTURE_ORNAMENT_KIT(TORTURE_ORNAMENT_KIT, AMULET_OF_TORTURE_OR),
	ITEM_NECKLACE_OF_ANGUISH(NECKLACE_OF_ANGUISH, NECKLACE_OF_ANGUISH_OR),
	ITEM_ANGUISH_ORNAMENT_KIT(ANGUISH_ORNAMENT_KIT, NECKLACE_OF_ANGUISH_OR),
	ITEM_OCCULT_NECKLACE(OCCULT_NECKLACE, OCCULT_NECKLACE_OR),
	ITEM_OCCULT_ORNAMENT_KIT(OCCULT_ORNAMENT_KIT, OCCULT_NECKLACE_OR),
	ITEM_AMULET_OF_FURY(AMULET_OF_FURY, AMULET_OF_FURY_OR, AMULET_OF_BLOOD_FURY),
	ITEM_FURY_ORNAMENT_KIT(FURY_ORNAMENT_KIT, AMULET_OF_FURY_OR),
	ITEM_TORMENTED_BRACELET(TORMENTED_BRACELET, TORMENTED_BRACELET_OR),
	ITEM_TORMENTED_ORNAMENT_KIT(TORMENTED_ORNAMENT_KIT, TORMENTED_BRACELET_OR),
	IT


			"$": {
								"type": "6113B1"
							}
						}
					]
				}
			]
		}
	]
};
this.NesDb = this.NesDb || {};

NesDb[ '3BAE1F0AD46CAF12838E269665E690BB7DCA9758' ] = {
	"$": {
		"name": "Wheel of Fortune",
		"class": "Licensed",
		"catalog": "NES-WF-USA",
		"publisher": "GameTek",
		"developer": "Rare",
		"region": "USA",
		"players": "3",
		"date": "1988-09"
	},
	"cartridge": [
		{
			"$": {
				"system": "NES-NTSC",
				"crc": "FBF8A785",
				"sha1": "3BAE1F0AD46CAF12838E269665E690BB7DCA9758",
				"dump": "ok",
				"dumper": "bootgod",
				"datedumped": "2006-01-21"
			},
			"board": [
				{
					"$": {
						"type": "NES-AOROM",
						"pcb": "NES-AOROM-01",
						"mapper": "7"
					},
					"prg": [
						{
							"$": {
								"name": "NES-WF-0 PRG",
								"size": "128k",
								"crc": "FBF8A785",
								"sha1": "3BAE1F0AD46CAF12838E269665E690BB7DCA9758"
							}
						}
					],
					"vram": [
						{
							"$": {
								"size": "8k"
							}
						}
					],
					"chip": [
						{
							"$": {
								"type": "74xx161"
							}
						}
					],
					"cic": [
						{
							"$": {
								"type": "6113B1"
							}
						}
					]
				}
			]
		}
	],
	"gameGenieCodes": [
		{
			"name": "Less time to solve",
			"codes": [
				[
					"GPUUISAZ"
				]
			]
		},
		{
			"name": "More time to solve",
			"codes": [
				[
					"GLUUISAX"
				]
			]
		},
		{
			"name": "Less time for choosing",
			"codes": [
				[
					"YENOIAYA",
					"GEKPOAYA"
				]
			]
		},
		{
			"name": "More time for choosing",
			"codes": [
				[
					"YENOIAYE",
					"YEKPOAYE"
				]
			]
		}
	]
};
this.NesDb = this.NesDb || {};

NesDb[ '512DAC9D8CB201C64176325FC7BD685DE14C4BD8' ] = {
	"$": {
		"name": "Thunderbirds",
		"class": "Licensed",
		"catalog": "NES-T5-USA",
		"publisher": "Activision",
		"developer": "Pack-In-Video",
		"region": "USA",
		"players": "1",
		"date": "1990-09"
	},
	"cartridge": [
		{
			"$": {
				"system": "NES-NTSC",
				"crc": "2DDC2DC3",
				"sha1": "512DAC9D8CB201C64176325FC7BD685DE14C4BD8",
				"dump": "ok",
				"dumper": "bootgod",
				"datedumped": "2006-07-03"
			},
			"board": [
				{
					"$": {
						"type": "N


, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * http://opensource.org/licenses/MIT
 * 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 clusterManger cluster-service
package clusterManger

/*
	节点池
*/

const (
	// importClusterApi 集群创建(云凭证方式) post ()
	importClusterApi = "/clustermanager/v1/cluster/import"

	// createClusterApi  集群创建(直接创建) post ()
	createClusterApi = "/clustermanager/v1/cluster"

	// deleteClusterApi  删除集群 delete ( clusterID )
	deleteClusterApi = "/clustermanager/v1/cluster/%s"

	// updateClusterApi  更新集群 put ( clusterID )
	updateClusterApi = "/clustermanager/v1/cluster/%s"

	// getClusterApi  查询集群 get ( clusterID )
	getClusterApi = "/clustermanager/v1/cluster/%s"

	// listProjectClusterApi  查询某个项目下的Cluster列表 get ( projectID )
	listProjectClusterApi = "/clustermanager/v1/projects/%s/clusters"
)

// 集群管理类型
const (
	// IndependentCluster 独立集群
	IndependentCluster = "INDEPENDENT_CLUSTER"

	// ManagedCluster 云上托管集群
	ManagedCluster = "MANAGED_CLUSTER"
)
/*
 * Tencent is pleased to support the open source community by making Blueking Container Service available.
 * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * http://opensource.org/licenses/MIT
 * 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 clusterManger cluster-service
package clusterManger

import "github.com/golang/protobuf/jsonpb"

/*
	节点池
*/

const (
	// createNodeGroupApi post
	createNodeGroupApi = "/clustermanager/v1/nodegroup"

	// deleteNodeGroupApi delete ( nodeGroupID )
	deleteNodeGroupApi = "/clustermanager/v1/nodegroup/%s"

	// updateNodeGroupApi put ( nodeGroupID )
	updateNodeGroupApi = "/clustermanager/v1/nodegroup/%s"

	// updateGroupDesiredNodeApi post ( nodeGroupID )
	updateGroupDesiredNodeApi = "/clustermanager/v1/nodegroup


auté, est devenue l\'un des noms les plus fiables de la communauté extrêmement sceptique de Monero.\n\n- Sécurisée, Open Source, centrée sur la confidentialité, résistante à la censure\nNotre application est gratuite et Open Source, ce qui garantit que de nombreux yeux peuvent regarder le code de l\'application pour s\'assurer qu\'il n\'y a pas de failles de sécurité ou de fuites de confidentialité. Le fait que notre application soit Open Source permet également à quiconque d\'avoir accès à notre application même si un certain dépôt d\'applications censure l\'application. Notre application fonctionne même sur les téléphones sur lesquels Google est complètement bloqué. Nous accordons tellement d\'importance à votre vie privée que nous ne vous demandons même pas de fournir une adresse e-mail lors de votre inscription.\n\nCode source : https://github.com/AgoraDesk-LocalMonero/agoradesk-app-foss\nSuivi des problèmes : https://github.com/AgoraDesk-LocalMonero/agoradesk-app-foss/issues\n\n- Assistance exceptionnelle\nNotre équipe de support est rapide, réactive et toujours prête à vous satisfaire. Nous n\'avons jamais eu de ticket de demande d\'assistance sans réponse dans les 24 heures. Nous sommes toujours facilement joignables via les médias sociaux, nous écoutons attentivement vos critiques et nous mettons toujours en œuvre les bonnes suggestions des utilisateurs en un temps record.\n\nVous pouvez joindre notre support à l\'adresse suivante : https://localmonero.co/support\n\n- Frais équitables\nNous ne facturons pas de frais exorbitants lorsque vous déposez ou retirez duMonero vers/depuis notre portefeuille de caution d\'arbitrage. Il n\'y a pas de frais de dépôt et les frais de retrait sont très proches des frais que vous paieriez pour une transaction normale.';

  @override
  String get app250Sbgoogle8722Sbplay8722Sbstore8722Sbtitle250Sbagoradesk => 'AgoraDesk : achat BTC anonyme';

  @override
  String get app250Sbgoogle8722Sbplay8722Sbstore8722Sbdescription250Sbagoradesk => 'Achetez ou vendez des Bitcoins sans vérification d\'identité. En espèces ou en ligne.\n\nVous vous demandez comment investir dans Bitcoin ? Sur AgoraDesk, acheter des Bitcoins n\'a jamais été aussi simple - achetez instantanément des BTC à une personne en utilisant votre méthode de paiement en ligne préférée : PayPal, une carte de crédit/débit ou un virement bancaire, des cartes-cadeaux, Venmo ou tout autre moyen de paiement. Si vous souhaitez acheter des Bitcoins près de chez vous avec de l\'argent liquide, vous pouvez trouver quelqu\'un prêt à vendre des Bitcoins localement - la plateforme d\'échange prend en charge l\'achat et la vente de BTC avec de l\'argent liquide. Vous pouvez même acheter des Bitcoins en espèces par courrier.\n\n- Transaction sûr et fluide\nTout comme LocalBitcoins, nous prenons en charge n\'importe quel mode de paiement, n\'importe quelle devise, de n\'importe où. Nous ne supprimons pas les méthodes de paiement et, contrairement à LocalBitcoins, nous prenons pleinement en charge les transactions en espèces en face à face. Toutes nos transactions sont protégées par une caution d\'arbitrage. Grâce au fait que nous exigeons que les fonds soient détenus en caution d\'arbitrage avant qu\'une transaction puisse commencer, nous assurons une expérience fluide


      Marker < 128: The marker is followed by Marker pixels of
    *                               literal data with one byte per pixel.
    *                 Marker > 127: The marker indicates that 256-Marker pixels
    *                               of no data pixels should be put into the
    *                               output stream. No data
    *                               (other than the next marker) follows this
    *                               marker.
    *                 This is similar to 0xD7, except that the data size is zero bytes instead of 1,
    *                 so only RMin values are inserted into the output stream.
    * theTileType = 0xE0 (run length encoded 32bit)
    *               The data is organized in a series of runs.
    *               Each run starts with a marker which should be
    *               interpreted as a count. The four bytes following the count
    *               should be interpreted as an MSB
    *               Int32 value. They indicate that count pixels of value
    *               should be inserted into the output stream.
    * theTileType = 0xF0 (run length encoded 16bit)
    *               The data is organized in a series of runs. Each run
    *               starts with a marker which should be interpreted as a count.
    *               The two bytes following the count should be interpreted as an MSB
    *               Int16 value. They indicate that count pixels of value should be
    *               inserted into the output stream.
    * theTileType = 0xFC/0xF8 (run length encoded 8bit)
    *               The data is organized in a series of runs.
    *               Each run starts with a marker which should be
    *               interpreted as a count. The following byte is the value.
    *               They indicate that count pixels of value should be inserted
    *               into the output stream.  The intepretation is the same for
    *               0xFC, and 0xF8. I believe that 0xFC has a lower dynamic (2bit) range than 0xF8 (4 or 8 bit).
    * theTileType = 0xFF (unknown)
    *               I have yet to deduce how this is organized, though it seems to be used for data with one bit of
    *               dynamic range. and presumably uses some sort of run length encoding. But it's operation is not
    *               obvious despite many hours, productions of hundreds of test files, and attempts to develop a
    *               dictionary of binary strings for different run values.
   */

   ossim_uint8 theTileType;

   /*!
    * Number of bytes following to
    * form the minimum value for the
    * tile (integer coverages only). This describes
    * the size of the next field
    */
   ossim_uint8 theMinSize;

   ossim_int32 theMin;
};

#endif


izedTracer& GetTokenizedTracer();

}  // namespace trace

/// @}

}  // namespace pw
#endif  // __cplusplus

/// @module{pw_trace_tokenized}

/// Enables or disables tracing.
#define PW_TRACE_SET_ENABLED(enabled) pw_trace_Enable(enabled)

/// Provides the `uint32_t` token value for a specific trace event. This
/// can be used in the callback to perform specific actions for that trace.
/// All the fields must match exactly to generate the correct trace reference.
/// If the trace does not have a group, use `PW_TRACE_GROUP_LABEL_DEFAULT`.
///
/// For example this can be used to skip a specific trace:
///
/// @code{.cpp}
///   pw_trace_TraceEventReturnFlags TraceEventCallback(
///       uint32_t trace_ref,
///       pw_trace_EventType event_type,
///       const char* module,
///       uint32_t trace_id,
///       uint8_t flags) {
///     auto skip_trace_ref = PW_TRACE_REF(PW_TRACE_TYPE_INSTANT,
///                                        "test_module",    // Module
///                                        "test_label",     // Label
///                                        PW_TRACE_FLAGS_DEFAULT,
///                                        PW_TRACE_GROUP_LABEL_DEFAULT);
///     if (trace_ref == skip_trace_ref) {
///       return PW_TRACE_EVENT_RETURN_FLAGS_SKIP_EVENT;
///     }
///     return 0;
///   }
/// @endcode
///
/// The above trace ref would provide the token value for the string:
/// `1|0|test_module||test_label`
///
/// Another example:
///
/// @code{.cpp}
///    #define PW_TRACE_MODULE test_module
///    PW_TRACE_INSTANT_DATA_FLAG(2, "label", "group", id, "%d", 5, 1);
/// @endcode
///
/// Would internally generate a token value for the string:
/// `1|2|test_module|group|label|%d`
///
/// The `trace_id` and `data` value are runtime values and not included in the
/// token string.
#define PW_TRACE_REF(event_type, module, label, flags, group)          \
  PW_TOKENIZE_STRING_DOMAIN("trace",                                   \
                            PW_STRINGIFY(event_type) "|" PW_STRINGIFY( \
                                flags) "|" module "|" group "|" label)

#define PW_TRACE_REF_DATA(event_type, module, label, flags, group, type)    \
  PW_TOKENIZE_STRING_DOMAIN(                                                \
      "trace",                                                              \
      PW_STRINGIFY(event_type) "|" PW_STRINGIFY(flags) "|" module "|" group \
                                                       "|" label "|" type)

/// @}


  mixer.min_needed=(mixer.freq*mixer.min_needed)/1000;
   mixer.max_needed=mixer.blocksize * 2 + 2*mixer.min_needed;
   mixer.needed=mixer.min_needed+1;
   PROGRAMS_MakeFile("MIXER.COM",MIXER_ProgramStart);
}

// Need to put it in the av_info struct
Bit32u MIXER_RETRO_GetFrequency()
{
    return mixer.freq;
}

/*
 *  Copyright (C) 2002-2015  The DOSBox Team
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#include "dosbox.h"
#include "keyboard.h"
#include "inout.h"
#include "pic.h"
#include "mem.h"
#include "mixer.h"
#include "timer.h"

#define KEYBUFSIZE 32
#define KEYDELAY 0.300f			//Considering 20-30 khz serial clock and 11 bits/char

enum KeyCommands {
	CMD_NONE,
	CMD_SETLEDS,
	CMD_SETTYPERATE,
	CMD_SETOUTPORT
};

static struct {
	Bit8u buffer[KEYBUFSIZE];
	Bitu used;
	Bitu pos;
	struct {
		KBD_KEYS key;
		Bitu wait;
		Bitu pause,rate;
	} repeat;
	KeyCommands command;
	Bit8u p60data;
	bool p60changed;
	bool active;
	bool scanning;
	bool scheduled;
} keyb;

static void KEYBOARD_SetPort60(Bit8u val) {
	keyb.p60changed=true;
	keyb.p60data=val;
	if (machine==MCH_PCJR) PIC_ActivateIRQ(6);
	else PIC_ActivateIRQ(1);
}

static void KEYBOARD_TransferBuffer(Bitu val) {
	keyb.scheduled=false;
	if (!keyb.used) {
		LOG(LOG_KEYBOARD,LOG_NORMAL)("Transfer started with empty buffer");
		return;
	}
	KEYBOARD_SetPort60(keyb.buffer[keyb.pos]);
	if (++keyb.pos>=KEYBUFSIZE) keyb.pos-=KEYBUFSIZE;
	keyb.used--;
}

void KEYBOARD_ClrBuffer(void) {
	keyb.used=0;
	keyb.pos=0;
	PIC_RemoveEvents(KEYBOARD_TransferBuffer);
	keyb.scheduled=false;
}

static void KEYBOARD_AddBuffer(Bit8u data) {
	if (keyb.used>=KEYBUFSIZE) {
		LOG(LOG_KEYBOARD,LOG_NORMAL)("Buffer full, dropping code");
		return;
	}
	Bitu start=keyb.pos+keyb.used;
	if (start>=KEYBUFSIZE) start-=KEYBUFSIZE;
	keyb.buffer[start]=data;
	keyb.used++;
	/* Start up an event to start the first IRQ */
	if (!keyb.scheduled && !keyb.p60changed) {
		keyb.scheduled=true;
		PIC_AddEvent(KEYBOARD_TransferBuffer,KEYDELAY


ParameterException].
  /// May throw [EntityDoesNotExistException].
  /// May throw [DirectoryAlreadySharedException].
  /// May throw [ClientException].
  /// May throw [ServiceException].
  ///
  /// Parameter [sharedDirectoryId] :
  /// Identifier of the shared directory in the directory consumer account. This
  /// identifier is different for each directory owner account.
  Future<AcceptSharedDirectoryResult> acceptSharedDirectory({
    required String sharedDirectoryId,
  }) async {
    final headers = <String, String>{
      'Content-Type': 'application/x-amz-json-1.1',
      'X-Amz-Target': 'DirectoryService_20150416.AcceptSharedDirectory'
    };
    final jsonResponse = await _protocol.send(
      method: 'POST',
      requestUri: '/',
      exceptionFnMap: _exceptionFns,
      // TODO queryParams
      headers: headers,
      payload: {
        'SharedDirectoryId': sharedDirectoryId,
      },
    );

    return AcceptSharedDirectoryResult.fromJson(jsonResponse.body);
  }

  /// If the DNS server for your self-managed domain uses a publicly addressable
  /// IP address, you must add a CIDR address block to correctly route traffic
  /// to and from your Microsoft AD on Amazon Web Services. AddIpRoutes
  /// adds this address block. You can also use AddIpRoutes to facilitate
  /// routing traffic that uses public IP ranges from your Microsoft AD on
  /// Amazon Web Services to a peer VPC.
  ///
  /// Before you call AddIpRoutes, ensure that all of the required
  /// permissions have been explicitly granted through a policy. For details
  /// about what permissions are required to run the AddIpRoutes
  /// operation, see Directory
  /// Service API Permissions: Actions, Resources, and Conditions Reference.
  ///
  /// May throw [EntityDoesNotExistException].
  /// May throw [EntityAlreadyExistsException].
  /// May throw [InvalidParameterException].
  /// May throw [DirectoryUnavailableException].
  /// May throw [IpRouteLimitExceededException].
  /// May throw [ClientException].
  /// May throw [ServiceException].
  ///
  /// Parameter [directoryId] :
  /// Identifier (ID) of the directory to which to add the address block.
  ///
  /// Parameter [ipRoutes] :
  /// IP address blocks, using CIDR format, of the traffic to route. This is
  /// often the IP address block of the DNS server used for your self-managed
  /// domain.
  ///
  /// Parameter [updateSecurityGroupForDirectoryControllers] :
  /// If set to true, updates the inbound and outbound rules of the security
  /// group that has the description: "Amazon Web Services created security
  /// group for directory ID directory controllers." Following are the
  /// new rules:
  ///
  /// Inbound:
  ///
  ///

  ///

  /// Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0/0
  ///

  ///

  /// Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0/0
  ///

  ///

  /// Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0/0
  ///

  ///

  /// Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.


_SUB1
	KERNEL4x2_SUB1

	KERNEL4x2_SUB1
	KERNEL4x2_SUB1
	KERNEL4x2_SUB1
	KERNEL4x2_SUB1

	b		.LDTRMM_L4x2_SUB1

.LDTRMM_L4x2_SUB0:

	andi.		L,	K1,	7						// K1 & 7 -> L

	KERNEL4x2_SUBI1

	addic.		L,	L,	-1
	ble		.LDTRMM_L4x2_SAVE
	b		.LDTRMM_L4x2_SUB2

.LDTRMM_L4x2_SUB1:

	andi.		L,	K1,	7						// K1 & 7 -> L
	ble		.LDTRMM_L4x2_SAVE

.LDTRMM_L4x2_SUB2:

	KERNEL4x2_SUB1

	addic.		L,	L,	-1
	bgt		.LDTRMM_L4x2_SUB2

.LDTRMM_L4x2_SAVE:

	SAVE4x2

#if  (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
	sub		T1,	K,	KKK					// K - KKK -> TEMP1
	slwi		T2,	T1,	5			// TEMP1 * Number of values in B shifted -> TEMP2
	slwi		T1,	T1,	4			// TEMP1 * Number of values in A shifted -> TEMP1
	add		BO,	BO,	T2					// BO += TEMP2 * number of values in B shifted
	add		AO,	AO,	T1					// AO += TEMP1 * number of values in A shifted
#endif

#if defined(LEFT)
	addi		KK,	KK,	2				// KK += Number of values in A
#endif

.LDTRMM_L4x2_END:

.LDTRMM_L4x1_BEGIN:

	andi.		T1,	M,	1
	ble		.LDTRMM_L4x1_END

#if  (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
	mr		BO,	B					// B -> BO
#else
	mr		BO,	B					// B -> BO
	slwi		T1,	KK,	5				// Number of values in B shifted
	slwi		T2,	KK,	3				// Number of values in A shifted
	add		BO,	BO,	T1				// Add values to BO
	add		AO,	AO,	T2				// Add values to AO
#endif

#if (defined(LEFT) &&  !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
	sub		T1,	K,	KK				// K - KK -> TEMP1
#else
	mr		T1,	KK					// KK -> KTEMP
#ifdef LEFT
	addi		T1,	T1,	1				// KTEMP + Number of values in A -> KTEMP
#else
	addi		T1,	T1,	4				// KTEMP + Number of values in B -> KTEMP
#endif
#endif

	mr		KKK,	T1
	mr		K1,	T1
	srawi.		L,	K1,	3				// KTEMP / 8 -> L
	ble		.LDTRMM_L4x1_SUB0
	cmpwi		cr0,	L,	1
	ble


using NimblePros.SampleToDo.Web;
using NimblePros.SampleToDo.Web.Endpoints.Projects;
using NimblePros.SampleToDo.Web.Projects;
using Shouldly;

namespace NimblePros.SampleToDo.FunctionalTests.Projects;

[Collection("Sequential")]
public class ProjectAddToDoItem : TestBase
{
  public ProjectAddToDoItem(CustomWebApplicationFactory<Program> factory) : base(factory)
  {
  }

  //[Fact] - Broken due to CachingBehavior without cache invalidation logic
  private async Task AddsItemAndReturnsRouteToProject()
  {
    // Arrange
    var uniqueId = Guid.NewGuid().ToString();
    var toDoTitle = $"AddsItem-{uniqueId}";
    var request = CreateToDoItemRequestBuilder.Create()
      .WithValidDefaults()
      .WithTitle(toDoTitle)
      .WithDescription($"Description for {toDoTitle}")
      .Build();

    var content = StringContentHelpers.FromModelAsJson(request);

    // Act
    var result = await _client.PostAsync(
      CreateToDoItemRequest.BuildRoute(request.ProjectId), content);

    // Assert
    result.EnsureSuccessStatusCode();

    var expectedRoute = GetProjectByIdRequest.BuildRoute(request.ProjectId);
    result.Headers!.Location!.ToString().ShouldBe(expectedRoute);

    // Verify the item was actually added
    var updatedProject = await _client.GetAndDeserializeAsync<GetProjectByIdResponse>(expectedRoute);
    var addedItem = updatedProject.Items.FirstOrDefault(item => item.Title == toDoTitle);
    addedItem.ShouldNotBeNull();
    addedItem.Description.ShouldBe(request.Description);
    addedItem.IsDone.ShouldBe(false);
    addedItem.ContributorId.ShouldBeNull();
  }

  [Fact]
  public async Task ReturnsBadRequestWhenTitleIsMissing()
  {
    // Arrange
    var request = CreateToDoItemRequestBuilder.Create()
      .WithValidDefaults()
      .WithTitle(string.Empty) // Missing required title
      .Build();

    var content = StringContentHelpers.FromModelAsJson(request);

    // Act & Assert
    _ = await _client.PostAndEnsureBadRequestAsync(
      CreateToDoItemRequest.BuildRoute(request.ProjectId), content);
  }

  [Fact]
  public async Task ReturnsBadRequestWhenDescriptionIsMissing()
  {
    // Arrange
    var request = CreateToDoItemRequestBuilder.Create()
      .WithValidDefaults()
      .WithDescription(string.Empty) // Missing required description
      .Build();

    var content = StringContentHelpers.FromModelAsJson(request);

    // Act & Assert
    _ = await _client.PostAndEnsureBadRequestAsync(
      CreateToDoItemRequest.BuildRoute(request.ProjectId), content);
  }

  [Fact]
  public async Task ReturnsBadRequestWhenProjectIdIsZero()
  {
    // Arrange
    var request = CreateToDoItemRequestBuilder.Create()
      .WithValidDefaults()
      .WithProjectId(0) // Invalid project ID
      .Build();

    var content = StringContentHelpers.FromModelAsJson(request);

    // Act & Assert
    _ = await _client.PostAndEnsureBadRequestAsync(
      CreateToDoItemRequest.BuildRoute(request.ProjectId), content);
  }

  [Fact]
  public async Task ReturnsNotFoundWhenProjectDoesNotExist()
  {
    // Arrange
    int nonExistentProjectId = 9999;
    var request = CreateToDoItemRequestBuilder.Create()
      .WithValidDefaults()
      .WithProjectId(nonExistentProjectId)
      .Build();

    var content = StringContentHelpers.FromModelAsJson(request);

    // Act & Assert
    _ = await _client.PostAndEnsureNotFoundAsync(
      CreateToDoItemRequest.BuildRoute(nonExistentProjectId), content);
  }

  [Fact]
  public async Tas


/*
    SPDX-FileCopyrightText: 2010 BetterInbox <contact@betterinbox.com>
    SPDX-FileContributor: Gregory Schlomoff <greg@betterinbox.com>

    SPDX-License-Identifier: MIT
*/

#ifndef DECLARATIVEMIMEDATA_H
#define DECLARATIVEMIMEDATA_H

#include <QColor>
#include <QJsonArray>
#include <QMimeData>
#include <QQuickItem>
#include <QUrl>

class DeclarativeMimeData : public QMimeData
{
    Q_OBJECT

    /**
     * A plain text (MIME type text/plain) representation of the data.
     */
    Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)

    /**
     * A string if the data stored in the object is HTML (MIME type text/html); otherwise returns an empty string.
     */
    Q_PROPERTY(QString html READ html WRITE setHtml NOTIFY htmlChanged)

    /**
     * Url contained in the mimedata
     */
    Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)

    /**
     * A list of URLs contained within the MIME data object.
     * URLs correspond to the MIME type text/uri-list.
     */
    Q_PROPERTY(QJsonArray urls READ urls WRITE setUrls NOTIFY urlsChanged)

    /**
     * A color if the data stored in the object represents a color (MIME type application/x-color); otherwise QColor().
     */
    Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)

    /**
     * The graphical item on the scene that started the drag event. It may be null.
     */
    Q_PROPERTY(QQuickItem *source READ source WRITE setSource NOTIFY sourceChanged)

    /** @see QMimeData::hasUrls */
    Q_PROPERTY(bool hasUrls READ hasUrls NOTIFY urlsChanged)
    // TODO: Image property

    /**
     * @sa QMimeData::formats
     */
    Q_PROPERTY(QStringList formats READ formats)
public:
    DeclarativeMimeData();
    DeclarativeMimeData(const QMimeData *copy);

    QUrl url() const;
    void setUrl(const QUrl &url);

    QJsonArray urls() const;
    void setUrls(const QJsonArray &urls);

    QColor color() const;
    void setColor(const QColor &color);
    Q_INVOKABLE bool hasColor() const;

    Q_INVOKABLE void setData(const QString &mimeType, const QVariant &data);

    QQuickItem *source() const;
    void setSource(QQuickItem *source);

    Q_INVOKABLE QByteArray getDataAsByteArray(const QString &format);

    /*
    QString text() const;                //TODO: Reimplement this to issue the onChanged signals
    void setText(const QString &text);
    QString html() const;
    void setHtml(const QString &html);
    */

Q_SIGNALS:
    void textChanged(); // FIXME not being used
    void htmlChanged(); // FIXME not being used
    void urlChanged();
    void urlsChanged();
    void colorChanged();
    void sourceChanged();

private:
    QQuickItem *m_source;
};

#endif // DECLARATIVEMIMEDATA_H


onsensusVersion = AppModule{}
	_ module.HasGenesis          = AppModule{}
	_ module.HasServices         = AppModule{}
)

type AppModuleBasic struct{}

func (AppModuleBasic) Name() string { return types.ModuleName }

func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
}

func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
	return cdc.MustMarshalJSON(types.DefaultGenesis())
}

// ValidateGenesis performs genesis state validation for the ibc-rate-limit module.
func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error {
	var genState types.GenesisState
	if err := cdc.UnmarshalJSON(bz, &genState); err != nil {
		return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err)
	}
	return genState.Validate()
}

// ---------------------------------------
// Interfaces.
func (b AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
	queryproto.RegisterQueryHandlerClient(context.Background(), mux, queryproto.NewQueryClient(clientCtx)) //nolint:errcheck
}

func (b AppModuleBasic) GetTxCmd() *cobra.Command {
	return nil
}

func (b AppModuleBasic) GetQueryCmd() *cobra.Command {
	return ibcratelimitcli.GetQueryCmd()
}

// RegisterInterfaces registers interfaces and implementations of the ibc-rate-limit module.
func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
}

// ----------------------------------------------------------------------------
// AppModule
// ----------------------------------------------------------------------------

// AppModule implements the AppModule interface for the capability module.
type AppModule struct {
	AppModuleBasic

	ics4wrapper ibcratelimit.ICS4Wrapper
}

func NewAppModule(ics4wrapper ibcratelimit.ICS4Wrapper) AppModule {
	return AppModule{
		AppModuleBasic: AppModuleBasic{},
		ics4wrapper:    ics4wrapper,
	}
}

// IsAppModule implements the appmodule.AppModule interface.
func (am AppModule) IsAppModule() {}

// IsOnePerModuleType is a marker function just indicates that this is a one-per-module type.
func (am AppModule) IsOnePerModuleType() {}

// Name returns the txfees module's name.
func (am AppModule) Name() string {
	return am.AppModuleBasic.Name()
}

// QuerierRoute returns the ibc-rate-limit module's query routing key.
func (AppModule) QuerierRoute() string { return types.RouterKey }

// RegisterServices registers a GRPC query service to respond to the
// module-specific GRPC queries.
func (am AppModule) RegisterServices(cfg module.Configurator) {
	queryproto.RegisterQueryServer(cfg.QueryServer(), grpc.Querier{Q: ibcratelimitclient.Querier{K: am.ics4wrapper}})
}

// RegisterInvariants registers the txfees module's invariants.
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// InitGenesis performs the txfees module's genesis initialization It returns
// no validator updates.
func (am AppModule) Init


0.85);
    transform: scale(0.85);
    -webkit-transition: .5s all;
    -moz-transition: .5s all;
    transition: .5s all;
}

#toTop:hover {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -o-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
}

#toTopHover {
    width: 32px;
    height: 32px;
    display: block;
    overflow: hidden;
    float: right;
    opacity: 0;
    -moz-opacity: 0;
    filter: alpha(opacity=0);
    transform: scale(1);
}

/*-- //slider-up-arrow --*/

/*--responsive--*/

@media(max-width: 1366px) {
    .slider-img-w3layouts.one,
    .slider-img-w3layouts.two,
    .slider-img-w3layouts.three,
    .slider-img-w3layouts.four {
        min-height: 700px;
    }
    .banner-text-info {
        padding-top: 22em;
    }
    .logo h1 a {
        padding: 30px 40px 40px;
    }
    .middle-w3l {
        padding: 9em 0;
    }
    .blog-grids.mid-blog-agile img {
        width: 80%;
        float: right;
    }
    .blog-grids.mid-blog-agile {
        bottom: -1%;
    }
}

@media(max-width: 1280px) {
    .banner-text-info h3 {
        font-size: 52px;
    }
    .banner-text-info p {
        font-size: 12px;
        margin: 30px 0;
    }
    .banner-text-info p:before {
        left: 70%;
    }
    .callbacks_nav {
        bottom: 44%;
    }
    .w3l-img-side img {
        width: 80%;
    }
    .w3l-img-side2 img {
        float: right;
    }
    .blog-grids.mid-blog-agile img {
        width: 70%;
    }
    .middle-w3l {
        padding: 8em 0;
    }
    .slider-img-w3layouts.one,
    .slider-img-w3layouts.two,
    .slider-img-w3layouts.three,
    .slider-img-w3layouts.four {
        min-height: 670px;
    }
}

@media(max-width: 1080px) {
    .banner-text-info h3 {
        font-size: 47px;
        letter-spacing: 2px;
    }
    .logo h1 a {
        padding: 26px 30px;
    }
    .banner-text-info {
        padding-top: 20em;
    }
    .slider-img-w3layouts.one,
    .slider-img-w3layouts.two,
    .slider-img-w3layouts.three,
    .slider-img-w3layouts.four {
        min-height: 600px;
    }
    nav.navbar.navbar-default ul li a {
        font-size: 15px;
    }
    h3.agile-title {
        font-size: 51px;
    }
    .about-wel h5 {
        font-size: 27px;
    }
    .middle-w3l h2 {
        font-size: 50px;
        width: 80%;
    }
    .w3l-img-side img {
        width: 70%;
    }
    p {
        font-size: 14px;
    }
    .blog-grids.mid-blog-agile img {
        width: 66%;
    }
    section.footer-w3 p.footer-p1 {


ntityTypeBuilder<Worker> builder)
        {
            builder.Property(prop => prop.FullName).IsRequired().HasMaxLength(30);
            builder.Property(prop => prop.MediaUrl).IsRequired().HasMaxLength(50);
            builder.Property(prop => prop.ImgUrl).IsRequired().HasMaxLength(100);
            builder.HasOne(prop => prop.Profession).WithMany(prop => prop.Workers);
        }
    }
}


).mapToLong(Long::longValue).sum();
			Assert.assertEquals(messagesToSend, sumOfAllBatches);
		}
	}

	@Test
	public void testAll() throws InterruptedException {

		// NOTE: Here we are testing on the same JVM for convenience

		final String filename = "test-waiting-ring.mmap";

		final int messagesToSend = 1_000_000;
		final int maxBatchSize = 1_000;
		final int numberOfConsumers = 3;

		final RingProducer<Message> ringProducer = new WaitingBroadcastRingProducer<Message>(Message.getMaxSize(), Message.class, filename, numberOfConsumers);

		Thread producer = new Thread(new Runnable() {

			@Override
			public void run() {

				int idToSend = 1; // each message from this producer will contain a unique value (id)

				Random rand = new Random();

				int remaining = messagesToSend;
				while(remaining > 0) {
					int batchToSend = Math.min(rand.nextInt(maxBatchSize) + 1, remaining);
					for(int i = 0; i < batchToSend; i++) {
						Message m;
						while((m = ringProducer.nextToDispatch()) == null) { // <=========
							// busy spin while waiting (default and fastest wait strategy)
						}
						m.value = idToSend++; // sending a unique value so the messages sent are unique
						m.last = m.value == messagesToSend; // is it the last message I'll be sending?
					}
					ringProducer.flush(); // <=========
					remaining -= batchToSend;
				}
			}

		}, "RingProducer");

		Thread[] consumers = new Thread[numberOfConsumers];

		final List<List<Long>> messagesReceived  = new ArrayList<List<Long>>(consumers.length);
		final List<List<Long>> batchesReceived = new ArrayList<List<Long>>(consumers.length);

		for(int i = 0; i < consumers.length; i++) {

			final List<Long> mr = new ArrayList<Long>(messagesToSend);
			final List<Long> br = new ArrayList<Long>(messagesToSend);

			messagesReceived.add(mr);
			batchesReceived.add(br);

			final int consumerIndex = i;

			consumers[i] = new Thread(new Runnable() {

				@Override
				public void run() {

					final RingConsumer<Message> ringConsumer = new WaitingBroadcastRingConsumer<Message>(Message.getMaxSize(), Message.class, filename, consumerIndex, numberOfConsumers);

					boolean isRunning = true;
					while(isRunning) {
						long avail = ringConsumer.availableToFetch(); // <=========
						if (avail == -1) throw new RuntimeException("Consumer fell behind!");
						if (avail > 0) {
							for(long i = 0; i < avail; i++) {
								Message m = ringConsumer.fetch(); // <=========
								if (m == null) throw new RuntimeException("Consumer tripped over producer! (checksum failed)");
								mr.add(m.value); // save just the long value from this message
								if (m.last) isRunning = false; // I'm done!
							}
							ringConsumer.doneFetching(); // <=========
							br.add(avail); // save the batch sizes received, just so we can double check
						} else {
							// busy spin while waiting (default and fastest wait strategy)
						}
					}

					ringConsumer.close(false);
				}

			}, "RingConsumer-" + consumerIndex);
		}

		producer.start();
		for(Thread consumer : consumers) consumer.start();

		producer.join();
		for(Thread consumer : consumers) consumer.join();

		ringProducer.close(true);

		// Did we receive all messages?
		for(int i = 0; i < consumers.length; i++) {
			Assert.assertEquals(messagesToSend, messagesReceived.get(i).size());
		}

		// Where there any duplicates?
		for(int i = 0; i < consumers.length; i++) {


unwrap();
        let quantity = Usd::new(dec!(40000));
        let leverage = Leverage::new(10).unwrap();

        let long_margin = calculate_long_margin(price, quantity, leverage);

        assert_eq!(long_margin, Amount::from_btc(0.1).unwrap());
    }

    #[test]
    fn given_quantity_equals_price_then_short_margin_is_one_btc() {
        let price = Price::new(dec!(40000)).unwrap();
        let quantity = Usd::new(dec!(40000));

        let short_margin = calculate_short_margin(price, quantity);

        assert_eq!(short_margin, Amount::ONE_BTC);
    }

    #[test]
    fn given_quantity_half_of_price_then_short_margin_is_half_btc() {
        let price = Price::new(dec!(40000)).unwrap();
        let quantity = Usd::new(dec!(20000));

        let short_margin = calculate_short_margin(price, quantity);

        assert_eq!(short_margin, Amount::from_btc(0.5).unwrap());
    }

    #[test]
    fn given_quantity_double_of_price_then_short_margin_is_two_btc() {
        let price = Price::new(dec!(40000)).unwrap();
        let quantity = Usd::new(dec!(80000));

        let short_margin = calculate_short_margin(price, quantity);

        assert_eq!(short_margin, Amount::from_btc(2.0).unwrap());
    }

    #[test]
    fn test_secs_into_blocks() {
        let error_margin = f32::EPSILON;

        let duration = Duration::seconds(600);
        let blocks = duration.as_blocks();
        assert!(blocks - error_margin < 1.0 && blocks + error_margin > 1.0);

        let duration = Duration::seconds(0);
        let blocks = duration.as_blocks();
        assert!(blocks - error_margin < 0.0 && blocks + error_margin > 0.0);

        let duration = Duration::seconds(60);
        let blocks = duration.as_blocks();
        assert!(blocks - error_margin < 0.1 && blocks + error_margin > 0.1);
    }

    #[test]
    fn calculate_profit_and_loss() {
        assert_profit_loss_values(
            Price::new(dec!(10_000)).unwrap(),
            Price::new(dec!(10_000)).unwrap(),
            Usd::new(dec!(10_000)),
            Leverage::new(2).unwrap(),
            Position::Long,
            SignedAmount::ZERO,
            Decimal::ZERO.into(),
            "No price increase means no profit",
        );

        assert_profit_loss_values(
            Price::new(dec!(10_000)).unwrap(),
            Price::new(dec!(20_000)).unwrap(),
            Usd::new(dec!(10_000)),
            Leverage::new(2).unwrap(),
            Position::Long,
            SignedAmount::from_sat(50_000_000),
            dec!(100).into(),
            "A price increase of 2x should result in a profit of 100% (long)",
        );

        assert_profit_loss_values(
            Price::new(dec!(9_000)).unwrap(),
            Price::new(dec!(6_000)).unwrap(),
            Usd::new(dec!(9_000)),
            Leverage::new(2).unwrap(),
            Position::Long,
            SignedAmount::from_sat(-50_000_000),
            dec!(-100).into(),
            "A price drop of 1/(Leverage + 1) x should result in 100% loss (long)",
        );

        assert_profit_loss_values(
            Price::new(dec!(10_000)).unwrap(),
            Price::new(dec!(5_000)).unwrap(),
            Usd::new(dec!(10_000)),
            Leverage::new(2).unwrap(),
            Position::Long,
            SignedAmount::from_sat(-50_0


import numpy as np

def del2(im_input):
    """Discrete Laplacian with edge-value extrapolation.

    Calculates the discrete Laplacian of an input image. Edge values are
    calculated by using linear extrapolation of second differences. This is
    consistent with the way that Matlab calculates the discrete Laplacian.

    Parameters
    ----------
    im_input : array_like
        A floating-point intensity image.

    Returns
    -------
    im_lap : array_like
        The discrete Laplacian of im_lap.

    See Also
    --------
    histomicstk.segmentation.level_set.reg_edge

    """
    # initialize output
    im_lap = np.zeros(im_input.shape)

    # process rows first
    D = np.diff(im_input, axis=0)
    S = np.zeros(im_input.shape)
    S[1:-1, :] = (D[1:, :] - D[0:-1, :]) / 2
    if im_input.shape[0] > 3:
        S[0, :] = 2 * S[1, :] - S[2, :]
        S[-1, :] = 2 * S[-2, :] - S[-3, :]
    elif im_input.shape[0] == 3:
        S[0, :] = S[1, :]
        S[-1, :] = S[1, :]
    else:
        S[0, :] = 0
        S[-1, :] = 0
    im_lap += S

    # process columns
    D = np.diff(im_input, axis=1)
    S = np.zeros(im_input.shape)
    S[:, 1:-1] = (D[:, 1:] - D[:, 0:-1]) / 2
    if im_input.shape[1] > 3:
        S[:, 0] = 2 * S[:, 1] - S[:, 2]
        S[:, -1] = 2 * S[:, -2] - S[:, -3]
    elif im_input.shape[1] == 3:
        S[0, :] = S[:, 1]
        S[:, -1] = S[:, 1]
    else:
        S[:, 0] = 0
        S[:, -1] = 0
    im_lap += S

    return im_lap / 2


var createElements = function(div){
  var n = core.randi(2, 7);
  var clickNames = [];
  for(var i=0;i<n;i++) {
    var chname = ui_utils.generateString(2,8);
    var label = div.append('label')
    label.append('input').attr('type', 'radio').attr('id', 'chop'+i).attr('name', 'radio');
    label[0][0].innerHTML += chname;
    div.append('br');
    clickNames.push(chname);
  }
  var ix = core.randi(0, n);
  var qstr = clickNames[ix];
  return {query: qstr, index: ix};
}

// click-dialog
var resetUI = function(div){
  if(div.html().length > 0) $('#dialog').dialog('destroy');
  div.empty(); // clear previous problem, if any
}

var createDialog = function(div){
  var html = '
' + ui_utils.generateWords(4,8) + '
';
  div.append(html);

  $('#dialog').dialog({ height: 70, position: {my: 'center', at: 'center', of: document.getElementById('area')} });

  $('.ui-dialog')[0].style.margin = core.randi(-10,20) + 'px ' + core.randi(5,25) + 'px';
  $('.ui-dialog')[0].style.width = core.randi(90,120) + 'px';
  $('.ui-dialog')[0].style.height = core.randi(70,100) + 'px';
}

// click-widget
var ELEMENT_NAMES = ['radio', 'checkbox', 'text', 'textarea', 'button'];
var ELEMENT_HTML = {
  'radio': {'start': '
<input type="radio" data-type="radio" name="radio">',
    'end': '
'},
  'checkbox': {'start':'
<input type="checkbox" data-type="checkbox">',
    'end':'
'},
  'text': {'start': '
<input type="input" data-type="text" value="',
    'end':'">
'},
  'textarea': {'start':'
<textarea data-type="textarea">',
    'end':'</textarea>
'},
  'button': {'start': '
<button data-type="button">',
    'end':'</button>
'}
};
var NUM_ELEMENTS = 5;

// click-link
// since we randomly generate links, run this in a while loop
// until we produce text that definitely contains a link,
// otherwise the script will error out and fail.
var createWidgetsLinks = function(div){
  // generate query text in the UI
  var elements = []
  var elements_html = []
  for(var i=0;i<NUM_ELEMENTS;i++){
    randIndex = core.randi(0,ELEMENT_NAMES.length);
    var elemName = ELEMENT_NAMES[randIndex];
    var randomText = ui_utils.generateString(1,6);
    elements_html.push(ELEMENT_HTML[elemName]['start'] + randomText + ELEMENT_HTML[elemName]['end']);
    elements.push(elemName);
  }
  var linkCreated = false;
  while(!linkCreated){
    var txt =  ui_utils.generateWords(20).split(/\s/g);
    for(var j=0;j<txt.length; j++){
      if(Math.random() < 0.2){
        txt[j] = '' + txt[j] + '';
        linkCreated = true;
      }
    }
  }
  div.html(elements_html.join(' ') + txt.join(' '));
  return [elem


pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n    <defs>\n        <path d="M0 0h24v24H0z" id="a"/>\n    </defs>\n    <clipPath id="b">\n        <use overflow="visible" xlink:href="#a"/>\n    </clipPath>\n    <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),o("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n    <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l<this.elCustomIcons.length;l++)r.push({el:this.elCustomIcons[l],icon:this.t.customIcons[l].icon,title:this.t.customIcons[l].title,index:this.t.customIcons[l].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[l].class});r.forEach((function(t,e){t.index&&f.moveIndexInArray(r,e,t.index)}));for(var h=0;h<r.length;h++)b.setAttrs(r[h].el,{class:r[h].class,title:r[h].title}),r[h].el.innerHTML=r[h].icon,a.appendChild(r[h].el);this._createHamburgerMenu(a),e.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.globals.panEnabled?this.elPan.classList.add(this.selectedClass):e.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(t){this.elMenuItems=[],t.appendChild(this.elMenu),b.setAttrs(this.elMenu,{class:"apexcharts-menu"});var e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||e.splice(2,1);for(var i=0;i<e.length;i++)this.elMenuItems.push(document.createElement(


,t1,y_1)
        montmul_p256(t2,yd,t2)

        sub_p256(resy,t2,t1)

// Test if z_1 = 0 to decide if p1 = 0 (up to projective equivalence)

        testzero4(z_1)

// Multiplex: if p1 <> 0 just copy the computed result from the staging area.
// If p1 = 0 then return the point p2 augmented with a z = 1 coordinate (in
// Montgomery form so not the simple constant 1 but rather 2^256 - p_256),
// hence giving 0 + p2 = p2 for the final result.

        mux4(%r8,%r9,%r10,%r11,resx,x_2)
        mux4(%r12,%r13,%r14,%r15,resy,y_2)

        store4(x_3,%r8,%r9,%r10,%r11)
        store4(y_3,%r12,%r13,%r14,%r15)

        load4(%r8,%r9,%r10,%r11,resz)
        movl    $1, %eax


#pragma once
#ifndef HUDCONTACT_H
#define HUDCONTACT_H
#include "BaseHeader.h"
#include "HUDElement.h"
#include "FactionComponent.h"

/*
* This element shows the given contact that's currently in range of the ship's sensors. It contains the contact,
* info to display itself, and logic to show when the contact is on-screen and a marker at the edge of the screen when
* it's not.
*/
class HUDContact : public HUDElement
{
public:

	HUDContact(IGUIElement* root, flecs::entity contactId, flecs::entity playerId, bool objective=false, bool radio=false);
	~HUDContact() override;
	void setObjective(bool obj, std::string str="");
	virtual void updateElement(flecs::entity playerId);
	bool isValidContact(); //checks self
	void updateType(const FactionComponent* contactFac);
	void checkRange();
	flecs::entity contact;

	IGUIImage* contactView;
	IGUIImage* offscreenMarker;
	FACTION_TYPE lastType = FACTION_NEUTRAL;
	std::string objtype = "";
	bool isObjective = false;
	bool isRadio = false;
	bool inRange = false;
	bool isDirty = false;
	bool isSelected = false;
private:
	enum HUDOBJ_TYPE {
		NEUTRAL = 0,
		FRIENDLY = 1,
		HOSTILE = 2,
		HAZARD = 3,
		RADIO = 4,
		OBJECTIVE = 5
	};
	const inline HUDOBJ_TYPE m_getType(const FactionComponent* contactFac) const;
	inline ITexture* m_contact(const HUDOBJ_TYPE& which, const bool& important) const;
	inline ITexture* m_marker(const HUDOBJ_TYPE& which, const bool& important) const;
	HUDOBJ_TYPE m_type = (HUDOBJ_TYPE)-1; //this always feels so fucking silly. like I know it's just an int but it feels wrong
};

#endif


mber) => {
    let indexRowArray = index
     rowArray.forEach((unit: Unit, index: number) => {
      if (unit === turnUnit) {
        indexColumn = index
        indexRow = indexRowArray

      }
    })
  })
  return { indexRow: indexRow, indexColumn: indexColumn }
}import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-template-binding',
  template: `

Template binding demo

  <button mat-raised-button (click)="flag = !flag">Toggle flag's value</button>

    Flag's value: {{flag}}

   1. span with *ngIf="flag": Flag is true

    2. ng-template with [ngIf]="flag": <ng-template [ngIf]="flag">Flag is true</ng-template>

  `,
  styles: []
})
export class TemplateBindingComponent implements OnInit {
  flag: boolean;
  constructor() {
    this.flag = true;
  }

  ngOnInit() {
  }

}
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData';
import { IEditorWhitespace, WhitespaceComputer } from 'vs/editor/common/viewLayout/whitespaceComputer';
import { IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel';

/**
 * Layouting of objects that take vertical space (by having a height) and push down other objects.
 *
 * These objects are basically either text (lines) or spaces between those lines (whitespaces).
 * This provides commodity operations for working with lines that contain whitespace that pushes lines lower (vertically).
 * This is written with no knowledge of an editor in mind.
 */
export class LinesLayout {

	/**
	 * Keep track of the total number of lines.
	 * This is useful for doing binary searches or for doing hit-testing.
	 */
	private _lineCount: number;

	/**
	 * The height of a line in pixels.
	 */
	private _lineHeight: number;

	/**
	 * Contains whitespace information in pixels
	 */
	private readonly _whitespaces: WhitespaceComputer;

	constructor(lineCount: number, lineHeight: number) {
		this._lineCount = lineCount;
		this._lineHeight = lineHeight;
		this._whitespaces = new WhitespaceComputer();
	}

	/**
	 * Change the height of a line in pixels.
	 */
	public setLineHeight(lineHeight: number): void {
		this._lineHeight = lineHeight;
	}

	/**
	 * Set the number of lines.
	 *
	 * @param lineCount New number of lines.
	 */
	public onFlushed(lineCount: number): void {
		this._lineCount = lineCount;
	}

	/**
	 * Insert a new whitespace of a certain height after a line number.
	 * The whitespace has a "sticky" characteristic.
	 * Irrespective of edits above or below `afterLineNumber`, the whitespace will follow the initial line.
	 *
	 * @param afterLineNumber The conceptual position of this whitespace. The whitespace will follow this line as best as possible even when deleting/inserting lines above/below.
	 * @param heightInPx The height of the whitespace, in pixels.
	 * @return An id that can be used later to mutate or delete the whitespace
	 */
	public insertWhitespace(afterLineNumber: number, ordinal: number, heightInPx: number, minWidth: number): number {


ipe beginning
	private void On_SwipeStart( Gesture gesture){
		swipeText.text = "You start a swipe";
	}

	// During the swipe
	private void On_Swipe(Gesture gesture){

		// the world coordinate from touch for z=5
		Vector3 position = gesture.GetTouchToWorldPoint(5);
		trail.transform.position = position;

	}

	// At the swipe end
	private void On_SwipeEnd(Gesture gesture){

		// Get the swipe angle
		float angles = gesture.GetSwipeOrDragAngle();
		swipeText.text = "Last swipe : " + gesture.swipe.ToString() + " /  vector : " + gesture.swipeVector.normalized + " / angle : " + angles.ToString("f2");
	}
}


child process to
 * transform the file. A separate process is spawned to handle each file
 * passing through the stream.
 */
declare class GulpRunner extends Transform {
    constructor(template: string, options?: GulpRunner.Options);

    /**
     * Start a gulp pipeline and execute the command immediately, pushing the results downstream.
     *
     * Whenever an object is written into the GulpRunner, a new process is
     * spawned taking that data as standard input, and a Vinyl file wrapping the
     * process's standard output is pushed downstream.
     */
    exec(stdin?: any, callback?: (error: Error | null | undefined) => void): this;
}

declare function GulpRunner(...args: ConstructorParameters<typeof GulpRunner>): GulpRunner;

export = GulpRunner;
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';

import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { catchError, map, tap } from 'rxjs/operators';

import { Brand } from '../entities/brand';

const httpOptions = {
  headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};

@Injectable()
export class BrandService {

  private brandUrl = 'http://localhost:8080/perfumesystem-web/brand';

  constructor(
    private http: HttpClient) { }

  /** GET perfumes from the server */
  getBrands (): Observable<Brand[]> {
     const url = this.brandUrl+'/all';
    return this.http.get<Brand[]>(url);
  }

  /** GET perfumes from the server */
  getBrandsByCountry (id:number): Observable<Brand[]> {
     const url = this.brandUrl+'/by_country?id='+id;
    return this.http.get<Brand[]>(url);
  }

  /** GET perfume by id*/
  getBrand(id: number): Observable<Brand> {
    const url = this.brandUrl+'/find/?id='+id;
    return this.http.get<Brand>(url);
  }

  /** POST: add a new perfume to the server */
  addBrand (brand: Brand):  Observable<Brand> {
    const url = this.brandUrl+'/new';
    return this.http.post<Brand>(url, brand, httpOptions);
  }

  /** DELETE: delete the hero from the server */
  deleteBrand (brand: Brand): Observable<Brand> {
    const url = this.brandUrl+'/remove';
    return this.http.post<Brand>(url,brand, httpOptions);
  }

  /** PUT: update the hero on the server */
  updateBrand (brand: Brand): Observable<Brand> {
     const url = this.brandUrl+'/update';
    return this.http.post<Brand>(url, brand, httpOptions);
  }

  /**
   * Handle Http operation that failed.
   * Let the app continue.
   * @param operation - name of the operation that failed
   * @param result - optional value to return as the observable result
   */
}
///<reference path="../lib/TTypes.ts"/>
///<reference path="../model/IObject.ts"/>

interface scaleMethod { (x: number, y: number): void; }

abstract class VObjectView {

	abstract updateView			( obj: IObject) 		: void;
	abstract updateObjectSize	( obj: IObject ) 		: void;
	abstract setPositionHandler	( fpos: TPositionHandler) : void;
			 setMapScaleHandler	( scale: scaleMethod ) : void {}

	// Removes an element
	abstract remove() : void;

	// Maps the IObject [-1,1] y coordinate to the referenceRect().
	abstract relative2SceneY(y: number) : number;

	// \brief Maps the IObject [-1,1] x coordinate to the referenceRect().
	abstract relative2SceneX(x: number) : number;

	// \brief Maps the IObject [0,2


spacing-0\.5, 0.125rem);padding-block:var(--kendo-spacing-0\.5, 0.125rem)}.k-signature-sm .k-signature-line{width:calc(100% - var(--kendo-spacing-0\.5, 0.125rem)*2)}.k-signature-md{padding-inline:var(--kendo-spacing-1, 0.25rem);padding-block:var(--kendo-spacing-1, 0.25rem)}.k-signature-md .k-signature-line{width:calc(100% - var(--kendo-spacing-1, 0.25rem)*2)}.k-signature-lg{padding-inline:var(--kendo-spacing-2, 0.5rem);padding-block:var(--kendo-spacing-2, 0.5rem)}.k-signature-lg .k-signature-line{width:calc(100% - var(--kendo-spacing-2, 0.5rem)*2)}.k-signature-lg{min-height:110px}.k-signature .k-signature-line{border-block-end-color:color-mix(in srgb, var(--kendo-color-info, #007bc3) 24%, transparent)}
/**
 * Copyright 2025 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
:root{--kendo-disabled-text: unset;--kendo-disabled-bg: unset;--kendo-disabled-border: unset;--kendo-disabled-opacity: .6;--kendo-disabled-filter: grayscale(.1)}:root{--kendo-color-app-surface: #ffffff;--kendo-color-on-app-surface: #424242;--kendo-color-subtle: #666666;--kendo-color-surface: #fafafa;--kendo-color-surface-alt: #ffffff;--kendo-color-border: rgba(0, 0, 0, 0.08);--kendo-color-border-alt: rgba(0, 0, 0, 0.16);--kendo-color-base-subtle: #ebebeb;--kendo-color-base-subtle-hover: #e1e1e1;--kendo-color-base-subtle-active: #d5d5d5;--kendo-color-base: #f5f5f5;--kendo-color-base-hover: #ebebeb;--kendo-color-base-active: #d8d8d8;--kendo-color-base-emphasis: #c2c2c2;--kendo-color-base-on-subtle: #424242;--kendo-color-on-base: #424242;--kendo-color-base-on-surface: #424242;--kendo-color-primary-subtle: #ddf1d4;--kendo-color-primary-subtle-hover: #c3e6b3;--kendo-color-primary-subtle-active: #a9dc93;--kendo-color-primary: #53b827;--kendo-color-primary-hover: #50b125;--kendo-color-primary-active: #49a222;--kendo-color-primary-emphasis: #7e


第七条 机关、企事业单位和新闻媒体应当加强城市绿化保护的宣传，提高市民爱护城市绿地的意识。

任何单位和个人都有依法保护城市绿地及其设施的义务，对损害城市绿化的行为有权进行劝阻、投诉和举报。

城市绿化行政主管部门应当公布投诉、举报电话。接到投诉、举报后应当及时处理。

市、县（市、区）人民政府应当对在城市绿化工作中成绩显著的单位和个人给予奖励。

## 第二章  规划和建设

第八条 市、县（市）城市绿化行政主管部门应当会同自然资源和规划等部门共同编制城市绿地系统、行道树种等专项规划。编制的专项规划和确定的各类城市绿线，经同级人民政府批准后，向社会公布，接受公众监督。

城市绿线不得擅自调整。因国土空间规划调整或者城市重大基础设施建设等公共利益，需要调整绿线的，应当经原审批机关批准，并向社会公布。

调整绿线不得减少规划绿地的总量。因调整绿线减少规划绿地的，应当在相邻地块或者其他地块补足原有面积的绿地。

第九条 城市规划和建设，应当按照下列规定留足绿化用地：

（一）城市新区建设和旧城改造时，在三百米半径内规划建设二千平方米以上的游园，五百米半径内规划建设五千平方米以上的游园，二千米半径内规划建设十万平方米以上的公园；

（二）土地收储少于五亩的城市用地优先用于公共绿地及其配套设施建设。

市、县（市）城市规划区内建设用地绿地指标按照国家标准执行。绿地设计和建设，应当符合相关技术规范。

第十条 城市绿化应当注重层次、色彩和植物景观营造，突出地方特色和生物多样性，推广海绵绿地建设，进行城市生态修复和保护。

限制种植易产生飞絮的树木、花草。已经种植的，应当治理或者改良。

行道树种植应当符合车辆行驶、道路照明和行人通行的要求，选用高大浓荫、节水耐旱的树种。

新建林荫停车场和已


thod();
  expect(42, a);
  expect(87, b);
  var (c, d) = e.getter;
  expect(42, c);
  expect(87, d);
  e.setter = (dynamic a, dynamic b) => (42, 87);
}

main() {
  method(D());
}

expect(expected, actual) {
  if (expected != actual) throw 'Expected $expected, actual $actual';
}
// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

class Foo<U> {
  static U foo1() {
    return null;
  }

  static List<U> foo1Prime() {
    throw '';
  }

  static void foo2(U x) {}
  static void foo2Prime(List<U> x) {}
  static void foo3() {
    U foo4;
    List<U> foo4Prime;
    void foo5(U y) => print(y);
    void foo5Prime(List<U> y) => print(y);
    U foo6() => null;
    List<U> foo6Prime() => throw '';
    void Function(U y) foo7 = (U y) => y;
    void Function(List<U> y) foo7Prime = (List<U> y) => y;
  }

  static U Function() foo8() {
    throw '';
  }

  static List<U> Function() foo8Prime() {
    throw '';
  }

  static void Function(U) foo9() {}
  static void Function(List<U>) foo9Prime() {}
  static void foo10(U Function()) {}

  static void foo10Prime(List<U> Function()) {}

  // old syntax: variable named "U" of a function called 'Function'.
  static void foo11(void Function(U)) {}

  static void foo12(void Function(U) b) {}

  static void foo12Prime(void Function(List<U>) b) {}

  // old syntax: variable named "b" of type "U" of a function called 'Function'.
  static void foo13(void Function(U b)) {}

  // old syntax: variable named "b" of type "List<U>" of a function called 'Function'.
  static void foo13Prime(void Function(List<U> b)) {}

  static late U foo14;
  static late List<U> foo14Prime;
  static late U Function(U) foo15;
  static late List<U> Function(List<U>) foo15Prime;
}

main() {}
// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

staticMethod() {
  return "sdfg";
}

class Foo {
  instanceMethod() {
    return 123;
  }
}

external bool externalStatic();

abstract class ExternalValue {}

abstract class Bar {
  ExternalValue externalInstanceMethod();
}

external Bar createBar();

class Box {
  var field;
}

stringArgument(x) {}

intArgument(x) {}

class FinalBox {
  final finalField;
  FinalBox(this.finalField);
}

class SubFinalBox extends FinalBox {
  SubFinalBox(value) : super(value);
}

class DynamicReceiver1 {
  dynamicallyCalled(x) {}
}

class DynamicReceiver2 {
  dynamicallyCalled(x) {}
}

void makeDynamicCall(receiver) {
  receiver.dynamicallyCalled("sdfg");
}

main() {
  var x = staticMethod();


*   TRRS cable
*   42-44 x MX Cherry MX compatible switches \
42-44 x Kailh PCB Socket CPG151101S11 **(optional)**
*   Keycaps for MX switches
*   2 x EC11 Encoders and knobs **(optional)**

Kailh low profile (choc) build:

*   USB C cable
*   TRRS cable
*   42-44 x Kailh low profile switch PG1350
*   Keycaps for Kailh low profile switches
*   2 x EC11 Encoders and knobs **(optional)**

Note: the cable must be a **TRRS cable** with 4 contacts and NOT a TRS cable with 3 contacts.

## Torn PCB Assembly

Follow the [PCB assembly instructions](pcb.md) to solder the components on the left and right sides
of the keyboard. Test the keyboard is working before installing it in a case.

![alt_text](build/image46.jpg)

![alt_text](build/image39.jpg)

## Torn Keyboard Cases

The completed PCBs can be installed in a keyboard case. There are several options available, or you could
design your own!

### Torn Wedge Case

The Wedge Case has been designed for the Torn keyboard. It has been designed as a premium case option,
for MX Switches, weighing approx 500g with an angled 3D printed case and a steel plate. Follow the
[Wedge Case instructions](../case/wedge/wedge.md) for more information or to assemble the wedge case.

![alt_text](../case/wedge/img/PXL_20210508_125158827.PORTRAIT.jpg)

### Weighted HiPro Case

This [3d printed Weighted HiPro Case](../case/HiPro%20Case/readme.md) is designed for MX or Kailh Choc switches. This case is designed
with a snap fit assembly, and to include 200g weight in each half.

![torn](../case/HiPro%20Case/img/PXL_20210716_130633293.PORTRAIT.jpg)

### Travel Case

You can 3d print a folding [travel case](../case/Travel%20Case/readme.md) designed for Kailh Choc
switches and a 15 inch Macbook Pro.

![torn](../case/Travel%20Case/img/PXL_20210807_121445468.jpg)

### PCB Plate with MX Switches

You can use a PCB Plate case with MX Swtiches, see the [PCB Plate instructions](./build_mx.md)
for more information.

![torn](./img/img2.jpg)

### PCB case with Kailh Choc Switches

If you prefer a low profile keyboard you can use Kailh Choc Switches, see the [ Choc Switches instructions](build_choc.md)
for more information.

![alt_text](build/image26.jpg)

### 3d printed case

You can [3d print](../case/3D%20Printed%20Case/readme.md) a case that can be used with either MX Switches or Kailh Choc Switches.

![torn](../case/3D%20Printed%20Case/torn%20-%201.jpeg)

## Configuring Torn Keyboard

If you bought the Torn Keyboard kit the ATmega328P has already been programmed, and you can use VIA or flash QMK as decribed below. Otherwise if you purchased your own components you will need to first [flash the bootloader](bootloader.md).

### VIA

You can use VIA to configure the Torn Keyboard. Download and install Via from [https://caniusevia.com/](https://caniusevia.com/). VIA will allow you to dynamically remap the keys when you plug the keyboard in.

To erase the configuration and return to the default settings, press the top left button on the keyboard when plugging in the USB C connector.

If you want to change the rotary encoder settings, or customize the OLED display you must download the QMK firmware and follow the instructions for Programming QMK.

### QMK

You can fully customize your Torn Keyboard by updating QMK.

Download the QMK source code from [https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware). You can then edit the source code, for example [creating our own keymap](


eFunction.namespace]!!.field.addFunction(doWhileFunction,false)
    }

    @InsertCommand
    fun exitDoWhileStatement() {
        Function.currFunction = Function.currFunction.parent[0]
        //调用完毕，将子函数的栈销毁
        Function.addComment("do-while end")
    }

    override fun visitDoWhileBlock(ctx: mcfppParser.DoWhileBlockContext): Any? = withCompilationContext(ctx) {
        enterDoWhileBlock(ctx)
        super.visitDoWhileBlock(ctx)
        exitDoWhileBlock()
        return null
    }

    /**
     * 进入do-while语句块，开始匿名函数调用
     * @param ctx the parse tree
     */

    @InsertCommand
    fun enterDoWhileBlock(ctx: mcfppParser.DoWhileBlockContext) {
        Function.addComment("do while start")
        //匿名函数的定义
        val f: Function = InternalFunction("_dowhile_", Function.currFunction)
        f.child.add(f)
        f.parent.add(f)
        if(!GlobalScope.localNamespaces.containsKey(f.namespace)) {
            GlobalScope.localNamespaces[f.namespace] = Namespace(f.namespace)
        }
        GlobalScope.localNamespaces[f.namespace]!!.field.addFunction(f,false)
        //给子函数开栈
        Function.currFunction.parent[0].commands.addAll(
            arrayOf(
                //必然调用一次循环体内的函数
                Commands.stackIn(),
                Commands.function(f),
                Commands.stackOut(),
                //然后才开始调用do-while外函数。此时就是先判断再执行，转换为了while语句
                Commands.stackIn(),
                Commands.function(doWhileFunction),
                Commands.stackOut()
            )
        )
        //递归调用
        val parent = ctx.parent as mcfppParser.DoWhileStatementContext
        when(val exp = MCFPPExprVisitor().visitExpression(parent.expression())){
            is ScoreBoolConcrete -> {
                if(exp.value){
                    Function.addCommand("execute " +
                            "if function " + f.namespaceID + " " +
                            "run function " + Function.currFunction.namespaceID)
                    LogProcessor.warn("The condition is always true. ")
                }else{
                    Function.addComment("function " + f.namespaceID)
                    LogProcessor.warn("The condition is always false. ")
                }
            }

            is ExecuteBool -> {
                Function.addCommand(Command("execute")
                    .build(exp.toCommandPart())
                    .build("if function " + f.namespaceID)
                    .build("run function " + Function.currFunction.namespaceID))
            }

            is BaseBool -> {
                Function.addCommand(Command("execute")
                    .build("if").build(exp.toCommandPart())
                    .build("if function " + f.namespaceID)
                    .build("run function " + Function.currFunction.namespaceID)
                )
            }

            else -> {
                LogProcessor.error("The condition must be a boolean expression.")
                Function.addComment("[error/The condition must be a boolean expression]function " + f.namespaceID)
            }
        }
        Function.currFunction = f //后续块中的命令解析到递归的函数中
    }

    @InsertCommand
    fun exitDoWhileBlock() {
        Function.currFunction.disposeClassPtr()
        //返回1
        Function.addCommand("return 1")
        Function.currFunction = Function.currFunction.parent[0]
        Function.addComment("do while end")
        Function.currFunction.field.forEachVar {
            if(it.trackLost){
                it.trackLost =