.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em;}.i-carbon-text-wrap,[i-carbon-text-wrap=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4 23h8v2H4zm20.523-9H4v2h20.5a3.5 3.5 0 0 1 0 7h-5.672l2.586-2.586L20 19l-5 5l5 5l1.414-1.414L18.828 25h5.705a5.5 5.5 0 0 0-.01-11M4 5h24v2H4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em;}.i-carbon-time,[i-carbon-time=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4'/%3E%3Cpath fill='currentColor' d='M20.59 22L15 16.41V7h2v8.58l5 5.01z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em;}.i-carbon-view{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M30.94 15.66A16.69 16.69 0 0 0 16 5A16.69 16.69 0 0 0 1.06 15.66a1 1 0 0 0 0 .68A16.69 16.69 0 0 0 16 27a16.69 16.69 0 0 0 14.94-10.66a1 1 0 0 0 0-.68M16 25c-5.3 0-10.9-3.93-12.93-9C5.1 10.93 10.7 7 16 7s10.9 3.93 12.93 9C26.9 21.07 21.3 25 16 25'/%3E%3Cpath fill='currentColor' d='M16 10a6 6 0 1 0 6 6a6 6 0 0 0-6-6m0 10a4 4 0 1 1 4-4a4 4 0 0 1-4 4'/%


win:2.3.10")
        }
    }

    targets.withType<KotlinNativeTarget> {
        val mainSourceSets = this.compilations.getByName("main").defaultSourceSet
        when {

            konanTarget.family.isAppleFamily -> {
                mainSourceSets.dependsOn(sourceSets.getByName("iosMain"))
            }

            konanTarget.family == Family.ANDROID -> {
                binaries {
                    val outputName = "nativevue"
                    sharedLib(outputName, listOf(RELEASE)) {
                        linkerOpts += linkerOpts + getLinkerArgs()
                        freeCompilerArgs = freeCompilerArgs + getCommonCompilerArgs()
                    }
                    sharedLib(outputName, listOf(DEBUG)) {
                        freeCompilerArgs = freeCompilerArgs + getCommonCompilerArgs()
                    }
                }
            }
        }
    }

    cocoapods {
        summary = "Some description for the Shared Module"
        homepage = "Link to the Shared Module homepage"
        version = "1.0"
        ios.deploymentTarget = "14.1"
//        podfile = project.file("../iosApp/Podfile")
        framework {
            isStatic = true
            baseName = "shared"
        }
        license = "MIT"
        extraSpecAttributes["resources"] = "['src/commonMain/assets/**']"
    }
}

ksp {
    arg("pageName", getPageName())
    arg(Output.KEY_PACK_LOCAL_JS_BUNDLE, packLocalJsBundle())
}

dependencies {
    compileOnly(project(":core-ksp")) {
        add("kspIosArm64", this)
        add("kspIosX64", this)
        add("kspIosSimulatorArm64", this)
        add("kspAndroid", this)
        add("kspJs", this)
    }
}

android {
    compileSdk = 34
    sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
    defaultConfig {
        minSdk = 21
        targetSdk = 30
    }

//    buildTypes {
//        release {
//            ndk {
//                abiFilters.add("arm64-v8a")
//            }
//        }
//    }

    sourceSets {
        named("main") {
            jniLibs.srcDirs("src/androidMain/libs/")
            assets.srcDirs("src/commonMain/assets")
        }
    }

}

fun getPageName(): String {
    return project.properties["pageName"] as? String ?: ""
}

fun packLocalJsBundle(): String {
    return (project.properties[Output.KEY_PACK_LOCAL_JS_BUNDLE] as? String) ?: ""
}

fun getCommonCompilerArgs(): List<String> {
    return listOf(
        "-Xallocator=std"
    )
}

fun getLinkerArgs(): List<String> {
    return listOf(
        "-Wl,--gc-sections,-s"
    )
}

// Kuikly 插件配置
kuikly {
    // JS 产物配置
    js {
        // 构建产物名，与 KMM 插件 webpackTask#outputFileName 一致
        outputName("nativevue2")
        // 可选：分包构建时的页面列表，如果为空则构建全部页面
        // addSplitPage("route","home")
    }
}
/*
 * Tencent is pleased to support the open source community by making KuiklyUI
 * available.
 * Copyright (C) 2025 Tencent. All rights reserved.
 * Licensed under the License of KuiklyUI;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://github.com/Tencent-TDS/KuiklyUI/blob/main/LICENSE
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "


f
	CheckPokeEgg 0x8005, 0x800c
	If 0x800c, 0x0
	CompareLastResultJump EQUAL, Script_branch_11a
	CheckMoveRemember 0x800c, 0x8005
	If 0x800c, 0x0
	CompareLastResultJump EQUAL, Script_branch_10f
	Message 0x4
	CloseMsgOnKeyPress
	FadeScreen 0x6, 0x1, 0x0, 0x0
	ResetScreen
	StorePokeRemember 0x8005
	StoreRememberMove 0x800c
	CallEnd
	FadeScreen 0x6, 0x1, 0x1, 0x0
	ResetScreen
	If 0x800c, 0xff
	CompareLastResultJump EQUAL, Script_branch_5f
	GiveItem HEART_SCALE, 1, 0x800c
	SetVarHero 0x3
	Message 0x10
	WaitButton
	CloseMsgOnKeyPress
	ReleaseAll
	End
@ 10f

Script_branch_10f: @ 10f
	Message 0x5
	WaitButton
	CloseMsgOnKeyPress
	ReleaseAll
	End
@ 11a

Script_branch_11a: @ 11a
	Message 0x6
	WaitButton
	CloseMsgOnKeyPress
	ReleaseAll
	End
@ 125

Script_2: @ 125
	PlayFanfare 0x5dc
	LockAll
	FacePlayer
	Message 0x11
	WaitButton
	CloseMsgOnKeyPress
	ReleaseAll
	End
@ 138

@ end_0x138


mp     r12, 20h ; ' '
    jz      short loc_504420
loc_5043CA:
    lea     rax, [i+j]
    cmp     rax, r13
    jge     short loc_504420
    movzx   esi, byte ptr [r15+j]
    mov     edi, offset a002x_0; "{0:02x}"
    xor     eax, eax
    call    _ZN9GooString6formatEPKcz; GooString::format(char const*,...)
    mov     rbp, rax
    mov     rdi, rax; this
    call    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv; std::string::c_str(void)
    mov     rbx, rax
    mov     rdi, buf; this
    call    _ZNK9GooString9getLengthEv; GooString::getLength(void)
    mov     rdi, [rsp+58h+var_48]
    mov     rsi, rbx
    mov     edx, eax
    call    [rsp+58h+var_40]
    test    buf, buf
    jz      short loc_5043C0
    mov     rdi, buf; void *
    call    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string()
    mov     rdi, buf; void *
    call    __ZdlPv; operator delete(void *)
    jmp     short loc_5043C0
loc_504420:
    mov     eax, r14d
    shr     eax, 5
    imul    rax, 8010021h
    shr     rax, 26h
    imul    eax, 0FFE0h
    mov     ecx, r14d
    sub     ecx, eax
    cmp     ecx, 0FFC0h
    jz      loc_504380
    add     i, 20h ; ' '
    mov     ebp, [rsp+58h+var_4C]
    cmp     r14d, ebp
    jge     loc_50439B
    mov     esi, (offset asc_669771+1); "\n"
    mov     rdi, [rsp+58h+var_48]
    mov     edx, 1
    call    [rsp+58h+var_40]
    cmp     r14d, ebp
    jl      loc_5043A4
loc_504475:
    and     ebp, 3
    mov     rax, [rsp+58h+var_40]
    mov     r14, [rsp+58h+var_48]
    jz      short loc_5044A9
    cmp     ebp, 4
    jz      short loc_5044A9
    add     ebp, 0FFFFFFFCh
    nop     dword ptr [rax+00h]
loc_504490:
    mov     esi, 5F9121h
    mov     rdi, r14
    mov     edx, 2
    mov     rbx, rax
    call    rax
    mov     rax, rbx
    inc     ebp
    jnz     short loc_504490
loc_5044A9:
    mov     esi, offset a00; "00>\n"
    mov     rdi, r14
    mov     edx, 4
    add     rsp, 28h
    pop     rbx
    pop     r12
    pop     r13
    pop     r14
    pop     r15
    pop     rbp
    jmp     rax
FoFiTrueType::dumpString(unsigned char const*,int,void (*)(void *,char const*,int),void *)const endp


for the entity.

        Returns:
            Formatted markdown content.
        """
        # Start with frontmatter and title
        lines = [
            f"# {name}\n",
        ]

        # Add messages
        for msg in messages:
            # Format timestamp
            ts = format_timestamp(msg["created_at"])

            # Add message header
            lines.append(f"### {msg['sender'].title()} ({ts})")

            # Handle message content
            content = msg.get("text", "")
            if msg.get("content"):
                content = " ".join(c.get("text", "") for c in msg["content"])
            lines.append(content)

            # Handle attachments
            attachments = msg.get("attachments", [])
            for attachment in attachments:
                if "file_name" in attachment:
                    lines.append(f"\n**Attachment: {attachment['file_name']}**")
                    if "extracted_content" in attachment:
                        lines.append("```")
                        lines.append(attachment["extracted_content"])
                        lines.append("```")

            # Add spacing between messages
            lines.append("")

        return "\n".join(lines)


up
}

func NewWaitGroups() *WaitGroupMap {
	return &WaitGroupMap{
		m: make(map[string]*sync.WaitGroup),
	}
}

func (w *WaitGroupMap) Add(delta int, key string) {
	wg := w.getOrAddWaitGroup(key)
	wg.Add(delta)
}

func (w *WaitGroupMap) AddMany(delta int, keys ...string) {
	switch len(keys) {
	case 0:
		return
	case 1:
		w.Add(delta, keys[0])
		return
	case 2:
		w.Add(delta, keys[0])
		w.Add(delta, keys[1])
		return
	}

	for _, key := range keys {
		wg := w.getOrAddWaitGroup(key)
		wg.Add(delta)
	}
}

func (w *WaitGroupMap) Done(key string) {
	w.mu.RLock()
	wg := w.m[key]
	w.mu.RUnlock()
	if wg != nil {
		wg.Done()
	}
}

func (w *WaitGroupMap) DoneMany(keys ...string) { //nolint:dupl
	switch len(keys) {
	case 0:
		return
	case 1:
		w.Done(keys[0])
		return
	case 2:
		w.Done(keys[0])
		w.Done(keys[1])
		return
	}

	wgs := make([]*sync.WaitGroup, 0, len(keys))

	w.mu.RLock()
	for _, key := range keys {
		wg := w.m[key]
		if wg != nil {
			wgs = append(wgs, wg)
		}
	}
	w.mu.RUnlock()

	for _, wg := range wgs {
		wg.Done()
	}
}

func (w *WaitGroupMap) Wait(key string) {
	w.mu.RLock()
	wg := w.m[key]
	w.mu.RUnlock()
	if wg != nil {
		wg.Wait()
	}
}

func (w *WaitGroupMap) WaitMany(keys ...string) { //nolint:dupl
	switch len(keys) {
	case 0:
		return
	case 1:
		w.Wait(keys[0])
		return
	case 2:
		w.Wait(keys[0])
		w.Wait(keys[1])
		return
	}

	wgs := make([]*sync.WaitGroup, 0, len(keys))

	w.mu.RLock()
	for _, key := range keys {
		wg := w.m[key]
		if wg != nil {
			wgs = append(wgs, wg)
		}
	}
	w.mu.RUnlock()

	for _, wg := range wgs {
		wg.Wait()
	}
}

func (w *WaitGroupMap) getOrAddWaitGroup(key string) *sync.WaitGroup {
	w.mu.RLock()
	wg := w.m[key]
	w.mu.RUnlock()

	if wg == nil {
		w.mu.Lock()
		wg = w.m[key]
		if wg == nil {
			wg = &sync.WaitGroup{}
			w.m[key] = wg
		}
		w.mu.Unlock()
	}

	return wg
}
package source

import (
	stderrors "errors"
	"io"
	"os"
	osuser "os/user"
	"testing/fstest"

	"github.com/agiledragon/gomonkey/v2"
	"github.com/colinmarc/hdfs/v2"
	"github.com/colinmarc/hdfs/v2/hadoopconf"
	krb "github.com/jcmturner/gokrb5/v8/client"
	. "github.com


v1
/* 1CBFC8 801DB258 C4400000 */  lwc1  $f0, ($v0)
/* 1CBFCC 801DB25C 4600103E */  c.le.s $f2, $f0
/* 1CBFD0 801DB260 00000000 */  nop
/* 1CBFD4 801DB264 4502000C */  bc1fl .L801DB298_ovl10
/* 1CBFD8 801DB268 460C003C */   c.lt.s $f0, $f12
/* 1CBFDC 801DB26C 46020481 */  sub.s $f18, $f0, $f2
.L801DB270_ovl10:
/* 1CBFE0 801DB270 E4520000 */  swc1  $f18, ($v0)
/* 1CBFE4 801DB274 8C830000 */  lw    $v1, ($a0)
/* 1CBFE8 801DB278 00031880 */  sll   $v1, $v1, 2
/* 1CBFEC 801DB27C 00A31021 */  addu  $v0, $a1, $v1
/* 1CBFF0 801DB280 C4400000 */  lwc1  $f0, ($v0)
/* 1CBFF4 801DB284 4600103E */  c.le.s $f2, $f0
/* 1CBFF8 801DB288 00000000 */  nop
/* 1CBFFC 801DB28C 4503FFF8 */  bc1tl .L801DB270_ovl10
/* 1CC000 801DB290 46020481 */   sub.s $f18, $f0, $f2
/* 1CC004 801DB294 460C003C */  c.lt.s $f0, $f12
.L801DB298_ovl10:
/* 1CC008 801DB298 00000000 */  nop
/* 1CC00C 801DB29C 4502000C */  bc1fl .L801DB2D0_ovl10
/* 1CC010 801DB2A0 00230821 */   addu  $at, $at, $v1
/* 1CC014 801DB2A4 46020100 */  add.s $f4, $f0, $f2
.L801DB2A8_ovl10:
/* 1CC018 801DB2A8 E4440000 */  swc1  $f4, ($v0)
/* 1CC01C 801DB2AC 8C830000 */  lw    $v1, ($a0)
/* 1CC020 801DB2B0 00031880 */  sll   $v1, $v1, 2
/* 1CC024 801DB2B4 00A31021 */  addu  $v0, $a1, $v1
/* 1CC028 801DB2B8 C4400000 */  lwc1  $f0, ($v0)
/* 1CC02C 801DB2BC 460C003C */  c.lt.s $f0, $f12
/* 1CC030 801DB2C0 00000000 */  nop
/* 1CC034 801DB2C4 4503FFF8 */  bc1tl .L801DB2A8_ovl10
/* 1CC038 801DB2C8 46020100 */   add.s $f4, $f0, $f2
/* 1CC03C 801DB2CC 00230821 */  addu  $at, $at, $v1
.L801DB2D0_ovl10:
/* 1CC040 801DB2D0 C42C25D0 */ lwc1 $f12, %lo(gEntitiesNextPosXArray)($at)
/* 1CC044 801DB2D4 3C01800E */ lui $at, %hi(gEntitiesNextPosYArray)
/* 1CC048 801DB2D8 00230821 */  addu  $at, $at, $v1
/* 1CC04C 801DB2DC 00C33021 */  addu  $a2, $a2, $v1
/* 1CC050 801DB2E0 8CC62950 */ lw $a2, %lo(gEntitiesNextPosZArray)($a2)


