/GistId:5c43f00592b523d516037445f9a4bc66
            Document doc = new Document(MyDir + "Change text in a table.docx");

            // Get the first table in the document.
            Table table = (Table)doc.GetChild(NodeType.Table, 0, true);
            // Replace any instances of our string in the last cell of the table only.
            FindReplaceOptions options = new FindReplaceOptions
            {
                MatchCase = true,
                FindWholeWordsOnly = true
            };
            table.Rows[1].Cells[2].Range.Replace("Mr", "test", options);

            doc.Save(ArtifactsDir + "Replace text - Aspose.Words.docx");
            //ExEnd:ReplaceTableTextAsposeWords
        }
    }
}


ure::new(ctx, "./examples/resources/panel.png")?,
            panel_config: NineSlice::with_border(Rectangle::new(0.0, 0.0, 32.0, 32.0), 4.0),
            text: Text::wrapped(
                LABEL,
                Font::vector(ctx, "./examples/resources/DejaVuSansMono.ttf", 14.0)?,
                PANEL_WIDTH - 16.0,
            ),
            text_pos: Vec2::new(8.0, 8.0),
        })
    }
}

impl State for GameState {
    fn update(&mut self, ctx: &mut Context) -> tetra::Result {
        self.text_pos.y += (input::get_mouse_wheel_movement(ctx).y * 8) as f32;

        if input::is_key_down(ctx, Key::W) {
            self.text_pos.y += 2.0;
        }

        if input::is_key_down(ctx, Key::S) {
            self.text_pos.y -= 2.0;
        }

        Ok(())
    }

    fn draw(&mut self, ctx: &mut Context) -> tetra::Result {
        graphics::clear(ctx, Color::rgb(0.392, 0.584, 0.929));

        let (window_width, window_height) = window::get_size(ctx);

        let panel_pos = Vec2::new(
            (window_width as f32 / 2.0) - (PANEL_WIDTH / 2.0),
            (window_height as f32 / 2.0) - (PANEL_HEIGHT / 2.0),
        )
        .round();

        self.panel_texture.draw_nine_slice(
            ctx,
            &self.panel_config,
            PANEL_WIDTH,
            PANEL_HEIGHT,
            panel_pos,
        );

        graphics::set_scissor(
            ctx,
            Rectangle::new(
                panel_pos.x as i32 + 4,
                panel_pos.y as i32 + 4,
                PANEL_WIDTH as i32 - 8,
                PANEL_HEIGHT as i32 - 8,
            ),
        );

        self.text.draw(ctx, panel_pos + self.text_pos);

        graphics::reset_scissor(ctx);

        Ok(())
    }
}

fn main() -> tetra::Result {
    ContextBuilder::new("Scissor Rectangles", 640, 480)
        .resizable(true)
        .quit_on_escape(true)
        .build()?
        .run(GameState::new)
}
<reponame>theonejb/advent-of-code-20
use std::collections::HashMap;
use std::fmt::{Display, Formatter};
use std::fmt;
use regex::Regex;

#[derive(Debug)]
pub struct Bag {
    name: String
}

impl Display for Bag {
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.name)
    }
}

impl Bag {
    pub fn new(name: &str) -> Bag {
        Bag { name: String::from(name) }
    }
}

#[derive(Debug)]
pub struct Edge {
    to_bag_type_name: String,
    quantity: u16,
}

impl Display for Edge {
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
        write!(f, "{}/{}", self.to_bag_type_name, self.quantity)
    }
}

impl Edge {
    pub fn new(to_bag_name: &str, quantity: u16) -> Edge {
        Edge {
            to_bag_type_name: String::from(to_bag_name),
            quantity,
        }
    }
}

#[derive(Debug)]
pub struct Graph {
    bags: Vec<Bag>,
    edges: HashMap<String, Vec<Edge>>,
}

impl Display for Graph {
    fn fmt(&sel


   type: "1",
      videoUrl: "https://static.ybhospital.net/test-video-3.mp4",
      albumImg:
          "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202107%2F05%2F20210705100427_ee4b8.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1628415177&t=87962cc902fb5925da0a4d60d4c48ca9",
      userName: "发布人名称",
      userAvatarUrl:
          "https://p16-tiktokcdn-com.akamaized.net/aweme/720x720/tiktok-obj/1663771856684033.jpeg",
      description: "春日的暖阳，花开进度80%，准备和爱车路过全世界，感受独具魅力的岭南文化!",
      title: "视频标题",
      likes: "130",
      likeStatus: "1",
      comments: "165",
      shares: "135",
      watchers: "320",
      favorites: "105",
      time: "2023年12月16日",
      videoTags: [
        VideoTag(tagId: "1111", tagName: "今天去哪玩"),
        VideoTag(tagId: "1111", tagName: "南京车友圈"),
        VideoTag(tagId: "1111", tagName: "活动名称"),
      ]),
  VideoData(
      id: "111",
      uid: "1233",
      type: "1",
      videoUrl: "https://static.ybhospital.net/test-video-4.mp4",
      albumImg:
          "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202107%2F05%2F20210705100427_ee4b8.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1628415177&t=87962cc902fb5925da0a4d60d4c48ca9",
      userName: "发布人名称",
      userAvatarUrl:
          "https://p16-tiktokcdn-com.akamaized.net/aweme/720x720/tiktok-obj/1663771856684033.jpeg",
      description: "春日的暖阳，花开进度80%，准备和爱车路过全世界，感受独具魅力的岭南文化!",
      title: "视频标题",
      likes: "150",
      likeStatus: "1",
      comments: "185",
      shares: "136",
      watchers: "280",
      favorites: "500",
      time: "2023年12月16日",
      videoTags: [
        VideoTag(tagId: "1111", tagName: "今天去哪玩"),
        VideoTag(tagId: "1111", tagName: "南京车友圈"),
        VideoTag(tagId: "1111", tagName: "活动名称"),
      ]),
  VideoData(
      id: "111",
      uid: "1233",
      type: "1",
      videoUrl: "https://static.ybhospital.net/test-video-5.


;
		if (!isBatch()) {
			// We look first in the experiment itself
			for (final IVariable v : getVars()) {
				if (v.isParameter()) {
					final ExperimentParameter p = new ExperimentParameter(myScope, v);
					final String parameterName = "(Experiment) " + p.getName();
					final boolean already = parameters.containsKey(parameterName);
					if (!already) {
						parameters.put(parameterName, p);
						displayables.add(p);
					}
				}
			}

			for (final IVariable v : model.getVars()) {
				if (v.isParameter()) {
					final IParameter p = new ExperimentParameter(myScope, v);
					final String parameterName = p.getName();
					final boolean already = parameters.containsKey(parameterName);
					if (!already) {
						parameters.put(parameterName, p);
						displayables.add(p);
					}
				}

			}
		}
	}

	/**
	 * Adds the default parameters.
	 */
	protected void addDefaultParameters() {
		for (final IParameter.Batch p : agent.getDefaultParameters()) { addParameter(p); }
	}

	@Override
	public final IOutputManager getExperimentOutputs() { return experimentOutputs; }

	@Override
	public void setChildren(final Iterable<? extends ISymbol> children) {
		super.setChildren(children);

		LayoutStatement layout = null;
		for (final ISymbol s : children) {
			switch (s) {
				case null:
					continue;
				case ICategory c:
					displayables.add(c);
					break;
				case TextStatement t:
					displayables.add(t);
					break;
				case LayoutStatement ls:
					layout = ls;
					break;
				case IExploration ie:
					exploration = ie;
					break;
				case SimulationOutputManager som: {
					if (originalSimulationOutputs != null) {
						originalSimulationOutputs.setChildren(som);
					} else {
						originalSimulationOutputs = som;
					}
				}
					break;
				case IParameter.Batch pb: {
					if (isBatch() && pb.canBeExplored()) {
						pb.setEditable(false);
						addExplorableParameter(pb);
						displayables.add(pb);
						continue;
					}
					final String parameterName = pb.getName();
					final boolean already = parameters.containsKey(parameterName);
					if (!already) {
						displayables.add(pb);
						parameters.put(parameterName, pb);
					}
				}
					break;
				case ExperimentOutputManager eom:
					if (experimentOutputs != null) {
						experimentOutputs.setChildren(eom);
					} else {
						experimentOutputs = eom;
					}
					break;
				default:
					continue;
			}

		}
		if (originalSimulationOutputs == null) { originalSimulationOutputs = SimulationOutputManager.createEmpty(); }
		if (experimentOutputs == null) { experimentOutputs = ExperimentOutputManager.createEmpty(); }
		if (experimentOutputs.getLayout() == null) {
			if (layout != null) {
				experimentOutputs.setLayout(layout);
			} else if (originalSimulationOutputs.getLayout() != null) {
				experimentOutputs.setLayout(originalSimulationOutputs.getLayout());
			}
		}
		displayables.addAll(getUserCommands());
	}

	/**
	 * Open.
	 *
	 * @param seed
	 *            the seed
	 */
	public synchronized void open(final Double seed) {

		createAgent(seed);

		// We add the agent as soon as possible so as to make it possible to
		// evaluate variables in the opening of the
		// experiment
		// Make sure that the attributes in experiment are initialized (see #3842)
		agent.getParameterValues().forEach((n, v) -> { if (hasVar(n)) { agent.setDirectVarValue(myScope, n, v); } });
		myScope.push(agent);
		prepareGui();
		IScope scope = agent.getS


, y - middle), D22State.INFECTED);
                }
            });
        });
        return result;
    }
}

export enum D22State {
    WEAKENED,
    INFECTED,
    FLAGGED,
}

export interface D22Position {
    x: number;
    y: number;
    dir: string;
}
import { $whichType, $isType, $equals, $isMobile } from '../src/index';

test('[core]case 1: $isType', () => {
  expect($isType('string', '')).toBe(true)
  expect($isType('string', {})).toBe(false)
})

test('[core]case 2: $whichType', () => {
  expect($whichType('')).toBe('string')
  expect($whichType({})).toBe('object')
  expect($whichType({})).toBe('object')
  expect($whichType(new WeakMap())).toBe('weakmap')
  expect($whichType(/$[0-9]/)).toBe('regexp')
})

test('[core]case 3: $equals', () => {
  expect($equals({}, {})).toBe(true)
  expect($equals([], {})).toBe(false)
  expect($equals({name: null}, {name: null})).toBe(true)
  expect($equals({name: null}, {name: undefined})).toBe(false)
  expect($equals({name: 'leeper', age: 20}, {name: 'leeper', age: 20})).toBe(true)
  expect($equals({name: 'leeper', age: 20}, {name: ['jenkin'], age: 20})).toBe(false)
  expect($equals({name: 'leeper', age: 20}, {name: 'leeper'})).toBe(false)
  expect($equals({name: ['leeper', 'jenkin'], age: 20}, {name: ['leeper', 'jenkin'], age: 20})).toBe(true)
  expect($equals({name: ['leeper', 'jenkins'], age: 20}, {name: ['leeper', 'jenkin'], age: 20})).toBe(false)
  expect($equals({name: {firstname: 'leeper'}, age: 20}, {name: {firstname: 'leeper'}, age: 20})).toBe(true)
  expect($equals({name: {firstname: 'jenkin'}, age: 20}, {name: {firstname: 'leeper'}, age: 20})).toBe(false)
  expect($equals([1, 2, 3, [2, 3, 4]], [1, 2, 3, [2, 3, 4]])).toBe(true)
  expect($equals([1, 2, 4, [2, 3, 4]], [1, 2, 3, [2, 3, 4]])).toBe(false)
  expect($equals(new Date('2019-10-09'), new Date('2019-10-09'))).toBe(true)
  expect($equals(new Date('2019-10-09'), new Date('2019-10-10'))).toBe(false)
  expect($equals([1, 2, 4, [2, 3, 4]], [1, 2, 3, [2, 3, 4]])).toBe(false)
})

test('[core]case 4: $isMobile', () => {
  expect($isMobile()).toBe(false)
})import {
	ACCOUNTEXECUTELIST,
	ACCOUNTTASKINFO,
	ACCOUNTSINGLECHECK,
	ACCOUNTALLCHECK,
	TASKEXECUTELIST,
	TASKSINGLECHECK,
	TASKALLCHECK,
	TASKEXECLISTINFO, //任务->队列 列表数据
	TASKINFOSINGLECHECK, //任务->队列->单选
	TASKINFOALLCHECK //任务->队列->全选
} from "./types";
import { handleActions } from "redux-actions";
const defaultState: any = null;

