lay_num_errors=True)
        # Need to check migrations here, so can't use the
        # requires_migrations_check attribute.
        self.check_migrations()
        now = datetime.now().strftime('%B %d, %Y - %X')
        self.stdout.write(now)
        self.stdout.write((
            "Django version %(version)s, using settings %(settings)r\n"
            "Starting development server at %(protocol)s://%(addr)s:%(port)s/\n"
            "Quit the server with %(quit_command)s.\n"
        ) % {
            "version": self.get_version(),
            "settings": settings.SETTINGS_MODULE,
            "protocol": self.protocol,
            "addr": '[%s]' % self.addr if self._raw_ipv6 else self.addr,
            "port": self.port,
            "quit_command": quit_command,
        })

        try:
            handler = self.get_handler(*args, **options)
            run(self.addr, int(self.port), handler,
                ipv6=self.use_ipv6, threading=threading, server_cls=self.server_cls)
        except socket.error as e:
            # Use helpful error messages instead of ugly tracebacks.
            ERRORS = {
                errno.EACCES: "You don't have permission to access that port.",
                errno.EADDRINUSE: "That port is already in use.",
                errno.EADDRNOTAVAIL: "That IP address can't be assigned to.",
            }
            try:
                error_text = ERRORS[e.errno]
            except KeyError:
                error_text = e
            self.stderr.write("Error: %s" % error_text)
            # Need to use an OS exit because sys.exit doesn't work in a thread
            os._exit(1)
        except KeyboardInterrupt:
            if shutdown_message:
                self.stdout.write(shutdown_message)
            sys.exit(0)

# Kept for backward compatibility
BaseRunserverCommand = Command


from termcolor import colored

board = list(range(1, 10))
winners = ((0, 1, 2,), (3, 4, 5), (6, 7, 8), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6))
moves = ((1, 3, 7, 9), (5,), (2, 4, 6, 8))

def print_board():
    j = 1
    for i in board:
        end = '  '
        if j % 3 == 0:
            end = '\n'
        if i == 'X':
            print(colored(f'[{i}]', 'red'), end=end)
        elif i == 'O':
            print(colored(f'[{i}]', 'blue'), end=end)
        else:
            print(f'[{i}]', end=end)
        j += 1

def make_move(brd, plyr, mve, undo=False):
    if can_move(brd, mve):
        brd[mve-1] = plyr
        win = is_winner(brd, plyr)
        if undo:
            brd[mve-1] = mve
        return True, win
    return False, False

def can_move(brd, mve):
    if mve in range(1, 10) and isinstance(brd[mve-1], int):
        return True
    return False

def is_winner(brd, plyr):
    win = True
    for tup in winners:
        win = True
        for j in tup:
            if brd[j] != plyr:
                win = False
                break
        if win:
            break
    return win

def has_empty_space():
    return board.count('X') + board.count('O') != 9

def computer_move():
    mv = -1
    # computer can win ?
    for i in range(1, 10):
        if make_move(board, computer, i, True)[1]:
            mv = i
            break

    # Player can win ?
    if mv == -1:
        for i in range(1, 10):
            if make_move(board, player, i, True)[1]:
                mv = i
                break

    # mov
    if mv == -1:
        for tup in moves:
            for i in tup:
                if can_move(board, i):
                    mv = i
                    break
            if mv != -1:
                break

    return make_move(board, computer, mv)

player, computer = 'X', 'O'
print('Player: [X]\nComputer: [O]\n')

while has_empty_space():
    print_board()
    move = int(input('Enter your move (1-9): '))
    moved, won = make_move(board, player, move)
    if not moved:
        print('Invalid number! Try again!')
        continue
    if won:
        print(colored('You are Won', 'green'))
        break
    elif computer_move()[1]:
        print(colored('You are lose!', 'yellow'))
        break

print_board()


nt DEBUGGEE_STOPATLINE = 57;

    // tested debuggee methods, fields and reference types
    static final int METH_NUM = 2;
    static final String DEBUGGEE_METHODS[][] = {
            {"dummyMeth", "nsk.jdi.ClassType.invokeMethod.invokemethod009tDummyType",
                    "Lnsk/jdi/ClassType/invokeMethod/invokemethod009tDummyType;" },
            {"finDummyMeth", "nsk.jdi.ClassType.invokeMethod.invokemethod009tFinDummyType",
                    "Lnsk/jdi/ClassType/invokeMethod/invokemethod009tFinDummyType;"}
    };

    static final int TIMEOUT_DELTA = 1000; // in milliseconds

    static final String COMMAND_READY = "ready";
    static final String COMMAND_GO = "go";
    static final String COMMAND_QUIT = "quit";

    private ArgumentHandler argHandler;
    private Log log;
    private IOPipe pipe;
    private Debugee debuggee;
    private VirtualMachine vm;
    private ThreadReference thrRef = null;
    private BreakpointRequest BPreq;
    private volatile int tot_res = Consts.TEST_PASSED;
    private volatile boolean gotEvent = false;

    public static void main (String argv[]) {
        System.exit(run(argv,System.out) + Consts.JCK_STATUS_BASE);
    }

    public static int run(String argv[], PrintStream out) {
        return new invokemethod009().runIt(argv, out);
    }

    private int runIt(String args[], PrintStream out) {
        argHandler = new ArgumentHandler(args);
        log = new Log(out, argHandler);
        Binder binder = new Binder(argHandler, log);
        String cmd;
        int num = 0;

        debuggee = binder.bindToDebugee(DEBUGGEE_CLASS);
        pipe = debuggee.createIOPipe();
        vm = debuggee.VM();
        debuggee.redirectStderr(log, "invokemethod009t.err> ");
        debuggee.resume();
        cmd = pipe.readln();
        if (!cmd.equals(COMMAND_READY)) {
            log.complain("TEST BUG: unknown debuggee command: " + cmd);
            tot_res = Consts.TEST_FAILED;
            return quitDebuggee();
        }

        if ((thrRef =
                debuggee.threadByName(DEBUGGEE_THRNAME)) == null) {
            log.complain("TEST FAILURE: Method Debugee.threadByName() returned null for debuggee thread "
                + DEBUGGEE_THRNAME);
            tot_res = Consts.TEST_FAILED;
            return quitDebuggee();
        }
        // debuggee main class
        ReferenceType rType = debuggee.classByName(DEBUGGEE_CLASS);

// Check the tested assersion
        try {
            suspendAtBP(rType, DEBUGGEE_STOPATLINE);
            ClassType clsType = (ClassType) rType;

            for (int i=0; i<METH_NUM; i++) {
                List<Method> methList = rType.methodsByName(DEBUGGEE_METHODS[i][0]);
                if (methList.isEmpty()) {
                    log.complain("TEST FAILURE: the expected debuggee method \""
                        + DEBUGGEE_METHODS[i][0]
                        + "\" not found through the JDI method ReferenceType.methodsByName()");
                    tot_res = Consts.TEST_FAILED;
                    continue;
                }
                Method meth = methList.get(0);
                LinkedList<Value> argList = new LinkedList<Value>();
                argList.add(MockReferenceType.createObjectReference(clsType.virtualMachine(),
                        DEBUGGEE_METHODS[i][2], DEBUGGEE_METHODS[i][1]));

                try {
                    log.display("\n" + (i+


, CFrame.new(-1.2, 0.5, -0.5) * CFrame.Angles(math.rad(80), math.rad(0), math.rad(40)), 0.5)
      lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(6), math.rad(10), math.rad(-15)), 0.5)
      rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(-10), math.rad(-10), math.rad(20)), 0.5)
      cor2.Weld.C0 = Lerp(cor2.Weld.C0, CFrame.new(2.4, -1.2, -2.2) * CFrame.Angles(math.rad(-68), math.rad(-120), math.rad(45)), 1)
      if Debounces.on == false then
        break
      end
      rs:wait()
    end
    Debounces.Slashing = false
    Debounces.NoIdl = false
    Debounces.on = false
    z:Destroy()
    z1:Destroy()
    z2:Destroy()
    wait()
    if Debounces.CanAttack == false then
      Debounces.CanAttack = true
    end
  end
end)
cor2.Touched:connect(function(ht)
  hit = ht.Parent
  if ht and hit:IsA("Model") then
    if hit:FindFirstChild("Humanoid") and hit:FindFirstChild("Armed") ~= nil and hit.Name ~= p.Name and Debounces.Slashing == true and Debounces.Slashed == false then
      Debounces.Slashed = true
      hit:FindFirstChild("Humanoid"):TakeDamage(math.random(15, 25))
      wait(1)
      Debounces.Slashed = false
    end
  elseif ht and hit:IsA("Hat") and hit.Parent.Name ~= p.Name and hit.Parent:FindFirstChild("Humanoid") and hit:FindFirstChild("Armed") ~= nil and Debounces.Slashing == true and Debounces.Slashed == false then
    Debounces.Slashed = true
    hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(15, 25))
    wait(1)
    Debounces.Slashed = false
  end
end)
mouse.KeyDown:connect(function(key)
  if key == "y" and Debounces.CanAttack == true then
    Debounces.CanAttack = false
    Debounces.NoIdl = true
    char.Humanoid.WalkSpeed = 0.01
    Debounces.on = true
    for i = 1, 20 do
      larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(-12), 0, math.rad(-12)), 0.3)
      rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(90)), 0.3)
      lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-6)), 0.3)
      rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, math.rad(6)), 0.3)
      hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-


{
					0.6,
					0.9
				},
				recoil = {
					0.25,
					0.3
				},
				mode = {
					0,
					3,
					3,
					1
				}
			},
			{
				dmg_mul = 4.75,
				r = 500,
				acc = {
					0.4,
					0.9
				},
				recoil = {
					0.25,
					0.3
				},
				mode = {
					0,
					3,
					8,
					1
				}
			},
			{
				dmg_mul = 4.5,
				r = 1000,
				acc = {
					0.2,
					0.8
				},
				recoil = {
					0.35,
					0.55
				},
				mode = {
					0,
					2,
					5,
					1
				}
			},
			{
				dmg_mul = 4,
				r = 2000,
				acc = {
					0.2,
					0.5
				},
				recoil = {
					0.4,
					0.7
				},
				mode = {
					3,
					2,
					5,
					1
				}
			},
			{
				dmg_mul = 4,
				r = 3000,
				acc = {
					0.01,
					0.35
				},
				recoil = {
					0.7,
					1.1
				},
				mode = {
					3,
					1,
					5,
					0.5
				}
			},
			{
				dmg_mul = 3,
				r = 6000,
				acc = {
					0.01,
					0.35
				},
				recoil = {
					1,
					2
				},
				mode = {
					3,
					1,
					1,
					0
				}
			}
		}
	}
	presets.weapon.easywish.is_bullpup = presets.weapon.easywish.is_rifle
	presets.weapon.easywish.is_shotgun_pump = {
		aim_delay = {
			0,
			0
		},
		focus_delay = 0,
		focus_dis = 200,
		spread = 15,
		miss_dis = 20,
		RELOAD_SPEED = 1.4,
		melee_speed = 1,
		melee_dmg = 20,
		melee_retry_delay = presets.weapon.expert.is_shotgun_pump.melee_retry_delay,
		range = {
			optimal = 3000,
			far = 5000,
			close = 2000
		},
		FALLOFF = {
			{
				dmg_mul = 5.5,
				r = 100,
				acc = {
					0.6,
					0.9
				},
				recoil = {
					1,
					1.1
				},
				mode = {
					1,
					0,
					0,
					0
				}
			},
			{
				dmg_mul = 4.75,
				r = 500,
				acc = {
					0.4,
					0.95
				},
				recoil = {
					1,
					1.25
				},
				mode = {
					1,
					0,
					0,
					0
				}
			},
			{
				dmg_mul = 4,
				r = 1000,
				acc = {
					0.2,
					0.75
				},
				recoil = {
					1,
					1.5
				},
				mode = {
					1,
					0,
					0,
					0
				}
			},
			{
				dmg_mul = 4,
				r = 2000,
				acc = {
					0.2,
					0.75
				},
				recoil = {
					1.25,
					1.5
				},
				mo


എന്നും അവര് പറയുന്നു. സമിഅ്നാ വഅത്വഅ്നാ (ഞങ്ങള് കേള്‍ക്കുകയും അനുസരിക്കുകയും ചെയ്തിരിക്കുന്നു) എന്നും ഇസ്മഅ് (കേള്‍ക്കണേ) എന്നും ഉന്‍ളുര്‍നാ (ഞങ്ങളെ ഗൌനിക്കണേ) എന്നും അവര് പറഞ്ഞിരുന്നെങ്കില് അതവര്‍ക്ക് കൂടുതല് ഉത്തമവും വക്രതയില്ലാത്തതും ആകുമായിരുന്നു. പക്ഷെ അല്ലാഹു അവരുടെ നിഷേധം കാരണമായി അവരെ ശപിച്ചിരിക്കുന്നു. അതിനാല് അവര് വിശ്വസിക്കുകയില്ല; ചുരുക്കത്തിലല്ലാതെ."
  },
  {
    "surah_number": 4,
    "verse_number": 47,
    "content":
        "ഹേ; വേദഗ്രന്ഥം നല്‍കപ്പെട്ടവരേ, നിങ്ങളുടെ പക്കലുള്ള വേദത്തെ സത്യപ്പെടുത്തിക്കൊണ്ട് നാം അവതരിപ്പിച്ചതില് നിങ്ങള് വിശ്വസിക്കുവിന്. നാം ചില മുഖങ്ങള് തുടച്ചുനീക്കിയിട്ട് അവയെ പിന്‍വശങ്ങളിലേക്ക് മാറ്റുന്നതിന് മുമ്പായി, അല്ലെങ്കില് ശബ്ബത്തിന്‍റെ ആള്‍ക്കാരെ നാം ശപിച്ചത് പോലെ ന�


erty.Resist_Energy] += value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Heat] += value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Matter] += value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Spirit] += value;

            GamePlayer player = effect.Owner as GamePlayer;
            if (player != null)
            {
                player.Out.SendCharStatsUpdate();
                player.UpdatePlayerStatus();
                player.Out.SendCharResistsUpdate();
            }
        }

        public override int OnEffectExpires(GameSpellEffect effect, bool noMessages)
        {
            int value = (int)m_spell.Value;

            effect.Owner.AbilityBonus[(int)eProperty.Resist_Body] -= value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Cold] -= value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Energy] -= value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Heat] -= value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Matter] -= value;
            effect.Owner.AbilityBonus[(int)eProperty.Resist_Spirit] -= value;

            GamePlayer player = effect.Owner as GamePlayer;
            if (player != null)
            {
                player.Out.SendCharStatsUpdate();
                player.UpdatePlayerStatus();
                player.Out.SendCharResistsUpdate();
            }

            return 0;
        }

        public FuryHandler(GameLiving caster, Spell spell, SpellLine line) : base(caster, spell, line) { }
    }
}


