/../..","a/bc/de/../../fg",0};
for (char **p=ptr; *p; p++)
{
  char a[12345]; strcpy(a,*p);
  printf("%s %s\n", *p, sanitize_filename (a));
}
*/

// ****************************************************************************
// Windows charset conversion routines ****************************************
// ****************************************************************************

#ifdef FREEARC_WIN
// Converts UTF-8 string to UTF-16
WCHAR *utf8_to_utf16 (const char *utf8, WCHAR *_utf16)
{
  WCHAR *utf16 = _utf16;
  do {
    BYTE c = utf8[0];   UINT c32;
         if (c<=0x7F)   c32 = c;
    else if (c<=0xBF)   c32 = '?';
    else if (c<=0xDF)   c32 = ((c&0x1F) << 6) +  (utf8[1]&0x3F),  utf8++;
    else if (c<=0xEF)   c32 = ((c&0x0F) <<12) + ((utf8[1]&0x3F) << 6) +  (utf8[2]&0x3F),  utf8+=2;
    else                c32 = ((c&0x0F) <<18) + ((utf8[1]&0x3F) <<12) + ((utf8[2]&0x3F) << 6) + (utf8[3]&0x3F),  utf8+=3;

    // Now c32 represents full 32-bit Unicode char
    if (c32 <= 0xFFFF)  *utf16++ = c32;
    else                c32-=0x10000, *utf16++ = c32/0x400 + 0xd800, *utf16++ = c32%0x400 + 0xdc00;

  } while (*utf8++);
  return _utf16;
}

// Converts UTF-16 string to UTF-8
char *utf16_to_utf8 (const WCHAR *utf16, char *_utf8)
{
  char *utf8 = _utf8;
  do {
    UINT c = utf16[0];
    if (0xd800<=c && c<=0xdbff && 0xdc00<=utf16[1] && utf16[1]<=0xdfff)
      c = (c - 0xd800)*0x400 + (UINT)(*++utf16 - 0xdc00) + 0x10000;

    // Now c represents full 32-bit Unicode char
         if (c<=0x7F)   *utf8++ = c;
    else if (c<=0x07FF) *utf8++ = 0xC0|(c>> 6)&0x1F,  *utf8++ = 0x80|(c>> 0)&0x3F;
    else if (c<=0xFFFF) *utf8++ = 0xE0|(c>>12)&0x0F,  *utf8++ = 0x80|(c>> 6)&0x3F,  *utf8++ = 0x80|(c>> 0)&0x3F;
    else                *utf8++ = 0xF0|(c>>18)&0x0F,  *utf8++ = 0x80|(c>>12)&0x3F,  *utf8++ = 0x80|(c>> 6)&0x3F,  *utf8++ = 0x80|(c>> 0)&0x3F;

  } while (*utf16++);
  return _utf8;
}

// Converts UTF-8 string to OEM
char *utf8_to_oem (const char *utf8, char *oem)
{
  WCHAR *utf16 = (WCHAR*) malloc_msg(MY_FILENAME_MAX*4);
  utf8_to_utf16 (utf8, utf16);
  CharToOemW (utf16, oem);
  free (utf16);
  return oem;
}

// Converts OEM string to UTF-8
char *oem_to_utf8 (const char  *oem, char *utf8)
{
  WCHAR *utf16 = (WCHAR*) malloc_msg(MY_FILENAME_MAX*4);
  OemToCharW (oem, utf16);
  utf16_to_utf8 (utf16, utf8);
  free (utf16);
  return utf8;
}
#endif

//*****************************************************************************
// File/system operations *****************************************************
//***************************************************


ug!("validated FVSS {:?}\n", &self);
        } else {
            if !valid {
                log::error!("failed FVSS {:?}\n", &self);
            }
            if !pubkey_valid {
                log::error!("invalid pubkey in FVSS {:?}\n", &self);
            }
        }
        valid && pubkey_valid
    }
}
<gh_stars>10-100
#![allow(non_snake_case)]
use crate::ffi::{
    mdGenericParam, mdMethodSpec, mdToken, CorSaveSize, Unknown, DWORD, GUID, HRESULT, LPCWSTR,
    PCCOR_SIGNATURE, ULONG,
};
use std::ffi::c_void;

#[repr(C)]
pub struct IMetaDataEmit2<T> {
    pub DefineMethodSpec: unsafe extern "system" fn(
        this: &T,
        tkParent: mdToken,
        pvSigBlob: PCCOR_SIGNATURE,
        cbSigBlob: ULONG,
        pmi: *mut mdMethodSpec,
    ) -> HRESULT,
    pub GetDeltaSaveSize:
        unsafe extern "system" fn(this: &T, fSave: CorSaveSize, pdwSaveSize: *mut DWORD) -> HRESULT,
    pub SaveDelta:
        unsafe extern "system" fn(this: &T, szFile: LPCWSTR, dwSaveFlags: DWORD) -> HRESULT,
    pub SaveDeltaToStream: unsafe extern "system" fn(
        this: &T,
        pIStream: *const Unknown, // TODO: Implement ISequentialStream, IStream and then Stream co-class
        dwSaveFlags: DWORD,
    ) -> HRESULT,
    pub SaveDeltaToMemory:
        unsafe extern "system" fn(this: &T, pbData: *mut c_void, cbData: ULONG) -> HRESULT,
    pub DefineGenericParam: unsafe extern "system" fn(
        this: &T,
        tk: mdToken,
        ulParamSeq: ULONG,
        dwParamFlags: DWORD,
        szname: LPCWSTR,
        reserved: DWORD,
        rtkConstraints: *const mdToken,
        pgp: *mut mdGenericParam,
    ) -> HRESULT,
    pub SetGenericParamProps: unsafe extern "system" fn(
        this: &T,
        gp: mdGenericParam,
        dwParamFlags: DWORD,
        szName: LPCWSTR,
        reserved: DWORD,
        rtkConstraints: *const mdToken,
    ) -> HRESULT,
    pub ResetENCLog: unsafe extern "system" fn(this: &T) -> HRESULT,
}

impl IMetaDataEmit2<()> {
    // F5DD9950-F693-42E6-830E-7B833E8146A9
    pub const IID: GUID = GUID {
        data1: 0xF5DD9950,
        data2: 0xF693,
        data3: 0x42E6,
        data4: [0x83, 0x0E, 0x7B, 0x83, 0x3E, 0x81, 0x46, 0xA9],
    };
}
use lazy_static::lazy_static;
use rand::distributions::Alphanumeric;
use rand::Rng;
use std::process::{Child, Command, Stdio};

pub static COUNT: usize = 10;

lazy_static! {
    pub static ref PAIRS: Vec<(String, String)> = (0..COUNT)
        .map(|_| (random_string(10), random_string(10)))
        .collect();
}

pub fn launch_db(n: usize, port: usize) -> Child {
    let mut command = Command::new("./target/debug/main");
    command.arg(format!("-n {} -p {}", n, port));
    command
        .stdout(Stdio::piped())
        .stderr(Stdio::piped())
        .spawn()
        .expect("Failed to launch database")
}

fn random_string(length: usize) -> String {
    rand::thread_rng()
        .sample_iter(&Alphanumeric)
        .take(length)
        .collect()
}
<filename>src/lib.rs
use cros


holder.gsyVideoPlayer.getFullscreenButton().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                resolveFullBtn(holder.gsyVideoPlayer);
            }
        });
        holder.gsyVideoPlayer.setRotateViewAuto(!getListNeedAutoLand());
        holder.gsyVideoPlayer.setLockLand(!getListNeedAutoLand());
        holder.gsyVideoPlayer.setPlayTag(TAG);
        holder.gsyVideoPlayer.setAutoFullWithSize(true);
        holder.gsyVideoPlayer.setReleaseWhenLossAudio(false);
        holder.gsyVideoPlayer.setShowFullAnimation(!getListNeedAutoLand());
        holder.gsyVideoPlayer.setIsTouchWiget(false);
        //循环
        //holder.gsyVideoPlayer.setLooping(true);
        holder.gsyVideoPlayer.setNeedLockFull(true);

        //holder.gsyVideoPlayer.setSpeed(2);

        holder.gsyVideoPlayer.setPlayPosition(position);

        holder.gsyVideoPlayer.setVideoAllCallBack(new GSYSampleCallBack() {
            @Override
            public void onClickStartIcon(String url, Object... objects) {
                super.onClickStartIcon(url, objects);
            }

            @Override
            public void onPrepared(String url, Object... objects) {
                super.onPrepared(url, objects);
                Debuger.printfLog("onPrepared");
                boolean full = holder.gsyVideoPlayer.getCurrentPlayer().isIfCurrentIsFullscreen();
                if (!holder.gsyVideoPlayer.getCurrentPlayer().isIfCurrentIsFullscreen()) {
                    GSYVideoManager.instance().setNeedMute(true);
                }
                curPlayer = (StandardGSYVideoPlayer) objects[1];
                isPlay = true;
                if (getListNeedAutoLand()) {
                    //重力全屏工具类
                    initOrientationUtils(holder.gsyVideoPlayer, full);
                    ListNormalAdapter.this.onPrepared();
                }
            }

            @Override
            public void onQuitFullscreen(String url, Object... objects) {
                super.onQuitFullscreen(url, objects);
                isFull = false;
                GSYVideoManager.instance().setNeedMute(true);
                if (getListNeedAutoLand()) {
                    ListNormalAdapter.this.onQuitFullscreen();
                }
            }

            @Override
            public void onEnterFullscreen(String url, Object... objects) {
                super.onEnterFullscreen(url, objects);
                GSYVideoManager.instance().setNeedMute(false);
                isFull = true;
                holder.gsyVideoPlayer.getCurrentPlayer().getTitleTextView().setText((String) objects[0]);
            }

            @Override
            public void onAutoComplete(String url, Object... objects) {
                super.onAutoComplete(url, objects);
                curPlayer = null;
                isPlay = false;
                isFull = false;
                if (getListNeedAutoLand()) {
                    ListNormalAdapter.this.onAutoComplete();
                }
            }
        });

        return convertView;
    }

    /**
     * 全屏幕按键处理
     */
    private void resolveFullBtn(final StandardGSYVideoPlayer standardGSYVideoPlayer) {
        if (getListNeedAutoLand() && orientationUtils != null) {
            resolveFull();
        }
        standardGSYVideoPlayer.startWindowFullscreen(context, false, true);
    }

    class ViewHolder {
        SampleCoverVideo gsyVideoPlayer;
    }

    public void clearCache() {
        if (curPlayer != null) {
            curPlayer.getCurrentPlayer().clearCurrentCache();
        }
    }

    public boolean isFull() {
        return isFull;
    }

    /**************************支持全屏重力全屏的部分************


ibuted 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 org.wso2.ballerinalang.compiler.tree.expressions;

import org.ballerinalang.model.tree.ActionNode;
import org.ballerinalang.model.tree.NodeKind;
import org.wso2.ballerinalang.compiler.tree.BLangNodeAnalyzer;
import org.wso2.ballerinalang.compiler.tree.BLangNodeTransformer;
import org.wso2.ballerinalang.compiler.tree.BLangNodeVisitor;

import java.util.List;

/**
 * Represents alternate-receive in worker communication.
 *
 * @since 2201.9.0
 */
public class BLangAlternateWorkerReceive extends BLangExpression implements ActionNode {

    private List<BLangWorkerReceive> workerReceives;

    @Override
    public NodeKind getKind() {
        return NodeKind.ALTERNATE_WORKER_RECEIVE;
    }

    @Override
    public void accept(BLangNodeVisitor visitor) {
        visitor.visit(this);
    }

    @Override
    public <T> void accept(BLangNodeAnalyzer<T> analyzer, T props) {
        analyzer.visit(this, props);
    }

    @Override
    public <T, R> R apply(BLangNodeTransformer<T, R> modifier, T props) {
        return modifier.transform(this, props);
    }

    public List<BLangWorkerReceive> getWorkerReceives() {
        return workerReceives;
    }

    public void setWorkerReceives(List<BLangWorkerReceive> workerReceives) {
        this.workerReceives = workerReceives;
    }

    @Override
    public String toString() {
        return "CombinedWorkerReceive: " + this.toActionString();
    }

    public String toActionString() {
        StringBuilder sb = new StringBuilder(" <- ");
        int size = workerReceives.size();
        for (int i = 0; i < size - 1; i++) {
            sb.append(workerReceives.get(i)).append(" | ");
        }
        sb.append(workerReceives.get(size - 1));
        return sb.toString();
    }
}
/*
 *  Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 *  WSO2 Inc. 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 org.wso2.ballerinalang.compiler.tree.expressions;

import org.ballerinalang.model.tree.NodeKind;
import org.ballerinalang.model.tree.expressions.MarkdownDocumentationReturnParameterAttributeNode;
import org.wso2.ballerinalang.compiler.semantics.model.types.BType;
import org.wso2.ballerinalang.compiler.tree.BLangNodeAnalyzer;
import org.wso2.ballerinalang.compiler.tree.BLangNodeTransformer;
import org.wso2.ballerinalang.compiler.tree.BLangNodeVisitor;

import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Represents a return parameter node.
 *
 * @since 0.981.0
 */
public class BLangMarkdownReturnParameter


