, 37.711105], [-121.804812, 37.710582], [-121.805111, 37.709573], [-121.804986, 37.707619], [-121.806044, 37.704597], [-121.80607, 37.701308], [-121.808309, 37.701003], [-121.823291, 37.701145], [-121.82333, 37.708802], [-121.823713, 37.712382], [-121.823284, 37.714934], [-121.823436, 37.719579], [-121.824272, 37.720592], [-121.824973, 37.723427], [-121.826299, 37.7236], [-121.830145, 37.728022], [-121.834816, 37.730199], [-121.836333, 37.731349], [-121.837315, 37.733675], [-121.842715, 37.733317], [-121.844062, 37.732272], [-121.846922, 37.733357], [-121.848143, 37.732769], [-121.850608, 37.734061], [-121.851875, 37.734272], [-121.855681, 37.732067], [-121.857323, 37.730453], [-121.863221, 37.730562], [-121.860398, 37.729414], [-121.858718, 37.727878], [-121.858259, 37.726111], [-121.856739, 37.725791], [-121.855663, 37.72452], [-121.853985, 37.725301], [-121.852521, 37.725001], [-121.851728, 37.721278], [-121.854058, 37.720292], [-121.852371, 37.718377], [-121.851354, 37.716997], [-121.852141, 37.714029], [-121.857153, 37.716534], [-121.859124, 37.71856], [-121.862684, 37.717825], [-121.865536, 37.718249], [-121.867567, 37.716946], [-121.87201, 37.71665], [-121.871534, 37.723206], [-121.872033, 37.724224], [-121.873529, 37.729373], [-121.872934, 37.729426], [-121.874364, 37.731425], [-121.881767, 37.736428], [-121.881567, 37.737328]]], "type": "Polygon"}, "id": "322", "properties": {"AFFGEOID": "1400000US06001450752", "ALAND": 17421881, "AWATER": 0, "COUNTYFP": "001", "FIPS_11_digit": "06001450752", "GEOID": "06001450752", "LSAD": "CT", "NAME_x": "4507.52", "NAME_y": "Census Tract 4507.52, Alameda County, California", "STATEFP": "06", "TRACTCE": "450752", "c_asian": 4105, "c_bike": 0, "c_black": 336, "c_car": 2159, "c_carpool": 332, "c_commute": 3311, "c_latinx": 653, "c_moveabroad": 67, "c_movecounty": 139, "c_movelocal": 246, "c_movers": 6585, "c_movestate": 65, "c_owners": 1634, "c_race": 6642, "c_renters": 246, "c_stay": 6068, "c_tenants": 1880, "c_transit": 458, "c_walk": 0, "c_white": 1325, "county_fips": 1, "med_hhinc": 207734.0, "med_rent": 3231.0, "p_asian": 0.6180367359229147, "p_bike": 0.0, "


                    var a = 0
                    for (k in 0..7) {
                        if (y and (1 shl 7 - k) != 0) a = a xor Tsrc[x + k][z]
                    }
                    t[y][z] = a
                }
            }
            return t
        }

        private val T512_0 = makeT(0)
        private val T512_1 = makeT(8)
        private val T512_2 = makeT(16)
        private val T512_3 = makeT(24)
        private val T512_4 = makeT(32)
        private val T512_5 = makeT(40)
        private val T512_6 = makeT(48)
        private val T512_7 = makeT(56)
        private val ALPHA_N = intArrayOf(
            -0xff0f10,
            -0x33335556,
            -0xf0f3334,
            -0xff5556,
            -0x33335556,
            -0xf0f0100,
            -0x55553334,
            -0xf0f0100,
            -0xf0f3334,
            -0x55550100,
            -0x33330100,
            -0x55550f10,
            -0x55550f10,
            -0xff3334,
            -0x33330f10,
            -0xff5556,
            -0x33335556,
            -0xff0f10,
            -0xff5556,
            -0xf0f3334,
            -0xf0f0100,
            -0x33335556,
            -0xf0f0100,
            -0x55553334,
            -0x55550100,
            -0xf0f3334,
            -0x55550f10,
            -0x33330100,
            -0xff3334,
            -0x55550f10,
            -0xff5556,
            -0x33330f10
        )
        private val ALPHA_F = intArrayOf(
            -0x35069c64,
            0x0ff0f9c0,
            0x639c0ff0,
            -0x35060640,
            0x0ff0f9c0,
            0x639ccaf9,
            -0x63ff010,
            0x639ccaf9,
            0x639c0ff0,
            -0x63f3507,
            0x0ff0caf9,
            -0x63f9c64,
            -0x63f9c64,
            -0x3506f010,
            0x0ff0639c,
            -0x35060640,
            0x0ff0f9c0,
            -0x35069c64,
            -0x35060640,
            0x639c0ff0,
            0x639ccaf9,
            0x0ff0f9c0,
            0x639ccaf9,
            -0x63ff010,
            -0x63f3507,
            0x639c0ff0,
            -0x63f9c64,
            0x0ff0caf9,
            -0x3506f010,
            -0x63f9c64,
            -0x35060640,
            0x0ff0639c
        )
    }
}
/*
 * Copyright (c) 2007-2010  Projet RNRT SAPHIR
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without


	return stmt != nil && stmt.rwInfo.readOnly && RWUtil.isStandbyAlive(stmt.dmConn)
}

func (RWUtil rwUtil) executeByConn(conn *DmConnection, query string, execute1 func() (interface{}, error), execute2 func(otherConn *DmConnection) (interface{}, error)) (interface{}, error) {

	if err := RWUtil.recoverStandby(conn); err != nil {
		return nil, err
	}
	RWUtil.distributeSqlByConn(conn, query)

	turnToPrimary := false

	ret, err := execute1()
	if err != nil {
		if conn.rwInfo.connCurrent == conn.rwInfo.connStandby {

			RWUtil.afterExceptionOnStandby(conn, err)
			turnToPrimary = true
		} else {

			return nil, err
		}
	}

	curConn := conn.rwInfo.connCurrent
	var otherConn *DmConnection
	if curConn != conn {
		otherConn = conn
	} else {
		otherConn = conn.rwInfo.connStandby
	}

	switch curConn.lastExecInfo.retSqlType {
	case Dm_build_101, Dm_build_102, Dm_build_106, Dm_build_113, Dm_build_112, Dm_build_104:
		{

			if otherConn != nil {
				execute2(otherConn)
			}
		}
	case Dm_build_111:
		{

			sqlhead := regexp.MustCompile("[ (]").Split(strings.TrimSpace(query), 2)[0]
			if util.StringUtil.EqualsIgnoreCase(sqlhead, "SP_SET_PARA_VALUE") || util.StringUtil.EqualsIgnoreCase(sqlhead, "SP_SET_SESSION_READONLY") {
				if otherConn != nil {
					execute2(otherConn)
				}
			}
		}
	case Dm_build_110:
		{

			if conn.dmConnector.rwHA && curConn == conn.rwInfo.connStandby &&
				(curConn.lastExecInfo.rsDatas == nil || len(curConn.lastExecInfo.rsDatas) == 0) {
				turnToPrimary = true
			}
		}
	}

	if turnToPrimary {
		conn.rwInfo.toPrimary()
		conn.rwInfo.connCurrent = conn

		return execute2(conn)
	}
	return ret, nil
}

func (RWUtil rwUtil) executeByStmt(stmt *DmStatement, execute1 func() (interface{}, error), execute2 func(otherStmt *DmStatement) (interface{}, error)) (interface{}, error) {
	orgStmt := stmt.rwInfo.stmtCurrent
	query := stmt.nativeSql

	if err := RWUtil.recoverStandby(stmt.dmConn); err != nil {
		return nil, err
	}
	RWUtil.distributeSqlByStmt(stmt)
	if orgStmt != stmt.rwInfo.stmtCurrent {
		RWUtil.copyStatement(orgStmt, stmt.rwInfo.stmtCurrent)
		stmt.rwInfo.stmtCurrent.nativeSql = orgStmt.nativeSql
	}

	turnToPrimary := false

	ret, err := execute1()
	if err != nil {

		if stmt.rwInfo.stmtCurrent == stmt.rwInfo.stmtStandby {
			RWUtil.afterExceptionOnStandby(stmt.dmConn, err)
			turnToPrimary = true
		} else {
			return nil, err
		}
	}

	curStmt := stmt.rwInfo.stmtCurrent
	var otherStmt *DmStatement
	if curStmt != stmt {
		otherStmt = stmt
	} else {
		otherStmt = stmt.rwInfo.stmtStandby
	}

	switch curStmt.execInfo.retSqlType {
	case Dm_build_101, Dm_build_102, Dm_build_106, Dm_build_113, Dm_build_112, Dm_build_104:
		{

			if otherStmt


术系统包括功法与阵法两种信息。\r\n \r\n功法分别有：生命值、物理攻击、物理防御、魂力攻击、魂力防御、魔法攻击、魔法防御。\r\n \r\n阵法分别有：金旋阵、鱼水阵、炎雨阵、岩石阵、烈火阵、暴风阵、雷电阵、藤木阵。\r\n \r\n玩家可以消耗阅历进行魔术的升级，技能和魔法阵对于玩家的战斗力增强有极大的帮助。"
}

--探险介绍
menu[12]={
content="探险介绍:\r\n玩家在每天可以参加每日探险，可以获得额外的精力、金币、阅历等等。\r\n \r\n玩家每天可以进行10次的答题探险,根据选择的答案不同给予不同的奖励。"
}

--商店介绍
menu[13]={
content="商店介绍:\r\n游戏中商城包括有酒馆、道具、礼包。玩家可以消耗不同数量的水晶购买不同的道具。"
}

--庄园介绍
menu[14]={
content="庄园介绍:\r\n玩家可以通过在庄园种植经验树和发财树获得额外的佣兵经验和金币。\r\n \r\n土地：庄园初始为1块土地，玩家可以通过晶石购买额外的8块土地，最终可以获得最多9块土地。\r\n \r\n佣兵种植：种植经验树玩家可以使用所有已招募的佣兵进行参与种植任何经验树和发财树。\r\n \r\n种植冷却：种植经验树和发财树的冷却都为2秒，种完后可以马上收获，种植的佣兵没有限制。玩家可以用一个佣兵种植完所有的土地。土地冷却时间为8小时。玩家可以进行土地升级，从而减少土地的冷却时间。\r\n \r\n圣水介绍：种植发财树需要消耗圣水，每种植一颗发财树消耗一滴圣水。圣水初始赠送8滴，而后每3小时恢复1滴，恢复累积不超过8滴。当圣水使用完后，玩家可以消耗晶石购买


// Copyright (C) 2008-2016 Codership Oy <info@codership.com>

/**
 * @file system limit macros
 *
 * $Id$
 */

#ifndef _gu_limits_h_
#define _gu_limits_h_

#include <unistd.h>

#ifdef __cplusplus
extern "C" {
#endif

extern size_t gu_page_size(void);
extern size_t gu_phys_pages(void);
extern size_t gu_avphys_pages(void);

#ifdef __cplusplus
} // extern "C"
#endif

#define GU_PAGE_SIZE gu_page_size()

/* returns multiple of page size that is no less than page size */
static inline size_t gu_page_size_multiple(size_t const requested_size)
{
    size_t const sys_page_size = GU_PAGE_SIZE;
    size_t const multiple = requested_size / sys_page_size;
    return sys_page_size * (0 == multiple ? 1 : multiple);
}

static inline size_t gu_avphys_bytes()
{
    // to detect overflow on systems with >4G of RAM, see #776
    unsigned long long avphys = gu_avphys_pages(); avphys *= gu_page_size();
    size_t max = -1;
    return (avphys < max ? avphys : max);
}

#include <limits.h>

#define GU_ULONG_MAX  ULONG_MAX
#define GU_LONG_MAX   LONG_MAX
#define GU_LONG_MIN   LONG_MIN

#ifdef ULLONG_MAX
#define GU_ULLONG_MAX ULLONG_MAX
#define GU_LLONG_MAX  LLONG_MAX
#define GU_LLONG_MIN  LLONG_MIN
#else
#define GU_ULLONG_MAX 0xffffffffffffffffULL
#define GU_LLONG_MAX  0x7fffffffffffffffLL
#define GU_LLONG_MIN  (-GU_LONG_LONG_MAX - 1)
#endif

#define GU_MIN_ALIGNMENT 8

#endif /* _gu_limits_h_ */


