  count?: number
): Promise<Afstemning[]> => {
  return fetchPreviousAfstemningList(oldAfstemning, count);
};

export const enrichAfstemningList = async (
  afstemningList: Afstemning[]
): Promise<Afstemning[]> => {
  const forslagStillerList = await getAfstemningForslagStiller(afstemningList);

  return matchForslagStillerWithAfstemning(afstemningList, forslagStillerList);
};

async function getAfstemningForslagStiller(
  afstemningList: Afstemning[]
): Promise<AfstemningStiller[]> {
  const missingForslagStillerList = afstemningList.filter(
    (afstemning) => !afstemning.forslagStillerId
  );

  if (missingForslagStillerList.length < 1) {
    return [];
  }

  const sagIdList = missingForslagStillerList.map(
    (afstemning) => afstemning.sagId
  );

  return fetchForslagStillerIdList(sagIdList);
}

function matchForslagStillerWithAfstemning(
  afstemningList: Afstemning[],
  forslagStillerList: ForslagStiller[]
) {
  if (afstemningList.length < 1 || forslagStillerList.length < 1) {
    return afstemningList;
  }

  // Map all forslagStillerIds to sagId
  const forslagStillerMap = getForslagStillerMap(forslagStillerList);

  // Map afstemning to sagId
  const afstemningMap = mapArray(afstemningList, 'sagId') as Map<
    number,
    Afstemning
  >;

  // Update afstemning in map with forslagStillerIdList
  forslagStillerMap.forEach((forslagStillerIdList, sagid) => {
    const afstemning = afstemningMap.get(sagid);

    if (!afstemning) {
      return;
    }

    afstemning.forslagStillerId = forslagStillerIdList;

    afstemningMap.set(sagid, afstemning);
  });

  return Array.from(afstemningMap.values());
}

function getForslagStillerMap(
  forslagStillerList: ForslagStiller[]
): Map<number, number[]> {
  return forslagStillerList.reduce((map, forslagStiller) => {
    const forslagStillerIdList = map.get(forslagStiller.sagid) || [];

    map.set(forslagStiller.sagid, [
      ...forslagStillerIdList,
      forslagStiller.aktørid,
    ]);

    return map;
  }, new Map());
}
// Instruction to every other class
// on how they can be an argument to 'addMarker'
export interface Pin {
    circuitName: string,
    Location: {
        lat: string;
        long: string;
    }
}

export class CustomMap {
    private googleMap: google.maps.Map;

    constructor(id: string) {
        this.googleMap = new google.maps.Map(document.getElementById(id), {
            zoom: 3,
            center: {
                lat: 20,
                lng: 0
            }
        });
    }