ht:20px}.toolstrip .topRightContainer .searchContainer mw-searchfield{height:100%}.toolstrip .topRightContainer .techPreviewContainer{padding-top:3px}.toolstrip .topRightContainer .searchContainer input{user-select:none}.toolstrip .topRightContainer .QABContainer,.toolstrip .topRightContainer .searchPopupContainer{padding-top:3px}.toolstrip .topRightContainer>div{vertical-align:top;display:inline-block;margin:0 2px}.toolstrip .topRightContainer .dijitButtonNode{vertical-align:top}.toolstrip .topRightContainer .dijitArrowButton{vertical-align:middle}.toolstrip .collapseButton,.toolstrip .motwLogoutButton{color:var(--mw-color-tertiary)!important;padding-top:2px!important;box-shadow:none!important}.toolstrip .collapseButton:not(.mwPushButtonFocused),.toolstrip .motwLogoutButton{border-color:transparent!important}.toolstrip .motwLogoutButton .mwArrowIconNode,.toolstrip .searchPopupDiv .mwArrowIconNode{border-left-color:transparent!important;border-bottom-color:transparent!important;border-right-color:transparent!important;border-top-color:var(--mw-color-tertiary)!important}.logoutContainer .mwWidget:focus-within,.QABContainer .mwWidget.mwSplitButton .mwButtonNode:focus,.QABContainer .mwWidget.mwSplitButton .mwFocusNode:focus,.QABContainer .mwWidget.mwToggleSplitButton .mwButtonNode:focus,.QABContainer .mwWidget.mwToggleSplitButton .mwFocusNode:focus,.QABContainer .mwWidget:not(.mwSplitButton):not(.mwToggleSplitButton):focus-within,.searchPopupContainer .mwWidget:focus-within{border:1px solid #ffffff!important}.logoutContainer .mwWidgetFocused{border-radius:5px}.logoutContainer{padding-top:3px}.logoutContainer .motwLogoutButton{padding-top:0!important}.toolstrip .topRightContainer.searchExpandMode .headerControlsContainer,.toolstrip .topRightContainer.searchExpandMode .logoutContainer,.toolstrip .topRightContainer.searchExpandMode .QABContainer,.toolstrip .topRightContainer.searchExpandMode .searchPopupContainer,.toolstrip .topRightContainer.searchExpandMode .techPreviewContainer{display:none}.toolstrip .topRightContainer.searchExpandMode{z-index:1;width:100%;height:28px;padding-bottom:3px;background-color:var(--mw-backgroundColor-header)}.toolstrip .topRightContainer.searchExpandMode .searchContainer{z-index:2;width:100%;height:28px;display:inline-block;text-align:-webkit-center;position:absolute;padding-top:4px}.toolstrip .topRightContainer.searchExpandMode .searchContainer mw-searchfield{height:21px;max-width:350px}.toolstrip .mwDefaultVisualFamily.mwWidget,.toolstrip .mwDefaultVisualFamily.mwWidget *{outline:none}.gallery{display:inline-block;overflow:hidden;position:relative;height:68px;white-space:nowrap;border-top-right-radius:3px;border-bottom-right-radius:3px;background:var(--selectedTab-bg-color)}.gallery .aroundNode{position:absolute;top:-1px;left:-1px;width:100%}.gallery.busy .busyIndicator,.gallery.busy .busyLayer{display:block}.gallery .busyLayer{position:absolute;display:none;top:0;left:0}.gallery .busyIndicator{height:16px;width:16px;position:absolute;display:none;left:50%;top:26px;background:url(images/busy-dd6b7b0bf5c3af22499abc0a9ee1e1b2.gif) no-repeat}.gallery .textOverlayWrapper{display:table;height:100%;width:100%;position:absolute;top:0;left:0;margin-left


= val[3]		// if coming from l2
(p7)	mov	value = r[MEMLAT+2]	// if coming from l3
	mov	ar.lc = pos0[1] ;;
.l5:
	extr.u	tmp = value, 0, 8 ;;
	st1	[dest] = tmp, 1
	shr.u	value = value, 8
	br.cloop.sptk .l5 ;;
	mov 	ret0 = dest
	mov	pr = saved_pr, -1
	mov	ar.lc = saved_lc
	br.ret.sptk.many b0

.recovery1:
	adds	src = -(MEMLAT + 6 + 1) * 8, asrc
	mov	loopcnt = ar.lc
	mov	tmp = ar.ec ;;
	sub	sh1 = (MEMLAT + 6 + 1), tmp
	shr.u	sh2 = sh2, 3
	;;
	shl	loopcnt = loopcnt, 3
	sub	src = src, sh2
	shl	sh1 = sh1, 3
	shl	tmp = tmp, 3
	;;
	add	len = len, loopcnt
	add	src = sh1, src ;;
	add	len = tmp, len
.back1:
	br.cond.sptk .cpyfew

.recovery2:
	add	tmp = -(MEMLAT + 3) * 8, src
(p7)	br.cond.spnt .gotit
	;;
	ld8	r[MEMLAT+2] = [tmp] ;;
	xor	pos0[1] = r[MEMLAT+2], charx8 ;;
	czx1.r	pos0[1] = pos0[1] ;;
	cmp.ne	p7, p6 = 8, pos0[1]
(p7)	br.cond.spnt .gotit
	br.cond.sptk .back2
END(memccpy)


enum_t2str (const xed_iform_enum_t p)

 	This converts strings to xed_iform_enum_t types.

XED_DLL_EXPORT xed_iform_enum_t 	xed_iform_enum_t_last (void)

 	Returns the last element of the enumeration.

Detailed Description

Definition in file xed-iform-enum.h.

Define Documentation

          #define _XED_IFORM_ENUM_H_

Definition at line 37 of file xed-iform-enum.h.

Enumeration Type Documentation


37
	.align 4

.L1036:
	FXCPMADD	f0,  B1, A1, f0
	FXCSMADD	f1,  B1, A1, f1
	LFPDUX	B1,  BO,  INC4
	FXCPMADD	f2,  B2, A1, f2
	FXCSMADD	f3,  B2, A1, f3
	LFPDX	A1,  AO,  INC4
	LFPDUX	B2,  BO2, INC4
	add	AO, AO, INC2
	bdnz+	.L1036
	.align 4

.L1037:
	FXCPMADD	f0,  B1, A1, f0
	FXCSMADD	f1,  B1, A1, f1
	FXCPMADD	f2,  B2, A1, f2
	FXCSMADD	f3,  B2, A1, f3
	.align 4

.L1038:
#ifndef TRMMKERNEL
	LFDUX	A1, CO1, INC
	LFDUX	A2, CO2, INC
	LFSDUX	A1, CO1, INC
	LFSDUX	A2, CO2, INC
#endif

#if defined(NN) || defined(NT) || defined(TN) || defined(TT) || \
    defined(RN) || defined(RT) || defined(CN) || defined(CT)
	fpadd	f0, f0, f1
	fpadd	f2, f2, f3
#else
	fpsub	f0, f0, f1
	fpsub	f2, f2, f3
#endif

#ifndef TRMMKERNEL
	fxcpmadd A1,  f0, AP,  A1
	fxcpmadd A2,  f2, AP,  A2
	fxcxnpma f0,  f0, AP,  A1
	fxcxnpma f2,  f2, AP,  A2

	STFDUX	f0,  CO1, INCM1
	STFSDUX	f0,  CO1, INC

	STFDUX	f2,  CO2, INCM1
	STFSDUX	f2,  CO2, INC
#else
	fxcpmadd f12, f0, AP,  f30
	fxcpmadd f13, f2, AP,  f30
	fxcxnpma f0,  f0, AP,  f12
	fxcxnpma f2,  f2, AP,  f13

	STFDUX	f0,  CO1, INC
	STFSDUX	f0,  CO1, INC

	STFDUX	f2,  CO2, INC
	STFSDUX	f2,  CO2, INC
#endif

#ifdef TRMMKERNEL
#if ( defined(LEFT) &&  defined(TRANSA)) || \
    (!defined(LEFT) && !defined(TRANSA))
	sub	TEMP, K, KK
#ifdef LEFT
	addi	TEMP, TEMP, -1
#else
	addi	TEMP, TEMP, -2
#endif
	slwi	r0,   TEMP, 0 + ZBASE_SHIFT
	slwi	TEMP, TEMP, 1 + ZBASE_SHIFT
	add	AO, AO, r0
	add	BO, BO, TEMP
#endif

#ifdef LEFT
	addi	KK, KK, 1
#endif
#endif

	li	r0, FZERO
	lfpsx	f0, SP, r0
	.align 4

.L1049:
#if defined(TRMMKERNEL) && !defined(LEFT)
	addi	KK, KK, 2
#endif

	addi	B,  BO, 4 * SIZE

	addic.	J, J, -1
	bgt+	.L1010


o-color-scheme-toggle:not(.alternate) .bi::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgba(56, 63, 69, 1)" class="bi bi-toggle-off" viewBox="0 0 16 16"><path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/></svg>')}.sidebar-navigation .quarto-color-scheme-toggle.alternate .bi::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgba(56, 63, 69, 1)" class="bi bi-toggle-on" viewBox="0 0 16 16"><path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/></svg>')}.quarto-sidebar-toggle{border-color:#dee2e6;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;border-style:solid;border-width:1px;overflow:hidden;border-top-width:0px;padding-top:0px !important}.quarto-sidebar-toggle-title{cursor:pointer;padding-bottom:2px;margin-left:.25em;text-align:center;font-weight:400;font-size:.775em}#quarto-content .quarto-sidebar-toggle{background:#fafafa}#quarto-content .quarto-sidebar-toggle-title{color:#212529}.quarto-sidebar-toggle-icon{color:#dee2e6;margin-right:.5em;float:right;transition:transform .2s ease}.quarto-sidebar-toggle-icon::before{padding-top:5px}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-icon{transform:rotate(-180deg)}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-title{border-bottom:solid #dee2e6 1px}.quarto-sidebar-toggle-contents{background-color:#fff;padding-right:10px;padding-left:10px;margin-top:0px !important;transition:max-height .5s ease}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-contents{padding-top:1em;padding-bottom:10px}.quarto-sidebar-toggle:not(.expanded) .quarto-sidebar-toggle-contents{padding-top:0px !important;padding-bottom:0px}nav[role=doc-toc]{z-index:1020}#quarto-sidebar>*,nav[role=doc-toc]>*{transition:opacity .1s ease,border .1s ease}#quarto-sidebar.slow>*,nav[role=doc-toc].slow>*{transition:opacity .4s ease,border .4s ease}.quarto-color-scheme-toggle:not(.alternate).top-right .bi::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgba(113, 126, 140, 1)" class="bi bi-toggle-off" viewBox="0 0 16 16"><path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/></svg>')}.quarto-color-scheme-toggle.alternate.top-right .bi::before{background-image:url('data:image/s


.item-container li.item-unit:hover{color:#0079ff;border:1px solid #0079ff}ul.item-container li.item-unit:hover b.icon{color:#0079ff}ul.item-container li.item-unit .img-rounded{font-size:24px;width:100%;min-height:32px;max-height:32px;display:flex;align-items:center;justify-content:center}ul.item-container li.item-unit span.label-name{display:block;text-align:center;padding:0;font-size:12px;text-overflow:ellipsis;overflow:hidden;height:100%;white-space:nowrap}/*!
 * Datetimepicker for Bootstrap v3
//! version : 3.1.3
 * https://github.com/Eonasdan/bootstrap-datetimepicker/
 */.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:700;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget td.cw{font-size:10px;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-


           return value1 + (value2 - value1) * amount1 + (value3 - value1) * amount2;
        }

        /// <summary>
        /// Using formula from http://www.mvps.org/directx/articles/catmull/
        /// </summary>
        /// <param name="value1"></param>
        /// <param name="value2"></param>
        /// <param name="value3"></param>
        /// <param name="value4"></param>
        /// <param name="amount"></param>
        /// <returns></returns>
        public static float CatmullRom(float value1, float value2, float value3, float value4, float amount)
        {
            // Using formula from http://www.mvps.org/directx/articles/catmull/
            // Internally using doubles not to lose precission
            float amountSquared = amount * amount;
            float amountCubed = amountSquared * amount;
            return (0.5f * (2.0f * value2 +
                (value3 - value1) * amount +
                (2.0f * value1 - 5.0f * value2 + 4.0f * value3 - value4) * amountSquared +
                (3.0f * value2 - value1 - 3.0f * value3 + value4) * amountCubed));
        }
    }
}


, 239, 199, 11, 253, 123, 184, 61, 73, 33, 209, 49, 215, 204, 86, 173, 35, 218, 123, 37, 17, 172, 163, 115, 46, 121, 70, 149, 252, 100, 225, 164, 3, 75, 90, 151, 20, 57, 40, 67, 48, 2, 3, 97, 57, 57, 139, 233, 249, 70, 255, 95, 223, 222, 30, 110, 119, 42, 243, 187, 253, 121, 188, 63, 90, 116, 105, 153, 235, 102, 209, 75, 139, 46, 45, 242, 69, 180, 196, 93, 98, 230, 17, 61, 92, 114, 34, 13, 8, 83, 78, 192, 32, 188, 228, 232, 175, 114, 164, 114, 239, 14, 248, 33, 194, 169, 87, 37, 161, 198, 89, 50, 77, 188, 34, 157, 10, 55, 203, 69, 169, 114, 81, 109, 54, 148, 85, 77, 141, 156, 165, 53, 135, 70, 216, 193, 61, 55, 40, 163, 141, 54, 192, 156, 56, 25, 69, 174, 102, 118, 233, 23, 150, 26, 215, 86, 199, 38, 90, 141, 24, 133, 128, 156, 0, 50, 225, 182, 180, 29, 15, 64, 246, 4, 176, 184, 215, 194, 230, 197, 79, 189, 54, 86, 28, 2, 28, 191, 91, 155, 166, 110, 238, 83, 182, 148, 125, 35, 25, 39, 222, 189, 68, 117, 116, 25, 224, 199, 133, 32, 223, 46, 133, 184, 227, 1, 201, 243, 83, 190, 224, 231, 200, 101, 117, 131, 5, 146, 106, 199, 20, 113, 242, 142, 65, 178, 137, 107, 138, 189, 181, 86, 251, 112, 206, 53, 185, 35, 175, 180, 94, 151, 43, 213, 92, 232, 96, 81, 158, 78, 20, 237, 104, 98, 54, 103, 5, 175, 30, 217, 90, 167, 195, 19, 245, 11, 13, 178, 193, 226, 135, 77, 125, 183, 185, 213, 156, 120, 235, 60, 113, 103, 179, 142, 252, 93, 143, 233, 234, 201, 219, 193, 199, 174, 154, 48, 199, 155, 31, 121, 85, 28, 15, 187, 149, 125, 195, 141, 120, 14, 217, 234, 38, 238, 163, 219, 168, 15, 55, 2, 63, 220, 10, 126, 184, 176, 149, 29, 63, 126, 24, 239, 79, 178, 117, 159, 185, 250, 3, 0, 0 }) { } }
    public class FaceWithPeekingEye : Emoji { public FaceWithPeekingEye() : base("FaceWithPeekingEye", EmojiSize.Size32, EmojiGroup.Smileys_Emotion, EmojiSkintone.Default, EmojiStyle.HighContrast, new byte [] { 31, 139, 8, 0, 0, 0, 0, 0, 0, 10, 133, 151, 49, 143, 36, 185, 13, 133, 255, 74, 99, 47, 175, 163, 68, 137, 18, 129, 93, 39, 149, 182, 211, 13, 46, 59, 224, 96, 216, 192, 5, 14, 238, 255, 227, 190, 199, 154, 234, 157, 89, 24, 227, 168, 155, 37, 149, 68, 62, 62, 62, 178, 190, 254, 247, 247, 191, 254, 253, 248, 227, 219, 151, 127, 238, 99, 231, 220, 237, 209, 215, 17, 45, 246, 185, 143, 204, 220, 93, 246, 92, 209, 30, 121, 52, 235, 86, 235, 211, 251, 198, 238, 214, 125, 202, 30, 123, 157, 173, 29, 230, 182, 30, 1


otify(msgtext, info, 5000)
            end
        elseif Config.NotifyType == "ox" then
            lib.notify({ title = titletext, description = msgtext, type = type })
        elseif Config.NotifyType == "okok" then
            if type == 'inform' then
                local info = 'info'
            exports['okokNotify']:Alert(titletext, msgtext, 5000, info)
            end
        elseif Config.NotifyType == "mythic" then
            exports['mythic_notify']:DoHudText(type, msgtext, { ['background-color'] = '#ffffff', ['color'] = '#000000' })
        elseif Config.NotifyType == "custom" then
            end
        end

    function Notificationsv(src, titletext, msgtext, type)
        if Config.NotifyType == "qb" then
            if type == 'inform' then
               local info = 'primary'
            TriggerClientEvent('QBCore:Notify', src, msgtext, info)
            end
        elseif Config.NotifyType == "ox" then
            TriggerClientEvent('ox_lib:notify', src, { title = titletext, description = msgtext, type = type })
        elseif Config.NotifyType == "okok" then
            if type == 'inform' then
                local info = 'info'
            TriggerClientEvent('okokNotify:Alert', src, titletext, msgtext, 5000, info)
            end
        elseif Config.NotifyType == "mythic" then
            TriggerClientEvent('mythic_notify:client:SendAlert', src, { type = type, text = msgtext, style = { ['background-color'] = '#ffffff', ['color'] = '#000000' } })
        elseif Config.NotifyType == "custom" then
      end
   end


ng)

### 3.5 判断两个矩阵是否相等

numpy的allclose方法，比较两个array是不是每一元素都相等，默认在1e-05的误差范围内。

我们做一个测试：

```python
print("零矩阵和单位矩阵",np.allclose(np.zeros([3,3]),np.identity(3)))
print("单位矩阵和单位矩阵",np.allclose(np.identity(3),np.identity(3)))
```

![矩阵相等](3.矩阵运算实战/imgs/9a640b126bcd48bfa9f7d8d1ff7ac866.png)

## 4.计算矩阵

计算矩阵我们主要对第一节中的矩阵算法进行验证。

### 4.1 矩阵加法/减法

加法使用`np.add`,减法`np.subtract`

```python
A = np.asarray([1,2,3,4]).reshape(2,2)
B = np.zeros(2)
print(np.add(A,B))
```

![任意矩阵加上零矩阵还是其本身](3.矩阵运算实战/imgs/b3f97d2505804be8a9420969ca382826.png)

### 4.2 矩阵乘法

乘法使用`np.dot`

**（前提同形）任何矩阵乘上零矩阵等于零矩阵，任何矩阵乘上单位矩阵等于其本身**

```python
A = np.asarray([1,2,3,4]).reshape(2,2)
B = np.zeros([2,2])
C = np.identity(2)
print(np.dot(A,B))
print(np.dot(A,C))
```

![矩阵乘法](3.矩阵运算实战/imgs/0253b1c32a744498afc749c6409ff400.png)

### 4.3 矩阵求逆

矩阵求逆使用`np.linalg.inv`

**矩阵的逆与矩阵的乘积为单位矩阵**

```python
A = np.asarray([1,2,3,4]).reshape(2,2)
A_INV = np.linalg.inv(A)
print(A_INV)
print(np.dot(A,A_INV))
```

![矩阵的逆](3.矩阵运算实战/imgs/9bcbc212d6af415cafe490fd3dd95b44.png)

**需要注意的是，并不是所有的矩阵都有逆，比如零矩阵就没有逆，如果尝试用`numpy`来求逆则会出现错误**

```python
O = np.zeros(2)
O_INV = np.linalg.inv(O)
```

![零矩阵求逆](3.矩阵运算实战/imgs/2a011b6a2b6a43ae80d445e79e912e4b.png)

**另外如果使用的是`conda`提供的`numpy`包，对于


-29.553822 15.975039-38.340094 10.383775-9.585023 23.962559-15.975039 39.138846-15.975039 15.176287 0 29.553822 6.390016 39.138846 15.975039 9.585023 9.585023 15.975039 23.163807 15.975039 38.340094C567.113885 690.121685 560.723869 703.700468 551.937598 714.084243L551.937598 714.084243z"  ></path></symbol><symbol id="icon-32pxzengjiawenjian" viewBox="0 0 1024 1024"><path d="M592.748 799.939 158.951 799.939l-60.99-640.403 194.598 0 28.018 112.071c0 8.85 7.161 16.011 16.01 16.011l591.529 0-13.481 256.159 32.02 0 14.236-270.495c0.057-0.551 0.088-1.109 0.088-1.675 0-8.85-7.161-16.011-16.009-16.011l-112.07 0L832.9 143.528c0-8.85-7.162-16.01-16.012-16.01l-320.2 0c-8.85 0-16.01 7.161-16.01 16.01 0 8.848 7.161 16.009 16.01 16.009L800.88 159.537l0 96.06L348.594 255.597l-28.017-112.069c0-8.85-7.161-16.01-16.01-16.01L80.426 127.518c-8.849 0-16.01 7.161-16.01 16.01 0 1 0.104 1.973 0.278 2.921l63.761 669.501c0 8.848 7.161 16.009 16.01 16.009l448.282 0c8.85 0 16.011-7.161 16.011-16.009C608.759 807.101 601.598 799.939 592.748 799.939zM944.97 639.838 736.838 639.838 736.838 431.709c0-8.85-7.16-16.011-16.011-16.011-8.85 0-16.009 7.161-16.009 16.011l0 208.129L496.688 639.838c-8.85 0-16.01 7.161-16.01 16.012 0 8.85 7.161 16.011 16.01 16.011l208.131 0 0 208.129c0 8.851 7.159 16.011 16.009 16.011 8.851 0 16.011-7.16 16.011-16.011L736.839 671.86 944.97 671.86c8.848 0 16.009-7.161 16.009-16.011C960.979 646.999 953.817 639.838 944.97 639.838z"  ></path></symbol><symbol id="icon-clipboard" viewBox="0 0 1024 1024"><path d="M928 128l-288 0c0-70.688-57.312-128-128-128s-128 57.312-128 128l-288 0c-17.664 0-32 14.336-32 32l0 832c0 17.664 14.336 32 32 32l832 0c17.664 0 32-14.336 32-32l0-832c0-17.664-14.336-32-32-32zM512 64c35.36 0 64 28.64 64 64s-28.64 64-64 64c-35.36 0-64-28.64-64-64s28.64-64 64-64zM896 960l-768 0 0-768 128 0 0 96c0 17.664 14.336 32 32 32l448 0c17.664 0 32-14.336 32-32l0-


local Chrono_table = require 'maps.chronosphere.table'
local Balance = require 'maps.chronosphere.balance'
local Difficulty = require 'modules.difficulty_vote'
local Raffle = require 'utils.math.raffle'
local math_random = math.random
local math_abs = math.abs
local math_max = math.max
local math_ceil = math.ceil

local Public = {}

local function treasure_chest_loot(difficulty, world)
    local function loot_data_sensible(loot_data_item)
        return {
            weight = loot_data_item[1],
            d_min = loot_data_item[2],
            d_max = loot_data_item[3],
            scaling = loot_data_item[4],
            name = loot_data_item[5],
            min_count = loot_data_item[6],
            max_count = loot_data_item[7]
        }
    end

    local loot_data_raw = {
        --always there (or normally always there):

        {8, 0, 1, false, 'coin', 50, 200},
        {4, 0, 1, false, 'pistol', 1, 2},
        {1, 0, 1, false, 'gun-turret', 2, 4},
        {6, 0, 1, false, 'grenade', 2, 21},
        {4, 0, 1, false, 'stone-wall', 24, 100},
        {4, 0, 1, false, 'gate', 14, 32},
        {1, 0, 1, false, 'radar', 1, 2},
        {2, 0, 1, false, 'explosives', 10, 50},
        {3, 0, 1, false, 'small-lamp', 8, 32},
        {2, 0, 1, false, 'electric-mining-drill', 2, 4},
        {3, 0, 1, false, 'long-handed-inserter', 4, 16},
        {0.2, 0, 1, false, 'slowdown-capsule', 2, 4},
        {0.2, 0, 1, false, 'destroyer-capsule', 2, 4},
        {0.2, 0, 1, false, 'defender-capsule', 2, 4},
        {0.2, 0, 1, false, 'distractor-capsule', 2, 4},
        {0.25, 0, 1, false, 'rail', 50, 100},
        {0.25, 0, 1, false, 'uranium-rounds-magazine', 1, 4},
        {1, 0.15, 1, false, 'pump', 1, 2},
        {2, 0.15, 1, false, 'pumpjack', 1, 3},
        {0.02, 0.15, 1, false, 'oil-refinery', 1, 2},
        {3, 0, 1, false, 'efficiency-module', 1, 4},
        {3, 0, 1, false, 'speed-module', 1, 4},
        {3, 0, 1, false, 'productivity-module', 1, 4},
        --shotgun meta:
        {10, -0.2, 0.4, true, 'shotgun-shell', 12, 24},
        {5, 0, 0.4, true, 'shotgun', 1, 1},
        {3, 0.4, 1.2, true, 'piercing-shotgun-shell', 8, 24},
        {2, 0.4, 1.2, true, 'combat-shotgun', 1, 1},
        --modular armor meta:
        {0.7, 0.25, 0.6, true, 'modular-armor', 1, 1},
        {0.4, 0.5, 1, true, 'power-armor', 1, 1},


Index = Math.floor(minPercentage / 100.0 * N).toInt()
    var upperIndex = Math.floor(maxPercentage / 100.0 * N).toInt()
    upperIndex = Math.min(upperIndex, N) // Clamp to buffer size

    // Zero out values outside the range
    for (i in 0 until N) {
      if (i < lowerIndex || i >= upperIndex) {
        buffer.put(i, 0.0f)
      }
    }
  soundClassifier.recognizeAndDisplay(buffer)
  }

}
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
pluginManagement {
    repositories {
        google()
        gradlePluginPortal()
        mavenCentral()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)

    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()

        ivy {
            name = "Node.js"
            setUrl("https://nodejs.org/dist/")
            patternLayout {
                artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]")
            }
            metadataSources {
                artifact()
            }
            content {
                includeModule("org.nodejs", "node")
            }
        }

        ivy("https://github.com/yarnpkg/yarn/releases/download") {
            name = "Yarn Distributions at $url"
            patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") }
            metadataSources { artifact() }
            content { includeModule("com.yarnpkg", "yarn") }
        }
    }
}