// 账号执行列表
export const accountExecuteList = handleActions(
	{
		[ACCOUNTEXECUTELIST]: (state, { payload }) => {
			if (payload && payload.accounts) {
				payload.accounts.map((item: any) => {
					item.isChecked = false;
				});
			}
			return { ...payload };
		},
		// 单选
		[ACCOUNTSINGLECHECK]: (state, { payload }) => {
			let list = state.accounts;
			if (list) {
				list.map((item: any) => {
					if


x4_SUBI1

	addic.		L,	L,	-1
	ble		.LDTRMM_L1x4_SAVE
	b		.LDTRMM_L1x4_SUB2

.LDTRMM_L1x4_SUB1:

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

.LDTRMM_L1x4_SUB2:

	KERNEL1x4_SUB1

	addic.		L,	L,	-1
	bgt		.LDTRMM_L1x4_SUB2

.LDTRMM_L1x4_SAVE:

	SAVE1x4

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

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

.LDTRMM_L1x4_END:

.LDTRMM_L1x2_BEGIN:

	andi.		T1,	M,	2
	ble		.LDTRMM_L1x2_END

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

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

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

.LDTRMM_L1x2_LOOP_START:

	LOAD1x2_1
	KERNEL1x2_I1
	KERNEL1x2_2
	KERNEL1x2_1
	KERNEL1x2_2

	KERNEL1x2_1
	KERNEL1x2_2
	KERNEL1x2_1
	KERNEL1x2_2

	addic.		L,	L,	-2
	ble		.LDTRMM_L1x2_LOOP_END

	.align 5

.LDTRMM_L1x


st[u] + e.w)
            {
                dist[e.v] = dist[u] + e.w;
                if (!in[e.v])
                {
                    q.push(e.v);
                    in[e.v] = 1;
                }
            }
        }
    }
}

int main(int argc, char *argv[])
{
    cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);

    int cases;
    cin >> cases;
    for (int cs = 0; cs < cases; cs++)
    {
        cin >> n;
        idx = 0, mi = INF, mx = -INF;
        memset(head, -1, sizeof(head));
        int u, v, w;
        for (int i = 0; i < n; i++)
        {
            cin >> u >> v >> w;
            u++, v++;
            addEdge(v, u - 1, -w);
            mi = min(mi, u), mx = max(mx, v);
        }
        for (int i = mi; i <= mx; i++)
        {
            addEdge(i - 1, i, 1);
            addEdge(i, i - 1, 0);
        }
        spfa();
        if (cs) cout << '\n';
        cout << (dist[mx] - dist[mi - 1]) << '\n';
    }

    return 0;
}
// Need for Speed
// UVa ID: 1753
// Verdict: Accepted
// Submission Date: 2017-06-15
// UVa Run Time: 0.000s
//
// 版权所有（C）2017，邱秋。metaphysis # yeah dot net

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char *argv[])
{
    cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);

    int n;
    double t, d, s;

    while (cin >> n >> t)
    {
        double low = 10000.0, up = 2000000.0;

        vector<double> di, si;
        for (int i = 1; i <= n; i++)
        {
            cin >> d >> s;
            di.push_back(d), si.push_back(s);
            if (low > s) low = s;
        }

        low = -low;

        double middle, total = 0.0;
        int iterations = 0;

        while (fabs(total - t) > 1e-9 && iterations++ < 60)
        {
            total = 0.0;
            middle = (low + up) / 2.0;
            for (int i = 0; i < di.size(); i++) total += (di[i] / (si[i] + middle));
            if (total > t) low = middle;
            else up = middle;
        }

        cout << fixed << setprecision(9) << middle << '\n';
    }

    return 0;
}
// Amalgamated Artichokes
// UVa ID: 1709
// Verdict: TLE
// Submission Date: 2021-12-02
// UVa Run Time: s
//
// 版权所有（C）2021，邱秋。metaphysis # yeah dot net

#include <bits/stdc++.h>

using namespace std;

#define LC(x) ((x << 1) | 1)
#define RC(x) ((x + 1) << 1)

const int MAXV = 1000100;
const double INF = 1e10;

int p, a, b, c, d, n;
double st[MAXV << 2];

double inline getPrice(int k)
{
    return p * (sin(a * k + b) + cos(c * k + d) + 2);
}

void build(int p, int left, int right)
{
    if (left == right) st[p] = get


েছেন। তিনি তো এসব কিছু থেকে পবিত্র, বরং নভোমন্ডল ও ভূমন্ডলে যা কিছু রয়েছে সবই তার আজ্ঞাধীন।"
  },
  {
    "surah_number": 2,
    "verse_number": 117,
    "content":
        "তিনি নভোমন্ডল ও ভূমন্ডলের উদ্ভাবক। যখন তিনি কোন কার্য সম্পাদনের সিন্ধান্ত নেন, তখন সেটিকে একথাই বলেন, ‘হয়ে যাও’ তৎক্ষণাৎ তা হয়ে যায়।"
  },
  {
    "surah_number": 2,
    "verse_number": 118,
    "content":
        "যারা কিছু জানে না, তারা বলে, আল্লাহ আমাদের সঙ্গে কেন কথা বলেন না? অথবা আমাদের কাছে কোন নিদর্শন কেন আসে না? এমনি ভাবে তাদের পূর্বে যারা ছিল তারাও তাদেরই অনুরূপ কথা বলেছে। তাদের অন্তর একই রকম। নিশ্চয় আমি উজ্জ্বল নিদর্শনসমূহ বর্ণনা করেছি তাদের জন্যে যারা প্রত্যয়শীল।"
  },
  {
    "surah_number": 2,
    "verse_number": 119,
    "content":
        "নিশ্চয় আমি আপনাকে সত্যধর্মসহ সুসংবাদদাতা ও ভীতি প্রদর্শনকারীরূপে পাঠিয়েছি। আপনি দোযখবাসীদের সম্পর্কে জিজ্ঞাসিত হবেন না।"
  },
  {
    "surah_number": 2,
    "verse_number": 120,
    "content":
        "


 1; }
            bucket_counts[i] += 1;
        }

        let mut transactions_per_bucket = Object::new();
        let mut buckets = Array::new();
        transactions_per_bucket.insert("total", transactions.len().into());
        for (&value, &count) in bucket_values.iter().zip(&bucket_counts) {
            if count > 0 {
                transactions_per_bucket.insert(value.to_string().as_str(), JsonValue::from(count));
                buckets.push(value.into());
            }
        }
        transactions_per_bucket.insert("buckets", JsonValue::Array(buckets));

        Ok(JsonValue::Object(transactions_per_bucket))
    }

    // Blockchain

    fn block_number(&self, _params: Array) -> Result<JsonValue, JsonValue> {
        Ok(self.consensus.blockchain.height().into())
    }

    fn get_block_transaction_count_by_hash(&self, params: Array) -> Result<JsonValue, JsonValue> {
        Ok(self.block_by_hash(params.get(0).unwrap_or(&Null))?
            .body.ok_or_else(|| object!{"message" => "No body for block found"})?
            .transactions.len().into())
    }

    fn get_block_transaction_count_by_number(&self, params: Array) -> Result<JsonValue, JsonValue> {
        Ok(self.block_by_number(params.get(0).unwrap_or(&Null))?
            .body.ok_or_else(|| object!{"message" => "No body for block found"})?
            .transactions.len().into())
    }

    fn get_block_by_hash(&self, params: Array) -> Result<JsonValue, JsonValue> {
        Ok(self.block_to_obj(&self.block_by_hash(params.get(0).unwrap_or(&Null))?, params.get(1).and_then(|v| v.as_bool()).unwrap_or(false)))
    }

    fn get_block_by_number(&self, params: Array) -> Result<JsonValue, JsonValue> {
        Ok(self.block_to_obj(&self.block_by_number(params.get(0).unwrap_or(&Null))?, params.get(1).and_then(|v| v.as_bool()).unwrap_or(false)))
    }

    // Block production

    fn get_work(&self, params: Array) -> Result<JsonValue, JsonValue> {
        let block = self.produce_block(params)?;
        let block_bytes = block.serialize_to_vec();

        Ok(object!{
            "data" => hex::encode(&block_bytes[..BlockHeader::SIZE]),
            "suffix" => hex::encode(&block_bytes[BlockHeader::SIZE..]),
            "target" => u32::from(block.header.n_bits),
            "algorithm" => "nimiq-argon2",
        })
    }

    fn get_block_template(&self, params: Array) -> Result<JsonValue, JsonValue> {
        let block = self.produce_block(params)?;
        let header = block.header;
        let json_header = object!{
            "version" => header.version,
            "prevHash" => header.prev_hash.to_hex(),
            "interlinkHash" => header.interlink_hash.to_hex(),
            "accountsHash" => header.accounts_hash.to_hex(),
            "nBits" => u32::from(header.n_bits),
            "height" => header.height,
        };
        let body = block.body.unwrap();
        let merkle_path = MerklePath::new::<Blake2bHasher, Blake2bHash>(&body.get_merkle_leaves::<Blake2bHash>(), &body.miner.hash::<Blake2bHash>());
        let json_body = object!{
            "hash" => header.body_hash.to_hex(),
            "minerAddr" => body.miner.to_hex(),
            "extraData


key", cf.MsgKey),
	)
	return cf
}

func (cf *ParserFact) valid() error {
	if cf.NFork < 1 {
		cf.NFork = 4
		log.Logger.Info("reset n_fork", zap.Int("n_fork", cf.NFork))
	}

	if cf.NewTimeFormat == "" {
		cf.NewTimeFormat = "2006-01-02T15:04:05.000000Z"
		log.Logger.Info("reset new_time_format", zap.String("new_time_format", cf.NewTimeFormat))
	}

	if cf.NewTimeKey == "" {
		cf.NewTimeKey = "@timestamp"
		log.Logger.Info("reset new_time_key", zap.String("new_time_key", cf.NewTimeKey))
	}

	return nil
}

func (cf *ParserFact) GetName() string {
	return cf.Name + "-parser"
}

func (cf *ParserFact) IsTagSupported(tag string) (ok bool) {
	_, ok = cf.tagsset[tag]
	return ok
}

func (cf *ParserFact) Spawn(ctx context.Context, tag string, outChan chan<- *library.FluentMsg) chan<- *library.FluentMsg {
	log.Logger.Info("spawn parser tagfilter", zap.String("tag", tag))
	inChan := make(chan *library.FluentMsg, cf.defaultInternalChanSize)

	inchans := []chan *library.FluentMsg{}
	for i := 0; i < cf.NFork; i++ {
		eachInchan := make(chan *library.FluentMsg, cf.defaultInternalChanSize)
		go cf.StartNewParser(ctx, outChan, eachInchan)
		inchans = append(inchans, eachInchan)
	}

	go cf.runLB(ctx, cf.LBKey, inChan, inchans)
	return inChan
}
package controller

import (
	"context"
	"fmt"
	"sync"

	"gofluentd/internal/monitor"
	"gofluentd/internal/tagfilters"
	"gofluentd/library"
	"gofluentd/library/log"

	utils "github.com/Laisky/go-utils"
	"github.com/Laisky/zap"
)

type DispatcherCfg struct {
	InChan             chan *library.FluentMsg
	TagPipeline        tagfilters.TagPipelineItf
	NFork, OutChanSize int
}

// Dispatcher dispatch messages by tag to different concator
type Dispatcher struct {
	*DispatcherCfg
	tag2Concator *sync.Map               // tag:msgchan
	tag2Counter  *sync.Map               // tag:counter
	tag2Cancel   *sync.Map               // tag:cancel
	outChan      chan *library.FluentMsg // skip concator, direct to producer
	counter      *utils.Counter
}

// NewDispatcher create new Dispatcher
func NewDispatcher(cfg *DispatcherCfg) *Dispatcher {
	d := &Dispatcher{
		DispatcherCfg: cfg,
		outChan:       make(chan *library.FluentMsg, cfg.OutChanSize),
		tag2Concator:  &sync.Map{},
		tag2Counter:   &sync.Map{},
		tag2Cancel:    &sync.Map{},
		counter:       utils.NewCounter(),
	}
	if err := d.valid(); err != nil {
		log.Logger.Panic("config invalid", zap.Error(err))
	}

	log.Logger.Info("create Dispatcher",
		zap.Int("n_fork", d.NFork),
		zap.Int("out_chan_size", d.OutChanSize),
	)
	return d
}

func (d *Dispatcher) valid() error {
	if d.NFork <= 0 {
		d.NFork = 4
		log.Logger.Info("reset n_fork", zap.Int("n_fork", d.NFork))
	}

	if d.OutChanSize <= 0 {
		d.OutChanSize = 1000
		log.Logger.Info("reset out_chan_size", zap.Int("out_chan_size", d.OutChanSize))
	}

	return nil
}

// Run dispacher to dispatch me


shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
 * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
 *  */

!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";if(a.matchMedia&&a.matchMedia("all").addListener)return!1;var b=a.matchMedia,c=b("only all").matches,d=!1,e=0,f=[],g=function(){a.clearTimeout(e),e=a.setTimeout(function(){for(var c=0,d=f.length;d>c;c++){var e=f[c].mql,g=f[c].listeners||[],h=b(e.media).matches;if(h!==e.matches){e.matches=h;for(var i=0,j=g.length;j>i;i++)g[i].call(a,e)}}},30)};a.matchMedia=function(e){var h=b(e),i=[],j=0;return h.addListener=function(b){c&&(d||(d=!0,a.addEventListener("resize",g,!0)),0===j&&(j=f.push({mql:h,listeners:i})),i.push(b))},h.removeListener=function(a){for(var b=0,c=i.length;c>b;b++)i[b]===a&&i.splice(b,1)},h}}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz


Updates [target] to be the time at [dateTime].
  ///
  /// Time zone information will not be preserved.
  static void setFromDateTime(TimestampMixin target, DateTime dateTime) {
    final micros = dateTime.microsecondsSinceEpoch;
    target.seconds = Int64((micros / Duration.microsecondsPerSecond).floor());
    target.nanos = (micros % Duration.microsecondsPerSecond).toInt() * 1000;
  }

  static String _twoDigits(int n) {
    if (n >= 10) return '$n';
    return '0$n';
  }

  static final DateTime _minTimestamp = DateTime.utc(1);
  static final DateTime _maxTimestamp = DateTime.utc(9999, 13, 31, 23, 59, 59);

  // From google/protobuf/timestamp.proto:
  // # JSON Mapping
  //
  // In JSON format, the Timestamp type is encoded as a string in the
  // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
  // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
  // where {year} is always expressed using four digits while {month}, {day},
  // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
  // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
  // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
  // is required. A proto3 JSON serializer should always use UTC (as indicated by
  // "Z") when printing the Timestamp type and a proto3 JSON parser should be
  // able to accept both UTC and other timezones (as indicated by an offset).
  //
  // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
  // 01:30 UTC on January 15, 2017.
  static Object toProto3JsonHelper(
    GeneratedMessage message,
    TypeRegistry typeRegistry,
  ) {
    final timestamp = message as TimestampMixin;
    final dateTime = timestamp.toDateTime();

    if (timestamp.nanos < 0) {
      throw ArgumentError(
        'Timestamp with negative `nanos`: ${timestamp.nanos}',
      );
    }
    if (timestamp.nanos > 999999999) {
      throw ArgumentError(
        'Timestamp with `nanos` out of range: ${timestamp.nanos}',
      );
    }
    if (dateTime.isBefore(_minTimestamp) || dateTime.isAfter(_maxTimestamp)) {
      throw ArgumentError(
        'Timestamp Must be from 0001-01-01T00:00:00Z to '
        '9999-12-31T23:59:59Z inclusive. Was: ${dateTime.toIso8601String()}',
      );
    }

    // Because [DateTime] doesn't have nano-second precision, we cannot use
    // dateTime.toIso8601String().
    final y = '${dateTime.year}'.padLeft(4, '0');
    final m = _twoDigits(dateTime.month);
    final d = _twoDigits(dateTime.day);
    final h = _twoDigits(dateTime.hour);
    final min = _twoDigits(dateTime.minute);
    final sec = _twoDigits(dateTime.second);
    var secFrac = '';
    if (timestamp.nanos > 0) {
      secFrac =
          '.${timestamp.nanos.toString().padLeft(9, '0').replaceFirst(finalGroupsOfThreeZeroes, '')}';
    }
    return '$y-$m-${d}T$h:$min:$sec${secFrac}Z';
  }

  static void fromProto3JsonHelper(
    GeneratedMessage message,
    Object json,
    TypeRegistry typeRegistry,
    JsonParsingContext context,
  ) {
    if (json is String) {
      var jsonWithoutFracSec = json;
      var nanos = 0;
      final Match? fracSecsMatch = RegExp(r'\.(\d+)').firstMatch(json);
      if (fracSecsMatch != null) {
        final fracSecs = fracSecs


 );
						}
					}else{// ctOonȂ
						//󃆃jbgɂȂ̂ŁAp\ȃjbgT
						for(j=0;j<group->unit_count;j++){
							unit2=&group->unit[j];
							if(s_flag[j] && !r_flag[j]){
								// pړ(rangept)
								int range=unit1->range;
								map_delblock(&unit2->bl);
								unit2->bl.m = m;
								unit2->bl.x = unit1->bl.x + dx;
								unit2->bl.y = unit1->bl.y + dy;
								unit2->range = unit1->range;
								map_addblock(&unit2->bl);
								clif_skill_setunit(unit2);
								if(range > 0){
									if(range < 7)
										range = 7;
									map_foreachinarea( skill_unit_move_unit_group_sub, unit2->bl.m,
										unit2->bl.x-range,unit2->bl.y-range,unit2->bl.x+range,unit2->bl.y+range,0,
										&unit2->bl,gettick() );
								}
								s_flag[j]=0;// p̂off
								break;
							}
						}
					}
				}
			}
			free(r_flag);
			free(s_flag);
			free(m_flag);
		}
	}
	return 0;
}

/*----------------------------------------------------------------------------
 * ACe
 *----------------------------------------------------------------------------
 */

/*==========================================
 * ACe\
 *------------------------------------------
 */
int skill_can_produce_mix( struct map_session_data *sd, int nameid, int trigger )
{
	int i,j;

	nullpo_retr(0, sd);

	if(nameid<=0)
		return 0;

	for(i=0;i<MAX_SKILL_PRODUCE_DB;i++){
		if(skill_produce_db[i].nameid == nameid )
			break;
	}
	if( i >= MAX_SKILL_PRODUCE_DB )	/* f[^x[XɂȂ */
		return 0;

	if(trigger>=0){
		if(trigger == 32 || trigger == 16 || trigger==64 || trigger == 256) {
			if(skill_produce_db[i].itemlv != trigger)	/* t@[}V[|[VނƗnzFzΈȊO͂ */
				return 0;
		}else{
			if(skill_produce_db[i].itemlv>=16)		/* ȊO͂ */
				return 0;
			if( itemdb_wlv(nameid)>trigger )	/* Lv */
				return 0;
		}
	}
	if( (j=skill_produce_db[i].req_skill)>0 && pc_checkskill(sd,j)<=0 )
		return 0;		/* XLȂ */

	for(j=0;j<MAX_PRODUCE_RESOURCE;j++){
		int id,x,y;
		if( (id=skill_produce_db[i].mat_id[j]) <= 0 )	/* ȏ͍ޗvȂ */
			continue;
		if(skill_produce_db[i].mat_amount[j] <= 0) {
			if(pc_search_inventory(sd,id) < 0)
				return 0;
		}
		else {
			for(y=0,x=0;y<MAX_INVENTORY;y++)
				if( sd->status.inventory[y].nameid == id )
					x+=sd->status.inventory[y].amount;
			if(x<skill_produce_db[i].mat_amount[j])	/* ACeȂ */
				return 0;
		}
	}
	return i+1;
}

/*==========================================
 * ACe\
 *------------------------------------------
 */