    addMarker(pin: Pin): void {
        const marker = new google.maps.Marker({
            map: this.googleMap,
            position: {
                lat: parseFloat(pin.Location.lat),
                lng: parseFloat(pin.Location.long)
            }
        });

        marker.addListener('click', () => {
            console.log(pin)
            const infoWindow = new google.maps.InfoWindow({
                content: `<h4 class="m-0">${pin.circuitName}</h4>`
            })

            infoWindow.open(this.googleMap, marker);
        })
    }
}
/** �


ce.
	NETWORK::NETWORK_EXPLODE_VEHICLE(vehicle, 1, 0, 0);

	^^^^^ That must be PC script dumps? In X360 Script Dumps it is reference a few times with 2 differences in the parameters.
	Which as you see below is 1, 0, 0 + 1, 1, 0 + 1, 0, and a *param?

	am_plane_takedown.c
	network_explode_vehicle(net_to_veh(Local_40.imm_2), 1, 1, 0);

	armenian2.c
	network_explode_vehicle(Local_80[6 <2>], 1, 0, 0);

	fm_horde_controler.c
	network_explode_vehicle(net_to_veh(*uParam0), 1, 0, *uParam0);

	fm_mission_controller.c, has 6 hits so not going to list them.

	Side note, setting the first parameter to 0 seems to mute sound or so?

	Seems it's like ADD_EXPLOSION, etc. the first 2 params. The 3rd atm no need to worry since it always seems to be 0.

</summary>
]]--
native "NETWORK_EXPLODE_VEHICLE"
	hash "0x301A42153C9AD707"
	jhash (0x0E1B38AE)
	arguments {
		Vehicle "vehicle",

		BOOL "isAudible",

		BOOL "isInvisible",

		BOOL "p3",
	}
	returns	"Any"

native "0xCD71A4ECAB22709E"
	hash "0xCD71A4ECAB22709E"
	jhash (0xBC54371B)
	arguments {
		Entity "entity",
	}
	returns	"void"

--[[!
<summary>
	NETWORK_OVERRIDE_???
</summary>
]]--
native "0xA7E30DE9272B6D49"
	hash "0xA7E30DE9272B6D49"
	jhash (0x644141C5)
	arguments {
		Ped "ped",

		float "x",

		float "y",

		float "z",

		float "p4",
	}
	returns	"void"

--[[!
<summary>
	Console Hash: 0x9F82917F
</summary>
]]--
native "0x407091CF6037118E"
	hash "0x407091CF6037118E"
	arguments {
		int "netID",
	}
	returns	"void"

native "NETWORK_SET_PROPERTY_ID"
	hash "0x1775961C2FBBCB5C"
	jhash (0x5A74E873)
	arguments {
		Any "p0",
	}
	returns	"void"

native "NETWORK_CLEAR_PROPERTY_ID"
	hash "0xC2B82527CA77053E"
	jhash (0x38BC35C8)
	returns	"void"

native "0x367EF5E2F439B4C6"
	hash "0x367EF5E2F439B4C6"
	jhash (0x53C9563C)
	arguments {
		int "p0",
	}
	returns	"void"

native "0x94538037EE44F5CF"
	hash "0x94538037EE44F5CF"
	jhash (0x6B97075B)
	arguments {
		BOOL "p0",
	}
	returns	"void"

native "0xBD0BE0BFC927EAC1"
	hash "0xBD0BE0BFC927EAC1"
	returns	"void"

native "0x237D5336A9A54108"
	hash "0x237D5336A9A54108"
	arguments {
		Any "p0",
	}
	returns	"BOOL"

--[[!
<summary>
	console hash: 0x99F58A07
</summary>
]]--
native "0x99B72C7ABDE5C910"
	hash "0x99B72C7ABDE5C910"
	arguments {


PyPy, link_name = "PyPyErr_GivenExceptionMatches")]
    pub fn PyErr_GivenExceptionMatches(arg1: *mut PyObject, arg2: *mut PyObject) -> c_int;
    #[cfg_attr(PyPy, link_name = "PyPyErr_ExceptionMatches")]
    pub fn PyErr_ExceptionMatches(arg1: *mut PyObject) -> c_int;
    #[cfg_attr(PyPy, link_name = "PyPyErr_NormalizeException")]
    pub fn PyErr_NormalizeException(
        arg1: *mut *mut PyObject,
        arg2: *mut *mut PyObject,
        arg3: *mut *mut PyObject,
    );
    #[cfg_attr(PyPy, link_name = "PyPyException_SetTraceback")]
    pub fn PyException_SetTraceback(arg1: *mut PyObject, arg2: *mut PyObject) -> c_int;
    #[cfg_attr(PyPy, link_name = "PyPyException_GetTraceback")]
    pub fn PyException_GetTraceback(arg1: *mut PyObject) -> *mut PyObject;
    #[cfg_attr(PyPy, link_name = "PyPyException_GetCause")]
    pub fn PyException_GetCause(arg1: *mut PyObject) -> *mut PyObject;
    #[cfg_attr(PyPy, link_name = "PyPyException_SetCause")]
    pub fn PyException_SetCause(arg1: *mut PyObject, arg2: *mut PyObject);
    #[cfg_attr(PyPy, link_name = "PyPyException_GetContext")]
    pub fn PyException_GetContext(arg1: *mut PyObject) -> *mut PyObject;
    #[cfg_attr(PyPy, link_name = "PyPyException_SetContext")]
    pub fn PyException_SetContext(arg1: *mut PyObject, arg2: *mut PyObject);

    #[cfg(PyPy)]
    #[link_name = "PyPyExceptionInstance_Class"]
    pub fn PyExceptionInstance_Class(x: *mut PyObject) -> *mut PyObject;
}

#[inline]
pub unsafe fn PyExceptionClass_Check(x: *mut PyObject) -> c_int {
    (PyType_Check(x) != 0
        && PyType_FastSubclass(x as *mut PyTypeObject, Py_TPFLAGS_BASE_EXC_SUBCLASS) != 0)
        as c_int
}

#[inline]
pub unsafe fn PyExceptionInstance_Check(x: *mut PyObject) -> c_int {
    PyType_FastSubclass(Py_TYPE(x), Py_TPFLAGS_BASE_EXC_SUBCLASS)
}

#[inline]
#[cfg(not(PyPy))]
pub unsafe fn PyExceptionInstance_Class(x: *mut PyObject) -> *mut PyObject {
    Py_TYPE(x) as *mut PyObject
}

// ported from cpython exception.c (line 2096)
#[cfg(PyPy)]
pub unsafe fn PyUnicodeDecodeError_Create(
    encoding: *const c_char,
    object: *const c_char,
    length: Py_ssize_t,
    start: Py_ssize_t,
    end: Py_ssize_t,
    _reason: *const c_char,
) -> *mut PyObject {
    crate::PyObject_CallFunction(
        PyExc_UnicodeDecodeError,
        std::ffi::CStr::from_bytes_with_nul(b"sy#nns\0")
            .unwrap()
            .as_ptr(),
        encoding,
        object,
        length,
        start,
        end,
    )
}

#[cfg_attr(windows, link(name = "pythonXY"))]
extern "C" {
    #[cfg_attr(PyPy, link_name = "PyPyExc_BaseException")]
    pub static mut PyExc_BaseException: *mut PyObject;
    #[cfg_attr(PyPy, link_name = "PyPyEx


n,_.slice_del();break}_.cursor=_.limit-i,g()}break;case 2:p()&&(o=_.limit-_.cursor,_.eq_s_b(1,"e")||(_.cursor=_.limit-o,_.slice_del()));break;case 3:p()&&(_.slice_del(),h());break;case 4:p()&&_.slice_del();break;case 5:p()&&u&&_.slice_del()}_.cursor=_.limit-s,_.out_grouping_b(d,73,232)&&(t=_.limit-_.cursor,_.find_among_b(l,4)&&_.out_grouping_b(m,97,232)&&(_.cursor=_.limit-t,_.ket=_.cursor,_.cursor>_.limit_backward&&(_.cursor--,_.bra=_.cursor,_.slice_del())))}(),_.cursor=_.limit_backward,function(){for(var e;;)if(_.bra=_.cursor,e=_.find_among(n,3))switch(_.ket=_.cursor,e){case 1:_.slice_from("y");break;case 2:_.slice_from("i");break;case 3:if(_.cursor>=_.limit)return;_.cursor++}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return r.setCurrent(e),r.stem(),r.getCurrent()}):(r.setCurrent(e),r.stem(),r.getCurrent())}),e.Pipeline.registerFunction(e.du.stemmer,"stemmer-du"),e.du.stopWordFilter=e.generateStopWordFilter(" aan al alles als altijd andere ben bij daar dan dat de der deze die dit doch doen door dus een eens en er ge geen geweest haar had heb hebben heeft hem het hier hij hoe hun iemand iets ik in is ja je kan kon kunnen maar me meer men met mij mijn moet na naar niet niets nog nu of om omdat onder ons ook op over reeds te tegen toch toen tot u uit uw van veel voor want waren was wat werd wezen wie wil worden wordt zal ze zelf zich zij zijn zo zonder zou".split(" ")),e.Pipeline.registerFunction(e.du.stopWordFilter,"stopWordFilter-du")}});!function(_,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(_.lunr)}(this,function(){return function(_){function t(){var _={"[一二三四五六七八九十百千万億兆]":"M","[一-龠々〆ヵヶ]":"H","[ぁ-ん]":"I","[ァ-ヴーｱ-ﾝﾞｰ]":"K","[a-zA-Zａ-ｚＡ-Ｚ]":"A","[0-9０-９]":"N"};for(var t in this.chartype_=[],_){var H=new RegExp;H.compile(t),this.chartype_.push([H,_[t]])}return this.BIAS__=-332,this.BC1__={HH:6,II:2461,KH:406,OH:-1378},this.BC2__={AA:-3267,AI:2744,AN:-878,HH:-4070,HM:-1711,HN:4012,HO:3761,IA:1327,IH:-1184,II:-1332,IK:1721,IO:5492,KI:3831,KK:-8741,MH:-3132,MK:3334,OO:-2920},this.BC3__={HH:996,HI:626,HK:-721,HN:-1307,HO:-836,IH:-301,KK:2762,MK:1079,MM:4034,OA:-1652,OH:266},this.BP1__={BB:295,OB:304,OO:-125,UB:352},this.BP2__={BO:60,OO:-1762},this.BQ1__={BHH:


�亏一篑，门罗币相对来说简单一些，不同账户可以互相转账不被发现，不过同样，每个地址的种子和私钥还是必须保持安全，这个过程增加了为了保护钱包信息安全的工作量.
\n\n
门罗的解决方案是子地址功能. 简单来说在主地址下可以创建无数的子地址，并且所有地址共用同一个种子和密钥. 每个生成的子地址都可以单独接受门罗币，并且所有子地址的币都存储在同一个钱包中.使用这种方法，可以在一个地址下操作无限个身份，同时将信息安全工作量保持在最低限度. 这些地址在数学上也不可关联的，因此除非用户故意暴露他们与世界的联系，否则外部观察者将很难关联它们.
\n\n
但是子地址更让人津津乐道的意外功能是，它的出现替代并解决了人们长期以来讨厌payment ID 的情况.
\n\n
2018年以前的门罗币，转账备注付款ID是商家识别哪个客户发送哪个付款的一种方式.由于门罗币信息在链上模糊不清，因此接收者也无法分辨发送者是谁. 这意味着，如果存在价格相似的商品和多个订单，则无法确定到底是谁付的款. 那时候付款ID是由商家生成并提供给客户的唯一的随机字符串. 客户在发送交易时将其添加为单独的字段. 该随机字符串作为交易的一部分放置在区块链上，通过这种方式，商人可以识别并分类转入的交易. 这里译者为了方便大家理解，举一个生活里的例子，比如学校收学费，会给所有学生同一个银行账户，然后要求付款的学生在转账的时候备注学生的学号，以便会计查账到底谁付了学费，当时的payment ID 就相当于这个例子里的学号.
\n\n
这种方法有几种缺陷.首先，它损害了链上数据的一致性.另外，独特的元数据可以使某些交易格外与众不同，从而可以进行启发式分析. 并且当此功能没有对所有人强制实施时，尤为严重，因为转账的时候并不是要强制备注的，比如你从交易所提币到自己的钱包，你并不需要交易所给你备注payment ID.另外，使用


EPTxStatus(Related_Endpoint);
        LDR.W    R2,??DataTable81  ;; 0x40005c00
        LDR      R2,[R2, R4, LSL #+2]
        AND      R2,R2,#0x30
        B.N      ??Standard_ClearFeature_6
//  270     }
//  271     else
//  272     {
//  273       Status = _GetEPRxStatus(Related_Endpoint);
??Standard_ClearFeature_5:
        LDR.W    R2,??DataTable81  ;; 0x40005c00
        LDR      R2,[R2, R4, LSL #+2]
        AND      R2,R2,#0x3000
//  274     }
//  275
//  276     if ((rEP >= pDev->Total_Endpoint) || (Status == 0)
//  277         || (pInformation->Current_Configuration == 0))
??Standard_ClearFeature_6:
        LDR.W    R3,??DataTable80  ;; Device_Table
        LDRB     R3,[R3, #+0]
        CMP      R4,R3
        BCS.N    ??Standard_ClearFeature_2
        CMP      R2,#+0
        BEQ.N    ??Standard_ClearFeature_2
        LDRB     R0,[R0, #+10]
        CMP      R0,#+0
        BEQ.N    ??Standard_ClearFeature_2
//  278     {
//  279       return USB_UNSUPPORT;
//  280     }
//  281
//  282
//  283     if (wIndex0 & 0x80)
        TST      R1,#0x80
        BEQ.N    ??Standard_ClearFeature_7
//  284     {
//  285       /* IN endpoint */
//  286       if (_GetTxStallStatus(Related_Endpoint ))
        LDR.W    R0,??DataTable81  ;; 0x40005c00
        LDR      R0,[R0, R4, LSL #+2]
        AND      R0,R0,#0x30
        CMP      R0,#+16
        BNE.N    ??Standard_ClearFeature_8
//  287       {
//  288         ClearDTOG_TX(Related_Endpoint);
        MOVS     R0,R4
        BL       ClearDTOG_TX
//  289         SetEPTxStatus(Related_Endpoint, EP_TX_VALID);
        MOVS     R1,#+48
        MOVS     R0,R4
        BL       SetEPTxStatus
        B.N      ??Standard_ClearFeature_8
//  290       }
//  291     }
//  292     else
//  293     {
//  294       /* OUT endpoint */
//  295       if (_GetRxStallStatus(Related_Endpoint))
??Standard_ClearFeature_7:
        LDR.W    R0,??DataTable81  ;; 0x40005c00
        LDR      R0,[R0, R4, LSL #+2]
        AND      R0,R0,#0x3000
        CMP      R0,#+4096
        BNE.N    ??Standard_ClearFeature_8
//  296       {
//  297         if (Related_Endpoint == ENDP0)
        MOVW     R5,#+49039
        CBNZ     R4,??Standard_ClearFeature_9
//  298         {
//  299           /* After clear the STALL, enable the default endpoint receiver */
//  300           SetEPRxCount(Related_Endpoint, Device_Property.MaxPacketSize);
        LDR.W    R0,??DataTable76  ;; Device_Property
        LDRB     R1,[R0, #+44]
        MOVS     R0,#+0
        BL       SetEPRxCount
//  301           _SetEPRxStatus(Related_Endpoint, EP_RX_VALID);
        LDR.W    R0,??DataTable81  ;; 0x40005c00
        LDR      R1,[R0, #+0]
        ANDS     R1,R5,R1
        EOR      R1,R1,#0x3000
        STR      R1,[R0, #+0]


include "renderer/resources/Image.h"

class PrtCollision {
public:
	~PrtCollision();
	void Run(const char *mapFileName);

private:
	void ProcessMap();
	void ProcessParticleDeform(const char *modelName, const idVec3 &origin, const idMat3 &axis, bool disabled, float diversity);
	void ProcessParticleModel(const char *modelName, const idKeyValue &kvModel, const idVec3 &origin, const idMat3 &axis, bool disabled, float diversity);
	bool ProcessSurfaceEmitter(const srfTriangles_t *geom, const idVec3 &origin, const idMat3 &axis, float entDiversity, const char *outputFilename);
	bool ProcessPointEmitter(const idVec3 &origin, const idMat3 &axis, float entDiversity, const char *outputFilename);
	void ModelParticleMovement(const idVec3 &entOrigin, const idMat3 &entAxis, const idPartStageData &stg, const idPartSysData &psys, idParticleData part, uint32 &texel);
	float FindSegmentCollision(idVec3 start, idVec3 end, bool collideWorldOnly);
	idRenderWorld *RenderWorld();

	// path to .map file
	const char *mapFileName = nullptr;
	// parsed .map file
	idMapFile *mapFile = nullptr;
	// used to parse map/proc file and to compute traces
	idRenderWorld *renderWorld = nullptr;
	// for some entities, the internal filter checks are disabled
	// meaning: material contents/deform check, dynamic model exclusion
	// the array is indexed by map-entity indices
	idList<bool> entityBlockFilterOverride;

	int numSurfsProcessed = 0;
	int numSurfsDisabled = 0;
	int64 numRaysCasted = 0, numRaysHit = 0;
	double timeStarted = 0.0;
	double timeEnded = 0.0;
	double timeElapsed = 0.0;

	//temporary data to avoid passing all the trash around everywhere
	const char *prtName = nullptr;
	const idParticleStage *prtStage = nullptr;
	idPartSysEmitterSignature signature;
};

PrtCollision::~PrtCollision() {
	delete mapFile;
	if (renderWorld)
		renderSystem->FreeRenderWorld(renderWorld);
}

float PrtCollision::FindSegmentCollision(idVec3 start, idVec3 end, bool collideWorldOnly) {
	//find collision
	modelTrace_t mt;
	//hitsCount += renderWorld->Trace(mt, start, end, 0.0f);
	//hitsCount += renderWorld->FastWorldTrace(mt, start, end);
	auto traceFilter = [&](const qhandle_t *handle, const renderEntity_t *rent, const idRenderModel *model, const idMaterial *material) -> bool {
		if (collideWorldOnly)
			return false;			//note: world is included automatically (fastWorld = true)

		bool disableInternalChecks = rent && (unsigned)rent->entityNum < (unsigned)entityBlockFilterOverride.Num() && entityBlockFilterOverride[rent->entityNum];
		if (disableInternalChecks)
			return true;			//mapper asked to disable all the remaining checks

		if (material) {
			if (material->Deform() != DFRM_NONE && material->Deform() != DFRM_TURB)
				return false;		//most importantly, skip particle systems
			if (!(material->GetContentFlags() & (CONTENTS_WATER | CONTENTS_SOLID)))
				return false;		//skip light flares (but don't skip water)
		}
		else if (rent) {
			idRenderModel *hModel = rent->hModel;
			if (hModel && hModel->IsDynam


,-n,n-1);return i&&void 0!==M&&Y(r,n,M,S)&&(i=0),i&&e&&Y(r,n,e[0]/I,e[1]/D)&&(i=0),(1+h.toleranceGrowth*i)*B}function J(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}var K,$,Q,tt,et,rt,nt,it=h.maxScreensAway,at=-I*it,ot=I*(1+it),st=-D*it,lt=D*(1+it),ut=[[at,st,ot,st],[ot,st,ot,lt],[ot,lt,at,lt],[at,lt,at,st]];function ct(t){if(t[0]<at||t[0]>ot||t[1]<st||t[1]>lt)return[f(t[0],at,ot),f(t[1],st,lt)]}function ft(t,e){return t[0]===e[0]&&(t[0]===at||t[0]===ot)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function ht(t,e,r){return function(n,i){var a=ct(n),o=ct(i),s=[];if(a&&o&&ft(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*u.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);return l&&((a&&o?l>0==a[t]>o[t]?a:o:a||o)[t]+=l),s}}function pt(t){var e=t[0],r=t[1],n=e===G[Z-1][0],i=r===G[Z-1][1];if(!n||!i)if(Z>1){var a=e===G[Z-2][0],o=r===G[Z-2][1];n&&(e===at||e===ot)&&a?o?Z--:G[Z-1]=t:i&&(r===st||r===lt)&&o?a?Z--:G[Z-1]=t:G[Z++]=t}else G[Z++]=t}function dt(t){G[Z-1][0]!==t[0]&&G[Z-1][1]!==t[1]&&pt([Q,tt]),pt(t),et=null,Q=tt=0}"linear"===N||"spline"===N?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=ut[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&J(o,t)<J(r[0],t)?r.unshift(o):r.push(o),n++)}return r}:"hv"===N||"vh"===N?nt=function(t,e){var r=[],n=ct(t),i=ct(e);return n&&i&&ft(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===N?nt=ht(0,at,ot):"vhv"===N&&(nt=ht(1,st,lt));var vt=u.isArrayOrTypedArray(R);function gt(e){if(e&&z&&(e.i=r,e.d=t,e.trace=E,e.marker=vt


L, reason, reserved);

    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
       DisableThreadLibraryCalls(hinstDLL);
        if (!NtQueryVirtualMemory( GetCurrentProcess(), hinstDLL, MemoryWineUnixFuncs,
                                   &odbc_handle, sizeof(odbc_handle), NULL ) &&
            !__wine_unix_call( odbc_handle, process_attach, NULL))
        {
            ODBC_ReplicateToRegistry();
        }
       break;

    case DLL_PROCESS_DETACH:
      if (reserved) break;
      __wine_unix_call( odbc_handle, process_detach, NULL );
    }

    return TRUE;
}


69262148)
	query         = uint32(3939663052)
	wildcard      = uint32(1815237614) // +
	multiWildcard = uint32(4285801373) // #
	share         = uint32(1480642916)
)

// Query represents a constant SSID for a query.
var Query = Ssid{system, query}

// Ssid represents a subscription ID which contains a contract and a list of hashes
// for various parts of the channel.
type Ssid []uint32

// NewSsid creates a new SSID.
func NewSsid(contract uint32, query []uint32) Ssid {
	ssid := make([]uint32, 0, len(query)+1)
	ssid = append(ssid, uint32(contract))
	ssid = append(ssid, query...)
	return ssid
}

// NewSsidForPresence creates a new SSID for presence.
func NewSsidForPresence(original Ssid) Ssid {
	ssid := make([]uint32, 0, len(original)+2)
	ssid = append(ssid, system)
	ssid = append(ssid, presence)
	ssid = append(ssid, original...)
	return ssid
}

// NewSsidForShare creates a new SSID for shared subscriptions.
func NewSsidForShare(original Ssid) Ssid {
	ssid := make([]uint32, 0, len(original)+1)
	ssid = append(ssid, original[0])
	ssid = append(ssid, share)
	ssid = append(ssid, original[1:]...)
	return ssid
}

// Contract gets the contract part from SSID.
func (s Ssid) Contract() uint32 {
	return uint32(s[0])
}

// GetHashCode combines the SSID into a single hash.
func (s Ssid) GetHashCode() uint32 {
	h := s[0]
	for _, i := range s[1:] {
		h ^= i
	}
	return h
}

// Encode encodes the SSID to a binary format
func (s Ssid) Encode() string {
	bin := make([]byte, 4)
	out := make([]byte, len(s)*8)

	for i, v := range s {
		if v != wildcard && v != multiWildcard {
			binary.BigEndian.PutUint32(bin, v)
			hex.Encode(out[i*8:i*8+8], bin)
		} else {
			// If we have a wildcard specified, use dot '.' symbol so this becomes a valid
			// regular expression and we could also use this for querying.
			copy(out[i*8:i*8+8], []byte{0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E})
		}
	}
	return unsafeToString(out)
}

// unsafeToString is used when you really want to convert a slice
// of bytes to a string without incurring overhead. It is only safe
// to use if you really know the byte slice is not going to change
// in the lifetime of the string
func unsafeToString(bs []byte) string {
	// This is copied from runtime. It relies on the string
	// header being a prefix of the slice header!
	return *(*string)(unsafe.Pointer(&bs))
}

// ------------------------------------------------------------------------------------

// Awaiter represents an asynchronously awaiting response channel.
type Awaiter interface {
	Gather(time.Duration) [][]byte
}

// ------------------------------------------------------------------------------------

// SubscriberType represents a type of subscriber
type SubscriberType uint8

// Subscriber types
const (
	SubscriberDirect = SubscriberType(iota)
	SubscriberRemote
	SubscriberOffline
)

// Subscriber is a value associated with a subscription.
type Subscriber interface {
	ID() string
	Type() SubscriberType
	Send(*Message) error
}

// ------------------------------------------------------------------------------------

// Subscribers represents a subscriber set whic


)).gain;
				let time = this.ctx.currentTime;
				gain.cancelScheduledValues(time);
				gain.setValueAtTime(gain.value,time);
				gain.linearRampToValueAtTime(f,time + t);
			}
		}
	}
	onNodeCreated(id,setting) {
		console.log("src/app/WebAudioCompiler.hx:423:","node created: " + id);
		let target;
		let _g = setting.role;
		switch(_g._hx_index) {
		case 0:
			target = app__$WebAudioCompiler_NodeTarget.Node(app__$WebAudioCompiler_ConstNode.make(this.ctx,this.lastFrequency));
			break;
		case 1:
			target = app__$WebAudioCompiler_NodeTarget.OscillatorNode(new app__$WebAudioCompiler_CustomOscillatorNode(this.ctx,_g.type));
			break;
		case 2:
			target = app__$WebAudioCompiler_NodeTarget.Node(this.dest);
			break;
		case 3:
			target = app__$WebAudioCompiler_NodeTarget.Node(this.ctx.createDelay(5));
			break;
		case 4:
			let bq = this.ctx.createBiquadFilter();
			let target1;
			switch(_g.type) {
			case "bp":
				target1 = "bandpass";
				break;
			case "bs":
				target1 = "notch";
				break;
			case "hp":
				target1 = "highpass";
				break;
			case "hs":
				target1 = "highshelf";
				break;
			case "lp":
				target1 = "lowpass";
				break;
			case "ls":
				target1 = "lowshelf";
				break;
			case "p":
				target1 = "peaking";
				break;
			}
			bq.type = target1;
			target = app__$WebAudioCompiler_NodeTarget.Node(bq);
			break;
		case 5:
			target = app__$WebAudioCompiler_NodeTarget.Node(this.ctx.createDynamicsCompressor());
			break;
		case 6:
			target = app__$WebAudioCompiler_NodeTarget.Node(app__$WebAudioCompiler_ConstNode.make(this.ctx,0));
			break;
		case 7:
			target = app__$WebAudioCompiler_NodeTarget.Node(app__$WebAudioCompiler_ConstNode.make(this.ctx,_g.num.get_value()));
			break;
		case 8:
			let target2;
			switch(_g.type) {
			case 0:
				target2 = false;
				break;
			case 1:
				target2 = true;
				break;
			}
			target = app__$WebAudioCompiler_NodeTarget.MultiNode(new app__$WebAudioCompiler_MultiNode(this.ctx,target2));
			break;
		case 9:
			target = app__$WebAudioCompiler_NodeTarget.MultiNode(new app__$WebAudioCompiler_MultiNode(this.ctx,false));
			break;
		case 10:
			throw haxe_Exception.thrown("this should not be created");
		}
		this.nodeMap.h[id] = new app__$WebAudioCompiler_NodeData(id,setting,target);
	}
	onNodeDestroyed(id) {
		console.log("src/app/WebAudioCompiler.hx:475:","node destroyed: " + id);
		this.nodeMap.remove(id);
	}
	getNodeOf(id) {
		let _g = this.nodeMap.h[id].target;
		switch(_g._hx_index) {
		case 0:
			return _g.n;
		case 1:
			return _g.n;
		case 2:
			return _g.n;
		}
	}
	onSocketCreated(id,nodeId,type) {
		console.log("src/app/WebAudioCompiler.hx:491:","socket created: " + id);
		let node = this.nodeMap


készít
stool_controlpanel_desc = Bal kattintás, Irányító Pult Berakása
stool_controlpanel_undone = Irányító Pult törölve
stool_controlpanel_cleanup = Irányító Pultok
stool_controlpanel_cleaned = Irányító Pultok törölve
stool_controlpanel_limit = Irányító Pult korlát elérve

// Drones
stool_drones_spawner = Drón Vető Berakó
stool_drones_create = Drón Vetőt készít
stool_drones_desc = Bal kattintás, Drón Vető berakása
stool_drones_undone = Drón Vető törölve
stool_drones_cleanup = Drón Vetők
stool_drones_cleaned = Drón Vetők törölve
stool_drones_limit = Drón Vető korlát elérve
stool_drones_shoot = Lövés:
stool_drones_kill = Drónok Kikapcsolása:
stool_drones_track = Célpont Bemérése:
stool_drones_eye_track = Nézet Bemérés:

// Floor Chevron
stool_floorchevron_spawner = Padló Ékzár Berakó
stool_floorchevron_create = Padló Ékzárat Készít
stool_floorchevron_desc = Bal kattintás,Padló Ékzár berakása
stool_floorchevron_undone = Padló Ékzár törölve
stool_floorchevron_cleanup = Padló Ékzár
stool_floorchevron_cleaned = Padló Ékzárak Törölve
stool_floorchevron_limit = Padló Ékzár Korlát elérve
stool_floorchevron_fulldesc = Ekzár a padlón ami az utolsó szimbólum kódolásakor kapcsol be és aztán a kapu megnyílik.
stool_floorchevron_err = A célpont nem egy Csillagkapu Univerzum!
stool_floorchevron_exs = Már van Padló Ékzár a csillagkapun!

// Goauld Iris
stool_goauld_iris_spawner = Goauld Iris Berakó
stool_goauld_iris_create = Goauld Iris-t készít
stool_goauld_iris_desc = Bal kattintás,Goauld Iris berakása vagy frissítése
stool_goauld_iris_undone = Goauld Iris törölve
stool_goauld_iris_cleanup = Goauld Iris
stool_goauld_iris_cleaned = Goauld Irisek törölve
stool_goauld_iris_limit = Goauld Iris korlát elérve

// Gravity Controller
stool_gravitycontroller_spawner = Anti-gravitációs eszköz Berakó
stool_gravitycontroller_create = Építsen űrhajót lebegőgömbök nélkül,vagy egyszerűen használja stabilizátorként dolgai számára
stool_gravitycontroller_desc = Kattitntson ahová akarja rakni az Anti-Gravitációs Eszközt,kattitntson eggyen a frissítésért.
stool_gravitycontroller_undone = Anti-gravitációs eszköz törölve
stool_gravitycontroller_cleanup = Anti-gravitációs eszköz
stool_gravitycontroller_cleaned = Anti-gravitációs eszközök törölve
stool_gravitycontroller_limit = Maximum Anti-gravitációs eszközö száma elérve
stool_gravitycontroller_wait = Kérem Várj


other is TodosData &&
          other.id == this.id &&
          other.title == this.title &&
          other.content == this.content &&
          other.category == this.category &&
          other.dueDate == this.dueDate);
}

class TodosCompanion extends UpdateCompanion<TodosData> {
  final Value<int> id;
  final Value<String> title;
  final Value<String> content;
  final Value<int?> category;
  final Value<DateTime?> dueDate;
  const TodosCompanion({
    this.id = const Value.absent(),
    this.title = const Value.absent(),
    this.content = const Value.absent(),
    this.category = const Value.absent(),
    this.dueDate = const Value.absent(),
  });
  TodosCompanion.insert({
    this.id = const Value.absent(),
    required String title,
    required String content,
    this.category = const Value.absent(),
    this.dueDate = const Value.absent(),
  })  : title = Value(title),
        content = Value(content);
  static Insertable<TodosData> custom({
    Expression<int>? id,
    Expression<String>? title,
    Expression<String>? content,
    Expression<int>? category,
    Expression<DateTime>? dueDate,
  }) {
    return RawValuesInsertable({
      if (id != null) 'id': id,
      if (title != null) 'title': title,
      if (content != null) 'body': content,
      if (category != null) 'category': category,
      if (dueDate != null) 'due_date': dueDate,
    });
  }

  TodosCompanion copyWith(
      {Value<int>? id,
      Value<String>? title,
      Value<String>? content,
      Value<int?>? category,
      Value<DateTime?>? dueDate}) {
    return TodosCompanion(
      id: id ?? this.id,
      title: title ?? this.title,
      content: content ?? this.content,
      category: category ?? this.category,
      dueDate: dueDate ?? this.dueDate,
    );
  }

  @override
  Map<String, Expression> toColumns(bool nullToAbsent) {
    final map = <String, Expression>{};
    if (id.present) {
      map['id'] = Variable<int>(id.value);
    }
    if (title.present) {
      map['title'] = Variable<String>(title.value);
    }
    if (content.present) {
      map['body'] = Variable<String>(content.value);
    }
    if (category.present) {
      map['category'] = Variable<int>(category.value);
    }
    if (dueDate.present) {
      map['due_date'] = Variable<DateTime>(dueDate.value);
    }
    return map;
  }

  @override
  String toString() {
    return (StringBuffer('TodosCompanion(')
          ..write('id: $id, ')
          ..write('title: $title, ')
          ..write('content: $content, ')
          ..write('category: $category, ')
          ..write('dueDate: $dueDate')
          ..write(')'))
        .toString();
  }
}

class DatabaseAtV2 extends GeneratedDatabase {
  DatabaseAtV2(QueryExecutor e) : super(e);
  late final Todos todos = Todos(this);
  @override
  Iterable<TableInfo<Table, Object?>> get allTables =>
      allSchemaEntities.whereType<TableInfo<Table, Object?>>();
  @override
  List<DatabaseSchemaEntity> get allSchemaEntities => [todos];
  @override
  int get schemaVersion => 2;
}
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stack_trace/stack_trace.dart';
import 'package:go_router/go_router.dart';

import 'screens/home.dart';
import 'screens/search


tusCompleted,
				Meta: types.Transfer{
					Value:    "100000000",
					Symbol:   "XRP",
					Decimals: 6,
				},
			},
			ok: true,
		},
		{
			name: "Test normalize payment 2",
			args: args{
				filename: "payment_2.json",
			},
			wantTx: types.Tx{
				ID:     "3D8512E02414EF5A6BC00281D945735E85DED9EF739B1DCA9EABE04D9EEC72C1",
				Coin:   coin.RIPPLE,
				From:   "raz97dHvnyBcnYTbXGYxhV8bGyr1aPrE5w",
				To:     "rna8qC8Y9uLd2vzYtSEa1AJcdD3896zQ9S",
				Fee:    "120",
				Date:   1565114281,
				Block:  49163909,
				Memo:   "",
				Status: types.StatusCompleted,
				Meta: types.Transfer{
					Value:    "3100",
					Symbol:   "XRP",
					Decimals: 6,
				},
			},
			ok: true,
		},
		{
			name: "Test normalize failed payment",
			args: args{
				filename: "payment_failed.json",
			},
			wantTx: types.Tx{
				ID:     "B9086F7EB895E943C4DDA9F1B582E6E7DE35F4FB91AD13C50AB74F854DC0EBE0",
				Coin:   coin.RIPPLE,
				From:   "rJb5KsHsDHF1YS5B5DU6QCkH5NsPaKQTcy",
				To:     "rfHj5CuhajwdrzW2C8Y7EDXbx1QMiD5SXP",
				Fee:    "100000",
				Date:   1581590872,
				Block:  53401154,
				Memo:   "",
				Status: types.StatusError,
				Meta: types.Transfer{
					Value:    "24999750000",
					Symbol:   "XRP",
					Decimals: 6,
				},
			},
			ok: true,
		},
		{
			name: "Test normalize SetRegularKey transfer",
			args: args{
				filename: "payment_3.json",
			},
			wantTx: types.Tx{},
			ok:     false,
		},
		{
			name: "Test normalize token transfer",
			args: args{
				filename: "payment_4.json",
			},
			wantTx: types.Tx{},
			ok:     false,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			var srcTx Tx
			_ = mock.JsonModelFromFilePath("mocks/"+tt.args.filename, &srcTx)
			gotTx, err := NormalizeTx(&srcTx)
			if err != tt.ok {
				t.Errorf("NormalizeTx() error = %v, ok %v", err, tt.ok)
				return
			}
			if !reflect.DeepEqual(gotTx, tt.wantTx) {
				t.Errorf("NormalizeTx() gotTx = %v, want %v", gotTx, tt.wantTx)
			}
		})
	}
}
package waves