rcfour-hmac)
   3 04/11/17 14:16:34 test/examples.com@EXAMPLE.COM (camellia256-cts-cmac)
   3 04/11/17 14:16:34 test/examples.com@EXAMPLE.COM (camellia128-cts-cmac)
   3 04/11/17 14:16:34 test/examples.com@EXAMPLE.COM (des-hmac-sha1)
   3 04/11/17 14:16:34 test/examples.com@EXAMPLE.COM (des-cbc-md5)
   3 04/11/17 14:16:51 HTTP/examples.com@EXAMPLE.COM (aes256-cts-hmac-sha1-96)
   3 04/11/17 14:16:52 HTTP/examples.com@EXAMPLE.COM (aes128-cts-hmac-sha1-96)
   3 04/11/17 14:16:52 HTTP/examples.com@EXAMPLE.COM (des3-cbc-sha1)
   3 04/11/17 14:16:52 HTTP/examples.com@EXAMPLE.COM (arcfour-hmac)
   3 04/11/17 14:16:52 HTTP/examples.com@EXAMPLE.COM (camellia256-cts-cmac)
   3 04/11/17 14:16:52 HTTP/examples.com@EXAMPLE.COM (camellia128-cts-cmac)
   3 04/11/17 14:16:52 HTTP/examples.com@EXAMPLE.COM (des-hmac-sha1)
   3 04/11/17 14:16:52 HTTP/examples.com@EXAMPLE.COM (des-cbc-md5)
 */
        Keytab keytab;
        try (InputStream kis = KeytabTest.class.getResourceAsStream("/test_multiple_principles.keytab")) {
            keytab = Keytab.loadKeytab(kis);
        }
        assertThat(keytab).isNotNull();

        List<PrincipalName> principals = keytab.getPrincipals();
        assertEquals(2, keytab.getPrincipals().size());

        int numEntries = keytab.getKeytabEntries(principals.get(0)).size()
                + keytab.getKeytabEntries(principals.get(1)).size();
        assertEquals(16, numEntries);
    }

    @Test
    public void testSKeytab() throws IOException {
        Keytab keytab;
        try (InputStream kis = KeytabTest.class.getResourceAsStream("/test_multiple_principles.keytab")) {
            keytab = Keytab.loadKeytab(kis);
        }
        assertThat(keytab).isNotNull();

        List<PrincipalName> principals = keytab.getPrincipals();
        assertEquals(2, keytab.getPrincipals().size());

        int numEntries = keytab.getKeytabEntries(principals.get(0)).size()
                + keytab.getKeytabEntries(principals.get(1)).size();
        assertEquals(16, numEntries);
    }

    @Test
    public void testDIRKRB734() throws IOException  {
        Keytab keytab;
        try (InputStream kis = KeytabTest.class.getResourceAsStream("/sample.keytab")) {
            keytab = Keytab.loadKeytab(kis);
        }
        assertThat(keytab).isNotNull();

        List<PrincipalName> principals = keytab.getPrincipals();
        assertEquals(2, principals.size());
    }

    public static void main(String[] args) throws IOException {
        try (InputStream kis = KeytabTest.class.getResourceAsStream("test.keytab")) {
            Keytab keytab = Keytab.loadKeytab(kis);
            System.out.println("Principals:" + keytab.getPrincipals().size());
        }
    }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 *


lue is the same as the data type of the column itself.
			///
			[Column("seed_value"),                             Nullable] public object? SeedValue                       { get; set; } // sql_variant
			///
			/// <para>increment_value NULL sql_variant</para>
			/// Increment value for this identity column. The data type of the seed value is the same as the data type of the column itself.
			///
			[Column("increment_value"),                        Nullable] public object? IncrementValue                  { get; set; } // sql_variant
			///
			/// <para>last_value NULL sql_variant</para>
			/// Last value generated for this identity column. The data type of the seed value is the same as the data type of the column itself.
			///
			[Column("last_value"),                             Nullable] public object? LastValue                       { get; set; } // sql_variant
			///
			/// <para>is_not_for_replication NULL bit</para>
			/// Identity column is declared NOT FOR REPLICATION. Note: This column does not apply to Azure Synapse Analytics.
			///
			[Column("is_not_for_replication"),                 Nullable] public bool?   IsNotForReplication             { get; set; } // bit

			#region Associations

			///
			/// objects (sys.objects)
			///
			[Association(ThisKey=nameof(ObjectID), OtherKey=nameof(LinqToDB.Tools.DataProvider.SqlServer.Schemas.ObjectSchema.Object.ObjectID), CanBeNull=false)]
			public ObjectSchema.Object Object { get; set; } = null!;

			#endregion
		}

		///
		/// <para>sys.indexes (Transact-SQL)</para>
		/// <para>Applies to: √ SQL Server √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW) √ SQL database in Microsoft Fabric</para>
		/// <para>Contains a row per index or heap of a tabular object, such as a table, view, or table-valued function.</para>

		/// <para>See sys.indexes.</para>
		///
		[Table(Schema="sys", Name="indexes", IsView=true)]
		public partial class Index
		{
			///
			/// <para>object_id NOT NULL int</para>
			/// ID of the object to which this index belongs.
			///
			[Column("object_id"),                   NotNull    ] public int     ObjectID                 { get; set; } // int
			///
			/// <para


\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "",
            "",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "\1\162",
            "",
            "\1\163",
            "",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "\1\165",
            "",
            "\1\166",
            "\1\167",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "",
            "",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "\1\173",
            "",
            "\1\174",
            "\1\175",
            "\1\176",
            "",
            "",
            "",
            "\1\177",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "\1\u0081",
            "\1\u0082",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
            "",
            "",
            ""
    };

    static final short[] DFA17_eot = DFA.unpackEncodedString(DFA17_eotS);
    static final short[] DFA17_eof = DFA.unpackEncodedString(DFA17_eofS);
    static final char[] DFA17_min = DFA.unpackEncodedStringToUnsignedChars(DFA17_minS);
    static final char[] DFA17_max = DFA.unpackEncodedStringToUnsignedChars(DFA17_maxS);
    static final short[] DFA17_accept = DFA.unpackEncodedString(DFA17_acceptS);
    static final short[] DFA17_special = DFA.unpackEncodedString(DFA17_specialS);
    static final short[][] DFA17_transition;

    static {
        int numStates = DFA17_transitionS.length;
        DFA17_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA17_transition[i] = DFA.unpackEncodedString(DFA17_transitionS[i]);
        }
    }

    class DFA17 extends DFA {

        public DFA17(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 17;
            this.eot = DFA17_eot;
            this.eof = DFA17_eof;
            this.min = DFA17_min;
            this.max = DFA17_max;
            this.accept = DFA17_accept;
            this.special = DFA17_special;
            this.transition = DFA17_transition;
        }
        public String getDescription() {
            return "1:1: Tokens : ( T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | RULE_SIGNED_INT | RULE_FLOAT | RULE_ID | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
        }
        public int specialStateTransition(int


-236   [000] 50263.214405: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214409: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214416: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214429: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214436: 0: B|124|lockPageFlip\n\
  SurfaceFlinger-236   [000] 50263.214438: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214443: 0: B|124|lockPageFlip\n\
  SurfaceFlinger-236   [000] 50263.214445: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214450: 0: B|124|unlockPageFlip\n\
  SurfaceFlinger-236   [000] 50263.214454: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214458: 0: B|124|unlockPageFlip\n\
  SurfaceFlinger-236   [000] 50263.214479: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214487: 0: B|124|unlockPageFlip\n\
  SurfaceFlinger-236   [000] 50263.214490: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214494: 0: B|124|unlockPageFlip\n\
  SurfaceFlinger-236   [000] 50263.214497: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214507: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214515: 0: B|124|handleRepaint\n\
  SurfaceFlinger-236   [000] 50263.214544: sched_wakeup: comm=SurfaceFlinger pid=335 prio=112 success=1 target_cpu=000\n\
  SurfaceFlinger-236   [000] 50263.214558: 0: E\n\
  SurfaceFlinger-236   [000] 50263.214568: 0: B|124|postFramebuffer\n\
  SurfaceFlinger-236   [000] 50263.214625: sched_wakeup: comm=kworker/u:7 pid=13359 prio=120 success=1 target_cpu=000\n\
  SurfaceFlinger-236   [000] 50263.214635: sched_switch: prev_comm=SurfaceFlinger prev_pid=236 prev_prio=112 prev_state=R ==> next_comm=kworker/u:7 next_pid=13359 next_prio=120\n\
     kworker/u:7-13359 [000] 50263.214682: sched_switch: prev_comm=kworker/u:7 prev_pid=13359 prev_prio=120 prev_state=S ==> next_comm=Binder_4 next_pid=1276 next_prio=120\n\
        Binder_4-1276  [000] 50263.214751: sched_switch: prev_comm=Binder_4 prev_pid=1276 prev_prio=120 prev_state=S ==> next_comm=SensorService next_pid=373 next_prio=112\n\
   SensorService-373   [000] 50263.214936: sched_wakeup: comm=er$SensorThread pid=409 prio=112 success=1 target_cpu=000\n\
   SensorService-373   [000] 50263.214956: sched_switch: prev_comm=SensorService prev_pid=373 prev_prio=112 prev_state=S ==> next_comm=SurfaceFlinger next_pid=335 next_prio=112\n\
  SurfaceFlinger-335   [000] 50263.214982: sched_switch: prev_comm=SurfaceFlinger prev_pid=335 prev_prio=112 prev_state=S ==> next_comm=er$SensorThread next_pid=409


# Verify that every branch and jump instruction is followed by a delay slot
# except for the branch likely instructions.
#
# RUN: llvm-mc %s -triple=mips-unknown-linux -mcpu=mips32r2 | FileCheck %s

        .set noat
        # CHECK: b 1332
        # CHECK: nop
        b 1332
        # CHECK: bc1f 1332
        # CHECK: nop
        bc1f 1332
        # CHECK: bc1t 1332
        # CHECK: nop
        bc1t 1332
        # CHECK: beq $9, $6, 1332
        # CHECK: nop
        beq $9,$6,1332
        # CHECK: bgez $6, 1332
        # CHECK: nop
        bgez $6,1332
        # CHECK: bgezal $6, 1332
        # CHECK: nop
        bgezal $6,1332
        # CHECK: bgtz $6, 1332
        # CHECK: nop
        bgtz $6,1332
        # CHECK: blez $6, 1332
        # CHECK: nop
        blez $6,1332
        # CHECK: bltz $6, 1332
        # CHECK: nop
        bltz $6,1332
        # CHECK: bne $9, $6, 1332
        # CHECK: nop
        bne $9,$6,1332
        # CHECK: bltzal $6, 1332
        # CHECK: nop
        bltzal $6,1332
        # CHECK: bal 1332
        # CHECK: nop
        bal 1332
        # CHECK: bnez $11, 1332
        # CHECK: nop
        bnez $11,1332
        # CHECK: beqz $11, 1332
        # CHECK: nop
        beqz $11,1332

        # CHECK: bc1fl 1332
        # CHECK-NOT: nop
        bc1fl 1332
        # CHECK: bc1fl 1332
        # CHECK-NOT: nop
        bc1fl $fcc0, 1332
        # CHECK: bc1fl $fcc3, 1332
        # CHECK-NOT: nop
        bc1fl $fcc3, 1332
        # CHECK: bc1tl 1332
        # CHECK-NOT: nop
        bc1tl 1332
        # CHECK: bc1tl 1332
        # CHECK-


           cbxAlgoType.FormattingEnabled = true;
            cbxAlgoType.Items.AddRange(new object[] { "lora", "loha", "ia3", "lokr", "full", "glora", "diag-oft", "boft" });
            cbxAlgoType.Location = new Point(141, 55);
            cbxAlgoType.Name = "cbxAlgoType";
            cbxAlgoType.Size = new Size(121, 23);
            cbxAlgoType.TabIndex = 14;
            toolTip1.SetToolTip(cbxAlgoType, "loha、lokrやia3の実質的なdimは2乗になる");
            //
            // cbxUseGradient
            //
            cbxUseGradient.AutoSize = true;
            cbxUseGradient.Location = new Point(45, 212);
            cbxUseGradient.Name = "cbxUseGradient";
            cbxUseGradient.Size = new Size(150, 19);
            cbxUseGradient.TabIndex = 18;
            cbxUseGradient.Text = "Gradient checkpointing";
            toolTip1.SetToolTip(cbxUseGradient, "VRAM消費削減および増加を強く抑制\r\n速度がやや低下する");
            cbxUseGradient.UseVisualStyleBackColor = true;
            //
            // nudNoiseOffset
            //
            nudNoiseOffset.DecimalPlaces = 4;
            nudNoiseOffset.Increment = new decimal(new int[] { 1, 0, 0, 65536 });
            nudNoiseOffset.Location = new Point(445, 20);
            nudNoiseOffset.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
            nudNoiseOffset.Name = "nudNoiseOffset";
            nudNoiseOffset.Size = new Size(80, 23);
            nudNoiseOffset.TabIndex = 44;
            toolTip1.SetToolTip(nudNoiseOffset, "全体的に明るい/暗い環境でグレー寄りになるのを軽減する\r\n変色と明度の変化を減らすため学習元モデルで使用された値を設定すべき\r\nちなみにAnimagine XL系で使用された値は0.0357\r\nZero Terminal SNRを使うなら0にする");
            //
            // nudCaptionDropout
            //
            nudCaptionDropout.DecimalPlaces = 4;
            nudCaptionDropout.Increment = new decimal(new int[] { 1, 0, 0, 131072 });
            nudCaptionDropout.Location = new Point(222, 19);
            nudCaptionDropout.Maximum = new decimal(new int[] { 1, 0, 0, 0 });
            nudCaptionDropout.Name = "nudCaptionDropout";
            nudCaptionDropout.Size = new Size(78, 23);
            nudCaptionDropout.TabIndex = 24;
            toolTip1.SetToolTip(nudCaptionDropout, "キャプションの切り落としの発生率");
            //
            // cbxDontSaveMetadata
            //
            cbxDontSaveMetadata.AutoSize = true;
            cbxDontSaveMetadata.Location = new Point(314, 136);
            cbxDontSaveMetadata.Name = "cbxDontSaveMetadata";
            cbxDontSaveMetadata.Size = new Size(130, 19);
            cbxDontSaveMetadata.TabIndex = 11;
            cbxDontSaveMetadata.Text = "メタデータを保存しない";
            toolTip1.SetToolTip(cbxDontSaveMetadata, "1111のiボタンで出る学習情報に最小限の情報のみ書き込む\r\nnetwork_dim/alphaやSDバージョンなどのみでデータ


  // Event category (required)
			                   						  	"User started ACE.",  // Event action (required)
			                   						  	"User started ACE.",   // Event label
			                   						  	null)            // Event value
						   .build());
			}

		} catch (Exception e) {
			e.printStackTrace();
		}

	}

	private int[] getTrueDeviceResolution() {

    	int[] resolution = new int[2];
    	try {
    		Display display = getWindowManager().getDefaultDisplay();

        	Method mGetRawH = Display.class.getMethod("getRawHeight");
        	Method mGetRawW = Display.class.getMethod("getRawWidth");

        	int rawWidth = (Integer) mGetRawW.invoke(display);
        	int rawHeight = (Integer) mGetRawH.invoke(display);

        	resolution[0] = rawWidth;
        	resolution[1] = rawHeight;

    	} catch (Exception e) {
    		e.printStackTrace();
    	}

    	return resolution;
    }

	private void initScanProcess(int scanCode) {

		//Start the service that will start scanning the user's library/caching album art.
		mApp.setIsBuildingLibrary(true);
		buildingLibraryLayout.setVisibility(View.VISIBLE);
		if (scanCode==0) {
        	Intent intent = new Intent(this, BuildMusicLibraryService.class);
        	intent.putExtra("SCAN_TYPE", "RESCAN_ALBUM_ART");
			startService(intent);

	        mApp.getSharedPreferences().edit().putBoolean("RESCAN_ALBUM_ART", false).commit();

		} else if (scanCode==1) {
	    	Intent intent = new Intent(this, BuildMusicLibraryService.class);
	    	intent.putExtra("SCAN_TYPE", "FULL_SCAN");
			startService(intent);

			mApp.getSharedPreferences().edit().putBoolean("REBUILD_LIBRARY", false).commit();
		}

		//Initialize the runnable that will fire once the scan process is complete.
		mHandler.post(scanFinishedCheckerRunnable);

	}

	private Runnable scanFinishedCheckerRunnable = new Runnable() {

		@Override
		public void run() {

			if (mApp.isBuildingLibrary()==false) {
				launchMainActivity();
			} else {
				mHandler.postDelayed(this, 100);
			}

		}

	};

	/*private void initInAppBilling() {
		String base64EncodedPublicKey = "";

		base64EncodedPublicKey = Common.uid4 +
								 Common.uid2 +
								 Common.uid6 +
								 Common.uid1 +
								 Common.uid3 +
								 Common.uid5;

    	mHelper = new IabHelper(this, base64EncodedPublicKey);

    	try {
    		mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {

        		@Override
        		public void onIabSetupFinished(IabResult result) {
        			if (!result.isSuccess()) {
        				//In-app billing could not be initialized.
        				mApp.getSharedPreferences().edit().putBoolean("TRIAL", true).commit();
        				checkTrialStatus();
        			} else {
        				//In-app billing was initialized successfully.
        				mHelper.queryInventoryAsync(mGotInventoryListener);
        			}

        		}

        	});

    	} catch (Exception e) {
    		e.printStackTrace();
    		checkTrialStatus();
    	}

	}*/

	/*IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {

		public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
			if (result.isFailure()) {
				//Couldn't query in-app purchases.
				checkTrialStatus();
				mApp.getSharedPreferences


_bitfield(dsta, bdata, offset, width);
	SET_ALWAYS_NFLG(((uae_s32)tmp) < 0 ? 1 : 0);
	tmp >>= (32 - width);
	SET_ZFLG(tmp == 0); SET_VFLG(0); SET_CFLG(0);
	tmp = 0xffffffffu >> (32 - width);
	x_put_bitfield(dsta, bdata, tmp, offset, width);
	regs.irc = get_word_030_prefetch(4);
	m68k_incpci(4);
	return (1 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4;
}
/* 4 0,0   */