int skill_produce_mix( struct map_session_data *sd,
	int nameid, int slot1, int slot2, int slot3 )
{
	int slot[3];
	int i,sc,ele,idx,equip,wlv,make_per,flag;

	nullpo_retr(0, sd);

	if( !(idx=skill_can_produce_mix(sd,nameid,-1)) )	/* s */
		return 0;
	idx--;
	slot[0]=slot1;
	slot[1]=slot2;
	slot[2]=slot3;

	/* ߍݏ */
	for(i=0,sc=0,ele=0;i<3;i++){
		int j;
		if( slot[i]<=0 )
			continue;
		j = pc_search_inventory(sd,slot[i]);
		if(j < 0)	/* spPbg(ACe)`FbN */
			continue;
		if(slot[i]==1000){	/* ̂ */
			pc_delitem(sd,j,1,1);
			sc++;
		}
		if(slot[i]>=994 && slot[i]<=997 && ele==0){	/*  */
			static const int ele_table[4]={3,1,4,2};
			pc_delitem(sd,j,1,1);
			ele=ele_table[slot[i]-994];
		}
	}

	/* ޗ */
	for(i=0;i<MAX_PRODUCE_RESOURCE;i++){
		int j,id,x;
		if( (id=skill_produce_db[idx].mat_id[i]) <= 0 )
			continue;
		x=skill_produce_db[idx].mat_amount[i];	/* KvȌ */
		do{	/* Qȏ̃CfbNXɂ܂Ă邩Ȃ */
			int y=0;
			j = pc_search_inventory(sd,id);

			if(j >= 0){
				y = sd->status.inventory[j].amount;
				if(y>x)y=x;	/* Ă */
				pc_delitem(sd,j,y,0);
			}else {
				if(battle_config.error_log)
					printf("skill_produce_mix: material item error\n");
			}

			x-=y;	/* ܂ȂvZ */
		}while( j>=0 && x>0 );	/* ޗ邩AG[ɂȂ܂ŌJԂ */
	}

	/* m */
	equip = itemdb_isequip(nameid);
	if(!equip) {
		if(skill_produce_db[idx].req_skill==AM_PHARMACY) {
			if((nameid >= 501 && nameid <= 506) || (nameid >= 545 && nameid <= 547) || nameid == 525)
				make_per = 2000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_POTIONPITCHER)*100;
			else if(nameid == 970)
				make_per = 1500 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300;
			else if(nameid == 7135)
				make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_DEMONSTRATION)*100;
			else if(nameid


err)
		}
	}

	if err = d.Set("outgoing_ip6", flattenWebProxyExplicitOutgoingIp6(o["outgoing-ip6"], d, "outgoing_ip6", sv)); err != nil {
		if !fortiAPIPatch(o["outgoing-ip6"]) {
			return fmt.Errorf("Error reading outgoing_ip6: %v", err)
		}
	}

	if err = d.Set("strict_guest", flattenWebProxyExplicitStrictGuest(o["strict-guest"], d, "strict_guest", sv)); err != nil {
		if !fortiAPIPatch(o["strict-guest"]) {
			return fmt.Errorf("Error reading strict_guest: %v", err)
		}
	}

	if err = d.Set("pref_dns_result", flattenWebProxyExplicitPrefDnsResult(o["pref-dns-result"], d, "pref_dns_result", sv)); err != nil {
		if !fortiAPIPatch(o["pref-dns-result"]) {
			return fmt.Errorf("Error reading pref_dns_result: %v", err)
		}
	}

	if err = d.Set("unknown_http_version", flattenWebProxyExplicitUnknownHttpVersion(o["unknown-http-version"], d, "unknown_http_version", sv)); err != nil {
		if !fortiAPIPatch(o["unknown-http-version"]) {
			return fmt.Errorf("Error reading unknown_http_version: %v", err)
		}
	}

	if err = d.Set("realm", flattenWebProxyExplicitRealm(o["realm"], d, "realm", sv)); err != nil {
		if !fortiAPIPatch(o["realm"]) {
			return fmt.Errorf("Error reading realm: %v", err)
		}
	}

	if err = d.Set("sec_default_action", flattenWebProxyExplicitSecDefaultAction(o["sec-default-action"], d, "sec_default_action", sv)); err != nil {
		if !fortiAPIPatch(o["sec-default-action"]) {
			return fmt.Errorf("Error reading sec_default_action: %v", err)
		}
	}

	if err = d.Set("https_replacement_message", flattenWebProxyExplicitHttpsReplacementMessage(o["https-replacement-message"], d, "https_replacement_message", sv)); err != nil {
		if !fortiAPIPatch(o["https-replacement-message"]) {
			return fmt.Errorf("Error reading https_replacement_message: %v", err)
		}
	}

	if err = d.Set("message_upon_server_error", flattenWebProxyExplicitMessageUponServerError(o["message-upon-server-error"], d, "message_upon_server_error", sv)); err != nil {
		if !fortiAPIPatch(o["message-upon-server-error"]) {
			return fmt.Errorf("Error reading message_upon_server_error: %v", err)
		}
	}

	if err = d.Set("pac_file_server_status", flattenWebProxyExplicitPacFileServerStatus(o["pac-file-server-status"], d, "pac_file_server_status", sv)); err != nil {
		if !fortiAPIPatch(o["pac-file-server-status"]) {
			return fmt.Errorf("Error reading pac_file_server_status: %v", err)
		}
	}

	if err = d.Set("pac_file_url", flattenWebProxyExplicitPacFileUrl(o["pac-file-url"], d, "pac_file_url", sv)); err != nil {
		if !fortiAPIPatch(o["pac-file-url"]) {
			return fmt.Errorf("Error reading pac_file_url: %v", err)
		}
	}

	if err = d.Set("pac_file_server_port", flattenWebProxyExplicitPacFileServerPort(o["pac


ngth, sequence_length)`.

    在传递`output_attentions=True`或`config.output_attentions=True`时返回，用于计算自注意力头中加权平均值的注意力权重。

NystromformerForMultipleChoice 的前向方法，覆盖了 `__call__` 特殊方法。

虽然前向传递的步骤需要在此函数内定义，但应该在此之后调用 `Module` 实例，而不是在此处调用，因为前者会负责运行预处理和后处理步骤，而后者会默默地忽略它们。

示例：

```py
>>> from transformers import AutoTokenizer, NystromformerForMultipleChoice
>>> import torch

>>> tokenizer = AutoTokenizer.from_pretrained("uw-madison/nystromformer-512")
>>> model = NystromformerForMultipleChoice.from_pretrained("uw-madison/nystromformer-512")

>>> prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
>>> choice0 = "It is eaten with a fork and a knife."
>>> choice1 = "It is eaten while held in the hand."
>>> labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

>>> encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
>>> outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

>>> # the linear classifier still needs to be trained
>>> loss = outputs.loss
>>> logits = outputs.logits
```

## NystromformerForTokenClassification

### `class transformers.NystromformerForTokenClassification`

[< source >](https://github.com/huggingface/transformers/blob/v4.37.2/src/transformers/models/nystromformer/modeling_nystromformer.py#L938)

```py
( config )
```

参数

+   `config` (NystromformerConfig) — 包含模型所有参数的模型配置类。使用配置文件初始化不会加载与模型相关的权重，只加载配置。查看 from_pretrained() 方法以加载模型权重。

Nyströmformer 模型，顶部带有一个标记分类头（隐藏状态输出的线性层），例如用于命名实体识别（NER）任务。

此模型是 PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) 的子类。将其用作常规 PyTorch 模块，并参考 PyTorch 文档以获取有关一般用法和行为的所有相关信息。

#### `forward`

[< source >](https://github.com/huggingface/transformers/blob/v4.37.2/src/transformers/models/nystromformer/modeling_nystromformer.py#L957)

```py
( input_ids: Optional = None attention_mask: Optional = None token_type_ids: Optional = None position_ids: Optional = None head_mask: Optional = None inputs_embeds: Optional = None labels: Optional = None output_attentions: Optional =


l)
        .staggerTo(spheres[i], duration / 6, {scale: 1.25}, interval, duration / 6)
        .staggerTo(spheres[i], duration / 6, {scale: 1}, interval, duration * 4 / 6);*/
    if ( i % 2 === 0 ) {
        console.log(tl[i]);
        tl[i].delay(interval * spheres[0].length);
        //tl[1].delay(interval * spheres[0].length);
    }

    tl[i].repeatDelay(0).play();
}

frame.addEventListener('mouseenter', toggleTLplay);
frame.addEventListener('mouseleave', toggleTLplay);

function toggleTLplay():void {
    tl.forEach(tl => {
        if(tl.paused()) {
            tl.play();
        }else {
            tl.pause();
        }
    });
}
import { IExpireDateFactory } from '../../interfaces'
import { TimesInMiliseconds } from './time-in-ms'

class ExpireDateFromString implements IExpireDateFactory {
  public convertToDate(expires: string): Date {
    let totalTimeInMs = 0
    const usedDateTypes: string[] = []

    expires.split(' ').forEach((strDate: string) => {
      const value = strDate.substring(0, strDate.length - 1)
      const dateType = strDate.at(strDate.length - 1) as keyof typeof TimesInMiliseconds

      if (TimesInMiliseconds[dateType] && Number(value) && !usedDateTypes.includes(dateType)) {
        totalTimeInMs += TimesInMiliseconds[dateType] * Number(value)
        usedDateTypes.push(dateType)
      } else {
        throw new Error('Invalid date string!')
      }
    })
    return new Date(new Date().getTime() + totalTimeInMs)
  }
}

export const expireDateFromString = new ExpireDateFromString()
// Must be (min-width) only.
// It will scale upwards to higher widths by default
// @media screen and (min-width:1200px) { .... }

import {Breakpoints, MediaQueries} from './types';

export const createMediaQueries = (breakpoints: Breakpoints) => {
  let mediaQueries: MediaQueries = {};

  if (breakpoints.xs !== 0)
    throw new Error("First 'xs' breakpoint's value must be 0");

  Object.keys(breakpoints).map((key) => {
    // @ts-ignore
    mediaQueries[key] = `@media screen and (min-width:${breakpoints[key]}px)`;
  });

  return mediaQueries;
};
import { ContentType, ContentTypeCreationInformation } from "gd-sprest-def/lib/SP";
import { IcreateContentType } from "../../../@types/helper/methods";
import { Web } from "../../lib";
declare var SP;

/**
 * Creates a content type in a web or specified list.
 * @param ctInfo - The content type information.
 * @param parentInfo - The parent content type id and url containing it.
 * @param webUrl - The relative url to create the content type in.
 * @param listName - The list name to add the content type to.
 */
export const createContentType: IcreateContentType = (ctInfo: ContentTypeCreationInformation, parentInfo: { Id: string, Url?: string }, webUrl?: string, listName?: string): PromiseLike<ContentType> => {
    // Return a promise
    return new Promise((resolve, reject) => {
        // Set the context
        let ctx = webUrl ? new SP.ClientContext(webUrl) : SP.ClientContext.get_current();

        // Get the parent content type
        let parentContentType = (parentInfo.Url ? ctx.get_site().openWeb(parentInfo.Url) : ctx.get_


Type.VARCHAR(3), this, "");

    /**
     * The column INFORMATION_SCHEMA.ROUTINES.IS_UDT_DEPENDENT.
     */
    public final TableField<Record, String> IS_UDT_DEPENDENT = createField(DSL.name("IS_UDT_DEPENDENT"), SQLDataType.VARCHAR(3), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_FROM_DATA_TYPE.
     */
    public final TableField<Record, String> RESULT_CAST_FROM_DATA_TYPE = createField(DSL.name("RESULT_CAST_FROM_DATA_TYPE"), SQLDataType.VARCHAR(65536), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_AS_LOCATOR.
     */
    public final TableField<Record, String> RESULT_CAST_AS_LOCATOR = createField(DSL.name("RESULT_CAST_AS_LOCATOR"), SQLDataType.VARCHAR(3), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_CHAR_MAX_LENGTH.
     */
    public final TableField<Record, Long> RESULT_CAST_CHAR_MAX_LENGTH = createField(DSL.name("RESULT_CAST_CHAR_MAX_LENGTH"), SQLDataType.BIGINT, this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_CHAR_OCTET_LENGTH.
     */
    public final TableField<Record, Long> RESULT_CAST_CHAR_OCTET_LENGTH = createField(DSL.name("RESULT_CAST_CHAR_OCTET_LENGTH"), SQLDataType.BIGINT, this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_CHAR_SET_CATALOG.
     */
    public final TableField<Record, String> RESULT_CAST_CHAR_SET_CATALOG = createField(DSL.name("RESULT_CAST_CHAR_SET_CATALOG"), SQLDataType.VARCHAR(65536), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_CHAR_SET_SCHEMA.
     */
    public final TableField<Record, String> RESULT_CAST_CHAR_SET_SCHEMA = createField(DSL.name("RESULT_CAST_CHAR_SET_SCHEMA"), SQLDataType.VARCHAR(128), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_CHARACTER_SET_NAME.
     */
    public final TableField<Record, String> RESULT_CAST_CHARACTER_SET_NAME = createField(DSL.name("RESULT_CAST_CHARACTER_SET_NAME"), SQLDataType.VARCHAR(128), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_COLLATION_CATALOG.
     */
    public final TableField<Record, String> RESULT_CAST_COLLATION_CATALOG = createField(DSL.name("RESULT_CAST_COLLATION_CATALOG"), SQLDataType.VARCHAR(128), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUTINES.RESULT_CAST_COLLATION_SCHEMA.
     */
    public final TableField<Record, String> RESULT_CAST_COLLATION_SCHEMA = createField(DSL.name("RESULT_CAST_COLLATION_SCHEMA"), SQLDataType.VARCHAR(128), this, "");

    /**
     * The column
     * INFORMATION_SCHEMA.ROUT


        }

        TaskSequenceManagerViewState state = TaskSequenceManagerViewState.GetInstance(manager);

        // Create list of clones, ordered by their index in the sequence list
        List<(TaskSequence Seq, int Idx)> clones =
            state.SelectedSequences.SelectedEntries.
                  Select(x => (Seq: x.Value.CreateClone(), Idx: x.Key)).
                  OrderBy(x => x.Idx).ToList();

        ObservableList<TaskSequence> sequences = state.TaskSequenceManager.Sequences;
        SortedList<int, TaskSequence> tmpSortedList = new SortedList<int, TaskSequence>();

        int offset = 0;
        foreach ((TaskSequence Seq, int Idx) item in clones) {
            item.Seq.DisplayName = TextIncrement.GetNextText(sequences.Select(x => x.DisplayName).ToList(), item.Seq.DisplayName, false);
            tmpSortedList.Add(offset + item.Idx + 1, item.Seq); // +1 to add after the existing item
            offset++;
        }

        foreach (KeyValuePair<int, TaskSequence> entry in tmpSortedList) {
            sequences.Insert(entry.Key, entry.Value);
        }

        // virtualization of task sequence list box items not implemented yet, and there's no reason
        // to do it since I doubt anyone will use enough to where it makes a difference
        state.SelectedSequences.Clear();
        state.SelectedSequences.SelectItems(clones.Select(x => x.Seq));
    }
}


ɯeɚ'П#ƾͅ1ʙ2ʎɤ#ȿɯHbɱΫ̓#°SɗXAßHJ\"\x00,\x00)Òɸɗì#5ʬ$#ɚԔ#ɚģ1ʃ2ɲ	1ɯ²ɯÀɗÈ1ʼ\r1ʉɧҳʆ\"ɛ൦ʉ͇̓Ϫ̓('ɚӜ#ʶ̓g͇೫ɯƧ$ɚ#¸ɰ+̢ɰ+̤ɯۼɚr#ӷɛ`̓೺1̓̈́gɯH^ɱ©̿ˌɡైȖ#ʁɚʉ\x00̓ɰ+̩̓#°Sɗ<AßHJ\"\x00,\x00)Ò1ʏ2ʃ̓ɚë̈́ɰ+1ʉɛ̍0Ӕ1	0ೕɡ#©1ʘE:(Eˌɥ̼Ȏ+)-ɰ+ˌɠʁȜɯ൭ɯƧ1'ɚӡɰ+ʻɚr̯1	0੨̓ɯ ̓$͌ΰʉɛȘľƶɚ૞$##$ʳ%^ɯࠞ#ǗˍɛƎǛˋɟ஝Ǵ1	0؟\r̯ɚ=ɝɂ͇Ĉ̓\x00ɝݡ$ǂ#*ƈ)P\x00ɚŦ%̈́҂͎͌ !͈͉͋͊		%\n>@¤\rT³ȡ˥Ğū.ųƷƦăŴǆŹǻðő«âǳĤǓƪƉƅ#ĜȕĮǠÃĄ¡ţÂĲ{Ǉ6È×&ǧŵǡȜHȖǅšPǦ\rſƩõČȆŖºōĉQƃdǽ¹Żn7ŷËŎd®ŝƀǂRüXœŉhĶƑÄ£ĵǾǐŇļ¼ñàñġñƱ¢țdǪřdLdŘxdǸdǘƟp\\%żUİadƝƉĺÖŭùǭǕî½Ǝ	ǲ§(moǼķªǮdȄť


`.

.. deprecated:: 1.15.0
    This function is deprecated and will be removed in SciPy 1.17.0.
    Please use `scipy.special.assoc_legendre_p_all` instead.

Parameters
----------
m : int
   ``|m| <= n``; the order of the Legendre function.
n : int
   where ``n >= 0``; the degree of the Legendre function.  Often
   called ``l`` (lower case L) in descriptions of the associated
   Legendre function
z : array_like, float or complex
    Input value.
type : int, optional
   takes values 2 or 3
   2: cut on the real axis ``|x| > 1``
   3: cut on the real axis ``-1 < x < 1`` (default)

Returns
-------
Pmn_z : (m+1, n+1) array
   Values for all orders ``0..m`` and degrees ``0..n``
Pmn_d_z : (m+1, n+1) array
   Derivatives for all orders ``0..m`` and degrees ``0..n``

See Also
--------
lpmn: associated Legendre functions of the first kind for real z

Notes
-----
By default, i.e. for ``type=3``, phase conventions are chosen according
to [1]_ such that the function is analytic. The cut lies on the interval
(-1, 1). Approaching the cut from above or below in general yields a phase
factor with respect to Ferrer's function of the first kind
(cf. `lpmn`).

For ``type=2`` a cut at ``|x| > 1`` is chosen. Approaching the real values
on the interval (-1, 1) in the complex plane yields Ferrer's function
of the first kind.

References
----------
.. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
       Functions", John Wiley and Sons, 1996.
       https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
.. [2] NIST Digital Library of Mathematical Functions
       https://dlmf.nist.gov/14.21

r`rrtype must be either 2 or 3.r
rrbrNrre
rrrrrhr
rr5rirj)rrrtyperout_jacs      rrBrB%z	A
*++AI677q63q6q
??1JJq('3q61aPLC
++c1a
 Ckk'1a(G	Q(AEm(AE#
<iiKa!eRK(!SV!<))GKa!eRK0!WQZaH<rc	[U5(aUS:a[S5e[U5(aUS:a[S5e[U5[U5p[SU5n[SU5n[R
"U5n[R"UR[R5(dUR[R5n[R"U5(a9[R"US-US-4UR-[RS9nO8[R"US-US-4UR-[RS9n[R"U5nUR S:Xa[#X%U4S9 O8[#U[R$"USS5[R$"USS54S9 US	US-2S	US-24US	US-2S	US-244$)
Sequence of associated Legendre functions of the second kind.

Computes the associated Legendre function of the second kind of order m and
degree n, ``Qmn(z)`` = :math:`Q_n^m(z)`, and its derivative, ``Qmn'(z)``.
Returns two arrays of size ``(m+1, n+1)`` containing ``Qmn(z)`` and
``Qmn'(z)`` for all orders from ``0..m`` and degrees from ``0..n``.

Parameters
----------
m : int
   ``|m| <= n``; the order of the Legendre function.
n : int
   where ``n >= 0``; the degree of the Legendre function.  Often
   called ``l`` (lower case L) in descriptions of the associated
   Legendre function
z : array_like, complex
    Input value.

Returns
-------
Qmn_z : (m+1, n+1) array
   Values for all orders 0..m and degrees 0..n
Qmn_d_z : (m+1, n+1) array
   Derivatives for all orders 0..m and degrees 0..n

References
----------
.. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
       Functions", John Wiley and Sons, 1996.
       https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html

r!m must be a non-negative integer.!n must be a non-negative integer.rr
rrrrNrrrmaxrr
rrrastyperrhrr
complex128rndimr+moveaxis)rrrmmnnrQqds       rr_r_VBA;;1q5<==A;;1q5<==q63q6q	QB	QB

1
AMM!''2::..
HHRZZ 	qHHb1fb1f%/r}}EHHb1fb1f%/rzzB	q	B	!
aW	a;;q&(3;;r68


.Param(":id")
	id, _ := strconv.ParseInt(idStr, 0, 64)
	if err := models.Delete{{controllerName}}(id); err == nil {
		c.Data["json"] = "OK"
	} else {
		c.Data["json"] = err.Error()
	}
	c.ServeJSON()
}
`
// Copyright 2020
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package beefix

import (
	"fmt"
	"go/parser"
	"go/token"
	"io/ioutil"
	"os"
	"path/filepath"
	"regexp"
	"strings"

	"github.com/beego/bee/v2/cmd/commands"
	beeLogger "github.com/beego/bee/v2/logger"
	"github.com/beego/bee/v2/logger/colors"
)

// fixTo16 upgrade beego to 1.6
func fixTo16(cmd *commands.Command, args []string) int {
	output := cmd.Out()

	beeLogger.Log.Info("Upgrading the application...")

	dir, err := os.Getwd()
	if err != nil {
		beeLogger.Log.Fatalf("Error while getting the current working directory: %s", err)
	}

	filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
		if info.IsDir() {
			if strings.HasPrefix(info.Name(), ".") {
				return filepath.SkipDir
			}
			return nil
		}
		if err != nil {
			return err
		}
		if strings.HasSuffix(info.Name(), ".exe") {
			return nil
		}
		err = fixFile(path)
		fmt.Fprintf(output, colors.GreenBold("\tfix\t")+"%s\n", path)
		if err != nil {
			beeLogger.Log.Errorf("Could not fix file: %s", err)
		}
		return err
	})
	beeLogger.Log.Success("Upgrade Done!")
	return 0
}

var rules = []string{
	"beego.AppName", "beego.BConfig.AppName",
	"beego.RunMode", "beego.BConfig.RunMode",
	"beego.RecoverPanic", "beego.BConfig.RecoverPanic",
	"beego.RouterCaseSensitive", "beego.BConfig.RouterCaseSensitive",
	"beego.BeegoServerName", "beego.BConfig.ServerName",
	"beego.EnableGzip", "beego.BConfig.EnableGzip",
	"beego.ErrorsShow", "beego.BConfig.EnableErrorsShow",
	"beego.CopyRequestBody", "beego.BConfig.CopyRequestBody",
	"beego.MaxMemory", "beego.BConfig.MaxMemory",
	"beego.Graceful", "beego.BConfig.Listen.Graceful",
	"beego.HttpAddr", "beego.BConfig.Listen.HTTPAddr",
	"beego.HttpPort", "beego.BConfig.Listen.HTTPPort",
	"beego.ListenTCP4", "beego.BConfig.Listen.ListenTCP4",
	"beego.EnableHttpListen", "beego.BConfig.Listen.EnableHTTP",
	"beego.EnableHttpTLS", "beego.BConfig.Listen.Ena


using Rabbit.WeiXin.Utility.Extensions;
using System;
using System.ComponentModel.DataAnnotations;

namespace Rabbit.WeiXin.MP.Messages.Response
{
    /// <summary>
    /// 视频响应消息。
    /// </summary>
    public sealed class ResponseMessageVideo : ResponseMessageBase, IMediaMessage
    {
        #region Constructor

        /// <summary>
        /// 初始化一个新的视频响应消息。
        /// </summary>
        public ResponseMessageVideo()
        {
        }

        /// <summary>
        /// 初始化一个新的视频响应消息。
        /// </summary>
        /// <param name="mediaId">媒体id，可以调用多媒体文件下载接口拉取数据。</param>
        /// <param name="title">视频消息的标题</param>
        /// <param name="description">视频消息的描述</param>
        /// <exception cref="ArgumentNullException"><paramref name="mediaId"/> 不能为空。</exception>
        public ResponseMessageVideo(string mediaId, string title = null, string description = null)
        {
            MediaId = m


 null,
  timeout: null,
}

type ActionType = {
  payload: Modal
  type: string
}

const modal = (state = initialState, actions: ActionType) => {
  switch (actions.type) {
    case 'SHOW_MODAL':
      return {
        ...state,
        text: actions.payload
      }
    case 'HIDE_MODAL':
      return {
        ...state,
        text: null
      }
    case 'HIDE_TIMEOUT':
      return {
        ...state,
        timeout: actions.payload
      }
    default:
      return state
  }
}

export default modalimport {LogEvent} from "../../../src/core/LogEvent";
import {levels} from "../../../src/core/LogLevel";
import {expect} from "../../tools";
import {JsonLayout} from "../../../src/layouts/components/JsonLayout";

describe("JsonLayout", () => {
  describe("when seperator is given", () => {
    let logEvent: any, layout: any, result: any;
    before(() => {
      layout = new JsonLayout({
        type: "json",
        separator: ","
      });

      const context = new Map();
      context.set("user", "romain");
      logEvent = new LogEvent("category", levels().DEBUG, ["data"], context);
      logEvent._startTime = new Date("2017-06-18 22:29:38.234");
      result = layout.transform(logEvent);
    });

    it("should return a formated string", () => {
      expect(result).to.eq(
        JSON.stringify({
          startTime: logEvent._startTime,
          categoryName: "category",
          level: "DEBUG",
          data: ["data"],
          context: {}
        }) + ","
      );
    });
  });

  describe("when seperator isn't given", () => {
    let logEvent: any, layout: any, result: any;
    before(() => {
      layout = new JsonLayout({
        type: "json"
      });

      const context = new Map();
      context.set("user", "romain");
      logEvent = new LogEvent("category", levels().DEBUG, ["data"], context);
      logEvent._startTime = new Date("2017-06-18 22:29:38.234");
      result = layout.transform(logEvent);
    });

    it("should return a formated string", () => {
      expect(result).to.eq(
        JSON.stringify({
          startTime: logEvent._startTime,
          categoryName: "category",
          level: "DEBUG",
          data: ["data"],
          context: {}
        })
      );
    });
  });
});
import { Observable } from "rxjs/Observable";
import { Subscription, Observer } from "rxjs";
import "rxjs/add/operator/map";

var observable: Observable<any> = Observable.create((observer: Observer<any>) => {
    setInterval(() => {
        observer.next(Math.floor(Math.random() * 6) + 1)
    }, 5000)
})

var observer = observable.map(data => data * 10).subscribe(
    (transformedData: any) => addItem(transformedData)
)

function addItem(value: any) {
    var node = document.createElement('li');
    var textnode = document.createTextNode(value);
    node.appendChild(textnode);
    document.getElementById('output').appendChild(node);
}
import * as express from 'express';
import * as jwt from 'jsonwebtoken';
import { Config } from '../../config/config';
import { Usuarios } from '../models/schemas/UsuarioModel';

export class VerifyAuth {
    verifyRole(role: string) {
        return function (req: express.Request, res: express.Response, next: express.NextFunction) {
            let token = (req.body && req.body.access_token) || (req.query && req.query.access_token) || req.headers['x-access-token'];
            let key = (req.body && req.body.x_key) || (req.query && req.query.x_key) || req.headers['x-key'];

            if (token || key) {
                try {
                    let decoded = jwt.decode(token, Config.SECRET);
                    // Tiempo de token expiró


 V100   | 80.70 |         81.87 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/ocrnet/ocrnet_hr48_4xb2-80k_cityscapes-512x1024.py)   | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr48_512x1024_80k_cityscapes/ocrnet_hr48_512x1024_80k_cityscapes_20200601_222752-9076bcdf.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr48_512x1024_80k_cityscapes/ocrnet_hr48_512x1024_80k_cityscapes_20200601_222752.log.json)                     |
| OCRNet | HRNetV2p-W18-Small | 512x1024  |  160000 | -        | -              | V100   | 78.45 |         79.97 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/ocrnet/ocrnet_hr18s_4xb2-160k_cityscapes-512x1024.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18s_512x1024_160k_cityscapes/ocrnet_hr18s_512x1024_160k_cityscapes_20200602_191005-f4a7af28.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18s_512x1024_160k_cityscapes/ocrnet_hr18s_512x1024_160k_cityscapes_20200602_191005.log.json)             |
| OCRNet | HRNetV2p-W18       | 512x1024  |  160000 | -        | -              | V100   | 79.47 |         80.91 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/ocrnet/ocrnet_hr18_4xb2-160k_cityscapes-512x1024.py)  | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18_512x1024_160k_cityscapes/ocrnet_hr18_512x1024_160k_cityscapes_20200602_191001-b9172d0c.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18_512x1024_160k_cityscapes/ocrnet_hr18_512x1024_160k_cityscapes_20200602_191001.log.json)                 |
| OCRNet | HRNetV2p-W48       | 512x1024  |  160000 | -        | -              | V100   | 81.35 |         82.70 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/ocrnet/ocrnet_hr48_4xb2-160k_cityscapes-512x1024.py)  | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr48_512x1024_160k_cityscapes/ocrnet_hr48_512x1024_160k_cityscapes_20200602_191037-dfbf1b0c.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr48_512x1024_160k_cityscapes/ocrnet_hr48_512x1024_160k_cityscapes_20200602_191037.log.json)                 |

#### ResNet backbone

| Method | Backbone | Crop Size | Batch Size | Lr schd


mm9 .buttons-1-XhYDHM,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{background-color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .selected-2qw9PFUJ .button-22Ex8G2W:hover:after{background-color:rgba(25,118,210,.2)}}.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM,.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttonsWrapper-3eBZpnXm,.chart-widget__top--themed-dark .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6{border-color:#1976d2}.chart-widget__top--themed-dark .toggler-_SUZ7r_5{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover:after{background-color:hsla(0,0%,100%,.1)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .counter-1hG1zy7A,.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .iconArrow-3q7vxxnz,.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .objectTree-2tLil0dm{color:#f0f3fa}}.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .counter-1hG1zy7A,.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .objectTree-2tLil0dm{color:#d1d4dc}@keyframes eye-animation-1pyfCZvS{to{transform:rotate(1turn)}}.blockHidden-pECc1q1w{display:none!important}.pane-button-3IbFaPrJ{border:1px solid #d1d4dc;border-radius:3px;background-color:currentColor;cursor:default;pointer-events:all}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.pane-button-3IbFaPrJ:hover:after{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(19,23,34,.06);border-radius:3px;z-index:0}}.chart-widget__top--themed-dark .pane-button-3IbFaPrJ{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .pane-button-3IbFaPrJ:hover:after{background-color:hsla(0,0%,100%,.1)}}.statuses-29yrFaoA{display:inline-flex;border-radius:9px;overflow:hidden;align-self:center}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA:hover .statusItem-1gsKvHgg:after{opacity:.25}}.statuses-29yrFaoA.small-3_g6DSwX{border-radius:9px}.statuses-29yrFaoA.large-2E_Sb0cV{borde


28);max-width:calc(var(--spacing)*136)}}:is(.table,table) th,:is(.table,table) .th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-gray-200);background-color:#fffc}@supports (color:color-mix(in lab, red, red)){:is(.table,table) th,:is(.table,table) .th{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}:is(.table,table) th,:is(.table,table) .th{padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*3);text-align:left;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-900);--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}@media not all and (min-width:48rem){:is(.table,table) th,:is(.table,table) .th{border-style:var(--tw-border-style);border-width:0;flex:50%}}:is(:is(.table,table) th,:is(.table,table) .th):where([data-darkmode=true],[data-darkmode=true] *){border-color:#4a556566}@supports (color:color-mix(in lab, red, red)){:is(:is(.table,table) th,:is(.table,table) .th):where([data-darkmode=true],[data-darkmode=true] *){border-color:color-mix(in oklab,var(--color-gray-600)40%,transparent)}}:is(:is(.table,table) th,:is(.table,table) .th):where([data-darkmode=true],[data-darkmode=true] *){background-color:#1e2939e6}@supports (color:color-mix(in lab, red, red)){:is(:is(.table,table) th,:is(.table,table) .th):where([data-darkmode=true],[data-darkmode=true] *){background-color:color-mix(in oklab,var(--color-gray-800)90%,transparent)}}:is(:is(.table,table) th,:is(.table,table) .th):where([data-darkmode=true],[data-darkmode=true] *){color:var(--color-gray-100)}:is(:is(.table,table) th,:is(.table,table) .th)[width="100%"]{width:100%}@media not all and (min-width:48rem){:is(:is(.table,table) th,:is(.table,table) .th)[width="100%"]{flex:0 0 100%}}:is(:is(.table,table) th,:is(.table,table) .th)[


end the program before quitting the tutor.",0
Inf_Err		dc.b	"Cannot evaluate expression.",0
Inf_2Many	dc.b	"Too many expressions.",0
Inf_Break	dc.b	"Breakpoint reached.",0
Inf_NoInit	dc.b	"Program not initialised.",0
Inf_Test	dc.b	"Testing program.",0
Inf_Mark	dc.b	">>> ",0
Inf_Nul		dc.b	"Default value.",0
Inf_Ommit	dc.b	"Ommited.",0

* Fichiers HELP
Hlp_Nom		dc.b	"Easy_AMOS:EasyAMOS.Help",0
H


Team === this.name) {
        teamGoals = match.firstTeamGoals;
        opponentGoals = match.secondTeamGoals;
      } else {
        teamGoals = match.secondTeamGoals;
        opponentGoals = match.firstTeamGoals;
      }
      this.updateStatistic(teamGoals, opponentGoals);
    }
  }

  updateStatistic(goalsFor: number, goalsAgainst: number): void {
    this.goalsFor += goalsFor;
    this.goalsAgainst += goalsAgainst;
    this.goalsDifference += goalsFor - goalsAgainst;
    if (goalsFor === goalsAgainst) {
      this.drawn++;
      this.points++;
    } else if (goalsFor > goalsAgainst) {
      this.win++;
      this.points += 3;
    } else {
      this.lost++;
    }
  }

  getPosition(): number {
    return this.position;
  }

  setPosition(position: number): void {
    this.position = position;
  }

  getName(): string {
    return this.name;
  }

  getMatchesCount(): number {
    return this.win + this.drawn + this.lost;
  }

  getWin(): number {
    return this.win;
  }

  getDrawn(): number {
    return this.drawn;
  }

  getLost(): number {
    return this.lost;
  }

  getGoalsFor(): number {
    return this.goalsFor;
  }

  getGoalsAgainst(): number {
    return this.goalsAgainst;
  }

  getGoalsDifference(): number {
    return this.goalsDifference;
  }

  getPoints(): number {
    return this.points;
  }
}
import { Byte, SecureRandom } from '@radixdlt/util'
import { ResultAsync } from 'neverthrow'
import { ECPointOnCurveT, PublicKeyT } from '../elliptic-curve'

export type MessageEncryptionInput = Readonly<{
	plaintext: Buffer | string
	diffieHellmanPoint: () => ResultAsync<ECPointOnCurveT, Error>
	secureRandom?: SecureRandom
}>

export type MessageDecryptionInput = Readonly<{
	encryptedMessage: Buffer | EncryptedMessageT
	diffieHellmanPoint: () => ResultAsync<ECPointOnCurveT, Error>
}>

export const ENCRYPTION_SCHEME_BYTES = 1

export const MESSAGE_TYPE_BYTES = 1

export enum MessageType {
	PLAINTEXT = 0x00,
	ENCRYPTED = 0x01,
}

export enum EncryptionScheme {
	NONE = 0x00,
	DH_ADD_EPH_AESGCM256_SCRYPT_000 = 0xff,
}

export type SealedMessageT = Readonly<{
	/* The public key of the ephemeral key pair. 33 bytes */
	ephemeralPublicKey: PublicKeyT

	/* The nonce used to encrypt the data. 12 bytes. AKA "IV". */
	nonce: Buffer

	/* An authentication tag. 16 bytes, e.g. AES GCM tag. */
	authTag: Buffer

	/* The encrypted data. Max 162 bytes. */
	ciphertext: Buffer

	combined: () => Buffer
}>

type Message<Kind extends keyof typeof MessageType> = {
	kind: Kind
}

// Max 255 bytes
export type EncryptedMessageT = Message<'ENCRYPTED'> & {
	encryptionScheme: EncryptionScheme

	/* Encrypted message with metadata containing about how it can be decrypted. Max 223 bytes. */
	sealedMessage: SealedMessageT

	combined: () => Buffer
}

export type PlaintextMessageT = Message<'PLAINTEXT'> & {
	plaintext: string
	bytes: Buffer
}
import { Game } from "./Game";
import { Memento } from "./Memento";

export class GameRegistry {
  private mementoList!: Memento[];
  private cursorHead!: number;
  constructor(private readonly game: Game) {
    this.reset();
  }
  r


import matplotlib.pyplot as plt
import numpy as np
import scipy.fft as fft
from matplotlib.animation import FuncAnimation, PillowWriter
import matplotlib.cm as cm
#pde for diffusion equation 1D
N = 1000
x = np.linspace(0, 1, N)
dx = x[1]-x[0]
t = np.linspace(0, 10, N)
# T0 = np.sin(np.pi * 10 *x)
T0 = np.exp(-100*(x-0.5)**2)

# Tk0 = fft.fft(T0,N)
# fk = fft.fftfreq(n=N,d=dx)

Tk = np.zeros((N,N),dtype=complex)
Tk0 = fft.fft(T0,N)#/np.sqrt(N)

fk = fft.fftfreq(n=N,d=dx)
# fk = fft.fftshift(fk)
Tk[0] = Tk0
h = t[1]-t[0]
D = 1
T = np.zeros((N,N))
T[0] = T0
a = x[-1] - x[0]
plt.plot(fk,fft.fftshift(abs(Tk[0])))
plt.show()
# for i in range(1,len(t)):
#     for j in range(len(x)):
#         Tk[i][j] = Tk[i-1][j] + h*D*(-4*np.pi**2*(j/N)**2) * Tk[i-1][j]
#         if abs(1-h*D*(4*np.pi**2*(j/N)**2)) >= 1:
#             print(abs(1-h*D*(-4*np.pi**2*(j/N)**2)))
    # T[i] = fft.ifft(Tk[i])

for j in range(len(x)):
    Tk[:,j] = np.exp(-4*np.pi**2*D*(fk**2)*t)*Tk0[j]
    T[:,j] = fft.ifft(Tk[:,j])
    # plt.plot(fk,abs(Tk[i]))
    # plt.show()
    # break

plt.plot(x,T[0])
plt.plot(x,T[1])
plt.plot(x,T[500])
plt.show()

# exit()
plt.imshow(T, aspect='auto', cmap=cm.coolwarm)
plt.colorbar()
plt.show()

def init():
    line.set_data([], [])
    return line,

# Update function
def update(frame):
    y = T[frame]
    line.set_data(x, y)
    return line,
plt.clf()

fig, ax = plt.subplots()
line, = ax.plot([], [], lw=2)
ax.set_xlim(0, 1)
ax.set_ylim(T.min(), T.max())
ax.set_xlabel("Position")
ax.set_ylabel("Value")
ax.set_title("Time vs Position")
# Create animation
ani = FuncAnimation(fig, update, frames=100, init_func=init, blit=True)

# Save as a GIF
ani.save("animation.gif", writer=PillowWriter(fps=10))


import gurobipy as gp
from gurobipy import GRB
from collections import OrderedDict
from utils.quantum.get_qubo_codec import get_qubo_codec

def get_gurobi_helper(args):
    gh = GUROBIHelper(args)
    return gh

class GUROBIHelper:
    def __init__(self,args):
        self.qubo_codec = get_qubo_codec(args)
        return

    def solve_qubo(self,Q):
        var_names = self._get_ordered_list_of_vars(Q)
        with gp.Env(empty=True) as env:
            env.setParam('OutputFlag', 0)
            env.start()
            with gp.Model("QUBO", env=env) as model:
                x = model.addVars(len(var_names), vtype=GRB.BINARY, name="x")
                obj_expr = self._get_objective_exp(Q,x,var_names)
                model.setObjective(obj_expr, GRB.MINIMIZE)
                model.optimize()
                response = self._create_response(x,var_names)
        return response

    def _create_response(self,x,var_names):
        response = {}
        for i in range(len(x)):
            response[var_names[i]] = x[i].x
        return response

    def _get_objective_exp(self,Q,x,var_names):
        obj_expr = gp.QuadExpr()
        for i in range(len(x)):
            var_0 = var_names[i]
            for j in range(i, len(x)):
                var_1 = var_names[j]
                matrix_value = self.qubo_codec.get_matrix_entry(Q,var_0,var_1)
                if matrix_value != 0:
                    obj_expr += matrix_value * x[i] * x[j]
        return obj_expr

    def _get_ordered_list_of_vars(self,Q):
        ordered_set = OrderedDict.fromkeys([])
        for key in Q.keys():
            v1,v2 = key
            ordered_set[v1] = None
            ordered_set[v2] = None
        ordered_set = list(ordered_set.keys())
        return ordered_set


f123456
// GFX12: encoding: [0x7c,0x00,0x10,0xca,0xff,0x00,0xfe,0x06,0x56,0x34,0x12,0xaf]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, v4 :: v_dual_mul_dx9_zero_f32 v6, v1, v255
// GFX12: encoding: [0x04,0x01,0x0e,0xca,0x01,0xff,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, v1 :: v_dual_mul_dx9_zero_f32 v6, v255, v255
// GFX12: encoding: [0x01,0x01,0x0e,0xca,0xff,0xff,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, v255 :: v_dual_mul_dx9_zero_f32 v6, v2, v255
// GFX12: encoding: [0xff,0x01,0x0e,0xca,0x02,0xff,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, v2 :: v_dual_mul_dx9_zero_f32 v6, v3, v255
// GFX12: encoding: [0x02,0x01,0x0e,0xca,0x03,0xff,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, v3 :: v_dual_mul_dx9_zero_f32 v6, v4, v255
// GFX12: encoding: [0x03,0x01,0x0e,0xca,0x04,0xff,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, s105 :: v_dual_mul_dx9_zero_f32 v6, s1, v255
// GFX12: encoding: [0x69,0x00,0x0e,0xca,0x01,0xfe,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, s1 :: v_dual_mul_dx9_zero_f32 v6, s105, v255
// GFX12: encoding: [0x01,0x00,0x0e,0xca,0x69,0xfe,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, ttmp15 :: v_dual_mul_dx9_zero_f32 v6, vcc_lo, v255
// GFX12: encoding: [0x7b,0x00,0x0e,0xca,0x6a,0xfe,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error

v_dual_mov_b32 v255, exec_hi :: v_dual_mul_dx9_zero_f32 v6, vcc_hi, v255
// GFX12: encoding: [0x7f,0x00,0x0e,0xca,0x6b,0xfe,0x07,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9


.542zM36.625 16.667H18.75c-1.167 0 -2.083 0.917 -2.083 2.083v17.875c0 1.875 2.25 2.792 3.542 1.458L26.208 32.083 45.833 51.667V79.167c0 2.292 1.875 4.167 4.167 4.167s4.167 -1.875 4.167 -4.167v-29.167c0 -1.083 -0.458 -2.167 -1.208 -2.958l-20.833 -20.875 6 -6c1.292 -1.25 0.375 -3.5 -1.5 -3.5z"></path>'
    );
  }
  svg.star-glyph {
    @include svg-mask(
      '<path fill="red" d="M91.446 38.246c-0.538 -1.575 -1.958 -2.688 -3.617 -2.817L64.075 33.542l-10.279 -22.754C53.125 9.292 51.638 8.333 50 8.333s-3.125 0.958 -3.796 2.45L35.925 33.542L12.171 35.429C10.542 35.558 9.138 36.629 8.583 38.167s-0.163 3.258 1.008 4.4l17.554 17.113l-6.208 26.883c-0.383 1.663 0.288 3.392 1.692 4.362C23.346 91.417 24.171 91.667 25 91.667c0.804 0 1.613 -0.233 2.313 -0.7L50 75.842l22.688 15.125c1.45 0.967 3.354 0.929 4.771 -0.1c1.408 -1.029 2.029 -2.833 1.55 -4.508l-7.621 -26.667l18.9 -17.008C91.525 41.567 91.979 39.825 91.446 38.246z"></path>'
    );
  }
  svg.stop-audio-glyph {
    @include svg-mask(
      '<path fill="red" d="M50 8.333C27.025 8.333 8.333 27.025 8.333 50s18.692 41.667 41.667 41.667s41.667 -18.692 41.667 -41.667S72.975 8.333 50 8.333zM50 83.333c-18.379 0 -33.333 -14.954 -33.333 -33.333s14.954 -33.333 33.333 -33.333s33.333 14.954 33.333 33.333S68.379 83.333 50 83.333z M37.5 37.5H62.5V62.5H37.5z"></path>'
    );
  }
  svg.two-blank-pages {
    @include svg-mask(
      '<path fill="red" d="M83.333 8.333H41.667C37.071 8.333 33.333 12.071 33.333 16.667v16.667H16.667c-4.596 0 -8.333 3.738 -8.333 8.333v41.667c0 4.596 3.738 8.333 8.333 8.333h41.667c4.596 0 8.333 -3.738 8.333 -8.333v-16.667h16.667c4.596 0 8.333 -3.738 8.333 -8.333V16.667C91.667 12.071 87.929 8.333 83.333 8.333zM16.667 83.333V41.667h41.667l0.008 41.667H16.667zM83.333 58.333h-16.667v-16.667c0 -4.596 -3.738 -8.333 -8.333 -8.333h-16.667V16.667h41.667V58.333z M25 50H50V58.333H25zM25 66.667H50V75H25z"></path>'
    );
  }
  svg.tomorrow-glyph {
    @inc


not self.debug then
    return
  end

  customErrorHandler = conf.errorHandler or errorhandler

  local server = assert(socket.bind(self.host, self.port))
  self.server = server

  self.addr, self.port = self.server:getsockname()
  print("Listening on " .. self.addr .. ":" .. self.port)
  self.server:settimeout(0)

  ---@type FeatherLogger
  self.featherLogger = FeatherLogger(self)
  self.featherLogger:log({ type = "feather:start" })

  ---@type FeatherObserver
  self.featherObserver = FeatherObserver(self)

  if self.autoRegisterErrorHandler then
    local selfRef = self -- capture `self` to avoid upvalue issues

    function love.errorhandler(msg)
      selfRef:__onerror(msg, true) -- Log the error first

      local function isDelivered()
        return selfRef.lastDelivery > selfRef.lastError
      end

      local delivered = isDelivered()

      local start = love.timer.getTime()
      while not delivered and (love.timer.getTime() - start) < selfRef.errorWait do
        selfRef:update(0)
        delivered = isDelivered()
        love.timer.sleep(self.updateInterval)
      end

      return customErrorHandler(msg)
    end
  end

  self.pluginManager = FeatherPluginManager(self, self.featherLogger, self.featherObserver)
end

function Feather:__getConfig()
  local root_path = get_current_dir()

  if #self.baseDir > 0 then
    root_path = root_path .. "/" .. self.baseDir
  end

  local config = {
    plugins = self.pluginManager:getConfig(),
    root_path = root_path,
    version = FEATHER_VERSION.name,
    API = FEATHER_VERSION.api,
    sampleRate = self.sampleRate,
    language = "lua",
  }

  return config
end

function Feather:__setConfig(params)
  self.sampleRate = params.sampleRate or 1
  self.updateInterval = params.updateInterval or 0.1
  self.maxTempLogs = params.maxTempLogs or 200

  return self:__getConfig()
end

function Feather:__errorTraceback(msg)
  local trace = debug.traceback()

  local sanitizedData = {}
  for char in msg:gmatch(utf8.charpattern) do
    table.insert(sanitizedData, char)
  end
  local sanitizedMsg = table.concat(sanitizedData)

  local err = {}

  table.insert(err, "Error\n")
  table.insert(err, sanitizedMsg)

  if #sanitizedMsg ~= #msg then
    table.insert(err, "Invalid UTF-8 string in error message.")
  end

  table.insert(err, "\n")

  for l in trace:gmatch("(.-)\n") do
    if not l:match("boot.lua") then
      l = l:gsub("stack traceback:", "Traceback\n")
      table.insert(err, l)
    end
  end

  local p = table.concat(err, "\n")

  p = p:gsub("\t", "")
  p = p:gsub('%[string "(.-)"%]', "%1")

  return p
end

function Feather:__onerror(msg, finish)
  if not self.debug then
    return
  end

  local err = self:__errorTraceback(msg)
  self.featherLogger:log({ type = "error", str = self:__errorTraceback(msg) }, true)
  if self.wrapPrint then
    self.featherLogger.logger("[Feather] ERROR: " .. err)
  end
  self.lastError = os.time()
  self.pluginManager:onerror(msg, self)

  if finish then
    self:finish()
  end
end

--- Tracks the value of a key in the observers table
---@param key string
---@param value table | string | number | boolean
function Feather:observe(key, value)
  self.featherObserver:observe(key, value)
end


RunWalkParticleRotation' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, IsNinjaInShadowStance_) == 0x004C98, "Member 'APlayerPawn_Generic_C::IsNinjaInShadowStance_' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, GameplayTagsForHitByHuskMeleeSound) == 0x004CA0, "Member 'APlayerPawn_Generic_C::GameplayTagsForHitByHuskMeleeSound' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Shield_Material) == 0x004CC0, "Member 'APlayerPawn_Generic_C::Shield_Material' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, BodyShieldMIDArray) == 0x004CC8, "Member 'APlayerPawn_Generic_C::BodyShieldMIDArray' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, HeadShieldMIDArray) == 0x004CD8, "Member 'APlayerPawn_Generic_C::HeadShieldMIDArray' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Shield_Active) == 0x004CE8, "Member 'APlayerPawn_Generic_C::Shield_Active' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Sound_Shield_Impact) == 0x004CF0, "Member 'APlayerPawn_Generic_C::Sound_Shield_Impact' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Sound_Shield_Destroyed) == 0x004CF8, "Member 'APlayerPawn_Generic_C::Sound_Shield_Destroyed' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Sound_Shield_FullyCharged) == 0x004D00, "Member 'APlayerPawn_Generic_C::Sound_Shield_FullyCharged' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Shield_Shatter_Opacity) == 0x004D08, "Member 'APlayerPawn_Generic_C::Shield_Shatter_Opacity' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Regen_Opacity) == 0x004D10, "Member 'APlayerPawn_Generic_C::Regen_Opacity' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Damage_Opacity) == 0x004D18, "Member 'APlayerPawn_Generic_C::Damage_Opacity' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Default_Shield_opacity) == 0x004D20, "Member 'APlayerPawn_Generic_C::Default_Shield_opacity' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, Shield_PushMinValue) == 0x004D28, "Member 'APlayerPawn_Generic_C::Shield_PushMinValue' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, ShieldVisible_Hit) == 0x004D30, "Member 'APlayerPawn_Generic_C::ShieldVisible_Hit' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, ShieldVisible_Recover) == 0x004D31, "Member 'APlayerPawn_Generic_C::ShieldVisible_Recover' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, ShieldVisible_Shatter) == 0x004D32, "Member 'APlayerPawn_Generic_C::ShieldVisible_Shatter' has a wrong offset!");
static_assert(offsetof(APlayerPawn_Generic_C, ShieldVisible_FullHealth) == 0x004D33, "Member 'APla


    )
            val publicFlagCondition = tStoreBaseFeature.PUBLIC_FLAG.eq(true)
            val combinedCondition = DSL.or(publicFlagCondition, existsCondition)

            conditions.plus(combinedCondition)
        } else {
            conditions
        }

        baseStep.where(finalConditions)
    }

    private fun createBaseStep(dslContext: DSLContext): SelectJoinStep<out Record> {
        val tStoreBase = TStoreBase.T_STORE_BASE
        val tStoreBaseFeature = TStoreBaseFeature.T_STORE_BASE_FEATURE

        return dslContext.select(
            tStoreBase.ID,
            tStoreBase.STORE_CODE,
            tStoreBase.STORE_TYPE,
            tStoreBase.NAME,
            tStoreBase.VERSION,
            tStoreBase.STATUS,
            tStoreBase.DOCS_LINK,
            tStoreBase.DESCRIPTION,
            tStoreBase.SUMMARY,
            tStoreBase.LOGO_URL,
            tStoreBase.PUBLISHER,
            tStoreBase.PUB_TIME,
            tStoreBase.MODIFIER,
            tStoreBase.UPDATE_TIME,
            tStoreBase.CLASSIFY_ID,
            tStoreBaseFeature.RECOMMEND_FLAG,
            tStoreBaseFeature.RD_TYPE,
            tStoreBaseFeature.PUBLIC_FLAG,
            tStoreBase.CREATE_TIME,
            tStoreBase.BUS_NUM
        ).from(tStoreBase)
            .leftJoin(tStoreBaseFeature)
            .on(
                tStoreBase.STORE_CODE.eq(tStoreBaseFeature.STORE_CODE)
                    .and(tStoreBase.STORE_TYPE.eq(tStoreBaseFeature.STORE_TYPE))
            )
    }

    private fun formatConditions(
        dslContext: DSLContext,
        storeType: StoreTypeEnum,
        storeInfoQuery: StoreInfoQuery,
        baseStep: SelectJoinStep<out Record>
    ): MutableList<Condition> {
        val tStoreBase = TStoreBase.T_STORE_BASE
        val tStoreBaseFeature = TStoreBaseFeature.T_STORE_BASE_FEATURE
        val tStoreLabelRel = TStoreLabelRel.T_STORE_LABEL_REL
        val tStoreCategoryRel = TStoreCategoryRel.T_STORE_CATEGORY_REL
        val tClassify = TClassify.T_CLASSIFY
        val conditions = mutableListOf<Condition>()
        conditions.add(tStoreBase.STORE_TYPE.eq(storeType.type.toByte()))
        // 缩减查询范围
        if (storeInfoQuery.getSpecQueryFlag()) {
            conditions.add(
                tStoreBase.ID.`in`(
                    getStoreIdsByCondition(
                        dslContext = dslContext,
                        storeInfoQuery = storeInfoQuery
                    )
                )
            )
        } else {
            conditions.add(tStoreBase.STATUS.eq(StoreStatusEnum.RELEASED.name))
            conditions.add(tStoreBase.LATEST_FLAG.eq(true))
        }
        conditions.add(tStoreBaseFeature.SHOW_FLAG.eq(true))
        storeInfoQuery.recommendFlag?.let {
            conditions.add(tStoreBaseFeature.RECOMMEND_FLAG.eq(it))
        }
        storeInfoQuery.rdType?.let {
            conditions.add(tStoreBaseFeature.RD_TYPE.eq(it.name))
        }
        storeInfoQuery.score?.let {
            val tStoreStatisticsTotal = TStoreStatisticsTotal.T_STORE_STATISTICS_TOTAL
            baseStep.leftJoin(tStoreStatisticsTotal).on(tStoreBase.STORE_CODE.eq(tStoreStatisticsTotal.STORE_CODE))
            conditions.add(tStoreStatisticsTotal.STORE_TYPE.eq(storeType.type.toByte()))
            conditions.add(
                tStoreStatisticsTotal.SCORE_AVERAGE.ge(it.toBigDecimal())
            )
        }
        val keyword = storeInfoQuery.keyword
        if (!keyword.isNullOrEmpty()) {
            conditions.add(tStoreBase.NAME.contains(keyword).or(tStoreBase.SUMMARY


labeled YES was chosen, follow the substeps in step 5. If a box labeled MAYBE was chosen, multiply S by base and add 1 to d.” (For example, if base is 10, k is 1, N is 2, and d1 = d2 = 1, the space could be divided into a 10 × 10 grid, made up of 100 boxes each of size (1/10)×(1/10).  Then, InShape is precalculated for the box with coordinates ((0, 0), (1, 1)), the box ((0, 1), (1, 2)), and so on [the boxes’ coordinates are stored as just given, but InShape instead uses those coordinates divided by basek, or 101 in this case], each such box is labeled with the result, and boxes labeled NO are discarded.  Finally the algorithm above is modified as just given.)

Besides a grid, another useful data structure is a mapped regular paving (Harlow et al. 2012)29, which can be described as a binary tree with nodes each consisting of zero or two child nodes and a marking value.  Start with a box that entirely covers the desired shape.  Calculate InShape for the box.  If it returns YES or NO then mark the box with YES or NO, respectively; otherwise it returns MAYBE, so divide the box along its first widest coordinate into two subboxes, set the parent box’s children to those subboxes, then repeat this process for each subbox (or if the nesting level is too deep, instead mark each subbox with MAYBE).  Then, to generate a random point (with a base-2 fractional part), start from the root, then: (1) If the box is marked YES, return a uniform random point between the specified coordinates using the RandUniformInRange algorithm; or (2) if the box is marked NO, start over from the root; or (3) if the box is marked MAYBE, get the two child boxes bisected from the box, choose one of them with equal probability, mark the chosen child with the result of InShape for that child, and repeat this process with that child; or (4) the box has two child boxes, so choose one of them with equal probability and repeat this process with that child.

The algorithm can be adapted to return 1 with probability equal to its acceptance rate (which equals the shape’s volume divided by the hyperrectangle’s volume), and return 0 with the opposite probability.  In this case, replace steps 5 and 6 with the following: “5. If the result of InShape is YES, return 1.; 6. If the result of InShape is NO, return 0.” (I thank BruceET of the Cross Validated community for leading me to this insight.)

Implementation Notes for Box/Shape Intersection: The algorithm in this section uses a function called InShape to determine whether an axis-aligned box is either outside a shape, fully inside the shape, or partially inside the shape.  The following are notes that will aid in developing a robust im


he altered dom and selection
  if (isContentEditable(element)) {
    applyNative(element, 'textContent', newValue)
  } else /* istanbul ignore else */ if (
    isElementType(element, ['input', 'textarea'])
  ) {
    applyNative(element, 'value', newValue)
  } else {
    // TODO: properly type guard
    throw new Error('Invalid Element')
  }
  setSelectionRangeAfterInput(element, newSelectionStart)

  fireEvent.input(element, {
    ...eventOverrides,
  })

  setSelectionRangeAfterInputHandler(element, newValue, newSelectionStart)
}

function setSelectionRangeAfterInput(
  element: Element,
  newSelectionStart: number,
) {
  setSelectionRange(element, newSelectionStart, newSelectionStart)
}

function setSelectionRangeAfterInputHandler(
  element: Element,
  newValue: string,
  newSelectionStart: number,
) {
  const value = getValue(element) as string

  // don't apply this workaround on elements that don't necessarily report the visible value - e.g. number
  // TODO: this could probably be only applied when there is keyboardState.carryValue
  const isUnreliableValue = value === '' && hasUnreliableEmptyValue(element)

  if (!isUnreliableValue && value === newValue) {
    const {selectionStart} = getSelectionRange(element)
    if (selectionStart === value.length) {
      // The value was changed as expected, but the cursor was moved to the end
      // TODO: this could probably be only applied when we work around a framework setter on the element in applyNative
      setSelectionRange(element, newSelectionStart, newSelectionStart)
    }
  }
}

const initial = Symbol('initial input value/textContent')
const onBlur = Symbol('onBlur')
declare global {
  interface Element {
    [initial]?: string
    [onBlur]?: EventListener
  }
}

/**
 * React tracks the changes on element properties.
 * This workaround tries to alter the DOM element without React noticing,
 * so that it later picks up the change.
 *
 * @see https://github.com/facebook/react/blob/148f8e497c7d37a3c7ab99f01dec2692427272b1/packages/react-dom/src/client/inputValueTracking.js#L51-L104
 */
function applyNative<T extends Element, P extends keyof T>(
  element: T,
  propName: P,
  propValue: T[P],
) {
  const descriptor = Object.getOwnPropertyDescriptor(element, propName)
  const nativeDescriptor = Object.getOwnPropertyDescriptor(
    element.constructor.prototype,
    propName,
  )

  if (descriptor && nativeDescriptor) {
    Object.defineProperty(element, propName, nativeDescriptor)
  }

  // Keep track of the initial value to determine if a change event should be dispatched.
  // CONSTRAINT: We can not determine what happened between focus event and our first API call.
  if (element[initial] === undefined) {
    element[initial] = String(element[propName])
  }

  element[propName] = propValue

  // Add an event listener for the blur event to the capture phase on the window.
  // CONSTRAINT: Currently there is no cross-platform solution to unshift the event handler stack.
  // Our change event might occur after other event handlers on the blur event have been processed.
  if (!element[onBlur]) {
    element.ownerDocument.defaultView?.addEventListener(
      'blur',
      (element[onBlur] = () => {
        const initV = element[initial]

        // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
        delete element[onBlur]
        // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
        delete element[initial]

        if (String(element[propName]) !== initV) {
          fireEvent.change(


/ 	}
	// 	else
	// 	{
	// 		ASCII_PORT_WRITE_NO_FORMAT(portNum, ",V", checkSum, 2);								// 2	// V=void (bad,warning)
	// 	}
	// 	asciiPortWriteCoordDegMin(portNum, a, checkSum, pos.lla[0], ",%02d", 'N', 'S');	// 3,4	// lat lon (degrees minutes)
	// 	asciiPortWriteCoordDegMin(portNum, a, checkSum, pos.lla[1], ",%03d", 'E', 'W');	// 5,6
	//
	// 	float speedInKnots = C_METERS_KNOTS_F * mag_Vec2(vel_ned_);
	// 	ASCII_PORT_WRITE(portNum, a, checkSum, ",%05.1f", speedInKnots);						// 7	// speed in knots
	// // 	float courseMadeTrue = atan2f(g_navInGpsA.velNed[1], g_navInGpsA.velNed[0]);
	// 	float courseMadeTrue = 0.0f;
	// 	ASCII_PORT_WRITE(portNum, a, checkSum, ",%05.1f", (courseMadeTrue*C_RAD2DEG_F));		// 8	// course made true
	// 	asciiPortWriteGPSDateOfLastFix(portNum, a, checkSum);									// 9	// date of last fix UTC
	//
	// 	// Magnetic variation degrees (Easterly var. subtracts from true course), i.e. 020.3,E - left pad to 3 zero
	// 	float magDec = g_nvmFlashCfg->magDeclination * C_RAD2DEG_F;
	// 	bool positive = (magDec >= 0.0);
	// 	ASCII_PORT_WRITE(portNum, a, checkSum, ",%05.1f,", abs(magDec));						// 10	// Magnetic variation
	// 	ASCII_PORT_WRITE_NO_FORMAT(portNum, (positive ? "E" : "W"), checkSum, 1);				// 11
	// 	ASCII_PORT_WRITE_NO_CHECKSUM(portNum, a, "*%.2x\r\n", checkSum);

	int n = SNPRINTF(a, aSize, "$GPRMC");
	n += asciiSnprintfGPSTimeOfLastFix(a+n, aSize-n, pos.timeOfWeekMs);					// 1	// time of last fix
	if((pos.status&GPS_STATUS_FIX_MASK)!=GPS_STATUS_FIX_NONE)
	{
		n += SNPRINTF(a+n, aSize-n, ",A");												// 2	// A=active (good)
	}
	else
	{
		n += SNPRINTF(a+n, aSize-n, ",V");												// 2	// V=void (bad,warning)
	}
	n += asciiSnprintfLatToDegMin(a+n, aSize-n, pos.lla[0]);							// 3,4	// lat (degrees minutes)
	n += asciiSnprintfLonToDegMin(a+n, aSize-n, pos.lla[1]);							// 5,6	// lon (degrees minutes)

	float speedInKnots = C_METERS_KNOTS_F * mag_Vec2(vel_ned_);
	// 	float courseMadeTrue = atan2f(g_navInGpsA.velNed[1], g_navInGpsA.velNed[0]);
	float courseMadeTrue = 0.0f;
	n += SNPRINTF(a+n, aSize-n,
	",%05.1f"		// 7
	",%05.1f",		// 8
	speedInKnots,																		// 7


                [Ant(START_NODE, GOAL_NODE, [START_NODE], []) for _ in range(ANT_NUM)]
            )

            # Antによる探索
            for _ in range(TTL):
                ant_next_node(ant_list, graph, ant_log)

            # フェロモンの揮発
            volatilize_by_width(graph)

            # Interestによる評価
            # Interestを配置
            interest_list.append(Interest(START_NODE, GOAL_NODE, [START_NODE], W))

            # Interestの移動
            for _ in range(TTL):
                interest_next_node(interest_list, graph, interest_log)

        save_graph_with_pheromone(graph, "ba_model_graph_with_pheromone_after")

        # 各シミュレーションのログをCSVに保存
        with open("./simulation_result/log_ant.csv", "a", newline="") as f:
            writer = csv.writer(f)
            writer.writerow(ant_log)

        with open("./simulation_result/log_interest.csv", "a", newline="") as f:
            writer = csv.writer(f)
            writer.writerow(interest_log)

    # 最終的なグラフの視覚化
    # visualize_graph(graph, "network_graph.pdf")
    print("Simulations completed.")
    print("start_node_list: ", start_node_list)


 = O.decodeHTMLStrict = O.decodeHTML = O.decodeXML =
  O.encodeHTML5 = O.encodeHTML4 = O.escapeUTF8 = O.escape = O.encodeNonAsciiHTML = O.encodeHTML = O.encodeXML = O.encode = O.decodeStrict = O.
  decode = void 0;
  var Mt = Qn(), Fa = es();
  function cf(r, e) {
    return (!e || e <= 0 ? Mt.decodeXML : Mt.decodeHTML)(r);
  }
  n(cf, "decode");
  O.decode = cf;
  function pf(r, e) {
    return (!e || e <= 0 ? Mt.decodeXML : Mt.decodeHTMLStrict)(r);
  }
  n(pf, "decodeStrict");
  O.decodeStrict = pf;
  function df(r, e) {
    return (!e || e <= 0 ? Fa.encodeXML : Fa.encodeHTML)(r);
  }
  n(df, "encode");
  O.encode = df;
  var Ve = es();
  Object.defineProperty(O, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return Ve.encodeXML;
  }, "get") });
  Object.defineProperty(O, "encodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return Ve.encodeHTML;
  }, "get") });
  Object.defineProperty(O, "encodeNonAsciiHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return Ve.encodeNonAsciiHTML;
  }, "get") });
  Object.defineProperty(O, "escape", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return Ve.escape;
  }, "get") });
  Object.defineProperty(O, "escapeUTF8", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return Ve.escapeUTF8;
  }, "get") });
  Object.defineProperty(O, "encodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return Ve.encodeHTML;
  }, "get") });
  Object.defineProperty(O, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return Ve.encodeHTML;
  }, "get") });
  var ve = Qn();
  Object.defineProperty(O, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return ve.decodeXML;
  }, "get") });
  Object.defineProperty(O, "decodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return ve.decodeHTML;
  }, "get") });
  Object.defineProperty(O, "decodeHTMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return ve.decodeHTMLStrict;
  }, "get") });
  Object.defineProperty(O, "decodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return ve.decodeHTML;
  }, "get") });
  Object.defineProperty(O, "decodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return ve.decodeHTML;
  }, "get") });
  Object.defineProperty(O, "decodeHTML4Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
    return ve.decodeHTMLStrict;
  }, "get") });
  Object.defineProperty