\":[\"Blob\",\"BLOB\"]},{\"@id\":\"d3f:BinarySegment\",\"rdfs:hasSubClass\":[{\"@id\":\"d3f:ImageSegment\"},{\"@id\":\"d3f:ProcessSegment\"}],\"rdfs:label\":[\"Binary Segment\"]},{\"@id\":\"d3f:BitmapImage\",\"rdfs:label\":[\"Bitmap Image\"]},{\"@id\":\"d3f:BitmapImageFile\",\"rdfs:label\":[\"Bitmap Image File\"]},{\"@id\":\"d3f:BlockDevice\",\"rdfs:label\":[\"Block Device\"],\"skos:altLabel\":[\"Block Special File\"]},{\"@id\":\"d3f:BootLoader\",\"rdfs:hasSubClass\":[{\"@id\":\"d3f:First-stageBootLoader\"},{\"@id\":\"d3f:Second-stageBootLoader\"}],\"rdfs:label\":[\"Boot Loader\"],\"skos:altLabel\":[\"Bootloader\"]},{\"@id\":\"d3f:BootRecord\",\"rdfs:hasSubClass\":[{\"@id\":\"d3f:BootSector\"},{\"@id\":\"d3f:VolumeBootRecord\"}],\"rdfs:label\":[\"Boot Record\"]},{\"@id\":\"d3f:BootSector\",\"rdfs:label\":[\"Boot Sector\"]},{\"@id\":\"d3f:Browser\",\"rdfs:label\":[\"Browser\"]},{\"@id\":\"d3f:BrowserExtension\",\"rdfs:label\":[\"Browser Extension\"]},{\"@id\":\"d3f:BuildTool\",\"rdfs:hasSubClass\":[{\"@id\":\"d3f:Compiler\"},{\"@id\":\"d3f:SoftwarePackagingTool\"}],\"rdfs:label\":[\"Build Tool\"],\"skos:altLabel\":[\"Build Automation Tool\"]},{\"@id\":\"d3f:BusMessage\",\"rdfs:label\":[\"Bus Message\"]},{\"@id\":\"d3f:BusNetwork\",\"rdfs:label\":[\"Bus Network\"],\"skos:altLabel\":[\"Bus\",\"Data Highway\"]},{\"@id\":\"d3f:BusNetworkFrame\",\"rdfs:label\":[\"Bus Network Frame\"],\"skos:altLabel\":[\"Bus Frame\"]},{\"@id\":\"d3f:BusNetworkNode\",\"rdfs:label\":[\"Bus Network Node\"]},{\"@id\":\"d3f:BusNetworkTraffic\",\"rdfs:label\":[\"Bus Network Traffic\"]},{\"@id\":\"d3f:BusinessCommunicationPlatformClient\",\"rdfs:label\":[\"Business Communication Platform Client\"]},{\"@id\":\"d3f:CACertificateFile\",\"rdfs:label\":[\"CA Certificate File\"]},{\"@id\":\"d3f:CacheMemory\",\"rdfs:label\":[\"Processor Cache Memory\"]},{\"@id\":\"d3f:CallStack\",\"rdfs:label\":[\"Call Stack\"]},{\"@id\":\"d3f:CentralProcessingUnit\",\"rdfs:label\":[\"Central Processing Unit\"]},{\"@id\":\"d3f:Certificate\",\"rdfs:label\":[\"Certificate\"],\"skos:altLabel\":[\"Public Key Certificate\"]},{\"@id\":\"d3f:CertificateFile\",\"rdfs:hasSubClass\":[{\"@id\":\"d3f:CACertificateFile\"}],\"rdfs:label\":[\"Certificate File\"]},{\"@id\":\"d3f:CertificateTrustStore\",\"rdfs:label\":[\"Certificate Trust Store\"]},{\"@id\":\"d3f:ChatroomClient\",\"rdfs:label\":[\"Chatroom Client\"],\"skos:altLabel\":[\"Chat Room Client\"]},{\"@id\":\"d3f:ChildProcess\",\"rdfs:label\":[\"Child Process\"]},{\"@id\":\"d3f:ClientApplication\",\"rdfs:label\":[\"Client Application\"]},{\"@id\":\"d3f:ClientComputer\",\"rdfs:hasSubClass\":[{\"@id\":\"d3f:EmbeddedComputer\"},{\"@id\":\"d3f:


5567](../../index/c/cherry-and-almond-clafoutis-105567.json)
 * [Cherry And Apricot Cobbler 103645](../../index/c/cherry-and-apricot-cobbler-103645.json)
 * [Cherry And Coconut Granola With Yogurt 51244620](../../index/c/cherry-and-coconut-granola-with-yogurt-51244620.json)
 * [Cherry And Peach Compote 105693](../../index/c/cherry-and-peach-compote-105693.json)
 * [Cherry And Pecan Cream Cheese Spread 11848](../../index/c/cherry-and-pecan-cream-cheese-spread-11848.json)
 * [Cherry And Plum Bruschetta 51169500](../../index/c/cherry-and-plum-bruschetta-51169500.json)
 * [Cherry Apple Sauce 106010](../../index/c/cherry-apple-sauce-106010.json)
 * [Cherry Apricot Cobbler 241364](../../index/c/cherry-apricot-cobbler-241364.json)
 * [Cherry Apricot Compote 4014](../../index/c/cherry-apricot-compote-4014.json)
 * [Cherry Apricot Cream Cheese Tart 101669](../../index/c/cherry-apricot-cream-cheese-tart-101669.json)
 * [Cherry Apricot Yogurt Sundaes 232336](../../index/c/cherry-apricot-yogurt-sundaes-232336.json)
 * [Cherry Barbecue Sauce 105316](../../index/c/cherry-barbecue-sauce-105316.json)
 * [Cherry Berry Lattice Pie 101673](../../index/c/cherry-berry-lattice-pie-101673.json)
 * [Cherry Blossom 200341](../../index/c/cherry-blossom-200341.json)
 * [Cherry Bourbon Ice Cream 51179030](../../index/c/cherry-bourbon-ice-cream-51179030.json)
 * [Cherry Bourbon Pie 51108280](../../index/c/cherry-bourbon-pie-51108280.json)
 * [Cherry Cheesecake With Chocolate Almond Crust 14135](../../index/c/cherry-cheesecake-with-chocolate-almond-crust-14135.json)
 * [Cherry Chipotle Chili 366814](../../index/c/cherry-chipotle-chili-366814.json)
 * [Cherry Chocolate Chip Oatmeal Cookies 4953](../../index/c/cherry-chocolate-chip-oatmeal-cookies-4953.json)
 * [Cherry Chocolate Chunk Ice Cream 297](../../index/c/cherry-chocolate-chunk-ice-cream-297.json)
 * [Cherry Chocolate Shortcakes With Kirsch Whipped Cream 106649](../../index/c/cherry-chocolate-shortcakes-with-kirsch-whipped-cream-106649.json)
 * [Cherry Clafoutis 5611](../../index/c/cherry-clafoutis-5611.json)
 * [Cherry Cola Barbecue Sauce 242745](../../index/c/cherry-cola-barbecue-sauce-242745.json)
 * [Cherry Compote 5425](../../index/c/cherry-compote-5425.json)
 * [Cherry Cornmeal Upside Down Cake 242516](../../index/c/cherry-cornmeal-upside-down-cake-242516.json)
 * [Cherry Cranberry Sauce 361889](../../index/c/cherry-cranberry-sauce-361889.json)
 * [Cherry Crumble Pie 103537](../../index/c/cherry-crumble-pie-103537.json)
 * [Cherry Fudge Brownies With Chocolate Sauce And Chocolate Dipped Cherries 101674](../../index/c/cherry-fudge-brownies-with-chocolate-sauce-and-chocolate-dipped-cherries-101


e, code: "ERR_RESOLVE" });
    return version.resolveRef(ref, { handleError });
  }

  /**
   * Determines whether a value is a `JsonSchema` instance
   */
  public static isJsonSchema(value: unknown): value is JsonSchema {
    if (value instanceof JsonSchema) {
      return true;
    }

    // Use duck typing to support interoperability between multiple versions
    // of the @apidevtools/json-schema package
    let schema = value as JsonSchema;
    return schema &&
      typeof schema === "object" &&
      Array.isArray(schema.files) &&
      File.isFile(schema.rootFile);
  }
}
/**
 * 注册器
 */
import {Container} from '../container'
import * as utils from '../utils'

const COMMON: any = {}

class Register {
    private $container = new Container()
    private $modules: any = {}
    private $config: any = {}
    constructor(setting?: any){
        setting = utils.isObject(setting) ? setting : {}
        //
        Object.defineProperty(this.$config, 'protected', {
            value: !!setting.protected,
            writable: false,
            configurable: false
        })
    }
    async create(name: string ,support: string|Array<string>|Function, creater?: undefined | Function){
        creater = utils.isFunction(support) ? (<Function>support) : (<Function>creater)
        if (!creater || !name){
            return
        }
        support = utils.isString(support) && [<string>support] || utils.isArray(support) && support as Array<string> || ''
        let isProtect: boolean = this.$config.protected
        let $modules: any = isProtect ? this.$modules : COMMON
        // 注意
        if(name in $modules){
            return await $modules[name]
        }
        // 访问器
        Object.defineProperties($modules, {
            [name]: {
                get: async () => {
                    let ret: any = support ? await this.$container.ensure(support as Array<string>, <Function>creater) : (<Function>creater)()
                    return ret
                },
                configurable: false,
                writable: false
            }
        })
        let plugin: any = await $modules[name]
        return plugin
    }
    async use(name: string, ...rest: any[]){
        let isProtect: boolean = this.$config.protected
        let $modules: any = isProtect ? this.$modules : COMMON
        return await $modules[name]
    }
}

export {Register}import {debounceTime} from "rxjs/operators";
import {Presenter} from "../../presenter/Presenter";
import {VideosGateway} from "../../services/api/VideoPlayerService/VideosGateway";
import {NullVideo, Video} from "../../services/api/models/Video";
import {ViewState} from "./ViewState";
import {ButtonIconType} from "../../components/Buttons/ButtonWithIcon";
import {APIError, QuotaExceededErrorReason} from "../../services/api/APIError";
import {AlertState} from "../../components/AppSnackBar/AppSnackBar";
import {local} from "../../localization/local";

type ShowSnackBarHandler = (message: string, state: AlertState) => void

export interface VideoPlayerOutput {
    videos: Video[];
    selectedVideo: Video;
    searchString: string;
    isPlaying: boolean;
    viewState: ViewState;
    buttonType: ButtonIconType;
}

const VideoPlayerInitialOutput: VideoPlayerOutput = {
    videos: [],
    selectedVideo: NullVideo,
    searchString: '',
    isPlaying: false,
    viewState: ViewState.Empty,
    buttonType: ButtonIconType.PlayIcon,
}

// TODO: Add Unit test.
export class VideoPlayerPresenter extends Presenter<VideoPlayerOutput> {
    private showSnackBarHandler: ShowSnackBarHandler | null = null;

    private searchString: string =


evela/workflow/api/v1alpha1"
	"github.com/kubevela/workflow/pkg/utils"
)