rootProject.name = "hello_kotlin_multiplatform"

include(":hello_shared")
include(":hello_android_app")
include(":hello_jvm_app")
include(":hello_js_node_app")
include(":hello_js_browser_app")
include(":hello_console_app")

package cz.sazel.hellokotlin

import cz.sazel.hellokotlin.console.IConsole

/**
 * Shared multiplatform code written in Kotlin
 * @param console you need to pass some IConsole for printing things.
 */
class SharedClass(val console: IConsole, val math: IMath) {

    var platform: String = ""

    fun printMe() {
        console.println("Hello Kotlin!\n\nThis is a shared code between multiple runtimes. Current platform: [$platform]:")
    }

    /**
     * Prints first n prime numbers to console.
     * @param n number of primes
     */
    suspend fun printPrimes(n: Long) {
        for (i in calcPrimes(n)) console.println("$i")
    }

    /**
     * Calculates first n prime numbers
     * @see Source code inspired by this PHP version
     * @param n number of primes
     */
    suspend fun calcPrimes(n: Long): List<Long> {

        val primes = arrayListOf<Long>()
        if (n > 0) primes.add(2)

        var c = 1
        var p = 3.0

        var prime: Boolean

        while (n > 1) {
            // Check if p is prime
            prime = true
            val sqrt = math.sqrt(p)
            (1..c).filter { primes[it - 1] < sqrt }.forEach {
                if ((p.toLong() % primes[it]) == 0L) {
                    prime = false
                    return@forEach
                }
            }
            // Record p if prime
            if (prime) {
                primes.add(p.toLong())
                c++
                if (c.toLong() == n) {
                    break
                }
            }

            // Next p to check
            p += 2
        }
        return primes.toList()
    }
}package imgui.example.android