, approachDist, dashDist, Odds_Guard, AttID, AttDist)
    GetWellSpace_Odds = 100
    return GetWellSpace_Odds
end

Att3000_Dist_min = Att13004_Dist_max
function Kaeruei341000_Act08(ai, goal, paramTbl)
    local approachDist = Att13004_Dist_max
    local dashDist = Att13004_Dist_max + 2
    local Odds_Guard = 0
    local AttID = 3004
    local AttDist = DIST_Middle
    Approach_and_Attack_Act(ai, goal, approachDist, dashDist, Odds_Guard, AttID, AttDist)
    GetWellSpace_Odds = 0
    return GetWellSpace_Odds
end

function Kaeruei341000_Act09(ai, goal, paramTbl)
    local approachDist = 8
    local dashDist = 10
    local Odds_Guard = 0
    Approach_Act(ai, goal, approachDist, dashDist, Odds_Guard)
    goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, -1, AI_DIR_TYPE_F, 4)
    GetWellSpace_Odds = 0
    return GetWellSpace_Odds
end

function Kaeruei341000_Act10(ai, goal, paramTbl)
    local approachDist = 10
    local dashDist = 12
    local Odds_Guard = 0
    Approach_Act(ai, goal,


_BOT_WOLFRAMALPHA_APPID environment variable".to_string()
                 });
}

enum Commands {
    WA = 0,
}

fn parse_bool<'de, D>(d: D) -> Result<bool, D::Error>
    where D: Deserializer<'de>
{
    use serde::de::Error;

    let s = String::deserialize(d)?;
    match &s[..] {
        "true" => Ok(true),
        "false" => Ok(false),
        other => Err(D::Error::custom(format!(
            "got {}, but expected `true` or `false`",
            other
        ))),
    }
}

#[derive(Deserialize)]
#[serde(rename = "queryresult")]
struct QueryResult {
    #[serde(deserialize_with = "parse_bool")]
    success: bool,
    #[serde(deserialize_with = "parse_bool")]
    error: bool,

    #[serde(rename = "pod", default)]
    pods: Vec<Pod>,

    #[serde(rename = "didyoumeans")]
    did_you_means: Option<DidYouMeans>,
}

#[derive(Deserialize)]
#[serde(rename = "pod")]
struct Pod {
    title: String,

    #[serde(rename = "subpod", default)]
    subpods: Vec<SubPod>,
}

#[derive(Deserialize)]
#[serde(rename = "subpod")]
struct SubPod {
    #[serde(rename = "img")]
    image: Option<Img>,
    plaintext: Option<String>,
}

#[derive(Deserialize)]
#[serde(rename = "img")]
struct Img {
    src: String,
}

#[derive(Deserialize)]
#[serde(rename = "didyoumeans")]
struct DidYouMeans {
    #[serde(rename = "didyoumean", default)]
    did_you_means: Vec<DidYouMean>,
}

#[derive(Deserialize)]
#[serde(rename = "didyoumean")]
struct DidYouMean {
    #[serde(rename = "$value")]
    contents: String,
}

impl<'a> module::Module for Module<'a> {
    fn new() -> Result<Box<module::Module>, String> {
        static WA: [&'static str; 2] = ["wolphramalpha", "wa"];
        let mut map: HashMap<u32, &[&str]> = HashMap::new();
        map.insert(Commands::WA as u32, &WA);
        WOLFRAMALPHA_CLIENT_ID.as_ref()
                              .map_err(|s| s.clone())
                              .and(Ok(Box::new(Module { commands: map })))
    }

    fn name(&self) -> &'static str {
        "Wolfram!Alpha"
    }

    fn description(&self) -> &'static str {
        "A command for querying the Wolfram!Alpha service."
    }

    fn commands(&self) -> &HashMap<u32, &[&str]> {
        &self.commands
    }

    fn command_description(&self, _: u32) -> &'static str {
        "Queries the Wolfram!Alpha service."
    }

    fn command_help_message(&self, _: u32) -> &'static str {
        "`!wa <input>` - Queries Wolfram!Alpha with the given input and returns the result. For example, `!wa int sin x / x dx, 0 < x < +inf`."
    }

    fn handle(&self, bot: &Bot, message: &Message, _id: u32, text: &str) {
        if text.is_empty() {
            bot.send(message.channel_id,
                     self.command_help_message(Commands::WA as u32));
            return;
        }

        bot.broadcast_typing(message.channel_id); // This command takes a few seconds to process.

        if let Err(err) = self.handle_wa(bot, message, text) {
            let mut buf = format!("{}", err);

            for cause in err.iter_causes() {
                buf.push_str(&format!("\nCaused by: {}", cause));
            }

            bot.send(message.channel_id, &buf);
        }
    }
}

