);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;}
.btn-info:active,.btn-info.active{background-color:#24748c \9;}
.btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222222;}
.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";}
.btn-group:after{clear:both;}
.btn-group:first-child{*margin-left:0;}
.btn-group+.btn-group{margin-left:5px;}
.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;}
.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-


5.83 0.53,1.82 -3.82,2.76 -0.54,3.7 2.29,1.61 3.52,-2 6.07,-2.2 2.07,-0.34 5.08,-0.28 6.25,1.69 2.29,-3.28 5.18,4.71 6.09,1.16 -1.15,-2.62 1.9,-3.14 3.66,-3.85 0.63,3.56 5.17,2.88 7.8,4.18 1.96,0.26 4.94,2.32 6.26,0.28 -2.5,-1.19 2.5,-2.95 2,-5.26 1.05,-2.66 -3.24,-2.9 -4.77,-4.37 -2.69,-0.38 -1.4,-4.38 -3.15,-6.05 -1.61,-3.03 -4.93,-4.88 -5.94,-8.38 -1.14,-0.99 -1.96,-6.07 -3.71,-4.88z","name":"Berlin"},"by":{"path":"m273.66,464.44c-1.31,1.91 -3.76,2.78 -3.5,5.34 -1.83,4.59 -6.12,7.95 -10.5,9.94 -2.67,1.02 -4.62,-2.49 -7.15,-0.61 -1.54,0.74 -0.64,3.49 -2.13,4.58 2.4,3.04 -0.04,7.53 -3.44,8.47 -3.38,-0.45 -3.01,4.07 -4.66,5.5 -2.16,0.47 -4.23,-0.33 -6.28,-0.91 -2.54,3.91 -0.46,8.53 0,12.63 -0.53,2.87 -4.66,1.74 -6.9,2.55 -3.16,0.27 -1.64,-5.68 -4.98,-5.22 -4.19,-0.72 -8.41,-2.46 -12.49,-0.42 -2.97,1.16 -6.84,1.23 -9.32,2.99 -0.59,1.48 -2.41,4.44 -0.69,5.28 3.02,-0.37 2.55,4.03 2.28,5.63 -2.37,0.86 0.17,4.18 -0.45,6.12 0.28,2.66 -0.27,5.78 1.89,7.78 -3.88,-0.85 0.14,3.73 1.52,4.58 0.84,1.94 3.96,0.92 3.59,3.64 1.27,2.88 0.6,5.62 -0.78,8.31 -2.26,2.93 -2.47,7.6 -2.42,11.23 1.24,2.27 4.6,0.89 6.75,1.12 2.16,0.04 4.75,-2.13 4.73,-4.03 -0.34,-2.04 2.18,-5.23 4.72,-3.63 1.87,0.74 5.34,1.32 4.23,-1.45 1.6,-1.24 -0.63,-7.5 -0.96,-4.79 0.79,2.49 -3.31,2.3 -3.52,0.13 -0.83,-1.56 -3.4,-4.82 -1.19,-6.09 3.07,-0.15 6.37,-1.05 9.34,-0.19 0.41,-2.46 4.94,-2.22 3.88,0.41 0.59,1.49 3.45,3.68 4.43,1.04 1.16,-1.1 4.96,-5.66 4.94,-1.88 -0.59,2.44 0.18,5.72 -1


media only screen and (min-width: 1176px) {
body {
    margin: 0 40px 0 40px;
}
}

/* TABLET STYLE */
@media only screen and (min-width: 768px) and (max-width: 991px) {
body {
    margin: 0 40px 0 40px;
}
}

/* MOBILE LAYOUT (PORTRAIT/320px) */
@media only screen and (max-width: 767px) {
body {
    margin: 0;
}
div.bodywrapper {
    margin: 0;
    width: 100%;
    border: none;
}
div.sphinxsidebar {
    display: none;
}
}

/* MOBILE LAYOUT (LANDSCAPE/480px) */
@media only screen and (min-width: 480px) and (max-width: 767px) {
body {
    margin: 0 20px 0 20px;
}
}

/* RETINA OVERRIDES */
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-device-pixel-ratio: 2) {
}

/* -- end ------------------------------------------------------------------- *//*! jQuery UI - v1.12.1 - 2016-09-14
* http://jqueryui.com
* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextur


//
// ClassDump By HuangBai Private
//  Copyright (C) 1997-2019 Steve Nygard. Updated HuangBai-2024
//

#import <ProtobufLite/WXPBGeneratedMessage.h>

@class DirectConnSet, NSMutableArray, RelayConnSet;

@interface VoipMultiRelayConnData : WXPBGeneratedMessage
{
    int activeConnIdSetMemoizedSerializedSize;
    int inactiveConnIdSetMemoizedSerializedSize;
}

+ (void)initialize;

// Remaining properties
@property(nonatomic) int activeConnCnt; // @dynamic activeConnCnt;
@property(retain, nonatomic) NSMutableArray *activeConnIdSet; // @dynamic activeConnIdSet;
@property(nonatomic) int connSetSeq; // @dynamic connSetSeq;
@property(retain, nonatomic) DirectConnSet *directConnSet; // @dynamic directConnSet;
@property(nonatomic) int inactiveConnCnt; // @dynamic inactiveConnCnt;
@property(retain, nonatomic) NSMutableArray *inactiveConnIdSet; // @dynamic inactiveConnIdSet;
@property(retain, nonatomic) RelayConnSet *redirectConnSet; // @dynamic redirectConnSet;
@property(retain, nonatomic) RelayConnSet *relayConnSet; // @dynamic relayConnSet;

@end


lr
_0208F11C:
	bne _0208F0E4
	cmp r0, #0
	bhi _0208F0E4
	cmn ip, r3, lsl #1
	blo _0208F0C8
_0208F130:
	bne _0208F0E4
	cmp r2, #0
	bhi _0208F0E4
	b _0208F0C8
	arm_func_end _deq

	; Other names: _d_fne
	arm_func_start _dneq
_dneq: ; 0x0208F140
	mov ip, #0x200000
	cmn ip, r1, lsl #1
	bhs _0208F1A8
	cmn ip, r3, lsl #1
	bhs _0208F1BC
_0208F154:
	orrs ip, r3, r1
	bmi _0208F184
	cmp r1, r3
	cmpeq r0, r2
	movne r0, #1
	moveq r0, #0
	bx lr
_0208F170:
	mov r0, #1
	mrs ip, cpsr
	bic ip, ip, #0x40000000
	msr cpsr_f, ip
	bx lr
_0208F184:
	orr ip, r0, ip, lsl #1
	orrs ip, ip, r2
	moveq r0, #0
	bxeq lr
	cmp r3, r1
	cmpeq r2, r0
	movne r0, #1
	moveq r0, #0
	bx lr
_0208F1A8:
	bne _0208F170
	cmp r0, #0
	bhi _0208F170
	cmn ip, r3, lsl #1
	blo _0208F154
_0208F1BC:
	bne _0208F170
	cmp r2, #0
	bhi _0208F170
	b _0208F154
	arm_func_end _dneq

	; Other names: _f_flt
	arm_func_start _fls
_fls: ; 0x0208F1CC
	mov r3, #0xff000000
	cmp r3, r0, lsl #1
	cmphs r3, r1, lsl #1
	blo _0208F214
	cmp r0, #0
	bicmi r0, r0, #0x80000000
	rsbmi r0, r0, #0
	cmp r1, #0
	bicmi r1, r1, #0x80000000
	rsbmi r1, r1, #0
	cmp r0, r1
	movlt r0, #1
	movge r0, #0
	mrs ip, cpsr
	orrge ip, ip, #0x20000000
	biclt ip, ip, #0x20000000
	msr cpsr_f, ip
	bx lr
_0208F214:
	mov r0, #0
	mrs ip, cpsr
	orr ip, ip, #0x20000000
	msr cpsr_f, ip
	bx lr
	arm_func_end _fls
_0208F228:
	.byte 0x01, 0x00, 0x20, 0xE0, 0x01, 0x10, 0x20, 0xE0
	.byte 0x01, 0x00, 0x20, 0xE0

	; Other names: _f_div
	arm_func_start _fdiv
_fdiv: ; 0x0208F234
	stmdb sp!, {lr}
	mov ip, #0xff
	ands r3, ip, r0, lsr #23
	cmpne r3, #0xff
	beq _0208F408
	ands ip, ip, r1, lsr #23
	cmpne ip, #0xff


(!Detector.webgl) {
        Detector.addGetWebGLMessage();
        document.getElementById('container').innerHTML = '';
    }

    // 全局变量

    // 绘图相关变量
    var container, stats;
    var camera, controls, scene, renderer;
    var textureLoader;
    var clock = new THREE.Clock();

    // 物理引擎相关变量
    var gravityConstant = -9.8;
    var collisionConfiguration;
    var dispatcher;
    var broadphase;
    var solver;
    var physicsWorld;
    var rigidBodies = [];
    var margin = 0.05;
    var transformAux1 = new Ammo.btTransform();

    //
    var time = 0;

    // 鼠标输入相关
    var mouseCoords = new THREE.Vector2();
    var raycaster = new THREE.Raycaster();
    var ballMaterial = new THREE.MeshPhongMaterial( { color: 0x202020 } );

    // - 主程序
    init();
    animate();

    // -函数定义
    function init() {
        initGraphics();

        initPhysics();

        createObjects();

        initInput();
    }

    function initGraphics() {
        // three.js基本场景配置
        container = document.getElementById('container');
        container.innerHTML = "";

        camera = new THREE.PerspectiveCamera(60, window.innerWidth/window.innerHeight, 0.1, 2000);
        camera.position.x = -7;
        camera.position.y = 5;
        camera.position.z = 8;

        controls = new THREE.OrbitControls(camera);
        controls.target.y = 2;

        renderer = new THREE.WebGLRenderer();
        renderer.setClearColor( 0xbfd1e5 );
        renderer.setPixelRatio(window.devicePixelRatio);
        renderer.setSize(window.innerWidth, window.innerHeight);
        renderer.shadowMap.enabled = true;

        textureLoader = new THREE.TextureLoader();

        // 场景
        scene = new THREE.Scene();

        // 环境光
        var ambientLight = new THREE.AmbientLight(0x404040);
        scene.add(ambientLight);

        // 线性光
        var light = new THREE.DirectionalLight(0xffffff, 1);
        light.position.set(-10, 10, 5);
        light.castShadow = true;
        var d = 10;
        light.shadow.camera.left = -d;
        light.shadow.camera.right = d;
        light.shadow.camera.top = d;
        light.shadow.camera.bottom = -d;

        light.shadow.camera.near = 2;
        light.shadow.camera.far = 2;

        light.shadow.mapSize.x = 1024;
        light.shadow.mapSize.y = 1024;

        scene.add(light);

        container.appendChild(renderer.domElement);

        // 显示帧数
        stats = new Stats();
        stats.domElement.style.position = 'absolute';
        stats.domElement.style.top = 'absolute';
        container.appendChild(stats.domElement);

        // 添加窗口大小变化监听
        window.addEventListener('resize', onWindowResize, false);

    }

    function onWindowResize() {
        camera.aspect = window.innerWidth / window.innerHeight;
        camera.updateProjectionMatrix();

        renderer.setSize( window.innerWidth, window.innerHeight );

    }

    function initPhysics() {
        // bullet基本场景配置
        collisionConfiguration = new Ammo.btDefaultCollisionConfiguration();
        dispatcher = new Ammo.btCollisionDispatcher(collisionConfiguration);
        broadphase = new Ammo.btDbvtBroadphase();
        solver = new Ammo.btSequentialImpulseConstraintSolver();
        physicsWorld = new Ammo.bt


:   store i[[SZ]] %{{.+}}, i[[SZ]]* [[CPADDR0]]

  // CHECK-DAG:   [[BPADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 1
  // CHECK-DAG:   [[PADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 1
  // CHECK-DAG:   [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]*
  // CHECK-DAG:   [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]*
  // CHECK-DAG:   store i[[SZ]] %{{.+}}, i[[SZ]]* [[CBPADDR1]]
  // CHECK-DAG:   store i[[SZ]] %{{.+}}, i[[SZ]]* [[CPADDR1]]
  // CHECK:       [[ERROR:%.+]] = icmp ne i32 [[RET]], 0
  // CHECK-NEXT:  br i1 [[ERROR]], label %[[FAIL:.+]], label %[[END:[^,]+]]
  // CHECK:       [[FAIL]]
  // CHECK:       call void [[HVT3:@.+]]({{[^,]+}}, {{[^,]+}})
  // CHECK-NEXT:  br label %[[END]]
  // CHECK:       [[END]]
  // CHECK-NEXT:  br label %[[IFEND:.+]]
  // CHECK:       [[IFELSE]]
  // CHECK:       call void [[HVT3]]({{[^,]+}}, {{[^,]+}})
  // CHECK-NEXT:  br label %[[IFEND]]
  // CHECK:       [[IFEND]]
  #pragma omp target teams distribute simd if(target: n>10)
  for (int i = 0; i < 10; ++i) {
    a += 1;
    aa += 1;
  }

  // We capture 3 VLA sizes in this target region
  // CHECK-64:       [[A_VAL:%.+]] = load i32, i32* %{{.+}},
  // CHECK-64:       [[A_ADDR:%.+]] = bitcast i[[SZ]]* [[A_CADDR:%.+]] to i32*
  // CHECK-64:       store i32 [[A_VAL]], i32* [[A_ADDR]],
  // CHECK-64:       [[A_CVAL:%.+]] = load i[[SZ]], i[[SZ]]* [[A_CADDR]],

  // CHECK-32:       [[A_VAL:%.+]] = load i32, i32* %{{.+}},
  // CHECK-32:       store i32 [[A_VAL]], i32* [[A_CADDR:%.+]],
  // CHECK-32:       [[A_CVAL:%.+]] = load i[[SZ]], i[[SZ]]* [[A_CADDR]],

  // CHECK:       [[IF:%.+]] = icmp sgt i32 {{[^,]+}}, 20
  // CHECK:       br i1 [[IF]], label %[[TRY:[^,]+]], label %[[FAIL:[^,]+]]
  // CHECK:       [[TRY]]
  // CHECK-64:    [[BNSIZE:%.+]] = mul nuw i64 [[VLA0:%.+]], 4
  // CHECK-32:    [[BNSZSIZE:%.+]] = mul nuw i32 [[VLA0:%.+]], 4
  // CHECK-32:    [[BNSIZE:%.+]] = sext i32 [[BNSZSIZE]] to i64
  // CHECK:       [[CNELEMSIZE2:%.+]] = mul nuw i[[SZ]] 5, [[VLA1:%.+]]
  // CHECK-64:    [[CNSIZE:%.+]] = mul nuw i64 [[CNELEMSIZE2]], 8
  // CHECK-32:    [[CNSZSIZE:%.+]] = mul nuw i32 [[CNELEMSIZE2]], 8
  // CHECK-32:    [[CNSIZE:%.+]] = sext


l");

        addButton(panel, FrontPanel.KEY_PLUS_MINUS, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_TIMER, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_UP, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_POWER, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight_off", "highlight_on"}}, false);
        addButton(panel, FrontPanel.KEY_FLASH, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_DOWN, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_LEFT, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_REC, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_DELETE, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_INFO, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_LIVEVIEW, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight_off", "highlight_on"}}, true);
        addButton(panel, FrontPanel.KEY_PLAY, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_MENU, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_ZOOM_OUT, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_ZOOM_IN, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_OK, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_I, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_RIGHT, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);
        addButton(panel, FrontPanel.KEY_AEL_AFL, bgWidth, bgHeight, new String[][]{{null, "on"}, {"highlight", "on"}}, true);

        addButton(panel, FrontPanel.KEY_SHUTTER, bgWidth, bgHeight, new String[][]{{null, "half", "on"}, {"highlight", "highlight_half", "on"}}, false);

        addButton(panel, FrontPanel.KEY_DIAL, bgWidth, bgHeight, new String[][]{{null, null}, {"highlight", "highlight"}}, true);
        addButton(panel, FrontPanel.KEY_MODEDIAL, bgWidth, bgHeight, new String[][]{{"0","1","2","3","4","5","6","7","8","9","10","11","12"}, {"0_highlight","1_highlight","2_highlight","3_highlight","4_highlight","5_highlight","6_highlight","7_highlight","8_highlight","9_highlight","10_highlight","11_highlight","12_highlight"}}, false);
//        addLed(panel, "led", bgWidth, bgHeight);

        frame.add(panel);
        frame.pack();

        frame.setLocation(0,100);
        frame.setVisible(true);
    }

    private static void addButton(JComponent parent, String imgPrefix, int width, int height, String[][] imageSuffixes, boolean isLeftClickTemp) {
        BitmapToggleButton button = new BitmapToggleButton(parent, IMG_DIR, imgPrefix, width, height, imageSuffixes, isLeft


	}
	if (success) {
		i.push('')
	}
	console.log(' ', ...i)
	console.log('')
}

const reportStep = (console: Console) => (
	result: StepResult,
	config: Config,
) => {
	const i = [' ']
	if (result.skipped) {
		i.push(chalk.gray(' ↷ '))
		i.push(chalk.gray(result.step.interpolatedText))
		i.push(chalk.magenta('(skipped)'))
	} else {
		if (result.success) {
			i.push(chalk.green(' ✔ '))
			i.push(chalk.yellow(result.step.interpolatedText))
			if (result.runTime !== undefined) {
				i.push(chalk.blue(`⏱ ${result.runTime}ms`))
			}
		} else {
			i.push(chalk.red.bold(' ❌ '))
			i.push(chalk.red.bold(result.step.interpolatedText))
		}
	}
	console.log(...i)
	if (result.step.interpolatedArgument !== undefined) {
		console.log(
			chalk.yellow.dim('   ▶ '),
			chalk.yellow.dim(
				result.step.interpolatedArgument.replace(/\n\s*/g, ' ').trimLeft(),
			),
		)
	}
	if (result.result !== undefined && config.printResults) {
		const results = [
			...(Array.isArray(result.result) ? result.result : [result.result]),
		]
		results.forEach((r) => {
			console.log(chalk.cyan('   ◀ '), chalk.cyan(JSON.stringify(r)))
		})
	}
	if (result.error) {
		if (
			result.error instanceof StepRunnerNotDefinedError &&
			result.error.step.interpolatedText !== result.error.step.text
		) {
			console.log(
				chalk.grey('   ▶'),
				chalk.grey(result.error.step.interpolatedText),
			)
		}
		console.error(
			' ',
			chalk.red.bold(' 🚨 '),
			chalk.yellow.bold('👆'),
			chalk.yellow(result.error.message),
		)
		if (result.error instanceof Chai.AssertionError) {
			console.log(
				chalk.green('   Expected:'),
				JSON.stringify((result.error as any).expected),
			)
			console.log(
				chalk.red.bold('   Actual:  '),
				JSON.stringify((result.error as any).actual),
			)
		}
	}
}