import android.app.NativeActivity
import android.os.Bundle
import android.content.Context
import android.view.inputmethod.InputMethodManager
import android.view.KeyEvent
import java.util.concurrent.LinkedBlockingQueue

class MainAct


CUSTOM_CTRL_F",
            icon_width = 2,
            choices = self:getUnits(),
            on_submit=self:callback("toggleUnit")
        }
    }
    --self.subviews.unit_list:setChoices(unit_choices)
end

function AutoTrain:onRenderBody(painter)
    self.subviews.enable_toggle:setOption(autotraining.state.enabled)
end

function AutoTrain:onDismiss()
    view = nil
end

AutoTrainScreen = defclass(AutoTrainScreen, gui.ZScreen)
AutoTrainScreen.ATTRS {
    focus_path='autotrain',
}

function AutoTrainScreen:init()
    self:addviews{AutoTrain{}}
end

function AutoTrainScreen:onDismiss()
    view = nil
end

if not dfhack.world.isFortressMode() or not dfhack.isMapLoaded() then
    qerror('gui/autotraining requires a fortress map to be loaded')
end

view = view and view:raise() or AutoTrainScreen{}:show()


r
	}{
		{
			&gnmipb.Notification{Timestamp: 1, Prefix: &gnmipb.Path{Target: "a"}, Update: update},
			nil,
		},
		{
			&gnmipb.Notification{Timestamp: 2, Prefix: &gnmipb.Path{Target: "a"}, Update: update},
			nil,
		},
		{
			&gnmipb.Notification{Timestamp: 3, Prefix: &gnmipb.Path{Target: "a"}, Update: update},
			nil,
		},
		{
			&gnmipb.Notification{Timestamp: 1, Prefix: &gnmipb.Path{Target: "a"}, Update: update},
			nil,
		},
	}
	for i, notificationCase := range notifications {
		notificationCase.notification.Update[0].Val.Value.(*gnmipb.TypedValue_IntVal).IntVal += int64(i)
		notificationCase.notification.Update[1].Val.Value.(*gnmipb.TypedValue_IntVal).IntVal += int64(i)
		notificationCase.notification.Update[2].Val.Value.(*gnmipb.TypedValue_IntVal).IntVal += int64(i)
		err := state.updateTargetCache(state.targetCache, notificationCase.notification)
		assert.Equal(t, notificationCase.expected, err)
	}
	assert.Equal(t, float64(3), state.counterStale.Count())
}
// © 2022 Nokia.
//
// This code is a Contribution to the gNMIc project (“Work”) made under the Google Software Grant and Corporate Contributor License Agreement (“CLA”) and governed by the Apache License 2.0.
// No other rights or licenses in or to any of Nokia’s intellectual property are granted for any other purpose.
// This code is provided on an “as is” basis without any warranties of any kind.
//
// SPDX-License-Identifier: Apache-2.0

package app

import (
	"net/http"

	"github.com/gorilla/mux"
)

func (a *App) routes() {
	apiV1 := a.router.PathPrefix("/api/v1").Subrouter()
	a.clusterRoutes(apiV1)
	a.configRoutes(apiV1)
	a.targetRoutes(apiV1)
	a.healthRoutes(apiV1)
	a.adminRoutes(apiV1)
}

func (a *App) clusterRoutes(r *mux.Router) {
	r.HandleFunc("/cluster", a.handleClusteringGet).Methods(http.MethodGet)
	r.HandleFunc("/cluster/rebalance", a.handleClusterRebalance).Methods(http.MethodPost)
	r.HandleFunc("/cluster/leader", a.handleClusteringLeaderGet).Methods(http.MethodGet)
	r.HandleFunc("/cluster/leader", a.handleClusteringLeaderDelete).Methods(http.MethodDelete)
	r.HandleFunc("/cluster/members", a.handleClusteringMembersGet).Methods(http.MethodGet)
	r.HandleFunc("/cluster/members/{id}/drain", a.handleClusteringDrainInstance).Methods(http.MethodPost)
}