l function for use with [compute]
String _hashTag(String tag) {
  final components = tag.split(",");
  final x = components[0].substring(1);
  final y = components[1].substring(0, components[1].length - 1);

  final hash = LibSpark.hashTag(x, y);
  return hash;
}

void initSparkLogging(Level level) {
  final levels = Level.values.where((e) => e >= level).map((e) => e.name);
  spark.Log.levels.addAll(
    LoggingLevel.values.where((e) => levels.contains(e.name)),
  );
  spark.Log.onLog = (level, value, {error, stackTrace, required time}) {
    Logging.instance.log(
      level.getLoggerLevel(),
      value,
      error: error,
      stackTrace: stackTrace,
      time: time,
    );
  };
}

abstract class _SparkIsolate {
  static Isolate? _isolate;
  static SendPort? _sendPort;
  static final ReceivePort _receivePort = ReceivePort();

  static Future<void> initialize() async {
    final level = Prefs.instance.logLevel;

    _isolate = await Isolate.spawn((SendPort sendPort) {
      initSparkLogging(level); // ensure logging is set up in isolate

      final receivePort = ReceivePort();

      sendPort.send(receivePort.sendPort);

      receivePort.listen((message) async {
        if (message is List && message.length == 3) {
          final function = message[0] as Function;
          final argument = message[1];
          final replyPort = message[2] as SendPort;

          final result = await function(argument);
          replyPort.send(result);
        }
      });
    }, _receivePort.sendPort);
    _sendPort = await _receivePort.first as SendPort;
  }

