-cc5 .cc3,.cc1-cc5 .cc4,.cc1-cc5 .cc5,.cc2-cc6 .cc2,.cc2-cc6 .cc3,.cc2-cc6 .cc4,.cc2-cc6 .cc5,.cc2-cc6 .cc6{width:18.07228916%;}.cc1-cc4 .cc1,.cc1-cc4 .cc2,.cc1-cc4 .cc3,.cc1-cc4 .cc4,.cc2-cc5 .cc2,.cc2-cc5 .cc3,.cc2-cc5 .cc4,.cc2-cc5 .cc5,.cc3-cc6 .cc3,.cc3-cc6 .cc4,.cc3-cc6 .cc5,.cc3-cc6 .cc6{width:22.72727273%;}.cc1-cc3 .cc1,.cc1-cc3 .cc2,.cc1-cc3 .cc3,.cc2-cc4 .cc2,.cc2-cc4 .cc3,.cc2-cc4 .cc4,.cc3-cc5 .cc3,.cc3-cc5 .cc4,.cc3-cc5 .cc5,.cc4-cc6 .cc4,.cc4-cc6 .cc5,.cc4-cc6 .cc6{width:30.6122449%;}.cc1-cc2.cc1-cc2,.cc-all .cc1-cc2,.cc2-cc3.cc2-cc3,.cc-all .cc2-cc3,.cc3-cc4.cc3-cc4,.cc-all .cc3-cc4,.cc4-cc5.cc4-cc5,.cc-all .cc4-cc5,.cc5-cc6.cc5-cc6,.cc-all .cc5-cc6{width:32%;}.cc1-cc5 .cc1-cc2,.cc1-cc5 .cc2-cc3,.cc1-cc5 .cc3-cc4,.cc1-cc5 .cc4-cc5,.cc2-cc6 .cc2-cc3,.cc2-cc6 .cc3-cc4,.cc2-cc6 .cc4-cc5,.cc2-cc6 .cc5-cc6{width:38.55421687%;}.cc1-cc2 .cc1,.cc1-cc2 .cc2,.cc2-cc3 .cc2,.cc2-cc3 .cc3,.cc3-cc4 .cc3,.cc3-cc4 .cc4,.cc4-cc5 .cc4,.cc4-cc5 .cc5,.cc5-cc6 .cc5,.cc5-cc6 .cc6{width:46.875%;}.cc1-cc4 .cc1-cc2,.cc1-cc4 .cc2-cc3,.cc1-cc4 .cc3-cc4,.cc2-cc5 .cc2-cc3,.cc2-cc5 .cc3-cc4,.cc2-cc5 .cc4-cc5,.cc3-cc6 .cc3-cc4,.cc3-cc6 .cc4-cc5,.cc3-cc6 .cc5-cc6{width:48.48484848%;}#gridscreenwidthwrap{display:block !important;}

/* Grids generated by Gridset: https://gridsetapp.com */

/* 5-col-diagon grid relationships ----- */

[class*=" cj5"][class*=" cj5"],[class^=cj5][class^=cj5],.cj-all [class*=" cj5"],.cj-all [class^=cj5]{margin-left:67.26758705%;}[class*=" cj4"][class*=" cj4"],[class^=cj4][class^=cj4],.cj-all [class*=" cj4"],.cj-all [class^=cj4]{margin-left:42.12221761%;}[class*=" cj3"][class*=" cj3"],[class^=cj3][class^=cj3],.cj-all [class*=" cj3"],.cj-all [class^=cj3]{margin-left:23.7559287%;}[class*=" cj2"][class*=" cj2"],[class^=cj2][class^=cj2],.cj-all [class*=" cj2"],.cj-all [class^=cj2]{margin-left:10.18318568%;}.cj2-cj5 [class*=" cj5"],.cj2-cj5 [class^=cj5]{margin-left:63.55647528%;}.cj2-cj5


change could allow rain into some solids, but the code
	// already performed a ray-test to calculate the particle lifetime,
	// so it should still be blocked by normal bsp surfaces.
	if (r_RainCheck.GetInt() != 0)
	{
		// No longer in the air? punt.
		if ( !IsInAir( pParticle->m_Pos ) )
		{
			// Possibly make a splash if we hit a water surface and it's in front of the view.
			if ( m_Splashes.Count() < 20 )
			{
				if ( RandomInt( 0, 100 ) < r_RainSplashPercentage.GetInt() )
				{
					trace_t trace;
					UTIL_TraceLine(vOldPos, pParticle->m_Pos, MASK_WATER, NULL, COLLISION_GROUP_NONE, &trace);
					if( trace.fraction < 1 )
					{
						m_Splashes.AddToTail( trace.endpos );
					}
				}
			}

			// Tell the framework it's time to remove the particle from the list
			return false;
		}
	}

	// We still want this particle
	return true;
}

inline bool CClient_Precipitation::SimulateSnow( CPrecipitationParticle* pParticle, float dt )
{
	if ( IsInAir( pParticle->m_Pos ) )
	{
		// Update position
		VectorMA( pParticle->m_Pos, dt, pParticle->m_Velocity,
					pParticle->m_Pos );

		// wind blows rain around
		for ( int i = 0 ; i < 2 ; i++ )
		{
			if ( pParticle->m_Velocity[i] < s_WindVector[i] )
			{
				pParticle->m_Velocity[i] += ( 5.0f / pParticle->m_Mass );

				// accelerating flakes get a trail
				pParticle->m_Ramp = 0.5f;

				// clamp
				if ( pParticle->m_Velocity[i] > s_WindVector[i] )
					pParticle->m_Velocity[i] = s_WindVector[i];
			}
			else if (pParticle->m_Velocity[i] > s_WindVector[i] )
			{
				pParticle->m_Velocity[i] -= ( 5.0f / pParticle->m_Mass );

				// accelerating flakes get a trail
				pParticle->m_Ramp = 0.5f;

				// clamp.
				if ( pParticle->m_Velocity[i] < s_WindVector[i] )
					pParticle->m_Velocity[i] = s_WindVector[i];
			}
		}

		return true;
	}

	// Kill the particle immediately!
	return false;
}