#endif
/* BFSET.L #<data>.W,(d16,An) */
#ifndef CPUEMU_68000_ONLY
uae_u32 REGPARAM2 op_eee8_22_ff(uae_u32 opcode)
{
	int count_cycles = 0;
	uae_u32 real_opcode = opcode;
	uae_u32 dstreg = real_opcode & 7;
	uae_s16 extra = get_word_030_prefetch(2);
	uaecptr dsta;
	dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_word_030_prefetch(4);
	uae_u32 bdata[2];
	uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f;
	int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) - 1) & 0x1f) + 1;
	uae_u32 tmp;
	dsta += offset >> 3;
	tmp = x_get_bitfield(dsta, bdata, offset, width);
	SET_ALWAYS_NFLG(((uae_s32)tmp) < 0 ? 1 : 0);
	tmp >>= (32 - width);
	SET_ZFLG(tmp == 0); SET_VFLG(0); SET_CFLG(0);
	tmp = 0xffffffffu >> (32 - width);
	x_put_bitfield(dsta, bdata, tmp, offset, width);
	regs.irc = get_word_030_prefetch(6);
	m68k_incpci(6);
	return (1 * 4 * CYCLE_UNIT / 2 + count_cycles) * 4;
}
/* 6 0,0   */

#endif
/* BFSET.L #<data>.W,(d8,An,Xn) */
#ifndef CPUEMU_68000_ONLY
uae_u32 REGPARAM2 op_eef0_22_ff(uae_u32 opcode)
{
	int count_cycles = 0;
	uae_u32 real_opcode = opcode;
	uae_u32 dstreg = real_opcode & 7;
	uae_s16 extra = get_word_030_prefetch(2);
	uaecptr dsta;
	m68k_incpci(4);
	dsta = x_get_disp_ea_020(m68k_areg(regs, dstreg), 0);
	uae_u32 bdata[2];
	uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f;
	int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) - 1) & 0x1f) + 1;
	uae_u32 tmp;
	dsta += offset >> 3;
	tmp = x_get_bitfield(dsta, bdata, offset, width);
	SET_ALWAYS_NFLG(((uae_s32)tmp) < 0 ? 1 : 0);
	tmp >>= (32 - width);
	SET_ZFLG(tmp == 0); SET_VFLG(0); SET_CF


3, 0, 0, 1 ),   elem( 0x31F4, 3, 1, 0, 1 ),
      elem( 0x31F4, 3, 2, 0, 1 ),   elem( 0x31F4, 3, 3, 0, 1 ) };
}

template <typename T>
void FileGenerator::writeMultis( std::vector<std::vector<T>>& multis )
{
  Plib::USTRUCT_IDX idx{ 0, 0, 0xFFffFFff };
  Plib::USTRUCT_IDX idxempty{ 0xFFffFFff, 0xFFffFFff, 0xFFffFFff };
  std::ofstream file( _basedir / "multi.mul", std::ofstream::binary | std::ofstream::out );
  std::ofstream fileidx( _basedir / "multi.idx", std::ofstream::binary | std::ofstream::out );
  idx.offset = 0;
  for ( auto& multi : multis )
  {
    idx.length = 0;
    for ( auto& elem : multi )
    {
      writeFile( file, elem );
      idx.length += sizeof( T );
    }
    if ( multi.empty() )
      writeFile( fileidx, idxempty );
    else
      writeFile( fileidx, idx );
    idx.offset += idx.length;
  }
}

void FileGenerator::generateMultis()
{
  INFO_PRINTLN( "Generating multi.mul" );
  if ( !_hsa )
  {
    std::vector<std::vector<Plib::USTRUCT_MULTI_ELEMENT>> multis;
    modifyMultis( multis );
    writeMultis( multis );
  }
  else
  {
    std::vector<std::vector<Plib::USTRUCT_MULTI_ELEMENT_HSA>> multis;
    modifyMultis( multis );
    writeMultis( multis );
  }
}
}  // namespace PolTool
}  // namespace Pol
/** @file
 *
 * @par History
 */

#include "poltest.h"

#include "testenv.h"

#include "pol_global_config.h"

#ifdef ENABLE_BENCHMARK
#include <benchmark/benchmark.h>
#endif