const reportSummary = (console: Console) => (result: RunResult) => {
	// Print failed scenario and Feature
	const featureReporter = reportFeature(console)
	const scenarioReporter = reportScenario(console)
	result.featureResults
		.filter(({ success }) => !success)
		.forEach((featureResult) => {
			const failedScenarios = featureResult.scenarioResults.filter(
				({ success }) => !success,
			)
			featureReporter(featureResult)
			failedScenarios.forEach(scenarioReporter)
		})

	// Print summary
	const features = result.featureResults.length
	const skippedFeatures = result.featureResults.reduce(
		(total, { feature }) => total + (feature.skip ? 1 : 0),
		0,
	)
	const failedFeatures = result.featureResults.reduce(
		(total, { success }) => total + (!success ? 1 : 0),
		0,
	)
	const scenarios = result.featureResults.reduce(
		(total, { scenarioResults }) => total + scenarioResults.length,
		0,
	)
	const skippedScenarios = result.featureResults.reduce(
		(total, { scenarioResults }) =>
			total + scenarioResults.filter(({ skipped }) => skipped).length,
		0,
	)
	const failedScenarios = result.featureResults.reduce(
		(total, { scenarioResults }) =>
			total + scenarioResults.filter(({ success }) => !success).length,
		0,
	)
	const passedFeatures = features - skippe


                                                     *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License version 2 for more details.                *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   version 2 along with this program; if not, write to the               *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#include "catrom3x.h"
#include <algorithm>

namespace {
enum { WIDTH  = VfilterInfo::IN_WIDTH };
enum { HEIGHT = VfilterInfo::IN_HEIGHT };
enum { PITCH  = WIDTH + 3 };

struct Colorsum {
	gambatte::uint_least32_t r, g, b;
};

static void merge_columns(gambatte::uint_least32_t *dest, const Colorsum *sums) {
	unsigned w = WIDTH;

	while (w--) {
		{
			gambatte::uint_least32_t rsum = sums[1].r;
			gambatte::uint_least32_t gsum = sums[1].g;
			gambatte::uint_least32_t bsum = sums[1].b;

			if (rsum & 0x80000000)
				rsum = 0;
			else if (rsum > 6869)
				rsum = 0xFF0000;
			else {
				rsum *= 607;
				rsum <<= 2;
				rsum += 0x008000;
				rsum &= 0xFF0000;
			}

			if (gsum & 0x80000000)
				gsum = 0;
			else if (gsum > 1758567)
				gsum = 0xFF00;
			else {
				gsum *= 607;
				gsum >>= 14;
				gsum += 0x000080;
				gsum &= 0x00FF00;
			}

			if (bsum & 0x80000000)
				bsum = 0;
			else if (bsum > 6869)
				bsum = 0xFF;
			else {
				bsum *= 607;
				bsum += 8192;
				bsum >>= 14;
			}

			/*rsum/=27;
			rsum<<=8;
			gsum/=27;
			gsum<<=5;
			bsum<<=4;
			bsum+=27;
			bsum/=54;
			rsum+=0x008000;
			gsum+=0x000080;

			if(rsum>0xFF0000) rsum=0xFF0000;
			if(gsum>0x00FF00) gsum=0x00FF00;
			if(bsum>0x0000FF) bsum=0x0000FF;*/

			*dest++ = rsum/*&0xFF0000*/ | gsum/*&0x00FF00*/ | bsum;
		}
		{
			gambatte::uint_least32_t rsum = sums[1].r * 21;
			gambatte::uint_least32_t gsum = sums[1].g * 21;
			gambatte::uint_least32_t bsum = sums[1].b * 21;

			rsum -= sums[0].r << 1;
			gsum -= sums[0].g << 1;
			bsum -= sums[0].b << 1;

			rsum += sums[2].r * 9;
			gsum += sums[2].g * 9;
			bsum += sums[2].b * 9;

			rsum -= sums[3].r;
			gsum -= sums[3].g;
			bsum -= sums[3].b;

			if (rsum & 0x80000000)
				rsum = 0;
			else if (rsum > 185578)
				rsum = 0xFF0000;
			else {
				rsum *= 719;
				rsum >>= 3;
				rsum += 0x008000;
				rsum &= 0xFF0000;
			}

			if (gsum & 0x80000000)
				gsum = 0;
			else if (gsum > 47508223)
				gsum = 0x00FF00;
			else {
				gsum >>= 8;
				gsum *= 719;
				gsum >>= 11;
				gsum += 0x000080;
				gsum &= 0x00FF00;
			}

			if (bsum & 0x80000000)
				bsum = 0;
			else if (bsum > 185578)
				bsum = 0x0000FF;
			else {
				bsum *= 719;
				bsum += 0x040000;
				bsum >>= 19;
			}

			/*rsum


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

package sds

import (
	"context"
	"encoding/json"
	"reflect"
	"testing"
	"time"

	envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
	"github.com/golang/protobuf/proto"
	"github.com/stretchr/testify/require"
	"mosn.io/mosn/pkg/config/v2"
	"mosn.io/mosn/pkg/log"
	"mosn.io/mosn/pkg/mtls/sds"
	"mosn.io/mosn/pkg/types"
)

func InitSdsSecertConfig(sdsUdsPath string) proto.Message {
	gRPCConfig := &envoy_api_v2_core.GrpcService_GoogleGrpc{
		TargetUri:  sdsUdsPath,
		StatPrefix: "sds-prefix",
		ChannelCredentials: &envoy_api_v2_core.GrpcService_GoogleGrpc_ChannelCredentials{
			CredentialSpecifier: &envoy_api_v2_core.GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials{
				LocalCredentials: &envoy_api_v2_core.GrpcService_GoogleGrpc_GoogleLocalCredentials{},
			},
		},
		CallCredentials: []*envoy_api_v2_core.GrpcService_GoogleGrpc_CallCredentials{
			{
				CredentialSpecifier: &envoy_api_v2_core.GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine{},
			},
		},
	}
	source := &envoy_api_v2_core.ConfigSource{
		ConfigSourceSpecifier: &envoy_api_v2_core.ConfigSource_ApiConfigSource{
			ApiConfigSource: &envoy_api_v2_core.ApiConfigSource{
				ApiType: envoy_api_v2_core.ApiConfigSource_GRPC,
				GrpcServices: []*envoy_api_v2_core.GrpcService{
					{
						TargetSpecifier: &envoy_api_v2_core.GrpcService_GoogleGrpc_{
							GoogleGrpc: gRPCConfig,
						},
					},
				},
			},
		},
	}

	return source

}

func Test_SdsClient(t *testing.T) {
	// init prepare
	sdsUdsPath := "/tmp/sds2"
	sds.SubscriberRetryPeriod = 500 * time.Millisecond
	defer func() {
		sds.SubscriberRetryPeriod = 3 * time.Second
	}()
	callback := 0
	sds.SetSdsPostCallback(func() {
		callback++
	})
	// mock sds server
	srv := InitMockSdsServer(sdsUdsPath, t)
	defer srv.Stop()
	config := InitSdsSecertConfig(sdsUdsPath)
	sdsClient := sds.NewSdsClientSingleton(config)
	defer sds.CloseSdsClient()

	// wait server start and stop makes reconnect
	time.Sleep(time.Second)
	srv.Stop()
	// wait server connection stop
	time.Sleep(time.Second)
	// send request
	updatedChan := make(chan int, 1) // do not block the update channel
	log.DefaultLogger.Infof("add update callback")

	t.Run("test add update callback", func(t *testing.T) {
		sdsClient.AddUpdateCallback("default", func(name string, secret *types.SdsSecret) {
			if name != "default" {
				t.Errorf("name should same with config.name")
			}
			log.DefaultLogger.Infof("update callback is called")
			updatedChan <- 1
		})
		time.Sleep(time.Second)
		go func() {
			err := srv.Start()
			if !srv.started {
				t.Fatalf("%s start error: %v", sdsUdsPath, err)
			}
		}()
		select {
		case <-updatedChan:


         return null
        }

    override fun checkConfiguration() {
        super.checkConfiguration()
        if (debuggerType == DebuggerType.Attach) {
            throw RuntimeConfigurationError("Unfortunately, attach debugger is no longer available. Please try remote debugger.")
        }

        val program = program
        if (program.isEmpty()) {
            throw RuntimeConfigurationError("Program doesn't exist.")
        }

        val workingDir = workingDir
        if (workingDir == null || !File(workingDir).exists()) {
            throw RuntimeConfigurationError("Working dir doesn't exist.")
        }
    }

    override fun createCommandLine() = GeneralCommandLine().withExePath(program)
            .withEnvironment(envs)
            .withParameters(*parametersArray)
            .withWorkDirectory(workingDir)
            .withCharset(Charset.forName(charset))
}
/*
 * Copyright (c) 2017. tangzx(love.tangzx@qq.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tang.intellij.lua.editor.formatter

import com.intellij.lang.ASTNode
import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiElement
import com.intellij.psi.impl.source.codeStyle.PreFormatProcessor
import com.intellij.util.DocumentUtil
import com.tang.intellij.lua.psi.LuaPsiFile
import com.tang.intellij.lua.psi.LuaTypes
import com.tang.intellij.lua.psi.LuaVisitor

/**
 * 移除不用的 ;,
 * Created by tangzx on 2017/7/8.
 */
class LuaPreFormatProcessor : PreFormatProcessor {
    override fun process(astNode: ASTNode, sourceRange: TextRange): TextRange {
        var range = sourceRange
        val psi = astNode.psi
        if (psi.containingFile is LuaPsiFile) {
            val list = mutableListOf<Pair<Int, Boolean>>()
            psi.accept(object : LuaVisitor() {
                override fun visitElement(o: PsiElement) {
                    if (o.node.elementType == LuaTypes.SEMI) {
                        val nextSibling = o.nextSibling
                        var replaceWithSpace = false
                        if (nextSibling != null) {
                            if (nextSibling.node.startOffset == o.node.startOffset + 1) {
                                replaceWithSpace = true
                            }
                        }
                        list.add(Pair(o.node.startOffset, replaceWithSpace))
                    } else o.acceptChildren(this)
                }
            })

            val psiDocumentManager = PsiDocumentManager.getInstance(psi.project)
            val document = psiDocumentManager.getDocument(psi.containingFile)
            document ?: return range
            DocumentUtil.executeInBulk(document, true) {
                psiDocumentManager.doPostponedOperationsAndUnblockDocument(document)

                var removed = 0
                list.forEach {
                    if (it.second) {
                        document.replaceString(it.first, it.first + 1, " ")
                    } else {
                        document.deleteString(it.first, it.first + 1)
                        removed++
                    }
                }

                psiDocumentManager.commitDocument(document)

                range = TextRange(sourceRange.startOffset, sourceRange.length - removed)
            }

        }
        return range
    }
}/*
 * Copyright (c) 2017. tangzx(love.tangzx@qq.com)


anlineDest;
// symbol = uint16* ppu_workingPalette

// r0 - r3 = scratch

    .global _RenderScanlineBufferWide1_ASM
    .text; .align 4
_RenderScanlineBufferWide1_ASM:
	// r2 = ppu_workingPalette
	mov.l .WorkingPalette, r2
	mov.l @r2, r2

	// loop
	bra _DoRenderWide1
	mov #30,r3

_DoRenderAgainWide1:
	add #24,r5
_DoRenderWide1:

	// r0 = ppu_workingPalette[scanlineSrc[x]]
	mov.b @r4+,r0		// r0 = *scanlineSrc++
	mov.w @(r0,r2),r0	// r0 = ppu_workingPalette[*scanlineSrc]
	mov.w r0,@r5		// scanlineDest = r0

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(2,r5)
	mov.w r0,@(4,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(6,r5)
	mov.w r0,@(8,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(10,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(12,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(14,r5)
	mov.w r0,@(16,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(18,r5)
	mov.w r0,@(20,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0

	dt r3
	bf/s _DoRenderAgainWide1
	mov.w r0,@(22,r5)

	rts
	nop

    .global _RenderScanlineBufferWide2_ASM
    .text; .align 4
_RenderScanlineBufferWide2_ASM:
	// r2 = ppu_workingPalette
	mov.l .WorkingPalette, r2
	mov.l @r2, r2

	// loop
	bra _DoRenderWide2
	mov #30,r3

_DoRenderAgainWide2:
	add #24,r5
_DoRenderWide2:
	// r0 = ppu_workingPalette[scanlineSrc[x]]
	mov.b @r4+,r0		// r0 = *scanlineSrc++
	mov.w @(r0,r2),r0	// r0 = ppu_workingPalette[*scanlineSrc]
	mov.w r0,@r5		// scanlineDest = r0
	mov.w r0,@(2,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(4,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(6,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(8,r5)
	mov.w r0,@(10,r5)

	mov.b @r4+,r0
	mov.w @(r0,r2),r0
	mov.w r0,@(12,r5)
	mov.w r0,@(14,r5)

	mov.b @r


de l'opérateur se connecte) ou acceptés de la part de ces derniers.

Ces politiques présentent des composants individuels, évalués de manière séquentielle. Le résultat final aboutira soit à l'annonce d'un préfixe donné soit à l'absence d'annonce de ce dernier. Une modification de la politique peut entraîner l'absence d'annonce d'un préfixe précédemment annoncé, auquel cas ce dernier est retiré de la table de routage et les adresses IP qui en dépendent ne seront plus joignables sur Internet.

En déployant une modification de nos politiques d'annonce des préfixes, une réorganisation des termes nous a conduits à retirer un sous-ensemble de préfixes essentiel.

Du fait de ce retrait, les techniciens de Cloudflare ont rencontré des difficultés supplémentaires pour joindre les emplacements concernés afin d'annuler la modification problématique. Nous disposons de procédures de secours conçues pour traiter de tels événements et y avons eu recours pour prendre le contrôle des points d'implantation affectés.

3 h 56 : déploiement de la modification dans le premier point d'implantation. Aucun de nos points d'implantation n'est affecté par la modification, car ces derniers utilisent notre ancienne architecture.
6 h 17 : la modification est déployée dans nos points d'implantation les plus fréquentés, mais pas ceux qui disposent de la nouvelle architecture.
6 h 27 : le déploiement a atteint nos points d'implantation les plus fréquentés et disposant de la nouvelle architecture. La modification est déployée vers les troncs. C'est à ce moment que l'incident a débuté, car la modification a rapidement mis hors ligne ces 19 points d'implantation.
6 h 32 : déclaration de l'incident Cloudflare en interne.
6 h 51 : première modification effectuée sur un routeur pour vérifier la possibilité d'une cause fondamentale.
6 h 58 : cause fondamentale trouvée et comprise. Les travaux d'annulation de la modification problématique commencent.
7 h 42 : finalisation de la dernière annulation. Celle-ci a pris du retard, car les modifications apportées par les techniciens réseau se sont chevauchées les unes les autres. Ces derniers annulaient ainsi les annulations effectuées précédemment et le problème initial réapparaissait de manière sporadique.
9 h : fin de l'incident.

Le caractère critique de ces datacenters apparaît clairement dans le nombre de requêtes fructueuses que nous avons renvoyées à l'échelle du monde entier :

Ces points d'implantation ne constituent qu'un petit pourcentage de l'ensemble de notre réseau (4 %), mais ils ont affecté 50 % de notre nombre total de requêtes. Nous p


java.lang.String localPart)

constructor

Parameters:
namespace - namespace of element
localPart - local name

MessageElement

public MessageElement(java.lang.String localPart,
                      java.lang.String prefix,
                      java.lang.String namespace)

constructor. Automatically adds a namespace-prefix mapping to the mapping table

Parameters:
localPart - local name
prefix - prefix
namespace - namespace

MessageElement

public MessageElement(Name eltName)

construct using a Name implementation,

Parameters:
eltName -
See Also:
MessageElement(String, String, String)

MessageElement

public MessageElement(java.lang.String namespace,
                      java.lang.String localPart,
                      java.lang.Object value)

constructor binding the internal object value field to the
 value parameter

Parameters:
namespace - namespace of the element
localPart - local name
value - value of the node

MessageElement

public MessageElement(QName name)

constructor declaring the qualified name of the node

Parameters:
name - naming information

MessageElement

public MessageElement(QName name,
                      java.lang.Object value)

constructor declaring the qualified name of the node


;
            image = custom.image_name(target, metadata);
        }
    }
    Ok(image)
}

pub(crate) fn image_name(config: &Config, target: &Target) -> Result<String> {
    if let Some(image) = config.image(target)? {
        return Ok(image);
    }

    if !DOCKER_IMAGES.contains(&target.triple()) {
        eyre::bail!(
            "`cross` does not provide a Docker image for target {target}, \
               specify a custom image in `Cross.toml`."
        );
    }

    let version = if include_str!(concat!(env!("OUT_DIR"), "/commit-info.txt")).is_empty() {
        env!("CARGO_PKG_VERSION")
    } else {
        "main"
    };

    Ok(format!("{CROSS_IMAGE}/{target}:{version}"))
}

fn docker_read_mount_paths(engine: &Engine) -> Result<Vec<MountDetail>> {
    let hostname = env::var("HOSTNAME").wrap_err("HOSTNAME environment variable not found")?;

    let mut docker: Command = {
        let mut command = subcommand(engine, "inspect");
        command.arg(hostname);
        command
    };

    let output = docker.run_and_get_stdout(false)?;
    let info = serde_json::from_str(&output).wrap_err("failed to parse docker inspect output")?;
    dockerinfo_parse_mounts(&info)
}

fn dockerinfo_parse_mounts(info: &serde_json::Value) -> Result<Vec<MountDetail>> {
    let mut mounts = dockerinfo_parse_user_mounts(info);
    let root_info = dockerinfo_parse_root_mount_path(info)?;
    mounts.push(root_info);
    Ok(mounts)
}

fn dockerinfo_parse_root_mount_path(info: &serde_json::Value) -> Result<MountDetail> {
    let driver_name = info
        .pointer("/0/GraphDriver/Name")
        .and_then(|v| v.as_str())
        .ok_or_else(|| eyre::eyre!("no driver name found"))?;

    if driver_name == "overlay2" {
        let path = info
            .pointer("/0/GraphDriver/Data/MergedDir")
            .and_then(|v| v.as_str())
            .ok_or_else(|| eyre::eyre!("No merge directory found"))?;

        Ok(MountDetail {
            source: PathBuf::from(&path),
            destination: PathBuf::from("/"),
        })
    } else {
        eyre::bail!("want driver overlay2, got {driver_name}")
    }
}

fn dockerinfo_parse_user_mounts(info: &serde_json::Value) -> Vec<MountDetail> {
    info.pointer("/0/Mounts")
        .and_then(|v| v.as_array())
        .map(|v| {
            let make_path = |v: &serde_json::Value| PathBuf::from(&v.as_str().unwrap());
            let mut mounts = vec![];
            for details in v {
                let source = make_path(&details["Source"]);
                let destination = make_path(&details["Destination"]);
                mounts.push(MountDetail {
                    source,
                    destination,
                });
            }
            mounts
        })
        .unwrap_or_else(Vec::new)
}

#[derive(Debug, Default)]
struct MountFinder {
    mounts: Vec<MountDetail>,
}

#[derive(Debug, Clone, PartialEq, Eq)]
struct MountDetail {
    source: PathBuf,
    destination: PathBuf,
}

impl MountFinder {
    fn new(mounts: Vec<MountDetail>) -> MountFinder {
        // sort by length (reverse), to give mounts with more path components a higher priority;
        let mut mounts = mounts;
        mounts.sort_by(|a, b| {
            let la = a.destination.as_os_str().len();
            let lb = b.destination.as_os_str().len();
            la.


margin-bottom:0;vertical-align:inherit}#topnav1 .navigation-menu>li>a:after{position:absolute;right:15px}#topnav1 .navigation-menu>li .submenu{display:none;list-style:none;padding-left:20px;margin:0}#topnav1 .navigation-menu>li .submenu li a{display:block;position:relative;padding:7px 20px;color:#1a1a1a}#topnav1 .navigation-menu>li .submenu li a:hover{color:#6c2bd4}#topnav1 .navigation-menu>li .submenu li.has-submenu>a:after{content:"\F140";font-family:"Material Design Icons";position:absolute;right:30px}#topnav1 .navigation-menu>li .submenu.open{display:block}#topnav1 .navigation-menu>li .submenu .submenu{display:none;list-style:none}#topnav1 .navigation-menu>li .submenu .submenu.open{display:block}#topnav1 .navigation-menu>li .submenu.megamenu>li>ul{list-style:none;padding-left:0}#topnav1 .navigation-menu>li .submenu.megamenu>li>ul>li>span{display:block;position:relative;padding:15px;text-transform:uppercase;font-size:11px;letter-spacing:2px;color:#435966}#topnav1 .has-submenu.active a,#topnav1 .has-submenu.active a i,#topnav1 .has-submenu.active a:active,#topnav1 .has-submenu.active a:focus,#topnav1 .navigation-menu>li.has-submenu.open>a{color:#6c2bd4}#topnav1 .navbar-header{float:left}#navigation1{position:absolute;top:62px;left:0;width:100%;display:none;height:auto;padding-bottom:0;overflow:auto;border-top:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;background-color:#fff}#navigation1.open{display:block;overflow-y:auto}}@media (min-width:768px){#topnav1 .navigation-menu>li.has-submenu:hover>.submenu{visibility:visible;opacity:1;margin-top:0}#topnav1 .navigation-menu>li.has-submenu:hover>.submenu>li.has-submenu:hover>.submenu{visibility:visible;opacity:1;margin-left:0;margin-right:0}.navbar-toggle{display:block}}#topnav2{right:0;left:0;top:0;width:100%;border:0;-webkit-transition:all .5s ease;transition:all .5s ease}#topnav2 .has-submenu.active a,#topnav2 .has-submenu.active a i{color:#fff}#topnav2 .has-submenu.active .submenu li.active>a{color:#6c2bd4}#topnav2 .topbar-main .logo{color:#fff!important;font-size:20px;letter-spacing:1px;float:left}#topnav2 .topbar-main .logo-small{display:none}#topnav2 .topbar-main .badge-topbar{position:absolute;top:7px;right:7px;z-index:99}#topnav2 .topbar-main .nav>li>a{height:36px;width:36px;padding:0;font-size:24px;line-height:35px;text-align:center;border-radius:50%;margin:12px 8px;color:rgba(255,255,255,.7)}#topnav2 .topbar-main .dropdown-menu-lg .list-group,#topnav2 .topbar-main .dropdown-menu-lg .media-heading{margin-bottom:0}#topnav2 .topbar-main .nav>li>a:focus,#topnav2 .topbar-main .nav>li>a:hover{background-color:rgba(67,89,102,.1);color:#435966}#topnav2 .topbar-main .dropdown-menu-lg .list-


		// rax = rax * 16 ; number of values
	leaq	(AO, %rax, SIZE), AO
	leaq	(BO, BI, SIZE), BO
	negq	BI
	negq	%rax
	ALIGN_4

.L2_12:

	prefetcht0      B_PR1(BO,BI,8)
	KERNEL16x2_1
	KERNEL16x2_2
	KERNEL16x2_3
	KERNEL16x2_4

	prefetcht0      B_PR1(BO,BI,8)
	KERNEL16x2_1
	KERNEL16x2_2
	KERNEL16x2_3
	KERNEL16x2_4

	je	.L2_16

	prefetcht0      B_PR1(BO,BI,8)
	KERNEL16x2_1
	KERNEL16x2_2
	KERNEL16x2_3
	KERNEL16x2_4

	prefetcht0      B_PR1(BO,BI,8)
	KERNEL16x2_1
	KERNEL16x2_2
	KERNEL16x2_3
	KERNEL16x2_4

	je	.L2_16

	jmp	.L2_12
	ALIGN_4

.L2_16:
#ifndef TRMMKERNEL
        movq    K, %rax
#else
        movq    KKK, %rax
#endif

	andq	$7, %rax		# if (k & 1)
	je .L2_19

	movq    %rax, BI                        //  Index for BO
        leaq    (BI,BI,1), BI                   //  BI = BI * 2 ; number of values

	salq	$4, %rax			// rax = rax * 16 ; number of values
	leaq	(AO, %rax, SIZE), AO
	leaq	(BO, BI, SIZE), BO
	negq	BI
	negq	%rax
	ALIGN_4

.L2_17:

	KERNEL16x2_SUB

	jl	.L2_17
	ALIGN_4

.L2_19:

	SAVE16x2

#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
        movq    K, %rax
        subq    KKK, %rax
        movq    %rax, BI                        //  Index for BO
        leaq    (BI,BI,1), BI                   //  BI = BI * 2 ; number of values
        leaq    (BO, BI, SIZE), BO
        salq    $4, %rax                        // rax = rax * 16 ; number of values
        leaq    (AO, %rax, SIZE), AO
#endif

#if defined(TRMMKERNEL) && defined(LEFT)
        addq    $16, KK
#endif

	addq	$16 * SIZE, CO1		# coffset += 16
	decq	I			# i --
	jg	.L2_11
	ALIGN_4

/**************************************************************************
* Rest of M
***************************************************************************/
.L2_20:
	// Test rest of M

	testq	$15, M
	jz	.L2_60		// to next 3 lines of N

	testq	$8, M
	jz	.L2_21pre
	ALIGN_4

/**************************************************************************/

.L2_20_1:
#if !defined(TRMMKERNEL) || \
        (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
        (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
        leaq    BUFFER1, BO             // first buffer to BO
        addq    $4 * SIZE, BO
#else
        movq    KK, %rax
        leaq    BUFFER1, BO             // first buffer to BO


device)\\n            with amp.autocast():\\n                    logits_hvflip = self.model(image_tensor_hvflip)\\n            # Reverse both flips on logits\\n            all_logits.append(torch.flip(torch.flip(logits_hvflip, dims=[3]), dims=[2]))\\n\\n            # Average the logits from all augmented predictions\\n            averaged_logits = torch.mean(torch.stack(all_logits), dim=0)\\n\\n            # Get class with highest probability for each pixel\\n            predicted_mask = torch.argmax(averaged_logits, dim=1).squeeze(0)\\n\\n            # Convert to NumPy array and adjust to 1-indexed class IDs (0-indexed to 1-indexed)\\n            pred_mask_np = predicted_mask.cpu().numpy() + 1\\n\\n        return pred_mask_np\\n\\n# Initialize and train the model\\nmodel = SemanticSegmentationModel()\\nmodel.train_model(training_data_paths)",
  "new_index": 203,
  "new_code": "# TODO:  1. Feel free to pip install and import any useful libraries within the\\n#  rewrite cell.\\n\\nimport torch\\nimport torch.nn as nn\\nimport torch.optim as optim\\nfrom torch.optim import lr_scheduler\\nfrom torch.utils.data import Dataset, DataLoader\\nimport segmentation_models_pytorch as smp\\nimport numpy as np\\nfrom PIL import Image\\nimport os\\nimport albumentations as A\\nfrom albumentations.pytorch import ToTensorV2\\nfrom torch.cuda import amp # Import for mixed precision\\n\\n# Constants for model training\\nNUM_CLASSES = 17\\nIMG_SIZE = 256 # DLRSD images are 256x256\\nBATCH_SIZE = 16 # Adjust based on GPU memory\\nLEARNING_RATE = 1e-4\\nEPOCHS = 100 # Increased epochs to allow for more convergence\\n\\n# Device configuration (CUDA if available, else CPU)\\ndevice = torch.device(\\"cuda\\" if torch.cuda.is_available() else \\"cpu\\")\\n\\n# Custom Dataset Class\\nclass DLRSDDataset(Dataset):\\n    def __init__(self, data_paths, transform=None):\\n        self.data_paths = data_paths\\n        self.transform = transform\\n\\n    def __len__(self):\\n        return len(self.data_paths)\\n\\n    def __getitem__(self, idx):\\n        image_path, label_path = self.data_paths[idx]\\n\\n        # Load image and ensure 3 channels (RGB)\\n        image = np.array(Image.open(image_path).convert(\\"RGB\\"))\\n        \\n        # Load label mask. Labels are 1-indexed (1 to 17) in the dataset.\\n        # PyTorch's CrossEntropyLoss expects 0-indexed targets (0 to 16).\\n        label_mask = np.array(Image.open(label_path), dtype=np.int64) - 1\\n\\n        if self.transform:\\n            # Albumentations expects images as HWC and masks as HW\\n            transformed = self.transform(image=image, mask=label_mask)\\n            image = transformed[\\"image\\"]\\n            label_mask = transformed[\\"mask\\"]\\n\\n        return image, label_mask\\n\\n# Define transformation pipelines for training and validation\\ntrain_transform = A.Compose([\\n    A.Resize(IMG_SIZE, IMG_SIZE),\\n    A.HorizontalFlip(p=0.5),\\n    A.VerticalFlip(p=0.5),\\n    A.ShiftScaleRotate(shift_limit=0.03, scale_limit=0.03, rotate_limit=10, p=0.5),\\n    A.RandomBrightnessContrast(brightness_limit=0.2, contrast_limit=0.2, p=0.5),\\n    # Normalize with ImageNet stats (common for pre-trained models)\\n    A.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),\


kill any that still have ItemIndex of -1.
        // Mark everything in the canvas as a candidate for removal.
        foreach (View item in this.scrollView.Canvas)
            if (item is ListItemZero listItem)
                listItem.ItemIndex = -1;

        // For each item that should be visible,
        // get an existing ListViewItem from the canvas
        // if there isn't one, get one from the cache
        // if there isn't one, create one and set it up.
        for (int c = firstVisibleIndex; c <= lastVisibleIndex; c++)
        {
            ListItemZero listItem = GetViewForBindingContextFromCanvas(ItemsSource[c]);
            if (listItem == null)
            {
                listItem = GetView(ItemsSource[c]);
                //listItem is either newly created or retrieved from the cache.
                // SMELL: BindingContext should already be unset, so no need to null. The TreeNodeSpacer needs this for some reason. Fix the TreeNodeSpacer.
                listItem.BindingContext = null;
                // set IsSelected *before* it gets a BindingContext, i.e. before adding to the canvas.
                listItem.IsSelected = SelectedItems.Contains(ItemsSource[c]);
                listItem.IsPrimary = ItemsSource[c] == SelectedItem;

                // SMELL: canvas will provide a BC, so we should set BC first. The TreeNodeSpacer needs this for some reason. Fix the TreeNodeSpacer.
                this.scrollView.Canvas.Add(listItem);
                listItem.BindingContext = ItemsSource[c];
            }
            listItem.ItemIndex = c;
        }

        _killList.Clear();

        foreach (View item in this.scrollView.Canvas)
            if (item is ListItemZero listItem)
                if (listItem.ItemIndex == -1)
                    _killList.Add(listItem);

        foreach (ListItemZero item in _killList)
        {
            //item.BindingContext = null;
            this.scrollView.Canvas.Remove(item);
            item.ClearValue(ListItemZero.BindingContextProperty);
            item.IsSelected = false;
            item.IsPrimary = false;
            _cache.PushToBucket(item.ItemTemplate, item);
        }

        foreach (object item in this.scrollView.Canvas)
        {
            if (item is ListItemZero listItem)
            {
                // Determine offset for item.
                double itemOffset = listItem.ItemIndex * ItemHeight - adjustedScrollOffset;
                //double itemOffset = listItem.ItemIndex * ItemHeight - scrollView.ScrollY;
                listItem.BindingContext = ItemsSource[listItem.ItemIndex];
                listItem.TranslationY = itemOffset;
                listItem.WidthRequest = this.Wid


thenReturn("")
        `when`(aiDisclosureMockPartial.fundingForAiAttribution).thenReturn(false)
        `when`(aiDisclosureMockPartial.generatedByAiConsent).thenReturn("Some more text here")
        val aiDisclosure1 = aiDisclosureTransformer(aiDisclosureGraph = aiDisclosureMockPartial)

        assertTrue(aiDisclosure1.id == -1L)
        assertFalse(aiDisclosure1.fundingForAiAttribution)
        assertFalse(aiDisclosure1.fundingForAiConsent)
        assertFalse(aiDisclosure1.fundingForAiOption)

        assertEquals(aiDisclosure1.generatedByAiConsent, "Some more text here")
        assertEquals(aiDisclosure1.generatedByAiDetails, "")
        assertEquals(aiDisclosure1.otherAiDetails, "")
    }

    @Test
    fun testUserTransformer() {
        val userFragment = mock(User::class.java)
        `when`(userFragment.id).thenReturn("VXNlci0yMzc5NjEyNDM=")
        `when`(userFragment.name).thenReturn("Brotherwise Games")
        `when`(userFragment.imageUrl).thenReturn("https://ksr-qa-ugc.imgix.net/assets/005/791/327/f120c4cfe49495849b526b2cc6da44f9_original.png")
        `when`(userFragment.isCreator).thenReturn(true)
        `when`(userFragment.chosenCurrency).thenReturn(null)

        val user = userTransformer(userFragment)
        assertTrue(user.id() == 237961243L)
        assertTrue(user.name() == "Brotherwise Games")
        assertTrue(user.avatar().medium() == "https://ksr-qa-ugc.imgix.net/assets/005/791/327/f120c4cfe49495849b526b2cc6da44f9_original.png")
    }

    @Test
    fun testUserPrivacyTransformer() {
        val userPrivacyQuery = mock(UserPrivacyQuery.Me::class.java)
        `when`(userPrivacyQuery.name).thenReturn("Brotherwise Games")
        `when`(userPrivacyQuery.email).thenReturn("hello@kickstarter.com")
        `when`(userPrivacyQuery.hasPassword).thenReturn(true)
        `when`(userPrivacyQuery.isCreator).thenReturn(true)
        `when`(userPrivacyQuery.isDeliverable).thenReturn(true)
        `when`(userPrivacyQuery.isEmailVerified).thenReturn(true)
        `when`(userPrivacyQuery.chosenCurrency).thenReturn(null)

        val userPrivacy = userPrivacyTransformer(userPrivacyQuery)
        assertTrue(userPrivacy.name == "Brotherwise Games")
        assertTrue(userPrivacy.email == "hello@kickstarter.com")
        assertTrue(userPrivacy.hasPassword)
        assertTrue(userPrivacy.isCreator)
        assertTrue(userPrivacy.isDeliverable)
        assertTrue(userPrivacy.chosenCurrency == "USD")
    }

    @Test
    fun testUpdateTransformer() {
        val post = mock(com.kickstarter.fragment.Post::class.java)
        `when`(post.id).thenReturn("VXNlci0yMzc5NjEyNDM=")
        `when`(post.title).thenReturn("Updated Add-on list")
        `when`(post.isPublic).thenReturn(true)
        `when`(post.isVisible).thenReturn(true)
        `when`(post.isLiked).thenReturn(true)
        `when`(post.number).thenReturn(5)

        val date = DateTime.now().plusMillis(300)
        `when`(post.publishedAt).thenReturn(date)
        `when`(post.updatedAt).thenReturn(date)

        val user = updateTransformer(post)
        assertTrue(user.id() == 237961243L)
        assertTrue(user.projectId() == -1L)
        assertTrue(user.title() == "Updated Add-


            RDI -> rdi
            R8 -> r8
            R9 -> r9
            R10 -> r10
            R11 -> r11
            R12 -> r12
            R13 -> r13
            R14 -> r14
            R15 -> r15
            RIP -> rip
            NONE -> none64
        }
        else -> error("Unknown register id: $reg")
    }

    val rax  = GPRQW(RAX.n64, RAX.index, 0)
    val rcx  = GPRQW(RCX.n64, RCX.index, 1)
    val rdx  = GPRQW(RDX.n64, RDX.index, 2)
    val rbx  = GPRQW(RBX.n64, RBX.index, 3)
    val rsp  = GPRQW(RSP.n64, RSP.index, 4)
    val rbp  = GPRQW(RBP.n64, RBP.index, 5)
    val rsi  = GPRQW(RSI.n64, RSI.index, 6)
    val rdi  = GPRQW(RDI.n64, RDI.index, 7)
    val r8  = GPRQW(R8.n64, R8.index, 8)
    val r9  = GPRQW(R9.n64, R9.index, 9)
    val r10  = GPRQW(R10.n64, R10.index, 10)
    val r11  = GPRQW(R11.n64, R11.index, 11)
    val r12  = GPRQW(R12.n64, R12.index, 12)
    val r13  = GPRQW(R13.n64, R13.index, 13)
    val r14  = GPRQW(R14.n64, R14.index, 14)
    val r15  = GPRQW(R15.n64, R15.index, 15)
    val rip  = GPRQW(RIP.n64, RIP.index, 16, 0xFFF0u)

    val eax  = GPRDW(RAX.n32, RAX.index, 18)
    val ecx  = GPRDW(RCX.n32, RCX.index, 19)
    val edx  = GPRDW(RDX.n32, RDX.index, 20)
    val ebx  = GPRDW(RBX.n32, RBX.index, 21)
    val esp  = GPRDW(RSP.n32, RSP.index, 22)
    val ebp  = GPRDW(RBP.n32, RBP.index, 23)
    val esi  = GPRDW(RSI.n32, RSI.index, 24)
    val edi  = GPRDW(RDI.n32, RDI.index, 25)
    val r8d  = GPRDW(R8.n32, R8.index, 26)
    val r9d  = GPRDW(R9.n32, R9.index, 27)
    val r10d  = GPRDW(R10.n32, R10.index, 28)
    val r11d  = GPRDW(R11.n32, R11.index, 29)
    val r12d  = GPRDW(R12.n32, R12.index, 30)
    val r13d  = GPRDW(R13.n32, R13.index, 31)
    val r14d  = GPRDW(R14.n32, R14.index, 32)
    val r15d  = GPRDW(R15.n32, R15.index, 33)
    val eip  = GPRDW(RIP.n32, RIP.index, 34)

    val ax  = GPRW(RAX.n16, RAX.index, 35)
    val cx  = GPRW(RCX.n16, RCX.index, 36)
    val dx  = GPRW(RDX.n16, RDX.index, 37)
    val bx  = GPRW(RBX.n16, RBX.index, 38)
    val sp  = GPRW(RSP.n16, RSP.index, 39)
    val bp  = GPRW


ug!(
							target: "dummy-subsystem",
							"Discarding a message sent from overseer {:?}",
							overseer_msg
						);
						continue;
					}
				}
			}
		});

		SpawnedSubsystem {
			name: "dummy-subsystem",
			future,
		}
	}
}
<filename>editor/src/components/window/workspace.rs
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::imp::EchidnaEditor;
use gio::Cancellable;
use gio::{File, FileQueryInfoFlags, FileType, SimpleAction};
use glib::clone;
use glib::subclass::types::ObjectSubclassExt;
use glib::types::Type;
use gtk::prelude::*;
use gtk::{ApplicationWindow, FileChooserAction, FileChooserNative, ResponseType, TreeStore};
use relative_path::RelativePath;
use serde::{Deserialize, Serialize};
use std::path::Path;