impl<'a> Module<'a> {
    fn handle_wa(&self, bot: &Bot, message: &Message, text: &str) -> Result<(), failure::Error> {


* @param  {store} store
     */
    export function add(id: string, name: string, store: store): OK | ERR_NAME_EXISTS | ERR_NOT_FOUND {
        if (!name) return ERR_NOT_FOUND;
        let lock = get(id);
        let lockDetail = lock.detail;
        if (lockDetail[name]) {
            return ERR_NAME_EXISTS;
        } else {
            lockDetail[name] = store;
            lock.total = Helper.storeAdd(lock.total, store);
            return OK;
        }
    }
    /**
     * 给对象添加匿名锁，不做控制，会返回随机生成的锁名称
     * @param  {string} id
     * @param  {store} store
     */
    export function addAnonymous(id: string, store: store): string {
        let lock = get(id);
        let lockDetail = lock.detail;
        let iterator = 1;
        let baseName = Game.time.toString();
        let newName = baseName+'_'+iterator.toString();
        while(lockDetail[newName]){
            iterator += 1;
            newName = baseName+'_'+iterator.toString();
        }
        lockDetail[newName] = store;
        lock.total = Helper.storeAdd(lock.total, store);
        return newName;
    }
    /**
     * 释放对象的锁，如果锁不存在则返回ERR_NOT_FOUND
     * @param  {string} id
     * @param  {string} name
     */
    export function release(id: string, name: string):OK|ERR_NOT_FOUND{
        let lock = get(id);
        let lockDetail = lock.detail;
        if (!lockDetail[name]){
            return ERR_NOT_FOUND;
        }
        lock.total = Helper.storeMinus(lock.total, lockDetail[name]);
        delete lockDetail[name];
        return OK;
    }
}import post from "../fetch/post";
import get from "../fetch/get";
import AES from "../encryption/AES";
import RSA from "../encryption/RSA";
import SecureStore from "./SecureStore";
import { EncryptedKeycardType, KeycardType } from "@wault/typings";
import Secret from "@lib/encryption/Secret";

export default class Safe {
    public static async getAll(force: boolean = false): Promise<KeycardType[]> {
        type ResponseType = {
            keycards: EncryptedKeycardType[];
        };

        const loadLocal = async () => {
            return await SecureStore.getItemAsync("stored_keycards_data");
        };

        const saveLocal = async (data: string) => {
            return await SecureStore.setItemAsync("stored_keycards_data", data);
        };

        const stored = await loadLocal();

        const decryptKeycards = async (keycards: EncryptedKeycardType[]) => await Promise.all(
            keycards.map(
                async (keycard) => await this.decrypt(keycard),
            )
        );

        if(!stored || force) {
            // query the keycard data from the server
            const resp = await get<ResponseType>("/safe");

            // store the data from the server insider secure store
            await saveLocal(JSON.stringify(resp));

            // decrypt all keycard with their corresponding decryption key
            return await decryptKeycards(resp.keycards);
        } else {
            const { keycards } = JSON.parse(stored);

            return await decryptKeycards(


AL, since = "1.6.0")
fun <T1, T2, T3, T4, T5, T6, T7, R> combine(
    a1: Arbitrary<T1>,
    a2: Arbitrary<T2>,
    a3: Arbitrary<T3>,
    a4: Arbitrary<T4>,
    a5: Arbitrary<T5>,
    a6: Arbitrary<T6>,
    a7: Arbitrary<T7>,
    filter: ((v1: T1, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7) -> Boolean)? = null,
    combinator: (v1: T1, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7) -> R
): Arbitrary<R> = if (filter == null) {
    Combinators.combine(a1, a2, a3, a4, a5, a6, a7).`as`(combinator)
} else {
    Combinators.combine(a1, a2, a3, a4, a5, a6, a7).filter(filter).`as`(combinator)
}

/**
 * Combine 8 arbitraries into one.
 *
 * @return new Arbitrary instance
 */
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun <T1, T2, T3, T4, T5, T6, T7, T8, R> combine(
    a1: Arbitrary<T1>,
    a2: Arbitrary<T2>,
    a3: Arbitrary<T3>,
    a4: Arbitrary<T4>,
    a5: Arbitrary<T5>,
    a6: Arbitrary<T6>,
    a7: Arbitrary<T7>,
    a8: Arbitrary<T8>,
    filter: ((v1: T1, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7, v8: T8) -> Boolean)? = null,
    combinator: (v1: T1, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7, v8: T8) -> R
): Arbitrary<R> = if (filter == null) {
    Combinators.combine(a1, a2, a3, a4, a5, a6, a7, a8).`as`(combinator)
} else {
    Combinators.combine(a1, a2, a3, a4, a5, a6, a7, a8).filter(filter).`as`(combinator)
}

/**
 * Combine list of arbitraries into one.
 *
 * @return new Arbitrary instance
 */
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun <T, R> combine(
    arbitraries: List<Arbitrary<T>>,
    filter: ((v1: List<T>) -> Boolean)? = null,
    combinator: (v1: List<T>) -> R
): Arbitrary<R> = if (filter == null) {
    Combinators.combine(arbitraries).`as`(combinator)
} else {
    Combinators.combine(arbitraries).filter(filter).`as`(combinator)
}

/**
 * Flat-combine 2 arbitraries into one.
 *
 * @return new Arbitrary instance
 */
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun <T1, T2, R> flatCombine(
    a1: Arbitrary<T1>,
    a2: Arbitrary<T2>,
    flatCombinator: (v1: T1, v2: T2) -> Arbitrary<R>
): Arbitrary<R> =
    Combinators.combine(a1, a2).


lee") then
		local bind = "+use/+attack"
		if PLUGIN.GetKeyIsBound("+tacrp_melee") then
			bind = PLUGIN.GetBindKey("+tacrp_melee")
		elseif self:DoOldSchoolScopeBehavior() then
			bind = "+attack2"
		end
		self.CachedCapabilities[bind] = { so = 30, str = "Quick Melee" }
	end

	if self:GetValue("CanToggle") and PLUGIN.ConVars["toggletactical"]:GetBool() then
		if PLUGIN.ConVars["flashlight_alt"]:GetBool() then
			self.CachedCapabilities["+walk/impulse 100"] = {
				so = 31,
				str = "Toggle " ..
					(self:GetValue("TacticalName") or "Tactical")
			}
			self.CachedCapabilities["impulse 100"] = { so = 32, str = "Suit Flashlight" }
		else
			self.CachedCapabilities["impulse 100"] = {
				so = 31,
				str = "Toggle " ..
					(self:GetValue("TacticalName") or "Tactical")
			}
			self.CachedCapabilities["+walk/impulse 100"] = { so = 32, str = "Suit Flashlight" }
		end
	end

	-- blindfire / quickthrow
	if self:GetValue("CanBlindFire") and self:GetScopeLevel() == 0 and not self:GetSafe() then
		if PLUGIN.ConVars["blindfiremenu"]:GetBool() then
			self.CachedCapabilities["+zoom"] = { so = 39, str = "Blindfire Menu" }
		else
			if self:GetOwner():KeyDown(IN_ZOOM) then
				self.CachedCapabilities = {}
				self.CachedCapabilities["+zoom/+forward"] = { so = 39, str = "Blindfire Up" }
				self.CachedCapabilities["+zoom/+moveleft"] = { so = 39.1, str = "Blindfire Left" }
				self.CachedCapabilities["+zoom/+moveright"] = { so = 39.2, str = "Blindfire Right" }
				self.CachedCapabilities["+zoom/+back"] = { so = 39.3, str = "Blindfire Cancel" }
				if not PLUGIN.ConVars["idunwannadie"]:GetBool() then
					self.CachedCapabilities["+zoom/+speed/+walk"] = { so = 39.4, str = "Suicide" }
				end
				return self.CachedCapabilities
			else
				self.CachedCapabilities["+zoom"] = { so = 39, str = "Blindfire" }
			end
		end
	end

	if self:GetValue("CanQuickNade") then
		local bound1, bound2 = PLUGIN.GetKeyIsBound("+grenade1"), PLUGIN.GetKeyIsBound("+grenade2")
		if bound1 then
			self.CachedCapabilities["+grenade1"] = { so = 35, str = "Quickthrow" }
		end
		if bound2 then
			if PLUGIN.ConVars["nademenu"]:GetBool() then
				if PLUGIN.ConVars["nademenu_click"]:GetBool() and self.GrenadeMenuAlpha == 1 then
					self.CachedCapabilities = {}
					self.CachedCapabilities["+grenade2"] = { so = 36, str = "Prepare Grenade" }
					self.CachedCapabilities["+grenade2/+attack"] = { so = 36.1, str = "Throw Overhand" }
					self.CachedCapabilities["+grenade2/+attack2"] = { so = 36.2, str = "Throw Underhand" }
					if PLUGIN.AreTheGrenadeAnimsReadyYet then
						self.CachedCapabilities["+grenade2/MOUSE3"] = { so = 36.3, str = "


string.
    '''

    pass

def smpte_from_seconds(time: typing.Optional[typing.Union[int, float]],
                       *,
                       fps=None,
                       fps_base=None) -> str:
    ''' Returns an SMPTE formatted string from the *time*: ``HH:MM:SS:FF``. If *fps* and *fps_base* are not given the current scene is used.

    :param time: time in seconds.
    :type time: typing.Optional[typing.Union[int, float]]
    :rtype: str
    :return: the frame string.
    '''

    pass

def time_from_frame(frame, fps, fps_base):
    '''

    '''

    pass

def time_to_frame(time, fps, fps_base):
    '''

    '''

    pass

def unescape_identifier(string: typing.Optional[str]) -> str:
    ''' Simple string un-escape function used for animation paths. This performs the reverse of `escape_identifier`.

    :param string: text
    :type string: typing.Optional[str]
    :rtype: str
    :return: The un-escaped string.
    '''

    pass

def unregister_class(cls):
    ''' Unload the Python class from blender. If the class has an *unregister* class method it will be called before unregistering.

    '''

    pass

def unregister_manual_map(manual_hook):
    '''

    '''

    pass

def unregister_tool(tool_cls):
    '''

    '''

    pass

def user_resource(resource_type,
                  *,
                  path: typing.Optional[str] = '',
                  create: typing.Optional[bool] = False) -> str:
    ''' Return a user resource path (normally from the users home directory).

    :param type: Resource type in ['DATAFILES', 'CONFIG', 'SCRIPTS', 'AUTOSAVE'].
    :type type: typing.Optional[str]
    :param path: Optional subdirectory.
    :type path: typing.Optional[str]
    :param create: Treat the path as a directory and create it if its not existing.
    :type create: typing.Optional[bool]
    :rtype: str
    :return: a path.
    '''

    pass


ds r0, r6, #0
	movs r1, #0
	bl sub_0803DFAC
	strb r0, [r5]
	b _080AC014
	.align 2, 0
_080ABFF8: .4byte gUnk_03000510
_080ABFFC: .4byte 0x20000043
_080AC000: .4byte 0x0000FD80
_080AC004: .4byte gKirbys
_080AC008: .4byte gUnk_0203AD3C
_080AC00C: .4byte 0x0000030A
_080AC010:
	mov r1, r8
	strb r1, [r5]
_080AC014:
	ldr r1, _080AC08C @ =gKirbys
	ldr r0, _080AC090 @ =gUnk_0203AD3C
	ldrb r2, [r0]
	movs r0, #0xd4
	lsls r0, r0, #1
	muls r0, r2, r0
	adds r0, r0, r1
	adds r0, #0x60
	adds r1, r4, #0
	adds r1, #0x60
	ldrh r0, [r0]
	ldrh r1, [r1]
	cmp r0, r1
	bne _080AC080
	ldrb r0, [r4]
	cmp r0, #0
	bne _080AC040
	adds r0, r4, #0
	adds r0, #0x56
	ldrb r0, [r0]
	cmp r0, r2
	bne _080AC080
_080AC040:
	ldr r1, _080AC094 @ =gUnk_08D60FA4
	ldr r4, _080AC098 @ =gSongTable
	ldr r2, _080AC09C @ =0x00000A84
	adds r0, r4, r2
	ldrh r3, [r0]
	lsls r0, r3, #2
	adds r0, r0, r1
	ldr r2, [r0]
	ldr r0, [r2, #4]
	cmp r0, #0
	blt _080AC066
	movs r1, #0xa8
	lsls r1, r1, #4
	adds r0, r4, r1
	ldr r1, [r0]
	ldrb r0, [r2, #9]
	ldrb r1, [r1, #2]
	cmp r0, r1
	bhi _080AC080
_080AC066:
	cmp r3, #0
	beq _080AC078
	ldr r0, _080AC0A0 @ =gUnk_0203AD10
	ldr r0, [r0]
	movs r1, #0x80
	lsls r1, r1, #1
	ands r0, r1
	cmp r0, #0
	bne _080AC080
_080AC078:
	movs r0, #0xa8
	lsls r0, r0, #1
	bl m4aSongNumStart
_080AC080:
	add sp, #8
	pop {r3}
	mov r8, r3
	pop {r4, r5, r6, r7}
	pop {r0}
	bx r0
	.align 2, 0
_080AC08C: .4byte gKirbys
_080AC090: .4byte gUnk_0203AD3C
_080AC094: .4byte gUnk_08D60FA4
_080AC098: .4byte gSongTable
_080AC09C: .4byte 0x00000A84
_080AC0A0: .4byte gUnk_0203AD10

	thumb_


 9+fontheight, mouse_index, 1 );
		x_o+=1.6;
	}

	if(!playing){
		lcd_main.message("paintrect", 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1), 9+fontheight,menudarkest );
		lcd_main.message("frgb" , menudark);
	}else if(usermouse.clicked2d == mouse_index){
		lcd_main.message("paintrect", 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1), 9+fontheight,menucolour );
		lcd_main.message("frgb", 0,0,0);
	}else{
		lcd_main.message("paintrect", 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1), 9+fontheight,menudarkest );
		lcd_main.message("frgb" , menucolour);
	}
	lcd_main.message("moveto", 9+fontheight*(x_o+0.15), 9+fontheight*0.5);
	lcd_main.message("write", "re");
	lcd_main.message("moveto", 9 + fontheight*(x_o+0.15), 9+fontheight*0.75);
	lcd_main.message("write", "sync");

	// only need to draw resync if you're playing
	click_zone(resync_button, null, null, 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1), 9+fontheight, mouse_index, 1 );
	x_o+=1.1;

	if(usermouse.clicked2d == mouse_index){
		lcd_main.message("paintrect", 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1), 9+fontheight,20,255,20 );
		lcd_main.message("frgb", 0,0,0);
	}else{
		lcd_main.message("paintrect", 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1), 9+fontheight,menudarkest );
		lcd_main.message("frgb", menucolour);
	}
	lcd_main.message("moveto", 9 + fontheight*(x_o+0.2), 9+fontheight*0.5);
	lcd_main.message("write", "all");
	lcd_main.message("moveto", 9 + fontheight*(x_o+0.2), 9+fontheight*0.75);
	lcd_main.message("write", "off");
	click_zone(panic_button, null,null, 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1), 9+fontheight, mouse_index, 1 );
	x_o+=1.1;
	if((loading.progress==0)&&(sidebar.mode != "file_menu")){
		if(view_changed===true) click_rectangle( 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1.3), 9+fontheight,mouse_index,1 );
		mouse_click_actions[mouse_index] = set_display_mode;
		mouse_click_parameters[mouse_index] = "panels";
		if((displaymode == "panels")||(usermouse.clicked2d==mouse_index)){
			lcd_main.message("paintrect", 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1.3), 9+fontheight,menucolour );
			lcd_main.message("frgb", 0,0,0);
		}else if(displaymode == "panels_edit"){
			lcd_main.message("paintrect", 9 + fontheight*x_o, 9, 9+fontheight*(x_o+1.3), 9+fontheight,menucolour );


     anim:dist_param(anim:fixed_dist(0.0), anim:uniform_dist(1.0, 1.5)))
  anim:set_particle_duration_dist(anim:fixed_dist(0.75))
  anim:set_particle_frame_time_offset_dist(anim:uniform_dist(0.0, 0.8))
  anim:set_color(anim:param(1.0), anim:param(0.0), anim:param(0.0))
  anim:set_draw_above_entities()
  surface:add_anim(anim)

  local below = parent:create_anim("particles/circle16")
  below:set_draw_below_entities()
  below:set_position(below:param(-0.5), below:param(-0.5))
  below:set_particle_size_dist(below:fixed_dist(2.0), below:fixed_dist(2.0))
  below:set_color(below:param(1.0), below:param(0.0), below:param(0.0), below:param(0.2))
  surface:add_anim(below)

  surface:apply()
  ability:activate(parent)

  apply_damage(parent, ability, targets)
end

function apply_damage(parent, ability, targets)
  game:play_sfx("sfx/pestilence")

  local stats = parent:stats()
  local amount = 5 + stats.caster_level + stats.intellect_bonus / 2

  local targets = targets:to_table()
  for i = 1, #targets do
	targets[i]:take_damage(parent, amount, amount, "Raw")
  end
end


params[1]) return this._appendError(`You must specify a sidechain.`);
  }

  async _handleInventoryRequest (params) {
    this._appendMessage(`{bold}Inventory:{/bold} ${JSON.stringify(this.documents, null, '  ')}`);
  }

  async _handleImportCommand (params) {
    if (!params[1]) return this._appendError(`You must provide a file to import.`);
    if (!fs.existsSync(params[1])) return this._appendError(`File does not exist: ${params[1]}`);
    const content = fs.readFileSync(params[1]);
    const actor = new Actor(content);
    this._appendMessage(`File contents (${content.length} bytes):\n---${content}\n---\nDocument ID: ${actor.id}`);
    this.documents[actor.id] = content;
    this._state.content.documents[actor.id] = content.toString('hex');
  }

  async _handlePublishCommand (params) {
    if (!params[1]) return this._appendError(`You must specify the file to publish.`);
    if (!params[2]) return this._appendError(`You must specify the rate to pay.`);
    if (!this.documents[params[1]]) return this._appendError(`This file does not exist in the local library.`);
    const message = Message.fromVector(['DocumentPublish', {
      id: params[1],
      content: this.documents[params[1]],
      reward: params[2]
    }]);
    this.node.broadcast(message);
  }

  async _handleRequestCommand (params) {
    if (!params[1]) return this._appendError(`You must specify the file to request.`);
    if (!params[2]) return this._appendError(`You must specify the rate to pay.`);
    const message = Message.fromVector(['DocumentRequest', {
      document: params[1]
    }]);
    this.node.broadcast(message);
  }

  async _handleBitcoinMessage (message) {
    switch (message['@type']) {
      case 'Snapshot':
        break;
      default:
        this._appendMessage(`Bitcoin service emitted message: ${JSON.stringify(message)}`);
        break;
    }
  }

  async _handleBitcoinLog (log) {
    this._appendMessage(`[SERVICES:BITCOIN] ${log}`);
  }

  async _handleBitcoinCommit (commit) {
    // this._appendMessage(`Bitcoin service emitted commit: ${JSON.stringify(commit)}`);
  }

  async _handleBitcoinSync (sync) {
    this._appendMessage(`Bitcoin service emitted sync: ${JSON.stringify(sync)}`);
    this._state.content.bitcoin.best = sync.best;
    this.commit();
  }

  async _handleBitcoinBlock (block) {
    // this._appendMessage(`Bitcoin service emitted block ${JSON.stringify(block)}, chain height now: ${this.bitcoin.height}`);
    // await this.bitcoin._syncChainInfoOverRPC();
    this._syncChainDisplay();
    // const message = Message.fromVector(['BlockCandidate', block.raw]);
    // this.node.relayFrom(this.node.id, message);
  }

  async _handleBitcoinTransaction (transaction) {
    this._appendMessage(`Bitcoin service emitted transaction: ${JSON.stringify(transaction)}`);
  }

  async _handleBitcoinDebug (...msg) {
    this._appendDebug(msg);
  }

  async _handleBitcoinError (...msg) {
    this._appendError(msg);
  }

  async _handleBitcoinWarning (...msg) {
    this._appendWarning(msg);
  }

  async _handleBitcoinReady (bitcoin) {
    this._appendMessage(`Bitcoin ready: ${JSON.stringify(bitcoin)}`);
    this._syncChainDisplay();
  }

  async _handleConnectionOpen (msg) {
    this._


, MEM[(v16qu *)TK_3(D) + 32B]
.LVL722:
	veor	q6, q7, q14	@ tmp499,, tmp474
	vldr	d14, [sp, #96]	@, %sfp
	vldr	d15, [sp, #104]	@, %sfp
	vstr	d12, [r3, #48]	@, MEM[(v16qu *)TK_3(D) + 48B]
	vstr	d13, [r3, #56]	@, MEM[(v16qu *)TK_3(D) + 48B]
.LVL723:
	veor	q6, q7, q12	@ tmp502,, tmp478
	vldr	d14, [sp, #128]	@, %sfp
	vldr	d15, [sp, #136]	@, %sfp
	vstr	d12, [r3, #64]	@, MEM[(v16qu *)TK_3(D) + 64B]
	vstr	d13, [r3, #72]	@, MEM[(v16qu *)TK_3(D) + 64B]
.LVL724:
	veor	q6, q7, q10	@ tmp505,, tmp482
	vldr	d14, [sp, #144]	@, %sfp
	vldr	d15, [sp, #152]	@, %sfp
	vstr	d12, [r3, #80]	@, MEM[(v16qu *)TK_3(D) + 80B]
	vstr	d13, [r3, #88]	@, MEM[(v16qu *)TK_3(D) + 80B]
.LVL725:
	veor	q6, q7, q5	@ tmp511,, tmp486
	vldmia	sp, {d14-d15}	@ %sfp,
	vstr	d12, [r3, #112]	@, MEM[(v16qu *)TK_3(D) + 112B]
	vstr	d13, [r3, #120]	@, MEM[(v16qu *)TK_3(D) + 112B]
.LVL726:
	.loc 3 239 0
	vshl.i8	q5, q5, #1	@ tmp610, tmp486,
	.loc 3 237 0
	veor	q6, q7, q0	@ tmp514,, tmp464
	vldr	d14, [sp, #16]	@, %sfp
	vldr	d15, [sp, #24]	@, %sfp
	vstr	d12, [r3, #128]	@, MEM[(v16qu *)TK_3(D) + 128B]
	vstr	d13, [r3, #136]	@, MEM[(v16qu *)TK_3(D) + 128B]
.LVL727:
	veor	q6, q7, q2	@ tmp517,, tmp468
	vldr	d14, [sp, #48]	@, %sfp
	vldr	d15, [sp, #56]	@, %sfp
	vstr	d12, [r3, #144]	@, MEM[(v16qu *)TK_3(D) + 144B]
	vstr	d13, [r3, #152]	@, MEM[(v16qu *)TK_3(D) + 144B]
.LVL728:
	veor	q6, q7, q15	@ tmp520,, tmp472
	vldr	d14, [sp, #80]	@, %sfp
	vldr	d15, [sp, #88]	@, %sfp
	vstr	d12, [r3, #160]	@, MEM[(v16qu *)TK_3(D) + 160B]
	vstr	d13, [r3, #168]	@, MEM[(v16qu *)TK_3(D) + 160B]
.LVL729:
	veor	q6, q7, q13	@ tmp523,,


[i].CurrentNum > result[j].CurrentNum
		}

		return result[i].Description < result[j].Description
	})

	return result
}

func (pm *jobProgress) GetJobID() string {
	return pm.jobID
}

func (pm *jobProgress) Close() {
	pm.cancel()
}

func (pm *jobProgress) SetAllPaused(paused bool) {
	pm.mu.Lock()
	defer pm.mu.Unlock()

	for _, progress := range pm.activeProgress {
		if progress.GetType() == ProgressTypePar2Generation {
			// par2 generation can not be paused
			continue
		}

		progress.SetPaused(paused)
	}
}

type progress struct {
	id        uuid.UUID
	name      string
	pType     ProgressType
	total     int64
	startTime time.Time
	progress  *progressbar.ProgressBar
	paused    bool
	mu        sync.RWMutex
}

func (p *progress) UpdateProgress(processed int64) {
	if p.progress.IsFinished() {
		return
	}

	_ = p.progress.Add64(processed)
}

func (p *progress) Finish() {
	_ = p.progress.Finish()
	_ = p.progress.Close()
}

func (p *progress) GetID() uuid.UUID {
	return p.id
}

func (p *progress) GetName() string {
	return p.name
}

func (p *progress) GetType() ProgressType {
	return p.pType
}

func (p *progress) GetState() ProgressState {
	s := p.progress.State()
	p.mu.RLock()
	paused := p.paused
	p.mu.RUnlock()

	// Sanitize float64 values to prevent NaN in JSON serialization
	currentPercent := s.CurrentPercent
	if math.IsNaN(currentPercent) || math.IsInf(currentPercent, 0) {
		currentPercent = 0.0
	}

	currentBytes := s.CurrentBytes
	if math.IsNaN(currentBytes) || math.IsInf(currentBytes, 0) {
		currentBytes = 0.0
	}

	secondsSince := s.SecondsSince
	if math.IsNaN(secondsSince) || math.IsInf(secondsSince, 0) {
		secondsSince = 0.0
	}

	secondsLeft := s.SecondsLeft
	if math.IsNaN(secondsLeft) || math.IsInf(secondsLeft, 0) {
		secondsLeft = 0.0
	}

	kbsPerSecond := s.KBsPerSecond
	if math.IsNaN(kbsPerSecond) || math.IsInf(kbsPerSecond, 0) {
		kbsPerSecond = 0.0
	}

	return ProgressState{
		Max:            s.Max,
		CurrentNum:     s.CurrentNum,
		CurrentPercent: currentPercent,
		CurrentBytes:   currentBytes,
		SecondsSince:   secondsSince,
		SecondsLeft:    secondsLeft,
		KBsPerSecond:   kbsPerSecond,
		Description:    s.Description,
		Type:           p.pType,
		IsStarted:      s.CurrentNum > 0,
		IsPaused:       paused,
	}
}

func (p *progress) GetCurrent() int64 {
	return p.progress.State().CurrentNum
}

func (p *progress) GetTotal() int64 {
	return p.total
}

func (p *progress) GetPercentage() float64 {
	percentage := p.progress.State().CurrentPercent


 == HOLD_INSTRUMENT)		// // // 050B
		return HOLD_INSTRUMENT;

	for (std::size_t i = 0; i < m_iInstrumentList.size(); ++i)
		if (m_iInstrumentList[i] == Instrument)
			return i;

	return 0;	// Could not find the instrument
}

unsigned int CPatternCompiler::FindSample(int Instrument, int MidiNote) const		// // //
{
	return (*m_pDPCMList)[Instrument][MidiNote];
}

CPatternCompiler::stSpacingInfo CPatternCompiler::ScanNoteLengths(int Track, unsigned int StartRow, int Pattern, stChannelID Channel) {		// // //
	const auto *pSong = modfile_.GetSong(Track);		// // //
	if (!pSong)
		return { };

	int StartSpace = -1, Space = 0, SpaceCount = 0;

	for (unsigned i = StartRow; i < pSong->GetPatternLength(); ++i) {
		const auto &NoteData = pSong->GetPattern(Channel, Pattern).GetNoteOn(i);		// // //
		bool NoteUsed = false;

		if (NoteData.Note != note_t::none)
			NoteUsed = true;
		else if (NoteData.Instrument < MAX_INSTRUMENTS || NoteData.Instrument == HOLD_INSTRUMENT)		// // //
			NoteUsed = true;
		else if (NoteData.Vol < MAX_VOLUME)
			NoteUsed = true;
		else for (unsigned j = 0, Count = pSong->GetEffectColumnCount(Channel); j < Count; ++j)
			if (NoteData.Effects[j].fx != effect_t::none)
				NoteUsed = true;

		if (i == StartRow && !NoteUsed)
			return {0xFF, StartSpace};

		if (i > StartRow) {
			if (NoteUsed) {
				if (StartSpace == -1)
					StartSpace = Space;
				else if (StartSpace == Space)
					++SpaceCount;
				else
					return {SpaceCount, StartSpace};
				Space = 0;
			}
			else
				++Space;
		}
	}

	if (StartSpace == Space)
		++SpaceCount;

	return {SpaceCount, StartSpace};
}

void CPatternCompiler::WriteData(unsigned char Value)
{
	m_vData.push_back(Value);
	m_iHash += Value;				// Simple CRC-hash
	m_iHash += (m_iHash << 10);
	m_iHash ^= (m_iHash >> 6);
}

void CPatternCompiler::AccumulateDuration()
{
	++m_iDuration;
}

void CPatternCompiler::WriteDuration()
{
	if (m_iCurrentDefaultDuration == 0xFF) {
		if (!m_vData.size() && m_iDuration > 0)
			WriteData(0x00);
		if (m_iDuration > 0)
			WriteData(m_iDuration - 1);
	}

	m_iDuration = 0;
}

// Returns the size of the block at 'position' in the data array. A block is terminated by a note
int CPatternCompiler::GetBlockSize(int Position)
{
	unsigned int Pos = Position;

	int iDuration = 1;

	// Find if note duration optimization is on
	for (int i = 0; i < Position; ++i) {
		if (m_vData[i] == Command(CMD_SET_DURATION))
			iDuration = 0;
		else if (m_vData[i] == Command(CMD_RESET_DURATION))
			iDuration = 1;
	}

	for (; Pos < m_vData.size(); ++Pos) {
		unsigned char data = m_vData[Pos];
		if (data < 0x80) {		// Note
			//int size = (Pos + 1 + iDuration) - Position;
			int size = (Pos - Pos


inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{cursor:text;white-space:nowrap}.monaco-editor.hc-black.mac .view-lines,.monaco-editor.vs-dark.mac .view-lines{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;cursor:t


6));
}

最后，让我们来完成拾取功能。
写一个简单的类来管理拾取操作

class PickHelper {
  constructor() {
    this.raycaster = new THREE.Raycaster();
    this.pickedObject = null;
    this.pickedObjectSavedColor = 0;
  }
  pick(normalizedPosition, scene, camera, time) {
    // 恢复上一个被拾取对象的颜色
    if (this.pickedObject) {
      this.pickedObject.material.emissive.setHex(this.pickedObjectSavedColor);
      this.pickedObject = undefined;
    }

    // 发出射线
    this.raycaster.setFromCamera(normalizedPosition, camera);
    // 获取与射线相交的对象
    const intersectedObjects = this.raycaster.intersectObjects(scene.children);
    if (intersectedObjects.length) {
      // 找到第一个对象，它是离鼠标最近的对象
      this.pickedObject = intersectedObjects[0].object;
      // 保存它的颜色
      this.pickedObjectSavedColor = this.pickedObject.material.emissive.getHex();
      // 设置它的发光为 黄色/红色闪烁
      this.pickedObject.material.emissive.setHex((time * 8) % 2 > 1 ? 0xFFFF00 : 0xFF0000);
    }
  }
}

可以看到，我们创建了一个 RayCaster 实例，调用该实例的 pick 方法可以在场景中发出一条射线。如果，射线有撞击到场景中的物体，修改撞击到的第一个物体的颜色。

当然，也可以在用户点击鼠标时，调用这个方法，这恐怕是最常见的应用场景。但是，在本范例中，不管在鼠标下方是什么，在每一帧中都会进行拾取操作,为此，需要跟踪鼠标的位置。

const pickPosition = {x: 0, y: 0};
clearPickPosition();

...

function getCanvasRelativePosition(event) {
  const rect = canvas.getBoundingClientRect();
  return {
    x: (event.clientX - rect.left) * canvas.width  / rect.width,
    y: (event.clientY - rect.top ) * canvas.height / rect.height,
  };
}

function setPickPosition(event) {
  const pos = getCanvasRelativePosition(event);
  pickPosition.x = (pos.x / canvas.width ) *  2 - 1;
  pickPosition.y = (pos.y / canvas.height) * -2 + 1;  // note we flip Y
}

function clearPickPosition() {
  // 对于触屏，不像鼠标总是能有一个位置坐标，
  // 如果用户不在触摸屏幕，我们希望停止拾取操作。
  // 因此，我们选取一个特别的值，表明什么都没选中
  pick


 f32) -> vec { self.and(vec::newss(r)) }
}

impl std::ops::BitOr<f32> for vec {
    type Output = vec;
    #[inline(always)]
    fn bitor(self, r : f32) -> vec { self.or(vec::newss(r)) }
}

impl mat {
    #[inline(always)]
    pub fn rotz(ang : f32) -> mat {
        let c = ang.cos();
        let s = ang.sin();
        let x = vec::new(c, -s, 0., 0.);
        let y = vec::new(s,  c, 0., 0.);
        let z = vec::new(0., 0., 1., 0.);
        let w = vec::new(0., 0., 0., 1.);
        mat(x, y, z, w)
    }
    #[inline(always)]
    pub fn inv(&self) -> mat {
        let m = self;
        let m0 = m.0.movelh(m.1);
        let m1 = m.1.movehl(m.0);
        let m2 = m.2.movelh(m.3);
        let m3 = m.3.movehl(m.2);
        let dc = m3.wwxx().fmsub(m2, m3.yyzz() * m2.zwxy());
        let ab = m0.wwxx().fmsub(m1, m0.yyzz() * m1.zwxy());
        let det = m.0.shuff_xzxz(m.2).fmsub(m.1.shuff_ywyw(m.3), m.0.shuff_ywyw(m.2) * m.1.shuff_xzxz(m.3));
        let xx = det.wwww().fmsub(m0, m1.fmadd(dc.xwxw(), m1.yxwz() * dc.zyzy()));
        let ww = det.xxxx().fmsub(m3, m2.fmadd(ab.xwxw(), m2.yxwz() * ab.zyzy()));
        let yy = det.yyyy().fmsub(m2, m3.fmadd(ab.wxwx(), m3.yxwz() * ab.zyzy()));
        let zz = det.zzzz().fmsub(m1, m0.fmadd(dc.wxwx(), m0.yxwz() * dc.zyzy()));
        let det_m = vec::new(1., -1., -1., 1.) / (det.xxxx().fmadd(det.wwww(), det.yyyy() * det.zzzz()) - ab.dot(dc.xzyw()));
        let xx = xx * det_m;
        let yy = yy * det_m;
        let zz = zz * det_m;
        let ww = ww * det_m;
        mat(xx.shuff_3131(yy), xx.shuff_2020(yy), zz.shuff_3131(ww), zz.shuff_2020(ww))
    }
    #[inline(always)]
    pub fn tpos(&self) -> mat {
        let m0 = self.0.unpacklo(self.1);
        let m2 = self.2.unpacklo(self.3);
        let m1 = self.0.unpackhi(self.1);
        let m3 = self.2.unpackhi(self.3);
        let x = m0.movelh(m2);
        let y = m2.movehl(m0);
        let z = m1.movelh(m3);
        let w = m3.movehl(m1);
        mat(x, y, z, w)
    }

    #[inline(always)]
    pub fn axang(ax : vec, ang : f32) -> mat {
        let mask1 : vec = vec::umask(0xffffffff, 0xffffffff, 0xffffffff, 0);
        let mask2 : vec = vec::umask(0, 0, 0x80000000, 0);
        let mask3 : vec = vec::umask(0x80000000, 0, 0, 0);
        let ax = (ax & mask1).norm();
        let c = vec::newss(ang.cos());
        let s = ax * ang.sin();
        let v = ax.fmadd(c, ax);
        let s = blend!(s, c, 8


//
// Created by abiel on 4/6/22.
//

#ifndef BOTBUSTERS_REBIRTH_MOVETOPOINT_H
#define BOTBUSTERS_REBIRTH_MOVETOPOINT_H

#include <frc2/command/CommandBase.h>
#include <frc2/command/CommandHelper.h>
#include "Systems/EctoSwerve/EctoSwerve.h"
#include "Core/VisionManager/VisionManager.h"

struct MoveToPointConfig {
    double pos_p{0}, pos_i{0}, pos_d{0};
    double theta_p{0}, theta_i{0}, theta_d{0};

    units::meters_per_second_t maxVel{1_mps};
    units::meters_per_second_squared_t maxAccel{0.5_mps_sq};

    units::radians_per_second_t maxAngularVel{2_rad_per_s};
    units::radians_per_second_squared_t maxAngularAccel{3_rad_per_s_sq};
};

class MoveToPoint : public frc2::CommandHelper<frc2::CommandBase, MoveToPoint> {
public:
    MoveToPoint(const std::shared_ptr<EctoSwerve> &swerve, const frc::Pose2d &targetPose, const MoveToPointConfig &config);

    void Initialize() override;

    void Execute() override;

    void End(bool interrupted) override;

    bool IsFinished() override;

private:
    MoveToPointConfig config;

    std::shared_ptr<EctoSwerve> swerve;
    frc::Pose2d targetPose;

    frc::ProfiledPIDController<units::meter> xController, yController;
    frc::ProfiledPIDController<units::radians> thetaController;

    nt::NetworkTableInstance ntInstance = nt::NetworkTableInstance::GetDefault();
    std::shared_ptr<nt::NetworkTable> table =
            ntInstance.GetTable("MoveToPoint");

};

#endif //BOTBUSTERS_REBIRTH_MOVETOPOINT_H


a>

14:00 - 14:25

Alternativen zur Google Search Appliance

Veit Schiele (Veit Schiele Communications GmbH)

Vortrag

Die Google Search Appliance ist eine Suchlösung aus Hard- und Software, mit welcher heterogene Internet- und Intranetangebote durchsucht werden können. Diese Lösung wird von Google jedoch eingestellt. Kommerzielle (closed source) Alternativen stehen bereit. Mit FESS, Open Search Server oder Elasticsearch bieten sich aber auch Lösungen aus der Open Source-Welt an. Diese werden kurz vorgestellt und eine Einführung in die zugrundeliegenden Techniken gegeben um schließlich eine Einordnung der verschiedenen Lösungen zu erlauben.

Veit Schiele

Veit Schiele Communications GmbH

Veit Schiele.

 Share

<input class="speakers-inputbox" type="text" onclic


ected an identifier and instead saw '{a}'.",E031:"Bad assignment.",E032:"Expected a small integer or 'false' and instead saw '{a}'.",E033:"Expected an operator and instead saw '{a}'.",E034:"get/set are ES5 features.",E035:"Missing property name.",E036:"Expected to see a statement and instead saw a block.",E037:null,E038:null,E039:"Function declarations are not invocable. Wrap the whole function invocation in parens.",E040:"Each value should have its own case label.",E041:"Unrecoverable syntax error.",E042:"Stopping.",E043:"Too many errors.",E044:null,E045:"Invalid for each loop.",E046:"A yield statement shall be within a generator function (with syntax: `function*`)",E047:null,E048:"{a} declaration not directly within block.",E049:"A {a} cannot be named '{b}'.",E050:"Mozilla requires the yield expression to be parenthesized here.",E051:null,E052:"Unclosed template literal.",E053:"Export declaration must be in global scope.",E054:"Class properties must be methods. Expected '(' but instead saw '{a}'.",E055:"The '{a}' option cannot be set after any executable code.",E056:"'{a}' was used before it was declared, which is illegal for '{b}' variables.",E057:"Invalid meta property: '{a}.{b}'.",E058:"Missing semicolon."},s={W001:"'hasOwnProperty' is a really bad name.",W002:"Value of '{a}' may be overwritten in IE 8 and earlier.",W003:"'{a}' was used before it was defined.",W004:"'{a}' is already defined.",W005:"A dot following a number can be confused with a decimal point.",W006:"Confusing minuses.",W007:"Confusing plusses.",W008:"A leading decimal point can be confused with a dot: '{a}'.",W009:"The array literal notation [] is preferable.",W010:"The object literal notation {} is preferable.",W011:null,W012:null,W013:null,W014:"Bad line breaking before '{a}'.",W015:null,W016:"Unexpected use of '{a}'.",W017:"Bad operand.",W018:"Confusing use of '{a}'.",W019:"Use the isNaN function to compare with NaN.",W020:"Read only.",W021:"Reassignment of '{a}', which is is a {b}. Use 'var' or 'let' to declare bindings that may change.",W022:"Do not assign to the exception parameter.",W023:"Expected an identifier in an assignment and instead saw a function invocation.",W024:"Expected an identifier and instead saw '{a}' (a reserved word).",W025:"Missing name in function declaration.",W026:"Inner functions should be listed at the top of the outer function.",W027:"Unreachable '{a}' after '{b}'.",W028:"Label '{a}' on {b} statement.",W030:"Expected an assignment or function call and instead saw an expression.",W031:"Do not use 'new' for side effects.",W032:"Unnecessary semicolon.",W033:"Missing semicolon.",W034:'Unnecessary directive "{a}".',W035:"Empty block.",W036:"Unexpected /*member '{a}'.",W037:"'{a}' is a statement label.",W038:"'{a}' used out of scope.",W039:"'{a}' is not allowed.",W040:"Possible strict violation.",W041:"Use '{a}' to compare with '{b}'.",W042:"Avoid EOL escaping.",W043:"Bad escaping of EOL. Use option multistr if needed.",W044:"Bad or unnecessary escaping.",W045:"Bad number '{a}'.",W046:"Don't use extra leading zeros '{a}'.",W047:"A trailing decimal point can be confused with a dot: '{a}'.",W048:"Unexpected control character in regular expression.",W049:"Unexpected escaped character '{


MANTITE_PLATE_MAIL_BODY.id(),
		ItemId.RUNE_PLATE_MAIL_BODY.id(),

		// Plate mail legs
		ItemId.BRONZE_PLATE_MAIL_LEGS.id(),
		ItemId.IRON_PLATE_MAIL_LEGS.id(),
		ItemId.STEEL_PLATE_MAIL_LEGS.id(),
		ItemId.BLACK_PLATE_MAIL_LEGS.id(),
		ItemId.MITHRIL_PLATE_MAIL_LEGS.id(),
		ItemId.ADAMANTITE_PLATE_MAIL_LEGS.id(),
		ItemId.RUNE_PLATE_MAIL_LEGS.id(),

		// plate mail tops
		ItemId.BRONZE_PLATE_MAIL_TOP.id(),
		ItemId.IRON_PLATE_MAIL_TOP.id(),
		ItemId.STEEL_PLATE_MAIL_TOP.id(),
		ItemId.BLACK_PLATE_MAIL_TOP.id(),
		ItemId.MITHRIL_PLATE_MAIL_TOP.id(),
		ItemId.ADAMANTITE_PLATE_MAIL_TOP.id(),
		ItemId.RUNE_PLATE_MAIL_TOP.id(),

		// plated skirts
		ItemId.BRONZE_PLATED_SKIRT.id(),
		ItemId.IRON_PLATED_SKIRT.id(),
		ItemId.STEEL_PLATED_SKIRT.id(),
		ItemId.BLACK_PLATED_SKIRT.id(),
		ItemId.MITHRIL_PLATED_SKIRT.id(),
		ItemId.ADAMANTITE_PLATED_SKIRT.id(),
		ItemId.RUNE_SKIRT.id(),

		// scimitars
		ItemId.BRONZE_SCIMITAR.id(),
		ItemId.IRON_SCIMITAR.id(),
		ItemId.STEEL_SCIMITAR.id(),
		ItemId.BLACK_SCIMITAR.id(),
		ItemId.MITHRIL_SCIMITAR.id(),
		ItemId.ADAMANTITE_SCIMITAR.id(),
		ItemId.RUNE_SCIMITAR.id(),

		// shields
		ItemId.BRONZE_SQUARE_SHIELD.id(),
		ItemId.IRON_SQUARE_SHIELD.id(),
		ItemId.STEEL_SQUARE_SHIELD.id(),
		ItemId.BLACK_SQUARE_SHIELD.id(),
		ItemId.MITHRIL_SQUARE_SHIELD.id(),
		ItemId.ADAMANTITE_SQUARE_SHIELD.id(),
		ItemId.RUNE_SQUARE_SHIELD.id(),
		ItemId.DRAGON_SQUARE_SHIELD.id(), // probably
		ItemId.BRONZE_KITE_SHIELD.id(),
		ItemId.IRON_KITE_SHIELD.id(),
		ItemId.STEEL_KITE_SHIELD.id(),
		ItemId.BLACK_KITE_SHIELD.id(),
		ItemId.MITHRIL_KITE_SHIELD.id(),
		ItemId.ADAMANTITE_KITE_SHIELD.id(),
		ItemId.RUNE_KITE_SHIELD.id(),
		ItemId.WOODEN_SHIELD.id(),
		ItemId.ANTI_DRAGON_BREATH_SHIELD.id(),

		// Spears & poisoned
		ItemId.BRONZE_SPEAR.id(),
		ItemId.IRON_SPEAR.id(),
		ItemId.STEEL_SPEAR.id(),
		ItemId.MITHRIL_SPEAR.id(),
		ItemId.ADAMANTITE_SPEAR.id(),
		ItemId.RUNE_SPEAR.id(),
		ItemId.POISONED_BRONZE_SPEAR.id(),
		ItemId.POISONED_IRON_SPEAR.id(),


 second symbol.
						this_infix_item.symbol = SYM_ASSIGN_DIVIDE;
					}
					else if (cp1 == '/')
					{
						if (cp[2] == '=')
						{
							cp += 2; // An additional increment to have loop skip over the operator's 2nd & 3rd symbols.
							this_infix_item.symbol = SYM_ASSIGN_FLOORDIVIDE;
						}
						else
						{
							++cp; // An additional increment to have loop skip over the second '/' too.
							this_infix_item.symbol = SYM_FLOORDIVIDE;
						}
					}
					else
						this_infix_item.symbol = SYM_DIVIDE;
					break;
				case '*':
					if (cp1 == '=')
					{
						++cp; // An additional increment to have loop skip over the operator's second symbol.
						this_infix_item.symbol = SYM_ASSIGN_MULTIPLY;
					}
					else
					{
						if (cp1 == '*') // Python, Perl, and other languages also use ** for power.
						{
							++cp; // An additional increment to have loop skip over the second '*' too.
							this_infix_item.symbol = SYM_POWER;
						}
						else
						{
							// Differentiate between unary dereference (*) and the "multiply" operator:
							// See '-' above for more details:
							this_infix_item.symbol = (infix_count && YIELDS_AN_OPERAND(infix[infix_count - 1].symbol))
								? SYM_MULTIPLY : SYM_DEREF;
						}
					}
					break;
				case '!':
					if (cp1 == '=') // i.e. != is synonymous with <>, which is also already supported by legacy.
					{
						++cp; // An additional increment to have loop skip over the '=' too.
						this_infix_item.symbol = SYM_NOTEQUAL;
					}
					else
						// If what lies to its left is a CPARAN or OPERAND, SYM_CONCAT is not auto-inserted because:
						// 1) Allows ! and ~ to potentially be overloaded to become binary and unary operators in the future.
						// 2) Keeps the behavior consistent with unary minus, which could never auto-concat since it would
						//    always be seen as the binary subtract operator in such cases.
						// 3) Simplifies the code.
						this_infix_item.symbol = SYM_HIGHNOT; // High-precedence counterpart of the word "not".
					break;
				case '(':
					// The below should not hurt any future type-casting feature because the type-cast can be checked
					// for prior to checking the below.  For example, if what immediately follows the open-paren is
					// the string "int)", this symbol is not open-paren at all but instead the unary type-cast-to-int
					// operator.
					if (infix_count && YIELDS_AN_OPERAND(infix[infix_count - 1].symbol)
						&& _tcschr(_T(" \t)\""), cp[-1])) // For backward-compatibility, )( and "foo"(bar) are allowed.  Otherwise, a space/tab is required, as documented and so things like x[y]() don't need to deal with an extraneous SYM_CONCAT.
					{
						if (infix_count > MAX_TOKENS - 2) // -2 to ensure room for this operator and the operand further below.
							return LineError(ERR_EXPR_TOO_LONG);
						this_infix_item.symbol = SYM_CONCAT;
						++infix_count;
					}
					infix[infix_count].symbol = SYM_OPAREN; // MUST NOT REFER TO this_infix_item IN CAS


 }
        }

        private fun naturalComparator(left: String): (String) -> Int = { right ->
            val commonNonNumericPrefix = commonNonNumericPrefix(left)(right)

            val numericInfix: String.() -> String = {
                val tail = subSequence(commonNonNumericPrefix.length, length)

                tail.takeWhile(Char::isDigit).toString()
            }

            val leftInfixRaw = left.numericInfix()
            val rightInfixRaw = right.numericInfix()

            val leftInfix = leftInfixRaw.asIntOrNull()
            val rightInfix = rightInfixRaw.asIntOrNull()

            when {
                leftInfix != null && rightInfix != null -> when (leftInfix) {
                    /*
                     * When infixes are equal, recursively compare the
                     * remainder suffixes. Thus, "foo9Bar" < "foo9bar".
                     */
                    rightInfix -> {
                        val leftSuffix = left.substring(commonNonNumericPrefix.length + leftInfixRaw.length)
                        val rightSuffix = right.substring(commonNonNumericPrefix.length + rightInfixRaw.length)
                        naturalComparator(leftSuffix)(rightSuffix)
                    }

                    /*
                     * "foo9bar" < "foo10bar".
                     */
                    else -> leftInfix - rightInfix
                }

                else -> left.compareTo(right)
            }
        }
    }
}
package com.saveourtool.diktat.ruleset.chapter4

import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID
import com.saveourtool.diktat.ruleset.constants.Warnings.FLOAT_IN_ACCURATE_CALCULATIONS
import com.saveourtool.diktat.ruleset.rules.chapter4.calculations.AccurateCalculationsRule
import com.saveourtool.diktat.util.LintTestBase

import com.saveourtool.diktat.api.DiktatError
import generated.WarningNames
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Test

class AccurateCalculationsWarnTest : LintTestBase(::AccurateCalculationsRule) {
    private val ruleId = "$DIKTAT_RULE_SET_ID:${AccurateCalculationsRule.NAME_ID}"

    private fun warnText(ref: String, expr: String) = "${FLOAT_IN_ACCURATE_CALCULATIONS.warnText()} float value of <$ref> used in arithmetic expression in $expr"

    @Test
    @Tag(WarningNames.FLOAT_IN_ACCURATE_CALCULATIONS)
    fun `should detect comparison (equals) with float literal`() {
        lintMethod(
            """
                    |class Example {
                    |    fun foo() {
                    |        x == 1.0
                    |        1.0 == x
                    |        x.equals(1.0)
                    |        1.0.equals(x)
                    |    }
                    |}
            """.trimMargin(),
            DiktatError(3, 9, ruleId, warnText("1.0", "x == 1.0"), false),
            DiktatError(4, 9, ruleId, warnText("1.0", "1.0 == x"), false),
            DiktatError(5, 9, ruleId, warnText("1.0", "x.equals(1.0)"), false),
            DiktatError(6, 9, ruleId, warnText("1.0", "1.0.equals(x)"), false)
        )
    }

    @Test
    @Tag(WarningNames.FLOAT_IN_ACCURATE_CALCULATIONS)
    fun `should detect comparison with float literal`() {
        lintMethod(
            """
                    |class Example {
                    |    fun foo() {
                    |        x > 1.0
                    |        1.0 > x
                    |        x.compareTo(1.0)
                    |        1.0.compareTo(x)
                    |    }
                    |}
            """.trimMargin(),
            DiktatError(3, 9, ruleId, warnText("1.0", "x > 1.0"), false),
            DiktatError(4, 9, ruleId, warnText("1


](ec_key_generation.md).

### Second task: sign a file with the private key using OpenSSL

Before we start with the signature process itself we need to create a file that gets signed.

OpenSSL will work with each file but to get a compatibility with other programs <u>using a string</u> as source for the signature it is important that the string in your message file is the same as the string in the examples in [Elliptic key string signature (ECDSA) with DER encoding](ecdsa_signature_der_string.md).

That means in detail: **do not use any string delimiter or new line characters or carriage return characters**. When typing a string in an editor it is normal to press the "Enter" button but that will add the "CR/LF" characters at the end. Verifying the stripped string with the other programs will fail as it is not the same data that was signed. The usage of an editor that will show you these not printable characters like **Notepad++** may help you in this case.

This is an example file in hex view mode that has the "CR/LF" characters ("0D 0A") at the end - **don't use this in cross platform programs**:

```plaintext
54 68 65 20 71 75 69 63 6B 20 62 72 6F 77 6E 20 |The.quick.brown.
66 6F 78 20 6A 75 6D 70 73 20 6F 76 65 72 20 74 |fox.jumps.over.t
68 65 20 6C 61 7A 79 20 64 6F 67 0D 0A          |he.lazy.dog..
```

I'm providing a sample file **ecdsamessage.txt** that has just one row with my demonstration text to sign in my GitHub-repository.

Now we are signing this file:

```plaintext
openssl dgst -sha256 -sign ecprivatekey_secp256r1.pem -out ecdsamessage.signature.bin ecdsamessage.txt
```
As the signature is in binary encoding we need to take a hex view to the signature:
```plaintext
30 46 02 21 00 90 C9 67 65 0C 53 4E 80 8E 5D 3D |0F.....ge.SN....
C0 77 EF 7F 9A 94 47 2A CD 96 84 44 00 F1 44 95 |.w....G....D..D.
6C 19 BF F3 E3 02 21 00 DA F8 17 68 1E 00 EA CC |l..........h....
A1 DA EC D1 91 30 75 87 D7 6B 15 B9 0E 71 9E BD |.....0u..k...q..
61 2C 3E F0 0A 28 43 E5                         |a.....C.
```
If you stay with OpenSSL for verification on your machine you do not need to run the next two steps and proceed directly to task five.

### Third task: convert the binary signature to Base64 encoding

With just one line you can convert the binary signature to a Base64 encoded signature:

```plaintext
openssl base64 -in ecdsamessage.signature.bin -out ecdsamessage.signature.base64.txt
```
Here we see the result - please note that OpenSSL is adding a "new line character" after 64 characters:

```plaintext
MEYCIQCQyWdlDFNOgI5dPcB373+alEcqzZaERADxRJVsGb/z4wIhANr4F2geAOrM
odrs0ZEwdYfXaxW5DnGevWEsPvAKKEPl
```

The encoding is perfect for transmitting via Email or chat purposes. The signature can be as well provided to the other programs for verifying - try it with the Browser based verification tool:

### Fourth task: convert the Base64 encoded signature to a binary encoded signature

When verifying this signature with OpenSSL or getting a signature from third party you need to Base64 decode the signature back to a binary format:

```plaintext
openssl base64 -d -in ecdsamessage.signature.base64.txt -out ecdsamessage.signature.dec.bin
```

### Fifth task: verify the signature of a file with the private key using OpenSSL

To verify the digital signature we do need to have 3 files available: the file itself, the signature and the **public key** of the signer. Now we verify th


mand = new("SubShaderCommand", PsiSymbolsThemedIcons.SubShader.Id);
        public static readonly ShaderLabDeclaredElementType IncludeBlock = new("IncludeBlock", PsiSymbolsThemedIcons.Pipeline.Id);
        public static readonly ShaderLabDeclaredElementType ProgramBlock = new("ProgramBlock", PsiSymbolsThemedIcons.Pipeline.Id);
        public static readonly ShaderLabDeclaredElementType Shader = new("Shader", null);
        public static readonly ShaderLabDeclaredElementType TexturePass = new("TexturePass", PsiSymbolsThemedIcons.ShaderPass.Id);

        private readonly IconId? myIconId;

        private ShaderLabDeclaredElementType(string name, IconId? iconId)
            : base(name)
        {
            PresentableName = name;
            myIconId = iconId;
        }

        public override string PresentableName { get; }
        public override IconId? GetImage() => myIconId;
        public override bool IsPresentable(PsiLanguageType language) => language.Is<ShaderLabLanguage>();
        protected override IDeclaredElementPresenter DefaultPresenter => ShaderLabDeclaredElementPresenter.Instance;
    }
}


a	[%r14, %r0] 0x20, %r31
	.word 0xb9e561f8  ! 748: SAVE_I	save	%r21, 0x0001, %r28
T0_asi_reg_wr_33:
	mov	0x1c, %r14
	.word 0xf0f384a0  ! 753: STXA_R	stxa	%r24, [%r14 + %r0] 0x25
cpu_intr_0_60:
	setx	0x22002c, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xbb641800  ! 757: MOVcc_R	<illegal instruction>
iob_intr_0_64:
!$EV trig_pc_d(0,expr(@VA(.MAIN.iob_intr_0_64), 16, 16)) -> intp(0, 0, 15)
T0_asi_reg_rd_30:
	mov	0x3c3, %r14
	.word 0xfadb89e0  ! 761: LDXA_R	ldxa	[%r14, %r0] 0x4f, %r29
	.word 0xb5e48000  ! 764: SAVE_R	save	%r18, %r0, %r26
iob_intr_0_65:
!$EV trig_pc_d(0,expr(@VA(.MAIN.iob_intr_0_65), 16, 16)) -> intp(0, 0, 21)
	.word 0xb5e5c000  ! 768: SAVE_R	save	%r23, %r0, %r26
	.word 0xb5e4e067  ! 772: SAVE_I	save	%r19, 0x0001, %r26
cpu_intr_0_61:
	setx	0x210317, %g1, %o0
	ta	T_SEND_THRD_INTR
T0_asi_reg_rd_31:
	mov	0x12, %r14
	.word 0xfadb8e80  ! 775: LDXA_R	ldxa	[%r14, %r0] 0x74, %r29
cpu_intr_0_62:
	setx	0x200336, %g1, %o0
	ta	T_SEND_THRD_INTR
cpu_intr_0_63:
	setx	0x230304, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xb9e5c000  ! 782: SAVE_R	save	%r23, %r0, %r28
T0_asi_reg_rd_32:
	mov	0x27, %r14
	.word 0xf2db84a0  ! 786: LDXA_R	ldxa	[%r14, %r0] 0x25, %r25
T0_asi_reg_rd_33:
	mov	0x3c6, %r14
	.word 0xf8db84a0  ! 787: LDXA_R	ldxa	[%r14, %r0] 0x25, %r28
	.word 0xb09c0000  ! 789: XORcc_R	xorcc 	%r16, %r0, %r24
	.word 0xbfe58000  ! 793: SAVE_R	save	%r22, %r0, %r31
	.word 0xb3643801  ! 794: MOVcc_I	<illegal instruction>
cpu_intr_0_64:
	setx	0x23000e, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xbde54000  ! 796: SAVE_R	save	%r21, %r0, %r30
cpu_intr_0_65:
	setx	0x210334, %g1, %o0
	ta	T_SEND_THRD_INTR
T0_asi_reg_rd_34:


e>
                  <elr:Password>$password</elr:Password>
                  <elr:Timestamp>$timestamp</elr:Timestamp>
                </elr:TestPayload>
              </soapenv:Body>
            </soapenv:Envelope>
        """.trimIndent()
        assertThat(
            actual.trim().replace("\r|\n".toRegex(), "")
        ).isEqualTo(
            expected.trim().replace("\r|\n".toRegex(), "")
        )
    }

    @Test
    fun `test serializing a SOAP12 object in a soap envelope to xml`() {
        val textFileContents = UUID.randomUUID().toString()
        val testSoap12Message = TestSoap12Payload(textFileContents = textFileContents)
        val soapVersion = "SOAP12"
        val timestampId = "TS-" + (java.util.UUID.randomUUID())
        val timeCreated = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(LocalDateTime.now())
        val timeExpired = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(LocalDateTime.now().plusSeconds(180))
        val envelope = SoapEnvelope(testSoap12Message, soap12namespaces, soapVersion)
        val actual = envelope.toXml()
        val expected = """
            <?xml version='1.0' encoding='UTF-8'?>
            <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:stag="$defaultNamespace">
              <soapenv:Header>
                <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                  <wsu:Timestamp wsu:Id="$timestampId" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                    <wsu:Created>$timeCreated</wsu:Created>
                    <wsu:Expires>$timeExpired</wsu:Expires>
                  </wsu:Timestamp>
                </wsse:Security>
              </soapenv:Header>
              <soapenv:Body>
                <stag:TestSoap12Message>
                  <stag:TestSoap12Payload>$textFileContents</stag:TestSoap12Payload>
                </stag:TestSoap12Message>
              </soapenv:Body>
            </soapenv:Envelope>
        """.trimIndent()
        assertThat(
            actual.trim().replace("\r|\n".toRegex(), "")
                .replace(
                    "<wsu:Created>.*?</wsu:Created>".toRegex(),
                    "<wsu:Created>2023-11-20T17:08:48.229Z</wsu:Created>"
                )
                .replace(
                    "<wsu:Expires>.*?</wsu:Expires>".toRegex(),
                    "<wsu:Expires>2023-11-20T17:09:48.229Z</wsu:Expires>"
                )
                .replace(
                    "wsu:Id=\".*?\"".toRegex(),
                    "wsu:Id=\"TS-A766CDE2A9C666F2B317005001282431\""
                )
        ).isEqualTo(
            expected.trim().replace("\r|\n".toRegex(), "")
                .replace(
                    "<wsu:Created>.*?</wsu:Created>".toRegex(),
                    "<wsu:Created>2023-11-20T17:08:48.229Z</wsu:Created>"
                )
                .replace(
                    "<wsu:Expires>.*?</wsu:Expires>".toRegex(),
                    "<wsu:Expires>2023-11-20T17:09:48.229Z</wsu:Expires>"
                )
                .replace(
                    "wsu:Id=\".*?\"".toRegex(),
                    "wsu:Id=\"TS-A766CDE2A9C666F2B317005001282431\""
                )
        )
    }
}package gov.cdc.prime.router.


th",
            ["ComaOnTheLastX0OfTheMonth"] = ", on the last {0} of the month",
            ["ComaOnTheX0OfTheMonth"] = ", on the {0} of the month",
            ["ComaX0ThroughX1"] = ", {0} through {1}",
            ["CommaDaysBeforeTheLastDayOfTheMonth"] = ", {0} days before the last day of the month",
            ["CommaStartingX0"] = ", starting {0}",
            ["EveryHour"] = "every hour",
            ["EveryMinute"] = "every minute",
            ["EveryMinuteBetweenX0AndX1"] = "Every minute between {0} and {1}",
            ["EverySecond"] = "every second",
            ["EveryX0Hours"] = "every {0} hours",
            ["EveryX0Minutes"] = "every {0} minutes",
            ["EveryX0Seconds"] = "every {0} seconds",
            ["Fifth"] = "fifth",
            ["First"] = "first",
            ["FirstWeekday"] = "first weekday",
            ["Fourth"] = "fourth",
            ["MinutesX0ThroughX1PastTheHour"] = "minutes {0} through {1} past the hour",
            ["PMPeriod"] = "PM",
            ["Second"] = "second",
            ["SecondsX0ThroughX1PastTheMinute"] = "seconds {0} through {1} past the minute",
            ["SpaceAnd"] = " and",
            ["SpaceAndSpace"] = " and ",
            ["SpaceX0OfTheMonth"] = " {0} of the month",
            ["Third"] = "third",
            ["WeekdayNearestDayX0"] = "weekday nearest day {0}",
        };

        public static string GetString(string name)
        {
            if (_strings.TryGetValue(name, out var result))
                return result;
            return null;
        }
    }
}


5.5, 31)
    x_values = (bins[1:]+bins[:1])/2

    # Relative value: analytical one
    analytical_intensity = SeaLevelSample.intensity_sea_level(x_values, zenith=0)
    relative_y_values = analytical_intensity*x_values**E_power_index
    relative_y_err = np.zeros_like(relative_y_values)

    for i, model_name in enumerate(list(SeaLevelSample.MODEL_DICT.keys())):
        color = default_color_list[i]

        # Insert relative value
        pc.insert_data(x_values=x_values, y_value=relative_y_values, ary_index=0, label=model_name, y_err=relative_y_err)

        # Get new weight
        muon['weight'] = muon["weight_"+model_name]
        # Draw flux
        x_values, y_values, y_err = SeaLevelSample.draw_vertical_muon_flux_sea_level(muon, ax=pc.ax_main, E_power_index=E_power_index, color=color, label=f'CORSIKA: {model_name}', bins=bins, draw_aux_line=(model_name==SeaLevelSample.NOMINAL_MODEL_NAME))
        pc.insert_data(
            x_values=x_values, y_value=y_values, ary_index=1, label=model_name, y_err=y_err, color=color
        )

    pc.draw_ratio(f'Ratio to Analytical', draw_error=True)
    pc.apply_settings(if_legend=True, ratio_ylim=(0.5, 2))
    pc.savefig()


   const actual = isObject({});
      expect(actual).toBeTruthy();
    });

    it('should return false for an array', () => {
      const actual = isObject([]);
      expect(actual).toBeFalsy();
    });

    it('should return false for a function', () => {
      const actual = isObject(vi.fn());
      expect(actual).toBeFalsy();
    });

    it('should return false for null', () => {
      const actual = isObject(null);
      expect(actual).toBeFalsy();
    });

    it('should return false for undefined', () => {
      const actual = isObject(undefined);
      expect(actual).toBeFalsy();
    });
  });

  describe('isNil', () => {
    it('should return true for null', () => {
      const actual = isNil(null);
      expect(actual).toBeTruthy();
    });

    it('should return true for undefined', () => {
      const actual = isNil(undefined);
      expect(actual).toBeTruthy();
    });

    it('should return false for a boolean', () => {
      const actual = isNil(true);
      expect(actual).toBeFalsy();
    });

    it('should return false for a function', () => {
      const actual = isNil(vi.fn());
      expect(actual).toBeFalsy();
    });

    it('should return false for an integer', () => {
      const actual = isNil(1);
      expect(actual).toBeFalsy();
    });

    it('should return false for NaN', () => {
      const actual = isNil(NaN);
      expect(actual).toBeFalsy();
    });
  });
});
export class Name {
  firstName: string;
  lastName: string;

  constructor(name?: Name) {
    if (!name) {
      this.firstName = '';
      this.lastName = '';
    } else {
      this.firstName = name.firstName;
      this.lastName = name.lastName;
    }
  }
}

export class User {
  id: number;
  name: Name;
  role: string;

  constructor(user?: User) {
    if (!user) {
      this.id = 0;
      this.name = new Name();
      this.role = 'CUSTOMER';
    } else {
      this.id = user.id || 0;
      this.name = user.name || new Name();
      this.role = user.role || 'CUSTOMER';
    }
  }
}
import { TgoType } from '../reducers/tgo';

export interface ComponentLabel {
	readonly label: string,
}

export const hasComponentLabel = <BaseT extends TgoType>(tgo: BaseT) : tgo is (BaseT & Required<ComponentLabel>) =>
	typeof tgo.label !== undefined
import axios from 'axios';
import fs from 'fs-extra';

const cachePath = 'releases-cache.json';
const timeout = 60000;
let cachedData: CachedData;

function loadCache() {
  if (!fs.existsSync(cachePath)) {
    cachedData = {
      releases: {},
      time: new Date(),
    };
    fs.writeJSONSync(cachePath, cachedData);
    return;
  }
  cachedData = fs.readJSONSync(cachePath);
}

function getCachedRelease(repo: string) {
  loadCache();
  if (
    cachedData &&
    cachedData.releases[repo] &&
    cachedData.time &&
    new Date().getTime() - new Date(cachedData.time).getTime() < timeout
  ) {
    return cachedData.releases[repo];
  }
  return null;
}

function saveCache(repo: string, release: Release) {
  cachedData.releases[repo] = release;
  cachedData.time = new Date();
  fs.writeJSONSync(cachePath, cachedData);
}

async function getRemoteRelease(repo: string): Promise<Release> {
  const cachedRelease = getCachedRelease(repo);
  if (cachedRelease) {
    return cachedRelease;
  }

  return axios
    .get(`https://api.github.com/repos/${


e to visit
         *
         * @return a visitor-specified result
         *
         * @implSpec The default implementation is {@code d.accept(v, null)}.
         */
        default R visit(Directive d) {
            return d.accept(this, null);
        }

        /**
         * Visits any directive as if by passing itself to that
         * directive's {@link Directive#accept accept} method.
         *
         * @param d the directive to visit
         * @param p a visitor-specified parameter
         *
         * @return a visitor-specified result
         *
         * @implSpec The default implementation is {@code d.accept(v, p)}.
         */
        default R visit(Directive d, P p) {
            return d.accept(this, p);
        }

        /**
         * Visits an unknown directive.
         * This can occur if the language evolves and new kinds of directive are added.
         *
         * @param d the directive to visit
         * @param p a visitor-specified parameter
         *
         * @return a visitor-specified result
         *
         * @throws UnknownDirectiveException a visitor implementation may optionally throw this exception
         * @implSpec The default implementation throws {@code new UnknownDirectiveException(d, p)}.
         */
        // 未知指令
        default R visitUnknown(Directive d, P p) {
            throw new UnknownDirectiveException(d, p);
        }
    }

    /**
     * A dependency of a module.
     *
     * @spec JPMS
     * @since 9
     */
    // requires指令访问器
    interface RequiresDirective extends Directive {
        /**
         * Returns whether or not this is a static dependency.
         *
         * @return whether or not this is a static dependency
         */
        // 是否为static请求
        boolean isStatic();

        /**
         * Returns whether or not this is a transitive dependency.
         *
         * @return whether or not this is a transitive dependency
         */
        // 是否为transitive请求
        boolean isTransitive();

        /**
         * Returns the module that is required
         *
         * @return the module that is required
         */
        // 获取依赖模块
        ModuleElement getDependency();
    }

    /**
     * An exported package of a module.
     *
     * @spec JPMS
     * @since 9
     */
    // exports指令访问器
    interface ExportsDirective extends Directive {

        /**
         * Returns the package being exported.
         *
         * @return the package being exported
         */
        // 获取导出的包
        PackageElement getPackage();

        /**
         * Returns the specific modules to which the package is being exported,
         * or null, if the package is exported to all modules which
         * have readability to this module.
         *
         * @return the specific modules to which the package is being exported
         */
        // 获取目标模块
        List<? extends ModuleElement> getTargetModules();
    }

    /**
     * An opened package of a module.
     *
     * @spec JPMS
     * @since 9
     */
    // opens指令访问器
    interface OpensDirective extends Directive {

        /**
         * Returns the package being opened.
         *
         * @return the package being opened
         */
        // 获取开放的包
        PackageElement getPackage();

        /**
         * Returns the specific modules to which the package is being open
         * or null, if the package is open all modules which
         * have readability to this module.
         *
         * @return the specific modules to which the package is being opened
         */
        // 获取目标模块
        List<? extends ModuleElement> getTargetModules();
    }

    /**
     * An implementation of a service provided by a module.
     *
     * @spec JPMS
     * @since 9
     */


gt;Our rsync package was shipped with bundled zlib to provide compatibility
with the old-style --compress option up to version 3.1.0. Version 3.1.1 was
released on 2014-06-22 and is shipped by all major distributions now.

So we decided to finally drop the bundled library and ship a package with
system zlib. This also fixes security issues, actual ones and in future. Go
and blame those running old versions if you encounter errors with rsync
3.1.3-3.
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Hesse</dc:creator><pubDate>Wed, 15 Jan 2020 20:14:43 +0000</pubDate><guid isPermaLink="false">tag:www.archlinux.org,2020-01-15:/news/rsync-compatibility/</guid></item><item><title>Now using Zstandard instead of xz for package compression</title><link>https://www.archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/</link><description>
As announced on the mailing list, on Friday, Dec 27 2019, our package compression scheme has changed from xz (.pkg.tar.xz) to zstd (.pkg.tar.zst).

zstd and xz trade blows in their compression ratio. Recompressing all packages to zstd with our options yields a total ~0.8% increase in package size on all of our packages combined, but the decompression time for all packages saw a ~1300% speedup.

We already have more than 545 zstd-compressed packages in our repositories, and as packages get updated more will keep rolling in. We have not found any user-facing issues as of yet, so things appear to be working.

As a packager, you will automatically start building .pkg.tar.zst packages if you are using the latest version of devtools (&gt;= 20191227).

As an end-user no manual intervention is required, assuming that you have read and followed the news post from late last year.

If you nevertheless haven't updated libarchive since 2018, all hope is not lost! Binary builds of pacman-static are available from Eli Schwartz' personal repository (or direct link to binary), signed with their Trusted User keys, with which you can perform the update.
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robin Broda</dc:creator><pubDate>Sat, 04 Jan 2020 20:35:55 +0000</pubD


ped",
		files: []*testutils.File{
			{
				Path: filepath.Join("src", "line_comments.go"),
				Contents: []byte(`package foo
				// package comment

				// TODO is a function.
				// TODO: some task.
				func TODO() {
					return // Random comment
				}`),
				Mode: 0o600,
			},
			{
				Path:     filepath.Join("src", ".gitignore"),
				Contents: []byte(`line_comments.go`),
				Mode:     0o600,
			},
		},
		opts: &Options{
			Config: &todos.Config{
				Types: []string{"TODO"},
			},
			IgnoreFileNames: []string{".gitignore"},
			Charset:         "UTF-8",
		},
		expected: nil,
		// expected: []*TODORef{},
	},
	{
		name: "binary files are ignored",
		files: []*testutils.File{
			{
				Path:     "binary.exe",
				Contents: []byte{1, 2, 0, 3},
				Mode:     0o600,
			},
		},
		opts: &Options{
			Config: &todos.Config{
				Types: []string{"TODO"},
			},
			Charset: "UTF-8",
		},
		expected: nil,
	},
	{
		name: "unsupported files are ignored",
		files: []*testutils.File{
			{
				Path:     "unsupported_lang.coq",
				Contents: []byte{},
				Mode:     0o600,
			},
		},
		opts: &Options{
			Config: &todos.Config{
				Types: []string{"TODO"},
			},
			Charset: "UTF-8",
		},
		expected: nil,
	},
	{
		name: "unsupported files generate error if specified",
		files: []*testutils.File{
			{
				Path:     "unsupported_lang.coq",
				Contents: []byte{},
				Mode:     0o600,
			},
		},
		opts: &Options{
			Config: &todos.Config{
				Types: []string{"TODO"},
			},
			Charset: "UTF-8",
			Paths:   []string{"unsupported_lang.coq"},
		},
		expected: nil,
		err:      scanner.ErrUnsupportedLanguage,
	},
}

// symlinkTestCases contains test cases for symlinked files and directories.
//
//nolint:gochecknoglobals // allow global table-driven tests.
var symlinkTestCases = []testCase{
	{
		name: "code is symlinked",
		files: []*testutils.File{
			{
				Path: "line_comments.go",
				Contents: []byte(`package foo
				// package comment

				// TODO is a function.
				// TODO: some task.
				func TODO() {
					return // Random comment
				}`),
				Mode: 0o600,
			},
		},
		links: []*testutils.Symlink{
			{
				Path:   "symlink.go",
				Target: "line_comments.go",
			},
		},
		opts: &Options{
			Config: &todos.Config{
				Types: []string{"TODO"},
			},
			FollowSymlinks: true,
			Charset:        "UTF-8",
		},
		expected: []*TODORef{
			{
				FileName: "line_comments.go",
				TODO: &todos.TODO{
					Type:        "TODO",
					Text:        "// TODO: some task.",
					Message:     "some task.",
					Line:        5,
					CommentLine: 5,
				},
			},
			{
				FileName: "symlink.go",
				TODO: &todos.TODO{
					Type:        "TODO",
					Text:        "// TODO: some task.",
					Message:     "some task.",
					Line:        5,
					CommentLine: 5,


hidden;
    width: 100%;
    padding: 0 36px 0 20px;
    background: #fff;
    text-overflow: ellipsis;
    color: #32325d;
    font-weight: 700
}

.ui-dropdown .ui-dropdown-label.ui-placeholder {
    color: rgba(50, 50, 93, .5);
    font-weight: 400 !important;
    font-size: 14px !important
}

.ui-dropdown .ui-dropdown-trigger {
    cursor: pointer;
    width: 36px;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    background-position: 50% 50%;
    background-size: 12px;
    background-repeat: no-repeat;
    background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE4IDE4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6IzlFQTBCMDt9PC9zdHlsZT48cG9seWdvbiBpZD0iU2hhcGVfMV8iIGNsYXNzPSJzdDAiIHBvaW50cz0iMTUuOSwzLjcgOSwxMC42IDIuMSwzLjcgMCw1LjkgOSwxNC45IDE4LDUuOSAiLz48L3N2Zz4=)
}

@media print {
    .ui-dropdown .ui-dropdown-trigger {
        display: none
    }
}

.ui-dropdown.ui-dropdown-open .ui-dropdown-trigger {
    background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE4IDE4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6IzlFQTBCMDt9PC9zdHlsZT48cG9seWdvbiBpZD0iU2hhcGVfMV8iIGNsYXNzPSJzdDAiIHBvaW50cz0iMTgsMTIuNyA5LDMuNyAwLDEyLjcgMi4xLDE0LjkgOSw4IDE1LjksMTQuOSAiLz48L3N2Zz4=)
}

.ui-dropdown:active .ui-dropdown-label {
    border: 1px solid #9898ae;
    box-shadow: 0 5px 8px 0


 ( points.Count() < 1 )
		return;

	m_bDirty = true;
	PushUndo( "lookat points" );

	for ( i = m_nSelection[0]; i <= m_nSelection[1]; i++ )
	{
		demosmoothing_t	*p = &m_Smoothing.smooth[ i ];

		demosmoothing_t	*earliest;
		demosmoothing_t	*current;
		demosmoothing_t	*next;
		demosmoothing_t	*latest;

		int cur;
		int cur2;

		FindSpanningPoints( p->frametick, points, cur, cur2 );

		earliest = GetBoundedSample( points, cur - 1 );
		current = GetBoundedSample( points, cur );
		next = GetBoundedSample( points, cur2 );
		latest = GetBoundedSample( points, cur2 + 1 );

		float frac = 0.0f;
		float dt = next->frametick - current->frametick;
		if ( dt > 0.0f )
		{
			frac = (float)( p->frametick - current->frametick ) / dt;
		}

		frac = clamp( frac, 0.0f, 1.0f );

		Vector splined;

		if ( spline )
		{
			Catmull_Rom_Spline_Normalize( earliest->vectarget, current->vectarget, next->vectarget, latest->vectarget, frac, splined );
		}
		else
		{
			Vector d = next->vectarget - current->vectarget;
			VectorMA( current->vectarget, frac, d, splined );
		}

		Vector vecToTarget = splined - ( p->info.GetViewOrigin() + m_vecEyeOffset );
		VectorNormalize( vecToTarget );

		QAngle angles;
		VectorAngles( vecToTarget, angles );

		p->info.flags |= FDEMO_USE_ANGLES2;
		p->info.viewAngles2 = angles;
		p->info.localViewAngles2 = angles;
	}

	PushRedo( "lookat points" );
}

void CDemoSmootherPanel::SetLastFrame( bool jumptotarget, int frame )
{
	// bool changed = frame != m_nPreviewLastFrame;

	int useFrame = max( m_Smoothing.m_nFirstSelectableSample, frame );

	m_nPreviewLastFrame = useFrame;

	/* if ( changed && !m_pLockCamera->IsSelected()  )
	{
		// Reset default view/angles
		demosmoothing_t	*p = GetCurrent();
		if ( p )
		{
			if ( p->samplepoint && !jumptotarget )
			{
				m_ViewOrigin = p->vecmoved;
				m_ViewAngles = p->angmoved;
			}
			else if ( p->targetpoint && jumptotarget )
			{
				m_ViewOrigin = p->vectarget - m_vecEyeOffset;
			}
			else
			{
				if ( m_bPreviewing && m_bPreviewOriginal )
				{
					m_ViewOrigin = p->info.viewOrigin;
					m_ViewAngles = p->info.viewAngles;
				}
				else
				{
					m_ViewOrigin = p->info.GetViewOrigin();
					m_ViewAngles = p->info.GetViewAngles();
				}
			}
		}
	} */
}

// Undo/Redo
void CDemoSmootherPanel::Undo( void )
{
	if ( m_UndoStack.Size() > 0 && m_nUndoLevel > 0 )
	{
		m_nUndoLevel--;
		DemoSmoothUndo *u = m_UndoStack[ m_nUndoLevel ];
		Assert( u->undo );

		m_Smoothing = *(u->undo);
	}
	InvalidateLayout();
}

void CDemoSmootherPanel::Redo( void )
{
	if ( m_UndoStack.Size() > 0 && m_nUndoLevel <= m_UndoStack.Size() - 1 )
	{
		DemoSmoothUndo *u = m_UndoStack[ m_nUndoLevel ];
		Assert( u->redo );

		m_Smoothing = *(u->redo);
		m_nUndoLevel++;
	}

	InvalidateLayout();
}

void CDemoSmootherPanel::Pu


::TYPE_DESC) &&
	    (*Token::getTokenTypeDescription(RecursiveArgument::TYPE_ID_RECURSIVE) == *
	     RecursiveArgument::TYPE_DESC_RECURSIVE) &&
	    (*Token::getTokenTypeDescription(Function::TYPE_ID) == *Function::TYPE_DESC)
	)
		testResult = true;
	TestCommonTools::consolePrintTestApiEnd(testResult);
	CHECK(testResult);
}

TEST_CASE("testApi0036", "[API]") {
	TestCommonTools::testApiSettingsInit();
	bool testResult = false;
	string testDescr = "convOthBase2Decimal()";
	TestCommonTools::consolePrintTestApiStart(36, testDescr);
	if (
		(NumberTheory::convOthBase2Decimal("11", 2) == 3.0) &&
		(NumberTheory::convOthBase2Decimal("011", 2) == 3.0) &&
		(NumberTheory::convOthBase2Decimal("000011", 2) == 3.0) &&
		(NumberTheory::convOthBase2Decimal("12", 3) == 5.0) &&
		(NumberTheory::convOthBase2Decimal("012", 3) == 5.0) &&
		(NumberTheory::convOthBase2Decimal("0012", 3) == 5.0) &&
		(NumberTheory::convOthBase2Decimal("123", 4) == 27.0) &&
		(NumberTheory::convOthBase2Decimal("0123", 4) == 27.0) &&
		(NumberTheory::convOthBase2Decimal("00123", 4) == 27.0) &&
		(NumberTheory::convOthBase2Decimal("1234", 5) == 194.0) &&
		(NumberTheory::convOthBase2Decimal("01234", 5) == 194.0) &&
		(NumberTheory::convOthBase2Decimal("001234", 5) == 194.0) &&
		(NumberTheory::convOthBase2Decimal("12345", 6) == 1865.0) &&
		(NumberTheory::convOthBase2Decimal("012345", 6) == 1865.0) &&
		(NumberTheory::convOthBase2Decimal("0012345", 6) == 1865.0) &&
		(NumberTheory::convOthBase2Decimal("123456", 7) == 22875.0) &&
		(NumberTheory::convOthBase2Decimal("0123456", 7) == 22875.0) &&
		(NumberTheory::convOthBase2Decimal("00123456", 7) == 22875.0) &&
		(NumberTheory::convOthBase2Decimal("1234567", 8) == 342391.0) &&
		(NumberTheory::convOthBase2Decimal("01234567", 8) == 342391.0) &&
		(NumberTheory::convOthBase2Decimal("01234567", 8) == 342391.0) &&
		(NumberTheory::convOthBase2Decimal("12345678", 9) == 6053444.0) &&
		(NumberTheory::convOthBase2Decimal("012345678", 9) == 6053444.0) &&
		(NumberTheory::convOthBase2Decimal("0012345678", 9) == 6053444.0) &&
		(NumberTheory::convOthBase2Decimal("123456789", 10) == 123456789.0) &&
		(NumberTheory::convOthBase2Decimal("0123456789", 10) == 123456789.0) &&
		(NumberTheory::convOthBase2Decimal("00123456789", 10) == 123456789.0) &&
		(NumberTheory::convOthBase2Decimal("123456789A", 11) == 2853116705.0) &&
		(NumberTheory::convOthBase2Decimal("0123456789A", 11) == 2853116705.0) &&
		(NumberTheory::convOthBase2Decimal("00123456789A", 11) == 2853116705.0) &&
		(NumberTheory::convOthBase2Decimal("123456789Ab", 12) == 73686780563.0) &&
		(NumberTheory::convOthBase2Decimal("0123456789Ab", 12) == 73686780563.0) &&
		(NumberTheory::convOthBase2Decimal("00123456789Ab", 12) ==


      'param' << match.Parameter(index: 3),
      match.CheckStackOverflow(),
      'v1' << match.BinaryDoubleOp('a', 'b'),
      'v1_boxed' << match.Box('v1'),
      match.MoveArgument('v1_boxed'),
      match.StaticCall(),
      'x2' << match.LoadField('param'),
      'y2' << match.LoadField('param'),
      'x2_unboxed' << match.Unbox('x2'),
      'y2_unboxed' << match.Unbox('y2'),
      'v2' << match.BinaryDoubleOp('x2_unboxed', 'y2_unboxed'),
      'v2_boxed' << match.Box('v2'),
      match.MoveArgument('v2_boxed'),
      match.StaticCall(),
      'rec3' << match.LoadStaticField(),
      'x3' << match.LoadField('rec3'),
      'y3' << match.LoadField('rec3'),
      'x3_unboxed' << match.Unbox('x3'),
      'y3_unboxed' << match.Unbox('y3'),
      'v3' << match.BinaryDoubleOp('x3_unboxed', 'y3_unboxed'),
      'v3_boxed' << match.Box('v3'),
      match.MoveArgument('v3_boxed'),
      match.StaticCall(),
      'rec4' << match.StaticCall(),
      'x4' << match.ExtractNthOutput('rec4', index: 0),
      'y4' << match.ExtractNthOutput('rec4', index: 1),
      'x4_unboxed' << match.Unbox('x4'),
      'y4_unboxed' << match.Unbox('y4'),
      'v4' << match.BinaryDoubleOp('x4_unboxed', 'y4_unboxed'),
      'v4_boxed' << match.Box('v4'),
      match.MoveArgument('v4_boxed'),
      match.StaticCall(),
      'rec5' << match.LoadField('obj'),
      'x5' << match.LoadField('rec5'),
      'y5' << match.LoadField('rec5'),
      'x5_unboxed' << match.Unbox('x5'),
      'y5_unboxed' << match.Unbox('y5'),
      'v5' << match.BinaryDoubleOp('x5_unboxed', 'y5_unboxed'),
      'v5_boxed' << match.Box('v5'),
      match.MoveArgument('v5_boxed'),
      match.StaticCall(),
      'obj_cid' << match.LoadClassId('obj'),
      match.MoveArgument('obj'),
      'rec6' << match.DispatchTableCall('obj_cid'),
      'x6' << match.ExtractNthOutput('rec6', index: 0),
      'y6' << match.ExtractNthOutput('rec6', index: 1),
      'x6_unboxed' << match.Unbox('x6'),
      'y6_unboxed' << match.Unbox('y6'),
      'v6' << match.BinaryDoubleOp('x6_unboxed', 'y6_unboxed'),
      'v6_boxed' << match.Box('v6'),
      match.MoveArgument('v6_boxed'),
      match.StaticCall(),
      'v7' << match.BinaryDoubleOp('a', 'b'),
      'v7_boxed' << match.Box('v7'),
      match.MoveArgument('v7_boxed'),
      match.StaticCall(),
      match.DartReturn(),
    ]),
  ]);
}

int i(int x) => x + int.parse('1');

(int, int) staticFieldI = (i(1), i(2));

abstract class B {
  (int, int) instanceFieldI = (i(1), i(2));
  (int, int) instanceCallI();
}

class B1 extends B {