namespace Pol
{
namespace Testing
{
#define RUNTEST( t )               \
  INFO_PRINTLN( " - {}", ( #t ) ); \
  t();

bool run_pol_tests()
{
  // create_test_environment();

#ifdef ENABLE_BENCHMARK
  benchmark::RunSpecifiedBenchmarks();
  return;
#endif
  RUNTEST( test_splitnamevalue )
  RUNTEST( test_convertquotedstring )
  RUNTEST( test_sanitizeUnicodeWithIso )
  RUNTEST( test_encodingconversions )

  //  skilladv_test();

  //  drop_test();
  //  walk_test();
  //  multiwalk_test();
  //  map_test();
  RUNTEST( dynprops_test )
  RUNTEST( packet_test )
  RUNTEST( vector2d_test )
  RUNTEST( vector3d_test )
  RUNTEST( pos2d_test )
  RUNTEST( pos3d_test )
  RUNTEST( pos4d_test )
  RUNTEST( range2d_test )


ica: What are you doing?! Chandler! You can’t just go back a phase!

Chandler: Yes you can. You’re thinking about time, you can’t go back
in time.

Phoebe: Well, look, why don’t you just, why don’t you do your Phase
Two strip club thing with us.

Monica: Yeah, come on, we can be guys!

Chandler: (laughs) No you can’t.

Phoebe: Come on! Let us be guys! Maybe we want to be guys!

Chandler: You don’t want to be guys, you’d be all hairy and
wouldn’t live as long. (Starts to go to his bedroom)

Phoebe: Y’know you, you just stop being such a wuss and get those off and
you come with us and watch naked girls dance around!!

Chandler: Okay. (Starts to cry)

Phoebe: I’m sorry. (Goes and hugs him)

[Scene: Silvercup Studios, Joey is just arriving for his scene.]

Joey: (rushing in) Hey! Joey Tribbiani! I’m here! I’m here!

The A.D: Calm down, we got time, we’re running a little late.

(Just then, Charlton Heston walks out of his dressing room and starts eating a
liquorice whip.)

Joey: Look at that, Charlton Heston eating a liquorice whip!

The A.D: Yeah, we loves ‘em. I’ve never seen him with—(He gets a
whiff of Joey and starts smelling around.)

Joey: (trying to act like he’s not the one that stinks.) Whoa! Yeah, what
the hell is that? What smells so bad?

The A.D: You.

Joey: Y’know, I can see why you think that, but ah, actually, you know who
I think it is?

The A.D: You?

Joey: No-no, it’s uh, it’s Heston.

The A.D: What?

Joey: Yeah, the man wreaks! Smells like he went on a three day fishing trip and
then ate some liquorice.

The A.D: There’s no way he smells, he’s the only one around here with
a shower in his dressing room.

Joey: Really, a shower huh? And uh, which-which room might that be?

The A.D: The one with "Heston" on it.

Joey: Interesting.

[Scene: A strip club, the girls are there with Chandler, who isn’t enjoying
himself.]

Monica: (coming back to the stage and sitting next to Chandler) Okay, I’ve
got some Ones, you wanna put them in her panties?

Chandler: No thanks, Mom!

(A man sits down next to Phoebe and lights u


channel and velocity can be set as Note attributes as well. If
    that's the case those values take presedence over the ones given here as
    function arguments.

    Example:
    >>> n = Note('C', 4)
    >>> n.channel = 9
    >>> n.velocity = 50
    >>> FluidSynth.play_Note(n)
    """
    return midi.play_Note(note, channel, velocity)

def stop_Note(note, channel=1):
    """Stop the Note playing at channel.

    If a channel attribute is set on the note, it will take presedence.
    """
    return midi.stop_Note(note, channel)

def play_NoteContainer(nc, channel=1, velocity=100):
    """Use play_Note to play the Notes in the NoteContainer nc."""
    return midi.play_NoteContainer(nc, channel, velocity)

def stop_NoteContainer(nc, channel=1):
    """Use stop_Note to stop the notes in NoteContainer nc."""
    return midi.stop_NoteContainer(nc, channel)

def play_Bar(bar, channel=1, bpm=120):
    """Play a Bar object using play_NoteContainer and stop_NoteContainer.

    Set a bpm attribute on a NoteContainer to change the tempo.
    """
    return midi.play_Bar(bar, channel, bpm)

def play_Bars(bars, channels, bpm=120):
    """Play a list of bars on the given list of channels.

    Set a bpm attribute on a NoteContainer to change the tempo.
    """
    return midi.play_Bars(bars, channels, bpm)

def play_Track(track, channel=1, bpm=120):
    """Use play_Bar to play a Track object."""
    return midi.play_Track(track, channel, bpm)

def play_Tracks(tracks, channels, bpm=120):
    """Use play_Bars to play a list of Tracks on the given list of channels."""
    return midi.play_Tracks(tracks, channels, bpm)

def play_Composition(composition, channels=None, bpm=120):
    """Play a composition."""
    return midi.play_Composition(composition, channels, bpm)

def control_change(channel, control, value):
    """Send a control change event on channel."""
    return midi.control_change(channel, control, value)

def set_instrument(channel, midi_instr, bank=0):
    """Set the midi instrument on channel."""
    return midi.set_instrument(channel, midi_instr, bank)

def stop_everything():
    """Stop all the playing notes on all channels."""
    return midi.stop_everything()

def modulation(channel, value):
    return midi.modulation(channel, value)

def pan(channel, value):
    return midi.pan(channel, value)

def main_volume(channel, value):
    return midi.main_volume(channel, value)


a class="css property" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order④②">order-modified document order is used instead of raw document order when painting.
			(This was already stated in the order section, but not in the section explicitly about painting order.)

			Clarified line-breaking to precisely handle negatively-sized flex items and zero-size items at the end of a line.
			(Issue 1)

       	Otherwise,
					starting from the first uncollected item,
					collect
       consecutive items one by one
					until the first time that the next collected item
					would not fit into the flex container’s inner main size,
					or until a forced break is encountered.
					If the very first uncollected item wouldn’t fit,
					collect just it into the line
       as many consecutive flex items as will fit
					or until a forced break is encountered
					(but collect at least one)
					into the flex container’s inner main size into a flex line
       .

       Note that
       items with zero main size will never start a line
				unless they’re  the very first items in the flex container,
				or they’re preceded by a forced break.

				The  "collect as many" line will collect
       them
       zero-sized flex items

				onto the end of the previous line
				even if the last non-zero item exactly "filled up" the line.

			Clarified that flex container cross sizes are still clamped by the flex container’s min/max properties.
			(Issue 24)

						If the cross size property is a definite size,
						use that,

        clamped by the min and max cross size properties of the flex container
        .

						Otherwise,
						use the sum of the flex lines' cross sizes,

        clamped by the min and max cross size properties of the flex container
        .

11. Privacy and Security Considerations<a class="self-link" href


--diameter);
}
svg.pf-v5-c-spinner.pf-m-lg {
  --pf-v5-c-spinner--diameter: var(--pf-v5-c-spinner--m-lg--diameter);
}
svg.pf-v5-c-spinner.pf-m-xl {
  --pf-v5-c-spinner--diameter: var(--pf-v5-c-spinner--m-xl--diameter);
}

.pf-v5-c-spinner__path {
  width: 100%;
  height: 100%;
  stroke: var(--pf-v5-c-spinner--Color);
  stroke-dasharray: 283;
  stroke-dashoffset: 280;
  stroke-linecap: round;
  stroke-width: var(--pf-v5-c-spinner--stroke-width);
  transform-origin: 50% 50%;
  animation: pf-v5-c-spinner-animation-dash var(--pf-v5-c-spinner--AnimationDuration) var(--pf-v5-c-spinner__path--AnimationTimingFunction) infinite;
}

@keyframes pf-v5-c-spinner-animation-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes pf-v5-c-spinner-animation-dash {
  0% {
    stroke-dashoffset: 280;
    transform: rotate(0);
  }
  15% {
    stroke-width: calc(var(--pf-v5-c-spinner__path--StrokeWidth) - 4);
  }
  40% {
    stroke-dasharray: 220;
    stroke-dashoffset: 150;
  }
  100% {
    stroke-dashoffset: 280;
    transform: rotate(720deg);
  }
}
.pf-v5-c-switch {
  --pf-v5-c-switch--FontSize: var(--pf-v5-global--FontSize--md);
  --pf-v5-c-switch__label--PaddingLeft: var(--pf-v5-global--spacer--md);
  --pf-v5-c-switch--ColumnGap: var(--pf-v5-c-switch__label--PaddingLeft);
  --pf-v5-c-switch__toggle-icon--FontSize: calc(var(--pf-v5-c-switch--FontSize) * .625);
  --pf-v5-c-switch__toggle-icon--Color: var(--pf-v5-global--Color--light-100);
  --pf-v5-c-switch__toggle-icon--Left: calc(var(--pf-v5-c-switch--FontSize) * .4);
  --pf-v5-c-switch__toggle-icon--Offset: 0.125rem;
  --pf-v5-c-switch__input--disabled__toggle-icon--Color: var(--pf-v5-global--palette--black-150);
  --pf-v5-c-switch--LineHeight: var(--pf-v5-global--LineHeight--md);
  --pf-v5-c-switch--Height: auto;
  --pf-v5-c-switch__input--checked__toggle--BackgroundColor: var(--pf-v5-global--primary-color--100);
  --pf-v5-c-switch__input--checked__toggle--before--TranslateX: calc(100% + var(--pf-v5-c-switch__toggle-icon--Offset));
  --pf-v5-c-switch__input--checked__label--Color: var(--pf-v5-global--Color--dark-100);
  --pf-v5-c-switch__input--not-checked__label--Color: var(--pf-v5-global--disabled-color--100);
  --pf-v5-c-switch__input--disabled__label--Color: var(--pf-v5-global--disabled-color--100);
  --pf-v5-c-switch__input--disabled__toggle--Backgrou


}

        #endregion

        private void RaisePlaybackStoppedEvent()
        {
            if (PlaybackStopped != null)
            {
                if (this.syncContext == null)
                {
                    PlaybackStopped(this, EventArgs.Empty);
                }
                else
                {
                    this.syncContext.Post((state) => PlaybackStopped(this, EventArgs.Empty), null);
                }
            }
        }
    }
}


#[derive(PartialEq, Eq, PartialOrd, Ord)]
struct SeatId {
    pub id: u16,
    pub row: u8,
    pub col: u8,
}

impl SeatId {
    fn new(id: u16) -> Self {
        Self {
            id: id & 1023,
            row: ((id >> 3) & 127) as u8,
            col: (id & 7) as u8,
        }
    }
}

impl Debug for SeatId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let rowid = format!("{:07b}", self.row)
            .replace("0", "F")
            .replace("1", "B");
        let colid = format!("{:03b}", self.col)
            .replace("0", "L")
            .replace("1", "R");
        f.write_fmt(format_args!("<SeatId {} {}-{}>", self.id, rowid, colid))
    }
}

#[derive(Debug)]
struct BoardingPassParseError;

impl Display for BoardingPassParseError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str("Not a valid boarding pass")
    }
}

impl Error for BoardingPassParseError {}

impl FromStr for SeatId {
    type Err = BoardingPassParseError;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.len() {
            10 => s.char_indices().fold(Ok(0), |acc, (i, c)| match acc {
                Ok(id) => match (i, c) {
                    (0..=6, 'F') | (7..=9, 'L') => Ok(id << 1),
                    (0..=6, 'B') | (7..=9, 'R') => Ok((id << 1) | 1),
                    _ => Err(BoardingPassParseError),
                },
                _ => acc,
            }),
            _ => Err(BoardingPassParseError),
        }
        .and_then(|id| Ok(SeatId::new(id)))
    }
}

#[aoc_generator(day5)]
fn parse_boardingpasses(input: &str) -> Result<Vec<SeatId>, BoardingPassParseError> {
    input.lines().map(|l| l.parse()).collect()
}

#[aoc(day5, part1)]
fn max_seatid(seatids: &Vec<SeatId>) -> u16 {
    seatids.iter().max().unwrap().id
}

#[aoc(day5, part2)]
fn find_empty(seatids: &Vec<SeatId>) -> u16 {
    let minid: u16 = (u16::from(seatids.iter().map(|s| s.row).min().unwrap()) << 3) & 7;
    let maxid: u16 = u16::from(seatids.iter().map(|s| s.row).max().unwrap()) << 3;
    let occupied: BTreeSet<_> = seatids.iter().map(|s| s.id).collect();

    (minid..maxid)
        .tuple_windows()
        .filter_map(|(b, s, a)| {
            match (
                occupied.contains(&b),
                occupied.contains(&s),
                occupied.contains(&a),
            ) {
                (true, false, true) => Some(s),
                _ => None,
            }
        })
        .next()
        .unwrap()
}

#[cfg(test)]
mod tests {
    use super::*;

    static EXAMPLES: [(&str, u8, u8, u16); 4] = [
        ("FBFBBFFRLR", 44, 5, 357),
        ("BFFFBBFRRR", 70, 7, 567),
        ("FFFBBBFRRR", 14, 7, 119),
        ("BBFFBBFRLL", 102, 4, 820),
    ];

    #[test]
    fn test_seatids() -> Result<(), BoardingPassParseError> {
        let mut seatids: Vec<SeatId> = vec![];
        for (pass, row,


://my.cdn.com/assets/files/Media/mBSj5Fe8QgCKMCN4K/small/belle-HERO.png",
        thumbnail: "https://my.cdn.com/assets/files/Media/mBSj5Fe8QgCKMCN4K/thumbnail/belle-HERO.png"
      },
      optionTitle: "Green",
      productSlug: "basic-reaction-product",
      productType: "product-simple",
      productVendor: "Example Manufacturer",
      variantTitle: "Option 2 - Green Tomato"
    }
  ];

  expect(result).toEqual(expected);
});
import getProductListTrackingData from "./getProductListTrackingData";

const tag = {
  _id: "tag123",
  name: "My Tag"
};

const products = [{
  _id: "1234",
  sku: "a456",
  title: "My Product",
  vendor: "Reaction",
  slug: "my-product",
  tags: {
    nodes: [
      { name: "tag-1" },
      { name: "tag-2" }
    ]
  },
  shop: {
    currency: {
      code: "USD"
    }
  },
  pricing: [
    {
      currency: {
        code: "USD"
      },
      minPrice: 12.99,
      maxPrice: 19.99
    }
  ],
  primaryImage: {
    toGrid: 1,
    priority: 0,
    productId: "1234",
    URLs: {
      original: "/assets/image.jpg"
    }
  }
}];

test("getProductListTrackingData should return data for tracking with segment Product List schema", () => {
  const data = getProductListTrackingData({ tag, products });

  const result = {
    list_id: "tag123", // eslint-disable-line camelcase
    category: "My Tag",
    products: [
      {
        product_id: "1234", // eslint-disable-line camelcase
        sku: "a456",
        category: "tag-1",
        name: "My Product",
        brand: "Reaction",
        currency: "USD",
        price: 12.99,
        quantity: 1,
        value: 12.99,
        image_url: "/assets/image.jpg", // eslint-disable-line camelcase
        url: "/product/my-product"
      }
    ]
  };

  expect(data).toEqual(result);
});
import React from "react";
import hoistNonReactStatic from "hoist-non-react-statics";
import useAddAccountAddressBookEntry from "hooks/address/useAddAccountAddressBookEntry";
import useRemoveAccountAddressBookEntry from "hooks/address/useRemoveAccountAddressBookEntry";
import useUpdateAccountAddressBookEntry from "hooks/address/useUpdateAccountAddressBookEntry";

/**
 * @summary HOC that adds address book props
 * @param {React.Component} Component React Component to wrap
 * @return {React.Component} Wrapped component
 */
export default function withAddressBook(Component) {
  function WithAddressBook(props) { // eslint-disable-line require-jsdoc
    const [addAccountAddressBookEntry] = useAddAccountAddressBookEntry();
    const [updateAccountAddressBookEntry] = useUpdateAccountAddressBookEntry();
    const [removeAccountAddressBookEntry] = useRemoveAccountAddressBookEntry();

    return (
      <Component
        {...props}
        onAddressAdded={addAccountAddressBookEntry}
        onAddressEdited={updateAccountAddressBookEntry}
        onAddressDeleted={removeAccountAddressBookEntry}
      />
    );
  }

  hoistNonReactStatic(WithAddressBook, Component);

  return WithAddressBook;
}
import fetch from "isomorphic-unfetch";
import appConfig from "../../config.js";

let shopUrl = appConfig.CANONICAL_URL;
if (shopUrl.endsWith("/")) shopUrl = shopUrl.slice(0, -1);

/**
 * Gene


, RxMap<DownloadTaskFilename, DownloadProgress>> downloadsAudioProgressMap;
  final Map<DownloadTaskGroupName, int> latestEditedGroupDownloadTask;

  const _DownloadTaskInitWrapper({
    required this.youtubeDownloadTasksMap,
    required this.downloadedFilesMap,
    required this.downloadsVideoProgressMap,
    required this.downloadsAudioProgressMap,
    required this.latestEditedGroupDownloadTask,
  });
}

class _DownloadTasksLoadParams {
  final String tasksDatabasesPath;
  final String downloadLocation;

  const _DownloadTasksLoadParams({
    required this.tasksDatabasesPath,
    required this.downloadLocation,
  });
}

extension _MapUtils<MK, K, V> on Map<MK, Map<K, V>> {
  void _addAllEntries(Map<MK, Map<K, V>> other) {
    final mainMap = this;
    for (final entry in other.entries) {
      for (final e in entry.value.entries) {
        mainMap[entry.key] ??= <K, V>{};
        mainMap[entry.key]![e.key] = e.value;
      }
    }
  }
}

extension _RxMapUtils<MK, K, V> on Map<MK, RxMap<K, V>> {
  void _addAllEntries(Map<MK, RxMap<K, V>> other) {
    final mainMap = this;
    for (final entry in other.entries) {
      for (final e in entry.value.entries) {
        mainMap[entry.key] ??= <K, V>{}.obs;
        mainMap[entry.key]![e.key] = e.value;
      }
    }
  }
}

class _UserCanceledException implements Exception {
  const _UserCanceledException();
}

class _DownloadErrorDescriptionsWrapper implements Exception {
  _DownloadErrorDescriptionsWrapper._();

  final exceptions = <_DownloadErrorDescription>[];

  void add(_DownloadErrorDescription error) {
    exceptions.add(error);
  }

  static _DownloadErrorDescriptionsWrapper createOrAdd(_DownloadErrorDescriptionsWrapper? original, _DownloadErrorDescription error) {
    original ??= _DownloadErrorDescriptionsWrapper._();
    if (error.type == _DownloadErrorType.file_does_not_exist_after_rename_or_copy || error.type == _DownloadErrorType.non_qualified_file_size) {
      if (original.exceptions.any((element) => element.type == _DownloadErrorType.video_is_not_available)) {
        return original; // dont add these errors if video not available
      }
    }
    original.add(error);
    return original;
  }

  @override
  String toString() {
    return exceptions.map((e) => e.toString()).join('\n\n');
  }
}

class _DownloadErrorDescription implements Exception {
  final _DownloadErrorType type;
  final String message;
  const _DownloadErrorDescription._(this.type, this.message);

  factory _DownloadErrorDescription.nonQualifiedFileSize(int? size, int requiredSize) {
    final msg = 'size: $size | requiredSize $requiredSize | diff ${requiredSize - (size ?? 0)}';
    return _DownloadErrorDescription._(
      _DownloadErrorType.non_qualified_file_size,
      msg,
    );
  }

  factory _DownloadErrorDescription.mergeError({required String videoPath, required String audioPath, required String outputPath}) {
    final msg = 'videoPath: $videoPath | audioPath: $audioPath | outputPath: $outputPath';
    return _DownloadErrorDescription._(
      _DownloadErrorType.merge_error,
      msg,
    );
  }

  factory _DownloadErrorDescription.fileDoesNotExistAfterMerge({required String output}) {
    final msg = 'output: $output';
    return _DownloadErrorDescription._(


"""数据预处理

    1. 归一化节点特征
    2. 将节点划分为训练集、验证集和测试集
    3. 正则化邻接矩阵
    4. 加载数据至相应设备, cpu或gpu

"""

import torch
import scipy
import numpy as np

from .utils import *

def normalize_adjacency(adjacency):
    """邻接矩阵正则化

        L = D^-0.5 * (A + I) * D^-0.5
        A: 邻接矩阵, L: 正则化邻接矩阵

        Input:
        ------
        adjacency: sparse numpy array, 邻接矩阵

        Output:
        -------
        norm_adjacency: sparse numpy array, 正则化邻接矩阵

    """

    adjacency += scipy.sparse.eye(adjacency.shape[0])
    degree = np.array(adjacency.sum(1))
    d_hat = np.power(degree, -0.5).flatten()
    d_hat[np.isinf(d_hat)] = 0.0
    d_hat = scipy.sparse.diags(d_hat)
    norm_adjacency = d_hat.dot(adjacency).dot(d_hat).tocoo()

    return norm_adjacency

def prepare(dataset):
    """数据预处理

        1. 归一化节点特征
        2. 将节点划分为训练集、验证集和测试集
        3. 正则化邻接矩阵
        4. 加载数据至相应设备, cpu或gpu

        Input:
        ------
        dataset: Data, 包含的元素为:
                 X: numpy array, 节点特征
                 y: numpy array, 节点类别标签
                 adjacency: sparse numpy array, 邻接矩阵
                 test_mask: numpy array, 测试集样本mask
                 train_mask: numpy array, 训练集样本mask
                 valid_mask: numpy array, 验证集样本mask

        Output:
        -------
        dataset: Data, 包含的元素为:
                 X: tensor, 归一化后的节点特征
                 y: tensor, 节点类别标签
                 adjacency: tensor, 正则化后的邻接矩阵
                 test_index: tensor, 测试集样本索引
                 train_index: tensor, 训练集样本索引
                 valid_index: tensor, 验证集样本索引

    """

    # 节点特征归一化
    X_rowsum = dataset.data.X.sum(1, keepdims=True)
    X_rowsum[X_rowsum == 0] = 1
    X = dataset.data.X / X_rowsum
    X = torch.FloatTensor(X)

    # 节点标签
    y = torch.LongTensor(dataset.data.y)

    # 各数据划分样本索引
    test_index = torch.LongTensor(np.where(dataset.data.test_mask)[0])
    train_index = torch.LongTensor(np.where(dataset.data.train_mask)[0])
    valid_index = torch.LongTensor(np.where(dataset.data.valid_mask)[0])

    # 邻接矩阵正则化
    norm_adjacency = normalize_adjacency(dataset.data.adjacency)
    edges = np.asarray([norm_adjacency.row, norm_adjacency.col])
    edges = torch.from_numpy(edges.astype(int)).long()
    values = torch.from_numpy(norm_adjacency.data.astype(np.float32))
    adjacency = torch.sparse.FloatTensor(edges, values, (len(X), len(X)))

    # 数据加载至的设备
    device = 'cuda' if torch.cuda.is_available() else 'cpu'

    # 合并数据
    dataset = PrepData(
        X=X.to(device),
        y=y.to(device),
        edges=edges.to(device),
        adjacency=adjacency.to(device),
        test_index=test_index.to(device),
        train_index=train_index.to(device),
        valid_index=valid_index.to(device)
    )

    return dataset


}
fli.h ft1, 0x1p-7

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.0625
# CHECK-ASM: encoding: [0xd3,0x00,0x13,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 6.250000e-02

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.0625
# CHECK-ASM: encoding: [0xd3,0x00,0x13,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 0x1p-4

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.125
# CHECK-ASM: encoding: [0xd3,0x80,0x13,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 1.250000e-01

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.125
# CHECK-ASM: encoding: [0xd3,0x80,0x13,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 0x1p-3

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.25
# CHECK-ASM: encoding: [0xd3,0x00,0x14,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 2.500000e-01

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.25
# CHECK-ASM: encoding: [0xd3,0x00,0x14,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 0x1p-2

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.3125
# CHECK-ASM: encoding: [0xd3,0x80,0x14,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 3.125000e-01

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.3125
# CHECK-ASM: encoding: [0xd3,0x80,0x14,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 0x1.4p-2

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.375
# CHECK-ASM: encoding: [0xd3,0x00,0x15,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 3.750000e-01

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.375
# CHECK-ASM: encoding: [0xd3,0x00,0x15,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 0x1.8p-2

# CHECK-ASM-AND-OBJ: fli.h ft1, 0.4375
# CHECK-ASM: encoding: [0xd3,0x80,0x15,0xf4]
# CHECK-NO-EXT: error: instruction requires the following: 'Zfa' (Additional Floating-Point){{$}}
fli.h ft1, 4.375000e-01

# CHECK-ASM-AND-OBJ:


ff
* if you replaced originals.
*/
static int lfcgi_finish (lua_State *L) {
        FCGI_Finish();
        return 0;
}

static int lfcgi_getenv (lua_State *L) {
        const char *envVar = luaL_checkstring(L, 1);
        char       *val    = getenv(envVar);

		if (val == NULL) {
			val = lf_getenv(old_env, envVar);
		}

        if (val != NULL) {
            lua_pushstring(L, val);
        } else {
			lua_pushnil(L);
        }
        return 1;
}

static int lfcgi_environ(lua_State *L) {
        char **envp;
        int i=1;
        lua_newtable(L);
        for ( envp = old_env; *envp != NULL; envp++, i++) {
                lua_pushnumber(L, i);
                lua_pushstring(L, *envp);
                lua_settable(L, -3);
        }
        if (old_envp != environ) {
                for ( envp = environ; *envp != NULL; envp++, i++) {
                        lua_pushnumber(L, i);
                        lua_pushstring(L, *envp);
                        lua_settable(L, -3);
                }
        }
        return 1;
}

static int lfcgi_iscgi(lua_State *L) {
  lua_pushboolean(L, FCGX_IsCGI());
  return 1;
}

static int lfcgi_getpid(lua_State *L) {
        lua_pushnumber(L, getpid());
        return 1;
}

static const luaL_Reg iolib[] = {
  {"input", io_input},
  {"output", io_output},
  {"lines", io_lines},
  {"close", io_close},
  {"flush", io_flush},
  {"open", io_open},
  {"popen", io_popen},
  {"read", io_read},
  {"tmpfile", io_tmpfile},
  {"type", io_type},
  {"write", io_write},
  {"accept", lfcgi_accept},
  {"finish", lfcgi_finish},
  {"getenv", lfcgi_getenv},
  {"getpid", lfcgi_getpid},
  {"environ", lfcgi_environ},
  {"iscgi", lfcgi_iscgi},
  {NULL, NULL}
};

static const luaL_Reg flib[] = {
  {"flush", f_flush},
  {"read", f_read},
  {"lines", f_lines},
  {"seek", f_seek},
  {"write", f_write},
  {"close", io_close},
  {"__gc", io_gc},
  {"__tostring", io_tostring},
  {NULL, NULL}
};

static void createmeta (lua_State *L) {
  luaL_newmetatable(L, FILEHANDLE);  /* create new metatable for file handles */
  /* file methods */
  lua_pushliteral(L, "__index");
  lua_pushvalue(L, -2);  /* push metatable */
  lua_rawset(L, -3);  /* metatable.__index = metatable */
  luaL_setfuncs(L, flib, 0);
}

/* }====================================================== */

LUALIB_API int luaopen_lfcgi (lua_State *L) {
  old_envp = environ;
  old_env  = lf_copy_environ();
  createmeta(L);
  lua_pushvalue(L, -1);
  lua_newtable(L);
  lua_pushvalue(L, -1);
  lua_setglobal(L, "lfcgi");
  lua_insert(L, -2);
  luaL_setfuncs(L, iolib, 1);
  /* put predefined file handles into `io' table */
  registerfile(L, FCGI_stdin, "stdin", IO_INPUT);
  registerfile(L, FCGI_stdout, "stdout", IO_OUTPUT);
  registerfile(L, FCGI_stderr, "stderr", NULL);
  return 1;
}


closingDeclarations();
    _flowAnalysis.bodyOrInitializer_enter(node.parent as AstNodeImpl, null);
    _resolverVisitor.analyzeExpression(node, SharedTypeSchemaView(contextType));
    _resolverVisitor.popRewrite();
    _resolverVisitor.checkIdle();
    _flowAnalysis.bodyOrInitializer_exit();
  }

  void _prepareEnclosingDeclarations() {
    _resolutionVisitor.prepareEnclosingDeclarations(
      enclosingClassElement: enclosingClassElement,
    );

    _resolverVisitor.prepareEnclosingDeclarations(
      enclosingClassElement: enclosingClassElement,
      enclosingExecutableElement: enclosingExecutableElement,
    );
  }
}
// Copyright (c) 2019, 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.

import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/summary2/combinator.dart';
import 'package:analyzer/src/summary2/library_builder.dart';
import 'package:analyzer/src/summary2/reference.dart';
import 'package:analyzer/src/utilities/extensions/collection.dart';

class Export {
  final LibraryBuilder exporter;
  final ExportLocation location;
  final List<Combinator> combinators;

  Export({
    required this.exporter,
    required this.location,
    required this.combinators,
  });

  bool addToExportScope(String name, ExportedReference exported) {
    if (combinators.allows(name)) {
      return exporter.exportScope.export(location, name, exported);
    }
    return false;
  }
}

sealed class ExportedReference {
  final Reference reference;

  ExportedReference({required this.reference});

  /// We are done updating this object, returns the immutable version.
  ExportedReference toFinalized() => this;

  @override
  String toString() {
    return '$reference';
  }
}

/// [ExportedReference] for a public element declared in the library.
class ExportedReferenceDeclared extends ExportedReference {
  ExportedReferenceDeclared({required super.reference});
}

/// [ExportedReference] for an element that is re-exported.
class ExportedReferenceExported extends ExportedReference {
  /// The locations of `export` (at least one) that export the element.
  final List<ExportLocation> locations;

  ExportedReferenceExported({
    required super.reference,
    required this.locations,
  });

  void addLocation(ExportLocation location) {
    // This list is very small, contains on it is probably ok.
    if (!locations.contains(location)) {
      locations.add(location);
    }
  }

  @override
  ExportedReference toFinalized() {
    return ExportedReferenceExported(
      reference: reference,
      locations: locations.toFixedList(),
    );
  }
}

class ExportLocation {
  /// The index of the fragment with the `export` directive, `0` means the
  /// library file, a positive value means an included fragment.
  final int fragmentIndex;

  /// The index in [LibraryFragmentImpl.libraryExports].
  final int exportIndex;

  ExportLocation({required this.fragmentIndex, required this.exportIndex});

  @override
  bool operator ==(Object other) {
    return other is ExportLocation &&
        other.fragmentIndex == fragmentIndex &&
        other.exportIndex == exportIndex;
  }

  @override
  String toString() {
    return '($fragmentIndex, $exportIndex)';
  }
}

class ExportScope {
  final Map<String, ExportedReference> map = {};

  void declare(String name, Reference reference) {
    map[name] = ExportedReferenceDeclared(reference: reference);
  }

  bool export(
    ExportLocation location,
    String name,
    ExportedReference exported,


 def _interpolate_transition(self, last_frame: Dict, first_frame: Dict, duration_seconds: int) -> List[Dict]:
        """在最後一幀和第一幀之間插入過渡段"""

        transition_frames = []

        # 生成過渡時間點（每30秒一個點）
        num_points = duration_seconds // 30

        for i in range(1, num_points + 1):
            # 插值係數 (0到1)
            alpha = i / (num_points + 1)

            # 時間戳
            last_time = datetime.fromisoformat(last_frame['timestamp'].replace('Z', '+00:00'))
            transition_time = last_time + timedelta(seconds=i * 30)

            # 插值衛星位置
            transition_satellites = []
            if 'satellites' in last_frame and 'satellites' in first_frame:
                transition_satellites = self._interpolate_satellite_positions(
                    last_frame['satellites'],
                    first_frame['satellites'],
                    alpha
                )

            transition_frame = {
                'timestamp': transition_time.isoformat(),
                'satellites': transition_satellites,
                'transition': True,
                'alpha': alpha
            }

            transition_frames.append(transition_frame)

        return transition_frames

    def _interpolate_satellite_positions(self, sats1: List[Dict], sats2: List[Dict], alpha: float) -> List[Dict]:
        """插值衛星位置"""

        interpolated = []

        # 創建衛星映射
        sat1_map = {sat['satellite_id']: sat for sat in sats1}
        sat2_map = {sat['satellite_id']: sat for sat in sats2}

        # 對共同衛星進行插值
        for sat_id in sat1_map:
            if sat_id in sat2_map:
                sat1 = sat1_map[sat_id]
                sat2 = sat2_map[sat_id]

                # 位置插值
                if 'position' in sat1 and 'position' in sat2:
                    pos1, pos2 = sat1['position'], sat2['position']

                    interpolated_sat = {
                        'satellite_id': sat_id,
                        'name': sat1.get('name', f'SAT-{sat_id}'),
                        'position': {
                            'lat': pos1['lat'] * (1 - alpha) + pos2['lat'] * alpha,
                            'lon': pos1['lon'] * (1 - alpha) + pos2['lon'] * alpha,
                            'alt': pos1['alt'] * (1 - alpha) + pos2['alt'] * alpha
                        }
                    }

                    # 重新計算相對參數
                    if 'relative' in sat1:
                        rel1, rel2 = sat1['relative'], sat2.get('relative', rel1)
                        interpolated_sat['relative'] = {
                            'elevation': rel1['elevation'] * (1 - alpha) + rel2['elevation'] * alpha,
                            'azimuth': rel1['azimuth'] * (1 - alpha) + rel2['azimuth'] * alpha,
                            'distance': rel1['distance'] * (1 - alpha) + rel2['distance'] * alpha
                        }

                    interpolated.append(interpolated_sat)

        return interpolated

class DynamicTimeWindowSelector:
    """選擇最佳觀測時間窗口"""

    def __init__(self):
        self.target_visible = (8, 12)  # 目標可見衛星範圍

    async def find_optimal_window(self, date: datetime, constellation: str) -> Dict[str, Any]:
        """找到指定日期的最佳24小時窗口"""

        candidates = []

        # 測試不同起始時間（每6小時測試一次）
        for hour in range(0, 24, 6):
            start_time = datetime(
                date.year, date.month, date.day, hour, 0, 0,
                tzinfo=timezone.utc
            )
            end_time = start_time + timedelta(hours=24)

            # 評估這個時間窗口
            quality = await self._evaluate_window_quality(
                start_time,
                end_time,
                constellation
            )

            candidates.append({
                "start": start_time,
                "end": end_time,
                "quality_score": quality['score'],
                "metrics": quality['metrics']
            })

        # 選擇最佳窗口
        best_window = max(candidates, key=lambda x: x["quality_score"])

        logger.info(f"最佳時間窗口: {best_window['start']} - {best_window['end']}")
        logger.info(f"品質分數: {best_window['quality_score']:.2f}")

        return best_window

    async def _evaluate_window_quality(self, start_time: datet


rver"
	"github.com/apache/incubator-uniffle/deploy/kubernetes/operator/pkg/controller/util"
	kubeutil "github.com/apache/incubator-uniffle/deploy/kubernetes/operator/pkg/controller/util/kubernetes"
	propertiestutil "github.com/apache/incubator-uniffle/deploy/kubernetes/operator/pkg/controller/util/properties"
	"github.com/apache/incubator-uniffle/deploy/kubernetes/operator/pkg/generated/clientset/versioned"
	"github.com/apache/incubator-uniffle/deploy/kubernetes/operator/pkg/generated/informers/externalversions"
	"github.com/apache/incubator-uniffle/deploy/kubernetes/operator/pkg/generated/listers/uniffle/v1alpha1"
	"github.com/apache/incubator-uniffle/deploy/kubernetes/operator/pkg/utils"
)

var _ RSSController = &rssController{}

const (
	controllerName = "rss-controller"
	appNameIndexer = "AppNameIndexer"
)

// RSSController is responsible for synchronizing rss objects.
type RSSController interface {
	manager.Runnable
}

// NewRSSController creates a RSSController.
func NewRSSController(cfg *config.Config) RSSController {
	return newRSSController(cfg)
}

// newRSSController creates a rssController.
func newRSSController(cfg *config.Config) *rssController {
	rc := &rssController{
		workers:                      cfg.Workers,
		kubeClient:                   cfg.KubeClient,
		rssClient:                    cfg.RSSClient,
		rssInformerFactory:           externalversions.NewSharedInformerFactory(cfg.RSSClient, 0),
		shuffleServerInformerFactory: utils.BuildShuffleServerInformerFactory(cfg.KubeClient),
		coordinatorInformerFactory:   utils.BuildCoordinatorInformerFactory(cfg.KubeClient),
		rssQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(),
			"rss-queue"),
		shuffleServerQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(),
			"pod-queue"),
		eventRecorder: util.CreateRecorder(cfg.KubeClient, "rss-controller"),
	}

	rssInformer := rc.rssInformerFactory.Uniffle().V1alpha1().RemoteShuffleServices().Informer()
	rssInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc:    rc.addRSS,
		UpdateFunc: rc.updateRSS,
	})
	rc.rssInformer = rssInformer
	rc.rssLister = rc.rssInformerFactory.Uniffle().V1alpha1().RemoteShuffleServices().Lister()

	rc.stsInformer = rc.shuffleServerInformerFactory.Apps().V1().StatefulSets().Informer()
	rc.stsLister = rc.shuffleServerInformerFactory.Apps().V1().StatefulSets().Lister()

	rc.podInformer = rc.shuffleServerInformerFactory.Core().V1().Pods().Informer()
	rc.podInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
		DeleteFunc: rc.deleteShuffleServer,
	})
	if err := rc.podInformer.AddIndexers(cache.Indexers{appNameIndexer: getAppName}); err != nil {
		klog.Fatalf("add app name indexer failed: %v", err)
	}
	rc.podIndexer = rc.podInformer.GetIndexer()
	rc.podLister = rc.shuffleServerInformerFactory.Core().V1().Pods().Lister()

	rc.cmInformer = rc.coordinatorInformerFactory.Core().V1().ConfigMaps().Informer()
	rc.cmLister = rc.coordinatorInformerFactory.Core().V1().ConfigMaps().Lister


llback.onPictureTook(bitmap);
                }
            }
        });
    }

    public void closeCamera() {
        camera.stopPreview();
        camera.setPreviewCallbackWithBuffer(null);
        camera.release();
        camera = null;
        surfaceTexture.release();
    }

    private int findFontCameraId(){
        int numberOfCameras = Camera.getNumberOfCameras();// 获取摄像头个数
        //遍历摄像头信息
        for (int cameraId = 0; cameraId < numberOfCameras; cameraId++) {
            Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
            Camera.getCameraInfo(cameraId, cameraInfo);
            if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {//前置摄像头
               return cameraId;
            }
        }
        return 0;
    }
}
package com.elexlab.cybercontroller.ui.widget;

import android.content.Context;
import android.graphics.Bitmap;
import android.os.Handler;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.elexlab.cybercontroller.R;
import com.elexlab.cybercontroller.utils.AssetsUtils;

import java.util.List;

public class AssetsAnimationImageView extends ImageView {
    private final static String TAG = AssetsAnimationImageView.class.getSimpleName();
    public AssetsAnimationImageView(Context context) {
        super(context);
    }

    public AssetsAnimationImageView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public AssetsAnimationImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public AssetsAnimationImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    private Handler handler = new Handler();
    private String path;
    private List<String> animImgs;
    private int index=0;
    private int step=1;
    private int deltaTime = 100;
    public void setImages(String path){
        this.path = path;
        animImgs = AssetsUtils.listFiles(getContext(),path);

    }
    public void setDeltaTime(int deltaTime){
        this.deltaTime = deltaTime;
    }

    private Runnable anim = new Runnable() {
        @Override
        public void run() {

            Bitmap bitmap = AssetsUtils.getImageFromAssetsFile(getContext(),path+"/"+animImgs.get(index));
            setImageBitmap(bitmap);

            if((index==animImgs.size()-1&&step>0) || (index==0&&step<0)){
                step=-step;
            }
            index+=step;

            handler.postDelayed(this,deltaTime);
        }
    };

    public void start(){
        if(animImgs == null || animImgs.size()<=0){
            Log.e(TAG,"no animImgs setted!");
            return;
        }
        handler.post(anim);
    }
    public void stopAnim(){
        handler.removeCallbacks(anim);
    }
}
/**
 * 模拟参数
 *
 * @ClassName: Constants
 * @Description: 模拟参数
 * @author: Bruce Young
 * @date: 2020年02月02日 21:40
 */
public class Constants {

    public static int ORIGINAL_COUNT = 50;//初始感染数量
    public static float BROAD_RATE = 0.8f;//传播率
    public static float SHADOW_TIME = 140;//潜伏时间，14天为140
    public static int HOSPITAL_RECEIVE_TIME = 10;//医院收治响应时间
    public static


; tracefile-ld.s - test file for EduMIPS64.
;
; Tests for the Dinero tracefile generation code.
; Will produce a tracefile with 2 instruction accesses and 1 load.
;
; (c) 2018 Andrea Spadaccini and the EduMIPS64 team
;
; This file is part of the EduMIPS64 project, and is released under the GNU
; General Public License.
;
; 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
; (a


-diagram {
  --fa: "\f542";
}

.fa-receipt {
  --fa: "\f543";
}

.fa-robot {
  --fa: "\f544";
}

.fa-ruler {
  --fa: "\f545";
}

.fa-ruler-combined {
  --fa: "\f546";
}

.fa-ruler-horizontal {
  --fa: "\f547";
}

.fa-ruler-vertical {
  --fa: "\f548";
}

.fa-school {
  --fa: "\f549";
}

.fa-screwdriver {
  --fa: "\f54a";
}

.fa-shoe-prints {
  --fa: "\f54b";
}

.fa-skull {
  --fa: "\f54c";
}

.fa-ban-smoking {
  --fa: "\f54d";
}

.fa-smoking-ban {
  --fa: "\f54d";
}

.fa-store {
  --fa: "\f54e";
}

.fa-shop {
  --fa: "\f54f";
}

.fa-store-alt {
  --fa: "\f54f";
}

.fa-bars-staggered {
  --fa: "\f550";
}

.fa-reorder {
  --fa: "\f550";
}

.fa-stream {
  --fa: "\f550";
}

.fa-stroopwafel {
  --fa: "\f551";
}

.fa-toolbox {
  --fa: "\f552";
}

.fa-shirt {
  --fa: "\f553";
}

.fa-t-shirt {
  --fa: "\f553";
}

.fa-tshirt {
  --fa: "\f553";
}

.fa-person-walking {
  --fa: "\f554";
}

.fa-walking {
  --fa: "\f554";
}

.fa-wallet {
  --fa: "\f555";
}

.fa-face-angry {
  --fa: "\f556";
}

.fa-angry {
  --fa: "\f556";
}

.fa-archway {
  --fa: "\f557";
}

.fa-book-atlas {
  --fa: "\f558";
}

.fa-atlas {
  --fa: "\f558";
}

.fa-award {
  --fa: "\f559";
}

.fa-delete-left {
  --fa: "\f55a";
}

.fa-backspace {
  --fa: "\f55a";
}

.fa-bezier-curve {
  --fa: "\f55b";
}

.fa-bong {
  --fa: "\f55c";
}

.fa-brush {
  --fa: "\f55d";
}

.fa-bus-simple {
  --fa: "\f55e";
}

.fa-bus-alt {
  --fa: "\f55e";
}

.fa-cannabis {
  --fa: "\f55f";
}

.fa-check-double {
  --fa: "\f560";
}

.fa-martini-glass-citrus {
  --fa: "\f561";
}

.fa-cocktail {
  --fa: "\f561";
}

.fa-bell-concierge {
  --fa: "\f562";
}

.fa-concierge-bell {
  --fa: "\f562";
}

.fa-cookie {
  --fa: "\f563";
}

.fa-cookie-bite {
  --fa: "\f564";
}

.fa-crop-simple {
  --fa: "\f565";
}

.fa-crop-alt {
  --fa: "\f565";
}


"""Test for QtHelp namespace."""

from __future__ import absolute_import

import pytest

def test_qthelp():
    """Test the qtpy.QtHelp namespace."""
    from qtpy import QtHelp

    assert QtHelp.QHelpContentItem is not None
    assert QtHelp.QHelpContentModel is not None
    assert QtHelp.QHelpContentWidget is not None
    assert QtHelp.QHelpEngine is not None
    assert QtHelp.QHelpEngineCore is not None
    assert QtHelp.QHelpIndexModel is not None
    assert QtHelp.QHelpIndexWidget is not None
    assert QtHelp.QHelpSearchEngine is not None
    assert QtHelp.QHelpSearchQuery is not None
    assert QtHelp.QHelpSearchQueryWidget is not None
    assert QtHelp.QHelpSearchResultWidget is not None


setTimeout('hideModal("editChannelModal")', 500);

                // 重新加载渠道码列表
                setTimeout('getChannelList();', 500);
            }else{

                // 操作反馈（操作失败）
                showErrorResult(res.msg)
            }
        },
        error: function() {

            // 服务器发生错误
            showErrorResultForphpfileName('editChannel.php');
        }
    });
}

// 询问是否要删除渠道活码
function askDelChannel(e){

    // 获取channel_id
    var channel_id = e.id;

    // 将群id添加到button的
    // delChannel函数用于传参执行删除
    $('#DelChannelHm .modal-footer').html(
        '<button type="button" class="default-btn" onclick="delChannel('+channel_id+');">确定删除</button>'
    )
}

// 删除渠道码
function delChannel(channel_id){

    // 删除
    $.ajax({
        type: "GET",
        url: "./delChannel.php?channel_id="+channel_id,
        success: function(res){

            // 成功
            if(res.code == 200){

                // 隐藏Modal
                hideModal("DelChannelHm");

                // 重新加载群列表
                setTimeout('getChannelList()', 500);

                // 显示删除结果
                setTimeout('showNotification("'+res.msg+'")', 600);
            }else{

                // 操作反馈（操作失败）
                showErrorResult(res.msg)
            }
        },
        error: function() {

            // 服务器发生错误
            showErrorResultForphpfileName('delChannel.php');
        }
    });
}

// 获取渠道码详情
function getChannelInfo(e){

    // 获取channel_id
    var channel_id = e.id;

    $.ajax({
        type: "GET",
        url: "./getChannelInfo.php?channel_id="+channel_id,
        success: function(res){

            if(res.code == 200){

                // 操作成功
                showSuccessResult(res.msg)

                // 标题
                $('input[name="channel_title"]').val(res.channelInfo.channel_title);

                // 后台备注
                $('input[name="channel_beizhu_ht"]').val(res.channelInfo.channel_beizhu_ht);

                // 获取域名列表
                getDomainNameList('edit')

                // 推广链接
                $('textarea[name="channel_url"]').val(res.channelInfo.channel_url);

                // channel_id
                $('input[name="channel_id"]').val(channel_id);

                // 定制的
                $('select[name="channel_limit"]').val(res.channelInfo.channel_limit);
                $('select[name="is_mzfwxz"]').val(res.channelInfo.is_mzfwxz);
                $('input[name="mzfwxz_url"]').val(res.channelInfo.mzfwxz_url);

                if(res.channelInfo.channel_limit > 1) {

                    // 显示
                    $('.is_mzfwxz').css('display','block');
                }else {


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

namespace Microsoft.Azure.Management.Compute.Fluent.VirtualMachineScaleSetVM.Update
{
    using Microsoft.Azure.Management.Compute.Fluent.Models;
    using Microsoft.Azure.Management.ResourceManager.Fluent.Core;
    using Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions;

    /// <summary>
    /// The template for an update operation, containing all the settings that can be modified.
    /// </summary>
    public interface IUpdate : IBeta, IAppliable<IVirtualMachineScaleSetVM>
    {
        /// <summary>
        /// Attaches an existing data disk to this VMSS virtual machine.
        /// </summary>
        /// <param name="disk">the data disk, need to be in DiskState.UNATTACHED state</param>
        /// <param name="lun">the disk LUN, cannot conflict with existing LUNs</param>
        /// <param name="cachingType">the caching type</param>
        //


ag)
    }

    private fun i32(value: ULong): ULong {
        var remaining = value
        for (i in 0 until 4) {
            put((remaining and 0xffUL).toByte())
            remaining = remaining shr 8
        }
        return value
    }

    private fun i64(value: ULong): ULong {
        var remaining = value
        for (i in 0 until 8) {
            put((remaining and 0xffUL).toByte())
            remaining = remaining shr 8
        }
        return value
    }

    private fun varint(value: UInt) {
        var next = value and valueMaskInt
        var remaining = value shr 7

        while (remaining != 0U) {
            put(continuation or next.toByte())
            next = remaining and valueMaskInt
            remaining = remaining shr 7
        }

        put(next.toByte())
    }

    private fun varint(value: ULong) {
        var next = value and valueMaskLong
        var remaining = value shr 7

        while (remaining != 0UL) {
            put(continuation or next.toByte())
            next = remaining and valueMaskLong
            remaining = remaining shr 7
        }

        put(next.toByte())
    }

    // ------------------------------------------------------------------------
    // Constants for the wire format
    // ------------------------------------------------------------------------

    companion object {
        const val continuation = 0x80.toByte()
        const val valueMaskLong = 0x7fUL
        const val valueMaskInt = 0x7FU
    }

}/*
 * Copyright © 2020-2024, Simplexion, Hungary and contributors. Use of this source code is governed by the Apache 2.0 license.
 */

package `fun`.adaptive.wireformat.xml

internal enum class TokenType {
    STag,
    ETag,
    EmptyElemTag,
    Content,
    Other,
}

internal data class Token(
    val type: TokenType,
    val value: String
)

internal fun tokenize(source: String): List<Token> {

    val tokens = mutableListOf<Token>()

    val end = source.length
    var index = 0
    var start = 0

    while (index < end) {
        val char = source[index]

        when (char) {
            '<' -> {
                if (start != index) {
                    tokens += Token(TokenType.Content, source.substring(start, index))
                }

                start = ++index

                val type = when (source[index]) {
                    '!' -> TokenType.Other
                    '?' -> TokenType.Other
                    '/' -> {
                        start = index + 1 // skip the '/'
                        TokenType.ETag
                    }
                    else -> TokenType.STag
                }

                while (index < end && source[index] != '>') {
                    index ++
                }

                check(index != end) { "missing '>'" }

                if (source[index - 1] == '/') {
                    check(type == TokenType.STag) { "Invalid XML structure at $index" }
                    tokens += Token(TokenType.EmptyElemTag, source.substring(start, index ))
                } else {
                    tokens += Token(type, source.substring(start, index))
                }

                start = index + 1
            }
        }

        index++
    }

    return tokens
}
/*
 * Copyright © 2020-2024, Simplexion, Hungary and contributors. Use of this source code is governed by the Apache 2.0 license.
 */

package `fun`.adaptive.wireformat.json.elements

import `fun`.adaptive.wireformat.json.visitor.JsonTransformer
import `fun`.adaptive.wireformat.json.visitor.JsonVisitor


  * 2021-09-25T08:01:03.429+0800: 78304.391: [GC concurrent-mark-start]
     * 2021-09-25T08:01:06.138+0800: 78307.101: [GC concurrent-mark-reset-for-overflow]
     * 2021-08-25T11:28:23.995+0800: 114394.984: [GC concurrent-mark-abort]
     * 2021-09-25T08:01:18.109+0800: 78319.072: [GC concurrent-mark-end, 14.6803750 secs]
     * 2021-09-25T08:01:18.115+0800: 78319.078: [GC remark 2021-09-25T08:01:18.115+0800: 78319.078: [Finalize Marking, 0.1774665 secs] 2021-09-25T08:01:18.293+0800: 78319.255: [GC ref-proc, 0.1648116 secs] 2021-09-25T08:01:18.457+0800: 78319.420: [Unloading, 0.1221964 secs], 0.4785858 secs]
     *  [Times: user=1.47 sys=0.31, real=0.48 secs]
     * 2021-09-25T08:01:18.601+0800: 78319.563: [GC cleanup 11G->9863M(20G), 0.0659638 secs]
     *  [Times: user=0.20 sys=0.01, real=0.07 secs]
     * 2021-09-25T08:01:18.667+0800: 78319.630: [GC concurrent-cleanup-start]
     * 2021-09-25T08:01:18.668+0800: 78319.631: [GC concurrent-cleanup-end, 0.0010377 secs]
     * 2021-05-25T22:41:05.357+0800: 190.521: [Full GC (Allocation Failure)  2691M->476M(2724M), 1.9820132 secs]
     *   [Eden: 0.0B(1024.0M)->0.0B(1024.0M) Survivors: 0.0B->0.0B Heap: 2691.5M(2724.0M)->476.6M(2724.0M)], [Metaspace: 31984K->31982K(1079296K)]
     * [Times: user=2.64 sys=0.17, real=1.98 secs]
     * 2021-08-26T15:47:09.545+0800: 414187.453: [GC pause (G1 Evacuation Pause) (young)2021-08-26T15:47:09.611+0800: 414187.519: [SoftReference, 0 refs, 0.0000435 secs]2021-08-26T15:47:09.611+0800: 414187.519: [WeakReference, 0 refs, 0.0000062 secs]2021-08-26T15:47:09.611+0800: 414187.519: [FinalReference, 0 refs, 0.0000052 secs]2021-08-26T15:47:09.611+0800: 414187.519: [PhantomReference, 0 refs, 0 refs, 0.0000056 secs]2021-08-26T15:47:09.611+0800: 414187.519: [JNI Weak Reference, 0.0000129 secs] (to-space exhausted), 0.1011364 secs]
     * 2021-08-26T15:47:01.710+0800: 414179.619: [GC pause (G1 Evacuation Pause) (mixed)2021-08-26T15:47:01.727+0800: 414179.636: [SoftReference, 0 refs, 0.0000415 secs]2021-08-26T15:47:01.727+0800: 414179.636: [WeakReference, 0 refs, 0.0000061 secs]2021-08-26T15:47:01.727+0800: 414179.636:


alf("expected status update, but no update was send")
	}
}

func testKeyRegister(t *testing.T, ctx context.Context, clientset kubernetes.Interface, ns string) *KeyRegistry {
	t.Helper()

	keyLabel := SealedSecretsKeyLabel
	prefix := "test-keys"
	testKeySize := 4096
	keyRegistry, err := initKeyRegistry(ctx, clientset, rand.Reader, ns, prefix, keyLabel, testKeySize, "CertNotBefore")
	if err != nil {
		t.Fatalf("failed to provision key registry: %v", err)
	}
	return keyRegistry
}
package v1alpha1

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
	"k8s.io/client-go/kubernetes/scheme"
)

// GroupName is the group name used in this package.
const GroupName = "bitnami.com"

var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

	// SchemeBuilder adds this group to scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

func init() {
	utilruntime.Must(SchemeBuilder.AddToScheme(scheme.Scheme))
}

// Resource takes an unqualified resource and returns a Group qualified GroupResource.
func Resource(resource string) schema.GroupResource {
	return SchemeGroupVersion.WithResource(resource).GroupResource()
}

func addKnownTypes(scheme *runtime.Scheme) error {
	scheme.AddKnownTypes(SchemeGroupVersion,
		&SealedSecret{},
		&SealedSecretList{},
	)
	metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
	return nil
}
package main

import (
	"embed"
	"fmt"
	"io/fs"
	"log"
	"net/http"
	"os"
	"path/filepath"
	"strings"

	"github.com/labstack/echo/v5"
	"github.com/pocketbase/pocketbase"
	"github.com/pocketbase/pocketbase/core"
	"github.com/pocketbase/pocketbase/plugins/migratecmd"
	"github.com/spf13/cobra"

	"bitor/handlers"
	"bitor/middleware"
	_ "bitor/migrations" // ensure migrations are registered
	"bitor/nuclei"
	"bitor/routes"
	"bitor/scan"
	"bitor/setup"
	"bitor/ssh"
	"bitor/templates"
	"bitor/terminal"
	"bitor/utils"
	"bitor/utils/crypto"
	"bitor/version"
)

//go:embed all:pb_public
var distDir embed.FS
var distDirFS, _ = fs.Sub(distDir, "pb_public")

//go:embed ansible/roles/generate ansible/roles/terraform ansible/roles/nuclei ansible/generate.yml ansible/defaults.yml
var ansibleFiles embed.FS

var Version = "development"
var ansibleBasePath string
var showAnsibleLogs bool

// extractAnsibleFiles extracts embedded ansible files if they don't exist
func extractAnsibleFiles() error {
	// Check if ansible directory already exists
	if _, err := os.Stat(ansibleBasePath); err == nil {
		log.Printf("Ansible directory already exists at %s, skipping extraction", ansibleBasePath)
		return nil
	}

	log.Printf("Extracting ansible files to %s", ansibleBasePath)

	// Walk through the embedded files and extract t


: Collection<Component>): DirectedGraph<Type.Object> {
  return HashDirectedGraph<Type.Object>().apply {
    components.forEach { put(it.type, it.subcomponents) }
  }
}
/*
 * Copyright 2019 Michael Rozumyanskiy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.michaelrocks.lightsaber.processor.io

import java.io.File
import java.io.InputStream
import kotlin.io.readBytes as readBytesKotlin

// XXX: Kotlin 1.3.xx is ABI-incompatible with 1.2.xx because readBytes(Int) extension function was replaced with readBytes().
// Depending on Gradle version it may happen so that the plugin is loaded with 1.2.xx version of Kotlin.
// In this case we don't want to crash and try to workaround ABI incompatibility with these hacks.

@Suppress("deprecation")
internal fun File.readBytes(): ByteArray {
  return if (KotlinVersion.CURRENT.isAtLeast(1, 3, 0)) {
    readBytesKotlin()
  } else {
    inputStream().use { it.readBytesKotlin(DEFAULT_BUFFER_SIZE) }
  }
}

@Suppress("deprecation")
internal fun InputStream.readBytes(): ByteArray {
  return if (KotlinVersion.CURRENT.isAtLeast(1, 3, 0)) {
    readBytesKotlin()
  } else {
    readBytesKotlin(DEFAULT_BUFFER_SIZE)
  }
}
/*
 * Copyright 2020 Michael Rozumyanskiy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.michaelrocks.lightsaber.processor.analysis

import io.michaelrocks.grip.Grip
import io.michaelrocks.grip.and
import io.michaelrocks.grip.annotatedWith
import io.michaelrocks.grip.classes
import io.michaelrocks.grip.from
import io.michaelrocks.grip.isConstructor
import io.michaelrocks.grip.methods
import io.michaelrocks.grip.mirrors.ClassMirror
import io.michaelrocks.grip.mirrors.MethodMirror
import io.michaelrocks.grip.mirrors.Type
import io.michaelrocks.grip.mirrors.getObjectTypeByInternalName
import io.michaelrocks.grip.mirrors.signature.GenericType
import io.michaelrocks.lightsaber.Factory.Return
import io.michaelrocks.lightsaber.processor.ErrorReporter
import io.michaelrocks.lightsaber.processor.commons.Types
import io.michaelrocks.lightsaber.processor.commons.associateByIndexedTo
import io.michaelrocks.lightsaber.processor.commons.boxed
import io.michaelrocks.lightsaber.processor.model.Dependency
import io.michaelrocks.lightsaber.processor.model.Factory
import io.michaelrocks.lightsaber.processor.model.FactoryInjectee
import io.michaelrocks.lightsaber.processor.model.FactoryInjectionPoint
import io.michaelrocks.lightsaber.processor.model.FactoryProvisionPoint
import io.michaelrocks.lightsaber.processor.model.Injectee
import io.michaelrocks.lightsaber.processor.model.InjectionPoint
import ja


 */
  bg?: string;

  /** List of custom field definitions for this issue type. */
  fields?: FieldType[];
}

/** Defines the set of issue types. */
export interface Template {
  /** Name of this template. */
  name: string;

  /** Project where this workflow is defined. */
  project: string;

  /** List of issue types for this template. */
  types: IssueType[];
}
import test from 'ava';
import solve from '.';

test('part 1', t => {
	const input = [
		'ecl:gry pid:860033327 eyr:2020 hcl:#fffffd',
		'byr:1937 iyr:2017 cid:147 hgt:183cm',
		'',
		'iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884',
		'hcl:#cfa07d byr:1929',
		'',
		'hcl:#ae17e1 iyr:2013',
		'eyr:2024',
		'ecl:brn pid:760753108 byr:1931',
		'hgt:179cm',
		'',
		'hcl:#cfa07d eyr:2025 pid:166559648',
		'iyr:2011 ecl:brn hgt:59in'
	];

	t.is(solve(input)[0], 2, 'validates field existence');
});

test('part 2', t => {
	const invalid = [
		['eyr:1972 cid:100', 'hcl:#18171d ecl:amb hgt:170 pid:186cm iyr:2018 byr:1926'],
		['iyr:2019', 'hcl:#602927 eyr:1967 hgt:170cm', 'ecl:grn pid:012533040 byr:1946'],
		['hcl:dab227 iyr:2012', 'ecl:brn hgt:182cm pid:021572410 eyr:2020 byr:1992 cid:277'],
		['hgt:59cm ecl:zzz', 'eyr:2038 hcl:74454a iyr:2023', 'pid:3556412378 byr:2007']
	];

	const valid = [
		['pid:087499704 hgt:74in ecl:grn iyr:2012 eyr:2030 byr:1980', 'hcl:#623a2f'],
		['eyr:2029 ecl:blu cid:129 byr:1989', 'iyr:2014 pid:896056539 hcl:#a97842 hgt:165cm'],
		['hcl:#888785', 'hgt:164cm byr:2001 iyr:2015 cid:88', 'pid:545766238 ecl:hzl', 'eyr:2022'],
		['iyr:2010 hgt:158cm hcl:#b6652a ecl:blu byr:1944 eyr:2021 pid:093154719']
	];

	for (const invalidPassport of invalid) {
		t.is(solve(invalidPassport)[1], 0, "doesn't count invalid field values");
	}

	for (const validPassport of valid) {
		t.is(solve(validPassport)[1], 1, "doesn't count field values");
	}
});
import { IUniverse, findFleetForArtifact } from "../../lib/model/universe";
import { observable, ObservableMap, computed } from 'mobx';
import { IOrder, ITransferShipsOrder } from "../../lib/model/orders/order";
import { IWorld } from "../../lib/model/world";

let uniqueIndex = 1;

export class AppViewModel {

  @observable
  public universe: IUniverse | null = null;

  @observable
  public selectedWorldKey: number | null = null;

  @observable
  public selectedOrderKey: number | null = null;

  @observable
  private orders: ObservableMap<number, IOrder> = new ObservableMap();

  @computed
  public get selectedWorld() {
    if (this.universe) {
      const world = this.universe.worlds
        .find(w => w.key === this.selectedWorldKey);
      if (world) {
        return world;
      }
    }
    return null;
  }

  @computed
  public get selectedOrder(): IOrder | null {
    if (this.selectedOrderKey) {
      return this.orders.get(this.selectedOrderKey) as IOrder;
    }
    return null;
  }

  @computed
  public get allOrders(): IOrder[] {
    return Ar


edia_id"`
	CreatedAt string `json:"created_at"`
}

// 获取用户消息应该得到的响应
type WechatCustomerResponse struct {
	ErrCode                int        `json:"errcode"`
	ErrMsg                 string     `json:"errmsg"`
	CustomerList           []Customer `json:"customer_list"`
	InvalidExternalUserIDs []string   `json:"invalid_external_userid"`
}

type Customer struct {
	ExternalUserID string `json:"external_userid"`
	Nickname       string `json:"nickname"`
	Avatar         string `json:"avatar"`
	Gender         int    `json:"gender"`
	UnionID        string `json:"unionid"`
}

type UerInfoRequest struct {
	UserID         []string `json:"external_userid_list"`
	SessionContext int      `json:"need_enter_session_context"`
}

// chat status
type Status struct {
	ErrCode       int    `json:"errcode"`
	ErrMsg        string `json:"errmsg"`
	ServiceState  int    `json:"service_state"`
	ServiceUserId string `json:"servicer_userid"`
}

type HumanList struct {
	ErrCode      int            `json:"errcode"`
	ErrMsg       string         `json:"errmsg"`
	ServicerList []ServicerList `json:"servicer_list"`
}

type ServicerList struct {
	UserID string `json:"userid"`
	Status int    `json:"status"`
}

type TokenCache struct {
	AccessToken string
	TokenExpire time.Time
	Mutex       sync.Mutex
}

// Map-based token cache keyed by app credentials
var tokenCacheMap = make(map[string]*TokenCache)
var tokenCacheMapMutex = sync.Mutex{}

// Generate a key for the token cache based on app credentials
func getTokenCacheKey(kbID, secret string) string {
	return kbID + ":" + secret
}

type UserImageCache struct {
	ImageID     string
	ImagePath   string
	ImageExpire time.Time
	Mutex       sync.Mutex
}

var UImageCache = &UserImageCache{}

type DefaultImageCache struct {
	ImageID     string
	ImageExpire time.Time
	Mutex       sync.Mutex
}

var DImageCache = &DefaultImageCache{}
package main

import (
	"flag"
	"fmt"
	"net/http"
	"os"
	"strconv"
	"strings"
	"time"

	"github.com/gin-contrib/sessions"
	"github.com/gin-contrib/sessions/cookie"
	"github.com/gin-gonic/gin"

	"chaitin.cn/patronus/safeline-2/management/webserver/api"
	"chaitin.cn/patronus/safeline-2/management/webserver/cmd"
	"chaitin.cn/patronus/safeline-2/management/webserver/middleware"
	"chaitin.cn/patronus/safeline-2/management/webserver/model"
	"chaitin.cn/patronus/safeline-2/management/webserver/pkg/config"
	"chaitin.cn/patronus/safeline-2/management/webserver/pkg/constants"
	"chaitin.cn/patronus/safeline-2/management/webserver/pkg/cron"
	"chaitin.cn/patronus/safeline-2/management/webserver/pkg/database"
	"chaitin.cn/patronus/safeline-2/management/webserver/pkg/fvm"
	"chaitin.cn/patronus/safeline-2/management/webserver/pkg/log"
	"chaitin.cn/patronus/safeline-2/management/webserver/rpc"
)

var (
	logger = log.GetLogger("main")

	version    = "undefined"
	githash    = "undefined