  static Future<R> run<M, R>(ComputeCallback<M, R> task, M argument) async {
    if (_isolate == null || _sendPort == null) await initialize();

    final ReceivePort responsePort = ReceivePort();
    _sendPort?.send([task, argument, responsePort.sendPort]);
    return await responsePort.first as R;
  }
}

Future<R> computeWithLibSparkLogging<M, R>(
  ComputeCallback<M, R> callback,
  M message,
) async {
  return _SparkIsolate.run(callback, message);
}

mixin SparkInterface<T extends ElectrumXCurrencyInterface>
    on Bip39HDWallet<T>, ElectrumXInterface<T> {
  String? _sparkChangeAddressCached;

  /// Spark change address. Should generally not be exposed to end users.
  String get sparkChangeAddress {
    if (_sparkChangeAddressCached == null) {
      throw Exception("_sparkChangeAddressCached was not initialized");
    }
    return _sparkChangeAddressCached!;
  }

  static bool validateSparkAddress({
    required String address,
    required bool isTestNet,
  }) => LibSpark.validateAddress(address: address, isTestNet: isTestNet);

  Future<String> hashTag(String tag) async {
    try {
      return await computeWithLibSparkLogging(_hashTag, tag);
    } catch (_) {
      throw ArgumentError("Invalid tag string format", "tag");
    }
  }

  @override
  Future<void> init() async {
    try {
      Address? address = await getCurrentReceivingSparkAddress();
      if (address == null) {
        address = await generateNextSparkAddress();
        await mainDB.putAddress(address);
      } // TODO add other address types to wallet info?

      if (_sparkChange