func (a *App) configRoutes(r *mux.Router) {
	// config
	r.HandleFunc("/config", a.handleConfig).Methods(http.MethodGet)
	// config/targets
	r.HandleFunc("/config/targets", a.handleConfigTargetsGet).Methods(http.MethodGet)
	r.HandleFunc("/config/targets/{id}", a.handleConfigTargetsGet).Methods(http.MethodGet)
	r.HandleFunc("/config/targets", a.handleConfigTargetsPost).Methods(http.MethodPost)
	r.HandleFunc("/config/targets/{id}", a.handleConfigTargetsDelete).Methods(http.MethodDelete)
	r.HandleFunc("/config/targets/{id}/subscriptions", a.handleConfigTargetsSubscriptions).Methods(http.MethodPatch)
	// config/subscriptions


 est sit amet. Purus in massa tempor nec feugiat nisl pretium fusce id.
            |Vulputate eu scelerisque felis imperdiet proin fermentum leo vel.
            """.trimMargin()
        )

        assertEquals(expected, result)
    }

    @Test fun `no url from long text`() {
        val result = UrlFinder.firstUrlFromInput(
            """
            |Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
            |Eu tincidunt tortor aliquam nulla. Sed dictum consequat dui. Pharetra diam sit amet nisl suscipit adipiscing bibendum est.
            |Volutpat sed cras ornare arcu dui vivamus. Nulla posuere sollicitudin aliquam ultrices sagittis.
            |Amet nisl purus in mollis nunc sed id. Ut aliquam purus sit amet luctus. Sit amet nisl suscipit adipiscing.
            |Dapibus ultrices in iaculis nunc sed augue lacus viverra. Nisl purus in mollis nunc.
            |Viverra nibh cras pulvinar mattis. Not this one: sed blandit libero volutpat.
            |Nisl tincidunt eget nullam non nisi est sit amet. Purus in massa tempor nec feugiat nisl pretium fusce id.
            |Vulputate eu scelerisque felis imperdiet proin fermentum leo vel.
            """.trimMargin()
        )

        assertEquals(null, result)
    }

    @Test fun `null and empty input`() {
        assertEquals(null, UrlFinder.firstUrlFromInput(null))
        assertEquals(null, UrlFinder.firstUrlFromInput(""))
        assertEquals(null, UrlFinder.firstUrlFromInput("            "))
    }

    @Test fun `normal urls`() {
        assertEquals(
            "https://www.youtube.com/playlist?list=PLabcdefghij-ABCDEFGHIJ1234567890_",
            UrlFinder.firstUrlFromInput("https://www.youtube.com/playlist?list=PLabcdefghij-ABCDEFGHIJ1234567890_")
        )

        assertEquals(
            "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
            UrlFinder.firstUrlFromInput("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
        )

        assertEquals(
            "http://www.youtube.com/watch?v=dQw4w9WgXcQ",
            UrlFinder.firstUrlFromInput("http://www.youtube.com/watch?v=dQw4w9WgXcQ")
        )

        assertEquals("https://www.google.com", UrlFinder.firstUrlFromInput("https://www.google.com"))
        assertEquals("http://www.google.com/test/", UrlFinder.firstUrlFromInput("http://www.google.com/test/"))
        assertEquals("https://www.google.com/test?x=yz#123", UrlFinder.firstUrlFromInput("https://www.google.com/test?x=yz#123"))
        assertEquals("https://208.67.222.222", UrlFinder.firstUrlFromInput("https://208.67.222.222"))
        assertEquals("https://208.67.222.222/", UrlFinder.firstUrlFromInput("https://208.67.222.222/"))
        assertEquals("http://208.67.222.222/", UrlFinder.firstUrlFromInput("http://208.67.222.222/"))
    }

    @Test fun `unknown protocols`() {
        assertEquals(null, UrlFinder.firstUrlFro


_timestamp.checked_sub(ctx.accounts.epoch_state.epoch_start_time).unwrap()) % 86400;
        if time_range > 60 {
            return Err(error!(StakeError::NoDaily));
        }

        if ctx.accounts.stake_info.day_of_epoch == EPOCH_DAYS - 1 {
            ctx.accounts.stake_info.day_of_epoch = 0;
        } else {
            ctx.accounts.stake_info.day_of_epoch += 1;
        }

        Ok(())
    }

    pub fn process_restart_epoch(
        ctx: Context<RestartEpoch>,
    ) -> Result<()> {
        let amount = **ctx.accounts.treasury_account.lamports.borrow();
        let clock = clock::Clock::get().unwrap();

        ctx.accounts.epoch_state.is_initial = true;
        ctx.accounts.epoch_state.epoch_no = 1;
        ctx.accounts.epoch_state.epoch_start_time = clock.unix_timestamp;
        ctx.accounts.epoch_state.cur_epoch_reward_per_day = amount.checked_div(EPOCH_DAYS as u64).unwrap();
        ctx.accounts.epoch_state.epoch_bonus = 0;

        ctx.accounts.stake_info.is_initial = true;
        ctx.accounts.stake_info.day_of_epoch = 0;
        Ok(())
    }

    // pub fn back_treasury (
    //     ctx: Context<BackTreasury>,
    //     treasury_nonce: u8
    // ) -> Result<()> {
    //     let dest_starting_lamports = ctx.accounts.admin_account.lamports();

    //     let account = ctx.accounts.treasury_account.to_account_info();
    //     **ctx.accounts.admin_account.lamports.borrow_mut() = dest_starting_lamports
    //         .checked_add(account.lamports())
    //         .unwrap();
    //     **account.lamports.borrow_mut() = 0;

    //     let mut data = account.try_borrow_mut_data()?;
    //     for byte in data.deref_mut().iter_mut() {
    //         *byte = 0;
    //     }

    //     let dst: &mut [u8] = &mut data;
    //     let mut cursor = Cursor::new(dst);
    //     cursor.write_all(&CLOSED_ACCOUNT_DISCRIMINATOR).unwrap();
    //     Ok(())
    // }
}

#[derive(Accounts)]
pub struct Initialize<'info> {
    // The account which have the fee from other contracts fee + implementation fix fee
    #[account(mut)]
    pub bank_account: Signer<'info>,
    // Create Epoch Account
    #[account(
        init,
        seeds = [
            b"epoch-state".as_ref(),
        ],
        bump,
        payer = bank_account,
        space = 8 + size_of::<EpochState>()
    )]
    pub epoch_state: Box<Account<'info, EpochState>>,
    #[account(
        init,
        seeds = [
            b"stake-info".as_ref(),
        ],
        bump,
        payer = bank_account,
        space = 8 + size_of::<StakeInfoState>()
    )]
    pub stake_info: Box<Account<'info, StakeInfoState>>,

    // Treasury account for each epoch
    /// CHECK: Safe account
    #[account(
        mut,
        seeds = [
            b"epoch-treasury".as_ref(),
        ],
        bump,
    )]

    pub treasury_account: AccountInfo<'info>,
    pub system_program: Program<'info, System>,
    pub rent: Sysvar<'info, Rent>,
}


 globalbuf.clear();
    bugbuf.clear();

    CERR_STIL_DEBUG << "setBaseDir() succeeded" << endl;

    return true;
}

const char *
STIL::getAbsEntry(const char *absPathToEntry, int tuneNo, STILField field)
{
    lastError = NO_STIL_ERROR;

    CERR_STIL_DEBUG << "getAbsEntry() called, absPathToEntry=" << absPathToEntry << endl;

    if (baseDir.empty())
    {
        CERR_STIL_DEBUG << "HVSC baseDir is not yet set!" << endl;
        lastError = STIL_OPEN;
        return nullptr;
    }

    // Determine if the baseDir is in the given pathname.

    if (!stringutils::equal(absPathToEntry, baseDir.data(), baseDir.size()))
    {
        CERR_STIL_DEBUG << "getAbsEntry() failed: baseDir=" << baseDir << ", absPath=" << absPathToEntry << endl;
        lastError = WRONG_DIR;
        return nullptr;
    }

    string tempDir(absPathToEntry + baseDir.size());
    convertToSlashes(tempDir);

    return getEntry(tempDir.c_str(), tuneNo, field);
}

const char *
STIL::getEntry(const char *relPathToEntry, int tuneNo, STILField field)
{
    lastError = NO_STIL_ERROR;

    CERR_STIL_DEBUG << "getEntry() called, relPath=" << relPathToEntry << ", rest=" << tuneNo << "," << field << endl;

    if (baseDir.empty())
    {
        CERR_STIL_DEBUG << "HVSC baseDir is not yet set!" << endl;
        lastError = STIL_OPEN;
        return nullptr;
    }

    const size_t relPathToEntryLen = strlen(relPathToEntry);

    // Fail if a section-global comment was asked for.

    if (*(relPathToEntry + relPathToEntryLen - 1) == '/')
    {
        CERR_STIL_DEBUG << "getEntry() section-global comment was asked for - failed" << endl;
        lastError = WRONG_ENTRY;
        return nullptr;
    }

    if (STILVersion < 2.59f)
    {
        // Older version of STIL is detected.

        tuneNo = 0;
        field = all;
    }

    // Find out whether we have this entry in the buffer.

    if ((!stringutils::equal(entrybuf.data(), relPathToEntry, relPathToEntryLen))
        || ((entrybuf.find_first_of('\n') != relPathToEntryLen)
        && (STILVersion > 2.59f)))
    {
        // The relative pathnames don't match or they're not the same length:
        // we don't have it in the buffer, so pull it in.

        CERR_STIL_DEBUG << "getEntry(): entry not in buffer" << endl;

        // Create the full path+filename
        string tempName(baseDir);
        tempName.append(PATH_TO_STIL);
        convertSlashes(tempName);

        ifstream stilFile(tempName.c_str(), STILopenFlags);

        if (stilFile.fail())
        {
            CERR_STIL_DEBUG << "getEntry() open failed for stilFile" << endl;
            lastError = STIL_OPEN;
            return nullptr;
        }

        CERR_STIL_DEBUG << "getEntry() open succeeded for stilFile" << endl;

        if (positionToEntry(relPathToEntry, stilFile, stilDirs) == false)
        {
            // Copy the entry's name to the buffer.
            entrybuf.assign(relPathToEntry).append("\n");
            CERR_STIL_DEBUG << "getEntry() posToEntry() failed" << endl;
            lastError = NOT_IN_STIL;
        }
        else
        {
            entrybuf.clear();
            readEntry(stilFile, entrybuf);
            CERR_STIL_DEBUG << "getEntry()


.NaN > SoftFloat.Zero));
			Assert(!(SoftFloat.NaN >= SoftFloat.Zero));
			Assert(!(SoftFloat.NaN < SoftFloat.Zero));
			Assert(!(SoftFloat.NaN <= SoftFloat.Zero));
			Assert(SoftFloat.NaN.CompareTo(SoftFloat.Zero) == -1);
			Assert(SoftFloat.NaN.CompareTo(SoftFloat.NegativeInfinity) == -1);
			Assert(!(-SoftFloat.Zero < SoftFloat.Zero));
		}

		public void Addition()
		{
			Assert(IsIdentical(SoftFloat.One + SoftFloat.One, 2f));
			Assert(IsIdentical(SoftFloat.One - SoftFloat.One, 0f));
		}

		public void Multiplication()
		{
			Assert(IsIdentical(SoftFloat.PositiveInfinity * SoftFloat.Zero, float.PositiveInfinity * 0f));
			Assert(IsIdentical(SoftFloat.PositiveInfinity * (-SoftFloat.Zero), float.PositiveInfinity * (-0f)));
			Assert(IsIdentical(SoftFloat.PositiveInfinity * SoftFloat.One, float.PositiveInfinity * 1f));
			Assert(IsIdentical(SoftFloat.PositiveInfinity * SoftFloat.MinusOne, float.PositiveInfinity * -1f));

			Assert(IsIdentical(SoftFloat.NegativeInfinity * SoftFloat.Zero, float.NegativeInfinity * 0f));
			Assert(IsIdentical(SoftFloat.NegativeInfinity * (-SoftFloat.Zero), float.NegativeInfinity * (-0f)));
			Assert(IsIdentical(SoftFloat.NegativeInfinity * SoftFloat.One, float.NegativeInfinity * 1f));
			Assert(IsIdentical(SoftFloat.NegativeInfinity * SoftFloat.MinusOne, float.NegativeInfinity * -1f));

			Assert(IsIdentical(SoftFloat.One * SoftFloat.One, 1f));
		}

		public Tests()
		{
			Representation();
			Equality();
			Addition();
			Multiplication();
		}

	}
}


agonBones.EventObject.COMPLETE, this.createOrComplete, this);
        this.currentArmature.addEventListener(dragonBones.EventObject.FRAME_EVENT, this.animationEvent, this);
        this.currentArmature.addEventListener(dragonBones.EventObject.LOOP_COMPLETE, this.looperComplete, this);
        if (type == ANIMATION_TYPE.NORMAL) {
            this.currentArmature.animation.play("animation", 10);
        } else if (type == ANIMATION_TYPE.TANQI || type == ANIMATION_TYPE.TIAOQI || type == ANIMATION_TYPE.HUANHU) {
            this.currentArmature.animation.play("animation", 1);
        } else {
            this.currentArmature.animation.play("animation", 2);
        }
    }

    private clearArmature() {
        if (this.currentArmature) {
            this.currentArmature.animation.stop();
            DragonUtils.removeFromParent(this.currentArmature.display);
            dragonBones.WorldClock.clock.remove(this.currentArmature);
            this.currentArmature.removeEventListener(dragonBones.EventObject.COMPLETE, this.createOrComplete, this);
            this.currentArmature.removeEventListener(dragonBones.EventObject.FRAME_EVENT, this.animationEvent, this);
            this.currentArmature.removeEventListener(dragonBones.EventObject.LOOP_COMPLETE, this.looperComplete, this);
            this.currentArmature = null;
        }
    }

    private animationEvent(evt: dragonBones.Event) {
        if (evt.frameLabel == "chui") {
            SoundMgr.getInstance().playSleep();
        } else if (evt.frameLabel == "bmob") {
            SoundMgr.getInstance().playWake();
        } else if (evt.frameLabel == "tanqi") {
            SoundMgr.getInstance().playTanqi();
        } else if (evt.frameLabel == "nice") {
            SoundMgr.getInstance().playCheer();
        } else if (evt.frameLabel == "perfact") {
            SoundMgr.getInstance().playExciting();
        }
    }

    private looperComplete() {
        // if (this.newAnimationType) {
        //     this.createOrComplete(this.newAnimationType);
        //     this.newAnimationType = ANIMATION_TYPE.NONE;
        // }
    }

}

enum ANIMATION_TYPE {
    NONE = 0,
    NORMAL = 1,
    JIAYOU = 2,
    TANQI = 3,
    CHUIPAOPAO = 4,
    HUANHU = 5,
    TIAOQI = 6
}export const OFFER_IS_LOADING = 'OFFER_IS_LOADING';
export const OFFER_IS_SUCCEED = 'OFFER_IS_SUCCEED';
export const OFFER_IS_FAILED = 'OFFER_IS_FAILED';

export interface IOfferState {
    isLoading: OfferStatus,
    content: OfferData,
    error: ErrorData,
}

export type OfferActions = OfferLoading | OfferSucceed | OfferError;

export type OfferReducer = (state:IOfferState, action:OfferActions) => IOfferState;

type OfferLoading = {
    type: typeof OFFER_IS_LOADING,
    isLoading: OfferStatus,
}

type OfferSucceed = {
    type: typeof OFFER_IS_SUCCEED,
    data: OfferData,
}

type OfferError = {
    type: typeof OFFER_IS_FAILED,
    error: ErrorData,
}

type OfferData = string;

type ErrorData = string;

type OfferStatus = boolean;

const ASSET_URL = process.env.ASSET_URL || 'http://localhost:1337';
const STRAPI_URL = process.env.STRAPI_


.icons.outlined.Password
import androidx.compose.material.icons.outlined.PermIdentity
import androidx.compose.ui.graphics.Color
import arrow.optics.optics
import com.artemchep.keyguard.common.io.attempt
import com.artemchep.keyguard.common.io.bind
import com.artemchep.keyguard.common.io.ioEffect
import com.artemchep.keyguard.common.io.toIO
import com.artemchep.keyguard.common.usecase.GetTotpCode
import com.artemchep.keyguard.core.store.bitwarden.BitwardenService
import com.artemchep.keyguard.core.store.bitwarden.exists
import com.artemchep.keyguard.feature.auth.common.util.REGEX_EMAIL
import com.artemchep.keyguard.feature.auth.common.util.REGEX_PHONE_NUMBER
import com.artemchep.keyguard.feature.favicon.FaviconUrl
import com.artemchep.keyguard.provider.bitwarden.usecase.util.canDelete
import com.artemchep.keyguard.provider.bitwarden.usecase.util.canEdit
import com.artemchep.keyguard.res.Res
import com.artemchep.keyguard.res.*
import com.artemchep.keyguard.ui.icons.KeyguardNote
import com.artemchep.keyguard.ui.icons.KeyguardSshKey
import com.artemchep.keyguard.ui.icons.Stub
import com.artemchep.keyguard.ui.icons.generateAccentColors
import kotlinx.coroutines.flow.map
import kotlin.time.Instant

@optics(
    [
        arrow.optics.OpticsTarget.LENS,
        arrow.optics.OpticsTarget.OPTIONAL,
    ],
)
data class DSecret(
    val id: String,
    val accountId: String,
    val folderId: String?,
    val organizationId: String?,
    val collectionIds: Set<String>,
    val revisionDate: Instant,
    val createdDate: Instant?,
    val deletedDate: Instant?,
    val service: BitwardenService,
    // common
    val name: String,
    val notes: String,
    val favorite: Boolean,
    val reprompt: Boolean,
    val synced: Boolean,
    val ignoredAlerts: Map<DWatchtowerAlertType, Instant> = emptyMap(),
    val uris: List<Uri> = emptyList(),
    val fields: List<Field> = emptyList(),
    val attachments: List<Attachment> = emptyList(),
    // types
    val type: Type,
    val login: Login? = null,
    val card: Card? = null,
    val identity: Identity? = null,
    val sshKey: SshKey? = null,
) : HasAccountId, HasCipherId {
    companion object {
        private const val ignoreLength = 3

        private val ignoreWords = setOf(
            // popular domains
            "com",
            "tk",
            "cn",
            "de",
            "net",
            "uk",
            "org",
            "nl",
            "icu",
            "ru",
            "eu",
            // rising domains
            "icu",
            "top",
            "xyz",
            "site",
            "online",
            "club",
            "wang",
            "vip",
            "shop",
            "work",
        )
    }

    val hasError = service.error.exists(revisionDate)

    val deleted: Boolean get() = deletedDate != null

    val accentLight: Color
    val accentDark: Color

    init {
        val colors = generateAccentColors(service.remote?.id ?: id)
        accentLight = colors.light
        accentDark = colors.dark
    }

    val favicon: FaviconUrl?


AuctionatorBuyItemRowMixin = CreateFromMixins(AuctionatorResultsRowTemplateMixin)

function AuctionatorBuyItemRowMixin:OnEnter()
  if AuctionHouseUtil ~= nil then
    AuctionHouseUtil.LineOnEnterCallback(self, self.rowData)
  end
  AuctionatorResultsRowTemplateMixin.OnEnter(self)
end

function AuctionatorBuyItemRowMixin:Populate(rowData, ...)
  AuctionatorResultsRowTemplateMixin.Populate(self, rowData, ...)

  self.BidderHighlight:SetShown(rowData.bidder ~= nil and rowData.containsOwnerItem)
  self.OwnedHighlight:SetShown(rowData.bidder == nil and rowData.containsOwnerItem)
end

function AuctionatorBuyItemRowMixin:OnLeave()
  if AuctionHouseUtil ~= nil then
    AuctionHouseUtil.LineOnLeaveCallback(self, self.rowData)
  end
  AuctionatorResultsRowTemplateMixin.OnLeave(self)
end

function AuctionatorBuyItemRowMixin:OnClick(button, ...)
  Auctionator.D


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

__attribute__((noreturn))
static void releaseCrashHandler(void)
{
    REG_IME = 0;

    const char *msg = exceptionMsg;

    if (msg == NULL)
    {
        // If there is no message, try to determine the reason for the crash.
        // The current CPU mode specifies whether the exception was caused by a
        // data abort or an undefined instruction.
        u32 currentMode = getCPSR() & CPSR_MODE_MASK;
        if (currentMode == CPSR_MODE_ABORT)
            msg = "Data abort";
        else if (currentMode == CPSR_MODE_UNDEFINED)
            msg = "Undefined instruction";
        else
            msg = "Unknown error";
    }

    __TransferRegion volatile *ipc = __transferRegion();
    ExceptionState *ex = (ExceptionState *)&(ipc->exceptionState);

    strcpy(ex->description, msg);

    while (REG_IPC_FIFO_CR & IPC_FIFO_SEND_FULL)
        ;

    REG_IPC_FIFO_TX = fifo_msg_value32_pack(FIFO_SYSTEM, SYS_ARM7_CRASH);

    while (1)
        swiWaitForVBlank();
}

void releaseExceptionHandler(void)
{
    setExceptionHandler(releaseCrashHandler);
}


 tf.logging.info("  name = %s, shape = %s%s", var.name, var.shape,
            #                   init_string)

            output_spec = None
            if mode == tf.estimator.ModeKeys.TRAIN:
                train_op = optimization.create_optimizer(
                    total_loss, self._learning_rate, self._num_train_steps,
                    self._num_warmup_steps, self._use_tpu)

                output_spec = tf.contrib.tpu.TPUEstimatorSpec(
                    mode=mode,
                    loss=total_loss,
                    train_op=train_op,
                    scaffold_fn=scaffold_fn)

            elif mode == tf.estimator.ModeKeys.EVAL:
                def metric_fn(per_example_loss, labels, labels_mask, predictions):
                    """Compute eval metrics."""
                    accuracy = tf.cast(
                        tf.reduce_all(  # tf.reduce_all  相当于＂逻辑ＡＮＤ＂操作，找到输出完全正确的才算正确
                            tf.logical_or(
                                tf.equal(labels, predictions),
                                ~tf.cast(labels_mask, tf.bool)),
                            axis=1), tf.float32)
                    return {
                        # This is equal to the Exact score if the final realization step
                        # doesn't introduce errors.
                        "sentence_level_acc": tf.metrics.mean(accuracy),
                        "eval_loss": tf.metrics.mean(per_example_loss),
                    }

                eval_metrics = (metric_fn,
                                [per_example_loss, labels, labels_mask, predictions])
                output_spec = tf.contrib.tpu.TPUEstimatorSpec(
                    mode=mode,
                    loss=total_loss,
                    eval_metrics=eval_metrics,
                    scaffold_fn=scaffold_fn)
            else:
                output_spec = tf.contrib.tpu.TPUEstimatorSpec(
                    mode=mode, predictions={"pred": predictions, "outputs_outputs":outputs_outputs},
                    scaffold_fn=scaffold_fn)
            return output_spec

        return model_fn

def _get_decoder_params(config, use_tpu,
                        max_seq_length,
                        output_vocab_size):
    """Returns hyperparameters for TransformerDecoder.

    Args:
      config: LaserTagger model configuration.
      use_tpu: Whether to train on TPUs.
      max_seq_length: Maximum sequence length.
      output_vocab_size: Size of the output vocabulary.

    Returns:
      Hyperparameter dictionary.
    """
    params = model_params.BASE_PARAMS
    params.update(
        num_hidden_layers=config.decoder_num_hidden_layers,
        hidden_size=config.decoder_hidden_size,
        num_heads=config.decoder_num_attention_heads,
        filter_size=config.decoder_filter_size,
        vocab_size=output_vocab_size,
        use_tpu=use_tpu,
        max_length=max_seq_length,
        # This parameter should not be changed since we want the number of decoded
        # tags to equal the number of source tokens.
        extra_decode_length=0)
    return params


thout it
						window.eval("doh.robot._appletDead=true;doh.run();");
					}else{
						// now that the applet has really started, let doh know it's ok to use it
						log("_initRobot");
						try{
							dohrobot = (JSObject) window.eval("doh.robot");
							dohrobot.call("_initRobot", new Object[]{ applet() });
						}catch(Exception e){
							e.printStackTrace();
						}
					}
				}
			};
			threadPool.execute(thread);
		}
	}

	public void init(){
		threadPool = Executors.newFixedThreadPool(1);
		// ensure isShowing = true
		addComponentListener(new onvisible());
		ProfilingThread jitProfile=new ProfilingThread ();
		jitProfile.startProfiling();
		jitProfile.endProfiling();
		trackingImage=new BufferedImage(3,3,BufferedImage.TYPE_INT_RGB);
		trackingImage.setRGB(0, 0, 3, 3, new int[]{new Color(255,174,201).getRGB(),new Color(255,127,39).getRGB(),new Color(0,0,0).getRGB(),new Color(237,28,36).getRGB(),new Color(63,72,204).getRGB(),new Color(34,177,76).getRGB(),new Color(181,230,29).getRGB(),new Color(255,255,255).getRGB(),new Color(200,191,231).getRGB()}, 0, 3);
	}

	// loading functions
	public void _setKey(double key){
		if(key == -1){
			return;
		}else if(this.key == -1){
			this.key = key;
		}
	}

	protected Point getDesktopMousePosition() throws Exception{
		Class mouseInfoClass;
		Class pointerInfoClass;
		mouseInfoClass = Class.forName("java.awt.MouseInfo");
		pointerInfoClass = Class.forName("java.awt.PointerInfo");
		Method getPointerInfo = mouseInfoClass.getMethod("getPointerInfo", new Class[0]);
		Method getLocation = pointerInfoClass.getMethod("getLocation", new Class[0]);
		Object pointer=null;
		Point p=null;
		try{
			pointer = getPointerInfo.invoke(pointerInfoClass,new Object[0]);
			p = (Point)(getLocation.invoke(pointer,new Object[0]));
		}catch(java.lang.reflect.InvocationTargetException e){
			e.getTargetException().printStackTrace();
		}
		return p;
	}

	public Point getLocationOnScreen(){
		return locationOnScreen==null? super.getLocationOnScreen(): locationOnScreen;
	}

	private boolean mouseSecure() throws Exception{
		// Use MouseInfo to ensure that mouse is inside browser.
		// Only works in Java 1.5, but the DOHRobot must compile for 1.4.
		if(!mouseSecurity){ return true; }
		Point mousePosition=null;
		try{
			mousePosition=getDesktopMousePosition();
			log("Mouse position: "+mousePosition);
		}catch(Exception e){
			return true;
		}
		return mousePosition.x >= docScreenX
			&& mousePosition.x <= docScreenXMax
			&& mousePosition.y >= docScreenY
			&& mousePosition.y <= docScreenYMax;
	}

	private boolean isSecure(double key){
		// make sure key is not unset (-1) or error state (-2) and is the expected key
		boolean result = this.key != -1 && this.key != -2 && this.key == key;
		try{
			// also make sure mouse in good spot
			result=result&&mouseSecure();
		}catch(Exception e){
			e.printStackTrace();
			result=false;
		}
		if(!result&&this.key!=-2){
			this.key=-2;
			window.eval("doh.robot._appletDead=true;");
			log("User aborted test; mouse moved off of browser");
			alert("User aborted test; mouse moved off of browser.");
			log("Key secure: false; mouse in bad spot?");
		}else{
			log("Key secure: " + result);
		}
		return result;
	}

	public void _callLoaded(final double sec){
		log("> _callLoaded Robot");
		Runnable thread = new Runnable(){
			public void run(){
				if(!isSec


td>
xbrli:monetaryItemType

 Balance Type:
credit

 Period Type:
duration

X

- Definition

Fair value of asset associated with financial liability or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset.

+ References

Reference 1: http://www.xbrl.org/2003/role/exampleRef
 -Publisher FASB
 -Name Accounting Standards Codification
 -Topic 210
 -SubTopic 20
 -Section 55
 -Paragraph 20
 -URI http://asc.fasb.org/extlink&oid=99393222&loc=SL20226038-175313

Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef
 -Publisher FASB
 -Name Accounting Standards Codification
 -Topic 210
 -SubTopic 20
 -Section 50
 -Paragraph 3
 -Subparagraph (b)
 -URI http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312

Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef
 -Publisher FASB
 -Name Accounting Standards Codification
 -Topic 210
 -SubTopic 20
 -Section 55
 -Paragraph 8
 -URI http://asc.fasb.org/extlink&oid=99393222&loc=SL20226003-175313

Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef
 -Publisher FASB
 -Name Accounting Standards Codification
 -Topic 815
 -SubTopic 10
 -Section 50
 -Paragraph 4B
 -Subparagraph (a),(c)
 -URI http://asc.fasb.org/extlink&oid=125515794&loc=SL5624163-113959

+ Details

 Name:
us-gaap_DerivativeLiabilityFairValueGrossAsset

 Namespace Prefix:
us-gaap_

 Data Type:
xbrli:monetaryItemType

 Balance Type:
debit

<str


 invoked if the timer has been"]
#[doc = " initialized with one."]
#[doc = ""]
#[doc = " @param timer     Address of timer."]
#[doc = ""]
#[doc = " @return N/A"]
pub type k_timer_stop_t = ::core::option::Option<unsafe extern "C" fn(timer: *mut k_timer)>;
extern "C" {
    #[doc = " @brief Initialize a timer."]
    #[doc = ""]
    #[doc = " This routine initializes a timer, prior to its first use."]
    #[doc = ""]
    #[doc = " @param timer     Address of timer."]
    #[doc = " @param expiry_fn Function to invoke each time the timer expires."]
    #[doc = " @param stop_fn   Function to invoke if the timer is stopped while running."]
    #[doc = ""]
    #[doc = " @return N/A"]
    pub fn k_timer_init(timer: *mut k_timer, expiry_fn: k_timer_expiry_t, stop_fn: k_timer_stop_t);
}
extern "C" {
    pub fn z_timeout_remaining(timeout: *mut _timeout) -> s32_t;
}
extern "C" {
    #[doc = " @brief Enable clock always on in tickless kernel"]
    #[doc = ""]
    #[doc = " This routine enables keeping the clock running (that is, it always"]
    #[doc = " keeps an active timer interrupt scheduled) when there are no timer"]
    #[doc = " events programmed in tickless kernel scheduling. This is necessary"]
    #[doc = " if the clock is used to track passage of time (e.g. via"]
    #[doc = " k_uptime_get_32()), otherwise the internal hardware counter may"]
    #[doc = " roll over between interrupts."]
    #[doc = ""]
    #[doc = " @retval prev_status Previous status of always on flag"]
    pub fn k_enable_sys_clock_always_on() -> cty::c_int;
}
extern "C" {
    #[doc = " @brief Disable clock always on in tickless kernel"]
    #[doc = ""]
    #[doc = " This routine disables keeping the clock running when"]
    #[doc = " there are no timer events programmed in tickless kernel"]
    #[doc = " scheduling. To save power, this routine should be called"]
    #[doc = " immediately when clock is not used to track time."]
    pub fn k_disable_sys_clock_always_on();
}
#[doc = " @cond INTERNAL_HIDDEN"]
#[repr(C)]
pub struct k_queue {
    pub data_q: sys_sflist_t,
    pub __bindgen_anon_1: k_queue__bindgen_ty_1,
    pub __dummy_next: __IncompleteArrayField<u8_t>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union k_queue__bindgen_ty_1 {
    pub wait_q: _wait_q_t,
    pub poll_events: sys_dlist_t,
    _bindgen_union_align: [u32; 2usize],
}
#[test]
fn bindgen_test_layout_k_queue__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<k_queue__bindgen_ty_1>(),
        8usize,
        concat!("Size of: ", stringify!(k_queue__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<k_queue__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(k_queue__bindgen_ty_1))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<k_queue__bindgen_ty_1>())).wait_q as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(k_queue__bindgen_ty_1),
            "::",
            stringify!(wait_q)
        )
    );
    assert_eq!(
        unsafe {


ההקשר (Context Menu)',legend:'לחץ ${contextMenu} או APPLICATION KEYכדי לפתוח את תפריט ההקשר. עבור לאפשרות הבאה עם טאב (TAB) או חץ למטה. עבור לאפשרות הקודמת עם שיפט (SHIFT) + טאב (TAB) או חץ למעלה. לחץ רווח או אנטר (ENTER) כדי לבחור את האפשרות. פתח את תת התפריט (Sub-menu) של האפשרות הנוכחית עם רווח או אנטר (ENTER) או חץ שמאלי. חזור לתפריט האב עם אסקייפ (ESC) או חץ שמאלי. סגור את תפריט ההקשר עם אסקייפ (ESC).'},{name:'תפריטים צפים (List boxes)',legend:'בתוך תפריט צף, עבור לפריט הבא עם טאב (TAB) או חץ למטה. עבור לתפריט הקודם עם שיפט (SHIFT) + טאב (TAB) or חץ עליון. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.'},{name:'עץ אלמנטים (Elements Path)',legend:'לחץ ${elementsPathFocus} כדי לנווט לעץ האלמנטים. עבור לפריט הבא עם טאב (TAB) או חץ ימני. עבור לפריט הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך.'}]},{name:'פקודות',items:[{name:' ביטול צעד אחרון',legend:'לחץ ${undo}'},{name:' חזרה על צעד אחרון',legend:'לחץ ${redo}'},{name:' הדגשה',legend:'לחץ ${bold}'},{name:' הטייה',legend:'לחץ ${italic}'},{name:' הוספת קו תחתון',legend:'לחץ ${underline}'},{name:' הוספת לינק',legend:'לחץ ${link}'},{name:' כיווץ סרגל הכלים',legend:'לחץ ${toolbarCollapse}'},{name:' הוראות נגישות',legend:'לחץ ${a11yHelp}'}]}]}});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.plugins.setLang('a11yhelp','it',{accessibilityHelp:{title:'Istruzioni di Accessibilità',contents:'Contenuti di Aiuto. Per chiudere questa finestra premi ESC.',legend:[{name:'Generale',items:[{name:'Barra degli strumenti Editor',legend:'Premi ${toolbarFocus} per navigare fino alla barra degli strumenti. Muoviti tra i gruppi della barra degli strumenti con i tasti Tab e Maiusc-Tab


}
	err = yaml.Unmarshal(yamlFile, &config)
	if err != nil {
		log.Fatal(fmt.Sprintf("Errors in yaml file. Could not parse due to %v", err))
	}
	return &config
}

func SaveConfigFile(config *config.Configuration) {
	newYamlFile, err := yaml.Marshal(&config)
	if err != nil {
		log.Fatal(fmt.Sprintf("Could handle new values as they lead to errors %v", err))
	}
	err = os.WriteFile(cfgFile, newYamlFile, 0600)
	if err != nil {
		log.Fatal(fmt.Sprintf("Could not store to %v due to %v", cfgFile, err))
	}
	log.Info(fmt.Sprintf("Successfully saved value to %v", cfgFile))
}
/*
Contabo API

# Introduction  Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples.  Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and  Installation instructions.](https://github.com/contabo/cntb)  ## Product documentation  If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/).  ## Getting Started  In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details))  You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool.  ### Using the API directly  #### Via `curl` for Linux/Unix like systems  This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values.  ```sh CLIENT_ID=<ClientId from Customer Control Panel> CLIENT_SECRET=<ClientSecret from Customer Control Panel> API_USER=<API User from Customer Control Panel> API_PASSWORD='<API Password from Customer Control Panel>' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https://api.contabo.com/v1/compute/instances\" | jq ```  #### Via `PowerShell` for Windows  Please open `PowerShell` and execute the following code after replacing the first four placeholders with actual values.  ```powershell $client_id='<ClientId from Customer Control Panel>' $client_secret='<ClientSecret from Customer Control Panel>' $api_user='<API User from Customer Control Panel>' $api_password='<API Password from Customer Control Panel>' $body = @{grant_type='password' client_id=$client_id client_secret=$client_secret username=$api_user password=$api_password} $response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body $access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token # get list of your instances $headers = @{} $headers.Add(\"Authorization\",\"Bearer $access_token\") $headers.Add(\"x-request-id\",\"51A87ECD-754E-4104-9C54-D01AD0F83406\") Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers ```  ### Using the Contabo API via the `cntb` CLI tool  1. Download `cntb` for your operating system (MacOS, Windows and Linux supported) [here](https://github.com/contabo/cntb) 2. Unzip the downloaded file 3. You might move the executa


 Boolean = true,
    val workingDirectory: File? = null,
    val enableMediaStorage: Boolean = true,
    val minimizeSubdocumentCollisions: Boolean = false,
    val serverPort: Int? = null,
    val mediaStorageOptionsOverrides: MediaStorageOptions = ReadOnlyMediaStorageOptions(),
    val errorHandler: PipelineErrorHandler = BasePipelineErrorHandler(),
) {
    /**
     * Whether the pipeline could communicate with a server.
     * If `false`, no server communication is performed.
     */
    val useServer: Boolean
        get() = serverPort != null
}
package com.quarkdown.core.graph

/**
 * A generic, immutable graph structure.
 * @param T the type of vertices in the graph
 */
interface Graph<T> {
    /**
     * The set of vertices in the graph.
     */
    val vertices: Set<T>

    /**
     * The set of edges in the graph, represented as pairs of vertices.
     */
    val edges: Set<Pair<T, T>>

    /**
     * @param vertex the vertex whose neighbors are to be retrieved.
     * @return a sequence of neighboring vertices for the specified vertex.
     */
    fun getNeighbors(vertex: T): Sequence<T>

    /**
     * Adds a vertex to the graph.
     * @param value the value of the vertex to add
     * @return a new graph instance with the vertex added
     */
    fun addVertex(value: T): Graph<T>

    /**
     * Adds an edge from one vertex to another.
     * @param from the source vertex
     * @param to the destination vertex
     * @return a new graph instance with the edge added
     */
    fun addEdge(
        from: T,
        to: T,
    ): Graph<T>

    /**
     * @see addEdge
     */
    fun addEdge(pair: Pair<T, T>): Graph<T> = addEdge(from = pair.first, to = pair.second)
}
package com.quarkdown.core.lexer.regex

import com.quarkdown.core.util.replace

/**
 * A builder for [Regex] patterns.
 * @param baseRegex initial pattern
 */
class RegexBuilder(
    baseRegex: String,
) {
    private val pattern = StringBuilder(baseRegex)

    /**
     * Adds a reference to the pattern. All the occurrences will be replaced.
     * @param label text to be replaced
     * @param regex new pattern to replace the label with
     * @return this for concatenation
     */
    fun withReference(
        label: String,
        regex: String,
    ) = apply {
        pattern.replace(label, regex)
    }

    /**
     * @return a new [Regex]
     */
    fun build(): Regex = pattern.toString().toRegex()

    /**
     * @return a new [Regex] with the given [option].
     */
    fun build(option: RegexOption): Regex = pattern.toString().toRegex(option)

    /**
     * @return a new [Regex] with the given [options].
     */
    fun build(vararg options: RegexOption): Regex = pattern.toString().toRegex(options.toSet())
}
package com.quarkdown.core.lexer.patterns

import com.quarkdown.core.lexer.regex.pattern.TokenRegexPattern
import com.quarkdown.core.lexer.tokens.TextSymbolToken

/**
 * Patterns for sequences of characters that correspond to text symbols.
 * @param result symbol that the sequence is replaced with
 * @param regex regex pattern that matches the sequence to be replaced
 */
enum class TextSymbolReplacement


te does not support precompiled binaries.');
    } else {
      final crateHash = CrateHash.compute(manifestDir);
      stdout.writeln('Crate hash: $crateHash');

      for (final target in Target.all) {
        final message = 'Checking ${target.rust}...';
        stdout.write(message.padRight(40));
        stdout.flush();

        final artifacts = getArtifactNames(
          target: target,
          libraryName: crateInfo.packageName,
          remote: true,
        );

        final prefix = precompiledBinaries.uriPrefix;

        bool ok = true;

        for (final artifact in artifacts) {
          final fileName = PrecompileBinaries.fileName(target, artifact);
          final signatureFileName =
              PrecompileBinaries.signatureFileName(target, artifact);

          final url = Uri.parse('$prefix$crateHash/$fileName');
          final signatureUrl =
              Uri.parse('$prefix$crateHash/$signatureFileName');

          final signature = await get(signatureUrl);
          if (signature.statusCode != 200) {
            stdout.writeln('MISSING');
            ok = false;
            break;
          }
          final asset = await get(url);
          if (asset.statusCode != 200) {
            stdout.writeln('MISSING');
            ok = false;
            break;
          }

          if (!verify(precompiledBinaries.publicKey, asset.bodyBytes,
              signature.bodyBytes)) {
            stdout.writeln('INVALID SIGNATURE');
            ok = false;
          }
        }

        if (ok) {
          stdout.writeln('OK');
        }
      }
    }
  }
}
/// This is copied from Cargokit (which is the official way to use it currently)
/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin

import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';

import 'package:collection/collection.dart';
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';
import 'package:path/path.dart' as path;

class CrateHash {
  /// Computes a hash uniquely identifying crate content. This takes into account
  /// content all all .rs files inside the src directory, as well as Cargo.toml,
  /// Cargo.lock, build.rs and cargokit.yaml.
  ///
  /// If [tempStorage] is provided, computed hash is stored in a file in that directory
  /// and reused on subsequent calls if the crate content hasn't changed.
  static String compute(String manifestDir, {String? tempStorage}) {
    return CrateHash._(
      manifestDir: manifestDir,
      tempStorage: tempStorage,
    )._compute();
  }

  CrateHash._({
    required this.manifestDir,
    required this.tempStorage,
  });

  String _compute() {
    final files = getFiles();
    final tempStorage = this.tempStorage;
    if (tempStorage != null) {
      final quickHash = _computeQuickHash(files);
      final quickHashFolder = Directory(path.join(tempStorage, 'crate_hash'));
      quickHashFolder.createSync(recursive: true);
      final quickHashFile = File(path.join(quickHashFolder.path, quickHash));
      if (quickHashFile.existsSync()) {
        return quickHashFile.readAsStringSync();
      }
      final hash = _computeHash(files);
      quickHashFile.writeAsStringSync(hash);
      return hash;
    } else {
      return _computeHash(files);
    }
  }

  /// Computes a quick hash


 roof",
      "as part of a covered walkway",
      "& originally had 42 columns."
    ];

    scene.add(roomGrandstoaii );
    OPENWORLD.Room.setDistanceTrigger( roomGrandstoaii  , dist:1.5);

    // teacher knight
    knight22= await OPENWORLD.Actor.copyActor(knight2, texture: "assets/actors/knight22.jpg");
    setDefaultActor(knight22);

    OPENWORLD.Space.worldToLocalSurfaceObjHide(
        knight22,430.8,274.1, 0, 4,lerpopacity: 1.0);

    OPENWORLD.Space.objTurn(knight22,180);
    scene.add(knight22);
    addknightnpc(knight22,"knight22");

    // This is the knights sword
    var sword4=sword.clone();
    sword4.extra=sword.extra;
    setWeaponWield(sword4, true, "sword");
    OPENWORLD.Actor.wield(knight22, sword4, "Bip01_R_Finger11");

    // If walk near the teacher knight will try to give you a lesson
    OPENWORLD.BaseObject.setDistanceTrigger(knight22, dist: 0.7);
    knight22.extra['trigger'].addEventListener('trigger', (THREE.Event event) {
      if (event.action) {
        print("teacher in");

        OPENWORLD.Space.faceObjectAlways(knight22, camera);

        var wait=5;
        OPENWORLD.Actor.playActionThen(knight22, "bow", "idle",  duration:1, durationthen:2);
        chatter=["I'll give you a lesson if you like.",
          "Once your opponent is past your point, it is too difficult",
          "to clear your weapon and bring the point to bear again."];
        OPENWORLD.Actor.playActionThen(knight22, "wave", "idle",  duration:1, durationthen:2, delay:chatter.length*wait);

        chatter+=[
          "The long blades drag in the hand and even though they are",
          "made lightweight they exert a leverage that make them slow",
          "to respond to the hand."];
        OPENWORLD.Actor.playActionThen(knight22, "point", "idle",  duration:1, durationthen:2, delay:chatter.length*wait);

        chatter+=[
          "Also I dislike the dismissal of the cutting blow and",
          "subsequent reliance on thrusting only.",
          "A thrust is rarely a killing or incapacitating blow, ",
          "especially from a rapier, and so a wounded opponent is"
              "still a threat; possibly a greater threat.",
          "I disregard the view that the thrust is a faster blow by",
          "pointing because delivering a thrust or cut a swordsman's",
          "hand moves the same distance.",
          "The thrust may be turned aside with little effort whereas",
          "a blow must be warded with manly strength."];
        OPENWORLD.Actor.playActionThen(knight22, "nod", "idle",  duration:1, durationthen:2, delay:chatter.length*wait);

        chatter+=[  "I am critical of attitudes to duelling being taught in",
          "England by Foreign Masters. A major criticism is that they",
          "teach a man to seek duels readily for any real or",
          "imagined offence.",
          "This is what I mean."];

        OPENWORLD.Actor.playActionThen(knight22, "slash", "idle",  duration:1, durationthen:2, delay:chatter.length*wait);

        chatter+=["",
          "",
          "Phew. I'll sit down for a moment.",
        ];

        OPENWORLD.A


jbe     .LProcessRemainingCountN1

.LProcessNextColumnLoop16x1:
        mov     edi,.LSgemmKernelFrame_CountK[esp]
        mov     ecx,ebx                     # reload matrix A
        vxorps  xmm4,xmm4,xmm4              # clear block accumulators
        vxorps  xmm5,xmm5,xmm5
        ComputeBlockAvxLoop ComputeBlockAvxBy16, 1
        vmulps  ymm4,ymm4,ymm2              # multiply by alpha
        vmulps  ymm5,ymm5,ymm2
        sub     ebp,16
        jb      .LOutputMasked16x1Block
        cmp     BYTE PTR .LSgemmKernelFrame_ZeroMode[esp],0
        jnz     .LSkipAccumulate16x1Block
        vaddps  ymm4,ymm4,YMMWORD PTR [esi]
        vaddps  ymm5,ymm5,YMMWORD PTR [esi+32]

.LSkipAccumulate16x1Block:
        vmovups YMMWORD PTR [esi],ymm4
        vmovups YMMWORD PTR [esi+32],ymm5
        add     esi,16*4                    # advance matrix C by 16 columns
        cmp     ebp,8
        ja      .LProcessNextColumnLoop16x1
        test    ebp,ebp
        jz      .LExitKernel

.LProcessRemainingCountN1:
        mov     edi,.LSgemmKernelFrame_CountK[esp]
        mov     ecx,ebx                     # reload matrix A
        vxorps  xmm5,xmm5,xmm5              # clear block accumulators
        ComputeBlockAvxLoop ComputeBlockAvxBy8, 1
        vmulps


y, Data};
use crate::utils::get_closest_power;
use crate::wait;
use crate::{RawFtType, RawType};

fn get_allowed_dimension(
    tiling_min: usize,
    tiling_max: usize,
    tiling_size_count: Option<usize>,
) -> Vec<usize> {
    let xf64 = tiling_max as f64;
    let power2 = f64::log2(xf64).ceil() as i64;
    let power3 = f64::log(xf64, 3.0f64).ceil() as i64;
    let power5 = f64::log(xf64, 5.0f64).ceil() as i64;
    let mut box_range = (0..=power2)
        .cartesian_product((0..=power3).cartesian_product(0..=power5))
        .map(|(a, (b, c))| {
            (2.0f64.powf(a as f64) * 3.0f64.powf(b as f64) * 5.0f64.powf(c as f64)) as usize
        })
        .filter(|&value| tiling_min <= value && value <= tiling_max)
        .collect::<Vec<usize>>();
    box_range.sort();
    if let Some(tiling_size_count) = tiling_size_count {
        let tiling_size_count = if tiling_size_count <= box_range.len() {
            tiling_size_count
        } else {
            box_range.len()
        };
        let mut new_vec = Vec::with_capacity(tiling_size_count);
        let length = box_range.len() as f64;
        for i in 0..(tiling_size_count - 1) {
            new_vec
                .push(box_range[((i as f64) * length / (tiling_size_count as f64)).ceil() as usize])
        }
        new_vec.push(box_range[box_range.len() - 1]);
        new_vec
    } else {
        box_range
    }
}

type MultiDdmData = HashMap<
    usize,
    (
        Vec<crate::RawType>,
        Vec<Vec<(crate::RawType, crate::RawType)>>,
    ),
>;

#[allow(clippy::too_many_arguments, clippy::cyclomatic_complexity)]
pub fn multi_ddm(
    id: Option<usize>,
    capacity: Option<usize>,
    annuli_spacing: Option<usize>,
    tiling_range: (Option<usize>, Option<usize>, Option<usize>),
    tile_step: Option<usize>,
    filename: Option<String>,
    output_dir: Option<String>,
) -> Option<MultiDdmData> {
    let (tx, rx) = mpsc::channel::<Option<af::Array<RawType>>>();
    let (stx, srx) = mpsc::channel::<Signal>();
    let (annuli_tx, annuli_rx) =
        mpsc::channel::<Vec<(crate::RawType, arrayfire::Array<crate::RawType>)>>();

    let mut odim: Option<i64> = None;

    let annuli_spacing = if let Some(v) = annuli_spacing { v } else { 1 };
    let mut data_out = None;

    if let Some(id) = id {
        let (width, height) = opencv::dimension(id);
        if width != height {
            println!("Only square videos are supported!");
            return None;
        }
        let dimension = width;

        let (tiling_min, tiling_max, tiling_size_count) =
            if let (Some(min), Some(max), Some(number)) = tiling_range {


ert.Equal(device, queue.Parent);
                Assert.Equal(queueFamilyIndex, queue.FamilyIndex);
                Assert.Equal(queueIndex, queue.Index);
            }
        }

        [Fact]
        public void WaitIdle()
        {
            GraphicsQueue.WaitIdle();
        }

        [Fact]
        public void Submit()
        {
            GraphicsQueue.Submit(null, 0, null, null);
            GraphicsQueue.Submit(new SubmitInfo());
            GraphicsQueue.Submit(new[] { new SubmitInfo() });
        }

        [Fact]
        public void BindSparse()
        {
            var bindSparseInfo = new BindSparseInfo(null, null, null, null, null);
            GraphicsQueue.BindSparse(bindSparseInfo);
            GraphicsQueue.BindSparse(new[] { bindSparseInfo });
        }

        public QueueTest(DefaultHandles defaults, ITestOutputHelper output) : base(defaults, output) { }
    }
}


93',
  },
  {
    pIndex: 394,
    name: 'Prinplup',
    img: '394',
  },
  {
    pIndex: 395,
    name: 'Empoleon',
    img: '395',
  },
  {
    pIndex: 396,
    name: 'Starly',
    img: '396',
  },
  {
    pIndex: 397,
    name: 'Staravia',
    img: '397',
  },
  {
    pIndex: 398,
    name: 'Staraptor',
    img: '398',
  },
  {
    pIndex: 399,
    name: 'Bidoof',
    img: '399',
  },
  {
    pIndex: 400,
    name: 'Bibarel',
    img: '400',
  },
  {
    pIndex: 401,
    name: 'Kricketot',
    img: '401',
  },
  {
    pIndex: 402,
    name: 'Kricketune',
    img: '402',
  },
  {
    pIndex: 403,
    name: 'Shinx',
    img: '403',
  },
  {
    pIndex: 404,
    name: 'Luxio',
    img: '404',
  },
  {
    pIndex: 405,
    name: 'Luxray',
    img: '405',
  },
  {
    pIndex: 406,
    name: 'Budew',
    img: '406',
  },
  {
    pIndex: 407,
    name: 'Roserade',
    img: '407',
  },
  {
    pIndex: 408,
    name: 'Cranidos',
    img: '408',
  },
  {
    pIndex: 409,
    name: 'Rampardos',
    img: '409',
  },
  {
    pIndex: 410,
    name: 'Shieldon',
    img: '410',
  },
  {
    pIndex: 411,
    name: 'Bastiodon',
    img: '411',
  },
  {
    pIndex: 412,
    name: 'Burmy',
    img: '412',
  },
  {
    pIndex: 413,
    name: 'Wormadam (Plant Cloak)',
    img: '413',
  },
  {
    pIndex: 413,
    name: 'Wormadam (Sandy Cloak)',
    img: '413',
  },
  {
    pIndex: 413,
    name: 'Wormadam (Trash Cloak)',
    img: '413',
  },
  {
    pIndex: 414,
    name: 'Mothim',
    img: '414',
  },
  {
    pIndex: 415,
    name: 'Combee',
    img: '415',
  },
  {
    pIndex: 416,
    name: 'Vespiquen',
    img: '416',
  },
  {
    pIndex: 417,
    name: 'Pachirisu',
    img: '417',
  },
  {
    pIndex: 418,
    name: 'Buizel',
    img: '418',
  },
  {
    pIndex: 419,
    name: 'Floatzel',
    img: '419',
  },
  {
    pIndex: 420,
    name: 'Cherubi',
    img: '420',
  },
  {
    pIndex: 421,
    name: 'Cherrim',
    img: '421',
  },
  {
    pIndex: 422,
    name: 'Shellos',
    img: '422',
  },
  {
    pIndex: 423,
    name: 'Gastrodon',
    img: '423',
  },
  {
    pIndex: 424,
    name: 'Ambipom',
    img: '424',
  },
  {
    pIndex: 425,
    name: 'Drifloon',
    img


m)
	} else {
		platStr = runtime.GOOS + "/" + runtime.GOARCH
	}

	if strings.ToLower(platStr) == "linux/amd64" {
		plat = platform.LinuxAmd64
		return
	}

	if strings.ToLower(platStr) == "linux/arm64" {
		plat = platform.LinuxArm64
		return
	}

	if strings.ToLower(platStr) == "darwin/arm64" {
		plat = platform.DarwinArm64
		return
	}

	if strings.ToLower(platStr) == "darwin/amd64" {
		plat = platform.DarwinAmd64
		return
	}

	if strings.ToLower(platStr) == "windows/arm64" {
		plat = platform.WindowsArm64
		return
	}

	if strings.ToLower(platStr) == "windows/amd64" {
		plat = platform.WindowsAmd64
		return
	}

	messages.Infof("unknown platform %s, falling back to linux/amd64", platStr)

	plat = platform.LinuxAmd64

	return
}
package generate

import (
	"os"
	"path/filepath"
	"testing"

	"github.com/razshare/frizzante/cli/user"
	"github.com/razshare/frizzante/internal/additions/lib/security"
	"github.com/razshare/frizzante/internal/project/lib/core/files"
)

func TestDownload(t *testing.T) {
	url := "https://github.com/razshare/frizzante/archive/refs/heads/main.zip"

	var err error

	var cache string
	if cache, err = user.FrizzanteCache(); err != nil {
		t.Fatal(err)
	}

	hash := security.Sha1(url)

	cached := filepath.Join(cache, hash+".zip")

	if err = os.RemoveAll(cached); err != nil {
		t.Fatal(err)
	}
	if err = os.RemoveAll("main.zip"); err != nil {
		t.Fatal(err)
	}
	defer func() { _ = os.RemoveAll("main.zip") }()
	defer func() { _ = os.RemoveAll(cached) }()

	install, evict, err := Download(DownloadOptions{Auto: true, Url: url})
	if err != nil {
		t.Fatal(err)
	}

	if !files.IsFile(cached) {
		t.Fatal("file should be cached")
	}

	installed, err := install(filepath.Join(".gen", "download"))
	if err != nil {
		t.Fatal(err)
	}

	if !installed {
		t.Fatal("resource should be installed in .gen/download")
	}

	if !files.IsDirectory(".gen/download") {
		t.Fatal(".gen/download should exist")
	}

	if err = evict(); err != nil {
		t.Fatal(err)
	}

	if files.IsFile(cached) {
		t.Fatal("file cache should be evicted")
	}
}
package generate

import (
	"errors"
	"fmt"
	"strings"
)

var CodegenLineModHint = "//gen:mod"
var CodegenGlobalModHint = "//gen:mods"

func Parse(source string, build Build) (text string, err error) {
	var find strings.Builder
	var repl strings.Builder

	next := func(line string) (Mod, error) {
		find.Reset()
		repl.Reset()
		state := Start
		for _, char := range line {
			switch state {
			case Start:
				switch char {
				case '"':
					state = ReadingOriginalString
				}
			case ReadingOriginalString:
				switch char {
				case '\\':
					state = EscapingOriginal
				case '"':
					state = DoneReadingOriginalString
				default:
					find.WriteRune(char)
				}
			case DoneReadingOriginalString:
				switch char {
				case ' ':
					state = ExpectingReplacementString
				}