var _ = Describe("Test Backup", func() {
	ctx := context.Background()
	namespace := "test-ns"

	wrTemplate := &v1alpha1.WorkflowRun{
		TypeMeta: metav1.TypeMeta{
			Kind:       "WorkflowRun",
			APIVersion: "core.oam.dev/v1alpha1",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name:      "wr",
			Namespace: namespace,
		},
		Spec: v1alpha1.WorkflowRunSpec{
			WorkflowSpec: &v1alpha1.WorkflowSpec{
				Steps: []v1alpha1.WorkflowStep{
					{
						WorkflowStepBase: v1alpha1.WorkflowStepBase{
							Name: "step-1",
							Type: "suspend",
						},
					},
				},
			},
		},
	}
	testDefinitions := []string{"test-apply", "apply-object", "failed-render"}

	BeforeEach(func() {
		setupNamespace(ctx, namespace)
		setupTestDefinitions(ctx, testDefinitions, namespace)
		By("[TEST] Set up definitions before integration test")
	})

	AfterEach(func() {
		Expect(k8sClient.DeleteAllOf(ctx, &v1alpha1.WorkflowRun{}, client.InNamespace(namespace))).Should(Succeed())
		Expect(k8sClient.DeleteAllOf(ctx, &appsv1.Deployment{}, client.InNamespace(namespace))).Should(Succeed())
		Expect(k8sClient.DeleteAllOf(ctx, &corev1.ConfigMap{}, client.InNamespace(namespace))).Should(Succeed())
	})

	It("workflow not finished with finished strategy", func() {
		backupReconciler := &BackupReconciler{
			Client: k8sClient,
			Scheme: testScheme,
			BackupArgs: BackupArgs{
				BackupStrategy: StrategyBackupFinishedRecord,
				CleanOnBackup:  true,
			},
		}
		wr := wrTemplate.DeepCopy()
		wr.Name = "not-finished"
		Expect(k8sClient.Create(ctx, wr)).Should(BeNil())

		tryReconcileBackup(backupReconciler, wr.Name, wr.Namespace)
		wrObj := &v1alpha1.WorkflowRun{}
		Expect(k8sClient.Get(ctx, client.ObjectKey{
			Name:      wr.Name,
			Namespace: wr.Namespace,
		}, wrObj)).Should(BeNil())
	})

	It("workflow finished with finished strategy", func() {
		backupReconciler := &BackupReconciler{
			Client: k8sClient,
			Scheme: testScheme,
			BackupArgs: BackupArgs{
				BackupStrategy: StrategyBackupFinishedRecord,
				CleanOnBackup:  true,
			},
		}
		wr := wrTemplate.DeepCopy()
		wr.Name = "finished"
		Expect(k8sClient.Create(ctx, wr)).Should(BeNil())
		wr.Status.Finished = true
		Expect(k8sClient.Status().Update(ctx, wr)).Should(BeNil())

		tryReconcileBackup(backupReconciler, wr.Name, wr.Namespace)
		wrObj := &v1alpha1.WorkflowRun{}
		Expect(k8sClient.Get(ctx, client.ObjectKey{
			Name:      wr.Name,
			Namespace: wr.Namespace,
		}, wrObj)).Should(utils.NotFoundMatcher{})
	})

	It("no strategy specified", func() {
		backupReconciler := &BackupReconciler{
			Client: k8sClient,
			Scheme: testScheme,
		}
		wr := wrTemplate.DeepCopy()
		wr.Name = "no-strategy"
		Expect(k8sClient.Create(ctx, wr)).Should(BeNil())
		wr.Status.Finished = true
		Expect(k8sClient.Status().Update(ctx, wr)).Should(BeNil())


using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using EVEMon.Common.Extensions;
using EVEMon.Common.Models;

namespace EVEMon.Common.Notifications
{
    /// <summary>
    /// Provides notification services for PlanetaryPins.
    /// </summary>
    public sealed class PlanetaryPinsNotificationEventArgs: NotificationEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PlanetaryPinsNotificationEventArgs"/> class.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="pins">The pins.</param>
        /// <exception cref="System.ArgumentNullException">pins</exception>
        public PlanetaryPinsNotificationEventArgs(Object sender, IEnumerable<PlanetaryPin> pins)
            : base(sender, NotificationCategory.PlanetaryPinsCompleted)
        {
            pins.ThrowIfNull(nameof(pins));

            PlanetaryPins = new Collection<PlanetaryPin>();
            foreach (PlanetaryPin pin in pins)
            {
                PlanetaryPins.Add(pin);


NET1_CLK_SEL_R {
        ENET1_CLK_SEL_R::new(((self.bits >> 13) & 0x01) != 0)
    }
    #[doc = "Bit 14 - ENET2 reference clock mode select."]
    #[inline(always)]
    pub fn enet2_clk_sel(&self) -> ENET2_CLK_SEL_R {
        ENET2_CLK_SEL_R::new(((self.bits >> 14) & 0x01) != 0)
    }
    #[doc = "Bit 15 - USB Exposure mode"]
    #[inline(always)]
    pub fn usb_exp_mode(&self) -> USB_EXP_MODE_R {
        USB_EXP_MODE_R::new(((self.bits >> 15) & 0x01) != 0)
    }
    #[doc = "Bit 17 - ENET1_TX_CLK data direction control"]
    #[inline(always)]
    pub fn enet1_tx_clk_dir(&self) -> ENET1_TX_CLK_DIR_R {
        ENET1_TX_CLK_DIR_R::new(((self.bits >> 17) & 0x01) != 0)
    }
    #[doc = "Bit 18 - ENET2_TX_CLK data direction control"]
    #[inline(always)]
    pub fn enet2_tx_clk_dir(&self) -> ENET2_TX_CLK_DIR_R {
        ENET2_TX_CLK_DIR_R::new(((self.bits >> 18) & 0x01) != 0)
    }
    #[doc = "Bit 19 - sai1.MCLK signal direction control"]
    #[inline(always)]
    pub fn sai1_mclk_dir(&self) -> SAI1_MCLK_DIR_R {
        SAI1_MCLK_DIR_R::new(((self.bits >> 19) & 0x01) != 0)
    }
    #[doc = "Bit 20 - sai2.MCLK signal direction control"]
    #[inline(always)]
    pub fn sai2_mclk_dir(&self) -> SAI2_MCLK_DIR_R {
        SAI2_MCLK_DIR_R::new(((self.bits >> 20) & 0x01) != 0)
    }
    #[doc = "Bit 21 - sai3.MCLK signal direction control"]
    #[inline(always)]
    pub fn sai3_mclk_dir(&self) -> SAI3_MCLK_DIR_R {
        SAI3_MCLK_DIR_R::new(((self.bits >> 21) & 0x01) != 0)
    }
    #[doc = "Bit 22 - Exclusive monitor response select of illegal command"]
    #[inline(always)]
    pub fn exc_mon(&self) -> EXC_MON_R {
        EXC_MON_R::new(((self.bits >> 22) & 0x01) != 0)
    }
    #[doc = "Bit 23 - ENET and ENET2 ipg_clk_s clock gating enable"]
    #[inline(always)]
    pub fn enet_ipg_clk_s_en(&self) -> ENET_IPG_CLK_S_EN_R {
        ENET_IPG_CLK_S_EN_R::new(((self.bits >> 23) & 0x01) != 0)
    }
    #[doc = "Bit 31 - ARM CM7 platform AHB clock enable"]
    #[inline(always)]
    pub fn cm7_force_hclk_en(&self) -> CM7_FORCE_HCLK_EN_R {
        CM7_FORCE_HCLK_EN_R::new(((self.bits >> 31) & 0x01) != 0)
    }
}
impl W {
    #[doc = "Bits 0:2 - SAI1 MCLK1 source select"]
    #[inline(always)]
    pub fn sai1_mclk1_sel(&mut self) -> SAI1_MCLK1_SEL_W {
        SAI1_MCLK1_SEL_W { w: self }
    }
    #[doc = "Bits 3:5 - SAI1 MCLK2 source select


	'',	'',	'',	'用于角色的核心跃升和天赋的升级。\n\n分布岩层深处，采集难度较高的幻金矿石，表面泛着紫色的金属光泽，纯度较高。'},
{'90721',	'90721',	'22',	'907',	'1',	'',	'',	'荧晶导线',	'',	'',	'',	'',	'',	'',	'2',	'',	'[[14141,1,2]]',	'',	'[[10102,15]]',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'2024/6/19 3:00:00',	'2',	'2',	'0',	'0',	'',	'',	'',	'',	'用于角色的核心跃升和天赋的升级。\n\n通过基础理化反应得到的良传导材料，电流经过后，会发出更剧烈的荧光。'},
{'90722',	'90722',	'23',	'907',	'1',	'',	'',	'星币',	'',	'',	'',	'',	'',	'',	'2',	'',	'[[10001,1000,2]]',	'',	'[[10102,2]]',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'-1',	'-1',	'0',	'0',	'',	'',	'',	'',	'一种可转换为能量的硬通货，有着大量使用价值，可用来与碎星人进行贸易。'},
{'90723',	'90723',	'24',	'907',	'1',	'',	'',	'技术点',	'',	'',	'',	'',	'',	'',	'2',	'',	'[[10003,1000,2]]',	'',	'[[10102,2]]',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'-1',	'-1',	'0',	'0',	'',	'',	'',	'',	'压缩的技术数据，能够用来提升角色的核心等级，通常存储在解析库中。'},
{'90724',	'90724',	'1',	'907',	'1',	'',	'',	'雪域众神',	'',	'',	'',	'',	'',	'',	'5',	'',	'[[61024,1,2]]',	'',	'[[10102,2000]]',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'1',	'1',	'0',	'0',	'',	'',	'',	'',	'获得后在看板中解锁【雪域众神】插图'},
{'90725',	'90725',	'4',	'907',	'1',	'',	'',	'传说星尘券',	'',	'',	'',	'',	'',	'',


used for SageMaker interactions (default: None). If not
                specified, one is created using the default AWS configuration
                chain.

        Returns:
            sagemaker.model_monitor.ConstraintViolations: The instance of ConstraintViolations
                generated from the s3 uri.

        """
        sagemaker_session = sagemaker_session or Session()
        file_name = file_name or "constraint_violations.json"
        desired_s3_uri = s3.s3_path_join(
            "s3://",
            sagemaker_session.default_bucket(),
            sagemaker_session.default_bucket_prefix,
            "monitoring",
            str(uuid.uuid4()),
            file_name,
        )
        s3_uri = s3.S3Uploader.upload_string_as_file_body(
            body=constraint_violations_file_string,
            desired_s3_uri=desired_s3_uri,
            kms_key=kms_key,
            sagemaker_session=sagemaker_session,
        )

        return ConstraintViolations.from_s3_uri(
            constraint_violations_file_s3_uri=s3_uri,
            kms_key=kms_key,
            sagemaker_session=sagemaker_session,
        )

    @classmethod
    def from_file_path(cls, constraint_violations_file_path, kms_key=None, sagemaker_session=None):
        """Initializes a ConstraintViolations object from a file path.

        Args:
            constraint_violations_file_path (str): The path to the constraint violations file.
            kms_key (str): The kms_key to use when encrypting the file in S3.
            sagemaker_session (sagemaker.session.Session): A SageMaker Session
                object, used for SageMaker interactions (default: None). If not
                specified, one is created using the default AWS configuration
                chain.

        Returns:
            sagemaker.model_monitor.ConstraintViolations: The instance of ConstraintViolations
                generated from the local file path.

        """
        file_name = os.path.basename(constraint_violations_file_path)

        with open(constraint_violations_file_path, "r") as f:
            file_body = f.read()

        return ConstraintViolations.from_string(
            constraint_violations_file_string=file_body,
            file_name=file_name,
            kms_key=kms_key,
            sagemaker_session=sagemaker_session,
        )


",	() => service.GetNotFoundWithNoMessageWhenExpectedNumberTask().ToResult()),
				app.MapGet("GetNotFoundWithMessageWhenExpectedNumber",		() => service.GetNotFoundWithMessageWhenExpectedNumber().ToResult()),
				app.MapGet("GetNotFoundWithMessageWhenExpectedNumberTask",	() => service.GetNotFoundWithMessageWhenExpectedNumberTask().ToResult()),
				app.MapGet("GetNotFoundWithMessagesWhenExpectedNumber",		() => service.GetNotFoundWithMessagesWhenExpectedNumber().ToResult()),
				app.MapGet("GetNotFoundWithMessagesWhenExpectedNumberTask",	() => service.GetNotFoundWithMessagesWhenExpectedNumberTask().ToResult()),

				app.MapGet("GetNotFoundWithNoMessageWhenExpectedNumberTuple",	() => service.GetNotFoundWithNoMessageWhenExpectedNumberTuple().ToResult()),
				app.MapGet("GetNotFoundWithNoMessageWhenExpectedNumberTupleTask",() => service.GetNotFoundWithNoMessageWhenExpectedNumberTupleTask().ToResult()),
				app.MapGet("GetNotFoundWithMessageWhenExpectedNumberTuple",		() => service.GetNotFoundWithMessageWhenExpectedNumberTuple().ToResult()),
				app.MapGet("GetNotFoundWithMessageWhenExpectedNumberTupleTask",	() => service.GetNotFoundWithMessageWhenExpectedNumberTupleTask().ToResult()),
				app.MapGet("GetNotFoundWithMessagesWhenExpectedNumberTuple",		() => service.GetNotFoundWithMessagesWhenExpectedNumberTuple().ToResult()),
				app.MapGet("GetNotFoundWithMessagesWhenExpectedNumberTupleTask",	() => service.GetNotFoundWithMessagesWhenExpectedNumberTupleTask().ToResult())
			};

		foreach (var route in routes)
		   route.WithTags("Failed: 404 NotFound")
				.ProducesProblem(StatusCodes.Status404NotFound);
	}
}


activatorType}) {
    if (this.modifiers == null) {
      this.modifiers = [];
    }
  }

  Map<String, dynamic> toJson() =>
  {
    'activatorType': activatorType,
    'key': key,
    'modifier': modifiers
  };

  factory Command.fromJson(Map<String, dynamic> json) {
    if (json['modifier'] == null && json['Modifier'] == null) {
      json['modifier'] = [];
    }

    //handle both case possibilities
    var jsonMods;
    List<String>? mods = [];
    if (json.containsKey('modifier'))
      jsonMods = json['modifier'];
    else if (json.containsKey('Modifier'))
      jsonMods = json['Modifier'];
    if (jsonMods != null)
      mods = List<String>.from(jsonMods);

    String? jsonKey = "";
    if (json.containsKey('key'))
      jsonKey = json['key'];
    else if (json.containsKey('Key'))
      jsonKey = json['Key'];

    int? jsonActivator=0;
    if (json.containsKey('activatorType'))
      jsonActivator = json['activatorType'];
    else if (json.containsKey('ActivatorType'))
      jsonActivator = json['ActivatorType'];

    return Command(
      key: jsonKey,
      modifiers: mods,
      activatorType: jsonActivator
    );
  }

}
import 'package:flutter/material.dart';
import 'package:gic_flutter/src/backend/models/intl/localizations.dart';

enum LauncherText {
  toolbarTitle,

  errorPort,
  errorPassword,
  errorUnauthorized,
  errorServerInvalid,
  errorServerError,
  errorFirewall,
  errorVersion,
  errorOutOfDate,

  address,
  port,
  password,
  passwordWarning,
  start,
  close,
  next,

  buttonNew,
  buttonImport,
  buttonUpdate,
  buttonEdit,
  buttonExport,
  buttonDelete,
  screenName,

  helpIpAddress,
  helpPort,
  helpPassword,
  helpScreenManager,
  helpStart,
  helpNew,
  helpScreenName,
  helpExport,
  helpEdit,
  helpDelete,
  helpUpdate,
  helpImport,

  menuOptions,
  menuIntro,
  menuAbout,
  menuFeedback,
  menuImport,

  deleteError,
  deleteConfirm,
  deleteConfirmTitle,
  deleteComplete,

  exportComplete,
  importComplete,
  nameUpdated,

  loading,
  yes,
  no,
  ok,
  resize,
  cont,
  recommendResize,
  saveToFolder,
  saveToFolderPickText,
  resizeScreen,
  resizeScreenText,
  upgradeServer,

  serverError,
  serverErrorDetails,
  sendTips,
  sendDownload,
  linkToTips,
  connecting,

  warningTitle,
  warningText,
  emptyWarningTitle,
  emptyWarningText
}

class IntlLauncher {
  BuildContext _context;

  IntlLauncher(this._context);

  String text(LauncherText text) {
    return _localizedStrings[Intl.of(_context)?.locale.languageCode]![text]!;
  }

  static Map<String, Map<LauncherText, String>> _localizedStrings = {
    'en': {
      LauncherText.toolbarTitle: 'Launcher',
      LauncherText.errorPassword:
      'Invalid password, it must be at least 6 digits long',
      LauncherText.errorUnauthorized:
      'Unauthorized Response from Server, validate your password matches the servers',
      LauncherText.errorPort: 'Invalid Port Number',
      LauncherText.errorServerInvalid: 'Invalid Server Address',
      LauncherText.errorServerError: 'Server Error: ',
      LauncherText.errorFirewall:
          'Error connecting, check that the server is running and firewall ports opened',
      LauncherText.errorOutOfDate:
          'There is a new version of GIC Server.  Please update it before continuing.  Visit https://github.com/Terence-D/GamingInterfaceCommandServer/releases on your computer or click the button below to send an email to yourse


_port());
    }
    if (from.has_res()) {
      mutable_res()->::CMsgGCCStrike15_v2_MatchmakingGC2ClientReserve::MergeFrom(from.res());
    }
    if (from.has_errormsg()) {
      set_errormsg(from.errormsg());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

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

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

bool CMsgGCCStrike15_v2_ClientRequestJoinServerData::IsInitialized() const {

  return true;
}

void CMsgGCCStrike15_v2_ClientRequestJoinServerData::Swap(CMsgGCCStrike15_v2_ClientRequestJoinServerData* other) {
  if (other != this) {
    std::swap(version_, other->version_);
    std::swap(account_id_, other->account_id_);
    std::swap(serverid_, other->serverid_);
    std::swap(server_ip_, other->server_ip_);
    std::swap(server_port_, other->server_port_);
    std::swap(res_, other->res_);
    std::swap(errormsg_, other->errormsg_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata CMsgGCCStrike15_v2_ClientRequestJoinServerData::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = CMsgGCCStrike15_v2_ClientRequestJoinServerData_descriptor_;
  metadata.reflection = CMsgGCCStrike15_v2_ClientRequestJoinServerData_reflection_;
  return metadata;
}

// ===================================================================

#ifndef _MSC_VER
const int CMsgGCCstrike15_v2_ClientRequestNewMission::kMissionIdFieldNumber;
const int CMsgGCCstrike15_v2_ClientRequestNewMission::kCampaignIdFieldNumber;
#endif  // !_MSC_VER

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

void CMsgGCCstrike15_v2_ClientRequestNewMission::InitAsDefaultInstance() {
}

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

void CMsgGCCstrike15_v2_ClientRequestNewMission::SharedCtor() {
  _cached_size_ = 0;
  mission_id_ = 0u;
  campaign_id_ = 0u;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

CMsgGCCstrike15_v2_ClientRequestNewMission::~CMsgGCCstrike15_v2_ClientRequestNewMission() {
  SharedDtor();
}

void CMsgGCCstrike15_v2_ClientRequestNewMission::SharedDtor() {
  if (this != default_instance_) {
  }
}

void CMsgGCCstrike15_v2_ClientRequestNewMission::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descr


  private _isEcho = false;

  private syncView(source: Viewport, target: Viewport) {
    if (this._isEcho) return;
    this._isEcho = true; // so we don't react to the echo of this sync
    target.applyViewState(source.view.clone(target.iModel));
    this._isEcho = false;
  }

  /** Establish the connection between two Viewports. When this method is called, view2 is initialized with the state of view1. */
  public connect(view1: Viewport, view2: Viewport) {
    this.disconnect();

    const viewState2 = view1.view.clone(view2.iModel); // use view1 as the starting point
    view2.applyViewState(viewState2);

    // listen to the onViewChanged events from both views
    this._disconnect.push(view1.onViewChanged.addListener(() => this.syncView(view1, view2)));
    this._disconnect.push(view2.onViewChanged.addListener(() => this.syncView(view2, view1)));
  }

  /** Remove the connection between the two views. */
  public disconnect() {
    this._disconnect.forEach((f) => f());
    this._disconnect.length = 0;
  }
}

import {ModuleContainer} from "../../../../src/build/module/ModuleContainer";
import {ClassmapTask} from "../../../../src/build/task/ClassmapTask";
import {TemplatesTask} from "../../../../src/build/task/TemplatesTask";

/**
 * ClassmapTask
 */
describe('TemplateCacheTask', () =>
{
	let classmapOutputFilePath = __dirname + "/cache/classmap.js";
	let viewCacheOutputFilePath = __dirname + "/cache/templates.js";

	beforeAll(() =>
	{
		/**
		 * Build Classmap
		 */

		let buildClassmapTask = new ClassmapTask(
			{
				projectRootDirPath: __dirname,
				outputFilePath: classmapOutputFilePath,
				groups: {
					abstract: "^(Abstract|abstract.*$).*\.ts$"
				}
			}
		);

		buildClassmapTask.run();

		/**
		 * Build View Cache
		 */

		let viewCacheTask = new TemplatesTask(
			{
				projectRootDirPath: __dirname,
				classmapFilePath: __dirname + "/cache/classmap.js",
				outputFilePath: viewCacheOutputFilePath
			}
		);

		viewCacheTask.run();
	});

	afterAll(() =>
	{
		let moduleContainer = new ModuleContainer();
		let fileSystemModule = moduleContainer.getFileSystemModule();

		// Remove classmap
		fileSystemModule.removeFile(classmapOutputFilePath);

		// Remove pathmap
		let pathmapFilePath = classmapOutputFilePath.replace(/[^/]+\..+/, 'pathmap.js');
		fileSystemModule.removeFile(pathmapFilePath);

		// Remove view cache
		fileSystemModule.removeFile(viewCacheOutputFilePath);
	});

	test('View cache file is created with the correct name and file path', () =>
	{
		let moduleContainer = new ModuleContainer();
		let fileSystemModule = moduleContainer.getFileSystemModule();

		let fileContents = fileSystemModule.readAsTextString(viewCacheOutputFilePath);

		expect(typeof fileContents).toBe('string');
		expect(fileContents.length).toBeGreaterThan(1);
	});

	test('View cache cam be imported and is of type "object"', () =>
	{
		let viewCache = require(viewCacheOutputFilePath);
		expect(viewCache).toBeInstanceOf(Object);
	});

	test('View cache holds the correct number of views', () =>
	{
		let viewCache = require(viewCacheOutputFilePath);
		expect(Object.keys(viewCache).length).toBe(3);
	});

	test('View cache holds the correct types', () =>
	{
		let viewCache = require(viewCacheOutputFilePath);

		for (let componentName in viewCache)
			if (viewCache.hasOwnProperty(componentName))
		{
			let viewTemplateString = viewCache[componentName];

			expect(typeof componentName).toBe('string');
			expect(typeof viewTemplateString).toBe('string');
		}
	});

});import {
  BelongsToMany, Column, DataType, Model, Scopes, Table,
} from 'sequelize-typescript';
import Type from './type';


/resource/sass/small-components/_notification_ios.scss */
  100% {
    opacity: 0;
  }
}
@-o-keyframes ios-overlay-hide {
  /* line 101, ../../../../css/resource/sass/small-components/_notification_ios.scss */
  0% {
    opacity: 1;
  }

  /* line 102, ../../../../css/resource/sass/small-components/_notification_ios.scss */
  100% {
    opacity: 0;
  }
}
@keyframes ios-overlay-hide {
  /* line 105, ../../../../css/resource/sass/small-components/_notification_ios.scss */
  0% {
    opacity: 1;
  }

  /* line 106, ../../../../css/resource/sass/small-components/_notification_ios.scss */
  100% {
    opacity: 0;
  }
}
/* line 24, ../../../../css/resource/sass/_common_web.scss */
.web-items-no-results {
  color: #918f8f;
  font-weight: 100;
  width: 60%;
  font-size: 24px;
  margin: 0 auto;
  padding: 75px;
}

/* line 1, ../../../../css/resource/sass/shared-components/_setup.scss */
.setup {
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAC8CAMAAAD1lzSZAAAAGFBMVEX09PTz8/P19fXw8PDx8fHy8vLv7+/29vaaLifpAAAcrElEQVR42p1di3rsNqsFibjv/8anXBcYp/m/492IEaCpZyIvcZNCejExKz3MTByECeQwEbuOcZxQEgbhQ4zxNorvZRaSK9qTS8IkyWJh9lZZTN7yFVJBsYQlWEJcAv9/EusLMsJGVOhSJmMqsUs+b14GUR3rCYvobekL3JBoK50lwaLrn2QI8uY5WJws8i9HOaSExNliTJPla+2R92JMNVOVS9U/MF/teEv3kkqEiQ5fPkR0RVsRE1y2EXJU14bLpeNv4rpMR66+VsZRyp1QEXr3zvjKTXBcBh2Q+Axx8+I3r8xbn0cg4BTYp3rpiuoqqwRH6IdFRH+cjF5cV9gpN+6dxGWpeiV66+Y5v00TDJYwh+6p3xJ0+eFT34D4r49Y7n2e+2+jRP9pI0rkes9Jyq74qy68QcT15JF8L2I58sTNH4lp8y9LW5vzJmBWAW4+fxmH+dy8eRIVnPhU+m4xZaUTBiFSQmBOVQomf4ynGD/nvNxjc56OsXxqK0TlnCcyVrQqUC0fnnP+Xh1Rc1WCEAhmuetIEFaypr5fYj0QZ


EVOKE_PARTY_NOT_AGREE = "Ķ<link 0>롣\n",
		EVOKE_QINGMINGJIE_ZUIYUAN_EVOKE_MSG_MSG = "Ķ<link 0>롣\n",

		ON_APPRENTICE_ONLINE = "״<link 0>ˡ\n",
		ON_MENTOR_ONLINE = "״ʦ<link 0>ˣЭ\n",
		ON_YOU_BREAK_APPRENTICE = "״<link 0>ϵС\n",
		ON_APPRENTICE_BREAK_YOU = "״<link 0>ϵС\n",
		ON_MENTOR_BREAK_YOU = "״ʦ<link 0>ϵС\n",
		ON_YOU_BREAK_MENTOR = "״ʦ<link 0>ϵС\n",
		ON_SEEK_MENTOR_YELL_SUCESS = "ɹѰ״ʦϢ90ĴʦͽƵİʦϢ\n",
		ON_SEEK_DAPPRENTICE_YELL_SUCESS = "ɹѰ״ӵϢ90µСʦͽƵͽϢ\n",
		ON_SEEK_MENTOR_YELL_LIMIT = "Ѿ͹һΰʦϢˣԺٷ\n",
		ON_SEEK_APPRENTICE_YELL_LIMIT = "Ѿ͹һͽϢˣԺٷ\n",
		MENTOR_MSG_MENTOR_QUERY_BIRTH_MAP_FAILED = "Ŀǰִ嶼ԱԺԣ\n",
		NO_RIGHT = "ûа״ʦʸ뵽ʦõ䴦״ʦͽϵ\n",
		SELF_MENTOR = "ʺʦʺţʺµнɫܰ״ʦ뵽ʦõ䴦״ʦͽϵ\n",
		SELF_APPRENTICE_FULL = "޷ո״ӡ\n",
		MENTOR_APPRENTICE_FULL = "ԷѾ޷ո״ӡ\n",
		SELF_APPRENTICE ="ʺǵʺţʺµнɫ״ӣ뵽ʦõ䴦״ʦͽϵ\n",
		MENTOR_APPRENTICE = "Է޷Ϊ״ʦ\n",

		GRADUATE_BY_DIRECT_APPRENTICE_RESULT = "ѡԼʦ\n",
		GRADUATE_BY_DIRECT_APPRENTICE_NOTIFY = "ͽѡԼʦ\n",
		GRADUATE_BY_DIRECT_MENTOR_RESULT = "ѡͽܳʦ\n",
		GRADUATE_BY_DIRECT_MENTOR_NOTIFY = "ʦѡʦ\n",
		CANCEL_GRADUATE_BY_DIRECT_APPRENTICE_RESULT = "ȡԼʦ\n",
		CANCEL_GRADUATE_BY_DIRECT_APPRENTICE_NOTIFY = "ͽȡԼʦ\n",
		CANCEL_GRADUATE_BY_DIRECT_MENTOR_RESULT = "ȡͽܳʦ\n",
		CANCEL_GRADUATE_BY_DIRECT_MENTOR_NOTIFY = "ʦȡʦ\n",

		MENTOR_NO_RIGHT = "Էû״ʦȨ\n",
		MENTOR_ROLE_REMOTE  = "Էǿңܽ״Ӱʦ\n",
		SELF_REMOTE_DIRECT_MENTOR_LIMIT = "Լǿңܷ״Ӱʦ\n",
	},

	APPRENTICE_NUM = "״<D0>/<D1>  յ<D2>/<D3>",
	MENTOR_NUM = "ɰ״ʦ<D0>/<D1>  ɰʦ<D2>/


set offset, double dimension) {
  // Build a square Size as used for painting.
  final Size size = Size(dimension, dimension);

  // One grid unit in canvas coordinates (outer ring reference).
  final double unitDistance = (dimension - boardMargin * 2) / 6;
  // Accept taps roughly within half a unit distance from a point.
  final double threshold = unitDistance * 0.5;

  Offset? nearestPoint;
  double nearestDistance = double.infinity;

  // Iterate over all 24 logical points, compute their canvas position with the
  // same scaling used for painting, then find the closest one.
  for (final Offset gridPt in points) {
    final Offset canvasPt = offsetFromPointWithInnerSize(gridPt, size);
    final double dist = (offset - canvasPt).distance;
    if (dist < nearestDistance) {
      nearestDistance = dist;
      nearestPoint = gridPt;
    }
  }

  // If the tap is too far from any point, return an invalid value (e.g. Offset(-1,-1)).
  if (nearestPoint == null || nearestDistance > threshold) {
    return const Offset(-1, -1);
  }

  // Round to ensure integer grid coordinates.
  return nearestPoint.round();
}

/// Calculates the offset for the given position
Offset offsetFromPoint(Offset point, Size size) =>
    (point * (size.width - boardMargin * 2) / 6) +
    Offset(boardMargin, boardMargin);

/// Calculates the offset for the given position with adjustable inner ring size
/// This function ensures equal distance between outer-middle and middle-inner rings
Offset offsetFromPointWithInnerSize(Offset point, Size size) {
  // Inner ring size factor (distance from center relative to original inner distance which is 1 grid unit).
  // Range: 1.0-1.5 with 0.05 step increments.
  final double innerRingSize = DB().displaySettings.boardInnerRingSize;

  // Center of the board in canvas coordinates.
  final Offset center = Offset(size.width / 2, size.height / 2);
  // One grid distance in canvas units.
  final double unitDistance = (size.width - boardMargin * 2) / 6;

  // Convert board point to canvas position using the default mapping (no scaling).
  final Offset originalPos =
      (point * unitDistance) + Offset(boardMargin, boardMargin);
  final Offset vectorFromCenter = originalPos - center;

  // Determine the ring index in the original 7×7 grid.
  final int ringOriginal =
      (point.dx - 3).abs().toInt().clamp(0, 3) >
          (point.dy - 3).abs().toInt().clamp(0, 3)
      ? (point.dx - 3).abs().toInt()
      : (point.dy - 3).abs().toInt();
  // ringOriginal will be 0 (center), 1 (inner), 2 (middle) or 3 (outer).
  if (ringOriginal == 0) {
    // Center point (should not occur for valid board points) – return as-is.
    return originalPos;
  }

  // Target radial lengths (in grid units) after scaling.
  const double targetOuter = 3.0; // keep outer ring unchanged
  final double targetInner = innerRingSize; // user-defined (1.0-1.5)
  final double targetMiddle =
      (targetOuter + targetInner) / 2.0; // ensure equal spacing

  double targetLen;
  switch (ringOriginal) {
    case 1:
      targetLen = targetInner;
      break;
    case 2:
      targetLen = targetMiddle;
      break;
    case 3:
    default:
      targetLen = targetOuter;
      break;
  }

  // Compute scale factor to convert original vector length (ringOriginal) to targetLen.
  final double scaleFactor = targetLen / ringOriginal;
  final Offset scaledVector = vectorFromCenter * scaleFactor;

  return center + scaledVector;
}

Offset offsetFromPoint2(Offset point, Size size) =>
    (point * (size.width - boardMargin * 2) / 6) +
    Offset(boardMargin, boardM


 14.9%, 1);
  --red-50: hsla(351, 100%, 96.08%, 1);
  --red-100: hsla(349.71, 100%, 86.27%, 1);
  --red-200: hsla(350.16, 100%, 74.9%, 1);
  --red-300: hsla(349.84, 100%, 64.12%, 1);
  --red-400: hsla(341.88, 100%, 50%, 1);
  --red-500: hsla(344.87, 100%, 44.31%, 1);
  --red-600: hsla(347.82, 100%, 38.63%, 1);
  --red-700: hsla(351.43, 100%, 32.94%, 1);
  --red-800: hsla(355.25, 100%, 27.25%, 1);
  --red-900: hsla(359.45, 100%, 21.57%, 1);
  --red-1000: hsla(0, 100%, 15.88%, 1);
  --red-1100: hsla(0, 100%, 10.2%, 1);
  --red-1200: hsla(0, 100%, 4.51%, 1);
  --purple-100: hsla(307.5, 88.89%, 96.47%, 1);
  --purple-200: hsla(294.29, 91.3%, 90.98%, 1);
  --purple-300: hsla(289.74, 92.68%, 83.92%, 1);
  --purple-400: hsla(287.48, 93.5%, 75.88%, 1);
  --purple-500: hsla(284.7, 86.13%, 66.08%, 1);
  --purple-600: hsla(283.97, 53.47%, 51.96%, 1);
  --purple-700: hsla(282.58, 44.93%, 40.59%, 1);
  --purple-800: hsla(282.53, 48.47%, 31.96%, 1);
  --purple-900: hsla(282.46, 51.18%, 24.9%, 1);
  --purple-1000: hsla(282.55, 57.89%, 18.63%, 1);
  --teal-100: hsla(170, 96.43%, 89.02%, 1);
  --teal-200: hsla(171.56, 91.43%, 72.55%, 1);
  --teal-300: hsla(173.19, 62.11%, 55.49%, 1);
  --teal-400: hsla(173.51, 44.94%, 48.43%, 1);
  --teal-500: hsla(173.92, 36.74%, 42.16%, 1);
  --teal-600: hsla(174.23, 29.55%, 34.51%, 1);
  --teal-700: hsla(172.5, 29.41%, 26.67%, 1);
  --teal-800: hsla(173.33, 36%, 19.61%, 1);
  --teal-900: hsla(172.94, 48.57%, 13.73%, 1);
  --teal-1000: hsla(172.73, 73.33%, 8.82%, 1);
}
/* Remove the Google Fonts import */
/* @import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&display=swap'); */

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --neon-teal: #00e5cc;
    --neon-blue: #01cdfe;
    --neon-green: #05ffa1;
    --neon-navy: #0077b6;
    --neon-yellow: #fffb96;
    --dark-bg: #1a1a1a;
    --card-bg: rgba(255, 255, 255, 0.1);
    --glass-effect: rgba(255, 255, 255, 0.05);
    --text-color: #ffffff;

    --background: 0 0% 10%;
    --foreground: 0 0% 100%;

    --card: 0 0% 10%;
    --card-foreground: 0 0% 100%;

    --popover: 0 0% 10%;
    --popover-foreground: 0 0% 100%;

    --primary: 190 100% 36%;
    --primary-foreground: 0 0% 10


0;i<fVar.GetAtomicCount();i++)
            s->WriteLE16(fS[j+i]);
        break;
    case plVarDescriptor::kByte:
        for(i=0;i<fVar.GetAtomicCount();i++)
            s->WriteByte(fBy[j+i]);
        break;
    case plVarDescriptor::kFloat:
        s->WriteLEFloat(fVar.GetAtomicCount(), &fF[j]);
        break;
    case plVarDescriptor::kTime:
        for(i=0;i<fVar.GetAtomicCount();i++)
        {
            if (timeConvert != 0.0)
            {
                double utDouble=fT[j+i].GetSecsDouble();
                utDouble += timeConvert;
                plUnifiedTime ut(utDouble);
                ut.Write(s);
            }
            else
                fT[j+i].Write(s);
        }
        break;
    case plVarDescriptor::kDouble:
        for(i=0;i<fVar.GetAtomicCount();i++)
            s->WriteLEDouble(fD[j+i]);
        break;
    case plVarDescriptor::kBool:
        for(i=0;i<fVar.GetAtomicCount();i++)
            s->WriteBool(fB[j+i]);
        break;
    case plVarDescriptor::kKey:
        for(i=0;i<fVar.GetAtomicCount();i++)
            fU[j+i].Write(s);
        break;
    case plVarDescriptor::kString32:
        for(i=0;i<fVar.GetAtomicCount();i++)
            s->Write(32, fS32[j+i]);
        break;
    case plVarDescriptor::kCreatable:
        {
            hsAssert(fVar.GetAtomicCount()==1, "invalid atomic count");
            plCreatable* cre = fC[j];
            s->WriteLE16(cre ? cre->ClassIndex() : uint16_t(0x8000));   // creatable class index
            if (cre)
            {
                hsRAMStream ramStream;
                cre->Write(&ramStream, hsgResMgr::ResMgr());
                s->WriteLE32(ramStream.GetEOF());     // write length
                cre->Write(s, hsgResMgr::ResMgr());     // write data
            }
        }
        break;
    default:
        break;
    }
    return true;
}

bool plSimpleStateVariable::IReadData(hsStream* s, float timeConvert, int idx)
{
    int j=idx*fVar.GetAtomicCount();
    int i;
    switch(fVar.GetAtomicType())
    {
    case plVarDescriptor::kAgeTimeOfDay:
        // don't need to read in ageTime, since it's computed on the fly when Get is called
        break;
    case plVarDescriptor::kInt:
        for(i=0;i<fVar.GetAtomicCount();i++)
            fI[j+i]=s->ReadLE32();
        break;
    case plVarDescriptor::kShort:
        for(i=0;i<fVar.GetAtomicCount();i++)
            fS[j+i]=s->ReadLE16();
        break;
    case plVarDescriptor::kByte:
        for(i=0;i<fVar.GetAtomicCount();i++)
            fBy[j+i]=s->ReadByte();
        break;
    case plVarDescriptor::kFloat:
        s->ReadLEFloat(fVar.GetAtomicCount(), &fF[j]);
        break;
    case plVarDescriptor::kTime:
        for(i=0;i<fVar.GetAtomicCount();i++)
        {
            fT[j+i].Read(s);
            if (timeConvert != 0.0)
            {
                double newUt = (fT[j+i].GetSecsDouble() + timeConvert);
                hsAssert(newUt>=0, "negative unified time");
                fT[j+i].SetSecsDouble(newUt);
            }
        }
        break;
    case plVarDescriptor::kDouble:
        for(i=0;


   根据中央一九六二年八月十七日“采取有效措施，制止森林破坏”的指示，我们责成西北局农村工作部写成“西北地区林木破坏情况的报告”，现转报中央。

   原件附后。

   中央西北局一九六二年十一月廿三日

   关于西北地区林木破坏情况的报告

    西北局书记处：

   根据书记处的指示，现将西北地区林木破坏情况和我们的意见，报告如下：

   解放以来，西北地区的林业有了很大发展。根据各地报告和调查材料分析，十三年来全区造林面积，初步落实数字，约有二千余万亩。一九五八年以后，林业工作又了新的进展。到目前为止，已建立国营林场四百余处，国营造林三百七十余万亩，封育成林一千三百余万亩；建立森工企业三十五个，修建林区公路两千余公里，生产木材三百多万立米。同时还作了大量的林业调查和营林工作，培养了很多技术干部和工人。积累了许多经验。所有这些，对国家经济建设，农牧业生产，保护交通，保持水土，涵养水源，防风固沙等等，都起到了一定作用。

   但是，近几年来西北地区林木破坏是十分严重的。许多平川、丘陵地区，零星树木被砍约三分之一，成片林木被毁约五分之一。如陇西境内陇海、咸铜铁路沿线的护路树林被砍60%；关中泾、渭、洛三大灌区的护梁树被砍三万多棵。甘肃天水小陇山、武山滩歌等国有林区被砍三分之一；陇西县四十一万亩森林被砍15%，二十七万多亩幼林被毁一半。目前大部地区林木破坏仍未停止，有些地区破坏情况越来越严重。林


 org.oppia.android.util.accessibility.AccessibilityTestModule
import org.oppia.android.util.caching.AssetModule
import org.oppia.android.util.caching.testing.CachingTestModule
import org.oppia.android.util.gcsresource.GcsResourceModule
import org.oppia.android.util.locale.LocaleProdModule
import org.oppia.android.util.logging.LoggerModule
import org.oppia.android.util.logging.SyncStatusModule
import org.oppia.android.util.logging.firebase.FirebaseLogUploaderModule
import org.oppia.android.util.networking.NetworkConnectionDebugUtilModule
import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule
import org.oppia.android.util.parser.html.HtmlParserEntityTypeModule
import org.oppia.android.util.parser.image.ImageParsingModule
import org.robolectric.annotation.Config
import org.robolectric.annotation.LooperMode
import javax.inject.Inject
import javax.inject.Singleton

private const val TOLERANCE = 1e-5f

/** Tests for [MarginBindingAdapters]. */
@RunWith(AndroidJUnit4::class)
@LooperMode(LooperMode.Mode.PAUSED)
@Config(application = MarginBindingAdaptersTest.TestApplication::class, qualifiers = "port-xxhdpi")
class MarginBindingAdaptersTest {
  @get:Rule val initializeDefaultLocaleRule = InitializeDefaultLocaleRule()
  @get:Rule val oppiaTestRule = OppiaTestRule()

  @Inject lateinit var context: Context
  @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers

  @Before
  fun setUp() {
    setUpTestApplicationComponent()
    Intents.init()
    testCoroutineDispatchers.registerIdlingResource()
  }

  @After
  fun tearDown() {
    testCoroutineDispatchers.unregisterIdlingResource()
    Intents.release()
  }

  @Config(qualifiers = "land")
  @Test
  fun testMarginBindableAdapters_landscape_topAndBottomIsCorrect() {
    testMarginBindableAdapters_topAndBottomIsCorrect()
  }

  @Config(qualifiers = "sw600dp-land")
  @Test
  fun testMarginBindableAdapters_landscapeWide_topAndBottomIsCorrect() {
    testMarginBindableAdapters_topAndBottomIsCorrect()
  }

  @Config(qualifiers = "port")
  @Test
  fun testMarginBindableAdapters_ltrIsEnabled_port_marginStartAndMarginEndForLtrIsCorrect() {
    runWithLaunchedActivity {
      val textView = onActivityResult {
        val textView: TextView = it.findViewById(R.id.test_margin_text_view)
        setLayoutMarginStart(textView, /* marginStart= */ 24f)
        setLayoutMarginEnd(textView, /* marginEnd= */ 40f)
        return@onActivityResult textView
      }
      /*
     * Note that the margin starts/ends below match the ones set above because, when the adapters are
     * working correctly in RTL mode, the start/end should be exactly the start/end originally set.
     */
      assertThat(textView.marginStart.toFloat()).isWithin(TOLERANCE).of(24f)
      assertThat(textView.marginEnd.toFloat()).isWithin(TOLERANCE).of(40f)
    }
  }

  @Config(qualifiers = "land")
  @Test
  fun testMarginBindableAdapters_ltrIsEnabled_landscape_marginStartAndMarginEndForLtrIsCorrect() {
    runWithLaunchedActivity {
      val textView = onActivityResult {
        val textView: TextView = it.findViewById(R.id.test_margin_text_view)
        setLayoutMarginStart(textView, /* marginStart= */ 24f)
        setLayoutMarginEnd(textView, /* marginEnd= */ 40f)
        return@onActivityResult te


(--dui-clr-orange-l-3);
}
.dui.dui-shadow-orange-l-3 {
    --dui-shadow-clr: var(--dui-clr-orange-l-3);
}
.dui.dui-text-decoration-orange-l-3{
    --dui-text-decoration-clr: var(--dui-clr-orange-l-3);
    text-decoration-color: var(--dui-clr-orange-l-3);
}
.dui.dui-border-orange-l-3{
    --dui-border-clr: var(--dui-clr-orange-l-3);
    border-color: var(--dui-clr-orange-l-3);
}
.dui.dui-border-x-orange-l-3{
    --dui-border-x-clr: var(--dui-clr-orange-l-3);
    border-left-color: var(--dui-clr-orange-l-3);
    border-right-color: var(--dui-clr-orange-l-3);
}
.dui.dui-border-y-orange-l-3{
    --dui-border-y-clr: var(--dui-clr-orange-l-3);
    border-top-color: var(--dui-clr-orange-l-3);
    border-bottom-color: var(--dui-clr-orange-l-3);
}
.dui.dui-border-t-orange-l-3{
    --dui-border-t-clr: var(--dui-clr-orange-l-3);
    border-top-color: var(--dui-clr-orange-l-3);
}
.dui.dui-border-r-orange-l-3{
    --dui-border-r-clr: var(--dui-clr-orange-l-3);
    border-right-color: var(--dui-clr-orange-l-3);
}
.dui.dui-border-b-orange-l-3{
    --dui-border-b-clr: var(--dui-clr-orange-l-3);
    border-bottom-color: var(--dui-clr-orange-l-3);
}
.dui.dui-border-l-orange-l-3{
    --dui-border-l-clr: var(--dui-clr-orange-l-3);
    border-left-color: var(--dui-clr-orange-l-3);
}
.dui.dui-divide-orange-l-3 > * + *{
    --dui-border-clr: var(--dui-clr-orange-l-3);
    border-color: var(--dui-clr-orange-l-3);
}
.dui.dui-outline-orange-l-3{
    --dui-outline-clr: var(--dui-clr-orange-l-3);
    outline-color: var(--dui-clr-orange-l-3);
}
.dui.dui-fg-orange-l-2 {
    --dui-fg-clr: var(--dui-clr-orange-l-2);
    --dui-text-color:var(--dui-fg-clr);
    color: var(--dui-clr-orange-l-2);
}
.dui.dui-bg-orange-l-2 {
    --dui-bg-clr: var(--dui-clr-orange-l-2);
    --dui-text-color: var(--dui-clr-white);
    background-color: var(--dui-clr-orange-l-2);
}
.dui.dui-accent-orange-l-2 {
    --dui-acce


O_DONT_CHECK_CONDITION) == 0)  // Test a CR bit
    {
      pConditionDontBranch =
          JumpIfCRFieldBit(inst.BI >> 2, 3 - (inst.BI & 3), !(inst.BO_2 & BO_BRANCH_IF_TRUE));
    }

    if (inst.LK)
    {
      MOVI2R(WA, js.compilerPC + 4);
      STR(IndexType::Unsigned, WA, PPC_REG, PPCSTATE_OFF_SPR(SPR_LR));
    }

    gpr.Flush(FlushMode::MaintainState, WB);
    fpr.Flush(FlushMode::MaintainState, ARM64Reg::INVALID_REG);

    if (IsDebuggingEnabled())
    {
      ARM64Reg bw_reg_a, bw_reg_b;
      // WC is only allocated when WA is needed for WriteExit and cannot be clobbered.
      if (WC == ARM64Reg::INVALID_REG)
        bw_reg_a = WA, bw_reg_b = WB;
      else
        bw_reg_a = WB, bw_reg_b = WC;
      const BitSet32 gpr_caller_save =
          gpr.GetCallerSavedUsed() & ~BitSet32{DecodeReg(bw_reg_a), DecodeReg(bw_reg_b)};
      WriteBranchWatch<true>(js.compilerPC, js.op->branchTo, inst, bw_reg_a, bw_reg_b,
                             gpr_caller_save, fpr.GetCallerSavedUsed());
    }
    if (js.op->branchIsIdleLoop)
    {
      // make idle loops go faster
      ARM64Reg XA = EncodeRegTo64(WA);

      MOVP2R(XA, &CoreTiming::GlobalIdle);
      BLR(XA);

      WriteExceptionExit(js.op->branchTo);
    }
    else
    {
      WriteExit(js.op->branchTo, inst.LK, js.compilerPC + 4, WA);
    }

    if ((inst.BO & BO_DONT_CHECK_CONDITION) == 0)
      SetJumpTarget(pConditionDontBranch);
    if ((inst.BO & BO_DONT_DECREMENT_FLAG) == 0)
      SetJumpTarget(pCTRDontBranch);
  }

  if (!analyzer.HasOption(PPCAnalyst::PPCAnalyzer::OPTION_CONDITIONAL_CONTINUE))
  {
    gpr.Flush(FlushMode::All, WA);
    fpr.Flush(FlushMode::All, ARM64Reg::INVALID_REG);
    if (IsDebuggingEnabled())
    {
      WriteBranchWatch<false>(js.compilerPC, js.compilerPC + 4, inst, WA, WB, {}, {});
    }
    WriteExit(js.compilerPC + 4);
  }
  else if (IsDebuggingEnabled())
  {
    const BitSet32 gpr_caller_save =
        gpr.GetCallerSavedUsed() & ~BitSet32{DecodeReg(WA), DecodeReg(WB)};
    WriteBranchWatch<false>(js.compilerPC, js.compilerPC + 4, inst, WA, WB, gpr_caller_save,
                            fpr.GetCallerSavedUsed());
  }
}

void JitArm64::bcctrx(UGeckoInstruction inst)
{
  INSTRUCTION_START
  JITDISABLE(bJITBranchOff);

  // Rare condition seen in (just some versions of?) Nintendo's NES Emulator
  // BO_2 == 001zy -> b if false
  // BO_2 == 011zy -> b if true
  FALLBACK_IF(!(inst.BO_2 & BO_DONT_CHECK_CONDITION));

  // bcctrx doesn't decrement and/or test CTR
  ASSERT_MSG(DYNA_REC, inst.BO_2 & BO_DONT_DECREMENT_FLAG,
             "bcctrx with decrement and test CTR option is invalid!");

  // BO_2 == 1z1


Coloso vagabundo",nil},
[51371] = {"Amazona de hipogrifos de Darnassus",nil},
[51372] = {"Jinete del viento de Cima del Trueno",nil},
[51373] = {"La Bomba",nil},
[51374] = {"Escala de cuerda",nil},
[51375] = {"Exploradora Cenarion Jalia",nil},
[51376] = {"Prisionero Colmen'Ashi",nil},
[51377] = {"Visión de Cho'gall",nil},
[51378] = {"Lobo espantoso",nil},
[51379] = {"Cho'gall Reveal Credit",nil},
[51380] = {"Apoderado cultor Colmen'Ashi del Martillo Crepuscular",nil},
[51382] = {"Egg Disguise Credit",nil},
[51383] = {"Jinete de grifos de Forjaz",nil},
[51384] = {"Murciélago Renegado",nil},
[51385] = {"Tentáculo azotador",nil},
[51386] = {"Prisionero corrupto",nil},
[51391] = {"Teletransportador de Trono de las Mareas",nil},
[51393] = {"Raquítico infectado",nil},
[51394] = {"Tentáculo garral gigante",nil},
[51395] = {"Teletransportador de Trono de las Mareas",nil},
[51396] = {"Teletransportador del Núcleo Pétreo",nil},
[51397] = {"Teletransportador del Núcleo Pétreo",nil},
[51398] = {"Machacahuesos Rom'ogg",nil},
[51400] = {"Mozo de cuadra encantado",nil},
[51401] = {"Madexx",nil},
[51402] = {"Madexx",nil},
[51403] = {"Madexx",nil},
[51404] = {"Madexx",nil},
[51405] = {"Tierra enfadada",nil},
[51406] = {"Temblor",nil},
[51407] = {"Cadenas de tragedia",nil},
[51409] = {"Lorna Crowley",nil},
[51410] = {"Chromaggus",nil},
[51411] = {"Neill Penny",nil},
[51412] = {"Magmadar",nil},
[51413] = {"Barón Geddon",nil},
[51414] = {"Shazzrah",nil},
[51415] = {"Gehennas",nil},
[51416] = {"Vaelian the Corrupt",nil},
[51417] = {"Theralion",nil},
[51418] = {"Faucefogo",nil},
[51419] = {"Jefe de Guerra Rend Puño Negro",nil},
[51420] = {"Gyth",nil},
[51421] = {"Ozruk",nil},
[51422] = {"Rupture Controller",nil},
[51423] = {"Ruptura",nil},
[51424] = {"Twilight Gateway Credit",nil},
[51425] = {"Quicksilver Submersion [INTERNAL]",nil},
[51426] = {"Cría cromática",nil},
[51427] = {"Cho'gall",nil},
[51428] = {"Tentáculo Garral",nil},
[51429] = {"Bruto de Orgrimmar",nil},
[51430] = {"Soldado Huida oscura",nil},
[51431] = {"Filollamas Huida oscura",nil},
[51432] = {"Arygos","Camada de Malygos"},
[51433] = {"Merithra de la Pesadilla",nil},
[51434] = {"Molino Tormenta de maná","El Maestro de forja"},
[51435] = {"Nave de guerra de la Alianza",nil},
[51436] = {"Nave de guerra de la Horda",nil},
[51437] = {"Maestro de forja Throngus",nil},
[51438] = {"Señor de linaje Capazote


rdered,
    V: ValueEnDe,
{
    type Item = (K, ValueIterMut<'a, V>);
    fn next(&mut self) -> Option<Self::Item> {
        self.inner.next().map(|(k, v)| {
            (
                pnk!(<K as KeyEnDeOrdered>::from_bytes(k)),
                ValueIterMut {
                    value: <V as ValueEnDe>::decode(&*v).unwrap(),
                    inner: v,
                },
            )
        })
    }
}

impl<'a, K, V> DoubleEndedIterator for MapxOrdIterMut<'a, K, V>
where
    K: KeyEnDeOrdered,
    V: ValueEnDe,
{
    fn next_back(&mut self) -> Option<Self::Item> {
        self.inner.next_back().map(|(k, v)| {
            (
                pnk!(<K as KeyEnDeOrdered>::from_bytes(k)),
                ValueIterMut {
                    value: <V as ValueEnDe>::decode(&*v).unwrap(),
                    inner: v,
                },
            )
        })
    }
}

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

pub struct Entry<'a, V>
where
    V: ValueEnDe,
{
    pub(crate) key: RawKey,
    pub(crate) hdr: &'a mut MapxOrdRawKey<V>,
}

impl<'a, V> Entry<'a, V>
where
    V: ValueEnDe,
{
    pub fn or_insert(self, default: &V) -> ValueMut<'a, V> {
        if !self.hdr.contains_key(&self.key) {
            self.hdr.set_value(&self.key, default);
        }
        pnk!(self.hdr.get_mut(&self.key))
    }
}

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

impl<K, V> vsdb_core::VsMgmt for MapxOrd<K, V> {
    vsdb_core::impl_vs_methods_nope! {}
}

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
<reponame>pacbypass/cmilk_private
use core::convert::TryInto;
use page_table::{PhysAddr, PageType};
use crate::time;
use crate::vtx::{VmExit, Register, CpuMode};
use crate::net::netmapping::NetMapping;
use crate::fuzz_session::{BasicRegisterState, Worker, Segment, Address};

/// Drive index to be used with bios int 13h calls
const DRIVE_INDEX: u8 = 0x80;

pub fn main() {
    // Halt all other cores
    if core!().id != 0 { cpu::halt(); }

    // Netmap the disk image
    let it = cpu::rdtsc();
    let disk = NetMapping::new("192.168.2.175:1911",
                               "winboot/windows_install.img", true)
        .expect("Failed to netmap disk");
    let disk_load_time = time::elapsed(it);

    print!("Disk was loaded in {:.4} seconds\n", disk_load_time);

    // Create a worker
    let mut worker = Worker::new(1, None);

    // Set the debug control and EFER
    worker.set_reg(Register::DebugCtl, 0);
    worker.set_reg(Register::Efer,     0);

    // Set the selectors
    worker.set_reg(Register::Es,   0);
    worker.set_reg(Register::Cs,   0);
    worker.set_reg(Register::Ss,   0);
    worker.set_reg(Register::Ds,   0);
    worker.set_reg(Register::Fs,   0);
    worker.set_reg(Register::Gs,


Dir.S2MM, 4), CORE_OUT_WORDS, offset=(2 * CORE_OUT_WORDS)),
                 TransferParams(DmaChannel(DmaDir.S2MM, 5), CORE_OUT_WORDS, offset=(3 * CORE_OUT_WORDS))
             ],
             [
                 TransferParams(DmaChannel(DmaDir.MM2S, 5), NUM_ROWS * DATA_OUT_WORDS, offset=0,
                             step=[1, N_SUBV, CORE_OUT_WORDS], wrap=[N_SUBV, Mgemm])
             ],
             sync_strategy=SyncStrategy.Parallel_N_to_1
        )
    ]
    code = compile_dma_config(shape, memtile_transfers, [])
    print(code)

def main():
    if not ShareIfmChannel:
        generate_prefill_bds()
    else:
        generate_token_bds()

if __name__ == '__main__':
    main()


    if not dropdown[prog][screen] then
        local spawnw
        spawnw = function(c)
            dropdown[prog][screen] = c

            -- Scratchdrop clients are floaters
            awful.client.floating.set(c, true)

            -- Client geometry and placement
            local screengeom = capi.screen[screen].workarea

            if width <= 1 then width = screengeom.width * width end
            if height <= 1 then height = screengeom.height * height end

            local x, y
            if horiz == "left" then x = screengeom.x
            elseif horiz == "right" then x = screengeom.width - width
            else x = screengeom.x + (screengeom.width - width) / 2 end

            if vert == "bottom" then y = screengeom.height + screengeom.y - height
            elseif vert == "center" then y = screengeom.y + (screengeom.height - height) / 2
            else y = screengeom.y - screengeom.y end

            -- Client properties
            c:geometry({ x = x, y = y, width = width, height = height })
            c.ontop = true
            c.above = true
            c.skip_taskbar = true
            awful.client.property.set(c, "role", "scratchpad")
            if sticky then c.sticky = true end
            if c.titlebar then awful.titlebar.remove(c) end

            c:raise()
            capi.client.focus = c
            detach_signal("manage", spawnw)
        end

        -- Add manage signal and spawn the program
        attach_signal("manage", spawnw)
        awful.util.spawn(prog, false)
    else
        -- Get a running client
        local c = dropdown[prog][screen]

        -- Switch the client to the current workspace
        if c:isvisible() == false then c.hidden = true
            awful.client.movetotag(awful.tag.selected(screen), c)
        end

        -- Focus and raise if hidden
        if c.hidden then
            -- Make sure it is centered
            if vert == "center" then awful.placement.center_vertical(c) end
            if horiz == "center" then awful.placement.center_horizontal(c) end
            c.hidden = false
            c:raise()
            capi.client.focus = c
        else -- Hide and detach tags if not
            c.hidden = true
            local ctags = c:tags()
            for i, t in pairs(ctags) do
                ctags[i] = nil
            end
            c:tags(ctags)
        end
    end
end

function drop.is_scratch(c)
    return awful.client.property.get(c, "role", "scratchpad")
end

return setmetatable(drop, { __call = function(_, ...) return toggle(...) end })


2H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z")),e.ArrowDownOutline=u("arrow-down",o,c(i,"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0 0 48.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z")),e.BarChartOutline=u("bar-chart",o,c(i,"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z")),e.BarcodeOutline=u("barcode",o,c(i,"M120 160H72c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8zm833 0h-48c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8zM200 736h112c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8H200c-4


.image(2444, 832, 'background');

        // Randomize clouds
        new Clouds();

        // // Add trees to the game (behind the platforms!)
        aod.playground.add.image(440, 1225, 'tree1').setScale(0.2)
        aod.playground.add.image(1850, 1235, 'tree2').setScale(0.2)
        aod.playground.add.image(5260, 1225, 'tree2').setScale(0.2)
        aod.playground.add.image(6000, 1270, 'tree3').setScale(0.2)
        aod.playground.add.image(2800, 1320, 'statue')

        // Add platforms
        aod.platforms = aod.playground.physics.add.staticGroup();
        aod.platforms.create(450, 700, 'ground-1').setScale(0.2).refreshBody();
        aod.platforms.create(1030, 1630, 'ground-1.1').setScale(0.2).refreshBody();
        aod.playground.add.image(1035, 1585, 'ground-1.2').setScale(0.2);
        aod.playground.add.image(1235, 1650, 'ground-2').setScale(0.2);
        aod.platforms.create(1130, 1330, 'ground-3').setScale(0.2).refreshBody();
        aod.platforms.create(1805, 1600, 'ground-4').setScale(0.2).refreshBody();
        aod.platforms.create(2380, 1650, 'ground-5').setScale(0.2).refreshBody();

        //add objects
        aod.player = new Player();

        aod.player.player.x = 100;
        aod.player.player.y = 400;

        // Wordt Zeus
        aod.zeus = new Zeus();

        aod.playground.physics.add.collider(aod.player.player, aod.platforms);
        aod.playground.physics.add.collider(aod.zeus.zeus, aod.platforms);

        aod.playground.physics.world.setBounds(0, 0, 6271, 1664);

        aod.playground.cameras.main.setBounds(0, 0, 6100, 1664);

        this.hey()
    }

    update() {
        aod.player.movement()
        console.log(aod.player.player.y)
        // if (aod.player.player.y >= 800) {
        //     aod.player.player.x = 125;
        //     aod.player.player.y = 200;
        // }
    }

    hey() {
        // Prevent user from walking
        aod.player.disableWalking();

        // Show talking dialog
        let ape_dialog_1 = new Dialog("Aapje:\n\n En wie ben jij?", () => {
            ape_dialog_1.hide();

            let zeus_dialog_1 = new Dialog("Zeus:\n\nIk ben Zeus, Oppergod.\nIk ben hier om jou\nte belonen. ", () => {
                zeus_dialog_1.hide();

                let ape_dialog_2 = new Dialog("Aapje:\n\nBeloning is altijd goed.", () => {
                    ape_dialog_2.hide();

                    let zeus_dialog_2 = new Dialog("Zeus:\n\nJe hebt alle proeven doorstaan.\nDat heb je goed gedaan.", () => {
                        zeus_dialog_2.hide();

                        let ape_dialog_3 = new Dialog("Aapje:\n\nBedankt!", () => {
                            ape_dialog_3.hide();

                            let zeus_dialog_3 = new Dialog("Gefeliciteerd, je hebt het spel uitgespeeld!", () => {
                                zeus_dialog_3.hide();

                            // Let the player walk again
                            aod.player.enableWalking();

                            document.location.href = "./#menu";
                            document.location.reload();


ow < MAX_PATTERN_LENGTH);

			stChanNote *Note = pTrack->GetPatternData(Channel, Pattern, Row);
			memset(Note, 0, sizeof(stChanNote));

			Note->Note		 = pDocFile->GetBlockChar();
			Note->Octave	 = pDocFile->GetBlockChar();
			Note->Instrument = pDocFile->GetBlockChar();
			Note->Vol		 = pDocFile->GetBlockChar();

			if (m_iFileVersion == 0x0200) {
				unsigned char EffectNumber, EffectParam;
				EffectNumber = pDocFile->GetBlockChar();
				EffectParam = pDocFile->GetBlockChar();
				if (Version < 3) {
					if (EffectNumber == EF_PORTAOFF) {
						EffectNumber = EF_PORTAMENTO;
						EffectParam = 0;
					}
					else if (EffectNumber == EF_PORTAMENTO) {
						if (EffectParam < 0xFF)
							EffectParam++;
					}
				}

				stChanNote *Note = pTrack->GetPatternData(Channel, Pattern, Row);

				Note->EffNumber[0]	= EffectNumber;
				Note->EffParam[0]	= EffectParam;
			}
			else {
				for (int n = 0; n < (pTrack->GetEffectColumnCount(Channel) + 1); ++n) {
					unsigned char EffectNumber, EffectParam;
					EffectNumber = pDocFile->GetBlockChar();
					EffectParam = pDocFile->GetBlockChar();

					if (Version < 3) {
						if (EffectNumber == EF_PORTAOFF) {
							EffectNumber = EF_PORTAMENTO;
							EffectParam = 0;
						}
						else if (EffectNumber == EF_PORTAMENTO) {
							if (EffectParam < 0xFF)
								EffectParam++;
						}
					}

					Note->EffNumber[n]	= EffectNumber;
					Note->EffParam[n] 	= EffectParam;
				}
			}

			if (Note->Vol > MAX_VOLUME)
				Note->Vol &= 0x0F;

			// Specific for version 2.0
			if (m_iFileVersion == 0x0200) {

				if (Note->EffNumber[0] == EF_SPEED && Note->EffParam[0] < 20)
					Note->EffParam[0]++;

				if (Note->Vol == 0)
					Note->Vol = MAX_VOLUME;
				else {
					Note->Vol--;
					Note->Vol &= 0x0F;
				}

				if (Note->Note == 0)
					Note->Instrument = MAX_INSTRUMENTS;
			}

			// // //
			/*
			if (Version < 6) {
				// Noise pitch slide fix
				if (GetChannelType(Channel) == CHANID_NOISE) {
					for (int n = 0; n < MAX_EFFECT_COLUMNS; ++n) {
						switch (Note->EffNumber[n]) {
							case EF_PORTA_DOWN:
								Note->EffNumber[n] = EF_PORTA_UP;
								Note->EffParam[n] = Note->EffParam[n] << 4;
								break;
							case EF_PORTA_UP:
								Note->EffNumber[n] = EF_PORTA_DOWN;
								Note->EffParam[n] = Note->EffParam[n] << 4;
								break;
							case EF_PORTAMENTO:
								Note->EffParam[n] = Note->EffParam[n] << 4;
								break;
							case EF_SLIDE_UP:
								Note->EffParam[n] = Note->EffParam[n] + 0x70;
								break;
							case EF_SLIDE_DOWN:
								Note->EffParam[n] = Note->EffParam[n] + 0x70;
								break;
						}
					}
				}
			}
			*/
		}
	}

	return false;
}

// // //

// FTM import ////

CFamiTrackerDoc *CFamiTrackerDoc::LoadImportFile(LPCTSTR lpszPathName) const
{
	// Import a module as new subtunes


         t,
            ret;

        if(d == doc || d == body){
            if(Ext.isIE && Ext.isStrict){
                l = docElement.scrollLeft;
                t = docElement.scrollTop;
            }else{
                l = window.pageXOffset;
                t = window.pageYOffset;
            }
            ret = {left: l || (body ? body.scrollLeft : 0), top: t || (body ? body.scrollTop : 0)};
        }else{
            ret = {left: d.scrollLeft, top: d.scrollTop};
        }
        return ret;
    }
});

Ext.Element.VISIBILITY = 1;

Ext.Element.DISPLAY = 2;

Ext.Element.OFFSETS = 3;

Ext.Element.ASCLASS = 4;

Ext.Element.visibilityCls = 'x-hide-nosize';

Ext.Element.addMethods(function(){
    var El = Ext.Element,
        OPACITY = "opacity",
        VISIBILITY = "visibility",
        DISPLAY = "display",
        HIDDEN = "hidden",
        OFFSETS = "offsets",
        ASCLASS = "asclass",
        NONE = "none",
        NOSIZE = 'nosize',
        ORIGINALDISPLAY = 'originalDisplay',
        VISMODE = 'visibilityMode',
        ISVISIBLE = 'isVisible',
        data = El.data,
        getDisplay = function(dom){
            var d = data(dom, ORIGINALDISPLAY);
            if(d === undefined){
                data(dom, ORIGINALDISPLAY, d = '');
            }
            return d;
        },
        getVisMode = function(dom){
            var m = data(dom, VISMODE);
            if(m === undefined){
                data(dom, VISMODE, m = 1);
            }
            return m;
        };

    return {

        originalDisplay : "",
        visibilityMode : 1,

        setVisibilityMode : function(visMode){
            data(this.dom, VISMODE, visMode);
            return this;
        },

        animate : function(args, duration, onComplete, easing, animType){
            this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType);
            return this;
        },

        anim : function(args, opt, animType, defaultDur, defaultEase, cb){
            animType = animType || 'run';
            opt = opt || {};
            var me = this,
                anim = Ext.lib.Anim[animType](
                    me.dom,
                    args,
                    (opt.duration || defaultDur) || .35,
                    (opt.easing || defaultEase) || 'easeOut',
                    function(){
                        if(cb) cb.call(me);
                        if(opt.callback) opt.callback.call(opt.scope || me, me, opt);
                    },
                    me
                );
            opt.anim = anim;
            return anim;
        },

        preanim : function(a, i){
            return !a[i] ? false : (typeof a[i] == 'object' ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]});
        },

        isVisible : function() {
            var me = this,
                dom = me.dom,
                visible = data(dom, ISVISIBLE);

            if(typeof visible == 'boolean'){
                return visible;
            }

            visible = !me.isStyle(VISIBILITY, HIDDEN) &&
                      !me.isStyle(DISPLAY, NONE) &&
                      !((getVisMode(dom) == El.ASCLASS) && me.hasClass(me.visibilityCls || El.visibilityCls));

            data(dom, ISVISIBLE, visible


! gurobi_try {
  ($expression:expr, $env:expr) => {
    let error = $expression;
    if error != 0 {
      panic!("error is {}", CStr::from_ptr(GRBgeterrormsg($env)).to_str().unwrap());
    }
  }
}

extern "C" {
  // Constructors
  pub fn GRBloadenv(envP: *mut *mut GRBenv, logfilename: c_str) -> c_int;

  pub fn GRBnewmodel(env: *mut GRBenv, modelP: *mut *mut GRBmodel, Pname: c_str, numvars: c_int,
                     obj: *const c_double, lb: *const c_double, ub: *const c_double, vtype: *const c_char,
                     varnames: *const c_str)
                     -> c_int;

  // Destructors
  pub fn GRBfreeenv(env: *mut GRBenv);

  pub fn GRBfreemodel(model: *mut GRBmodel) -> c_int;

  // Variables
  pub fn GRBaddvar(model: *mut GRBmodel, numnz: c_int, vind: *const c_int, vval: *const c_double, obj: f64, lb: f64,
                   ub: f64, vtype: c_char, name: c_str)
                   -> c_int;

  // Constraints
  pub fn GRBaddconstr(model: *mut GRBmodel, numnz: c_int, cind: *const c_int, cval: *const c_double, sense: c_char,
                      rhs: c_double, constrname: c_str)
                      -> c_int;

  // Optimize
  pub fn GRBoptimize(model: *mut GRBmodel) -> c_int;

  // Diagnostics
  pub fn GRBgeterrormsg(env: *mut GRBenv) -> c_str;

  // Control solver operation (https://www.gurobi.com/documentation/8.1/refman/parameters.html)
  pub fn GRBsetparam(env : *mut GRBenv, paramname : c_str, value : c_str);

  // Retrieve solutions (https://www.gurobi.com/documentation/8.1/refman/attributes.html)
  pub fn GRBgetdblattr(model: *mut GRBmodel, attrname: c_str, valueP: *mut c_double) -> c_int;

  pub fn GRBgetintattr(model: *mut GRBmodel, attrname: c_str, valueP: *mut c_int) -> c_int;

  pub fn GRBgetdblattrelement(model: *mut GRBmodel, attrname: c_str, element: c_int, valueP: *mut c_double) -> c_int;

  pub fn GRBsetintattr(model: *mut GRBmodel, attrname: c_str, value: c_int) -> c_int;

  // Write to file
  pub fn GRBwrite(model: *mut GRBmodel, filename: c_str) -> c_int;
}

pub struct GurobiOptimizer {
  env   : *mut GRBenv,
  model : *mut GRBmodel,
  var_index : i32,
  vars  : Vec<GurobiVar>,
  pub solutions : HashMap<GurobiVar, f64>
}

impl GurobiOptimizer {
  pub fn new(name : &str) -> GurobiOptimizer {
    let mut optimizer = GurobiOptimizer{ env : ptr::null_mut(),
                                         model : ptr::null_mut(),
                                         var_index : 0,
                                         vars : Vec::new(),
                                         solutions : HashMap::new()};
    let log_file_c_str   = CString::new(name.to_owned() + ".log").expect("CString::new failed");
    let log_file_c_ptr   = log_file_c_str.as_ptr();
    let model_name_c_str = CString::new(name).expe


  if (value > 1) {
    return value / 100;
  }

  return value;
}

/**
 * Round decimal numbers
 */
export function round(number: number, digits = 2) {
  const factor = 10 ** digits;

  return Math.round(number * factor) / factor;
}

export function validateURI(input: string): boolean {
  const validTypes = ['album', 'artist', 'playlist', 'show', 'track'];

  /* istanbul ignore else */
  if (input && input.indexOf(':') > -1) {
    const [key, type, id] = input.split(':');

    /* istanbul ignore else */
    if (key === 'spotify' && validTypes.indexOf(type) >= 0 && id.length === 22) {
      return true;
    }
  }

  return false;
}
import { Buffer } from '@src/buffer';
import { TestCases } from '@test';

let buffer: Buffer;

// tslint:disable: no-magic-numbers
export const data: TestCases = [
  {
    description: 'Initialize the buffer to 4 columns x 4 rows',
    test: ({ canvas }) => {
      buffer = new Buffer({
        canvas,
        cols: 4,
        rows: 4,
      });

      return { buffer };
    },
  },
  {
    description: 'Remove rows',
    test: () => {
      buffer.resize(4, 2);

      return { buffer };
    },
  },
  {
    description: 'Remove columns',
    test: () => {
      buffer.resize(2, 2);

      return { buffer };
    },
  },
  {
    description: 'Add columns before rows',
    test: () => {
      buffer.setClearStyle({ bg: 'red' });
      buffer.resize(4, 2);

      return { buffer };
    },
  },
  {
    description: 'Add rows',
    test: () => {
      buffer.setClearStyle({ bg: 'green' });
      buffer.resize(4, 4);

      return { buffer };
    },
  },
  {
    description: 'Add rows before columns',
    test: () => {
      buffer.resize(2, 2);
      buffer.setClearStyle({ bg: 'green' });
      buffer.resize(2, 4);

      return { buffer };
    },
  },
  {
    description: 'Add columns',
    test: () => {
      buffer.setClearStyle({ bg: 'red' });
      buffer.resize(4, 4);

      return { buffer };
    },
  },
  {
    description: 'Add columns and rows',
    test: () => {
      buffer.setClearStyle({ bg: 'blue' });
      buffer.resize(2, 2);
      buffer.resize(4, 4);

      return { buffer };
    },
  },
];
import * as THREE from 'three';

export default class Draw extends THREE.Object3D{

    constructor(){
        super();
        this.init();
    }

    init(){
        var geometry = new THREE.Geometry();

        geometry.vertices.push(
            new THREE.Vector3(0, 0, 0),
            new THREE.Vector3(0, 10, 0),
            new THREE.Vector3(20, 10, 0),
            new THREE.Vector3(30, 0, 0)
        )
        geometry.faces.push(new THREE.Face3(0, 1, 2));
        geometry.faces.push(new THREE.Face3(0, 2, 3));

        geometry.computeBoundingSphere();
        geometry.computeFaceNormals();

        let mesh = new THREE.Mesh(geometry, new THREE.MeshNormalMaterial());

        this.add(mesh);
    }

}class Flatten {
  private consolidatedArray: any[] = [];
  public static flat(inputItem: any[], flattenDepth: number = 1): any[] {
    const flatten: Flatten = new Flatten();


There are two essential sources of invalidity:
            // 1. Duplicate elements
            // 2. Indices out of bounds
            // We want to have either or both

            let should_have_duplicates = g.gen::<bool>();
            let should_have_out_of_bounds = !should_have_duplicates || g.gen::<bool>();
            assert!(should_have_duplicates || should_have_out_of_bounds);

            if should_have_out_of_bounds {
                let num_out_of_bounds_rounds = g.gen_range::<usize>(1, n);
                for _ in 0 .. num_out_of_bounds_rounds {
                    let interior_index = g.gen_range::<usize>(0, n);
                    let exterior_index = n + g.gen::<usize>();
                    permutation_array[interior_index] = exterior_index;
                }
            }

            if should_have_duplicates {
                let num_duplicates = g.gen_range::<usize>(1, n);
                for _ in 0 .. num_duplicates {
                    let interior_index = g.gen_range::<usize>(0, n);
                    let duplicate_value = permutation_array[interior_index];
                    permutation_array.push(duplicate_value);
                }
            }

            // The duplicates are placed at the end, so we perform
            // an additional shuffle to end up with a more or less
            // arbitrary invalid permutation
            g.shuffle(&mut permutation_array);
            InvalidPermutationArray(permutation_array)
        }
    }

    impl<T: Send + Clone + 'static> Arbitrary for PermutationMatrix<T> {
        fn arbitrary<G: Gen>(g: &mut G) -> Self {
            let ValidPermutationArray(array) = ValidPermutationArray::arbitrary(g);
            PermutationMatrix::from_array(array)
                .expect("The generated permutation array should always be valid.")
        }
    }

    quickcheck! {
        fn property_validate_permutation_is_ok_for_valid_input(array: ValidPermutationArray) -> bool {
            validate_permutation(&array.0).is_ok()
        }
    }

    quickcheck! {
        fn property_validate_permutation_is_err_for_invalid_input(array: InvalidPermutationArray) -> bool {
            validate_permutation(&array.0).is_err()
        }
    }

    quickcheck! {
        fn property_identity_has_identity_array(size: usize) -> bool {
            let p = PermutationMatrix::<u64>::identity(size);
            let p_as_array: Vec<usize> = p.into();
            let expected = (0 .. size).collect::<Vec<usize>>();
            p_as_array == expected
        }
    }

    quickcheck! {
        fn property_dim_is_equal_to_array_dimensions(array: ValidPermutationArray) -> bool {
            let ValidPermutationArray(array) = array;
            let n = array.len();
            let p = PermutationMatrix::<u32>::from_array(array).unwrap();
            p.size() == n
        }
    }

    quickcheck! {
        fn property_inverse_of_inverse_is_original(p: PermutationMatrix<u32>) -> bool {
            p == p.inverse().inverse()
        }
    }

    quickcheck! {
        fn property_inverse_composes_to_identity(p: PermutationMatrix<u32>) -> bool {
            // Recall that P * P_inv = I and P_inv * P = I
            let n = p.size();
            let pinv = p.inverse();
            let mut p_pinv_composition = PermutationMatrix::identity


return a6},
adN(a){var s=this.ad
return new A.x(0,s[a],this.gv(0).a,s[a+1])},
eb(a,b){var s,r,q,p,o,n,m,l,k,j,i=this,h=null
if(i.M*i.N===0)return h
s=i.Dn(a)
for(r=t.o3,q=h,p=0;p<i.N;++p){o=i.t[p]
n=A.ey(h,s[p])
if(o==null)continue
m=o.b
m.toString
l=r.a(m).b
if(l==null)l=i.az
$label0$1:{m=h
if(B.a1v===l){m=o.grB()
k=B.da.dq(o.dy,new A.am(n,b),m)
m=k
break $label0$1}if(B.a1t===l||B.o2===l||B.a1u===l||B.a1w===l||B.a1x===l)break $label0$1}if(m!=null)j=q==null||q<m
else j=!1
if(j)q=m}return q},
cn(a){var s,r,q,p,o,n,m,l,k,j,i,h=this
if(h.M*h.N===0)return a.b1(B.T)
s=h.Dn(a)
r=B.b.bw(s,0,new A.aKw(),t.i)
for(q=t.o3,p=0,o=0;o<h.M;++o){for(n=0,m=0;l=h.N,m<l;++m){k=h.t[m+o*l]
if(k!=null){l=k.b
l.toString
l=q.a(l).b
switch((l==null?h.az:l).a){case 3:return B.T
case 0:case 1:case 2:case 5:l=A.ey(null,s[m])
j=k.gci()
i=B.R.dq(k.dy,l,j)
n=Math.max(n,i.b)
break
case 4:break}}}p+=n}return a.b1(new A.z(r,p))},
bx(){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2=this,a3="RenderBox was not laid out: ",a4=t.k.a(A.w.prototype.gU.call(a2)),a5=a2.M,a6=a2.N
if(a5*a6===0){a2.cG=0
a2.fy=a4.b1(B.T)
return}s=a2.Dn(a4)
r=t.i
q=A.aG(a6,0,!1,r)
switch(a2.aa.a){case 0:q[a6-1]=0
for(p=a6-2;p>=0;--p){o=p+1
q[p]=q[o]+s[o]}a2.aQ=new A.c2(q,A.U(q).h("c2<1>"))
a2.cG=B.b.ga0(q)+B.b.ga0(s)
break
case 1:q[0]=0
for(p=1;p<a6;++p){o=p-1
q[p]=q[o]+s[o]}a2.aQ=q
a2.cG=B.b.gR(q)+B.b.gR(s)
break}o=a2.a


 Q =
    is-prop-type-Prop (has-same-elements-subtype-Prop Q)

  refl-has-same-elements-subtype : has-same-elements-subtype P
  pr1 (refl-has-same-elements-subtype x) = id
  pr2 (refl-has-same-elements-subtype x) = id

  is-torsorial-has-same-elements-subtype :
    is-torsorial has-same-elements-subtype
  is-torsorial-has-same-elements-subtype =
    is-torsorial-Eq-Π (λ x → is-torsorial-iff (P x))

  has-same-elements-eq-subtype :
    (Q : subtype l2 A) → (P ＝ Q) → has-same-elements-subtype Q
  has-same-elements-eq-subtype .P refl =
    refl-has-same-elements-subtype

  is-equiv-has-same-elements-eq-subtype :
    (Q : subtype l2 A) → is-equiv (has-same-elements-eq-subtype Q)
  is-equiv-has-same-elements-eq-subtype =
    fundamental-theorem-id
      is-torsorial-has-same-elements-subtype
      has-same-elements-eq-subtype

  extensionality-subtype :
    (Q : subtype l2 A) → (P ＝ Q) ≃ has-same-elements-subtype Q
  pr1 (extensionality-subtype Q) = has-same-elements-eq-subtype Q
  pr2 (extensionality-subtype Q) = is-equiv-has-same-elements-eq-subtype Q

  eq-has-same-elements-subtype :
    (Q : subtype l2 A) → has-same-elements-subtype Q → P ＝ Q
  eq-has-same-elements-subtype Q =
    map-inv-equiv (extensionality-subtype Q)
```

### Subtypes with the same elements are equivalent

```agda
module _
  {l1 l2 l3 : Level} {X : UU l1} (S : subtype l2 X) (T : subtype l3 X)
  where

  equiv-has-same-elements-type-subtype :
    has-same-elements-subtype S T → type-subtype S ≃ type-subtype T
  equiv-has-same-elements-type-subtype H =
    equiv-tot (λ x → equiv-iff' (S x) (T x) (H x))
```

### A subtype `S` is equivalent to `S` precomposed with an equivalence

```agda
module _
  {l1 l2 l3 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) (S : subtype l3 Y)
  where

  equiv-precomp-equiv-type-subtype :
    type-subtype S ≃ type-subtype (S ∘ map-equiv e)
  equiv-precomp-equiv-type-subtype =
    equiv-Σ
      ( λ x → type-Prop ((S ∘ map-equiv e) x))
      ( inv-equiv e)
      ( λ y →
        equiv-eq (ap (type-Prop ∘ S) (inv (is-section-map-inv-equiv e y))))
```

### The containment relation is antisymmetric

```agda
module _
  {l1 : Level} {A : UU l1}
  where

  equiv-antisymmetric-leq-subtype :
    {l2 l3 : Level} (P : subtype l2 A) (Q : subtype l3 A) → P ⊆ Q → Q ⊆ P →
    (x : A) → is-in-subtype P x ≃ is-in-subtype Q x
  equiv-antisymmetric-leq-subtype P Q H K x =
    equiv-iff-is-prop
      ( is-prop-is-in-subtype P x


分钟）内有 10 个更改以及 60 秒内有 10000 个更改。 | 指定在多长时间内，有多少次更新操作，就将数据同步到数据文件，可以多个条件配合 |
| 10   | `rdbcompression yes`                                         | 指定存储至本地数据库时是否压缩数据，默认为 yes，Redis 采用 LZF 压缩，如果为了节省 CPU 时间，可以关闭该选项，但会导致数据库文件变的巨大 |
| 11   | `dbfilename dump.rdb`                                        | 指定本地数据库文件名，默认值为 dump.rdb                      |
| 12   | `dir ./`                                                     | 指定本地数据库存放目录                                       |
| 13   | `slaveof <masterip> <masterport>`                            | 设置当本机为 slave 服务时，设置 master 服务的 IP 地址及端口，在 Redis 启动时，它会自动从 master 进行数据同步 |
| 14   | `masterauth <master-password>`                               | 当 master 服务设置了密码保护时，slave 服务连接 master 的密码 |
| 15   | `requirepass foobared`                                       | 设置 Redis 连接密码，如果配置了连接密码，客户端在连接 Redis 时需要通过 AUTH `<password>` 命令提供密码，默认关闭 |
| 16   | ` maxclients 128`                                            | 设置同一时间最大客户端连接数，默认无限制，Redis 可以同时打开的客户端连接数为 Redis 进程可以打开的最大文件描述符数，如果设置 maxclients 0，表示不作限制。当客户端连接数到达限制时，Redis 会关闭新的连接并向客户端返回 max number of clients reached 错误信息 |
| 17   | `maxmemory <bytes>`                                          | 指定 Redis 最大内存限制，Redis 在启动时会把数据加载到内存中，达到最大内存后，Redis 会先尝试清除已到期或即将到期的 Key，当此方法处理 后，仍然到达最大内存设置，将无法再进行写入操作，但仍然可以进行读取操作。Redis 新的 vm 机制，会把 Key 存放内存，Value 会存放在 swap 区 |
| 18   | `appendonly no`                                              | 指定是否在每次更新操作后进行日志记录，Redis 在默认情况下是异步的把数据写入磁盘，如果不开启，可能会在断电时导致一段时间内的数据丢失。因为 redis 本身同步数据文件是按上面 save 条件来同步的，所以有的数据会在一段时间内只存在于内存中。默认为 no |
| 19   | `appendfilename appendonly.aof`                              | 指定更新日志文件名，默认为 appendonly.aof                    |
| 20   | `appendfsync everysec`                                       | 指定更新日志条件，共有 3 个可选值：**no**：表示等操作系统进行数据缓存同步到磁盘（快）**always**：表示每次更新操作后手动调用 fsync() 将数据写到磁盘（慢，安全）**everysec**：表示每秒同步一次（折中，默认值） |
| 21   | `vm