#[derive(Deserialize, Serialize)]
struct MonacoFolder {
    path: String,
}

#[derive(Deserialize, Serialize)]
struct MonacoWorkspace {
    folders: Vec<MonacoFolder>,
}

trait WorkspaceImplementedEditor {
    fn action_open_workspace(
        &self,
        window: ApplicationWindow,
        app: super::EchidnaEditor,
        _action: &SimpleAction,
        _variant: Option<&glib::Variant>,
    );

    fn open_workspace(&self, file: File);
    fn recursive_add_files_into_tree_store(&self, parent_file: File, tree: &TreeStore);
    fn open_folder(&self, file: File);
}

impl WorkspaceImplementedEditor for EchidnaEditor {
    fn action_open_workspace(
        &self,
        window: ApplicationWindow,
        app: super::EchidnaEditor,
        _action: &SimpleAction,
        _variant: Option<&glib::Variant>,
    ) {
        let dialog = FileChooserNative::new(
            Some("Open a file"),
            Some(&window),
            FileChooserAction::Open,
            Some("Open"),
            Some("Cancel"),
        );
        dialog.set_visible(true);
        dialog.connect_response(clone!(@weak window, @weak app =>
            move |dialog, response| {
                if response == ResponseType::Accept {
                    let file_option = dialog.file();
                    match file_option {
                        Some(file) => {
                            dialog.destroy();
                            Self::from_instance(&app).open_workspace(file);
                        },
                        None => {}
                    }
                } else if response == ResponseType::Cancel {
                    dialog.destroy();
                }
            }
        ));
    }
    /**
     *   __Open Workspace__
     *
     *   Basically, this is just the same as Open Folder, but it's many folders.
     *
     *   - Open a FileChooserNative, set to only view .code-workspace files.
     *   - If the user pressed cancel, destroy the dialog. If the user opened a .code-workspace file:
     *   - Get the workspace file, load and parse its content, .code-workspace files are in JSON with comments. But JSON only should be fine, for now.
     *   - Iterate over folders listed in the workspace file.
     *   - Find the absolute path of the folder: Relative to the workspace file.
     *   - Create a GFile instance of that path, and call open_folder(file: File) and pass the GFile instance to it.
     *
     */
    fn open_workspace(&self,


備：アプリ作成

ここでは既定の kintone 一覧画面のヘッダーメニュースペースに Button コンポーネントを配置します。

まず kintone UI Component を設置するアプリを用意します。

1. 空のアプリを作成します。（[アプリをはじめから作成する](https://jp.cybozu.help/k/ja/user/create_app/tutorial.html)）

特にフィールドの設置は必要ありません。

## 導入と実装方法

kintone UI Component では UMD と CDN と npm パッケージを用意しています。

ブラウザ環境や Node.js 環境など開発環境に合わせていずれかを選択して読み込み、実装してください。

本記事では、それぞれの導入・実装方法を紹介します。

:::tip
各コンポーネントのリファレンスについてはサイドバーの Components カテゴリよりご確認ください。

（順次対応コンポーネントも追加予定です。）
:::

### UMD を利用する

1. kintone UI Component リポジトリ内の[各バージョン Release 欄](https://github.com/kintone-labs/kintone-ui-component/releases)に添付のアーカイブフォルダ（kintone-ui-component-\{version\}.tgz）を解凍し、以下のファイルを kintone アプリ設定の `JavaScript / CSS でカスタマイズ`にて指定します。

```bash
./umd/kuc.min.js
```

2. `index.js` ファイルを作成します。

```js
kintone.events.on('app.record.index.show', event => {
  const header = kintone.app.getHeaderMenuSpaceElement();

  const button = new Kuc.Button({
    text: 'Submit',
    type: 'submit'
  });
  button.addEventListener('click', event => {
    console.log(event);
  });

  header.appendChild(button);
  return event;
});
```

3. `index.js` を kintone アプリ設定の `JavaScript /CSS でカスタマイズ`にアップロードしてカスタマイズを適用します。（[JavaSriptやCSSでアプリをカスタマイズする](https://jp.cybozu.help/k/ja/user/app_settings/js_customize.html)）

![button customize](/img/button_customize.png)

### CDN を利用する

1. 以下の CDN URL を、作成した kintone アプリ設定の `JavaScript /CSS でカスタマイズ`にて指定します。（[JavaSriptやCSSでアプリをカスタマイズする](https://get.kintone.help/k/ja/user/app_settings/js_customize.html)）

CDN を読み込むと、グローバルオブジェクトとして `Kuc` が追加されます。

   - 最新版の kintone UI Component を読み込みたい場合
     ```bash
     https://unpkg.com/kintone-ui-component/umd/kuc.min.js
     ```

   - バージョン指定して読み込みたい場合（プロジェクト名の後ろにバージョン番号を指定）
     ```bash
     https://unpkg.com/kintone-ui-component@1.0.0/umd/kuc.min.js
     ```

2. 以降は上記 UMD と同様。

:::tip
unpkg はサイボウズが提供している CDN サービスではありません。検証用としてお使いいた


<TActual>(AsyncTestDelegate code, string message, params object[] args) where TActual : Exception
        {
            return (TActual)ThrowsAsync(new InstanceOfTypeConstraint(typeof (TActual)), code, message, args);
        }

        /// <summary>
        /// Verifies that an async delegate throws an exception of a certain Type
        /// or one derived from it when called and returns it.
        /// </summary>
        /// <param name="code">A TestDelegate</param>
        public static TActual CatchAsync<TActual>(AsyncTestDelegate code) where TActual : Exception
        {
            return (TActual)ThrowsAsync(new InstanceOfTypeConstraint(typeof (TActual)), code);
        }

        #endregion

        #region DoesNotThrowAsync

        /// <summary>
        /// Verifies that an async delegate does not thr


    to: fromUser.id,
    sdp: pc.localDescription
  });
}

async function handleVideoAnswerMsg(msg) {
  const fromUser = usersArray.find(user => user.id === msg.from);
  log("*** Receive video chat answer from: " + fromUser.displayName);
  await pc.setRemoteDescription(msg.sdp).catch(reportError);
}

async function handleNewICECandidateMsg(msg) {
  const fromUser = usersArray.find(user => user.id === msg.from);
  log("*** Receive ice candidate from: " + fromUser.displayName);
  log("*** Received ICE candidate: " + JSON.stringify(msg.candidate));
  try {
    await pc.addIceCandidate(msg.candidate)
  } catch(err) {
    reportError(err);
  }
}

function handleGetUserMediaError(e) {
  error(e);
  switch(e.name) {
    case "NotFoundError":
      alert("Unable to open your call because no camera and/or microphone" +
            "were found.");
      break;
    case "SecurityError":
    case "PermissionDeniedError":
      break;
    default:
      alert("Error opening your camera and/or microphone: " + e.message);
      break;
  }

  closeVideoCall();
}

function reportError(errMessage) {
  error(`Error ${errMessage.name}: ${errMessage.message}`);
}

function makeRandomString(length) {
  let outString = '';
  const inOptions = 'abcdefghijklmnopqrstuvwxyz0123456789';

  for (let i = 0; i < length; i++) {
    outString += inOptions.charAt(Math.floor(Math.random() * inOptions.length));
  }

  return outString;
};
class ChromaKey {
  capStream=null;
  paused = false;
  constructor() {
  }

  getImageFrame() {
    const backgroundImg = new Image();
    backgroundImg.src = 'media/beach.jpg';

    backgroundImg.onload = () => {
      const imageCanvas = document.createElement('canvas');
      imageCanvas.width = this.width;
      imageCanvas.height = this.height;

      const ctx = imageCanvas.getContext('2d');
      ctx.drawImage(backgroundImg,0,0,this.width,this.height);

      this.imageFrame = ctx.getImageData(0, 0, this.width, this.height);

      this.timerCallback();
    }
  }

  doLoad() {
    this.video = document.getElementById("local_video");

    this.c1 = document.createElement('canvas');
    this.ctx1 = this.c1.getContext("2d");

    this.c2 = document.createElement('canvas');
    this.ctx2 = this.c2.getContext("2d");

    this.width = this.c1.width = this.c2.width = this.video.videoWidth;
    this.height = this.c1.height = this.c2.height = this.video.videoHeight;

    this.capStream = this.c2.captureStream();
    this.getImageFrame();
  }

  timerCallback(){
      if (this.video.paused || this.video.ended) {
        return;
      }
      this.computeFrame();
      setTimeout(() => {
        if (!this.paused){
          this.timerCallback();
        }
      }, 50);
  }

  computeFrame() {
    this.ctx1.drawImage(this.video, 0, 0, this.width, this.height);
    let frame = this.ctx1.getImageData(0, 0, this.width, this.height);
    let l = frame.data.length / 4;

    for (let i = 0; i < l; i++) {
      let r = frame.data[i * 4 + 0];
      let g = frame.data[i * 4 + 1];
      let b = frame.data[i * 4 + 2];

      if ( r > 150 && g > 150 && b > 150) {
        frame.data[i * 4 + 0] = this


 can have multiple samples",
    tags = ["tag1"],
    owners = ["owner1"]
)
@RequiresApi(Build.VERSION_CODES.S)
@Composable
fun SecondSample() {
    Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
        Text(text = "Hi, I am the Second sample only available in Android 12!")
    }
}
/*
 * Copyright 2023 Google LLC
 *
 * 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
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.android.catalog.framework.ui.components

import android.content.pm.ActivityInfo
import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.Espresso.pressBack
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.google.android.catalog.framework.ui.TestActivity
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

@MediumTest
@RunWith(AndroidJUnit4::class)
class FragmentContainerTest {

    @get:Rule
    val rule = createAndroidComposeRule<TestActivity>()

    @Test
    fun fragmentLifecycle() {
        rule.onNodeWithText("LifecycleFragment").performClick()
        rule.waitForIdle()
        val fragments = rule.activity.supportFragmentManager.fragments
        assertThat(fragments).hasSize(1)
        assertThat(fragments[0]).isInstanceOf(LifecycleFragment::class.java)
        onView(withText("hello lifecycle")).check(matches(isDisplayed()))
        val fragment = fragments[0] as LifecycleFragment
        assertThat(fragment.created).isTrue()
        assertThat(fragment.started).isTrue()
        assertThat(fragment.resumed).isTrue()
        pressBack()
        rule.waitForIdle()
        assertThat(fragment.resumed).isFalse()
        assertThat(fragment.started).isFalse()
        assertThat(fragment.created).isFalse()
    }

    @Test
    fun orientationChange() {
        rule.onNodeWithText("LifecycleFragment").performClick()
        rule.waitForIdle()
        // Switch to portrait. It's probably portrait right from the start.
        rule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
        rule.waitForIdle()
        onView(withText("hello lifecycle")).check(matches(isDisplayed()))
        // Switch to landscape.
        rule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        rule.waitForIdle()
        onView(withText("hello lifecycle")).check(matches(isDisplayed()))
        // Back to portrait.
        rule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
        rule.waitForIdle()
        onView(withText("hello lifecycle")).check(matches(isDisplayed()))
    }
}
/*
 * Copyright 2022 Google LLC
 *
 * 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 o


# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models

class OperatingUnit(models.Model):
    _inherit = "operating.unit"

    employee_ids = fields.Many2many(
        comodel_name="hr.employee",
        relation="operating_unit_employees_rel",
        column1="operating_unit_id",
        column2="employee_id",
        string="Employees Allowed",
    )


-------------------------
 }
}
/*----------------------------------------------------------------------------/
  Lovyan GFX - Graphics library for embedded devices.

Original Source:
 https://github.com/lovyan03/LovyanGFX/

Licence:
 [FreeBSD](https://github.com/lovyan03/LovyanGFX/blob/master/license.txt)

Author:
 [lovyan03](https://twitter.com/lovyan03)

Contributors:
 [ciniml](https://github.com/ciniml)
 [mongonta0716](https://github.com/mongonta0716)
 [tobozo](https://github.com/tobozo)
/----------------------------------------------------------------------------*/
#if defined (STM32F2xx) || defined (STM32F4xx) || defined (STM32F7xx)

#include "common.hpp"

namespace lgfx
{
 inline namespace v1
 {
//----------------------------------------------------------------------------

  void pinMode(int_fast16_t pin, pin_mode_t mode)
  {
    if (pin < 0) return;
/*
    switch (mode)
    {
    case pin_mode_t::output:
      ::pinMode(pin, OUTPUT);
      break;

    default:
      ::pinMode(pin, INPUT);
      break;
    }
//*/
    unsigned int pd = 0;

    switch (mode) {
    case pin_mode_t::input: /* INPUT_FLOATING */
      pd = STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0);
      break;
    case pin_mode_t::input_pullup:
      pd = STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, 0);
      break;
    case pin_mode_t::input_pulldown:
      pd = STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLDOWN, 0);
      break;
    case pin_mode_t::output:
      pd = STM_PIN_DATA(STM_MODE_OUTPUT_PP, GPIO_NOPULL, 0);
      break;
    }

    pin_function((PinName)pin, pd);
  }

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

  namespace spi // TODO: implement.
  {
    //void init(int spi_host, int spi_sclk, int spi_miso, int spi_mosi)
    void init(int, int, int, int) {}

    //void release(int spi_host) {}
    void release(int) {}

    //void beginTransaction(int spi_host, int spi_cs, int freq, int spi_mode)
    void beginTransaction(int, int, int, int) {}

    //void beginTransaction(int spi_host)
    void beginTransaction(int) {}

    //void endTransaction(int spi_host, int spi_cs)
    void endTransaction(int, int) {}

    //void writeData(int spi_host, const uint8_t* data, uint32_t len)
    void writeData(int, const uint8_t*, uint32_t) {}

    //void readData(int spi_host, uint8_t* data, uint32_t len)
    void readData(int, uint8_t*, uint32_t) {}
  }

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

  namespace i2c // TODO: implement.
  {
    //void init(int i2c_port, int sda, int scl, int freq) { }
    void init(int, int, int, int) {}

    //bool writeBytes(int i2c_port, uint16_t addr, const uint8_t *data, uint8_t len)
    bool writeBytes(int, uint16_t, const uint8_


_schema::id.eq(id))).set(column.eq(output)).execute(db_connection)
    }
    let db_connection = self.0.get().unwrap();
    let output = rmp_serde::to_vec::<crate::AccessControlSetting>(&(default, acls)).unwrap();
    match target {
      puzzleverse_core::RealmAccessTarget::Access => update(&db_connection, id, &output, realm_schema::access_acl),
      puzzleverse_core::RealmAccessTarget::Admin => update(&db_connection, id, &output, realm_schema::admin_acl),
    }
  }
  pub fn realm_chat_write(&self, db_id: i32, sender: &str, body: &str, timestamp: &chrono::DateTime<chrono::Utc>) -> QueryResult<()> {
    use crate::schema::realmchat::dsl as realm_chat_schema;
    let db_connection = self.0.get().unwrap();
    diesel::insert_into(realm_chat_schema::realmchat)
      .values((
        realm_chat_schema::body.eq(&body),
        realm_chat_schema::principal.eq(&sender),
        realm_chat_schema::created.eq(&timestamp),
        realm_chat_schema::realm.eq(db_id),
      ))
      .execute(&db_connection)?;
    Ok(())
  }
  pub fn realm_count(&self, name: &str, db_id: i32) -> QueryResult<i64> {
    use crate::schema::realm::dsl as realm_schema;
    let db_connection = self.0.get().unwrap();
    realm_schema::realm
      .select(diesel::dsl::count_star())
      .filter(realm_schema::name.eq(&name).and(realm_schema::owner.eq(db_id)))
      .first(&db_connection)
  }
  pub fn realm_create(&self, asset: &str, owner: &str, name: Option<String>, seed: Option<i32>, train: Option<u16>) -> diesel::QueryResult<String> {
    let db_connection = self.0.get().unwrap();
    create_realm(&db_connection, asset, owner, name, seed, train)
  }
  pub fn realm_delete(&self, target: &str, db_id: i32) -> QueryResult<usize> {
    let db_connection = self.0.get().unwrap();
    db_connection.transaction::<_, diesel::result::Error, _>(|| {
      use crate::schema::realm::dsl as realm_schema;
      use crate::schema::realmchat::dsl as chat_schema;
      diesel::delete(chat_schema::realmchat.filter(chat_schema::realm.nullable().eq(
        realm_schema::realm.select(realm_schema::id).filter(realm_schema::principal.eq(target).and(realm_schema::owner.eq(db_id))).single_value(),
      )))
      .execute(&db_connection)?;
      diesel::delete(realm_schema::realm.filter(realm_schema::principal.eq(target).and(realm_schema::owner.eq(db_id)))).execute(&db_connection)
    })
  }
  pub(crate) fn realm_find(&self, scope: RealmScope) -> QueryResult<Option<(String, String)>> {
    use crate::schema::realm::dsl as realm_schema;
    fn query<
      P: diesel::Expression<SqlType = diesel::sql_types::Bool>
        + diesel::expression::NonAggregate
        + diesel::expression::AppearsOnTable<crate::schema::realm::table>
        + diesel::query_builder::QueryFragment<diesel::pg::Pg>
        + diesel::query_builder::QueryId,
    >(
      db_connection: &DbConnection,
      predicate: P,
    ) -> QueryResult<Option<(String, String)>> {
      realm_schema::realm
        .select((realm_schema::principal, realm


ent;
  ElevationModel(this.parent);
  bool _running = false;
  bool _canElevate = false;
  bool get showRequestMenu => _canElevate && !_running;
  onPeerInfo(PeerInfo pi) {
    _canElevate = pi.platform == kPeerPlatformWindows && pi.sasEnabled == false;
    _running = false;
  }

  onPortableServiceRunning(bool running) => _running = running;
}

// The index values of `ConnType` are same as rust protobuf.
enum ConnType {
  defaultConn,
  fileTransfer,
  portForward,
  rdp,
  viewCamera,
  terminal
}

/// Flutter state manager and data communication with the Rust core.
class FFI {
  var id = '';
  var version = '';
  var connType = ConnType.defaultConn;
  var closed = false;
  var auditNote = '';

  /// dialogManager use late to ensure init after main page binding [globalKey]
  late final dialogManager = OverlayDialogManager();

  late final SessionID sessionId;
  late final ImageModel imageModel; // session
  late final FfiModel ffiModel; // session
  late final CursorModel cursorModel; // session
  late final CanvasModel canvasModel; // session
  late final ServerModel serverModel; // global
  late final ChatModel chatModel; // session
  late final FileModel fileModel; // session
  late final AbModel abModel; // global
  late final GroupModel groupModel; // global
  late final UserModel userModel; // global
  late final PeerTabModel peerTabModel; // global
  late final QualityMonitorModel qualityMonitorModel; // session
  late final RecordingModel recordingModel; // session
  late final InputModel inputModel; // session
  late final ElevationModel elevationModel; // session
  late final CmFileModel cmFileModel; // cm
  late final TextureModel textureModel; //session
  late final Peers recentPeersModel; // global
  late final Peers favoritePeersModel; // global
  late final Peers lanPeersModel; // global

  // Terminal model registry for multiple terminals
  final Map<int, TerminalModel> _terminalModels = {};

  // Getter for terminal models
  Map<int, TerminalModel> get terminalModels => _terminalModels;

  FFI(SessionID? sId) {
    sessionId = sId ?? (isDesktop ? Uuid().v4obj() : _constSessionId);
    imageModel = ImageModel(WeakReference(this));
    ffiModel = FfiModel(WeakReference(this));
    cursorModel = CursorModel(WeakReference(this));
    canvasModel = CanvasModel(WeakReference(this));
    serverModel = ServerModel(WeakReference(this));
    chatModel = ChatModel(WeakReference(this));
    fileModel = FileModel(WeakReference(this));
    userModel = UserModel(WeakReference(this));
    peerTabModel = PeerTabModel(WeakReference(this));
    abModel = AbModel(WeakReference(this));
    groupModel = GroupModel(WeakReference(this));
    qualityMonitorModel = QualityMonitorModel(WeakReference(this));
    recordingModel = RecordingModel(WeakReference(this));
    inputModel = InputModel(WeakReference(this));
    elevationModel = ElevationModel(WeakReference(this));
    cmFileModel = CmFileModel(WeakReference(this));
    textureModel = TextureModel(WeakReference(this));
    recentPeersModel = Peers(
        name: PeersModelName.recent,
        loadEvent: LoadEvent.recent,
        getInitPeers: null);
    favoritePeersModel = Peers(
        name: PeersModelName.favorite,
        loadEvent: LoadEvent.favorite,
        getInitPeers: null);
    lanPeersModel = Peers(
        name: PeersModelName.


stDialogTask;
import com.ihewro.focus.util.StringUtil;
import com.ihewro.focus.util.UIUtil;
import com.lxj.xpopup.core.BottomPopupView;

import org.greenrobot.eventbus.EventBus;
import org.litepal.exceptions.LitePalSupportException;

import java.util.ArrayList;
import java.util.List;

import es.dmoral.toasty.Toasty;

/**
 * <pre>
 *     author : hewro
 *     e-mail : ihewro@163.com
 *     time   : 2019/05/12
 *     desc   : 从底部弹出的来的功能操作的弹窗
 *     version: 1.0
 * </pre>
 */
public class OperationBottomPopupView  extends BottomPopupView {

    TextView tvTitle;
    TextView tvSubTitle;
    ImageView actionHelp;
    ImageView actionClose;
    RecyclerView recyclerView;

    private OperationListAdapter adapter;
    private List<Operation> operationList = new ArrayList<>();
    private String title;
    private String subtitle;

    private Help help;

    public OperationBottomPopupView(@NonNull Context context) {
        super(context);
    }

    public OperationBottomPopupView(@NonNull Context context, List<Operation> operationList, String title, String subtitle, Help help) {
        super(context);
        this.operationList = operationList;
        this.title = title;
        this.help = help;
        this.subtitle = subtitle;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.componenet_opertaion_popup;
    }

    @Override
    protected void onCreate() {
        super.onCreate();

        initView();

        initRecycler();

        initListener();

    }

    private void initView() {
        tvTitle = findViewById(R.id.title);
        tvSubTitle = findViewById(R.id.subtitle);

        actionHelp = findViewById(R.id.action_help);
        actionClose = findViewById(R.id.action_close);
        recyclerView = findViewById(R.id.recycler_view);

        tvTitle.setText(title);
        if (!StringUtil.trim(subtitle).trim().equals("")){
            tvSubTitle.setText(subtitle);
            tvSubTitle.setVisibility(View.VISIBLE);
        }else {
            tvSubTitle.setVisibility(View.GONE);
        }

        if (!help.isHelp()){
            actionHelp.setVisibility(View.GONE);
        }else {
            actionHelp.setVisibility(View.VISIBLE);
            //点击事件，这个地方功能扩展
        }

    }

    private void initRecycler() {
        //初始化列表
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
        recyclerView.setLayoutManager(linearLayoutManager);
        adapter = new OperationListAdapter(operationList);
        adapter.bindToRecyclerView(recyclerView);
        adapter.setEmptyView(R.layout.simple_empty_view,recyclerView);

        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                //执行对应操作
                operationList.get(position).run();
            }
        });
    }

    private void initListener(){

        actionClose.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();//关闭当前弹窗
            }
        });
    }

    @Override
    protected void onShow() {
        super.onShow();
    }

    @Override
    protected void onDismiss() {
        super.onDismiss();
    }

    public List<Operation> getOperationList()


*
 * Copyright (C) 2022 HAW Hamburg
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

/**
 * @{
 *
 * @file
 * @author  José I. Álamos <jose.alamos@haw-hamburg.de>
 */

#include "opendsme/opendsme.h"
#include "opendsme/DSMEPlatform.h"
#include "ztimer.h"
#include "iolist.h"
#include "event.h"
#include "event/thread.h"
#include "luid.h"
#include "dsmeAdaptionLayer/scheduling/TPS.h"
#include "dsmeAdaptionLayer/scheduling/StaticScheduling.h"
#include "board.h"

#define ENABLE_DEBUG 0
#include "debug.h"

/* Use default openDSME value for TPS scheduler alpha */
#define OPENDSME_TPS_ALPHA (0.1f)

/* Used for symbol counter calculation. Hardcoded to O-QPSK */
#define OPENDSME_TIMER_MASK   (0xF)
#define OPENDSME_TIMER_OFFSET (4U)

namespace dsme {

/* The one and only openDSME instance */
DSMEPlatform *DSMEPlatform::instance = nullptr;

/********************* C functions *********************/

static void _cca_ev_handler(event_t *ev);
static void _acktimer_ev_handler(event_t *ev);
static void _acktimer_cb(void *arg);
static void _timer_ev_handler(event_t *ev);
static void _tx_done_handler(event_t *ev);
static void _rx_done_handler(event_t *ev);
static void _handle_rx_offload(event_t *ev);
static void _start_of_cfp_handler(event_t *ev);

/* Event used for ACK Timeout */
static event_t acktimer_ev = {{}, _acktimer_ev_handler};

/* Event used for CCA Done */
static event_t cca_ev = {{}, _cca_ev_handler};

/* Event used for timer events */
static event_t timer_event = {{}, _timer_ev_handler};

/* Event used for TX Done */
static event_t tx_done_event = {{}, _tx_done_handler};

/* Event used for RX Done */
static event_t rx_done_event = {{}, _rx_done_handler};

/* Event used for offloading the receive procedure */
static event_t rx_offload_ev = {{}, _handle_rx_offload};

/* Event used for offloading the start of a CFP */
static event_t start_of_cfp_ev = {{}, _start_of_cfp_handler};

void _handle_rx_offload(event_t *ev)
{
    dsme::DSMEPlatform::instance->processRxOffload();
}

void _start_of_cfp_handler(event_t *ev)
{
    dsme::DSMEPlatform::instance->getDSME().handleStartOfCFP();
    dsme::DSMEPlatform::instance->updateVisual();
}

static void _cca_ev_handler(event_t *ev)
{
    dsme::DSMEPlatform::instance->processCCAEvent();
}

static void _acktimer_ev_handler(event_t *ev)
{
    dsme::DSMEPlatform::instance->sendNow();
}

static void _acktimer_cb(void *arg)
{
    dsme::DSMEPlatform::instance->offloadACKTimer();
}

static void _timer_ev_handler(event_t *ev)
{
    dsme::DSMEPlatform::instance->getDSME().getEventDispatcher().timerInterrupt();
}

static void _tx_done_handler(event_t *ev)
{
    dsme::DSMEPlatform::instance->processTXDoneEvent();
}

static void _rx_done_handler(event_t *ev)
{
    dsme::DSMEPlatform::instance->processRxDone();
}

static void _hal_radio_cb(ieee802154_dev_t *dev


 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"],
    "file": [384, 512, [128459, 61462, 128196], "f15b", "M0 64C0 28.65 28.65 0 64 0H229.5C246.5 0 262.7 6.743 274.7 18.75L365.3 109.3C377.3 121.3 384 137.5 384 154.5V448C384 483.3 355.3 512 320 512H64C28.65 512 0 483.3 0 448V64zM336 448V160H256C238.3 160 224 145.7 224 128V48H64C55.16 48 48 55.16 48 64V448C48 456.8 55.16 464 64 464H320C328.8 464 336 456.8 336 448z"],
    "file-audio": [384, 512, [], "f1c7", "M365.3 93.38l-74.63-74.64C278.6 6.742 262.3 0 245.4 0L64-.0001c-35.35 0-64 28.65-64 64l.0065 384c0 35.34 28.65 64 64 64H320c35.2 0 64-28.8 64-64V138.6C384 121.7 377.3 105.4 365.3 93.38zM336 448c0 8.836-7.164 16-16 16H64.02c-8.838 0-16-7.164-16-16L48 64.13c0-8.836 7.164-16 16-16h160L224 128c0 17.67 14.33 32 32 32h79.1V448zM171.5 259.5L136 296H92C85.38 296 80 301.4 80 308v56C80 370.7 85.38 376 92 376H136l35.5 36.5C179.1 420 192 414.8 192 404v-136C192 257.3 179.1 251.9 171.5 259.5zM235.1 260.7c-6.25 6.25-6.25 16.38 0 22.62C235.3 283.5 256 305.1 256 336c0 30.94-20.77 52.53-20.91 52.69c-6.25 6.25-6.25 16.38 0 22.62C238.2 414.4 242.3 416 246.4 416s8.188-1.562 11.31-4.688C258.1 410.1 288 380.5 288 336s-29.05-74.06-30.28-75.31C251.5 254.4 241.3 254.4 235.1 260.7z"],
    "file-code": [384, 512, [], "f1c9", "M162.1 257.8c-7.812-7.812-20.47-7.812-28.28 0l-48 48c-7.812 7.812-7.812 20.5 0 28.31l48 48C137.8 386.1 142.9 388 148 388s10.23-1.938 14.14-5.844c7.812-7.812 7.812-20.5 0-28.31L128.3 320l33.86-33.84C169.1 278.3 169.1 265.7 162.1 257.8zM365.3 93.38l-74.63-74.64C278.6 6.742 262.3 0 245.4 0H64C28.65 0 0 28.65 0 64l.0065 384c0 35.34 28.65 64 64 64H320c35.2 0 64-28.8 64-64V138.6C384 121.7 377.3 105.4 365.3 93.38zM336 448c0 8.836-7.164 16-16 16H64.02c-8.838 0-16-7.164-16-16L48 64.13c0-8.836 7.164-16 16-16h160L224 128c0 17.67 14.33 3


Tree<Arc<Route>>,
	list : Vec<Arc<Route>>,
	fallback : Option<HandlerDynArc>,
}

#[ cfg (feature = "hss-routes") ]
type RoutesInternals = Arc<RoutesInternals0>;

#[ cfg (feature = "hss-routes") ]
impl Routes {

	pub fn builder () -> RoutesBuilder {
		RoutesBuilder::new ()
	}

	pub fn into_builder (self) -> RoutesBuilder {
		let _routes = self.internals.list.clone ();
		RoutesBuilder {
				routes : _routes,
			}
	}

	pub fn resolve (&self, _path : &str) -> ServerResult<Option<RouteMatched>> {
		if let Some ((_route, _parameters)) = self.internals.tree.find (_path) {
			let _route = _route.clone ();
			let _parameters = _parameters.into_iter () .map (|(_name, _value)| (String::from (_name), String::from (_value))) .collect ();
			let _matched = RouteMatched {
					route : _route,
					parameters : _parameters,
				};
			Ok (Some (_matched))
		} else {
			Ok (None)
		}
	}

	pub fn routes (&self) -> impl Iterator<Item = Arc<Route>> + '_ {
		self.internals.list.iter () .map (Arc::clone)
	}

	pub fn handle (&self, _request : Request<Body>) -> HandlerFutureDynBox {
		match self.try_handle (_request) {
			Ok (_future) =>
				_future,
			Err (_request) =>
				HandlerFutureDynBox::ready_error (error_with_format (0x15c0a773, format_args! ("no route matched for `{}`", _request.uri () .path ()))),
		}
	}

	pub fn try_handle (&self, _request : Request<Body>) -> Result<HandlerFutureDynBox, Request<Body>> {
		let _path = _request.uri () .path ();
		let _route_matched = match self.resolve (_path) {
			Ok (_route_matched) =>
				_route_matched,
			Err (_error) =>
				return Ok (HandlerFutureDynBox::ready_error (_error)),
		};
		if let Some (_route_matched) = _route_matched {
			let _route = _route_matched.route.clone ();
			let mut _request = _request;
			match _route.handler {
				RouteHandler::HandlerDynArc (ref _handler) => {
					_request.extensions_mut () .insert (_route_matched);
					Ok (_handler.handle (_request))
				}
				RouteHandler::RouteHandlerDynArc (ref _handler) =>
					Ok (_handler.handle (_request, _route_matched)),
			}
		} else if let Some (_fallback) = self.internals.fallback.as_ref () {
			Ok (_fallback.delegate (_request))
		} else {
			Err (_request)
		}
	}
}

#[ cfg (feature = "hss-routes") ]
impl Handler for Routes {

	type Future = HandlerFutureDynBox;
	type ResponseBody = BodyDynBox;
	type ResponseBodyError = ServerError;

	fn handle (&self, _request : Request<Body>) -> Self::Future {
		Routes::handle (self, _request)
	}
}

#[ cfg (feature = "hss-routes") ]
pub struct RoutesBuilder {
	pub routes : Vec<Arc<Route>>,
}

#[ cfg (feature = "hss-routes") ]
impl RoutesBuilder {

	pub fn new () -> Self {
		Self {
				routes : Vec::new (),
			}
	}

	pub fn build (self) -> ServerResult<Routes> {

		let _routes = self.routes;

		let mut


 1000 + j + 1001
                        } at (" + i + "," + j + ")`,
                    );
                    return;
                }
            }
        }
        t.pass(testName);
    }

    testBinary2D(X, Y, "X, Y");
    testBinary2D(X.transpose(1, 0), Y.transpose(1, 0), "X.T, Y.T");
    testBinary2D(X.transpose(1, 0), Y, "X.T, Y");
    testBinary2D(X, Y.transpose(1, 0), "X, Y.T");
    testBinary2D(X.hi(32, 32), Y.hi(32, 32), "X.hi(32,32), Y.hi(32,32)");
    testBinary2D(X.hi(31, 31), Y.hi(31, 31), "X.hi(31,31), Y.hi(31,31)");
    testBinary2D(X.hi(0, 32), Y.hi(0, 32), "X.hi(0,32), Y.hi(0,32)");
    testBinary2D(X.transpose(1, 0).hi(0, 32), Y.hi(0, 32), "X.T.hi(0,32), Y.hi(0,32)");
    testBinary2D(X.transpose(1, 0).hi(33, 33), Y.hi(33, 33), "X.T.hi(33,33), Y.hi(33,33)");
    testBinary2D(X.transpose(1, 0).hi(31, 31), Y.hi(31, 31), "X.T.hi(31,31), Y.hi(31,31)");

    t.end();
});

import browserify = require("browserify");
import * as vm from "vm";
import * as path from "path";

const cases = ["unary", "binary", "offset", "fill"];

bundleCasesFrom(0);

function bundleCasesFrom(i: number) {
    if (i >= cases.length) return;
    const b = browserify();
    b.ignore("tape");
    b.add(`${__dirname}/${cases[i]}.js`);
    b.transform(path.normalize(__dirname + "/../cwise.js"));
    tape(cases[i], t => {
        // Without nested tests, the asynchronous nature of bundle causes issues with tape...
        b.bundle((err, src) => {
            if (err) {
                throw new Error("failed to bundle!");
            }
            vm.runInNewContext(src.toString(), {
                test: t.test.bind(t),
                Buffer,
                Int8Array,
                Int16Array,
                Int32Array,
                Float32Array,
                Float64Array,
                Uint8Array,
                Uint16Array,
                Uint32Array,
                Uint8ClampedArray,
                console: { log: console.log.bind(console) },
            });
            t.end();
        });
    });
    bundleCasesFrom(i + 1);
}

// fill
tape("fill", t => {
    const fill = cwise({
        args: ["index", "array", "scalar"],
        body(idx, out, f) {
            out = f.apply(undefined, idx);
        },
    });

    const xlen = 10;
    const ylen = 5;
    const array = ndarray(new Float32Array(xlen * ylen), [xlen, ylen]);

    fill(array, (row: number, col: number) => {
        return 0;
    });

    for (let i = 0; i < xlen; i++) {
        for (let j = 0; j < ylen; j++) {
            t.equals(array.get(i, j), 0, `fill (${i},${j})`);
        }
    }

    fill(array, (row: number, col:


/**************************************************************************
** This file is part of LiteIDE
**
** Copyright (c) 2011-2019 LiteIDE. All rights reserved.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library 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
** Lesser General Public License for more details.
**
** In addition, as a special exception,  that plugins developed for LiteIDE,
** are allowed to remain closed sourced and can be distributed under any license .
** These rights are included in the file LGPL_EXCEPTION.txt in this package.
**
**************************************************************************/
// Module: liteenvoption.h
// Creator: visualfc <visualfc@gmail.com>

#ifndef LITEENVOPTION_H
#define LITEENVOPTION_H

#include "liteapi/liteapi.h"
#include <QModelIndex>

namespace Ui {
    class LiteEnvOption;
}

class QFileSystemModel;
class LiteEnvOption : public LiteApi::IOption
{
    Q_OBJECT

public:
    explicit LiteEnvOption(LiteApi::IApplication *app, QObject *parent = 0);
    ~LiteEnvOption();
    virtual QWidget *widget();
    virtual QString name() const;
    virtual QString mimeType() const;
    virtual void load();
    virtual void save();
public slots:
    void doubleClickedFile(QModelIndex);
private:
    LiteApi::IApplication   *m_liteApp;
    QWidget           *m_widget;
    Ui::LiteEnvOption *ui;
    QFileSystemModel *m_fileModel;
};

#endif // LITEENVOPTION_H


 ),
        3: "replacement_val",
    }
    recursive_replace(dict3, 3, "replacement_val")
    assert modified_dict3 == dict3

def test_interpolators():
    grid_input = [[1, 5, 10], [2, 4, 6, 7], [50, 60, 80], [0.1, 0.5]]
    data_input = np.random.random(
        (
            len(grid_input[0]),
            len(grid_input[1]),
            len(grid_input[2]),
            len(grid_input[3]),
            30,
        )
    )

    v_orig = VectorInterpolator(grid_input, data_input, version="rg")
    v_new = VectorInterpolator(grid_input, data_input, version="mlg")

    input_test = np.random.random((100, len(grid_input)))
    for _n in range(len(grid_input)):
        input_test[:, _n] = input_test[:, _n] * (
            np.max(grid_input[_n]) - np.min(grid_input[_n])
        ) + np.min(grid_input[_n])

    res_orig = np.zeros((input_test.shape[0], data_input.shape[-1]))
    res_new = np.zeros((input_test.shape[0], data_input.shape[-1]))
    for _n in range(res_orig.shape[0]):
        res_orig[_n, :] = v_orig(input_test[_n, :])
    for _n in range(res_orig.shape[0]):
        res_new[_n, :] = v_new(input_test[_n, :])

    slope, intercept, rvalue, pvalue, stderr = scipy.stats.linregress(
        res_orig.flatten(), res_new.flatten()
    )
    assert rvalue**2 > 1 - 1e-6


locale+0x1a8>
  427b24:	f00003c0 	adrp	x0, 4a2000 <_IO_helper_jumps+0x38>
  427b28:	91318000 	add	x0, x0, #0xc60
  427b2c:	d503201f 	nop
  427b30:	f8797b1a 	ldr	x26, [x24, x25, lsl #3]
  427b34:	a942dfb6 	ldp	x22, x23, [x29, #40]
  427b38:	a943e7b8 	ldp	x24, x25, [x29, #56]
  427b3c:	aa1a03e0 	mov	x0, x26
  427b40:	f9458273 	ldr	x19, [x19, #2816]
  427b44:	f940b7a2 	ldr	x2, [x29, #360]
  427b48:	f9400261 	ldr	x1, [x19]
  427b4c:	ca010041 	eor	x1, x2, x1
  427b50:	b50031e1 	cbnz	x1, 42818c <setlocale+0x6f4>
  427b54:	a94153f3 	ldp	x19, x20, [sp, #16]
  427b58:	f94013f5 	ldr	x21, [sp, #32]
  427b5c:	f94027fa 	ldr	x26, [sp, #72]
  427b60:	a8d77bfd 	ldp	x29, x30, [sp], #368
  427b64:	d65f03c0 	ret
  427b68:	b0000200 	adrp	x0, 468000 <builtin_aliases+0x200>
  427b6c:	a908ffbf 	stp	xzr, xzr, [x29, #136]
  427b70:	91284000 	add	x0, x0, #0xa10
  427b74:	97ff7867 	bl	405d10 <getenv>
  427b78:	b4000060 	cbz	x0, 427b84 <setlocale+0xec>
  427b7c:	39c00001 	ldrsb	w1, [x0]
  427b80:	350014c1 	cbnz	w1, 427e18 <setlocale+0x380>
  427b84:	f9002bbb 	str	x27, [x29, #80]
  427b88:	71001adf 	cmp	w22, #0x6
  427b8c:	54000720 	b.eq	427c70 <setlocale+0x1d8>  // b.none
  427b90:	900003db 	adrp	x27, 49f000 <__sys_errlist_internal+0x320>
  427b94:	9120e360 	add	x0, x27, #0x838
  427b98:	f90083b4 	str	x20, [x29, #256]
  427b9c:	f875781a 	ldr	x26, [x0, x21, lsl #3]
  427ba0:	b4000d5a 	cbz	x26, 427d48 <setlocale+0x2b0>
  427ba4:	a94887a0 	ldp	x0, x1, [x29, #136]
  427ba8:	910403a3 	add	x3, x29, #0x100
  427bac:	2a1603e2 	mov	w2, w22
  427bb0:	940001b8 	bl	428290 <_nl_find_locale>
  427bb4:	aa0003f9 	mov	x2