import (
	"encoding/json"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/trustwallet/golibs/mock"
	"github.com/trustwallet/golibs/types"
)

var (
	transferV1, _   = mock.JsonStringFromFilePath("mocks/" + "transfer.json")
	differentTxs, _ = mock.JsonStringFromFilePath("mocks/" + "different_txs.json")

	transferV1Obj = types.Tx{
		ID:     "7QoQc9qMUBCfY4QV35mgBsT8eTXybvGkM2HTumtAvBUL",
		Coin:   5741564,
		From:   "3PLrCnhKyX5iFb


eric::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [lcdcpctl2](index.html) module"]
pub struct LCDCPCTL2_SPEC;
impl crate::RegisterSpec for LCDCPCTL2_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [lcdcpctl2::R](R) reader structure"]
impl crate::Readable for LCDCPCTL2_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [lcdcpctl2::W](W) writer structure"]
impl crate::Writable for LCDCPCTL2_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets LCDCPCTL2 to value 0"]
impl crate::Resettable for LCDCPCTL2_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
<reponame>jeamick/Nchain-Project<gh_stars>0
use chain::{BlockHeader, ShortTransactionID};
use common::PrefilledTransaction;

#[derive(Debug, PartialEq, Serializable, Deserializable)]
pub struct BlockHeaderAndIDs {
	pub header: BlockHeader,
	pub nonce: u64,
	pub short_ids: Vec<ShortTransactionID>,
	pub prefilled_transactions: Vec<PrefilledTransaction>,
}
use crate::graph::Graph;
use crate::helpers::{add_edge_costs, Costs, MyVec, Preference};
use crate::EDGE_COST_DIMENSION;

#[derive(Clone, Debug)]
pub struct PathSplit {
    pub cuts: MyVec<u32>,
    pub alphas: MyVec<Preference>,
    pub dimension_costs: MyVec<Costs>,
    pub costs_by_alpha: MyVec<f64>,
}

impl PathSplit {
    pub fn get_total_cost(&self) -> f64 {
        self.costs_by_alpha
            .iter()
            .fold(0.0, |acc, cost| acc + *cost)
    }
}

#[derive(Debug, Clone)]
pub struct Path {
    pub id: Vec<(Option<u32>, u32)>,
    pub nodes: MyVec<u32>,
    pub edges: MyVec<u32>,
    pub user_split: PathSplit,
    pub algo_split: Option<PathSplit>,
    pub total_dimension_costs: Costs,
}

impl Path {
    pub fn get_subpath_costs(&self, graph: &Graph, start: u32, end: u32) -> Costs {
        let edges = &self.edges[start..end];
        edges.iter().fold([0.0; EDGE_COST_DIMENSION], |acc, edge| {
            add_edge_costs(&acc, &graph.edges[*edge].edge_costs)
        })
    }
    pub fn get_subpath(&self, graph: &Graph, start : u32, end : u32) -> Path {
        let nodes = MyVec(self.nodes[start..end].iter().copied().collect());
        let mut stop = end;
        if stop > 0{
            stop -= 1;
        }
        let edges = MyVec(self.edges[start..stop].iter().copied().collect());
        let id = Vec::new();
        let total_dimension_costs = self.get_subpath_


define s1_ptr esi
#define size ecx
#define s2_limb ebx

	.text
ENTRY (__mpn_submul_1)

	pushl	%res_ptr
	cfi_adjust_cfa_offset (4)
	pushl	%s1_ptr
	cfi_adjust_cfa_offset (4)
	pushl	%ebp
	cfi_adjust_cfa_offset (4)
	pushl	%s2_limb
	cfi_adjust_cfa_offset (4)

	movl	RES(%esp), %res_ptr
	cfi_rel_offset (res_ptr, 12)
	movl	S1(%esp), %s1_ptr
	cfi_rel_offset (s1_ptr, 8)
	movl	SIZE(%esp), %size
	movl	S2LIMB(%esp), %s2_limb
	cfi_rel_offset (s2_limb, 0)
	leal	(%res_ptr,%size,4), %res_ptr
	leal	(%s1_ptr,%size,4), %s1_ptr
	negl	%size
	xorl	%ebp, %ebp
	cfi_rel_offset (ebp, 4)
	ALIGN (3)

L(oop):	adcl	$0, %ebp
	movl	(%s1_ptr,%size,4), %eax

	mull	%s2_limb

	addl	%ebp, %eax
	movl	(%res_ptr,%size,4), %ebp

	adcl	$0, %edx
	subl	%eax, %ebp

	movl	%ebp, (%res_ptr,%size,4)
	incl	%size

	movl	%edx, %ebp
	jnz	L(oop)

	adcl	$0, %ebp
	movl	%ebp, %eax
	popl	%s2_limb
	cfi_adjust_cfa_offset (-4)
	cfi_restore (s2_limb)
	popl	%ebp
	cfi_adjust_cfa_offset (-4)
	cfi_restore (ebp)
	popl	%s1_ptr
	cfi_adjust_cfa_offset (-4)
	cfi_restore (s1_ptr)
	popl	%res_ptr
	cfi_adjust_cfa_offset (-4)
	cfi_restore (res_ptr)

	ret
#undef size
END (__mpn_submul_1)


록 보상이 줄어듭니다!", num), pfix);
                                    else if (num <= 20) Msg.send(player, String.format("&e이 히든 요소는 &c약 %d회 이상 &e발견된 꽤나 알려진 히든 요소입니다. &b히든 요소는 많이 발견될 수록 보상이 줄어듭니다!", num), pfix);
                                    else Msg.send(player, String.format("&e이 히든 요소는 &c약 %d회 이상 &e발견된 이미 많이 알려진 히든 요소입니다. &b히든 요소는 많이 발견될 수록 보상이 줄어듭니다!", num), pfix);
                                }
                                else if(informType.equals("2")) {
                                    if(num == 1) Msg.send(player, "&e이 히든 요소는 &c지금 처음 발견된 히든 요소&e입니다. &b히든 요소는 많이 발견될 수록 보상이 줄어듭니다!", pfix);
                                    else if (num <= 10) Msg.send(player, String.format("&e이 히든 요소는 &c%d회 &e발견된 조금 덜 알려진 히든 요소입니다. &b히든 요소는 많이 발견될 수록 보상이 줄어듭니다!", num - 1), pfix);
                                    else if (num <= 20) Msg.send(player, String.format("&e이 히든 요소는 &c%d회 &e발견된 꽤나 알려진 히든 요소입니다. &b히든 요소는 많이 발견될 수록 보상이 줄어듭니다!", num - 1), pfix);
                                    else Msg.send(player, String.format("&e이 히든 요소는 &c%d회 &e발견된 이미 많이 알려진 히든 요소입니다. &b히든 요소는 많이 발견될 수록 보상이 줄어듭니다!", num - 1), pfix);
                                }
                                Msg.send(player, " ");
                                Msg.send(player, "&4히든 요소&c에 관련된 것은 유포 및 거래하실 수 없습니다.", pfix);
                            }
                        }.runTaskLater(plugin, 25);
                    }
                };

            }
            else if(sct.startsWith("!UNREAD")) {
                String s = script.split(":")[1].trim();
                DialogQuestManager.getReadDialogs(player).remove(s);
            }
            else if(sct.startsWith("!UNCOMPLETE")) {
                String s = script.split(":")[1].trim();
                DialogQuestManager.getCompletedQuests(player).remove(s);
            }
            else if (sct.startsWith("!READ")) {
                String s = script.split(":")[1].trim();
                DialogQuestManager.getReadDialogs(player).add(s);
            }
            else if (sct.startsWith("!COMPLETE")) {
                String s = script.split(":")[1].trim();
                DialogQuestManager.getCompletedQuests(player).add(s);
            }
            //Player Variable Effects
            //!SETVAR varName <value> - TEMPORARY
            //!MODVAR prm:varName <value>
            else if(sct.split(" ")[0].endsWith("VAR")) {
                PlayerData pdc = new PlayerData(player);
                String[] splitData = script.split(" ");
                String varName = splitData[1];
                int value;
                try {
                    value = Integer.parseInt(splitData[2]);
                } catch (NumberFormatException e) {
                    if(splitData[2].toUpperCase(Locale.ROOT).startsWith("PRM:")) {


"""
Write a function to convert all possible convertible elements in a list of lists to floats.
assert list_to_float( [("3", "4"), ("1", "26.45"), ("7.32", "8"), ("4", "8")] ) == [(3.0, 4.0), (1.0, 26.45), (7.32, 8.0), (4.0, 8.0)]
"""

def list_to_float(list_of_lists):
    return [tuple(map(float, sublist)) for sublist in list_of_lists]

print(list_to_float([("3", "4"), ("1", "26.45"), ("7.32", "8"), ("4", "8")]))
/python/list_to_dict.py
"""
Write a function to convert a list of lists to a dictionary.
assert list_to_dict([["a", 1], ["b", 2], ["c", 3]]) == {"a": 1, "b": 2, "c": 3}
"""

def list_to_dict(list_of_lists):
    return {key: value for key, value in list_of_lists}

print(list_to_dict([["a", 1], ["b", 2], ["c", 3]]))
/python/list_to_string.py
"""
Write a function to convert a list of strings to a single string.
assert list_to_string(["a", "b", "c"]) == "abc"
"""

def list_to_string(list_of_strings):
    return "".join(list_of_strings)

print(list_to_string(["a", "b", "c"]))
/python/list_to_tuple.py
"""
Write a function to convert a list of lists to a tuple of tuples.
assert list_to_tuple([["a", 1], ["b", 2], ["c", 3]]) == (("a", 1), ("b", 2), ("c", 3))
"""

def list_to_tuple(list_of_lists):
    return tuple(tuple(sublist) for sublist in list_of_lists)

print(list_to_tuple([["a", 1], ["b", 2], ["c", 3]]))
/python/list_to_set.py
"""
Write a function to convert a list to a set.
assert list_to_set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
"""

def list_to_set(list_of_numbers):
    return set(list_of_numbers)

print(list_to_set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))
/python/list_to_list.py
"""
Write a function to convert a list of lists to a list of tuples.
assert list_to_list([["a", 1], ["b", 2], ["c", 3]]) == [("a", 1), ("b", 2), ("c", 3)]
"""

def list_to_list(list_of_lists):
    return [tuple(sublist) for sublist in list_of_lists]

print(list_to_list([["a", 1], ["b", 2], ["c", 3]]))
/python/list_to_string_with_join.py
"""
Write a function to convert a list of strings to a single string using join.
assert list_to_string_with_join(["a", "b", "c"]) == "abc"
"""

def list_to_string_with_join(list_of_strings):
    return "".join(list_of_strings)

print(list_to_string_with_join(["a", "b", "c"]))
/python/list_to_string_with_join_and_map.py
"""
Write a function to convert a list of strings to a single string using join and map.
assert list_to_string_with_join_and


95
.set v_sld_a_os,            96
.set v_sld_b_os,            97
.set v_out_os,              98
.set v_flag,                99
.set v_in_ic,               100
.set v_in_iy,               101
.set v_in_ix,               102
.set v_in_ihi,              103
.set v_in_iwi,              104
.set v_wei_ic,              105
.set v_wei_iy,              106
.set v_wei_ix,              107
.set v_in_in0,              63
.set v_in_iho,              62
.set v_in_iwo,              61
.set v_in_ie,               60
.set v_in_in1,              59
.set v_in_ib,               58
.set v_in_in2,              57
.set v_wei_ie,              56
.set v_wei_ik,              55
.set v_out_ik0,             54
.set v_out_ik1,             53
.set v_out_ib,              52
.set v_gemm_in,             51
.set v_gemm_im,             50
.set v_idc,                 108
.set v_idy,                 109
.set v_idx,                 110
.set v_tmp,                 42
.set v_end,                 111

.text
.globl igemm_v4r1_dynamic_128x64x8_8x8_4x4x4x4x4x2_8x1x8x2_2x64
.p2align 8
.type igemm_v4r1_dynamic_128x64x8_8x8_4x4x4x4x4x2_8x1x8x2_2x64,@function
igemm_v4r1_dynamic_128x64x8_8x8_4x4x4x4x4x2_8x1x8x2_2x64:
    s_load_dwordx4  s[s_p_in:s_p_in+3],         s[s_ka:s_ka+1],     0+k_p_in
    s_load_dwordx2  s[s_p_out:s_p_out+1],       s[s_ka:s_ka+1],     0+k_p_out
    s_load_dwordx8  s[s_hi:s_hi+7],             s[s_ka:s_ka+1],     0+k_hi
    s_load_dwordx4  s[s_stride_w:s_stride_w+3], s[s_ka:s_ka+1],     0+k_stride_w
    s_load_dwordx2  s[s_pad_w:s_pad_w+1],       s[s_ka:s_ka+1],     0+k_pad_w
    s_load_dword    s[s_x],                     s[s_ka:s_ka+1],     0+k_x

    ; in e_n1_b_n2 cluster_lengths:{8,1,8,2}, sub_lengths:{1,2,1,2}, order:{0,1,3,2}
    v_and_b32 v[v_in_ib], 7, v0
    v_lshrrev_b32 v[v_tmp], 3, v0
    v_and_b32 v[v_in_in2], 1, v[v_tmp]
    v_lshrrev_b32 v[v_tmp], 1, v[v_t


: Closeable> closeableLazy(initializer: () -> T) = CloseableLazyVal(initializer)

@Execution(ExecutionMode.SAME_THREAD)
@CaptureSystemOutput
class DelegatePropertiesExample {

    class Example {
        var p: String by Delegates.observable("") { prop, old, new ->
            println("property=${prop.name}, old=$old --> new=$new")
        }
    }

    interface Base {
        fun print()
    }

    class BaseImpl(val x: Int): Base {
        override fun print() {
            print(x)
        }
    }

    class Derived(b: Base): Base by b

    @Test
    fun `observable property`(output: OutputCapture) {
        val e = Example()

        e.p = "abc"
        Thread.sleep(100)
        output.toString() shouldContain "new=abc"

        e.p = "가나다"
        Thread.sleep(100)
        output.toString() shouldContain "new=가나다"
    }

    @Test
    fun `delegate class example`(output: OutputCapture) {
        val b = BaseImpl(10)
        Derived(b).print()

        output.toString() shouldContain "10"
    }
}
package io.kommons

import java.nio.charset.Charset
import java.time.ZoneId
import java.time.ZoneOffset
import java.util.Locale

/**
 * System Default Locale
 */
@JvmField
val defaultLocale: Locale = Locale.getDefault()

/**
 * System Default Charset (UTF_8)
 */
@JvmField
val defaultCharset: Charset = Charsets.UTF_8

/**
 * System default charset name ("UTF-8")
 */
@JvmField
val defaultCharsetName: String = defaultCharset.name()

/**
 * System Default Charactor encoding ("utf-8")
 */
@JvmField
val defaultEncoding: String = defaultCharsetName.toLowerCase()

/**
 * System default [ZoneId]
 *
 * @see defaultZoneOffset
 */
@JvmField
val defaultZoneId: ZoneId = ZoneId.systemDefault()

/**
 * UTC [ZoneId]
 *
 * @see utcZoneOffset
 */
@JvmField
val utcZoneId: ZoneId = ZoneId.of("UTC")

/**
 * System default [ZoneOffset]
 *
 * @see defaultZoneId
 */
@JvmField
val defaultZoneOffset: ZoneOffset = ZoneOffset.of(defaultZoneId.id)

/**
 * UTC [ZoneOffset]
 *
 * @see utcZoneId
 */
@JvmField
val utcZoneOffset: ZoneOffset = ZoneOffset.UTCpackage io.kommons

import java.math.BigDecimal
import java.math.BigInteger
import java.nio.charset.Charset
import java.sql.Timestamp
import java.text.SimpleDateFormat
import java.util.Date
import kotlin.math.ceil
import kotlin.math.floor
import kotlin.math.pow
import kotlin.math.roundToLong

/**
 * 객체를 Double 수형으로 변환합니다.
 *
 * @receiver Any?
 * @param defaultValue 변환 실패 시 대체 값
 */
@JvmOverloads
fun Any?.asDouble(defaultValue: Double = 0.0): Double = runCatching {
    when (this) {
        null      -> defaultValue
        is Double -> this
        is Number -> this.toDouble()
        else      -> this.toString().parseNumber()


been started and is not finished.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_REQUEST)(
  IN EFI_ARP_PROTOCOL       *This,
  IN VOID                   *TargetSwAddress  OPTIONAL,
  IN EFI_EVENT              ResolvedEvent     OPTIONAL,
  OUT VOID                  *TargetHwAddress
  );

/**
  This function aborts the previous ARP request (identified by This, TargetSwAddress
  and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().

  If the request is in the internal ARP request queue, the request is aborted
  immediately and its ResolvedEvent is signaled. Only an asynchronous address
  request needs to be canceled. If TargeSwAddress and ResolveEvent are both
  NULL, all the pending asynchronous requests that have been issued by This
  instance will be cancelled and their corresponding events will be signaled.

  @param  This                   The pointer to the EFI_ARP_PROTOCOL instance.
  @param  TargetSwAddress        The pointer to the protocol address in previous
                                 request session.
  @param  ResolvedEvent          Pointer to the event that is used as the
                                 notification event in previous request session.

  @retval EFI_SUCCESS            The pending request session(s) is/are aborted and
                                 corresponding event(s) is/are signaled.
  @retval EFI_INVALID_PARAMETER  One or more of the following conditions is TRUE:
                                 This is NULL. TargetSwAddress is not NULL and
                                 ResolvedEvent is NULL. TargetSwAddress is NULL and
                                 ResolvedEvent is not NULL.
  @retval EFI_NOT_STARTED        The ARP driver instance has not been configured.
  @retval EFI_NOT_FOUND          The request is not issued by
                                 EFI_ARP_PROTOCOL.Request().

**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_CANCEL)(
  IN EFI_ARP_PROTOCOL       *This,
  IN VOID                   *TargetSwAddress  OPTIONAL,
  IN EFI_EVENT              ResolvedEvent     OPTIONAL
  );

///
/// ARP is used to resolve local network protocol addresses into
/// network hardware addresses.
///
struct _EFI_ARP_PROTOCOL {
  EFI_ARP_CONFIGURE         Configure;
  EFI_ARP_ADD               Add;
  EFI_ARP_FIND              Find;
  EFI_ARP_DELETE            Delete;
  EFI_ARP_FLUSH             Flush;
  EFI_ARP_REQUEST           Request;
  EFI_ARP_CANCEL            Cancel;
};

extern EFI_GUID gEfiArpServiceBindingProtocolGuid;
extern EFI_GUID gEfiArpProtocolGuid;

#endif


,d,g,v,p,m,k,y,M;t.Ug("Brandes & Koepf node placement",1);n.a=e;n.c=iqn(e);r=bG(lIn(e,(IYn(),JFe)),281);b=lM(yK(lIn(e,YFe)));n.d=r==(OSn(),c$e)&&!b||r==r$e;TVn(n,e);y=null;M=null;v=null;p=null;g=(Tcn(4,d1n),new H7(4));switch(bG(lIn(e,JFe),281).g){case 3:v=new nUn(e,n.c.d,(m0(),Aqe),(p0(),Pqe));Tm(g.c,v);break;case 1:p=new nUn(e,n.c.d,(m0(),Lqe),(p0(),Pqe));Tm(g.c,p);break;case 4:y=new nUn(e,n.c.d,(m0(),Aqe),(p0(),Cqe));Tm(g.c,y);break;case 2:M=new nUn(e,n.c.d,(m0(),Lqe),(p0(),Cqe));Tm(g.c,M);break;default:v=new nUn(e,n.c.d,(m0(),Aqe),(p0(),Pqe));p=new nUn(e,n.c.d,Lqe,Pqe);y=new nUn(e,n.c.d,Aqe,Cqe);M=new nUn(e,n.c.d,Lqe,Cqe);Tm(g.c,y);Tm(g.c,M);Tm(g.c,v);Tm(g.c,p)}i=new RI(e,n.c);for(u=new nd(g);u.a<u.c.c.length;){a=bG(K3(u),185);kJn(i,a,n.b);lXn(a)}l=new Bjn(e,n.c);for(o=new nd(g);o.a<o.c.c.length;){a=bG(K3(o),185);zVn(l,a)}if(t._g()){for(s=new nd(g);s.a<s.c.c.length;){a=bG(K3(s),185);t.bh(a+" size is "+bxn(a))}}h=null;if(n.d){f=fJn(n,g,n.c.d);Qqn(e,f,t)&&(h=f)}if(!h){for(s=new nd(g);s.a<s.c.c.length;){a=bG(K3(s),185);Qqn(e,a,t)&&(!h||bxn(h)>bxn(a))&&(h=a)}}!h&&(h=(b3(0,g.c.length),bG(g.c[0],185)));for(d=new nd(e.b);d.a<d.c.c.length;){w=bG(K3(d),30);for(k=new nd(w.a);k.a<k.c.c.length;){m=bG(K3(k),10);m.n.b=bM(h.p[m.p])+bM(h.d[m.p])}}if(t._g()){t.bh("Chosen


// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

using System;
using Org.Apache.REEF.Common.Metrics.MutableMetricsLayer;
using Org.Apache.REEF.Tang.Annotations;
using Org.Apache.REEF.Utilities.Attributes;

namespace Org


e.g. built version) also quotes will be encoded.
				expected = '<img src="" onerror="alert( 1 );">';
			}

			bot.setHtmlWithSelection( 'a^aa' );

			bot.dialog( 'link', function( dialog ) {
				dialog.setValueOf( 'info', 'linkDisplayText', '' );
				dialog.getButton( 'ok' ).click();
				assert.areSame( expected, bot.getData( true ) );
			} );
		},

		'test overriding whole block': function() {
			// If we have whole block selected, we need to make sure that by overriding the selection with new anchor it
			// will be wrapped with a block instead of be put directly into editable (body).
			var bot = this.editorBot;

			bot.setHtmlWithSelection( '[
aaa
]' );

			bot.dialog( 'link', function( dialog ) {
				dialog.setValueOf( 'info', 'linkDisplayText', 'bbb' );
				dialog.setValueOf( 'info', 'url', 'http://ckeditor.com' );
				dialog.getButton( 'ok' ).click();
				assert.areSame( '
bbb
', bot.getData( true ) );
			} );
		},

		'test link with a nested strong without text change': function() {
			// If no innertext was changed, the nested elements should not get removed.
			var bot = this.editorBot;

			bot.setHtmlWithSelection( '[http://ckeditor.com].' );

			bot.dialog( 'link', function( dialog ) {
				assert.areSame( dialog.getValueOf( 'info', 'linkDisplayText' ), 'http://ckeditor.com' );
				dialog.setValueOf( 'info', 'url', 'http://example.dev' );
				dialog.getButton( 'ok' ).click();
				assert.areSame( 'http://ckeditor.com.', bot.getData( true ) );
			} );
		},

		'test changing inner text of link with same href and inner text': function() {
			var bot = this.editorBot;

			// Note it's crucial to include data-cke-saved-href attribute to reproduce this issue.
			bot.setHtmlWithSelection( '
aa [http://foobar] bb
' );

			bot.dialog( 'link', function( dialog ) {
				dialog.setValueOf( 'info', 'linkDisplayText', 'foo' );
				dialog.getButton( 'ok' ).click();
				assert.areSame( '
aa foo bb
', bot.getData( true ) );
			} );
		},

		'test link with a nested anchors without text change': function() {

			if ( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) {
				// #14848
				assert.ignore();
			}

			// Even though display text was not changed we have to remove nested, editable anchor elements.
			var bot = this.editorBot;

			bot.setHtmlWithSelection( '[foo bbb ccc]' );

			bot.dialog( 'link', function( dialog ) {
				dialog.setValueOf( 'info', 'url', 'newlink' );
				dialog.getButton( 'ok' ).click();
				assert.areSame( 'f


]
};

var precalcSpeed = {
    "columns": [
        [
            "VennEuler",
            270.25288918071817,
            477.9406977738047,
            734.2055212380959,
            1050.2712577619047,
            1412.2189399879499,
            1909.3988429397589,
            2510.4340089397656
        ],
        [
            "venn.js",
            0.35371465059894497,
            0.8620840595243148,
            4.999302071439171,
            15.219448630955629,
            45.71563302409268,
            158.7735515060243,
            526.9760998313177
        ],
    ]
};

var perfChart = new createPerformanceChart("#venneuler", algorithms, precalcPerf, precalcSpeed);
perfChart.intersectionFunction(getAllIntersections);

var minRadius = 0.1, maxRadius = 0.5;
$('#radiusModal').on('show.bs.modal', function (e) {
     $(e.currentTarget).find("#minRadius")[0].value = minRadius;
     $(e.currentTarget).find("#maxRadius")[0].value = maxRadius;
 });

 $('#radiusModal').on('hide.bs.modal', function (e) {
    minRadius = Math.max(parseFloat($(e.currentTarget).find("#minRadius")[0].value), 0);
    maxRadius = Math.min(parseFloat($(e.currentTarget).find("#maxRadius")[0].value), 1);

    if (minRadius > maxRadius) {
        minRadius = maxRadius;
    }
    $(".radiusbutton").text("Random Radii in (" + minRadius + ", " + maxRadius + ") ..." );
    perfChart.setRadii(minRadius, maxRadius);
});

var vennEulerCalls = [];
function VennEulerViz(div) {
    var width = div.select("#original")[0][0].offsetWidth - 15;
    var circleCount = 4, current;
    var minRadius = .1, maxRadius = .5;

    var currentChart = venn.VennDiagram()
        .wrap(false)
        .layoutFunction(function (x) { return current; })
        .normalize(false)
        .width(width)
        .height(Math.min(width, 250));

    function randomizePositions() {
        var original = generateRandomCircles(circleCount, minRadius, maxRadius);
        var areas = getAllIntersections(original);
        setInput(original, areas);
    }

    function setLayouts(original, areas, computed) {
        // update original
        current = original;
        div.select("#original").datum(areas).call(currentChart);
        // update reconstructed
        current = computed;
        div.select("#reconstructed").datum(areas).call(currentChart);
        var success = hilightErrors(div, areas, current);
        div.select("#reconstructed h3").text("Reconstructed: " + (success ? "Success!" : "Failure"));
        vennEulerCalls.push({original: original, computed: computed});
    }
    var lastPrecomputedIndex = 0;

    function displayPrecomputed(index) {
        var original = precomputed[index].original;
        var computed = precomputed[index].computed;
        var areas = getAllIntersections(original);
        setLayouts(original, areas, computed);
    }

    displayPrecomputed(0);

    function setInput(original, areas) {
        vennEulerLayout(areas).then(function(computed) {
            div.select("#warning").style("display", "none");
            setLayouts(original, areas, computed);
        }, function(err) {
            console.log("Failed to venneuler viz");
            console.log(err);
//            div.select("#warning").html


 fromUserName);
            } else if ("subscribe".equals(event)) {
                logger.info("增加关注:" + fromUserName);
                updateSubscribe(true, fromUserName);
                Object eventKey = resultMap.get("EventKey");
                if (eventKey != null && StringUtil.isNotEmpty(eventKey.toString())) {
                    //带参数的二维码地址
                    String id = eventKey.toString().replace("qrscene_", "");
                    logger.info("带参数的二维码地址:" + fromUserName);
                } else {
                    logger.info("普通的关注:" + fromUserName);
                }
            } else if ("SCAN".equals(event)) {
                Object eventKey = resultMap.get("EventKey");
                if (eventKey != null) {
                    logger.info("扫码:" + fromUserName);
                }
            }
        } else if ("text".equals(msgType)) {
            String content = resultMap.get("Content").toString();
            logger.info("文本消息:" + fromUserName + ",content:" + content);
            String res = this.handleTextMessage(content, fromUserName);
            String reply = this.createTextWxReply(res, fromUserName, toUserName);
            return reply;
        } else {
            String reply = this.createTextWxReply("未能处理的消息类别:" + msgType, fromUserName, toUserName);
            return reply;
        }
        return null;
    }

    /**
     * 处理文本消息
     *
     * @param content
     * @param fromUserName
     * @return
     */
    private String handleTextMessage(String content, String fromUserName) {
        //先判断权限
        UserWxpayInfo wx = wechatService.getUserWxpayInfo(appId, fromUserName);
        if (wx == null || wx.getUserId() == null) {
            return "你的微信尚未在系统中绑定";
        }
        String sessionId = "WxOpenId_" + fromUserName;
        QaResult cr = qaHandler.handleMessage(QaMessageSource.WECHAT, content, wx.getUserId(), sessionId);
        return cr.getRes();
    }

    private void updateSubscribe(boolean subscribe, String openId) {
        UserWxpayInfo uw = wechatService.getUserWxpayInfo(appId, openId);
        if (uw == null) {
            uw = new UserWxpayInfo();
            uw.setAppId(appId);
            uw.setOpenId(openId);
            uw.setCreatedTime(new Date());
            uw.setRemark("微信消息回调加入");
            uw.setSubscribe(subscribe);
            uw.setSubscribeTime(new Date());
        } else {
            uw.setSubscribe(subscribe);
            uw.setSubscribeTime(new Date());
        }
        wechatService.saveOrUpdateUserWxpayInfo(uw);
    }

    private String createTextWxReply(String content, String ToUserName, String FromUserName) {
        if (StringUtil.isEmpty(content)) {
            return null;
        }
        StringBuffer sb = new StringBuffer();
        sb.append("<xml>");
        sb.append("<ToUserName>" + "<![CDATA[" + ToUserName + "]]></ToUserName>");
        sb.append("<FromUserName>" + "<![CDATA[" + FromUserName + "]]></FromUserName>");
        long createTime = System.currentTimeMillis() / 1000;
        sb.append("<CreateTime>" + "<![CDATA[" + c


etween 0 and 360 in hue with [tempStep]
      // delta in temperature between them.
      //
      // For example, white and black have no analogues: there are no other
      // colors at T100/T0. Therefore, they should just be added to the array
      // as answers.
      while (indexSatisfied && allColors.length < divisions) {
        allColors.add(hct);
        final desiredTotalTempDeltaForIndex =
            (allColors.length + indexAddend) * tempStep;
        indexSatisfied = totalTempDelta >= desiredTotalTempDeltaForIndex;
        indexAddend++;
      }
      lastTemp = temp;
      hueAddend++;
      if (hueAddend > 360) {
        while (allColors.length < divisions) {
          allColors.add(hct);
        }
        break;
      }
    }

    final answers = <Hct>[input];

    // First, generate analogues from rotating counter-clockwise.
    final increaseHueCount = ((count - 1) / 2.0).floor();
    for (var i = 1; i < (increaseHueCount + 1); i++) {
      var index = 0 - i;
      while (index < 0) {
        index = allColors.length + index;
      }
      if (index >= allColors.length) {
        index = index % allColors.length;
      }
      answers.insert(0, allColors[index]);
    }

    // Second, generate analogues from rotating clockwise.
    final decreaseHueCount = count - increaseHueCount - 1;
    for (var i = 1; i < (decreaseHueCount + 1); i++) {
      var index = i;
      while (index < 0) {
        index = allColors.length + index;
      }
      if (index >= allColors.length) {
        index = index % allColors.length;
      }
      answers.add(allColors[index]);
    }

    return answers;
  }

  /// A color that complements the input color aesthetically.
  ///
  /// In art, this is usually described as being across the color wheel.
  /// History of this shows intent as a color that is just as cool-warm as the
  /// input color is warm-cool.
  Hct get complement {
    if (_complement != null) {
      return _complement!;
    }

    final coldestHue = coldest.hue;
    final coldestTemp = tempsByHct[coldest]!;

    final warmestHue = warmest.hue;
    final warmestTemp = tempsByHct[warmest]!;
    final range = warmestTemp - coldestTemp;
    final startHueIsColdestToWarmest = isBetween(
      angle: input.hue,
      a: coldestHue,
      b: warmestHue,
    );
    final startHue = startHueIsColdestToWarmest ? warmestHue : coldestHue;
    final endHue = startHueIsColdestToWarmest ? coldestHue : warmestHue;
    const directionOfRotation = 1.0;
    var smallestError = 1000.0;
    var answer = hctsByHue[input.hue.round()];

    final complementRelativeTemp = 1.0 - inputRelativeTemperature;
    // Find the color in the other section, closest to the inverse percentile
    // of the input color. This is the complement.
    for (var hueAddend = 0.0; hueAddend <= 360.0; hueAddend += 1.0) {
      final hue = MathUtils.sanitizeDegreesDouble(
        startHue + directionOfRotation * hueAddend,
      );
      if (!isBetween(angle: hue, a: startHue, b: endHue)) {
        continue;
      }
      final possibleAnswer = hctsByHue[hue.round()];
      final relativeTemp = (_tempsByHct[possibleAnswer]! - coldestTemp) / range;
      final error = (complementRelativeTemp - relativeTemp).abs();
      if (error < smallestError) {
        smallestError = error;
        answer = possibleAnswer;


Info, "%d %d", &dwOldFlags, &dwPingTime))
		return;

	// Check if flags have really changed
	dwNewFlags = pChangeUserFlagsRec->flags;
	if (IsUserSquelched(pChangeUserFlagsRec->name))
		dwNewFlags |= UF_SQUELCHED;

	if (dwNewFlags == dwOldFlags)
		return;

	// Now rebuild text string
	sprintf(szNewUserText, "%s\t%d %d\t%s",
		pszName,
		dwNewFlags,
		dwPingTime,
		pszDesc);

	// Save new user flags
	if (!strcmp(pChangeUserFlagsRec->name, sgszUserName))
		gnUserFlags = dwNewFlags;

	bWasOfficial = (0 != (dwOldFlags & USER_OFFICIAL_MASK));
	bIsOfficial  = (0 != (dwNewFlags & USER_OFFICIAL_MASK));

	// Actually set the new user entry
	int nTopIndex = SendMessage(hWndList, LB_GETTOPINDEX, 0, 0);
	int nCurSel = SendMessage(hWndList, LB_GETCURSEL, 0, 0);
	SendMessage(hWndList, WM_SETREDRAW, FALSE, 0);
	SendMessage(hWndList, LB_DELETESTRING, nOldIndex, 0);

	if (bWasOfficial == bIsOfficial) {
		nNewIndex = SendMessage(hWndList, LB_INSERTSTRING, nOldIndex, (LPARAM)(LPCSTR)szNewUserText);
	}
	else {
		// Move user to new position in list based on new flags
		// (Special users get moved to the top, non-specials get moved to the bottom)
		nNewIndex = SendMessage(
							hWndList,
							(bIsOfficial) ? LB_INSERTSTRING : LB_ADDSTRING,
							0,
							(LPARAM)(LPCSTR)szNewUserText);
	}

	// LB_DELETESTRING moves the scroll position, so reset it to where it was
	SendMessage(hWndList, LB_SETTOPINDEX, nTopIndex, 0);
	if (nCurSel == nOldIndex)
		SendMessage(hWndList, LB_SETCURSEL, nNewIndex, 0);

	SendMessage(hWndList, WM_SETREDRAW, TRUE, 0);

	// Update scrollbar that belongs to this listbox
	ListUpdateScrollbar(hWndList);
}

//****************************************************************************
// NOTE: pJoinChannelRec will only be valid as long as we don't go into a peekmessage loop.
//****************************************************************************
void ChatJoinChannel(SNJOINCHANNELPTR pJoinChannelRec) {
	HWND hWndList;
	char szText[MAX_CHAT_LEN];
	char szFmt[128];

	// if this is the first channel we are entering, add this channel to our list of known channels
	if (sgbFirstChannel) {
		ChatAddChannel(pJoinChannelRec->name);
		sgbFirstChannel = FALSE;
	}

	// Save channel name
	strcpy(gszCurrentChannel,pJoinChannelRec->name);
	sgbModeratedChannel = pJoinChannelRec->flags & CF_MODERATED;

	if (ghWndChat) {
		// Let select channel window know, in case user is waiting for confirmation
		ChatChannelJoined(pJoinChannelRec->name);

		hWndList = GetDlgItem(ghWndChat, IDC_USERLIST);

		// Dump all users from list and prepare to add the new ones.
		SendMessage(hWndList, LB_RESETCONTENT, 0, 0);

		// Display a message that we are in a new room now
		LoadString(global_hinstance, IDS_CHAT_JOIN_ROOM, szFmt, sizeof(szFmt));
		sprintf(szText, szFmt, eCOLOR_NOTIFY, pJoinChannelRec->name);
		SendMessage(ghWndChat, WM_CHAT_PROCESS_MSG, eCOLOR_NOTIFY, (LPARAM)szText);

		// Upda


/*.ts'],
        project: ['./project-file.json'],
        globals: ['$'],
        plugins: ['plugin1'],
        envs: ['env1', 'env2'],
        parser: 'death-star',
        report: 'stylish',
        stdInFilename: './test-file.ts'
      })
      mockProcess.argv = oldArgs
    })
  })
})
/**
 * @file games.tsのテスト。
 */
import * as assert from 'power-assert';
import * as httpMocks from "node-mocks-http";
import testHelper from '../test-helper';
import { BadRequestError, NotFoundError } from '../../src/core/utils/http-error';
import User from '../../src/models/user';
import StageHeader from '../../src/models/stage-header';
import Stage from '../../src/models/stage';
import Playlog from '../../src/models/playlog';
import StagePlayRanking from '../../src/models/rankings/stage-play-ranking';
import StageScoreRanking from '../../src/models/rankings/stage-score-ranking';
import UserPlayRanking from '../../src/models/rankings/user-play-ranking';
import router from '../../src/routes/games';

describe('/api/games', () => {
	before(async () => {
		// sqliteへのテストデータ登録
		await StageHeader.create({ id: 3, userId: 2, status: 'public' });
		await StageHeader.create({ id: 4, userId: 2, status: 'private' });
		await Stage.create({ id: 5, headerId: 3, name: "public stage", map: "[R] [G]" });
		await Stage.create({ id: 6, headerId: 4, name: "private stage", map: "[R] [G] [B]" });
	});

	describe('POST /start & /end', () => {
		it('should start & end game without login', async () => {
			const reqStart = httpMocks.createRequest({
				method: 'POST',
				url: '/start',
				body: { stageId: 5 },
			});
			const resStart = await testHelper.callRequestHandler(router, reqStart);

			const playlogStart = resStart._getJson();
			assert.strictEqual(typeof playlogStart.id, 'number');
			assert.strictEqual(playlogStart.stageId, 5);
			assert.strictEqual(playlogStart.userId, null);
			assert.strictEqual(playlogStart.cleared, false);

			// /endには、プレイログと同じ条件で計算したハッシュ値を渡す必要あり
			const dbPlaylog = await Playlog.findById(playlogStart.id);
			dbPlaylog.score = 1000;
			dbPlaylog.cleared = true;
			const reqEnd = httpMocks.createRequest({
				method: 'POST',
				url: '/end',
				body: {
					id: dbPlaylog.id,
					score: dbPlaylog.score,
					cleared: dbPlaylog.cleared,
					hash: dbPlaylog.hash(),
				},
			});
			const resEnd = await testHelper.callRequestHandler(router, reqEnd);

			const playlogEnd = resEnd._getJson();
			assert.strictEqual(playlogEnd.id, dbPlaylog.id);
			assert.strictEqual(playlogEnd.stageId, dbPlaylog.stageId);
			assert.strictEqual(playlogEnd.userId, dbPlaylog.userId);
			assert.strictEqual(playlogEnd.score, dbPlaylog.score);
			assert.strictEqual(playlogEnd.cleared, dbPlaylog.cleared);

			// ステージプレイランキング、スコアランキングに登録されること
			const stagePlayRanking = await new StagePlayRanking().findRankingAsync();
			const rank1 = stagePlayRanking.find((


 (框架名称+状态码+漏洞编号)+请求包+响应头 '''
        info_5 = self.logging_4(vul_info, status_code, res)
        try:
            info_5 += color.red_ex(' [Response')

            for key, value in res.headers.items():
                info_5 += color.black_ex('\n' + key + ': ' + value)

            info_5 += color.red_ex('\n]')
        except:
            return info_5
        return info_5

    def logging_6(self, vul_info, status_code, res):
        ''' 日志6级, (框架名称+状态码+漏洞编号)+请求包+响应头+响应内容 '''
        info_6 = self.logging_5(vul_info, status_code, res)

        try:
            # * HackRequests
            if ('HackRequests.response' in str(type(res))):
                info_6 = info_6[:-1]
                info_6 += color.black_ex('\n\n' + res.text)

                info_6 += color.red_ex('\n]')
            # * requests
            else:
                res.encoding = 'utf-8'
                info_6 = info_6[:-1]
                info_6 += color.black_ex('\n\n' + res.text)

                info_6 += color.red_ex('\n]')
        except:
            return info_6
        return info_6

    def get_domain(self, url, protocol=False):
        ''' 提取一个URL中的域名部分
            param url: 要提取域名的url
            param protocol: 提取的部分是否包含协议, 默认去掉协议
        '''

        try:
            start_index = url.find('//')
            if start_index:
                start_index += 2
            else:
                return 'None'
            end_index = url.find('/', start_index)

            if protocol:
                domain = url[0:end_index]
            else:
                domain = url[start_index:end_index]

            return domain
        except:
            return 'Error'

logger = Logger()


);
                            check = FALSE;
                            break;
                        }
                    }
                }
                if (!ENCODER_FFMPEG && str_has_char(aud_stg->filename) && (cnf_aud->encoder != exstg->get_faw_index(conf->aud.use_internal))) {
                    std::wstring exe_message;
                    if (!check_audenc_output(aud_stg, exe_message)) {
                        const bool retry_with_default_audenc = ENCODER_X264 || ENCODER_X265 || ENCODER_SVTAV1; // ffmpeg_audencを配布していないQSV/NV/VCEEncではここのretryは無効化する
                        const int orig_encoder = cnf_aud->encoder;
                        if (retry_with_default_audenc) {
                            if (default_audenc_cnf_avail
                                && orig_encoder != exstg->s_local.default_audio_encoder_ext
                                && 0 <= exstg->s_local.default_audio_encoder_ext && exstg->s_local.default_audio_encoder_ext < exstg->s_aud_ext_count
                                && muxer_supports_audio_format(pe->muxer_to_be_used, &exstg->s_aud_ext[exstg->s_local.default_audio_encoder_ext])) {
                                cnf_aud->encoder = exstg->s_local.default_audio_encoder_ext;
                            } else if (default_audenc_auo_avail) {
                                cnf_aud->encoder = DEFAULT_AUDIO_ENCODER_EXT;
                            }
                            error_failed_to_run_audio_encoder(
                                exstg->s_aud_ext[orig_encoder].dispname,
                                exe_message.c_str(),
                                (orig_encoder != cnf_aud->encoder) ? exstg->s_aud_ext[cnf_aud->encoder].dispname : nullptr);
                        }
                        // 同じエンコーダあるいはデフォルトエンコーダがうまく取得できな場合は再チェックしても意味がない
                        if (orig_encoder == cnf_aud->encoder) {
                            check = FALSE;
                            break;
                        }
                        // デフォルトエンコーダに戻して再チェック
                        warning_use_default_audio_encoder(exstg->s_aud_ext[cnf_aud->encoder].dispname);
                        continue;
                    }
                    info_use_exe_found(aud_stg->dispname, aud_stg->fullpath);
                }
                // ここまで来たらエンコーダの確認終了なのでbreak
                break;
            }
        }
    }

    //muxer
    switch (pe->muxer_to_be_used) {
    case MUXER_TC2MP4:
        check &= check_muxer_exist(&exstg->s_mux[MUXER_TC2MP4], aviutl_dir, exstg->s_local.get_relative_path, exeFiles); //tc2mp4使用時は追加でmp4boxも必要
        //下へフォールスルー
    case MUXER_MP4:
        check &= check_muxer_exist(&exstg->s_mux[MUXER_MP4], aviutl_dir, exstg->s_local.get_relative


tected invalidate() {
    this.lastChecked = null;
  }

  protected abstract compute(): Revision;
}

class TagsPair extends CachedTag {
  private first: RevisionTag;
  private second: RevisionTag;

  constructor(first: RevisionTag, second: RevisionTag) {
    super();
    this.first = first;
    this.second = second;
  }

  protected compute(): Revision {
    return Math.max(this.first.value(), this.second.value());
  }
}

class TagsCombinator extends CachedTag {
  private tags: RevisionTag[];

  constructor(tags: RevisionTag[]) {
    super();
    this.tags = tags;
  }

  protected compute(): Revision {
    let { tags } = this;

    let max = -1;

    for (let i=0; i<tags.length; i++) {
      let value = tags[i].value();
      max = Math.max(value, max);
    }

    return max;
  }
}

export class UpdatableTag extends CachedTag {
  private tag: RevisionTag;
  private lastUpdated: Revision;

  constructor(tag: RevisionTag) {
    super();
    this.tag = tag;
    this.lastUpdated = INITIAL;
  }

  protected compute(): Revision {
    return Math.max(this.lastUpdated, this.tag.value());
  }

  update(tag: RevisionTag) {
    if (tag !== this.tag) {
      this.tag = tag;
      this.lastUpdated = $REVISION;
      this.invalidate();
    }
  }
}

//////////

export const CONSTANT_TAG: RevisionTag = new (
  class ConstantTag extends RevisionTag {
    value(): Revision {
      return CONSTANT;
    }
  }
);

export const VOLATILE_TAG: RevisionTag = new (
  class VolatileTag extends RevisionTag {
    value(): Revision {
      return VOLATILE;
    }
  }
);

export const CURRENT_TAG: DirtyableTag = new (
  class CurrentTag extends DirtyableTag {
    value(): Revision {
      return $REVISION;
    }
  }
);

//////////

export interface VersionedReference<T> extends Reference<T>, Tagged<Revision> {}

export interface VersionedPathReference<T> extends PathReference<T>, Tagged<Revision> {
  get(property: string): VersionedPathReference<Opaque>;
}

export abstract class CachedReference<T> implements VersionedReference<T> {
  public abstract tag: RevisionTag;

  private lastRevision: Option<Revision> = null;
  private lastValue: Option<T> = null;

  value(): T {
    let { tag, lastRevision, lastValue } = this;

    if (!lastRevision || !tag.validate(lastRevision)) {
      lastValue = this.lastValue = this.compute();
      this.lastRevision = tag.value();
    }

    return lastValue as T;
  }

  protected abstract compute(): T;

  protected invalidate() {
    this.lastRevision = null;
  }
}

//////////

export type Mapper<T, U> = (value: T) => U;

class MapperReference<T, U> extends CachedReference<U> {
  public tag: RevisionTag;

  private reference: VersionedReference<T>;
  private mapper: Mapper<T, U>;

  constructor(reference: VersionedReference<T>, mapper: Mapper<T, U>) {
    super();
    this.tag = reference.tag;
    this.reference = reference;
    this.mapper = mapper;
  }

  protected compute(): U {
    let { reference, mapper } = this;
    return mapper(reference.value());
  }
}

export function map<T, U>(reference: VersionedReference<T


｜浮华日报_时尚_好奇心日报-张田小.md](./01/style.com的最后一天，以及，UA成为全球第九最具创意公司｜浮华日报_时尚_好奇心日报-张田小.md)
        - [“时尚女魔头”也有穿运动装、透视装的……小时候_时尚_好奇心日报-马梦涵.md](./01/“时尚女魔头”也有穿运动装、透视装的……小时候_时尚_好奇心日报-马梦涵.md)
        - [《惊声尖叫》的导演过世了：虽然你吓坏了我们，但是请走好_娱乐_好奇心日报-JASONZINOMAN.md](./01/《惊声尖叫》的导演过世了：虽然你吓坏了我们，但是请走好_娱乐_好奇心日报-JASONZINOMAN.md)
        - [「票房」票房崇拜是种病_娱乐_好奇心日报-俞斯译.md](./01/「票房」票房崇拜是种病_娱乐_好奇心日报-俞斯译.md)
        - [「这世界」被人身攻击后，这个姑娘决定挺身对抗网络暴力_文化_好奇心日报-孙若空.md](./01/「这世界」被人身攻击后，这个姑娘决定挺身对抗网络暴力_文化_好奇心日报-孙若空.md)
        - [为了飞上天，这个人坐上了一架无人机_智能_好奇心日报-徐弢.md](./01/为了飞上天，这个人坐上了一架无人机_智能_好奇心日报-徐弢.md)
        - [人一生平均搬11次家，越有钱越不常搬_商业_好奇心日报-潘姜汐熹.md](./01/人一生平均搬11次家，越有钱越不常搬_商业_好奇心日报-潘姜汐熹.md)
        - [什么样的中国人爱陌生人社交？_报告_好奇心日报-罗芊.md](./01/什么样的中国人爱陌生人社交？_报告_好奇心日报-罗芊.md)
        - [今日娱乐：小黄人登上长城，昆汀说了凯特·布兰切特“坏话”_娱乐_好奇心日报-韩方航.md](./01/今日娱乐：小黄人登上长城，昆汀说了凯特·布兰切特“坏话”_娱乐_好奇心日报-韩方航.md)
        - [今日应用：写一条笔记，只要摇一摇就行了_智能_好奇心日报-徐弢.md](./01/今日应用：写一条笔记，只要摇一摇就行


"meteorite_medium6_molten_cobble_ore_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((MOLTEN_COBBLE_ORE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))
        val MEDIUM6_MOLTEN_COBBLE_TREASURE_VARIANT = register("meteorite_medium6_molten_cobble_treasure_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((MOLTEN_COBBLE_TREASURE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))
        val MEDIUM6_COBBLE_COBBLE_ORE_VARIANT = register("meteorite_medium6_cobble_cobble_ore_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((COBBLE_COBBLE_ORE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))
        val MEDIUM6_COBBLE_COBBLE_TREASURE_VARIANT = register("meteorite_medium6_cobble_cobble_treasure_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((COBBLE_COBBLE_TREASURE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))
        val MEDIUM6_BROKEN_MIX_ORE_VARIANT = register("meteorite_medium6_broken_mix_ore_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((BROKEN_MIX_ORE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))
        val MEDIUM6_BROKEN_MIX_TREASURE_VARIANT = register("meteorite_medium6_broken_mix_treasure_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((BROKEN_MIX_TREASURE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))
        val MEDIUM6_MIX_MIX_ORE_VARIANT = register("meteorite_medium6_mix_mix_ore_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((MIX_MIX_ORE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))
        val MEDIUM6_MIX_MIX_TREASURE_VARIANT = register("meteorite_medium6_mix_mix_treasure_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration.of((MIX_MIX_TREASURE_VARIANT zip MEDIUM5_VARIANT) + (listOf(RANDOM_ORE_PROVIDER) to STAR1_PLACER)))

        val SMALL_MOLTEN_VARIANT = register("meteorite_small_molten_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration(listOf(MeteoriteFeatureConfiguration.MeteoritePlacerConfiguration(listOf(MOLTEN_PROVIDER), BOX1_PLACER), MeteoriteFeatureConfiguration.MeteoritePlacerConfiguration(listOf(SOLID_PROVIDER, TREASURE_PROVIDER), SingleBlockMeteoritePlacer))))
        val SMALL_COBBLE_VARIANT = register("meteorite_small_cobble_variant", Features.METEORITE.get(), MeteoriteFeatureConfiguration(listOf(MeteoriteFeatureConfiguration.MeteoritePlacerConfiguration(


063289; }
.cm-s-duotone-light span.cm-string, .cm-s-duotone-light span.cm-operator { color: #1659df; }
.cm-s-duotone-light span.cm-positive { color: #896724; }

.cm-s-duotone-light span.cm-variable-2, .cm-s-duotone-light span.cm-variable-3, .cm-s-duotone-light span.cm-type, .cm-s-duotone-light span.cm-string-2, .cm-s-duotone-light span.cm-url { color: #896724; }
.cm-s-duotone-light span.cm-def, .cm-s-duotone-light span.cm-tag, .cm-s-duotone-light span.cm-builtin, .cm-s-duotone-light span.cm-qualifier, .cm-s-duotone-light span.cm-header, .cm-s-duotone-light span.cm-em { color: #2d2006; }
.cm-s-duotone-light span.cm-bracket, .cm-s-duotone-light span.cm-comment { color: #b6ad9a; }

/* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */
/* .cm-s-duotone-light span.cm-error { background: #896724; color: #728fcb; } */
.cm-s-duotone-light span.cm-error, .cm-s-duotone-light span.cm-invalidchar { color: #f00; }

.cm-s-duotone-light span.cm-header { font-weight: normal; }
.cm-s-duotone-light .CodeMirror-matchingbracket { text-decoration: underline; color: #faf8f5 !important; }

/**
 * "
 *  Using Zenburn color palette from the Emacs Zenburn Theme
 *  https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el
 *
 *  Also using parts of https://github.com/xavi/coderay-lighttable-theme
 * "
 * From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css
 */

.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }
.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }
.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white; }
.cm-s-zenburn.CodeMirror { background-color: #3f3f3f; color: #dcdccc; }
.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }
.cm-s-zenburn span.cm-comment { color: #7f9f7f; }
.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }
.cm-s-zenburn span.cm-atom { color: #bfebbf; }
.cm-s-zenburn span.cm-def { color: #dcdccc; }
.cm-s-zenburn span.cm-variable { color: #dfaf8f; }
.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }
.cm-s-zenburn span.cm-string { color: #cc9393; }
.cm-s-zenburn span.cm-string-2 { color: #cc9393; }
.cm-s-zenburn span.cm-number { color: #dcdccc; }
.cm-s-zenburn span.cm-tag { color: #93e0e3; }
.cm-s-zenburn span.cm-property { color: #dfaf8f; }
.cm-s-zenburn span.cm-attribute { color: #dfaf8f; }
.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }
.cm-s-zenburn span.cm-meta { color: #f0dfaf; }
.cm-s-zenburn span.cm-header { color: #f0efd0; }
.cm-s-zenburn span.cm-operator { co


using Application.Features.OperationClaims.Constants;
using Application.Services.Repositories;
using Domain.Entities;
using NArchitecture.Core.Application.Rules;
using NArchitecture.Core.CrossCuttingConcerns.Exception.Types;
using NArchitecture.Core.Localization.Abstraction;

namespace Application.Features.OperationClaims.Rules;

public class OperationClaimBusinessRules : BaseBusinessRules
{
    private readonly IOperationClaimRepository _operationClaimRepository;
    private readonly ILocalizationService _localizationService;

    public OperationClaimBusinessRules(
        IOperationClaimRepository operationClaimRepository,
        ILocalizationService localizationService
    )
    {
        _operationClaimRepository = operationClaimRepository;
        _localizationService = localizationService;
    }

    private async Task throwBusinessException(string messageKey)
    {
        string message = await _localizationService.GetLocalizedAsync(messageKey, OperationClaimsMessages.SectionName);
        throw new BusinessException(message);
    }

    public async Task Ope


ackground: rgba(239, 68, 68, 0.1);
  color: rgba(239, 68, 68, 0.8);
  transform: scale(1.1);
}

.recording-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading,
.error,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125rem;
}

.error {
  color: #ef4444;
}

.error p,
.empty-state p {
  margin: 0 0 1rem 0;
}
/* Base styles and content styles */

@import 'variables.css';

:root {
    /* Browser default font-size is 16px, this way 1 rem = 10px */
    font-size: 62.5%;
}

html {
    font-family: "Noto Sans", "Noto Sans CJK SC", "Noto Sans SC", "Segoe UI", "Microsoft YaHei UI", sans-serif;
    color: var(--fg);
    background-color: var(--bg);
    text-size-adjust: none;
}

body {
    margin: 0;
    font-size: 1.6rem;
    overflow-x: hidden;
}

code {
    font-family: "DejaVu Sans Mono", "Source Code Pro", Consolas, Menlo, monospace, "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei UI";
    font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
}

/* Don't change font size in headers. */
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
    font-size: unset;
}

.left { float: left; }
.right { float: right; }
.boring { opacity: 0.6; }
.hide-boring .boring { display: none; }
.hidden { display: none !important; }

h2, h3 { margin-top: 2.5em; }
h4, h5 { margin-top: 2em; }

.header + .header h3,
.header + .header h4,
.header + .header h5 {
    margin-top: 1em;
}

h1:target::before,
h2:target::before,
h3:target::before,
h4:target::before,
h5:target::before,
h6:target::before {
    display: inline-block;
    content: "»";
    margin-left: -30px;
    width: 30px;
}

/* This is broken on Safari as of version 14, but is fixed
   in Safari Technology Preview 117 which I think will be Safari 14.2.
   https://bugs.webkit.org/show_bug.cgi?id=218076
*/
:target {
    scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
}

.page {
    outline: 0;
    padding: 0 var(--page-padding);
    margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
}
.page-wrapper {
    box-sizing: border-box;
}
.js:not(.sidebar-resizing) .page-wrapper {
    transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
}

.content {
    overflow-y: auto;
    padding: 0 15px;
    padding-bottom: 50px;
}
.content main {
    margin-left: auto;


() {
    let fox_name = "<NAME>";

    let what_does_the_fox_say = "*ding* *deng* *dung*";

    println!("The fox says: {what_does_the_fox_say}");
    println!("~ {fox_name}")
}

#[expect(unused)]
//~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
fn check_overridden_expectation_lint_level() {
    #[allow(unused_variables)]
    let this_should_not_fulfill_the_expectation = "maybe";
    //~^ WARNING unused variable: `this_should_not_fulfill_the_expectation` [unused_variables]
    //~| NOTE requested on the command line with `--force-warn unused-variables`
    //~| HELP if this is intentional, prefix it with an underscore
}

fn main() {
    check_multiple_lints_with_lint_group();
    check_overridden_expectation_lint_level();
}
use stdweb;
use stdweb::unstable::TryInto;
use stdweb::web::TypedArray;

use uni_app::App;

use super::{SoundError, SoundGenerator};

pub struct SoundDriver<T> {
    generator: Option<Box<SoundGenerator<T>>>,
    ctx: stdweb::Value,
    start_audio: f64,
    buffer: [f32; BUFFER_SIZE as usize * 2],
    err: SoundError,
}

const BUFFER_SIZE: u32 = 2048;
const AUDIO_LATENCY: f64 = 0.1;

enum GameStatus {
    Running,
    Paused,
    Resumed(f64),
}

impl<T> SoundDriver<T> {
    pub fn get_error(&self) -> SoundError {
        self.err
    }

    pub fn new(generator: Box<SoundGenerator<T>>) -> Self {
        let ctx = js! {
            window.startPause=0;
            window.endPause=0;
            document.addEventListener("visibilitychange", (e) => {
                if (document.hidden) {
                    window.startPause = performance.now() / 1000.0;
                } else {
                    window.endPause = performance.now() / 1000.0;
                }
            }, false);
            if (AudioContext) {
                return new AudioContext();
            } else {
                return undefined;
            }
        };
        let err = if ctx == stdweb::Value::Undefined {
            SoundError::NoDevice
        } else {
            SoundError::NoError
        };
        Self {
            generator: Some(generator),
            ctx,
            start_audio: 0.0,
            buffer: [0.0; BUFFER_SIZE as usize * 2],
            err,
        }
    }
    // -1 => game paused
    // >0 => pause duration
    fn get_pause_status(&self) -> GameStatus {
        let value: Option<f64> = js! {
            var duration = window.endPause-window.startPause;
            if (duration > 0) {
                window.endPause = 0;
                window.startPause=0;
                return duration;
            } else if (window.startPause > 0) {
                return -1;
            } else {
                return undefined;
            }
        }.try_into()
            .unwrap();
        match value {
            None => GameStatus::Running,
            Some(v) => if v == -1.0 {GameStatus::Paused} else {GameStatus::Resumed(v)}
        }
    }
    pub fn send_event(&mut self, event: T) {
        if let Some(ref mut gen) = self.generator {
            gen.handle_event(event);
        }
    }
    pub fn frame(&mut self) {
        match self.get_pause_status() {
            GameStatus::Paused => {return;}
            GameStatus::Resumed(duration) =>  self.start_audio


_to_str(m.get('name')))
                }]
            }

            for m in app.get('models')
        ] if app.get('models') else []

        module = {
            'name': app.get('name'),
            'icon': get_icon(app.get('app_label'), app.get('name')),
            'models': _models
        }
        data.append(module)

    # 如果有menu 就读取，没有就调用系统的
    key = 'system_keep'
    if config and 'menus' in config:
        if key in config and config.get(key) != False:
            temp = config.get('menus')
            for i in temp:
                # 处理面包屑
                if 'models' in i:
                    for k in i.get('models'):
                        k['breadcrumbs'] = [{
                            'name': i.get('name'),
                            'icon': i.get('icon')
                        }, {
                            'name': k.get('name'),
                            'icon': k.get('icon')
                        }]
                else:
                    i['breadcrumbs'] = [{
                        'name': i.get('name'),
                        'icon': i.get('icon')
                    }]
                data.append(i)
        else:
            data = config.get('menus')

    # 获取侧边栏排序, 如果设置了就按照设置的内容排序, 留空则表示默认排序以及全部显示
    if config.get('menu_display') is not None:
        display_data = list()
        for _app in data:
            if _app['name'] not in config.get('menu_display'):
                continue
            _app['_weight'] = config.get('menu_display').index(_app['name'])
            display_data.append(_app)
        display_data.sort(key=lambda x: x['_weight'])
        data = display_data

    return '<script type="text/javascript">var menus={}</script>'.format(json.dumps(data, cls=LazyEncoder))

def get_icon(obj, name=None):
    temp = get_config_icon(name)
    if temp != '':
        return temp

    _dict = {
        'auth': 'fas fa-shield-alt',
        'User': 'far fa-user',
        'Group': 'fas fa-users-cog'
    }
    temp = _dict.get(obj)
    if not temp:
        _default = __get_config('SIMPLEUI_DEFAULT_ICON')
        if _default is None or _default:
            return 'far fa-file'
        else:
            return ''
    return temp

# 从配置中读取图标
def get_config_icon(name):
    _config_icon = __get_config('SIMPLEUI_ICON')
    if _config_icon is None:
        return ''

    if name in _config_icon:
        return _config_icon.get(name)
    else:
        return ''

@register.simple_tag(takes_context=True)
def load_message(context):
    messages = context.get('messages')
    array = [dict(msg=msg.message, tag=msg.tags) for msg in messages] if messages else []

    return '<script id="out_message" type="text/javascript">var messages={}</script>'.format(
        json.dumps(array, cls=LazyEncoder))

@register.simple_tag(takes_context=True)
def context_to_json(context):
    json_str = '{}'

    return mark_safe(json_str)

@register.simple_tag()
def get_language():
    return settings.LANGUAGE_CODE.lower()

@register.filter
def get_language_code(val):
    return settings.LANGUAGE_CODE.lower()

def get_analysis_config():
    val = __get_config('SIMPLEUI_ANALYSIS')
    if not val and val == False:
        return False
    return True

@register.simple_tag(takes_context=True)
def load_analysis(context):
    try:
        if get_analysis_config() == False:
            return ''

        # 理论上值一天只上报一次
        key = 'simpleui_' + time.strftime('%Y%m%d', time.localtime())

        if key in context.request.session:
            return ''

        b64 = ""
        j = {
            "n": platform.node(),
            "o": platform.platform(),
            "p": platform.python_version(),
            "d": django.get_version(),
            "s": simpleui.get_version(),
        }
        if 'theme_name' in context.request.COOKIES:
            j['t'] = context.request.COOKIES['theme_name']
        else:
            j['t'] = 'Default'

        b64 = base64.b64encode(str(j).encode('utf-8'))

        url = '//simpleui.88cto.com/analysis'
        b64 = b64.decode('utf-8')
        html = '<script async type="text/javascript" src="{}/{}"></script>'.format(url, b64);
        context.request.session[key] = True

        return mark_safe(html)
    except:
        return ''

@register.simple_tag(takes_context=True)
def custom_button(context):
    admin = context.get('cl').model_admin
    data = {}
    if hasattr(admin, 'actions'):
        actions = admin.actions
        # 输出自定义按钮的属性
        for name in acti


Bias(1.0f, 2.5f); // these values match HDRP defaults (see https://github.com/Unity-Technologies/Graphics/blob/9544b8ed2f98c62803d285096c91b44e9d8cbc47/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAtlas.cs#L197 )
            CoreUtils.SetKeyword(cmd, ShaderKeywordStrings.CastingPunctualLightShadow, false);

            for (int i = 0; i < m_CasterManager.VisibleCount; i++)
            {
                m_CasterManager.GetMatrices(i, out Matrix4x4 viewMatrix, out Matrix4x4 projectionMatrix);

                if (m_CasterManager.Usage == ShadowUsage.Scene)
                {
                    int mainLightIndex = renderingData.lightData.mainLightIndex;
                    VisibleLight mainLight = renderingData.lightData.visibleLights[mainLightIndex];
                    Vector4 shadowBias = ShadowUtils.GetShadowBias(ref mainLight, mainLightIndex,
                        ref renderingData.shadowData, projectionMatrix, m_ShadowMap.rt.width);
                    ShadowUtils.SetupShadowCasterConstantBuffer(cmd, ref mainLight, shadowBias);
                }
                else if (m_CasterManager.Usage == ShadowUsage.Self)
                {
                    Vector4 lightDirection = m_CasterManager.GetLightDirection(i);
                    cmd.SetGlobalVector("_LightDirection", lightDirection);
                    CoreUtils.SetKeyword(cmd, KeywordNames._CASTING_SELF_SHADOW, true);
                }
                else
                {
                    throw new NotSupportedException($"Unsupported shadow usage: {m_CasterManager.Usage}.");
                }

                Vector2Int tilePos = new(i % m_ShadowMapSizeInTile, i / m_ShadowMapSizeInTile);
                DrawShadow(cmd, i, tilePos, in viewMatrix, in projectionMatrix);
                m_ShadowMatrixArray[i] = GetShadowMatrix(tilePos, in viewMatrix, projectionMatrix);
                m_ShadowMapRectArray[i] = GetShadowMapRect(tilePos);
                m_ShadowCasterIdArray[i] = m_CasterManager.GetId(i);
            }

            cmd.SetGlobalDepthBias(0.0f, 0.0f); // Restore previous depth bias values
            CoreUtils.SetKeyword(cmd, KeywordNames._CASTING_SELF_SHADOW, false);

            cmd.SetGlobalTexture(PropertyIds.ShadowMap(m_CasterManager.Usage), m_ShadowMap);
            cmd.SetGlobalInt(PropertyIds.ShadowCount(m_CasterManager.Usage), m_CasterManager.VisibleCount);
            cmd.SetGlobalMatrixArray(PropertyIds.ShadowMatrices(m_CasterManager.Usage), m_ShadowMatrixArray);
            cmd.SetGlobalVectorArray(PropertyIds.ShadowMapRects(m_CasterManager.Usage), m_ShadowMapRectArray);
            cmd.SetGlobalFloatArray(PropertyIds.ShadowCasterIds(m_CasterManager.Usage), m_ShadowCasterIdArray);
        }

        private void SetShadowSamplingData(CommandBuffer cmd)
        {
            int renderTargetWidth = m_ShadowMap.rt.width;
            int renderTargetHeight = m_ShadowMap.rt.height;
            float invShadowAtlasWidth = 1.0f / renderTargetWidth;
            float invShadowAtlasHeight = 1.0f / renderTargetHeight;
            float invHalfShadowAtlasWidth = 0.5f * invShadowAtlasWidth;
            float invHalfShadowAtlasHeight = 0.5f * invShadowAtlasHeight;

            cmd.SetGlobalVector(PropertyIds.ShadowOffset0(m_CasterManager.Usage),
                new Vector4(-invHalfShadowAtlasWidth, -invHalfShadowAtlasHeight, invHalfShadowAtlasWidth, -invHalfShadowAtlasHeight));
            cmd.SetGlobalVector(PropertyIds.ShadowOffset1(m_CasterManager.Usage),
                new Vector4(-invHalfShadowAtlasWidth, invHalfShadowAtlasHeight, invHalfShadowAtlasWidth, invHalfShadowAtlasHeight));
            cmd.SetGlobalVector(PropertyIds.ShadowMapSize(m_CasterManager.Usage),