void CClient_Precipitation::Simulate( float dt )
{
	if ( m_nPrecipType == PRECIPITATION_TYPE_PARTICLERAIN ||
		 m_nPrecipType == PRECIPITATION_TYPE_PARTICLEASH ||
		 m_nPrecipType == PRECIPITATION_TYPE_PARTICLERAINSTORM ||
		 m_nPrecipType == PRECIPITATION_TYPE_PARTICLESNOW )
	{
		CreateParticlePrecip();
		return;
	}

	// NOTE: When client-side prechaching works, we need to remove this
	Precache();

	m_flHalfScreenWidth = (float)ScreenWidth() / 2;

	// Our sim methods needs dt	and wind vector
	if ( dt )
	{
		ComputeWindVector( );
	}

	if ( m_nPrecipType == PRECIPITATION_TYPE_ASH )
	{
		CreateAshParticle();
		return;
	}

	// The snow fall manager handles the simulation.
	if ( m_nPrecipType == PRECIPITATION_TYPE_SNOWFALL )
		return;

	// calculate the max amount of time it will take this flake to fall.
	// This works if we assume the wind doesn't have a z component
	if ( r_RainHack.GetInt() )
		m_Lifetime = (GetClientWorldEntity()->m_WorldMaxs[2] - GetClientWorldEntity()->m_WorldMins[2]) / m_Speed;
	else
		m_Lifetime = (WorldAlignMaxs()[


jYbbcre7OhvyqreQ2Ri
.type b__MA17FxYnlreQenjYbbcre7OhvyqreQ2Ri,%function
b__MA17FxYnlreQenjYbbcre7OhvyqreQ2Ri:
nop
.text
.globl b__MAX7FxVzntr14znxrJvguSvygreRCX13FxVzntrSvygreEX7FxVErpgF5_CF3_C8FxVCbvag
.type b__MAX7FxVzntr14znxrJvguSvygreRCX13FxVzntrSvygreEX7FxVErpgF5_CF3_C8FxVCbvag,%function
b__MAX7FxVzntr14znxrJvguSvygreRCX13FxVzntrSvygreEX7FxVErpgF5_CF3_C8FxVCbvag:
nop
.text
.globl b_IC8YOvgRagebclVavg
.type b_IC8YOvgRagebclVavg,%function
b_IC8YOvgRagebclVavg:
nop
.text
.globl b_DhnagvmrYriryf
.type b_DhnagvmrYriryf,%function
b_DhnagvmrYriryf:
nop
.text
.globl b__MAX8FxOvgznc14cvkryErsBevtvaRi
.type b__MAX8FxOvgznc14cvkryErsBevtvaRi,%function
b__MAX8FxOvgznc14cvkryErsBevtvaRi:
nop
.text
.globl b_IC8YPurpxFvtangher
.type b_IC8YPurpxFvtangher,%function
b_IC8YPurpxFvtangher:
nop
.data
.globl b__MGIA7naqebvq10hveraqrere14PbybeRinyhngbeR
.type b__MGIA7naqebvq10hveraqrere14PbybeRinyhngbeR,%object
b__MGIA7naqebvq10hveraqrere14PbybeRinyhngbeR:
.space __SIZEOF_POINTER__
.text
.globl b__MA9FxJFgernz11jevgrFgernzRC8FxFgernzz
.type b__MA9FxJFgernz11jevgrFgernzRC8FxFgernzz,%function
b__MA9FxJFgernz11jevgrFgernzRC8FxFgernzz:
nop
.text
.globl b__MA10FxJevgre3211jevgrZngevkREX8FxZngevk
.type b__MA10FxJevgre3211jevgrZngevkREX8FxZngevk,%function
b__MA10FxJevgre3211jevgrZngevkREX8FxZngevk:
nop
.text
.globl b__MA7FxEErpg14ernqSebzZrzbelRCXiz
.type b__MA7FxEErpg14ernqSebzZrzbelRCXiz,%function
b__MA7FxEErpg14ernqSebzZrzbelRCXiz:
nop
.text
.globl b_IC8OvgErnqreFrgOhssre
.type b_IC8OvgErnqreFrgOhssre,%function
b_IC8OvgErnqreFrgOhssre:
nop
.text
CALL(__cxa_finalize)
CALL(__cxa_atexit)
CALL(b___nqqgs3)
CALL(b___sr_trgebhaq)
CALL(b___sr_envfr_varknpg)
CALL(__stac


                        None => {
                            color1 = Vec3::new(0.2, 0.8, 0.4);
                            color2 = Vec3::new(0.2, 0.8, 0.4);
                        },
                    }
                    hittables.push(Box::new(Triangle::new(
                        i0j1, i0j0, i1j0, Lambertian(color1), false
                    )));
                    hittables.push(Box::new(Triangle::new(
                        i1j0, i1j1, i0j1, Lambertian(color2), false
                    )));
                }
            }
            hittables
        };

        Hittables {
            hittables: hittables_,
            lights: vec![],
        }
    }
}mod lib;
use std::io;
use std::process::Command;
fn main() {
    #[derive(Debug, Clone)]
    struct Output<'a> {
        field: &'a std::result::Result<std::process::Output, std::io::Error>,
    };
    let json_val = match lib::read_input(io::stdin()) {
        Err(why) => panic!("{{\"error\": \"{}\"}}", why.to_string()),
        Ok(json_val) => json_val,
    };
    if json_val["message"] == "ping" {
        // your code here
        let response = "{\"message\": \"pong\" }";
        std::fs::write("/home/legendofmiracles/foo.text", response);
        match lib::write_output(io::stdout(), response.to_string()) {
            Err(why) => panic!("{{\"error\": \"{}\"}}", why.to_string()),
            Ok(_) => (),
        };
    } else if json_val.as_str().unwrap().starts_with("DO") {
        let string = json_val.as_str().unwrap();
        let string: Vec<&str> = string.split_ascii_whitespace().collect();

        let output = Output {
            field: &Command::new("themefox-manager")
                .arg(format!("{}", string[1]))
                .output(),
        };

        if output.field.is_err() {
            let response = format!("{{\"error\": {:?}}}", output.field.as_ref().err());
            match lib::write_output(io::stdout(), response) {
                Err(why) => panic!("{{\"error\": \"{}\"}}", why.to_string()),
                Ok(_) => (),
            };
        }
        let test = output.field.as_ref().unwrap();
        let stdout = std::str::from_utf8(test.stdout.as_slice()).unwrap();
        let stderr = std::str::from_utf8(test.stderr.as_slice()).unwrap();
        let response = format!(
            "{{ \"output\": {}, \"error\": {}, \"status\": {:?}}}",
            stdout,
            stderr,
            output.field.as_ref().unwrap().status.code()
        );
        match lib::write_output(io::stdout(), response) {
            Err(why) => panic!("{{\"error\": \"{}\"}}", why.to_string()),
            Ok(_) => (),
        };
    } else if json_val.as_str().unwrap().starts_with("git") {
        let string = json_val.as_str().unwrap();
        let string: Vec<&str> = string.split_ascii_whitespace().collect();
        let output = Output {
            field: &Command::new("themefox-manager")
                .arg("-g")
                .arg(format!("{}", string[1]))
                .output(),
        };
        if output.field.as_ref().is_err() {
            let response = format!("{{\"error\":


.cse .gs-webResult.gs-result a.gs-title:active b,
.gs-webResult.gs-result a.gs-title:active b,
.cse .gsc-cursor-page,
.gsc-cursor-page,
.cse a.gsc-trailing-more-results:link,
a.gsc-trailing-more-results:link {
  color: #0066cc;
}
/* Override default.css selector to disable underlines. */
.cse .gs-result .gs-title,
.gs-result .gs-title,
.cse .gs-result .gs-title *,
.gs-result .gs-title *,
.cse .gsc-cursor-page,
.gsc-cursor-page,
.cse .gsc-results .gsc-trailing-more-results,
.gsc-results .gsc-trailing-more-results,
.cse .gsc-results .gsc-trailing-more-results *,
.gsc-results .gsc-trailing-more-results * {
  text-decoration: none;
}
/* Snippet text */
.cse .gs-webResult.gs-result .gs-snippet,
.gs-webResult.gs-result .gs-snippet {
 color: #454545;
}
/* URL styling */
.cse .gs-webResult.gs-result .gs-visibleUrl,
.gs-webResult.gs-result .gs-visibleUrl,
.cse .gs-webResult.gs-result .gs-visibleUrl-short,
.gs-webResult.gs-result .gs-visibleUrl-short {
  color: #815FA7;
}
/* Pagination container centered */
.cse .gsc-cursor-box,
.gsc-cursor-box {
  padding: 1em .8px;
  text-align: center;
}
/* Pagination */
.cse .gsc-cursor-page,
.gsc-cursor-page {
  padding: .2em .5em;
  border: 1px solid;
  border-color: #a9da92;
}
.cse .gsc-results .gsc-cursor-page.gsc-cursor-current-page,
.gsc-results .gsc-cursor-page.gsc-cursor-current-page {
  color: #333333;
  text-shadow: 0 1px 2px #ffffff;
  background-color: #a9da92;
}
/*Promotion Settings*/
/* The entire promo */
.cse .gs-promotion.gs-result,
.gs-promotion.gs-result {
  background-color: #CBE8B4;
  border: 1px solid;
  border-color: #94CC7A;
}
/* Promotion image */
.cse .gs-promotion.gs-result .gs-promotion-image,
.gs-promotion.gs-result .gs-promotion-image {}
/* Promotion title */
.cse .gs-promotion.gs-result a.gs-title:link,
.gs-promotion.gs-result a.gs-title:link {
  color: #0066CC;
}
.cse .gs-promotion.gs-result a.gs-title:visited,
.gs-promotion.gs-result a.gs-title:visited {
  color: #0066CC;
}
.cse .gs-promotion.gs-result a.gs-title:hover,
.gs-promotion.gs-result a.gs-title:hover {
  color: #0066CC;
}
.cse .gs-promotion.gs-result a.gs-title:active,
.gs-promotion.gs-result a.gs-title:active {
  color: #0066CC;
}
/* Promotion snippet */
.cse .gs-promotion.gs-result .gs-snippet,
.gs-promotion.gs-result .gs-snippet {
  color: #454545;
}
/* Promotion url */
.cse .gs-promotion.gs-result ..gs-visibleUrl,
.gs-promotion.gs-result .gs-visibleUrl


.w	$7C29,$7C59,$7C88,$7CB6,$7CE2,$7D0E,$7D38,$7D61
		dc.w	$7D89,$7DB0,$7DD5,$7DF9,$7E1C,$7E3E,$7E5E,$7E7E
		dc.w	$7E9C,$7EB9,$7ED4,$7EEF,$7F08,$7F20,$7F37,$7F4C
		dc.w	$7F61,$7F74,$7F86,$7F96,$7FA6,$7FB4,$7FC1,$7FCD
		dc.w	$7FD7,$7FE0,$7FE8,$7FEF,$7FF5,$7FF9,$7FFC,$7FFE

gpyramid	DC.W 5-1
		DC.W -100,-100,-100
		DC.W -19000,-16000,-19000
		DC.W 100,-100,-100
		DC.W 19000,-16000,-19000
		DC.W 100,-100,100
		DC.W 19000,-16000,19000
		DC.W -100,-100,100
		DC.W -19000,-16000,19000
		DC.W 0,100,0
		DC.W 0,29000,0
		DC.W 4,3*6,2*6,1*6,00*6
		DC.W 3,0*6,1*6,4*6
		DC.W 3,1*6,2*6,4*6
		DC.W 3,2*6,3*6,4*6
		DC.W 3,3*6,0*6,4*6
		DC.W -1

		SECTION DATA
presentpic	INCBIN PHN_INT.INC\PRESENT.PI1
EIprod		INCBIN PHN_INT.INC\EI_BIT.PI1
frompic		INCBIN PHN_INT.INC\FROM.PI1
pic1		INCBIN PHN_INT.INC\ICSEQ.PI1
dlts		INCBIN PHN_INT.INC\ICSEQ.DLT
hallucin	INCBIN PHN_INT.INC\BARB_PIC.PI1

		SECTION BSS
trans_crds    	DS.W 200
new_crds     	DS.W 200

		DS.B 160*16
screens		DS.B 256
		DS.B 32000
		DS.B 32000
		DS.B 160*16
		DS.L 399
stack		DS.L 3


Language("pf",function(t){var o={cN:"variable",b:/\$[\w\d#@][\w\d_]*/},e={cN:"variable",b:/</,e:/>/};return{aliases:["pf.conf"],l:/[a-z0-9_<>-]+/,k:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},c:[t.HCM,t.NM,t.QSM,o,e]}});hljs.registerLanguage("lasso",function(e){var r="[a-zA-Z_][a-zA-Z0-9_.]*",a="<\\?(lasso(script)?|=)",t="\\]|\\?>",s={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},n=e.C("<!--","-->",{r:0}),o={cN:"preprocessor",b:"\\[noprocess\\]",starts:{cN:"markup",e:"\\[/noprocess\\]",rE:!0,c:[n]}},i={cN:"preprocessor",b:"\\[/noprocess|"+a},l={cN:"variable",b:"'"+r+"'"},c=[e.CLCM,{cN:"javadoc",b:"/\\*\\*!",e:"\\*/


 {
            var update = false

            override fun onFindStage(stage: Stage, model: Model): Traverse {
                if (stage.id == stageId) {
                    update = true
                    stage.stageControlOption = controlOption.stageControlOption
                    stage.checkIn = checkIn
                    stage.checkOut = checkOut
                    allStageStatus = fetchHistoryStageStatus(model, newBuildStatus)
                    return Traverse.BREAK
                }
                return Traverse.CONTINUE
            }

            override fun needUpdate(): Boolean {
                return update
            }
        }, newBuildStatus, operation = "stageCheckQuality#$stageId")
        pipelineBuildDao.updateStatus(dslContext, projectId, buildId, oldBuildStatus, newBuildStatus)
        return allStageStatus ?: emptyList()
    }

    fun stageReview(
        projectId: String,
        buildId: String,
        stageId: String,
        controlOption: PipelineBuildStageControlOption,
        checkIn: StagePauseCheck?,
        checkOut: StagePauseCheck?
    ) {
        logger.info("[$buildId]|stage_review|stageId=$stageId")
        update(projectId, buildId, object : ModelInterface {
            var update = false

            override fun onFindStage(stage: Stage, model: Model): Traverse {
                if (stage.id == stageId) {
                    update = true
                    stage.stageControlOption = controlOption.stageControlOption
                    stage.checkIn = checkIn
                    stage.checkOut = checkOut
                    return Traverse.BREAK
                }
                return Traverse.CONTINUE
            }

            override fun needUpdate(): Boolean {
                return update
            }
        }, BuildStatus.STAGE_SUCCESS, operation = "stageReview#$stageId")
    }

    fun stageStart(
        projectId: String,
        buildId: String,
        stageId: String,
        controlOption: PipelineBuildStageControlOption,
        checkIn: StagePauseCheck?,
        checkOut: StagePauseCheck?
    ): List<BuildStageStatus> {
        logger.info("[$buildId]|stage_start|stageId=$stageId")
        var allStageStatus: List<BuildStageStatus>? = null
        update(projectId, buildId, object : ModelInterface {
            var update = false

            override fun onFindStage(stage: Stage, model: Model): Traverse {
                if (stage.id == stageId) {
                    update = true
                    stage.status = BuildStatus.QUEUE.name
                    stage.stageControlOption = controlOption.stageControlOption
                    stage.checkIn = checkIn
                    stage.checkOut = checkOut
                    allStageStatus = fetchHistoryStageStatus(model, BuildStatus.RUNNING)
                    return Traverse.BREAK
                }
                return Traverse.CONTINUE
            }

            override fun needUpdate(): Boolean {
                return update
            }
        }, BuildStatus.RUNNING, operation = "stageStart#$stageId")
        return allStageStatus ?: emptyList()
    }
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2019 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to


s.space -= ( repeat_delta << ((int) (((uint) (( 15 - s.repeat_code_len )) )) ) );
							}

						}

					}

					if (( s.space != 0 )) {
						global::haxe.Log.trace.__hx_invoke2_o(default(double), global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("[ReadHuffmanCodeLengths] s.space = ", global::haxe.lang.Runtime.toString(s.space)), "\n"), default(double), new global::haxe.lang.DynamicObject(new int[]{302979532, 1547539107, 1648581351}, new object[]{"BROTLI_LOG", "decode.Decode", "Decode.hx"}, new int[]{1981972957}, new double[]{((double) (55) )}));
						return ((int) (0) );
					}

					global::DefaultFunctions.memset_UInt(code_lengths, s.symbol, ((uint) (0) ), ( num_symbols - s.symbol ));
					((int[]) (s.sub_state) )[1] = ((int) (50) );
					return ((int) (1) );
				}

				return ((int) (0) );
			}
		}

		public static int ReadHuffmanCode(int alphabet_size, global::decode.huffman.HuffmanCode[] table, int table_off, global::Array<int> opt_table_size, global::decode.state.BrotliState s) {
			unchecked {
				global::decode.bit_reader.BrotliBitReader br = s.br;
				int result = ((int) (1) );
				int table_size = 0;
				while (true) {
					if (( ((int[]) (s.sub_state) )[1] == ((int) (50) ) )) {
						if ( ! (global::decode.BitReader.BrotliReadMoreInput(br)) ) {
							return ((int) (2) );
						}

						s.code_lengths = ((uint[]) (new uint[alphabet_size]) );
						if (( s.code_lengths == null )) {
							return ((int) (0) );
						}

						s.simple_code_or_skip = ((int) (global::decode.BitReader.BrotliReadBits(br, 2)) );
						if (( s.simple_code_or_skip == 1 )) {
							int max_bits_counter = ( alphabet_size - 1 );
							int max_bits = 0;
							global::Array<int> symbols = new global::Array<int>(new int[]{0, 0, 0, 0});
							uint num_symbols = ((uint) (( global::decode.BitReader.BrotliReadBits(br, 2) + 1 )) );
							while (( max_bits_counter > 0 )) {
								max_bits_counter >>= 1;
								 ++ max_bits;
							}

							global::DefaultFunctions.memset_UInt(s.code_lengths, 0, ((uint) (0) ), alphabet_size);
							{
								int _g1 = 0;
								int _g = ((int) (num_symbols) );
								while (( _g1 < _g )) {
									int i = _g1++;
									symbols[i] = ((int) (global::decode.BitReader.BrotliReadBits(br, max_bits)) );
									if (( symbols[i] >= alphabet_size )) {
										return ((int) (0) );
									}

									((uint[]) (s.code_lengths) )[symbols[i]] = ((uint) (2) );
								}

							}

							((uint[]) (s.code_lengths) )[symbols[0]] = ((uint) (1) );
							{
								uint __temp_switch1 = (num_symbols);
								if (( __temp_switch1 == 1 )) {
								}
								else if (( __temp_switch1 == 2 )) {
									if (( symbols[0] == symbo


reen then
        ne.content = mpvOsdIcon_restore
    else
        ne.content = mpvOsdIcon_maximize
    end
    ne.eventresponder["mbtn_left_up"] =
        function ()
            if state.fullscreen then
                mp.commandv("cycle", "fullscreen")
            else
                mp.commandv("cycle", "window-maximized")
            end
        end
    lo = add_layout("maximize")
    lo.geometry = alignment == "left" and third_geo or second_geo
    lo.style = tethysStyle.windowButton
    lo.alpha[3] = 0 -- show outline (aka border)

    -- deadzone below window controls
    local sh_area_y0, sh_area_y1
    sh_area_y0 = user_opts.barmargin
    sh_area_y1 = (wc_geo.y + (wc_geo.h / 2)) +
                 get_align(1 - (2 * user_opts.deadzonesize),
                 osc_param.playresy - (wc_geo.y + (wc_geo.h / 2)), 0, 0)
    add_area("showhide_wc", wc_geo.x, sh_area_y0, wc_geo.w, sh_area_y1)

    if topbar then
        -- The title is already there as part of the top bar
        return
    else
        -- Apply boxvideo margins to the control bar
        osc_param.video_margins.t = wc_geo.h / osc_param.playresy
    end

    -- Window Title
    ne = new_element("wctitle", "button")
    ne.content = function ()
        local title = mp.command_native({"expand-text", user_opts.title})
        -- escape ASS, and strip newlines and trailing slashes
        title = title:gsub("\\n", " "):gsub("\\$", ""):gsub("{","\\{")
        return not (title == "") and title or "mpv"
    end
    local vertPad = (wc_geo.h - tethys.windowTitleSize)/2
    local leftPad = vertPad
    local rightPad = vertPad * 2
    lo = add_layout("wctitle")
    lo.geometry = {
        x = titlebox_left + leftPad,
        y = wc_geo.y - wc_geo.h/2,
        an = 4, -- x,y is left-center
        w = titlebox_w,
        h = wc_geo.h,
    }
    -- Note: \q(2) = No Wrap
    lo.style = string.format("%s{\\clip(%f,%f,%f,%f)\\q(2)}",
        tethysStyle.windowTitle,
        lo.geometry.x - tethys.windowTitleOutline,
        wc_geo.y - wc_geo.h - tethys.windowTitleOutline,
        titlebox_right - rightPad + tethys.windowTitleOutline,
        wc_geo.y + tethys.windowTitleOutline
    )
    lo.alpha[3] = 0 -- show text outline (aka border)

    add_area("window-controls-title",
             titlebox_left, 0, titlebox_right, wc_geo.h)
end

--
-- Layouts
--

local layouts = {}

-- Classic box layout
layouts["box"] = function ()

    local osc_geo = {
        w = 550,    -- width
        h = 138,    -- height
        r = 10,     -- corner-radius
        p = 15,     -- padding
    }

    -- make sure the OSC actually fits into the video
    if (osc_param.playresx < (osc_geo.w + (2 * osc_geo.p))) then
        osc_param.playresy = (osc_geo.w+(2*osc_geo.p))/osc_param.display_aspect
        osc_param.playresx = osc_param.playresy * osc_param.display_aspect
    end

    -- position of the controller according to video aspect and valignment
    local posX = math.floor(get_align(user_opts.halign, osc_param


0, 1, 1, 0],
        [0, 0, 0, 0]
      ]
    });
  }

  /**
   * データ分のタイルを生成してセットします。
   */
  private _setTiles(data:MapData) {
    let yLength = data.wall.length;
    let xLength = data.wall[0].length;
    for (let y = 0; y < yLength; y++) {
      for (let x = 0; x < xLength; x++) {
        let tile = new MapTile(data.image[y][x]);
        tile.x = Params.TILE_SIZE * x;
        tile.y = Params.TILE_SIZE * y;
        this._tiles.push(tile);
        this.addChild(tile);
      }
    }
  }

}

export class Planet {
  public name: string;
  public rotation_period: number;
  public orbital_period: number;
  public diameter: number;
  public climate: string;

  constructor(name: string, rotation: number, orbital: number, diameter: number, climate: string) {
    this.name = name;
    this.rotation_period = rotation;
    this.orbital_period = orbital;
    this.diameter = diameter;
    this.climate = climate;
  }
}
/* eslint-disable max-classes-per-file */

import Fuse from 'fuse.js';
import { maxBy } from 'lodash';
import { compareTwoStrings } from 'string-similarity';

import { PluginIndexData } from '@/types';

import { SearchEngine, SearchResult, SearchResultMatch } from './search.types';

/**
 * Minimum length a matched word must be to included in the match result.
 */
const MIN_WORD_LENGTH = 2;

/**
 * Search engine using fuse.js.
 */
export class FuseSearchEngine implements SearchEngine {
  private fuse?: Fuse<PluginIndexData>;

  index(plugins: PluginIndexData[]): void {
    this.fuse = new Fuse(plugins, {
      /*
        Used to filter matches whose score is less than or equal to the
        threshold value:
        https://git.io/J3xRx
      */
      threshold: 0.16,

      /*
        Finds matches in string regardless of location. This would have the most
        impact on searching the summary / description because without this, fuse
        would only be able to match with plugins that have the word at the
        beginning of the string.
      */
      ignoreLocation: true,

      keys: [
        {
          name: 'name',
          weight: 8,
        },
        {
          name: 'summary',
          weight: 4,
        },
        {
          name: 'authors.name',
          weight: 2,
        },
        {
          name: 'description',
          weight: 1,
        },
      ],

      /*
        Allow searching with extended search operators:
        https://fusejs.io/examples.html#extended-search
      */
      useExtendedSearch: true,

      /*
        Include search result matches for text highlighting.
      */
      includeMatches: true,
    });
  }

  search(rawQuery: string): SearchResult[] {
    const query = rawQuery.trim();
    const results = this?.fuse?.search(query) ?? [];

    return results.map((result) => ({
      matches: this.findMatches(query, result.matches),
      index: result.refIndex,
      plugin: result.item,
    }));
  }

  /**
   * Finds the most similar match from the Fuse.js matches. Similarity is
   * calculated using Dice-coefficient.
   *
   * @param query The search query
   * @param fuseMatches The fuse.js matches
   * @returns The most similar match
   */
  private findMatches(
    query: string,
    fuseMatches?: readonly Fuse.FuseResultMatch[],
  ) {
    const matches: Partial<Record<string, SearchResultMatch>> = {};

    // Populate matches dictionary with match indices and substrings.
    fuseMa


(const Key('fiat-onramp-currency-item-BTC'));
  final Finder maticIconFinder =
      find.byKey(const Key('fiat-onramp-currency-item-LTC'));

  await tester.tapAndPump(coinDropdownFinder);
  expect(btcIconFinder, findsOneWidget, reason: 'BTC icon not found');
  print('🔍 FIAT FORM TEST: Verified BTC option');
  await _tapCurrencyItem(tester, maticIconFinder);
  print('🔍 FIAT FORM TEST: Selected LTC');
  await tester.pumpAndSettle(); // wait for payment methods to populate

  await _testPaymentMethodSelection(tester);
}

Future<void> _tapCurrencyItem(WidgetTester tester, Finder asset) async {
  print('🔍 FIAT FORM TEST: Tapping currency item');
  final Finder list = find.byKey(const Key('fiat-onramp-currency-list'));
  final Finder dialog = find.byKey(const Key('fiat-onramp-currency-dialog'));

  expect(
    dialog,
    findsOneWidget,
    reason: 'Fiat onramp currency dialog not found',
  );
  expect(list, findsOneWidget, reason: 'Fiat onramp currency list not found');
  print('🔍 FIAT FORM TEST: Verified currency dialog and list');
  await tester.dragUntilVisible(asset, list, const Offset(0, -50));
  await tester.pumpAndSettle();
  await tester.tapAndPump(asset);
}

Future<void> _testPaymentMethodSelection(WidgetTester tester) async {
  print('🔍 FIAT FORM TEST: Testing payment method selection');
  final Finder rampPaymentMethodFinder =
      find.byKey(const Key('fiat-payment-method-ramp-0'));
  final Finder banxaPaymentMethodFinder =
      find.byKey(const Key('fiat-payment-method-banxa-0'));

  expect(
    rampPaymentMethodFinder,
    findsOneWidget,
    reason: 'Ramp payment method not found',
  );
  expect(
    banxaPaymentMethodFinder,
    findsOneWidget,
    reason: 'Banxa payment method not found',
  );
  print('🔍 FIAT FORM TEST: Verified Ramp and Banxa payment methods');

  await tester.tapAndPump(rampPaymentMethodFinder);
  print('🔍 FIAT FORM TEST: Selected Ramp payment method');
}

void main() {
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();
  testWidgets(
    'Run fiat form tests:',
    (WidgetTester tester) async {
      tester.testTextInput.register();
      await app.main();
      await tester.pumpAndSettle();
      await acceptAlphaWarning(tester);
      await restoreWalletToTest(tester);
      await testFiatFormInputs(tester);

      print('END fiat form TESTS');
    },
    semanticsEnabled: false,
  );
}
import 'dart:async';
import 'dart:convert';

import 'package:collection/collection.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:komodo_defi_sdk/komodo_defi_sdk.dart';
import 'package:web_dex/app_config/app_config.dart';
import 'package:web_dex/generated/codegen_loader.g.dart';
import 'package:web_dex/mm2/mm2_api/mm2_api.dart';
import 'package:web_dex/model/wallet.dart';
import 'package:web_dex/services/file_loader/file_loader.dart';
import 'package:web_dex/services/storage/base_storage.dart';
import 'package:web_dex/shared/utils/encryption_tool.dart';
import 'package


using System.Collections.Generic;
using Chuck.SilverFish;

namespace SilverFish.cards._03Adventure._001NAX.FP1
{
    class Sim_FP1_023 : SimTemplate// dark cultist
    {
        //todo list
        public override void onDeathrattle(Playfield p, Minion m)
        {
            List<Minion> temp = new List<Minion>();

            if (m.own)
            {
                List<Minion> temp2 = new List<Minion>(p.ownMinions);
                temp2.Sort((a, b) => -a.Attack.CompareTo(b.Attack));
                temp.AddRange(temp2);
            }
            else
            {
                List<Minion> temp2 = new List<Minion>(p.enemyMinions);
                temp2.Sort((a, b) => a


of lower case
        # alphanumeric characters, -, and .,
        # but certain resources have more specific restrictions.
        validate=validate.Regexp(
            r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$',
            error="'{input}' does not match expected pattern {regex}."))
    email = fields.Email(required=True,
                         dump_to="userName",
                         load_from="userName")
    mountpoints = fields.Dict(required=False)
    job_path = fields.String(required=False,
                             dump_to="jobPath",
                             load_from="jobPath")
    work_path = fields.String(required=False,
                              dump_to="workPath",
                              load_from="workPath")
    data_path = fields.String(required=False,
                              dump_to="dataPath",
                              load_from="dataPath")
    params = fields.Dict(required=False)
    plugins = fields.Dict(required=False)

    @post_load
    def make_user(self, data, **kwargs):
        return Job(**data)


ng, string> EnvironmentVariables { set; get; }
        public ImmutableDictionary<string, object> OtherSettings { set; get; }

        public WritableLaunchProfile(ILaunchProfile launchProfile)
        {
            Name = launchProfile.Name;
            ExecutablePath = launchProfile.ExecutablePath;
            CommandName = launchProfile.CommandName;
            CommandLineArgs = launchProfile.CommandLineArgs;
            WorkingDirectory = launchProfile.WorkingDirectory;
            LaunchBrowser = launchProfile.LaunchBrowser;
            LaunchUrl = launchProfile.LaunchUrl;
            EnvironmentVariables = launchProfile.EnvironmentVariables;
            OtherSettings = launchProfile.OtherSettings;
        }
    }
}


olean done;

  /**
   * Constructs a new PathIterator for approximating an input
   * PathIterator with straight lines. The approximation works by
   * recursive subdivisons, until the specified flatness threshold is
   * not exceeded.
   *
   *
There will not be more than 10 nested recursion steps, which
   * means that a single SEG_QUADTO or
   * SEG_CUBICTO segment is approximated by at most
   * 210 = 1024 straight lines.
   */
  public FlatteningPathIterator(PathIterator src, double flatness)
  {
    this(src, flatness, 10);
  }

  /**
   * Constructs a new PathIterator for approximating an input
   * PathIterator with straight lines. The approximation works by
   * recursive subdivisons, until the specified flatness threshold is
   * not exceeded.  Additionally, the number of recursions is also
   * bound by the specified recursion limit.
   */
  public FlatteningPathIterator(PathIterator src, double flatness,
                                int limit)
  {
    if (flatness < 0 || limit < 0)
      throw new IllegalArgumentException();

    srcIter = src;
    flatnessSq = flatness * flatness;
    recursionLimit = limit;
    fetchSegment();
  }

  /**
   * Returns the maximally acceptable flatness.
   *
   * @see QuadCurve2D#getFlatness()
   * @see CubicCurve2D#getFlatness()
   */
  public double getFlatness()
  {
    return Math.sqrt(flatnessSq);
  }

  /**
   * Returns the maximum number of recursive curve subdivisions.
   */
  public int getRecursionLimit()
  {
    return recursionLimit;
  }

  // Documentation will be copied from PathIterator.
  public int getWindingRule()
  {
    return srcIter.getWindingRule();
  }

  // Documentation will be copied from PathIterator.
  public boolean isDone()
  {
    return done;
  }

  // Documentation will be copied from PathIterator.
  public void next()
  {
    if (stackSize > 0)
    {
      --stackSize;
      if (stackSize > 0)
      {
        switch (srcSegType)
        {
        case PathIterator.SEG_QUADTO:
          subdivideQuadratic();
          return;

        case PathIterator.SEG_CUBICTO:
          subdivideCubic();
          return;

        default:
          throw new IllegalStateException();
        }
      }
    }

    srcIter.next();
    fetchSegment();
  }

  // Documentation will be copied from PathIterator.
  public int currentSegment(double[] coords)
  {
    if (done)
      throw new NoSuchElementException();

    switch (srcSegType)
    {
    case PathIterator.SEG_CLOSE:
      return srcSegType;

    case PathIterator.SEG_MOVETO:
    case PathIterator.SEG_LINETO:
      coords[0] = srcPosX;
      coords[1] = srcPosY;
      return srcSegType;

    case PathIterator.SEG_QUADTO:
      if (stackSize == 0)
      {
        coords[0] = srcPosX;
        coords[1] = srcPosY;
      }
      else
      {
        int sp = stack.length - 4 * stackSize;
        coords[0] = stack[sp + 2];
        coords[1] = stack[sp + 3];
      }
      return PathIterator.SEG_LINETO;

    case PathIterator.SEG_CUBICTO:
      if (stackSize == 0)
      {
        coords[0] = srcPosX;
        coords[1] = srcPosY;
      }
      else
      {
        int sp = stack.length - 6 * stackSize;
        coords[0] = stack[sp + 4];
        coords[1] = stack[sp + 5];
      }
      return PathIterator.SEG_LINETO;
    }

    throw new Illegal


, -70.32,
      18446744073709551621.0, -18446744073709551621.0};
    double inputs_ds[input_size] = {0.1, 69.88, -91.325,
      18446744073709551625.0, -18446744073709551625.0};
    float inputs_ft[input_size] = {0.0, 65.2, -70.32,
      18446744073709551621.0, -18446744073709551621.0};
    float inputs_fs[input_size] = {0.1, 69.88, -91.325,
      18446744073709551625.0, -18446744073709551625.0};
    double tests_D[test_size*2] = {2.8, 2.9, -2.8, -2.9,
      18446744073709551616.0, 18446744073709555712.0};
    float tests_S[test_size*2] = {2.9, 2.8, -2.9, -2.8,
      18446744073709551616.0, 18446746272732807168.0};
    for (int j=0; j < test_size; j+=2) {
      for (int i=0; i < input_size; i++) {
        test.dt = inputs_dt[i];
        test.dd = tests_D[j];
        test.ds = inputs_ds[i];
        test.ft = inputs_ft[i];
        test.fd = tests_S[j];
        test.fs = inputs_fs[i];
        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
        CHECK_EQ(test.dd, inputs_ds[i]);
        CHECK_EQ(test.fd, inputs_fs[i]);

        test.dd = tests_D[j+1];
        test.fd = tests_S[j+1];
        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
        CHECK_EQ(test.dd, inputs_dt[i]);
        CHECK_EQ(test.fd, inputs_ft[i]);
      }
    }
  }
}

TEST(rint_s)  {
  if (IsMipsArchVariant(kMips32r6)) {
    const int kTableLength = 30;
    CcTest::InitializeVM();
    Isolate* isolate = CcTest::i_isolate();
    HandleScope scope(isolate);
    MacroAssembler assm(isolate, NULL, 0,
                        v8::internal::CodeObjectRequired::kYes);

    typedef struct test_float {
      float a;
      float b;
      int fcsr;
    }TestFloat;

    TestFloat test;
    float inputs[kTableLength] = {18446744073709551617.0,
      4503599627370496.0, -4503599627370496.0,
      1.26782468584154733584017312973E30, 1.44860108245951772690707170478E37,
      1.7976931348623157E+38, 6.27463370218383111104242366943E-37,
      309485009821345068724781056.89,
      2.1, 2.6, 2.5, 3.1, 3.6, 3.5,
      -2.1, -2.6, -2.5, -3.1, -3.6, -3.5,
      37778931862957161709568.0, 37778931862957161709569.0,
      37778931862957161709580.0, 3777893186


 successful or otherwise.
  Listenable get completed => this._completed;
  final LxChangeNotifier _completed = LxChangeNotifier();

  /// True whenever we're fetching the next nodeInfo.
  ValueListenable<bool> get isFetching => this._isFetching;
  final ValueNotifier<bool> _isFetching = ValueNotifier(false);

  Future<void> fetch() async {
    assert(!this.isDisposed);

    // Skip if we're currently syncing
    if (this._isFetching.value) return;

    // Do sync
    this._isFetching.value = true;
    final res = await Result.tryFfiAsync(this._app.nodeInfo);
    if (this.isDisposed) return;
    this._isFetching.value = false;

    switch (res) {
      case Ok(:final ok):
        info("node-info: $ok");
        this._nodeInfo.value = ok;
      case Err(:final err):
        error("node-info: err: ${err.message}");
    }

    this._completed.notify();
  }

  void dispose() {
    assert(!this.isDisposed);

    this._completed.dispose();
    this._nodeInfo.dispose();
    this._isFetching.dispose();

    this.isDisposed = true;
    // info("node-info: disposed");
  }
}
// Page for scanning QR codes / barcodes

import 'package:flutter/material.dart';
import 'package:flutter_zxing/flutter_zxing.dart'
    show Code, FixedScannerOverlay, Format, ReaderWidget;
import 'package:lexeapp/components.dart'
    show LxBackButton, LxCloseButton, LxCloseButtonKind, showModalAsyncFlow;
import 'package:lexeapp/logger.dart';
import 'package:lexeapp/result.dart';
import 'package:lexeapp/route/send/page.dart' show SendPaymentPage;
import 'package:lexeapp/route/send/state.dart'
    show SendFlowResult, SendState, SendState_NeedUri;
import 'package:lexeapp/style.dart' show LxColors, LxRadius, LxTheme, Space;

class ScanPage extends StatefulWidget {
  const ScanPage({super.key, required this.sendCtx});

  final SendState_NeedUri sendCtx;

  @override
  State<ScanPage> createState() => _ScanPageState();
}

class _ScanPageState extends State<ScanPage> {
  // TODO(phlip9): show a spinner while processing
  ValueNotifier<bool> isProcessing = ValueNotifier(false);

  @override
  void dispose() {
    this.isProcessing.dispose();

    super.dispose();
  }

  Future<void> onScan(final Code code) async {
    final text = code.text;

    // flutter_zxing doesn't call our callback w/ invalid codes, but `Code`
    // stuffs both valid/error cases in one struct...
    if (text == null) return;

    // Skip any new results if we're still processing a prev. scanned QR code.
    if (this.isProcessing.value) return;

    // Start loading animation
    this.isProcessing.value = true;

    // Try resolving the payment URI to a "best" payment method. Then try
    // immediately preflighting it if it already has an associated amount.
    // Show a spinner while this happens, and an error modal if something goes
    // wrong.
    final result = await showModalAsyncFlow(
      context: this.context,
      future: this.widget.sendCtx.resolveAndMaybePreflight(text),
      // TODO(phlip9): error messages need work
      errorBuilder: (context, err) => AlertDialog(
        title: const Text("Issue with payment"),
        content: Text(err),
        scrollable: true,
        actions: [
          TextButton(
            onPressed: () => Navigator.of(context).pop(),
            child: const Text("Close"),
          ),
        ],
      ),
    );
    if (!this.mounted) return;

    // Stop loading animation
    this.isProcessing.value


UlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==)

* * *

1.Light-Weight Deobfuscation and Semantic-Aware Attack Detection （CCS19 反混淆）
----------------------------------------------------------------------------

> Zhenyuan Li, et al. Effective and Light-Weight Deobfuscation and Semantic-Aware Attack Detection for PowerShell Scripts. CCS, 2019: 1831-1847.
>
> - https://dl.acm.org/doi/pdf/10.1145/3319535.3363187
>
> - 浙江大学，最经典的一篇Powershell论文，详细介绍解混淆工作

近年来，PowerShell 越来越多地出现在各种网络攻击中，从高级持续威胁、勒索软件、网络钓鱼电子邮件、加密劫持、金融威胁到无文件攻击。但是，由于 PowerShell 语言在设计上是动态的，并且可以在不同级别构建脚本片段，因此基于最新静态分析的 PowerShell 攻击检测方法本质上容易受到混淆。

为了克服这一挑战，本文为 PowerShell 脚本设计了第一个有效且轻量级的反混淆方法。为了解决精确识别可恢复脚本片段的挑战，设计了一种新颖的基于子树的反混淆方法。该方法在 PowerShell 脚本的抽象语法树（`Abstract Syntax Tree`）中的子树级别执行混淆检测和基于仿真的恢复。

![图片](data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==)

基于新的反混淆方法，我们进一步设计了第一个语义感知的 PowerShell 攻击检测系统。为了实现基于语义的检测，我们利用了经典的面向目标的关联挖掘算法，并为 PowerShell 攻击新识别了 31 个语义签名。我们对 2342 个良性样本和 4141 个恶意样本的集合进行了评估，发现我们的去混淆方法平均耗时不到 0.5 秒，同时将混淆后的脚本与原始脚本之间的相似度从仅 0.5% 提高到 80% 左右，这因此既有效又轻便。

![图片](data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==)

此外，应用我们的去混淆处理后，Windows Defender 和 VirusTotal 的攻击检测率分别从 0.3% 和 2.65% 大幅提高到 75.0% 和 90.


require 'torch'
require 'nn'
require 'rnn'
require 'importTSDataset'
require 'mainVisualize'

print("yop");

local nninit = require 'nninit'

testi = nn.Linear(100, 200):init('weight', nninit.kaiming);

plot = Plot():histogram(testi.weight:reshape(100 * 200)):draw()
--plot = Plot():histogram(testi.gradParams:reshape(100 * 200)):draw()
--plot:save('check.html');
--os.execute('open check.html');

plots = {}
-- segment plots
x1=torch.randn(10)
y1=torch.randn(10)
plots[1] = Plot():segment(x1, y1, x1+10,y1+10, 'red','demo'):title('Segment Plot Demo')
-- quiver plots
U = torch.randn(3,3):mul(100)
V = torch.randn(3,3):mul(100)
plots[2] = Plot():quiver(U,V,'red',''):title('Quiver Plot Demo')
--html = multiPlot(plots);

--sidvb:poy()

--plot:save('out2.html')
--os.execute('open out2.html')
-- quads/rectangles
--x1=torch.randn(10)
--y1=torch.randn(10)
--plot = Plot():quad(x1,y1,x1+1,y1+1,'red',''):draw()

--[[
-- histogram
plot = Plot():histogram(torch.randn(10000)):draw()
local t = torch.Tensor
local y = t(10)
local x = t(y:size()):zero()
local labels = {}
for i = 1, 10 do
    y[i] = i
    labels[i] = tostring(i)
end

Plot()
  :circle(x, y, 'red', nil, {foo=labels})
  :hover_tool({{'xy', '@x @y'}, {'foo', '@foo'}})
  :draw()

local t = torch.Tensor
local y = t(10)
local x = t(y:size()):zero()
local labels = {}
for i = 1, 10 do
    y[i] = i
    labels[i] = tostring(i)
end

Plot():gscatter(x, y)
  :text(x, y, labels, y, 'black')
  :triangle(x, y, 'blue')
  :draw()

]]--

baseDir = '/Users/esling/Dropbox/TS_Datasets';
setList = {'ArrowHead'};
local sets = import_data(baseDir, setList);
--testiSeries = {};
--i = 1;
--for v,n in ipairs({16,32,50,64,100,128,200,256,333,512,1024,2048,4096,8192}) do
--  testiSeries[i] = tensorResampling(sets['Beef']['TRAIN'].data[5]:double(), n, 'gaussian');
--  testiSeries[i]:resize(n);
--  i = i + 1;
--end
series = sets['ArrowHead']['TRAIN'].data[{4, {}}]:reshape(1, 251);
print(series);
loc = torch.Tensor{0.6, -0.5};
print(loc);
tg = nn.TemporalGlimpse(16, 8, 1.5);
testiSeries = tg:forward{series, loc};
print(testiSeries);
--tg:backward({series, loc}, testiSeries)
print(testiSeries)
plotMultipleTimeSeries(testiSeries[1]);
zeiury:zeoiru();
inputFrameSize = 1;
outputFrameSize = 10;
kW = 16; dW = 1;
model = nn.Sequential();
model:add(nn.Reshape(128, 1));
model:add(nn.Padding(1, -kW/2));
model:add(nn.Padding(1, kW/2));
model:add(nn.TemporalConvolution(inputFrameSize, outputFrameSize, kW, dW));
model:add(nn.ReLU());
model:add(nn.TemporalConvolution(outputFrameSize, outputFrameSize, 3, 1));
model:add(nn.ReLU());
model:add(nn.TemporalMaxPooling(2, 2));
model:add(nn.Dropou


outputItems(Items.WAXED_OXIDIZED_CUT_COPPER_SLAB)
                .EUt(VA[ULV]).duration(10)
                .save(provider);
    }

    private static final String[] OXIDATION_STAGES = { "raw", "exposed", "weathered", "oxidized" };

    private static void registerOxidationChain(Consumer<FinishedRecipe> provider, String name, Item... items) {
        for (int i = 0; i < items.length - 1; i++) {
            CHEMICAL_BATH_RECIPES
                    .recipeBuilder(
                            "%s_to_%s_%s_oxidation".formatted(OXIDATION_STAGES[i], OXIDATION_STAGES[i + 1], name))
                    .inputItems(items[i])
                    .inputFluids(Oxygen, 100)
                    .outputItems(items[i + 1])
                    .EUt(VA[ULV]).duration(10)
                    .save(provider);
        }
    }
}
package com.gregtechceu.gtceu.data.recipe.misc;

import com.gregtechceu.gtceu.config.ConfigHolder;

import net.minecraft.data.recipes.FinishedRecipe;
import net.minecraft.world.item.Items;

import java.util.function.Consumer;

import static com.gregtechceu.gtceu.api.GTValues.*;
import static com.gregtechceu.gtceu.api.data.tag.TagPrefix.*;
import static com.gregtechceu.gtceu.common.data.GTBlocks.*;
import static com.gregtechceu.gtceu.common.data.GTItems.*;
import static com.gregtechceu.gtceu.common.data.GTMaterials.*;
import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.ASSEMBLER_RECIPES;

public class AssemblerRecipeLoader {

    public static void init(Consumer<FinishedRecipe> provider) {
        // Gearbox-like
        ASSEMBLER_RECIPES.recipeBuilder("bronze_gearbox_casing")
                .inputItems(plate, Bronze, 4)
                .inputItems(gear, Bronze, 2)
                .inputItems(frameGt, Bronze)
                .circuitMeta(4)
                .outputItems(CASING_BRONZE_GEARBOX.asStack(ConfigHolder.INSTANCE.recipes.casingsPerCraft))
                .duration(50).EUt(16).save(provider);

        ASSEMBLER_RECIPES.recipeBuilder("steel_gearbox_casing")
                .inputItems(plate, Steel, 4)
                .inputItems(gear, Steel, 2)
                .inputItems(frameGt, Steel)
                .circuitMeta(4)
                .outputItems(CASING_STEEL_GEARBOX.asStack(ConfigHolder.INSTANCE.recipes.casingsPerCraft))
                .duration(50).EUt(16).save(provider);

        ASSEMBLER_RECIPES.recipeBuilder("stainless_steel_gearbox_casing")
                .inputItems(plate, StainlessSteel, 4)
                .inputItems(gear, StainlessSteel, 2)
                .inputItems(frameGt, StainlessSteel)
                .circuitMeta(4)
                .outputItems(CASING_STAINLESS_STEEL_GEARBOX.asStack(ConfigHolder.INSTANCE.recipes.casingsPerCraft))
                .duration(50).EUt(16).save(provider);

        ASSEMBLER_RECIPES.recipeBuilder("titanium_gearbox_casing")
                .inputItems(plate, Titanium, 4)
                .inputItems(gear, Titanium, 2)
                .inputItems(frameGt, Titanium)
                .circuitMeta(4)
                .outputItems(CASING_TITANIUM_GEARBOX.asStack(ConfigHolder.INSTANCE.recipes.casingsPerCraft))
                .duration(5


 == _dio) {
      BaseOptions options = BaseOptions(
        baseUrl: HttpConstant.baseUrl,
        connectTimeout: Duration(milliseconds: CONNECT_TIMEOUT),
        receiveTimeout: Duration(milliseconds: RECEIVE_TIMEOUT),
      );
      _dio = Dio(options);

      _dio!.interceptors.add(HeaderInterceptor());
      _dio!.interceptors.add(LogInterceptors(
          requestHeader: true,
          requestBody: true,
          responseHeader: true,
          responseBody: true));
    }

    if (null == _dioUpload) {
      BaseOptions options = BaseOptions(
        connectTimeout: Duration(milliseconds: CONNECT_TIMEOUT),
        receiveTimeout: Duration(milliseconds: RECEIVE_TIMEOUT),
      );

      _dioUpload = Dio(options);

      _dioUpload!.interceptors.add(LogInterceptors(
          requestHeader: true,
          requestBody: true,
          responseHeader: true,
          responseBody: true));
    }
  }

  factory HttpManager.getInstance() => _getInstance();

  static _getInstance() {
    if (null == _instance) {
      _instance = HttpManager._internal();
    }
    return _instance;
  }

  String _restfulUrl(String url, Map<String, dynamic> params) {
    params.forEach((key, value) {
      if (url.indexOf(key) != -1) {
        url = url.replaceAll(':$key', value.toString());
      }
    });
    return url;
  }

  void cancel(String cancelTokenTag) {
    if (_cancelTokens.containsKey(cancelTokenTag)) {
      if (!_cancelTokens[cancelTokenTag]!.isCancelled) {
        _cancelTokens[cancelTokenTag]!.cancel();
      }
      _cancelTokens.remove(cancelTokenTag);
    }
  }

  /// the request function http
  Future _requestHttp(
      {required String url,
      String? method,
      String? cancelTokenTag,
      Map<String, dynamic>? params,
      data,
      Options? options}) async {
    //EasyLoading.show();
    ConnectivityResult connectivityResult =
        await Connectivity().checkConnectivity();

    if (connectivityResult == ConnectionState.none) {
      throw HttpError(HttpError.NETWORK_ERROR, "网络异常，请检查网络");
    }

    //设置默认值
    if (params != null && params.isNullOrEmpty) {
      url = _restfulUrl(url, params);
    }

    if (params.isNullOrEmpty) {
      params = {};
    }
    if (method.isNullOrEmpty) {
      method = HttpMethod.GET;
    }

    if (options != null) {
      options.method = method;
    }
    if (options.isNullOrEmpty) {
      options = Options(
        method: method,
      );
    }

    CancelToken? cancelToken;
    if (cancelTokenTag != null) {
      cancelToken = (_cancelTokens[cancelTokenTag] == null
          ? CancelToken()
          : _cancelTokens[cancelTokenTag])!;
      _cancelTokens[cancelTokenTag] = cancelToken;
    }
    try {
      Response<Map<String, dynamic>>? response = await _dio?.request(url,
          queryParameters: params,
          data: data,
          options: options,
          cancelToken: cancelToken);
      //EasyLoading.dismiss();
      if (response?.data!['code'] == 0) {
        //Util.set('isLogin', true);
        return Result.fromJson(response?.data).data;
      } else if (response?.data!['statusCode'] == 0) {
        //Util.set('isLogin', true);
        return response?.data;
      } else if (response?.data!['status'] == 401) {
        Util.set('isLogin', false);
        return Result.fromJso


#!/bin/env python3
# -*- coding: utf-8 -*
"""
用于管理BewlyBewly:https://github.com/mgmg22/BewlyBewly扩展插件storage的工具脚本
"""
import pyperclip

titleBlackList = [
    # 专区
    "豆瓣 电影 高分 票 评分 台词 合集 导演 纪录片 巡演 伴奏 蛇",
    "车 宝马 法拉利 充电 球 蔚来 小鹏 驾照 自驾",
    "网文 修仙 恐怖",
    "摄影 翻唱 PS",
    "舞 翻跳 健身 KPOP 身材 皮肤 衣服",
    "旅行 乒乓 美食 护肤",
    "房 首付 豪宅 装修 搬家 建筑 土木 A股 楼市",
    # 游戏
    "黑神话 悟空 悟能 大圣 风灵月影 修改器 二郎神 杨戬 虎先锋 天命 文明 王者荣耀 氪 私服 魔兽世界 桌游 原神 尘白 dota 网易 米哈游 模拟器 狼人杀 背刺 赛季 水友 新手 队友",
    # 学生
    "幼儿园 小学 初中 高中 大学 硕士 毕业 应届 读博 博士 实习 面试 入职 学姐 师兄 班主任 就业 学妹 二本 985 211 清华 研 专业 老板 校招 内推 宿舍 跳槽 秋招 春招 同事 学历 公司 开学 法考",
    # 男女
    " 男 女 弟 爱情 相亲 结婚 婚礼 未婚 舔狗 离婚 出轨 七夕 约会 小孩 表白 分手 婚纱 搭讪 撩妹 猥亵 彩礼 老公 老婆 恋爱 同居 好人 暧昧 父母 家长 小伙 哥们 聊 亲密",
    # 外国
    "奥运 巴黎 夺冠 韩国 朝鲜 印度 德国 英国 朝鲜 首尔 非洲 马尔代夫 希腊 纽约 马来西亚 新加坡",
    # 二次元
    "后宫 乙游 硬控 虎视眈眈 火影 鸣人 肉 番 修罗 国漫 女装 古偶 路飞",
    # 网红
    "陈泽 张雪峰 理塘 丁真 童锦程 何同学 董宇辉 老番茄 奶茶 药水",
    # 歌手
    "华语 张杰 法老 GAI 邓紫棋 林俊杰 陈奕迅 陶喆 方大同 张艺兴 吴彦祖 成龙 许嵩 韩红 孙燕姿 薛之谦 刘亦菲 活死人",
    # 名人
    "蒋介石 科比 余承东 马云 刘强东 马斯克 雷军",
    # 影视
    "李云龙 武林外传 军队 爱情公寓",
    # 历史
    "清朝 宋 秦始皇 关羽 张角 武松 年前 当年 古代 朱棣 民国",
    # 省市
    "重庆 莆田 内地 厦门 南京 东莞 广州 南海 苏州 中山 常州 青岛 成都 武汉 合肥 揭阳 无锡 济南 大连 石家庄 泉州 丹东 茂名 长沙 泰州 郑州 惠州",
    "台湾 东北 徽 天津 重庆 深圳 老家 山东 福建 江苏 云南 江西 河北 广东 吉林 湖北 河南 陕西 湖南 四川 宁夏 广西 辽宁 甘肃 内蒙古 青海 贵州 山西",
    # 广告
    "鞋 接单 黄牛 口碑 笔记本 信用卡 程序员 拼多多 福利 收藏 价格 0元 年入",
    # 标题党
    "到底是 一口气 名场面 盘点 难以置信 快乐源泉 史上 前方高能 分钟 的神 天才 元买 建议 不只是 有这样的 如何判断 全网最 这段话 厉害 揭秘 花了 居然 假如 带你 小目标 水平 必须知道 全网 首发 梦幻联动",
    # 水
    "关于我是 VLOG Vlog 万粉 w粉 奖牌 虎扑 刮刮乐 米其林 外卖 探店 小丑 麻辣 警察 流氓 网吧 今日 反诈 亖 小时候 僵尸 tiktok PUA 保安 UP 对话 访 奖励 枪击 00后 末日",
]
userBlackList = [
    "豆瓣 电影 剧 梗 唱 歌",
    # 注释
    "车 房 官方",
    "同学 老师 日常 VLOG 评测 外卖 上岸 公考 体育 音乐",
]

def generate_pattern(item_list):
    escaped_words = [word for item in item_list for word in item.split()]
    pattern = '|'.join(escaped_words)
    return f"/{pattern}/i"

if __name__ == '__main__':
    js_code = f"""
chrome.storage.local.get(null, function(result) {{
  let storageData = result
  let settings = JSON.parse(storageData.settings)
  settings.filterByTitle = [
    {{
        "keyword": "{generate_pattern(titleBlackList)}",
        "remark": ""
    }}
  ]
  settings.filterByUser = [
    {{
        "keyword": "{generate_pattern(userBlackList)}",
        "remark": ""
    }}
  ]
  storageData.settings = JSON.stringify(settings)
  chrome.storage.local.set(storageData, function() {{
    location.reload();
  }})
}})
"""
    print(js_code)
    # 需要在chrome控制台切换到BewlyBewly扩展的上下文再运行
    pyperclip.copy(js_code)


ng propertyName;
            data::Store& store;

            ResolvedBinding(const Binding&      binding,
                            const std::string&  propertyName,
                            data::Store&        store) :
                binding(binding),
                propertyName(propertyName),
                store(store)
            {
            }
        };
    }
}
#pragma once

/*
* SDK generated by Dumper-7
*
* https://github.com/Encryqed/Dumper-7
*/

// Package: WB_Retire

#include "Basic.hpp"

#include "AJB_structs.hpp"

namespace SDK::Params
{

// Function WB_Retire.WB_Retire_C.ExecuteUbergraph_WB_Retire
// 0x0108 (0x0108 - 0x0000)
struct WB_Retire_C_ExecuteUbergraph_WB_Retire final
{
public:
	int32                                         EntryPoint;                                        // 0x0000(0x0004)(BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash)
	uint8                                         Pad_4[0x4];                                        // 0x0004(0x0004)(Fixing Size After Last Property [ Dumper-7 ])
	class UAkComponent*                           CallFunc_RequestWwiseEventOnLocal_AkComponent;     // 0x0008(0x0008)(ZeroConstructor, InstancedReference, IsPlainOldData, NoDestructor, HasGetValueTypeHash)
	class FText                                   CallFunc_MakeLiteralText_ReturnValue;              // 0x0010(0x0018)()
	class UAkComponent*                           CallFunc_RequestWwiseEventOnLocal_AkComponent1;    // 0x0028(0x0008)(ZeroConstructor, InstancedReference, IsPlainOldData, NoDestructor, HasGetValueTypeHash)
	bool                                          CallFunc_GetAJBInGameHUD_BP_bSuccess;              // 0x0030(0x0001)(ZeroConstructor, IsPlainOldData, NoDestructor)
	uint8                                         Pad_31[0x7];                                       // 0x0031(0x0007)(Fixing Size After Last Property [ Dumper-7 ])
	class ABP_AJBInGameHUD_C*                     CallFunc_GetAJBInGameHUD_BP_In_Game_HUD;           // 0x0038(0x0008)(ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash)
	class AAJBInGameCharacter*                    CallFunc_Get_UI_TargetCharacter_TargetCharacter;   // 0x0040(0x0008)(ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash)
	bool                                          CallFunc_IsValid_ReturnValue;                      // 0x0048(0x0001)(ZeroConstructor, IsPlainOldData, NoDestructor)
	uint8                                         Pad_49[0x7];                                       // 0x0049(0x0007)(Fixing Size After Last Property [ Dumper-7 ])
	struct FMatchingPlayerInfo                    CallFunc_TryGetMatchingPlayerInfo_Out;             // 0x0050(0x0088)()
	bool                                          CallFunc_TryGetMatchingPlayerInfo_ReturnValue;     // 0x00D8(0x0001)(ZeroConstructor, IsPlainOldData, NoDestructor)
	uint8                                         Pad_D9[0x7];                                       // 0x00D9(0x0007)(Fixing Size After Last Property [ Dumper-7 ])
	class FText                                   CallFunc_Conv_StringToText_ReturnValue;            // 0x00E0(0x0018)()
	TDelegate<void()>                             K2Node_CreateDelegate_OutputDelegate;              // 0x00F8(0x0010)(ZeroConstructor, NoDestructor)
};
static_assert(alignof(WB_Retire_C_ExecuteUbergraph_WB_Retire) == 0x000008, "Wrong alignment on WB_Retire_C_ExecuteUbergraph_WB_Retire");


 the title of the preview window.
   */
  title = null;
  /**
   Variable: pageSelector

   Boolean that specifies if the page selector should be
   displayed. Default is true.
   */
  pageSelector = null;
  /**
   Variable: wnd

   Reference to the preview window.
   */
  wnd = null;
  /**
   Variable: targetWindow

   Assign any window here to redirect the rendering in <open>.
   */
  targetWindow = null;
  /**
   Variable: pageCount

   Holds the actual number of pages in the preview.
   */
  pageCount = 0;
  /**
   Variable: clipping

   Specifies is clipping should be used to avoid creating too many cell states
   in large diagrams. The bounding box of the cells in the original diagram is
   used if this is enabled. Default is true.
   */
  clipping = true;

  /**
   Function: getWindow

   Returns <wnd>.
   */
  getWindow() {
    return this.wnd;
  }

  /**
   Function: getDocType

   Returns the string that should go before the HTML tag in the print preview
   page. This implementation returns an X-UA meta tag for IE5 in quirks mode,
   IE8 in IE8 standards mode and edge in IE9 standards mode.
   */
  getDoctype() {
    var dt = '';
    if (document.documentMode == 5) {
      dt = '<meta http-equiv="X-UA-Compatible" content="IE=5">';
    } else if (document.documentMode == 8) {
      dt = '<meta http-equiv="X-UA-Compatible" content="IE=8">';
    } else if (document.documentMode > 8) {
      dt = '<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->';
    }
    return dt;
  }

  /**
   Function: appendGraph

   Adds the given graph to the existing print preview.

   Parameters:

   css - Optional CSS string to be used in the head section.
   targetWindow - Optional window that should be used for rendering. If
   this is specified then no HEAD tag, CSS and BODY tag will be written.
   */
  appendGraph(graph, scale, x0, y0, forcePageBreaks, keepOpen) {
    this.graph = graph;
    this.scale = (scale != null) ? scale : 1 / graph.pageScale;
    this.x0 = x0;
    this.y0 = y0;
    this.open(null, null, forcePageBreaks, keepOpen);
  }

  /**
   Function: open

   Shows the print preview window. The window is created here if it does
   not exist.

   Parameters:

   css - Optional CSS string to be used in the head section.
   targetWindow - Optional window that should be used for rendering. If
   this is specified then no HEAD tag, CSS and BODY tag will be written.
   */
  open(css, targetWindow, forcePageBreaks, keepOpen) {
    var previousInitializeOverlay = this.graph.cellRenderer.initializeOverlay;
    var div = null;
    try {
      if (this.printOverlays) {
        this.graph.cellRenderer.initializeOverlay = function (state, overlay) {
          overlay.init(state.view.getDrawPane());
        };
      }
      if (this.printControls) {
        this.graph.cellRenderer.initControl = function (state, control, handleEvents, clickHandler) {
          control.dialect = state.view.graph.dialect;
          control.init(state.view.getDrawPane());
        };
      }
      this.wnd = (targetWindow != null) ? targetWindow : this.wnd;
      var isNewWindow = false;
      if (this.wnd == null) {
        isNewWindow = true;
        this.wnd = window.open();
      }
      var doc = this.wnd.document;
      if (isNewWindow) {
        var dt = this.getDoctype();
        if (dt != null &&


rAll(".box").singleWhere((Element e) {
				return (e.dataset["slot-num"] == index.toString());
			});

			if (box.querySelector(".inventoryItem") == null) {
				// No item in that slot?
				return;
			}

			if (event.shiftKey && box.querySelector(".item-container-toggle") != null) {
				// Open container if shift is pressed
				box.querySelector(".item-container-toggle").click();
			} else {
				// Click the box
				int x = box.documentOffset.x + (box.clientWidth ~/ 2);
				int y = box.documentOffset.y + (box.clientHeight ~/ 2);
				box.querySelector(".inventoryItem").dispatchEvent(
				  new MouseEvent("contextmenu", clientX: x, clientY: y)
				);
			}
		});
	}
}
part of couclient;

class EmoticonPicker extends Modal {
	String id = 'emoticonPicker';
	Element window, well, grid;
	InputElement search;
	InputElement target;

	EmoticonPicker() {
		window = querySelector("#$id");
		well = window.querySelector("#emoticonPicker .well");
		search = well.querySelector("#ep-search");
		grid = well.querySelector("#ep-grid");

		prepare();

		emoji.main().then((_) {
			displayEmoticons(emoji.emoticons);
		});

		new Service(["insertEmoji"], (Map<String, dynamic> args) {
			target = args["input"];
			if ((args["title"] as String).toLowerCase().contains("chat")) {
				querySelector("#ep-channelname").text = args["title"];
			} else {
				querySelector("#ep-channelname").text = "chat with ${args["title"]}";
			}
			this.open();
		});

		search.onInput.listen((_) {
			displayEmoticons(emoji.search(search.value));
		});
	}

	void displayEmoticons(List<emoji.Emoticon> emoticons) {
		grid.children.clear();

		emoticons.forEach((emoji.Emoticon emoticon) {
			ImageElement emoticonImage = new ImageElement()
				..src = emoticon.imageUrl
				..classes.addAll(["emoticon"])
				..draggable = true;

			SpanElement emoticonButton = new SpanElement()
				..classes.add("ep-emoticonButton")
				..title = emoticon.name
				..dataset['emoticon-name'] = emoticon.name
				..append(emoticonImage);
			grid.append(emoticonButton);

			emoticonButton.onDragStart.listen((e) {
				e.stopPropagation();
				e.dataTransfer.effectAllowed = "copy";
				e.dataTransfer.setData("text/plain", ":${emoticon.shortname}:");
				e.dataTransfer.setDragImage(emoticonImage, emoticonImage.clientWidth ~/ 2, -10);
			});

			emoticonButton.onClick.listen((_) {
				target.value +=
				"${(
					target.value == "" || target.value.substring(target.value.length - 1) == " "
						? ""
						: " "
				)}:${emoticon.shortname}:";
			});
		});
	}

	@override
	open({bool ignoreKeys: false}) {
		displayElement.hidden = false;
		search.focus();
		elementOpen = true;
	}
}
part of couclient;

class ChangeUsernameWindow extends Modal {
	static Completer<String> response;

	Element buttonInput, output;
	SpanElement currantDisplay, currantCost;
	DivElement inputForm;
	TextInputElement textInput;

	ChangeUsernameWindow() {


pt binascii.Error:
                pass

        # base32, mapping
        if not decoded:
            try:
                self.decoded_data = base64.b32decode(base64_bytes, map01='I')
                decoded = True
                self.encoding = ['base32']
            except binascii.Error:
                pass

        # base32, mapping
        if not decoded:
            try:
                self.decoded_data = base64.b32decode(base64_bytes, map01='L')
                decoded = True
                self.encoding = ['base32']
            except binascii.Error:
                pass

        # regular base64
        if not decoded:
            invalidbase64 = False
            validbase64chars = set('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r')
            # check if the characters are in the base64 index table
            for i in base64_bytes:
                if chr(i) not in validbase64chars:
                    invalidbase64 = True
                    break
            if not invalidbase64:
                try:
                    self.decoded_data = base64.standard_b64decode(base64_bytes)
                    if self.decoded_data != b'':
                        # sanity check: in an ideal situation the base64 data is
                        # 1/3 larger than the decoded data.
                        # Anything 1.5 times larger (or more) is bogus.
                        # TODO: is this necessary? the decoder will not result in
                        # output larger than possible
                        if len(base64_bytes)/len(self.decoded_data) < 1.5:
                            decoded = True
                            self.encoding = ['base64']
                except binascii.Error:
                    pass

        # URL safe base64 (RFC 4648, section 5)
        if not decoded:
            invalidbase64 = False
            validbase64chars = set('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\n\r')
            # check if the characters are in the base64 index table
            for i in base64_bytes:
                if chr(i) not in validbase64chars:
                    invalidbase64 = True
                    break
            if not invalidbase64:
                try:
                    self.decoded_data = base64.urlsafe_b64decode(base64_bytes)
                    if self.decoded_data != b'':
                        # sanity check: in an ideal situation the base64 data is
                        # 1/3 larger than the decoded data.
                        # Anything 1.5 times larger (or more) is bogus.
                        # TODO: is this necessary? the decoder will not result in
                        # output larger than possible
                        if len(base64_bytes)/len(self.decoded_data) < 1.5:
                            decoded = True
                            self.encoding = ['base64', 'urlsafe']
                except binascii.Error:
                    pass

        check_condition(decoded and self.decoded_data != b'', "no base64")

    def unpack(self, meta_directory):
        unpacked_files = []
        out_labels = []

        if meta_directory.file_path.suffix.lower() in ['.base64', '.b64']:
            file_path = pathlib.Path(meta_directory.file_path.stem)
            if file_path in ['.', '..']:
                file_path = pathlib.Path("unpacked_from_base64")
        else:
            file_path = pathlib.Path("unpacked_from_base64")

        with meta_directory.unpack_regular_file(file_path) as (unpacked_md, outfile):
            outfile.write(self.decoded_data)
            yield unpacked_md

    @property
    def labels(self):
        labels = self.encoding
        return labels

    metadata = {}


github.com/stackrox/rox/pkg/sac/testconsts"
	"github.com/stackrox/rox/pkg/uuid"
)

// GetSecret returns a mock Secret
func GetSecret() *storage.Secret {
	return GetScopedSecret(uuid.NewDummy().String(), fixtureconsts.Cluster1, "")
}

// GetScopedSecret returns a mock Secret belonging to the input scope
func GetScopedSecret(ID string, clusterID string, namespace string) *storage.Secret {
	return &storage.Secret{
		Id:          ID,
		Name:        "secretName",
		ClusterId:   clusterID,
		ClusterName: "clustername",
		Namespace:   namespace,
		Files: []*storage.SecretDataFile{
			{
				Name: "foo",
				Type: storage.SecretType_IMAGE_PULL_SECRET,
			},
		},
	}
}

// GetSACTestSecretSet returns a set of mock secrets that can be used for scoped access control tests
func GetSACTestSecretSet() []*storage.Secret {
	secrets := []*storage.Secret{
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceA),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster1, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster2, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster2, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster2, testconsts.NamespaceB),
		scopedSecret(testconsts.Cluster2, testconsts.NamespaceC),
		scopedSecret(testconsts.Cluster2, testconsts.NamespaceC),
	}
	return secrets
}

func scopedSecret(clusterID string, namespace string) *storage.Secret {
	return GetScopedSecret(uuid.NewV4().String(), clusterID, namespace)
}
package fixtures

import (
	"math/rand"

	"github.com/stackrox/rox/generated/storage"
	"github.com/stackrox/rox/pkg/uuid"
)

// GetComplianceCheckResult returns a test compliance check result
func GetComplianceCheckResult(name, clusterID, clusterName, scanName, scanConfigName, scanRefID string) *storage.ComplianceOperatorCheckResultV2 {
	return &storage.ComplianceOperatorCheckResultV2{
		Id:             uuid.NewV4().String(),
		CheckId:        name,
		CheckName:      name,
		ClusterId:      clusterID,
		Status:         storage.ComplianceOperatorCheckResultV2_CheckStatus(rand.Intn(7) + 1),
		Severity:       0,
		Description:    "test description " + name,
		Instructions:   "test instruction " + name,
		Labels:         nil,
		Annotations:    nil,
		CreatedTime:    nil,
		ValuesUsed:     nil,
		Warnings:       nil,
		ScanName:       scanName,
		ClusterName:    clusterName,
		ScanConfigName: scanConfigName,
		Rationale:      "test rationale " + name,
		ScanRefId:      scanRefID,
	}
}


RemediationConfiguration.
type RemediationConfigurationStatus struct {
	v1.ResourceStatus `json:",inline"`
	AtProvider        RemediationConfigurationObservation `json:"atProvider,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// RemediationConfiguration is the Schema for the RemediationConfigurations API. Provides an AWS Config Remediation Configuration.
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws}
type RemediationConfiguration struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.targetId) || (has(self.initProvider) && has(self.initProvider.targetId))",message="spec.forProvider.targetId is a required parameter"
	// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.targetType) || (has(self.initProvider) && has(self.initProvider.targetType))",message="spec.forProvider.targetType is a required parameter"
	Spec   RemediationConfigurationSpec   `json:"spec"`
	Status RemediationConfigurationStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// RemediationConfigurationList contains a list of RemediationConfigurations
type RemediationConfigurationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RemediationConfiguration `json:"items"`
}

// Repository type metadata.
var (
	RemediationConfiguration_Kind             = "RemediationConfiguration"
	RemediationConfiguration_GroupKind        = schema.GroupKind{Group: CRDGroup, Kind: RemediationConfiguration_Kind}.String()
	RemediationConfiguration_KindAPIVersion   = RemediationConfiguration_Kind + "." + CRDGroupVersion.String()
	RemediationConfiguration_GroupVersionKind = CRDGroupVersion.WithKind(RemediationConfiguration_Kind)
)

func init() {
	SchemeBuilder.Register(&RemediationConfiguration{}, &RemediationConfigurationList{})
}
//go:build !ignore_autogenerated

// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0

// Code generated by controller-gen. DO NOT EDIT.

package v1beta1

import (
	runtime "k8s.io/apimachinery/pkg/runtime"
)

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CloudFormationStack) DeepCopyInto(out *CloudFormationStack) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
	in.Spec.DeepCopyInto(&out.Spec)
	in.Status.DeepCopyInto(&out.Status)
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudFormationStack.
func (in *CloudFormationStack) DeepCopy() *CloudFormationStack {
	if in == nil {
		return nil
	}
	out := new(CloudFormationStack)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *CloudFormation


document).ready(function() {
      var eventName = "OpenTechSummit";
      var mode = 0;
      var flag = 0;
      var isAdded = 0;
      var trackFilterMode=0;
      var roomFilterMode=0;
      var isCalendarView = false;
      var $timeline;
      var numberOfChildElements;
      var widthOfChild;
      var canvasWidth;
      var initialWidth;
      var roomName;
      var trackName;

      $(function() {
        $("img.lazy").lazyload({
          threshold: 2000
        });
      });

        window.onload = function () {

          window.addEventListener("hashchange", function(){
            if(window.location.href.split('#')[1] !== '' && /^\d+$/.test(window.location.href.split('#')[1].substring(0,4))) {
              let offset = 20;
              $('html, body').animate({
                scrollTop: $("#" + window.location.href.split('#')[1]).offset().top - $(".navbar-fixed-top").height() - offset
              }, 0);
            }
          }, false);

          if(window.location.href.indexOf('#')!== -1 && window.location.href.split('#')[1] !== '' && !(/^\d+$/.test(window.location.href.split('#')[1].substring(0,4)))) {
            var filterVal;
            trackName =  decodeURIComponent(window.location.href.toString().split('#')[1]);
            trackFilterMode = 1;
            roomFilterMode = 0;
            var local_storage_events=JSON.parse(localStorage[eventName]);
            var isRoom = true;

            var sidebarDiv = $('.side-collapse');
              if (!sidebarDiv.hasClass('in'))
                sidebarDiv.addClass('in');

              $('.fossasia-filter').each(function() {
                if($(this).is(':visible')) {
                  filterVal = $(this).val();
                }
              });

              $('.track-filter-info').show();
              $('#TrackCurFilter').text(trackName);
              $('.room-filter-info').hide();

              $('.day-filter').each(function () {
                var isDay = false;
                $(this).find('.time-filter').each(function () {
                  var isTime = false;
                  $(this).find('.schedule-track').each(function () {
                    if ($(this).find('.tip-description').text().toUpperCase().indexOf(filterVal.toUpperCase()) >= 0 ||
                      $(this).find('.session-speakers-list a p span').text().toUpperCase().indexOf(filterVal.toUpperCase()) >= 0 ||
                      $(this).find('.session-speakers-more').text().toUpperCase().indexOf(filterVal.toUpperCase()) >= 0 ||
                      $(this).find('.event').text().toUpperCase().indexOf(filterVal.toUpperCase()) >= 0 ||
                      $(this).find('.speaker-name').text().toUpperCase().indexOf(filterVal.toUpperCase()) >= 0) {
                        var name=$(this).find('.title-inline .blacktext').text();
                        var id=$(this).attr('id');
                        if((mode && local_storage_events[id] !== 1) || (name !== trackName))
                        {
                          $(this).hide();
                        } else {
                          $(this).show();
                          isTime = true;
                        }
                    } else {
                      $(this).hide();
                    }
                  });
                  if(isTime === false) {
                    $(this).hide();
                  } else {
                    $(this


BangumiItem.fromJson(jsonItem));
        }
      }
    } catch (e) {
      KazumiLogger()
          .log(Level.error, 'Resolve bangumi list failed ${e.toString()}');
    }
    try {
      for (int weekday = 1; weekday <= 7; weekday++) {
        List<BangumiItem> bangumiDayList = [];
        for (BangumiItem bangumiItem in bangumiList) {
          if (bangumiItem.airWeekday == weekday) {
            bangumiDayList.add(bangumiItem);
          }
        }
        bangumiCalendar.add(bangumiDayList);
      }
    } catch (e) {
      KazumiLogger().log(
          Level.error, 'Fetch bangumi item to calendar failed ${e.toString()}');
    }
    return bangumiCalendar;
  }

  static Future<List<BangumiItem>> getBangumiList(
      {int rank = 2, String tag = ''}) async {
    List<BangumiItem> bangumiList = [];
    late Map<String, dynamic> params;
    if (tag == '') {
      params = <String, dynamic>{
        'keyword': '',
        'sort': 'rank',
        "filter": {
          "type": [2],
          "tag": ["日本"],
          "rank": [">$rank", "<=1050"],
          "nsfw": false
        },
      };
    } else {
      params = <String, dynamic>{
        'keyword': '',
        'sort': 'rank',
        "filter": {
          "type": [2],
          "tag": [tag],
          "rank": [">$rank", "<=99999"],
          "nsfw": false
        },
      };
    }
    try {
      final res = await Request().post(
        Api.formatUrl(Api.bangumiAPIDomain + Api.bangumiRankSearch, [100, 0]),
        data: params,
      );
      final jsonData = res.data;
      final jsonList = jsonData['data'];
      for (dynamic jsonItem in jsonList) {
        if (jsonItem is Map<String, dynamic>) {
          bangumiList.add(BangumiItem.fromJson(jsonItem));
        }
      }
    } catch (e) {
      KazumiLogger()
          .log(Level.error, 'Resolve bangumi list failed ${e.toString()}');
    }
    return bangumiList;
  }

  static Future<List<BangumiItem>> getBangumiTrendsList(
      {int type = 2, int limit = 24, int offset = 0}) async {
    List<BangumiItem> bangumiList = [];
    var params = <String, dynamic>{
      'type': type,
      'limit': limit,
      'offset': offset,
    };
    try {
      final res = await Request().get(
        Api.bangumiAPINextDomain + Api.bangumiTrendsNext,
        data: params,
      );
      final jsonData = res.data;
      final jsonList = jsonData['data'];
      for (dynamic jsonItem in jsonList) {
        if (jsonItem is Map<String, dynamic>) {
          bangumiList.add(BangumiItem.fromJson(jsonItem['subject']));
        }
      }
    } catch (e) {
      KazumiLogger().log(
          Level.error, 'Resolve bangumi trends list failed ${e.toString()}');
    }
    return bangumiList;
  }

  static Future<List<BangumiItem>> bangumiSearch(String keyword,
      {List<String> tags = const [],
      int offset = 0,
      String sort = 'heat'}) async {
    List<BangumiItem> bangumiList = [];

    var params = <String, dynamic>{
      'keyword': keyword,
      'sort': sort,
      "filter": {
        "type": [2],
        "tag": tags,
        "rank": (sort == 'rank') ? [">0", "<=99999"] : [">=0", "<=99999"],
        "nsfw": false
      },
    };

    try {
      final res = await


COLLECTIBLE_LOCKED_FAILURE_CAUSED_BY_JUMP_TO_GROUP_LEADER, "グループのリーダーは|cffffff<<1>>|rにいます。\n\n目的地がロックされているため、このプレイヤーの元へ移動できません", 0)
SAS(SI_COLLECTIBLE_LOCKED_FAILURE_CAUSED_BY_SOCIAL_JUMP, "ロック中のエリアにいるプレイヤーのため、ここに移動できません。", 0)
SAS(SI_COLLECTIBLE_LOCKED_FAILURE_CAUSED_BY_ZONE_JUMP, "目的地がロックされているため、このプレイヤーの元へ移動できません。", 1)
SAS(SI_COLLECTIBLE_LOCKED_FAILURE_CHAPTER_DIALOG_BODY, "<<1>>\n\n|cffffffチャプター <<2>>|rをアップグレードすることで、ロックを解除できます。", 0)
SAS(SI_COLLECTIBLE_LOCKED_FAILURE_DIALOG_PRIMARY_BUTTON, "クラウンストアへ", 0)
SAS(SI_COLLECTIBLE_LOCKED_FAILURE_DIALOG_TITLE, "未解除", 0)
SAS(SI_COLLECTIBLE_LOCKED_FAILURE_DLC_DIALOG_BODY, "<<1>>\n\nクラウンストアで|cffffff<<2>> (<<3>>)|r を購入するか、ESO Plus会員になることで、ロックを解除できます！", 0)
SAS(SI_COLLECTIBLE_LOCKED_FAILURE_NON_ESO_PLUS_DIALOG_BODY, "<<1>>\n\nクラウンストアで|cffffff<<2>> (<<3>>)|r を購入することで、ロックを解除できます！", 0)
SAS(SI_COLLECTIBLE_NAME_FORMATTER, "<<1>>", 0)
SAS(SI_COLLECTIBLE_NAME_WITH_CATEGORY_NAME_C_STYLE_FORMATTER, "%s (%s)", 0)
SAS(SI_COLLECTIBLE_NAME_WITH_NICKNAME_FORMATTER, "<<1>> - 「<<X:2>>」", 1)
SAS(SI_COLLECTIBLE_NAME_WITH_NICKNAME_RAW, "<<X:1>> - 「<<X:2>>」", 0)
SAS(SI_COLLECTIBLE_REQUIRED_TO_USE_ITEM, "利用するには<<1>> (<<2>>)が必要です。", 1)
SAS(SI_COLLECTIBLE_REQUIRED_TO_USE_ITEM_CROWN_STORE, "利用するにはクラウンストアの<<1>> (<<2>>)が必要です。", 1)
SAS(SI_COLLECTIBLE_REQUIRED_TO_USE_ITEM_UPGRADE, "利用するには<<1>> (<<2>>)のアップグレードが必要です。", 1)
SAS(SI_COLLECTIBLE_REQUIRED_TO_USE_SCRIBING_CROWN_STORE, "クラウンストアで|cffffff<<1>> (<<2>>)|r を購入することで、ロックを解除できます！", 0)
SAS(SI_COLLECTIBLE_REQUIRED_TO_USE_SCRIBING_UPGRADE, "|cffffff<<1>> (<<2>>)|r をアップグレードすることで、ロックを解除できます。", 0)
SAS(SI_COLLECTIBLE_REQUIRES_FAVORITE, "お気に入りの<<1>>が必要。", 1)
SAS(SI_COLLECTIBLE_REQUIRES_UNLOCKED_COLLECTIBLE, "解除された<<1>>が必要", 1)
SAS(SI_COLLECTIBLE_TOOLTIP_COMPANION_BLOCKED_


#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

import os
import random

from augly.utils.base_paths import (
    AUDIO_ASSETS_DIR,
    EMOJI_DIR,
    FONTS_DIR,
    IMG_MASK_DIR,
    SCREENSHOT_TEMPLATES_DIR,
    TEXT_DIR,
)

# color constants
DEFAULT_COLOR = (0, 0, 0)
WHITE_RGB_COLOR = (255, 255, 255)
RED_RGB_COLOR = (255, 0, 0)

# audio & video rate constants
DEFAULT_FRAME_RATE = 10
DEFAULT_SAMPLE_RATE = 44100

# text constants
DEFAULT_TEXT_INDICES = [random.randrange(1, 1000) for _ in range(5)]

# `overlay_stripes` constants
SUPPORTED_LINE_TYPES = ["dotted", "dashed", "solid"]

# screenshot augmentation assets
BBOXES_PATH = os.path.join(SCREENSHOT_TEMPLATES_DIR, "bboxes.json")

# audio assets
SILENT_AUDIO_PATH = os.path.join(AUDIO_ASSETS_DIR, "silent.flac")

# image augmentation assets
IMG_MASK_PATH = os.path.join(IMG_MASK_DIR, "dfdc_mask.png")

"""
All emoji assets used in AugLy come from Twemoji: https://twemoji.twitter.com/
Copyright 2020 Twitter, Inc and other contributors.
Code licensed under the MIT License: http://opensource.org/licenses/MIT
Graphics licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/
"""
SMILEY_EMOJI_DIR = os.path.join(EMOJI_DIR, "smileys")
EMOJI_PATH = os.path.join(SMILEY_EMOJI_DIR, "smiling_face_with_heart_eyes.png")

"""
All font assets used in AugLy come from Google Noto fonts: https://www.google.com/get/noto/
Noto is a trademark of Google Inc. Noto fonts are open source.
All Noto fonts are published under the SIL Open Font License, Version 1.1
"""
FONT_LIST_PATH = os.path.join(FONTS_DIR, "list")
FONT_PATH = os.path.join(FONTS_DIR, "NotoNaskhArabic-Regular.ttf")
DEFAULT_TEXT_OVERLAY_FONT_PATH = os.path.join(FONTS_DIR, "Allura-Regular.ttf")
MEME_DEFAULT_FONT = os.path.join(FONTS_DIR, "Raleway-ExtraBold.ttf")

# text augmentation assets
CONTRACTIONS_MAPPING = os.path.join(TEXT_DIR, "contractions.json")
FUN_FONTS_PATH = os.path.join(TEXT_DIR, "fun_fonts.json")
FUN_FONTS_GREEK_PATH = os.path.join(TEXT_DIR, "fun_fonts_greek.json")
UNICODE_MAPPING_PATH = os.path.join(TEXT_DIR, "letter_unicode_mapping.json")
MISSPELLING_DICTIONARY_PATH = os.path.join(TEXT_DIR, "misspelling.json")

"""
Text fairness augmentation assets: the feminine & masculine word lists were provided to
us by Adina Williams and are the same ones used in Dinan et al., 2020
(https://arxiv.org/pdf/2005.00614.pdf), which aggregated such word lists from
Zhao et al., 2018b, 2019 (https://aclanthology.org/D18-1521.pdf) and Hoyle et al., 2019
(https://aclanthology.org/P19-1167.pdf). We constructed the gendered words mapping file
from the feminine & masculine word lists for ease of use with the `swap_gendered_words`
augmentation to avoid having to re-compute the mapping
"""
GENDERED_WORDS_MAPPING = os.path.join(TEXT_DIR, "gendered_words_mapping.json")


/* SPDX-License-Identifier: GPL-2.0-only */

/*
 * Copyright (c) 2021, Microsoft Corporation.
 * Pasha Tatashin <pasha.tatashin@soleen.com>
 */

#include <linux/linkage.h>
#include <asm/assembler.h>
#include <asm/kvm_asm.h>

.macro invalid_vector	label
SYM_CODE_START_LOCAL(\label)
	.align 7
	b	\label
SYM_CODE_END(\label)
.endm

.macro el1_sync_vector
SYM_CODE_START_LOCAL(el1_sync)
	.align 7
	cmp	x0, #HVC_SET_VECTORS	/* Called from hibernate */
	b.ne	1f
	msr	vbar_el2, x1
	mov	x0, xzr
	eret
1:	cmp	x0, #HVC_SOFT_RESTART	/* Called from kexec */
	b.ne	2f
	mov	x0, x2
	mov	x2, x4
	mov	x4, x1
	mov	x1, x3
	br	x4
2:	/* Unexpected argument, set an error */
	mov_q	x0, HVC_STUB_ERR
	eret
SYM_CODE_END(el1_sync)
.endm

SYM_CODE_START(trans_pgd_stub_vectors)
	invalid_vector	hyp_stub_el2t_sync_invalid	// Synchronous EL2t
	invalid_vector	hyp_stub_el2t_irq_invalid	// IRQ EL2t
	invalid_vector	hyp_stub_el2t_fiq_invalid	// FIQ EL2t
	invalid_vector	hyp_stub_el2t_error_invalid	/


	\Z3, %rdx, %rcx
	MULADD	\Z3, \Z4, \Z5, \Z0, \Z1, \Z2, \T0, \T1, \P
.endif

	// [r12:r14, r8:r11] <- z = a0 x b14 + a1 x b04 + z
	xorq	\Z3, \Z3
	movq	32+\A, %rdx
	MULADD	\Z4, \Z5, \Z0, \Z1, \Z2, \Z3, \T0, \T1, 40+\B
	movq	72+\A, %rdx
	MULADD	\Z4, \Z5, \Z0, \Z1, \Z2, \Z3, \T0, \T1, \B
.if \RDC != 1
	movq	\Z4, 32(%rdi)
.else
	// [r13:r14, r8:r11] <- z = ((z0 x u0) x p + z)/2^64
	movq	$U0, %rdx
	mulx	\Z4, %rdx, %rcx
	MULADD	\Z4, \Z5, \Z0, \Z1, \Z2, \Z3, \T0, \T1, \P
.endif

.if \RDC != 1
	movq	\Z5, 40(%rdi)
	movq	\Z0, 48(%rdi)
	movq	\Z1, 56(%rdi)
	movq	\Z2, 64(%rdi)
	movq	\Z3, 72(%rdi)
.else
	FINALC	\Z0, \Z1, \Z2, \Z3, \Z4, \Z5, \T0, \T1
.endif
.endm


94 0 0 1-.94-.938v-59.105a.94.94 0 0 1 .94-.938h1.41c.213 0 .4.083.558.203v-14.479a.918.918 0 0 1-.558.203H.94a.94.94 0 0 1-.94-.938v-59.105a.94.94 0 0 1 .94-.938h1.41c.213 0 .4.083.558.203v-41.032c-.031.003-.057.018-.088.018H1.41a.94.94 0 0 1-.94-.938V78.874c0-.519.421-.938.94-.938h1.41c.031 0 .057.014.088.017V57.371c0-31.635 25.794-57.372 57.499-57.372h240.115c31.706 0 57.501 25.737 57.501 57.372V99.87c.054-.008.103-.033.159-.033h1.69c.622 0 1.126.504 1.126 1.125v50.849c0 .621-.504 1.124-1.126 1.124zm-9.859-95.564c0-27.226-22.201-49.376-49.491-49.376H60.407c-27.288 0-49.49 22.15-49.49 49.376v616.258c0 27.225 22.202 49.375 49.49 49.375h240.115c27.29 0 49.491-22.15 49.491-49.375V57.371zM181.578 708.402c-15.242 0-27.644-12.38-27.644-27.598 0-15.217 12.402-27.598 27.644-27.598 15.244 0 27.646 12.381 27.646 27.598 0 15.218-12.402 27.598-27.646 27.598zm0-51.198c-13.035 0-23.639 10.587-23.639 23.6 0 13.013 10.604 23.6 23.639 23.6 13.036 0 23.641-10.587 23.641-23.6 0-13.013-10.605-23.6-23.641-23.6zm20.39-602.206h-41.8c-3.726 0-6.758-3.495-6.758-7.215 0-3.721 3.032-6.778 6.758-6.778h41.8c3.726 0 6.758 3.057 6.758 6.778 0 3.72-3.032 7.215-6.758 7.215zm0-9.964h-41.8a2.754 2.754 0 0 0-2.753 2.749c0 1.515 1.235 3.217 2.753 3.217h41.8c1.519 0 2.754-1.702 2.754-3.217a2.754 2.754 0 0 0-2.754-2.749zm-20.747-13.422a4.252 4.252 0 0 1-4.256-4.248 4.252 4.252 0 0 1 4.256-4.248 4.252 4.252 0 0 1 4.255 4.248 4.252 4.252 0 0 1-4.255 4.248zm-48.134 17.969a1.8 1.8 0 1 1 0-3.597 1.8 1.8 0 0 1 1.802 1.799 1.8 1.8 0 0 1-1.802 1.798z'/%3E%3C/svg%3E"),url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid' width='348' height='724' viewBox='0 0 348 724' fill='%23FFF'%3E%3Cpath d='M293.52-.001H53.479C23.944-.001 0 23.895 0 53.372v616.255C0 699.104 23.944 723 53.479 723H293.52c29.535 0 53.479-23.896 53.479-53.373V53.372c0-29.477-23.944-53.373-53.479-53.373z


r {
  height: 4.875rem;
}

.sidenav-footer .card.card-background:after {
  opacity: 0.65;
}

.g-sidenav-show .sidenav .nav-item .collapse {
  height: auto;
  transition: all 0.2s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .g-sidenav-show .sidenav .nav-item .collapse {
    transition: none;
  }
}

.g-sidenav-show .sidenav .nav-link-text {
  transition: 0.3s ease;
  opacity: 1;
}

@media (max-width: 1199.98px) {
  .g-sidenav-show.rtl .sidenav {
    transform: translateX(17.125rem);
  }

  .g-sidenav-show:not(.rtl) .sidenav {
    transform: translateX(-17.125rem);
  }

  .g-sidenav-show .sidenav.fixed-start+.main-content {
    margin-left: 0 !important;
  }

  .g-sidenav-show.g-sidenav-pinned .sidenav {
    transform: translateX(0);
  }
}

.navbar-vertical.bg-white {
  box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
}

.navbar-vertical.bg-white .navbar-nav>.nav-item .nav-link.active {
  background-color: #f6f9fc;
  box-shadow: none;
}

.navbar-vertical .navbar-nav .nav-link.active {
  font-weight: 600;
  box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
  border-radius: 0.5rem;
}

.navbar-vertical .navbar-nav>.nav-item .nav-link.active {
  color: #344767;
  background-color: rgba(255, 255, 255, 0.13);
}

.navbar-main {
  transition: box-shadow 0.25s ease-in, background-color 0.25s ease-in;
}

.navbar-main.fixed-top {
  width: calc(100% - (15.625rem + 1.5rem * 3));
}

.navbar-main.fixed-top+[class*="container"] {
  margin-top: 7.1875rem !important;
}

.navbar-vertical .navbar-nav .nav-link[data-bs-toggle="collapse"]:after {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  font-family: 'Font Awesome 5 Free';
  font-weight: 700;
  content: "\f107";
  margin-left: auto;
  color: rgba(33, 37, 41, 0.5);
  transition: all 0.2s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .navbar-vertical .navbar-nav .nav-link[data-bs-toggle="collapse"]:after {
    transition: none;
  }
}

.navbar-vertical .navbar-nav .nav-link[data-bs-toggle="collapse"][aria-expanded="true"]:after {
  color: #212529;
  transform: rotate(180deg);
}

.navbar-vertical .navbar-nav .nav-item .collapse .nav,
.navbar-vertical .navbar-nav .nav-item .collapsing .nav {
  transition: all 0.2s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {

  .navbar-vertical .navbar-nav .nav-item .collapse .nav,
  .navbar-vertical .navbar-nav .nav-item .collapsing .nav {
    transition


b     the data.
     * @param      off   the start offset in the data.
     * @param      len   the number of bytes to write.
     */
    public static void printBytes(byte b[], int off, int len) {
        if (b == null) {
            throw new NullPointerException();
        }
        Arrays.boundsCheck(b.length, off, len);
        if (len == 0) {
            return;
        }
        executeCIO(-1, ChannelConstants.INTERNAL_PRINTBYTES, -1, off, len, 0, 0, 0, 0, b, null);
    }

//    /**
//     * Prints the name of a global oop to the VM stream.
//     *
//     * @param index   the index of the variable to print
//     */

//    @Vm2c(code="fprintf(streams[currentStream], \"Global oop:%d\", index); fflush(streams[currentStream]);")

//    static void printGlobalOopName(int index) {
//        execSyncIO(ChannelConstants.INTERNAL_PRINTGLOBALOOPNAME, index);
//    }
//
//    /**
//     * Prints the name and current value of every global to the VM stream.
//     */
//    static void printGlobals() {
//        execSyncIO(ChannelConstants.INTERNAL_PRINTGLOBALS, 0);
//    }

    /**
     * Prints a line detailing the build-time configuration of the VM.
     */
    static void printConfiguration() {
        execSyncIO(ChannelConstants.INTERNAL_PRINTCONFIGURATION, 0);
    }

    /**
     * Prints the string representation of an object to the VM stream.
     * Do NOT pass a SquawkPrimitive type (Address, Offset, UWord).
     *
     * @param obj   the object whose toString() result is to be printed
     */
    public static void printObject(Object obj) {
        if (false) Assert.that(!GC.getKlass(obj).isSquawkPrimitive());
        print(String.valueOf(obj));
    }

    /**
     * Prints a character to the VM output stream.
     *
     * @param x the value
     */

    @Vm2c(code="fprintf(streams[currentStream], \"%c\", x); fflush(streams[currentStream]);")

    public static void print(char x) {
        execSyncIO(ChannelConstants.INTERNAL_PRINTCHAR, x);
    }

    /**
     * Prints a string to the VM output stream.
     *
     * @param x the string
     */

    @Vm2c(code="printJavaString(x, streams[currentStream]);")

    public static void print(String x) {
		executeCIO(-1, ChannelConstants.RPI_PRINTSTRING, -1, 0, 0, 0, 0, 0, 0, x, null);
//		executeCIO(-1, ChannelConstants.INTERNAL_PRINTSTRING, -1, 0, 0, 0, 0, 0, 0, x, null);
    }

    /**
     * Prints an integer to the VM output stream.
     *
     * @param x the value
     */

    @Vm2c(code="fprintf(streams[currentStream], \"%i\", x); fflush(streams[currentStream]);")

    public static void print(int x) {
        execSyncIO(ChannelConstants.INTERNAL_PRINTINT, x);
    }

    /**
     * Prints a long to the VM output stream.
     *
     * @param x the value
     */

    @Vm2c(code="fprintf(streams[currentStream], format(\"%L\"), x); fflush(streams[currentStream]);")

    public static void print(long x) {
        int i1 = (int)(x >>> 32);
        int i2 = (int)x;
        execSyncIO(ChannelConstants.INTERNAL_PRINTLONG, i1, i2);
    }

    /**
     * Prints a float to the VM output stream.
     *
     * @param x the value
     */
    public static void print(float x) {
        execSyncIO(ChannelConstants.INTERNAL_PRINTFLOAT, VM.floatToIntBits(x));
    }

    /**
     * Prints a double to the VM output stream.
     *
     * @param x the value
     */
    public static void print(double x


�走资派和反动学术权威大会】。团派认为实际上是为了保护吕应中。

   中午，团保卫组孙茂等人突然闯入工人卢根义宿舍，将卢殴打致伤。

   414召开战斗组长会，有人提出各系组织队伍，保卫我们的头头，414总部王XX说：只要团派打死我们一个人，我们的队伍就可以拉起来了。

   团派天安门纵队《不怕鬼》贴出大字报：【彻底批判反动黄色歌曲414完蛋歌】，说这歌词是“法西斯语言”、“武士道精神”。

    12月7日

   《人民日报》报导天津市革委会成立。

   《井冈山》报文章：【新形势下的夺权斗争——看王关林反党团】、【大竖特竖毛主席的无产阶级干部路线】，矛头直指吕应中、罗征启、谭浩强。

   上午九点在主楼后厅414召开战斗组长会，大家对12.5、12.6团保卫组一小撮暴徒毒打唐XX、卢XX等同志感到非常气愤。

   414所属各机构、各战团发表【关于迫害革命干部吕应中事件给蒯大富和团保卫组的照会】。

   下午，由414《红愚公》等战团发起，召开了第一次【誓死捍卫毛主席的干部政策】大会。发言者经过了非常细致深入的调查，从各个方面确凿材料揭穿了团派硬加在吕应中头上的所谓“皮克事件”、“照片事件”、“存折事件”等。与会者对团派一小撮造谣者无不感到气愤。会上还给蒯大富和团《保卫组》强烈照会：“如果吕应中人身受到任何损失，蒯大富必须负完全责任。”

   团派于晚6点召开【第八次批斗吕应中大会】大会，派大队人马先占礼堂，然后才广播提出要和414辩论吕应中


// SPDX-FileCopyrightText: 2008 - 2024 NVIDIA CORPORATION. All Rights Reserved.
//
// SPDX-License-Identifier: BSD-3-Clause

#pragma once

#include <thrust/device_ptr.h>

namespace cusp
{
namespace detail
{
namespace device
{

// COO format SpMV kernel that uses only one thread
// This is incredibly slow, so it is only useful for testing purposes,
// *extremely* small matrices, or a few elements at the end of a
// larger matrix

template <typename IndexType, typename ValueType>
__global__ void
spmv_coo_serial_kernel(const IndexType num_entries,
                       const IndexType * I,
                       const IndexType * J,
                       const ValueType * V,
                       const ValueType * x,
                             ValueType * y)
{
    for(IndexType n = 0; n < num_entries; n++)
    {
        y[I[n]] += V[n] * x[J[n]];
    }
}

template <typename Matrix,
          typename ValueType>
void spmv_coo_serial_device(const Matrix&    A,
                            const ValueType* x,
                                  ValueType* y)
{
    typedef typename Matrix::index_type IndexType;

    const IndexType * I = amgx::thrust::raw_pointer_cast(&A.row_indices[0]);
    const IndexType * J = amgx::thrust::raw_pointer_cast(&A.column_indices[0]);
    const ValueType * V = amgx::thrust::raw_pointer_cast(&A.values[0]);

    spmv_coo_serial_kernel<IndexType,ValueType> <<<1,1>>>
        (A.num_entries, I, J, V, x, y);
}

} // end namespace device
} // end namespace detail
} // end namespace cusp