: zwa
Description: Zay
Added: 2009-07-29
%%
Type: language
Subtag: zxx
Description: No linguistic content
Description: Not applicable
Added: 2006-03-08
Scope: special
%%
Type: language
Subtag: zyb
Description: Yongbei Zhuang
Added: 2009-07-29
Macrolanguage: za
%%
Type: language
Subtag: zyg
Description: Yang Zhuang
Added: 2009-07-29
Macrolanguage: za
%%
Type: language
Subtag: zyj
Description: Youjiang Zhuang
Added: 2009-07-29
Macrolanguage: za
%%
Type: language
Subtag: zyn
Description: Yongnan Zhuang
Added: 2009-07-29
Macrolanguage: za
%%
Type: language
Subtag: zyp
Description: Zyphe Chin
Added: 2009-07-29
%%
Type: language
Subtag: zza
Description: Zaza
Description: Dimili
Description: Dimli (macrolanguage)
Description: Kirdki
Description: Kirmanjki (macrolanguage)
Description: Zazaki
Added: 2006-08-24
Scope: macrolanguage
%%
Type: language
Subtag: zzj
Description: Zuojiang Zhuang
Added: 2009-07-29
Macrolanguage: za
%%
Type: extlang
Subtag: aao
Description: Algerian Saharan Arabic
Added: 2009-07-29
Preferred-Value: aao
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: abh
Description: Tajiki Arabic
Added: 2009-07-29
Preferred-Value: abh
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: abv
Description: Baharna Arabic
Added: 2009-07-29
Preferred-Value: abv
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: acm
Description: Mesopotamian Arabic
Added: 2009-07-29
Preferred-Value: acm
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: acq
Description: Ta'izzi-Adeni Arabic
Added: 2009-07-29
Preferred-Value: acq
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: acw
Description: Hijazi Arabic
Added: 2009-07-29
Preferred-Value: acw
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: acx
Description: Omani Arabic
Added: 2009-07-29
Preferred-Value: acx
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: acy
Description: Cypriot Arabic
Added: 2009-07-29
Preferred-Value: acy
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: adf
Description: Dhofari Arabic
Added: 2009-07-29
Preferred-Value: adf
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: ads
Description: Adamorobe Sign Language
Added: 2009-07-29
Preferred-Value: ads
Prefix: sgn
%%
Type: extlang
Subtag: aeb
Description: Tunisian Arabic
Added: 2009-07-29
Preferred-Value: aeb
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: aec
Description: Saidi Arabic
Added: 2009-07-29
Preferred-Value: aec
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: aed
Description: Argentine Sign Language
Added: 2009-07-29
Preferred-Value: aed
Prefix: sgn
%%
Type: extlang
Subtag: aen
Description: Armenian Sign Language
Added: 2009-07-29
Preferred-Value: aen
Prefix: sgn
%%
Type: extlang
Subtag: afb
Description: Gulf Arabic
Added: 2009-07-29
Preferred-Value: afb
Prefix: ar
Macrolanguage: ar
%%
Type: extlang
Subtag: afg
Descripti


import os

# External Dependencies:
import boto3
from botocore.config import Config

from dotenv import load_dotenv
load_dotenv()

def get_bedrock_client_from_environ():
    """
    Create a boto3 client for Amazon Bedrock, using the access key & secret from envvars.
    Required envvars:
    - `BEDROCK_IAM_ACCESS_KEY`
    - `BEDROCK_IAM_SECRET_KEY`
    """
    session = boto3.Session(
        aws_access_key_id=os.environ.get("BEDROCK_IAM_ACCESS_KEY"),
        aws_secret_access_key=os.environ.get("BEDROCK_IAM_SECRET_KEY"),
    )
    boto3_bedrock = session.client(
        service_name="bedrock-runtime",
        region_name="us-west-2",
        config=Config(retries={"max_attempts": 5, "mode": "standard"}),
    )

    return boto3_bedrock


"""
summary: list all xrefs to a function stack variable

description:
  Contrary to (in-memory) data & code xrefs, retrieving stack variables
  xrefs requires a bit more work than just using ida_xref's first_to(),
  next_to() (or higher level utilities such as idautils.XrefsTo)

keywords: xrefs

level: intermediate
"""

ACTION_NAME = "list_stkvar_xrefs:list"
ACTION_SHORTCUT = "Ctrl+Shift+F7"

import ida_bytes
import ida_frame
import ida_funcs
import ida_ida
import ida_kernwin
import ida_typeinf
import ida_ua

class list_stkvar_xrefs_ah_t(ida_kernwin.action_handler_t):
    def activate(self, ctx):
        cur_ea = ida_kernwin.get_screen_ea()
        pfn = ida_funcs.get_func(cur_ea)
        if not pfn:
            print("Please position the cursor within a function")
            return

        v = ida_kernwin.get_current_viewer()
        result = ida_kernwin.get_highlight(v)
        if not result:
            print("Please highlight the stack variable name")
            return

        stkvar_name, _ = result
        frame = ida_typeinf.tinfo_t()
        pfn = ida_funcs.get_func(cur_ea)
        frame.get_func_frame(pfn)
        stkvar_idx, stkvar = frame.get_udm(stkvar_name)
        if stkvar_idx < 0:
            print("No stack variable named \"%s\"" % stkvar_name)
            return

        for ea in pfn:
            F = ida_bytes.get_flags(ea)
            for n in range(ida_ida.UA_MAXOP):
                if not ida_bytes.is_stkvar(F, n):
                    continue
                insn = ida_ua.insn_t()
                if not ida_ua.decode_insn(insn, ea):
                    continue
                v = ida_frame.calc_stkvar_struc_offset(pfn, insn, n)
                if v >= stkvar.begin()/8 and v < stkvar.end()/8:
                    print("Found xref at 0x%08x, operand #%d" % (ea, n))

    def update(self, ctx):
        return ida_kernwin.AST_ENABLE_FOR_WIDGET \
            if ctx.widget_type == ida_kernwin.BWN_DISASM \
               else ida_kernwin.AST_DISABLE_FOR_WIDGET

adesc = ida_kernwin.action_desc_t(
    ACTION_NAME,
    "List stack variable xrefs",
    list_stkvar_xrefs_ah_t(),
    ACTION_SHORTCUT)

if ida_kernwin.register_action(adesc):
    print("Action registered. Please press \"%s\" to use" % ACTION_SHORTCUT)


cond
  loop_cond:
    %i_val = load i32, i32* %i
    %cmp = icmp slt i32 %i_val, 10
    br i1 %cmp, label %loop_body, label %loop_end
  loop_body:
    %i_val2 = load i32, i32* %i
    %call = call i32 @fib_loop(i32 %i_val2)
    %i_val3 = load i32, i32* %i
    %call2 = call i32 @foo(i32 %i_val3)
    %cmp2 = icmp ne i32 %call, %call2
    br i1 %cmp2, label %if_true, label %if_false
  if_true:
    store i32 0, i32* %correct
    br label %if_end
  if_false:
    br label %if_end
  if_end:
    %i_val4 = load i32, i32* %i
    %add = add i32 %i_val4, 1
    store i32 %add, i32* %i
    br label %loop_cond
  loop_end:
    %correct_val = load i32, i32* %correct
    ret i32 %correct_val
}
  )"};

} // namespace

// Check that the behaviour of a custom inline order is correct.
// The custom order drops any functions named "foo" so all tests
// should contain at least one function named foo.
TEST(PluginInlineOrderTest, NoInlineFoo) {
#if !defined(LLVM_ENABLE_PLUGINS)
  // Skip the test if plugins are disabled.
  GTEST_SKIP();
#endif
  CompilerInstance CI{};
  CI.setupPlugin();

  for (StringRef IR : TestIRS) {
    bool FoundFoo = false;
    CI.run(IR);
    CallGraph CGraph = CallGraph(*CI.OutputM);
    for (auto &Node : CGraph) {
      for (auto &Edge : *Node.second) {
        FoundFoo |= Edge.second->getFunction()->getName() == "foo";
      }
    }
    ASSERT_TRUE(FoundFoo);
  }
}

} // namespace llvm
//===- DomTreeUpdaterTest.cpp - DomTreeUpdater unit tests -----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"
#include <algorithm>

using namespace llvm;

static std::unique_ptr<Module> makeLLVMModule(LLVMContext &Context,
                                              StringRef ModuleStr) {
  SMDiagnostic Err;
  std::unique_ptr<Module> M = parseAssemblyString(ModuleStr, Err, Context);
  assert(M && "Bad LLVM IR?");
  return M;
}

TEST(DomTreeUpdater, EagerUpdateBasicOperations) {
  StringRef FuncName = "f";
  StringRef ModuleString = R"(
                          define i32 @f(i32 %i, i32 *%p) {
                          bb0:
                             store i32 %i, i32 *%p
                             switch i32 %i, label %bb1 [
                               i32 1, label %bb2
                               i32 2, label %bb3
                             ]
                          bb1:
                             ret i32 1


623 */           CharsetISO2022.this.myConverterData.currentEncoder.errorBufferLength = 0;
/*      */         }
/*      */       }
/*      */
/* 2627 */       return err;
/*      */     }
/*      */
/*      */     private CoderResult encodeLoopIBM(CharBuffer source, ByteBuffer target, IntBuffer offsets, boolean flush) {
/* 2631 */       CoderResult err = CoderResult.UNDERFLOW;
/*      */
/* 2633 */       CharsetISO2022.this.myConverterData.currentEncoder.fromUChar32 = this.fromUChar32;
/* 2634 */       err = CharsetISO2022.this.myConverterData.currentEncoder.cnvMBCSFromUnicodeWithOffsets(source, target, offsets, flush);
/* 2635 */       this.fromUChar32 = CharsetISO2022.this.myConverterData.currentEncoder.fromUChar32;
/*      */
/* 2637 */       if (err.isOverflow()) {
/* 2638 */         if (CharsetISO2022.this.myConverterData.currentEncoder.errorBufferLength > 0) {
/* 2639 */           this.errorBuffer = ((byte[])CharsetISO2022.this.myConverterData.currentEncoder.errorBuffer.clone());
/*      */         }
/* 2641 */         this.errorBufferLength = CharsetISO2022.this.myConverterData.currentEncoder.errorBufferLength;
/* 2642 */         CharsetISO2022.this.myConverterData.currentEncoder.errorBufferLength = 0;
/*      */       }
/*      */
/* 2645 */       return err;
/*      */     }
/*      */
/*      */     protected CoderResult encodeLoop(CharBuffer source, ByteBuffer target, IntBuffer offsets, boolean flush) {
/* 2649 */       CoderResult err = CoderResult.UNDERFLOW;
/* 2650 */       int[] targetByteUnit = { 0 };
/* 2651 */       int sourceChar = 0;
/*      */
/*      */
/*      */
/* 2655 */       int length = 0;
/* 2656 */       boolean gotoGetTrail = false;
/*      */
/*      */
/*      */
/*      */
/*      */
/*      */
/* 2663 */       if (CharsetISO2022.this.myConverterData.version == 1) {
/* 2664 */         return encodeLoopIBM(source, target, offsets, flush);
/*      */       }
/*      */
/* 2667 */       boolean usingFallback = this.useFallback;
/* 2668 */       boolean isTargetByteDBCS = this.fromUnicodeStatus != 0;
/* 2669 */       if (((sourceChar = this.fromUChar32) != 0) && (target.hasRemaining())) {
/* 2670 */         gotoGetTrail = true;
/*      */       }
/*      */
/* 2673 */       while ((source.hasRemaining()) || (gotoGetTrail)) {
/* 2674 */         targetByteUnit[0] = 65535;
/*      */
/* 2676 */         if ((target.hasRemaining()) || (gotoGetTrail)) {
/* 2677 */           if (!gotoGetTrail) {
/* 2678 */             sourceChar = source.get();
/*      */
/*      */
/* 2681 */             if (CharsetISO2022.IS_2022_CONTROL(sourceChar))
/*      */             {
/* 2683 */               err = CoderResult.malformedForLength(1);
/* 2684 */               this.fromUChar32 = sourceChar;
/* 2685 */               break;
/*      */             }
/* 2687 */             CharsetISO2022.this.myConverterData.currentConverter.sharedData.mbcs.outputType = 1;
/* 2688 */             length = CharsetISO2022.this.myConverterData.currentEncoder.fromUChar32(sourceChar, targetByteUnit, usingFallback);
/*      */
/* 2690 */             if (length < 0) {
/* 2691 */               length = -length;
/*      */             }
/*


, "secondary-vga")
        || object_dynamic_cast(OBJECT(dev), "bochs-display")
        || object_dynamic_cast(OBJECT(dev), "virtio-vga")) {
        object_property_set_bool(OBJECT(dev), "big-endian-framebuffer", be,
                                 &error_abort);
    }
    return 0;
}

void spapr_pci_switch_vga(SpaprMachineState *spapr, bool big_endian)
{
    SpaprPhbState *sphb;

    /*
     * For backward compatibility with existing guests, we switch
     * the endianness of the VGA controller when changing the guest
     * interrupt mode
     */
    QLIST_FOREACH(sphb, &spapr->phbs, list) {
        BusState *bus = &PCI_HOST_BRIDGE(sphb)->bus->qbus;
        qbus_walk_children(bus, spapr_switch_one_vga, NULL, NULL, NULL,
                           &big_endian);
    }
}


eckFunc(
					testAccCheckDeploymentGroupExists(ctx, resourceName, &group),
					testAccCheckDeploymentGroupTriggerEvents(&group, "test-trigger", []string{
						"DeploymentFailure",
					}),
				),
			},
			{
				Config: testAccDeploymentGroupConfig_triggerConfigurationUpdate(rName),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckDeploymentGroupExists(ctx, resourceName, &group),
					testAccCheckDeploymentGroupTriggerEvents(&group, "test-trigger", []string{
						"DeploymentFailure",
						"DeploymentSuccess",
					}),
				),
			},
			{
				ResourceName:      resourceName,
				ImportState:       true,
				ImportStateIdFunc: testAccDeploymentGroupImportStateIdFunc(resourceName),
				ImportStateVerify: true,
			},
		},
	})
}

func TestAccDeployDeploymentGroup_Trigger_multiple(t *testing.T) {
	ctx := acctest.Context(t)
	var group types.DeploymentGroupInfo
	resourceName := "aws_codedeploy_deployment_group.test"
	rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:                 func() { acctest.PreCheck(ctx, t) },
		ErrorCheck:               acctest.ErrorCheck(t, names.DeployServiceID),
		ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
		CheckDestroy:             testAccCheckDeploymentGroupDestroy(ctx),
		Steps: []resource.TestStep{
			{
				Config: testAccDeploymentGroupConfig_triggerConfigurationCreateMultiple(rName),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckDeploymentGroupExists(ctx, resourceName, &group),
					testAccCheckDeploymentGroupTriggerEvents(&group, "test-trigger-1", []string{
						"DeploymentFailure",
					}),
					testAccCheckDeploymentGroupTriggerEvents(&group, "test-trigger-2", []string{
						"InstanceFailure",
					}),
					testAccCheckDeploymentGroupTriggerTargetARN(&group, "test-trigger-2",
						regexache.MustCompile(fmt.Sprintf("^arn:%s:sns:[^:]+:[0-9]{12}:%s-2$", acctest.Partition(), rName))),
				),
			},
			{
				Config: testAccDeploymentGroupConfig_triggerConfigurationUpdateMultiple(rName),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckDeploymentGroupExists(ctx, resourceName, &group),
					testAccCheckDeploymentGroupTriggerEvents(&group, "test-trigger-1", []string{
						"DeploymentFailure",
						"DeploymentStart",
						"DeploymentStop",
						"DeploymentSuccess",
					}),
					testAccCheckDeploymentGroupTriggerEvents(&group, "test-trigger-2", []string{
						"InstanceFailure",
					}),
					testAccCheckDeploymentGroupTriggerTargetARN(&group, "test-trigger-2",
						regexache.MustCompile(fmt.Sprintf("^arn:%s:sns:[^:]+:[0-9]{12}:%s-3$", acctest.Partition(), rName))),
				),
			},
			{
				ResourceName:      resourceName,
				ImportState:       true,
				ImportStateIdFunc: testAccDeploymentGroupImportStateIdFunc(resourceName),
				ImportStateVerify: true,
			},
		},
	})
}

func TestAccDeployDeploymentGroup_AutoRollback_create(t *testing.T) {
	ctx := acctest.Context(t)
	var group types.DeploymentGroupInfo
	resourceName := "aws_codedeploy_deployment_group.test"
	rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:                 func() { acctest.


(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group .form-control.is-valid,.input-group .form-select.is-valid,.was-validated .input-group .form-control:valid,.was-validated .input-group .form-select:valid{z-index:1}.input-group .form-control.is-valid:focus,.input-group .form-select.is-valid:focus,.was-validated .input-group .form-control:valid:focus,.was-validated .input-group .form-select:valid:focus{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([


onChange(dr,r);
  ret=innerProduct(dl,dr);
  return ret;
}

// Now do it for vector, matrix, scalar
template<class l,class r,int N> accelerator_inline
  auto innerProductD2 (const iVector<l,N>& lhs,const iVector<r,N>& rhs) -> iScalar<decltype(innerProductD2(lhs._internal[0],rhs._internal[0]))>
{
  typedef decltype(innerProductD2(lhs._internal[0],rhs._internal[0])) ret_t;
  iScalar<ret_t> ret;
  zeroit(ret);
  for(int c1=0;c1<N;c1++){
    ret._internal += innerProductD2(lhs._internal[c1],rhs._internal[c1]);
  }
  return ret;
}
template<class l,class r,int N> accelerator_inline
  auto innerProductD2 (const iMatrix<l,N>& lhs,const iMatrix<r,N>& rhs) -> iScalar<decltype(innerProductD2(lhs._internal[0][0],rhs._internal[0][0]))>
{
  typedef decltype(innerProductD2(lhs._internal[0][0],rhs._internal[0][0])) ret_t;
  iScalar<ret_t> ret;
  ret=Zero();
  for(int c1=0;c1<N;c1++){
    for(int c2=0;c2<N;c2++){
      ret._internal+=innerProductD2(lhs._internal[c1][c2],rhs._internal[c1][c2]);
    }}
  return ret;
}
template<class l,class r> accelerator_inline
  auto innerProductD2 (const iScalar<l>& lhs,const iScalar<r>& rhs) -> iScalar<decltype(innerProductD2(lhs._internal,rhs._internal))>
{
  typedef decltype(innerProductD2(lhs._internal,rhs._internal)) ret_t;
  iScalar<ret_t> ret;
  ret._internal = innerProductD2(lhs._internal,rhs._internal);
  return ret;
}

//////////////////////
// Keep same precison
//////////////////////
template<class l,class r,int N> accelerator_inline
auto innerProduct (const iVector<l,N>& lhs,const iVector<r,N>& rhs) -> iScalar<decltype(innerProduct(lhs._internal[0],rhs._internal[0]))>
{
  typedef decltype(innerProduct(lhs._internal[0],rhs._internal[0])) ret_t;
  iScalar<ret_t> ret;
  ret=Zero();
  for(int c1=0;c1<N;c1++){
    ret._internal += innerProduct(lhs._internal[c1],rhs._internal[c1]);
  }
  return ret;
}
template<class l,class r,int N> accelerator_inline
auto innerProduct (const iMatrix<l,N>& lhs,const iMatrix<r,N>& rhs) -> iScalar<decltype(innerProduct(lhs._internal[0][0],rhs._internal[0][0]))>
{
  typedef decltype(innerProduct(lhs._internal[0][0],rhs._internal[0][0])) ret_t;
  iScalar<ret_t> ret;
  ret=Zero();
  for(int c1=0;c1<N;c1++){
    for(int c2=0;c2<N;c2++){
      ret._internal+=innerProduct(lhs._internal[c1][c2],rhs._internal[c1][c2]);
    }}
  return ret;
}
template<class l,class r> accelerator_inline
auto innerProduct (const iScalar<l>& lhs,const iScalar<r>& rhs) -> iScalar<decltype(innerProduct(lhs._internal,rhs._internal))>
{
  typedef decltype(innerProduct(lhs._internal,rhs._internal)) ret_t;
  iScalar<ret_t> ret;
  ret._internal = innerProduct(lhs._internal,rhs._internal);
  return ret;
}

NAMESPACE_END(Grid);

#endif


KeywordsLearntIndex
	bmi skip5
	ldx #00

loop3	cmp KeywordsLearnt,y
	beq skip1
	dey
	bpl loop3

skip5     ;remember keyword
	inc KeywordsLearntIndex
	ldy KeywordsLearntIndex
	sta KeywordsLearnt,y
	;Flag as keyword
	ldx #128
skip1	stx dtInverseFlag

	;Display Embedded text
	ldy #00
	sty dtEmbeddedTextIndex

loop1	ldy dtEmbeddedTextIndex
	lda (source),y
	cmp #"]"
	beq skip4

	ora dtInverseFlag

	ldx dtCharacterX
	ldy dtCharacterY
	jsr PlotCharacter

	inc dtCharacterX
	inc dtEmbeddedTextIndex

	jmp loop1

RenderCharacter
	;Render single character
	ldx dtCharacterX
	ldy dtCharacterY
	jsr PlotCharacter

	inc dtCharacterX

skip4	;
	inc dtSourceTextIndex
	jmp loop2

CarriageReturn
	jsr PerformCarriageReturn
	jmp skip4

EndOfPassage
.)
	;Branch on single word
	lda dtSingleWordFlag
.(
	bmi skip2

	;Perform carriage return
loop1	jsr PerformCarriageReturn

	;
	lda dtClear2EndOfWindow
	bpl skip1

	;
	lda dtCharacterY
	ldx dtWindowID
	cmp dtWindowBottomMargin,x
	bcc loop1
skip1	ldx dtRegisterX
	ldy dtRegisterY
	lda dtRegisterA
	rts
skip2	jsr Clear2EndOfRow
	ldx dtRegisterX
	ldy dtRegisterY
	lda dtRegisterA
	rts
.)

PerformCarriageReturn
	jsr Clear2EndOfRow

	;
	ldx dtWindowID
	lda dtWindowOriginX,x
	sta dtCharacterX

	;
	lda dtCharacterY
	clc
	adc #6
	sta dtCharacterY
	rts

Clear2EndOfRow
	lda dtCharacterX
	ldx dtWindowID
	cmp dtWindowRightMargin,x
.(
	beq skip1

	;Render Space
	lda #" "
	ldx dtCharacterX
	ldy dtCharacterY
	jsr PlotCharacter

	inc dtCharacterX
	jmp Clear2EndOfRow

skip1	rts
.)

;A Character (32-127) to plot (+128(keyword) to highlight(Bold))
;X X position (0-39)
;Y Y position (0-210)
PlotCharacter
	sta pcCharacter
	lda #00
	sta pcInverseFlag
	lda pcCharacter
	cmp #128
.(
	bcc skip1

	; Set Inverse flag
	lda #128
	sta pcInverseFlag

skip1	; Now we know about keyword(inverse) remove top bit
	lda pcCharacter
	and #127

	; Remember parsed parameters
	sta pcCharacter
	stx pcXpos
.)
	sty pcYpos

	; does character lye completely in HIRES?
	cpy #195
	bcc PlotHIRESCharacter

	; does character lye in crossover between HIRES and TEXT?
	cpy #200
	bcc PlotCrossoverCharacter

	; Character lies in TEXT
	jmp PlotTEXTCharacter

PlotHIRESCharacter
	ldx #05
PlotPartHIRESCharacter
	;Fetch Character Bitmap Address
	tay
	lda CharacterAddressLo-32,y
.(
	sta vector1+1
	lda CharacterAddressHi-32,y
	sta vector1+2

	;Calculate Screen address
	ldy pcYpos
	lda pcXpos
	clc
	adc HIRESylocl,y
	sta screen
	lda HIRESyloch,y
	adc #00
	sta screen+1

	;Plot HIRES character
vector1	lda $dead,x
	ldy Offset40x1,x
	sta (screen),y
	bit pcInverseFlag
	bpl skip1
	and #63
	lsr
	ora (screen),y
	sta (screen),y
skip1	dex
	bpl vector1
.)


225\\) 검증된 쿼리-플랜 쌍이 생성되었다. 우리는 주석자가 주석하는 각 계획에 대해 평균 \\(\\$0.80\\)의 비용을 지불한다.\n' +
      '\n' +
      '품질 관리.각 자연어 쿼리와 해당 주석이 달린 계획의 품질을 보장하기 위해 저자는 모든 쿼리와 계획에 대한 자세한 검토를 수행하여 발견된 오류를 수정했다. 또한, 문제를 해결하기 위해, 우리는 각 질의의 예산을 대응하는 인간 주석 계획의 비용을 사용하여 재조정한다. 이 접근법은 초기 휴리스틱 생성 예산을 대체하며, 이는 너무 높을 수 있으므로 실현 가능한 계획의 수를 줄인다. 여러 단계의 인간 검증을 통해 TravelPlanner에서 각 쿼리의 고품질과 적어도 하나의 실현 가능한 솔루션의 존재를 보장합니다.\n' +
      '\n' +
      '### Evaluation\n' +
      '\n' +
      '에이전트가 제공하는 계획에 대한 포괄적인 평가를 보장하기 위해 여러 차원에서 평가합니다. 구체적으로, 우리는 먼저 자연어로 처음 제시되는 교통, 식당, 명소, 숙박시설 등 주요 구성요소 1을 추출한다. 그런 다음 이러한 구성 요소는 공식적으로 구성된 계획으로 구성되며, 이는 미리 정의된 스크립트를 통해 자동으로 평가됩니다. 상기 평가 기준은 다음을 포함한다:\n' +
      '\n' +
      '각주 1: 우리의 실험에서, 우리는 이 추출 과정에 GPT-4-터보를 사용한다. 자세한 내용은 부록 B.3.5를 참조하십시오.\n' +
      '\n' +
      '이 메트릭은 에이전트가 제


namespace Polly.Specs.Custom;

public class CustomTResultSpecs
{
    [Fact]
    public void Should_be_able_to_construct_active_policy()
    {
        Action construct = () =>
        {
            PreExecutePolicy<ResultPrimitive> policy = PreExecutePolicy<ResultPrimitive>.Create(() => Console.WriteLine("Do something"));
        };

        Should.NotThrow(construct);
    }

    [Fact]
    public void Active_policy_should_execute()
    {
        bool preExecuted = false;
        PreExecutePolicy<ResultPrimitive> policy = PreExecutePolicy<ResultPrimitive>.Create(() => preExecuted = true);

        bool executed = false;

        Should.NotThrow(() => policy.Execute(() =>
        {
            executed = true;
            return ResultPrimitive.Undefined;
        }));

        executed.ShouldBeTrue();
        preExecuted.ShouldBeTrue();
    }

    [Fact]
    public void Should_be_able_to_construct_reactive_policy()
    {
        Action construct = () =>
        {
            AddBehaviourIfHandlePolicy<ResultPrimitive> policy = Policy.HandleResult(ResultPrimitive.Fault).WithBehaviour(outcome => Console.WriteLine("Handling " + outcome.Result));
        };

        Should.NotThrow(construct);
    }

    [Fact


�度和角度约束条件，对邻居结点施加影响
-- @param without 要忽略的邻居结点
-- @param time 经过的时间长度
function Joint:influence_all(without, time)
    self:influence_lengths(without, time)
    self:influence_constraints(without, time)
end

--- 递归对邻居节点施加影响.
-- 该函数是主要使用的函数。
-- 例如让头运动带动身体，可以先改变头结点的坐标，然后让头结点递归施加影响，就带动了连接的身体结点。
-- @param without 要忽略的邻居结点
-- @param time 经过的时间长度
function Joint:influence_recursive(without, time)
    self:influence_all(without, time)
    for joint, link in pairs(self.neighbors) do
        if without == nil or joint ~= without and without[joint] == nil then
            joint:update_self()
            joint:influence_recursive(self, time)
        end
    end
end

function Joint:foreach(fn, without)
    fn(self)
    for joint, link in pairs(self.neighbors) do
        if joint ~= without then
            joint:foreach(fn, self)
        end
    end
end

local function shallow_copy(t)
    local t_new = {}
    for i, v in pairs(t) do
        t_new[i] = v
    end
    return t_new
end

function Joint:copy(without, without_new)
    local self_new = getmetatable(self).__i


          let err = NetError::new(ErrCode::from(&e), "net:route:5");
                error!("{}, {}", err, e);
                return Err(err);
            }
        }
        if let Err(e) = try_read_body(&self.socket, &mut self.msg_buf, &mut self.recv_buf) {
            let err = NetError::new(ErrCode::from(&e), "net:route:6");
            error!("{}, {}", err, e);
            return Err(err);
        }
        // JW TODO: Due to the way ZMQ sockets work, we should never receive a message out of order
        // or a message intended for another socket. We check the transaction ID as a corruption
        // check. This message means that we have a bug in how we have connected the ZMQ sockets
        // together and should be addressed immediately.
        if self.msg_buf.txn().unwrap().id() != txn_id {
            read_until_end(&self.socket, &mut self.recv_buf);
            let err = NetError::new(ErrCode::BUG, "net:route:37");
            error!("{}", err);
            return Err(err);
        }
        if self.msg_buf.message_id() == NetError::message_id() {
            match NetError::parse(&self.msg_buf) {
                Ok(err) => return Err(err),
                Err(err) => panic!("{}", err),
            }
        }
        match self.msg_buf.parse::<T>() {
            Ok(reply) => Ok(reply),
            Err(e) => {
                let err = NetError::new(ErrCode::BUG, "net:route:7");
                error!("{}, {}", err, e);
                Err(err)
            }
        }
    }
}

/// Underlying connection struct for sending and receiving messages to and from a RouteSrv.
pub struct RouteConn {
    rep_sock: zmq::Socket,
    recv_buf: zmq::Message,
    req_queue: Arc<String>,
}

impl RouteConn {
    pub fn new(req_queue: Arc<String>) -> Result<Self, ConnErr> {
        let rep_sock = (**DEFAULT_CONTEXT).as_mut().socket(zmq::DEALER)?;
        Ok(RouteConn {
            rep_sock: rep_sock,
            recv_buf: zmq::Message::new()?,
            req_queue: req_queue,
        })
    }

    pub fn connect<T>(&self, rep_queue: T) -> Result<(), ConnErr>
    where
        T: AsRef<str>,
    {
        self.rep_sock.connect(rep_queue.as_ref())?;
        Ok(())
    }

    pub fn route<M, T>(&mut self, message: &M) -> NetResult<T>
    where
        M: Routable,
        T: protobuf::MessageStatic,
    {
        let mut conn = RouteClient::new().unwrap();
        conn.connect(&*self.req_queue).unwrap();
        conn.route(message)
    }

    pub fn route_reply<T>(&self, message: &mut Message, reply: &T) -> Result<(), ConnErr>
    where
        T: protobuf::Message,
    {
        route_reply(&self.rep_sock, message, reply)
    }

    pub fn wait_recv(&mut self, message: &mut Message, timeout: i64) -> Result<ConnEvent, ConnErr> {
        wait_recv(&self.rep_sock, message, &mut self.recv_buf, timeout)
    }
}

/// Send a message directly to the given receiver ignoring all identities in the given message.
pub fn route(socket: &zmq::Socket, message: &Message) -> Result<(), ConnErr> {
    for identity in message.identities.iter() {
        socket.send(identity, zmq::SNDMORE)?;
        trace!("route: {:?}", identity);
    }


 T22, T23> internal constructor(
    val e1: T1,
    val e2: T2,
    val e3: T3,
    val e4: T4,
    val e5: T5,
    val e6: T6,
    val e7: T7,
    val e8: T8,
    val e9: T9,
    val e10: T10,
    val e11: T11,
    val e12: T12,
    val e13: T13,
    val e14: T14,
    val e15: T15,
    val e16: T16,
    val e17: T17,
    val e18: T18,
    val e19: T19,
    val e20: T20,
    val e21: T21,
    val e22: T22,
    val e23: T23,
) {
    override fun toString(): String =
        "($e1, $e2, $e3, $e4, $e5, $e6, $e7, $e8, $e9, $e10, $e11, $e12, $e13, $e14, $e15, $e16, $e17, $e18, $e19, $e20, $e21, $e22, $e23)"
}

fun <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> tupleOf(
    e1: T1,
    e2: T2,
    e3: T3,
    e4: T4,
    e5: T5,
    e6: T6,
    e7: T7,
    e8: T8,
    e9: T9,
    e10: T10,
    e11: T11,
    e12: T12,
    e13: T13,
    e14: T14,
    e15: T15,
    e16: T16,
    e17: T17,
    e18: T18,
    e19: T19,
    e20: T20,
    e21: T21,
    e22: T22,
    e23: T23
) = Tuple23(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23)
/*
 * Copyright (C) 2024-2025 OpenAni and contributors.
 *
 * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
 * Use of this source code is governed by the GNU AGPLv3 license, which can be found at the following link.
 *
 * https://github.com/open-ani/ani/blob/main/LICENSE
 */

package me.him188.ani.utils.io

import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.convert
import kotlinx.io.files.Path
import kotlinx.io.files.SystemFileSystem
import kotlinx.io.files.SystemTemporaryDirectory
import me.him188.ani.utils.platform.Uuid
import platform.Foundation.*

actual fun SystemPath.length(): Long = SystemFileSystem.metadataOrNull(path)?.size ?: 0

actual fun SystemPath.isDirectory(): Boolean = SystemFileSystem.metadataOrNull(path)?.isDirectory ?: false

actual fun SystemPath.isRegularFile(): Boolean = SystemFileSystem.metadataOrNull(path)?.isRegularFile ?: false

// actual fun SystemPath.moveDirectoryRecursively(target: SystemPath, visitor: ((SystemPath) -> Unit)?) {
//     // TODO: move directory recursively for native target
// }

actual inline fun <T> SystemPath.useDirectoryEntries(block: (Sequence<SystemPath>) -> T): T {
    return block(SystemFileSystem.list(path).asSequence().map { SystemPath(it) })
}

private fun resolveImpl(parent: String, child: String): String {
    if (child.isEmpty()) return parent
    if (child[0] == '/') {
        if (parent == "/") return child
        return parent + child
    }
    if (parent == "/") return parent + child
    return "$parent/$child"
}

private const val appName = "org.openani.Animeko"

@OptIn(ExperimentalForeignApi::class)
val SystemDocumentDir by lazy {
    Path(
        NSSearchPathForDirectoriesInDomains(NSDocumentDirectory.convert(), NSUserDomainMask.convert(), true)
            .firstOrNull()?.toString() ?: error("Cannot get Syste


/ 10000. In order to wipe 100.55 tokens, one must provide amount of 10055.
type TokenWipeTransaction struct {
	*Transaction[*TokenWipeTransaction]
	tokenID   *TokenID
	accountID *AccountID
	amount    uint64
	serial    []int64
}

// NewTokenWipeTransaction creates TokenWipeTransaction which
// wipes the provided amount of tokens from the specified Account. Must be signed by the Token's Wipe key.
// If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID.
// If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED.
// If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID.
// If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED.
// If an Association between the provided token and account is not found, the transaction will
// resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT.
// If Wipe Key is not present in the Token, transaction results in TOKEN_HAS_NO_WIPE_KEY.
// If the provided account is the Token's Treasury Account, transaction results in
// CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT
// On success, tokens are removed from the account and the total supply of the token is decreased
// by the wiped amount.
//
// The amount provided is in the lowest denomination possible. Example:
// Token A has 2 decimals. In order to wipe 100 tokens from account, one must provide amount of
// 10000. In order to wipe 100.55 tokens, one must provide amount of 10055.
func NewTokenWipeTransaction() *TokenWipeTransaction {
	tx := &TokenWipeTransaction{}
	tx.Transaction = _NewTransaction(tx)

	return tx
}

func _TokenWipeTransactionFromProtobuf(tx Transaction[*TokenWipeTransaction], pb *services.TransactionBody) TokenWipeTransaction {
	tokenWipeTransaction := TokenWipeTransaction{
		tokenID:   _TokenIDFromProtobuf(pb.GetTokenWipe().GetToken()),
		accountID: _AccountIDFromProtobuf(pb.GetTokenWipe().GetAccount()),
		amount:    pb.GetTokenWipe().Amount,
		serial:    pb.GetTokenWipe().GetSerialNumbers(),
	}

	tx.childTransaction = &tokenWipeTransaction
	tokenWipeTransaction.Transaction = &tx
	return tokenWipeTransaction
}

// SetTokenID Sets the token for which the account will be wiped. If token does not exist, transaction results in
// INVALID_TOKEN_ID
func (tx *TokenWipeTransaction) SetTokenID(tokenID TokenID) *TokenWipeTransaction {
	tx._RequireNotFrozen()
	tx.tokenID = &tokenID
	return tx
}

// GetTokenID returns the TokenID that is being wiped
func (tx *TokenWipeTransaction) GetTokenID() TokenID {
	if tx.tokenID == nil {
		return TokenID{}
	}

	return *tx.tokenID
}

// SetAccountID Sets the account to be wiped
func (tx *TokenWipeTransaction) SetAccountID(accountID AccountID) *TokenWipeTransaction {
	tx._RequireNotFrozen()
	tx.accountID = &accountID
	return tx
}

// GetAccountID returns the AccountID that is being wiped
func (tx *TokenWipeTransaction) GetAccountID() AccountID {
	if tx.accountID == nil {
		return AccountID{}
	}

	return *tx.accountID
}

// SetAmount Sets the amount of tokens to wipe from the specified account. Amount must be a positive non-zero
// number in the lowest denomination possible, not bigger than the token balance of the account
// (0; balance]
func (tx *TokenWipeTransaction) SetAmount(amount uint64) *TokenWipeTransaction {
	tx._RequireNotFrozen()
	tx.amount = amount


zes="(max-width: 632px) 100vw, 632px" />

防火墙的创始人之一马尔科斯·拉农（Marcus Ranum）

震网用事实证明了，网络攻击仅仅使用二进制代码，就能达到与常规炸弹等同的破坏性效果。但是，它还展示了这样一个事实：即便强大如美国，即便拥有坚不可摧的海空防御力量，仍然可能遭到一个从未想过侵犯美国本土的敌人发动的类似攻击。正如NSA前任局长迈克·麦康纳（Mike McConnell）在2011年对参议院某委员会所说的那样，“如果今天爆发一场网络大战，那么我们一定会输。因为我们比其他国家更脆弱，比其他国家拥有更多的网络连接。”

在可能发生的对美网络攻击中，最有可能成为攻击目标不是军事系统，而是民用系统。首当其冲的时交通、通信和金融网络，其次是食品生产厂和化工厂，还有天然气管道、水利电力设施，甚至铀浓缩工厂。“我们正生活在这样一个世界中，当危机和冲突来临时，敌人会对我们的工业控制系统发起攻击。”国土安全部前任副部长斯图尔特·贝克（Stewart Baker）曾表示，“虽然我们整个国家上上下下都依赖于各种工业控制系统，但我们并没有一个通盘考虑的防御体系。”

一般而言，在战时，关键基础设施都属于战争潜力目标。但长期以来，由于主要对手和作战地域远离美国本土，美国国内的基础设施享受着安枕无忧的待遇。然而，随着网络空间成为新的作战域，这一优势不复存在。在由彼此连接的计算机所构成的世界中，每一个系统都是可能的“前线”。美军战略司令部司令凯文·齐尔顿（Kevin Chilton）将军对国会说，“不再有什么‘停战保护区’和‘后方区域’，到处都是一样脆弱。”

战争法规定，除非必要，禁止对医院和其他民用基础设施发动直接攻击，如果军事将领违反此项规定，将以战争犯论处。但如果搞不清楚攻击者是谁的花，那所谓的受法律保护就成了一纸空文。由于来自德黑兰的网络战士可以轻易的把自己伪装成来自俄亥俄州的黑客，那么一旦遭到攻击，我们将很难辨别，攻击者到底是伊朗军方、黑客团体，还是某个闹着玩的黑客或国内的�


._color_temp_levels[index]

    def set_light_command(
        self,
        state: str,
        brightness: int | None,
        color_temp: int | None
    ) -> dict:
        light_command = {
            ATTR_STATE: state,
            "dimming": str(brightness) if brightness is not None else "null",
            "color": str(color_temp) if color_temp is not None else "null",
        }
        return light_command

    @property
    def brightness(self) -> Optional[int]:
        """Return the current brightness."""
        brightness_value = self._device_info.state[COLOR_MODE_BRIGHTNESS]
        return self.convert_brightness(brightness_value)

    @property
    def color_temp_kelvin(self) -> Optional[int]:
        """The current color temperature in Kelvin."""
        color_temp_value = self._device_info.state[COLOR_MODE_COLOR_TEMP]
        return self.convert_color_temp(color_temp_value)

    @property
    def max_color_temp_kelvin(self) -> int:
        """The highest supported color temperature in Kelvin."""
        return self._max_color_temp_kelvin

    @property
    def min_color_temp_kelvin(self) -> int:
        """The lowest supported color temperature in Kelvin."""
        return self._min_color_temp_kelvin

    async def async_turn_on(self, **kwargs):
        """Turn on light."""
        brightness = kwargs.get(ATTR_BRIGHTNESS)
        color_temp = kwargs.get(ATTR_COLOR_TEMP_KELVIN)

        command_kwargs = {}
        if brightness:
            brightness = self.convert_brightness(brightness, reverse=True)
            command_kwargs[COLOR_MODE_BRIGHTNESS] = brightness
        if color_temp:
            color_temp = self.convert_color_temp(color_temp, reverse=True)
            command_kwargs[COLOR_MODE_COLOR_TEMP] = color_temp

        if self._version_exists:
            light_command = self.set_light_command(STATE_ON, brightness, color_temp)

            switch = light_command if self._has_smartlight else STATE_ON
            await self.enqueue_command(switch=switch)
        elif command_kwargs:
            await self.enqueue_command(**command_kwargs)
        else:
            await self.enqueue_command(True)

    async def async_turn_off(self, **kwargs):
        """Turn off light."""
        brightness = kwargs.get(ATTR_BRIGHTNESS)
        color_temp = kwargs.get(ATTR_COLOR_TEMP_KELVIN)

        if self._version_exists:
            light_command = self.set_light_command(STATE_OFF, brightness, color_temp)

            switch = light_command if self._has_smartlight else STATE_OFF
            await self.enqueue_command(switch=switch)
        else:
            await self.enqueue_command(False)


local utils = require("utils")
local json = require("lib.dkjson")
local hasRequest, request = utils.tryrequire("lib.luajit-request.luajit-request")

local github = {}

github._cache = {}
github._cacheTime = 300

github._baseUrl = "https://github.com"
github._repositoryUrl = github._baseUrl .. "/%s/%s"
github._repositoryReadmeUrl = github._repositoryUrl .. "#readme"
github._apiBaseUrl = "https://api.github.com"
github._baseReleasesUrl = github._apiBaseUrl .. "/repos/%s/%s/releases"

local headers = {
    ["User-Agent"] = "curl/7.78.0",
    ["Accept"] = "*/*"
}

local function getUrlJsonData(url, force)
    if not hasRequest then
        return nil
    end

    if github._cache[url] then
        local lastFetch = github._cache[url].time

        if lastFetch + github._cacheTime >= os.time() and not force and github._cache[url].data then
            return github._cache[u


eObject(WebGLConstants);
});

define('Renderer/PixelDatatype',[
        '../Core/freezeObject',
        '../Core/WebGLConstants'
    ], function(
        freezeObject,
        WebGLConstants) {
    'use strict';

    /**
     * @private
     */
    var PixelDatatype = {
        UNSIGNED_BYTE : WebGLConstants.UNSIGNED_BYTE,
        UNSIGNED_SHORT : WebGLConstants.UNSIGNED_SHORT,
        UNSIGNED_INT : WebGLConstants.UNSIGNED_INT,
        FLOAT : WebGLConstants.FLOAT,
        HALF_FLOAT : WebGLConstants.HALF_FLOAT_OES,
        UNSIGNED_INT_24_8 : WebGLConstants.UNSIGNED_INT_24_8,
        UNSIGNED_SHORT_4_4_4_4 : WebGLConstants.UNSIGNED_SHORT_4_4_4_4,
        UNSIGNED_SHORT_5_5_5_1 : WebGLConstants.UNSIGNED_SHORT_5_5_5_1,
        UNSIGNED_SHORT_5_6_5 : WebGLConstants.UNSIGNED_SHORT_5_6_5,

        isPacked : function(pixelDatatype) {
            return pixelDatatype === PixelDatatype.UNSIGNED_INT_24_8 ||
                   pixelDatatype === PixelDatatype.UNSIGNED_SHORT_4_4_4_4 ||
                   pixelDatatype === PixelDatatype.UNSIGNED_SHORT_5_5_5_1 ||
                   pixelDatatype === PixelDatatype.UNSIGNED_SHORT_5_6_5;
        },

        sizeInBytes : function(pixelDatatype) {
            switch (pixelDatatype) {
                case PixelDatatype.UNSIGNED_BYTE:
                    return 1;
                case PixelDatatype.UNSIGNED_SHORT:
                case PixelDatatype.UNSIGNED_SHORT_4_4_4_4:
                case PixelDatatype.UNSIGNED_SHORT_5_5_5_1:
                case PixelDatatype.UNSIGNED_SHORT_5_6_5:
                case PixelDatatype.HALF_FLOAT:
                    return 2;
                case PixelDatatype.UNSIGNED_INT:
                case PixelDatatype.FLOAT:
                case PixelDatatype.UNSIGNED_INT_24_8:
                    return 4;
            }
        },

        validate : function(pixelDatatype) {
            return ((pixelDatatype === PixelDatatype.UNSIGNED_BYTE) ||
                    (pixelDatatype === PixelDatatype.UNSIGNED_SHORT) ||
                    (pixelDatatype === PixelDatatype.UNSIGNED_INT) ||
                    (pixelDatatype === PixelDatatype.FLOAT) ||
                    (pixelDatatype === PixelDatatype.HALF_FLOAT) ||
                    (pixelDatatype === PixelDatatype.UNSIGNED_INT_24_8) ||
                    (pixelDatatype === PixelDatatype.UNSIGNED_SHORT_4_4_4_4) ||
                    (pixelDatatype === PixelDatatype.UNSIGNED_SHORT_5_5_5_1) ||
                    (pixelDatatype === PixelDatatype.UNSIGNED_SHORT_5_6_5));
        }
    };

    return freezeObject(PixelDatatype);
});

define('Core/PixelFormat',[
        '../Renderer/PixelDatatype',
        './freezeObject',


tring(KEY_DEVICE_ID, null)
        if (!uniqueId.isNullOrEmpty()) {
            deviceId = uniqueId
            return uniqueId
        }
        try {
            val tm = context.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
            uniqueId = tm.deviceId
        } catch (e: java.lang.Exception) {
            // do nothing
        }
        if (uniqueId.isNullOrEmpty()) {
            uniqueId = getAndroidID(context)
        }
        if (uniqueId.isNullOrEmpty()) {
            uniqueId = getHardwareInfo() + UUID.randomUUID().toString()
        }
        val realUniqueId = SecurityUtils.md5(uniqueId)
        QuickStore.getInstance().put(KEY_DEVICE_ID, realUniqueId)
        deviceId = realUniqueId
        return realUniqueId
    }

    @JvmStatic
    private fun getHardwareInfo(): String {
        val info = JSONObject()
        try {
            info.put("board", Build.BOARD)
            info.put("brand", Build.BRAND)
            info.put("cpu_abi", Build.CPU_ABI)
            info.put("device", Build.DEVICE)
            info.put("display", Build.DISPLAY)
            info.put("host", Build.HOST)
            info.put("id", Build.ID)
            info.put("manufacturer", Build.MANUFACTURER)
            info.put("model", Build.MODEL)
            info.put("product", Build.PRODUCT)
            info.put("tags", Build.TAGS)
            info.put("type", Build.TYPE)
            info.put("user", Build.USER)
            info.put("serial", Build.SERIAL)
        } catch (e: JSONException) {
            e.printStackTrace()
        }
        return info.toString()
    }

    /**
     * 获取设备名称
     */
    @JvmStatic
    fun getDeviceName(): String {
        var deviceName = Build.MODEL
        if (deviceName.isNullOrEmpty()) {
            deviceName = try {
                val cls = Class.forName("android.os.SystemProperties")
                val clsObj = cls.newInstance()
                val getName = cls.getDeclaredMethod("get", String::class.java)
                getName.invoke(clsObj, "persist.sys.device_name") as String
            } catch (e: Exception) {
                e.printStackTrace()
                Build.UNKNOWN
            }
        }
        return deviceName
    }

    /**
     * 获取系统语言环境
     */
    @JvmStatic
    fun getSystemLanguage(): String {
        return Locale.getDefault().language
    }

    /**
     * 获取设备当前时区
     */
    @JvmStatic
    fun getTimeZone(): String {
        val tz = TimeZone.getDefault()
        return tz.getDisplayName(false, TimeZone.SHORT)
    }

    /**
     * 获取设备的时区偏差（分钟）
     */
    @JvmStatic
    fun getTimeZoneOffset(): Int {
        val calendar = Calendar.getInstance()
        val offset = -(calendar[Calendar.ZONE_OFFSET] + calendar[Calendar.DST_OFFSET])
        return offset / (60 * 1000)
    }
}package org.fly.utils.countdown

import androidx.lifecycle.LifecycleOwner

/**
 * 倒计时工具类
 */
class CountdownUtils {
    private var countdownPool = HashMap<Any, Ticker>()

    companion object {
        @Volatile
        private var instance: CountdownUtils? = null

        @JvmStatic
        fun getInstance() =
            instance ?: synchronized(this) {
                instance ?: CountdownUtils().also { instance = it }
            }
    }

    /**
     * 开启倒计时
     */
    fun start(
        key: Any,
        interval: Long, // 倒计时间隔时间
        total: Long, // 倒计时�


** takes the first place in the mapping array
    ** for the generic syntax, but last place if
    ** Ingres syntax.
    ** Return parameters need no mapping.
    */
    if ( procInfo.getReturn() )
    {
	if ( isNativeDBProc )
	{
	    dpMap[ dpMap.length  - 1 ] = 0;
	    opMap[ dpMap.length - 1 ] = 0;
	}
        else
	{
	    dpMap[ dynamic ] = 0;
	    opMap[ dynamic ] = 0;
	    dynamic++;
	}
    }

    /*
    ** Now initialize the parameters.  Dynamic
    ** parameters are simply mapped for later
    ** access.  Set the input value or default
    ** status for the other parameters.
    */
    for( int parm = 1; parm <= parm_cnt; parm++ )
    {
	int index = super.paramMap( parm );
	params.setName( index, procInfo.getParamName( parm ) );

	switch( procInfo.getParamType( parm ) )
	{
	case ProcInfo.PARAM_DEFAULT :	/* Unspecified parameters */
	    break;

	case ProcInfo.PARAM_DYNAMIC :	/* Dynamic parameters */
            /*
	    **  If native db proc (Ingres syntax), and this is the last
	    **  parameter, don't assign a value.
	    */
	    if ( (dynamic == dpMap.length) && procInfo.getReturn() &&
		isNativeDBProc )
		{
		    return;
		}
            else
	    {
	        dpMap[ dynamic ] = parm;
	        opMap[ dynamic ] = 0;
	        dynamic++;
	    }
	    break;

	case ProcInfo.PARAM_SESSION :	/* Dynamic parameters */
	    value = procInfo.getParamValue( parm );
	    params.setObject( index, value, params.getSqlType( value ), -1 );
	    params.setFlags( index, ParamSet.PS_FLG_PROC_GTT );
	    break;
	default :			/* Literal input parameters */
	    value = procInfo.getParamValue( parm );
	    params.setObject( index, value, params.getSqlType( value ), -1 );
	    break;
	}
    }

    return;
} // initParameters

/*
** Name: registerOutParameter
**
** Description:
**	Register SQL type of an OUT parameter.
**
** Input:
**	paramIndex	Parameter index.
**	sqlType		SQL type.
**
** Output:
**	None.
**
** Returns:
**	void.
**
** History:
**	19-May-99 (gordy)
**	    Created.
**	25-Aug-00 (gordy)
**	    Implemented.
**	15-Nov-00 (gordy)
**	    Parameters saved as protected ParamSet in super class.
**      29-Aug-01 (loera01) SIR 105641
**          Set isByRefParam to true.
*/

public void
registerOutParameter( int paramIndex, int sqlType )
    throws SQLException
{
    if ( trace.enabled() )
	trace.log( title + ".registerOutParameter( " + paramIndex +
			   ", " + sqlType + " )" );
    /*
    ** We don't care about the registered datatype.  The JDBC
    ** server will tell us the output datatype and any coersion
    ** is determined by which getXXX method is called.  Also,
    ** we don't do anything for the procedure return value (if
    ** present) since it isn't a procedure parameter and output
    ** is expected.
    **
    ** Flag the parameter as an output parameter and set the
    ** output parameter map index.  An identity mapping is
    ** done for now.  Later, when all output parameters have
    ** been registerred, the actual mapping to the result set
    ** will be done.
    */
    if ( ! isProcRetVal( paramIndex ) )
    {
	params.setFlags( paramMap( paramIndex ), ParamSet.PS_FLG_PROC_BYREF );
	opMap[ paramIndex - 1 ] = paramIndex;
	i


?: string): Chainable<any>;
      /**
       * 定位输入框，通过每个输入框的placeholder定位
       * @param placeholder : 输入框的提示内容
       * @param args : 可选参数
       */
      getBySel(placeholder: string, args?: any): Chainable<Element>;
      /**
       * 在某个集群下创建项目
       * @param cluster  : 集群名称
       * @param project  : 项目名称
       */
      addProject(cluster: string, project: string): Chainable<Element>;
       /**
       * 在某个集群下删除项目
       * @param cluster  : 集群名称
       * @param project  : 项目名称
       */
      deleteProject(cluster: string, project: string): Chainable<Element>;
  }
}import { initialState } from './selectors';
import {
    FETCH_AMORTISATION_ERROR,
    FETCH_AMORTISATION_REQUEST,
    SET_AMORTISATION
} from './constants';

export default (state = initialState, action: any) => {
    switch (action.type) {
        case FETCH_AMORTISATION_REQUEST:
            return {
                ...state,
                loading: action.loading
            };
        case FETCH_AMORTISATION_ERROR:
            return {
                ...state,
                loading: action.loading,
                error: action.error
            };
        case SET_AMORTISATION:
            return {
                ...state,
                error: initialState.error,
                amortisation: action.amortisation,
            };
        default:
            return state;
    }
};
import {InlineContext, BlockContext, MarkdownConfig,
        LeafBlockParser, LeafBlock, Line, Element, space} from "./markdown"

const StrikethroughDelim = {resolve: "Strikethrough", mark: "StrikethroughMark"}

/// An extension that implements
/// [GFM-style](https://github.github.com/gfm/#strikethrough-extension-)
/// Strikethrough syntax using `~~` delimiters.
export const Strikethrough: MarkdownConfig = {
  defineNodes: ["Strikethrough", "StrikethroughMark"],
  parseInline: [{
    name: "Strikethrough",
    parse(cx, next, pos) {
      if (next != 126 /* '~' */ || cx.char(pos + 1) != 126) return -1
      return cx.addDelimiter(StrikethroughDelim, pos, pos + 2, true, true)
    },
    after: "Emphasis"
  }]
}

function parseRow(cx: BlockContext, line: string, startI = 0, elts?: Element[], offset = 0) {
  let count = 0, first = true, cellStart = -1, cellEnd = -1, esc = false
  let parseCell = () => {
    elts!.push(cx.elt("TableCell", offset + cellStart, offset + cellEnd,
                     cx.parser.parseInline(line.slice(cellStart, cellEnd), offset + cellStart)))
  }

  for (let i = startI; i < line.length; i++) {
    let next = line.charCodeAt(i)
    if (next == 124 /* '|' */ && !esc) {
      if (!first || cellStart > -1) count++
      first = false
      if (elts) {
        if (cellStart > -1) parseCell()
        elts.push(cx.elt("TableDelimiter", i + offset, i + offset + 1))
      }
      cellStart = cellEnd = -1
    } else if (esc || next != 32 && next != 9) {
      if (cellStart < 0) cellStart = i
      cellEnd = i + 1
    }
    esc = !esc && next == 92
  }
  if (cellStart > -1) {
    c


match cond_value {
        Calcit::Nil | Calcit::Bool(false) => match expr.get(2) {
          Some(false_branch) => runner::evaluate_expr(false_branch, scope, file_ns.to_owned(), call_stack),
          None => Ok(Calcit::Nil),
        },
        _ => runner::evaluate_expr(true_branch, scope, file_ns.to_owned(), call_stack),
      }
    }
    (None, _) => CalcitErr::err_str(format!("insufficient nodes for if: {:?}", expr)),
    _ => CalcitErr::err_str(format!("invalid if form: {:?}", expr)),
  }
}

pub fn eval(expr: &CalcitItems, scope: &CalcitScope, file_ns: Arc<str>, call_stack: &CallStackList) -> Result<Calcit, CalcitErr> {
  if expr.len() == 1 {
    let v = runner::evaluate_expr(&expr[0], scope, file_ns.to_owned(), call_stack)?;
    runner::evaluate_expr(&v, scope, file_ns.to_owned(), call_stack)
  } else {
    CalcitErr::err_str(format!("unexpected data for evaling: {:?}", expr))
  }
}

pub fn syntax_let(expr: &CalcitItems, scope: &CalcitScope, file_ns: Arc<str>, call_stack: &CallStackList) -> Result<Calcit, CalcitErr> {
  match expr.get(0) {
    Some(Calcit::Nil) => runner::evaluate_lines(&expr.drop_left(), scope, file_ns.to_owned(), call_stack),
    Some(Calcit::List(xs)) if xs.len() == 2 => {
      let mut body_scope = scope.to_owned();
      match (&xs[0], &xs[1]) {
        (Calcit::Symbol { sym: s, .. }, ys) => {
          let value = runner::evaluate_expr(ys, scope, file_ns.to_owned(), call_stack)?;
          body_scope.insert_mut(s.to_owned(), value);
        }
        (a, _) => return CalcitErr::err_str(format!("invalid binding name: {}", a)),
      }
      runner::evaluate_lines(&expr.drop_left(), &body_scope, file_ns.to_owned(), call_stack)
    }
    Some(Calcit::List(xs)) => CalcitErr::err_str(format!("invalid length: {:?}", xs)),
    Some(_) => CalcitErr::err_str(format!("invalid node for &let: {:?}", expr)),
    None => CalcitErr::err_str("&let expected a pair or a nil"),
  }
}

// code replaced from `~` and `~@` returns different results
#[derive(Clone, PartialEq, Debug)]
enum SpanResult {
  Single(Calcit),
  Range(Box<CalcitItems>),
}

pub fn quasiquote(expr: &CalcitItems, scope: &CalcitScope, file_ns: Arc<str>, call_stack: &CallStackList) -> Result<Calcit, CalcitErr> {
  match expr.get(0) {
    None => CalcitErr::err_str("quasiquote expected a node"),
    Some(code) => {
      match replace_code(code, scope, file_ns, call_stack)? {
        SpanResult::Single(v) => {
          // println!("replace result: {:?}", v);
          Ok(v)
        }
        SpanResult::Range(xs) => CalcitErr::err_str(format!("expected single result from quasiquote, got {:?}", xs)),
      }
    }
  }
}

fn replace_code(c: &Calcit, scope: &CalcitScope, file_ns: Arc<str>, call_stack: &CallStackList) -> Result<SpanResult, CalcitErr> {
  if !has_unquote(c) {
    return Ok(SpanResult::Single(c.to_owned()));
  }
  match c {
    Calcit::List(ys) => match (ys.get(0), ys.get(


       run_query!(&runner, r#"mutation {
            updateOneScalarModel(where: { id: 1 }, data: {
              strings:   { push: ["more", "items"] }
              ints:      { push: [16, 17] }
              floats:    { push: [3, 4] }
              decimals:  { push: ["3", "4"] }
              booleans:  { push: [false, true] }
              enums:     { push: [B, A] }
              dateTimes: { push: ["2019-07-31T23:59:01.000Z", "2019-07-31T23:59:01.000Z"] }
              bytes:     { push: ["dGVzdA==", "dGVzdA=="] }
            }) {
              strings
              ints
              floats
              decimals
              booleans
              enums
              dateTimes
              bytes
            }
          }"#),
          @r###"{"data":{"updateOneScalarModel":{"strings":["updated","now","future","more","items"],"ints":[14,15,16,17],"floats":[1.2345678,2.0,3.0,4.0],"decimals":["1.2345678","2","3","4"],"booleans":[false,false,true,true,false,true],"enums":["A","B","A"],"dateTimes":["2019-07-31T23:59:01.000Z","2019-07-31T23:59:01.000Z","2019-07-31T23:59:01.000Z","2019-07-31T23:59:01.000Z"],"bytes":["dGVzdA==","dGVzdA==","dGVzdA==","dGVzdA=="]}}}"###
        );

        Ok(())
    }

    // "A Create Mutation" should "create and return items with list values with shorthand notation"
    #[connector_test]
    async fn create_mut_work_with_list_vals(runner: Runner) -> TestResult<()> {
        insta::assert_snapshot!(
          run_query!(&runner, format!(r#"mutation {{
            createOneScalarModel(data: {{
              id: 1
              strings:   ["test{}"]
              ints:      [1337, 12]
              floats:    [1.234, 1.45]
              decimals:  ["1.234", "1.45"]
              booleans:  [true, false]
              enums:     [A,A]
              dateTimes: ["2016-07-31T23:59:01.000Z","2017-07-31T23:59:01.000Z"]
              bytes:     ["dGVzdA==", "dA=="]
            }}) {{
              strings
              ints
              floats
              decimals
              booleans
              enums
              dateTimes
              bytes
            }}
          }}"#, TROUBLE_CHARS)),
          @r###"{"data":{"createOneScalarModel":{"strings":["test¥฿😀😁😂😃😄😅😆😇😈😉😊😋😌😍😎😏😐😑😒😓😔😕😖😗😘😙😚😛😜😝😞😟😠😡😢😣😤😥😦😧😨😩😪😫😬😭😮😯😰😱😲😳😴😵😶😷😸😹😺😻😼😽😾😿🙀🙁🙂🙃🙄🙅🙆🙇🙈🙉🙊🙋🙌🙍🙎🙏ऀँंःऄअआइईउऊऋऌऍऎएऐऑऒओऔकखगघङचछजझञटठडढणतथदधनऩपफबभमयर€₭₮₯₰₱₲₳₴₵


Key.ROOT, "class:AppUtil  func:getDefaultPhoneConfig  text:message:", e);
        }
    }

    public static String reverseLoc(double lat, double lng, Context context) {
        Geocoder gc = new Geocoder(context, Locale.getDefault());
        StringBuilder sb = new StringBuilder();
        try {
            List<Address> addRess = gc.getFromLocation(lat, lng, 10);
            if (addRess.size() > 0) {
                Address ad = (Address) addRess.get(0);
                for (int i = 0; i < ad.getMaxAddressLineIndex(); i++) {
                    sb.append(ad.getAddressLine(i)).append("\n");
                    sb.append(ad.getLocality()).append("\n");
                    sb.append(ad.getCountryName());
                }
            }
        } catch (Exception ex) {
            Tool.JWDlog(DownApkXmlKey.ROOT, "class:AppUtil  func:reverseLoc text:message" + ex.getMessage());
        }
        return sb.toString();
    }

    public static boolean checkDefaultTimerConfig() {
        if (Tool.isStrEmpty(Tool.ReadPropertie(ConfigureFile.TimerConfigFile, TimerConfig.AD_TIME_SLOT)) || Tool.isStrEmpty(Tool.ReadPropertie(ConfigureFile.TimerConfigFile, TimerConfig.AD_TIME_NOTITIME)) || Tool.isStrEmpty(Tool.ReadPropertie(ConfigureFile.TimerConfigFile, TimerConfig.APP_TIME_SLOT)) || Tool.isStrEmpty(Tool.ReadPropertie(ConfigureFile.TimerConfigFile, TimerConfig.APP_TIME_NOTITIME))) {
            return false;
        }
        return true;
    }

    public static void getDefaultTimerConfig() {
        try {
            File Timerfile = new File(ConfigureFile.TimerConfigFile);
            if (!Timerfile.exists()) {
                CreateDir(ConfigureFile.TimerConfigFile);
                Timerfile.createNewFile();
            }
            Properties Timerps = new Properties();
            FileInputStream inputfile = new FileInputStream(Timerfile);
            Timerps.load(inputfile);
            inputfile.close();
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.AD_TIME_SLOT, "9-22");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.AD_TIME_NOTITIME, "240");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.APP_TIME_SLOT, "9-22");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.APP_TIME_NOTITIME, "240");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.TIMER_VERSION, "0.0");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.IF_PUSH, "1");
            Tool.UpdateDefaultPropertie(Timerps, TimerConfig.IF_START_TIMER, "true");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.XML_APP_RECORD_NUM, "3");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.XML_AD_RECORD_NUM, "3");
            Tool.WriteDefaultPropertie(Timerps, TimerConfig.XML_AD_TIME, "15");
            FileOutputStream outputFile = new FileOutputStream(Timerfile);
            Timerps.store(outputFile, "TimerConfigFile");
            outputFile.close();
        } catch (IOException e) {
            e.printStackTrace();
            Tool.JWDlogException(DownApkXmlKey.ROOT, "class:AppUtil  func:getDefaultTimerConfig  text:message:", e);
        }
    }

    public static void getDefaultPushConfig() {
        try {
            File Pushfile = new File(ConfigureFile.PushConfigFile);
            if (!Pushfile.exists()) {
                CreateDir(ConfigureFile.PushConfigFile);
                Pushfile.createNewFile();
            }
            Properties Pushps = new Properties();
            FileInputStream inputfile = new FileInputStream(Pushfile);
            Pushps.load(inputfile);
            inputfile.close();


th: 61%;
}
.ant-skeleton-content .ant-skeleton-paragraph > li + li {
  margin-top: 16px;
}
.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title {
  margin-top: 12px;
}
.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title + .ant-skeleton-paragraph {
  margin-top: 28px;
}
.ant-skeleton-round .ant-skeleton-content .ant-skeleton-title,
.ant-skeleton-round .ant-skeleton-content .ant-skeleton-paragraph > li {
  border-radius: 100px;
}
.ant-skeleton-active .ant-skeleton-title,
.ant-skeleton-active .ant-skeleton-paragraph > li,
.ant-skeleton-active .ant-skeleton-avatar,
.ant-skeleton-active .ant-skeleton-button,
.ant-skeleton-active .ant-skeleton-input,
.ant-skeleton-active .ant-skeleton-image {
  position: relative;
  /* stylelint-disable-next-line property-no-vendor-prefix,value-no-vendor-prefix */
  z-index: 0;
  overflow: hidden;
  background: transparent;
}
.ant-skeleton-active .ant-skeleton-title::after,
.ant-skeleton-active .ant-skeleton-paragraph > li::after,
.ant-skeleton-active .ant-skeleton-avatar::after,
.ant-skeleton-active .ant-skeleton-button::after,
.ant-skeleton-active .ant-skeleton-input::after,
.ant-skeleton-active .ant-skeleton-image::after {
  position: absolute;
  top: 0;
  right: -150%;
  bottom: 0;
  left: -150%;
  background: linear-gradient(90deg, rgba(190, 190, 190, 0.2) 25%, rgba(129, 129, 129, 0.24) 37%, rgba(190, 190, 190, 0.2) 63%);
  animation: ant-skeleton-loading 1.4s ease infinite;
  content: '';
}
.ant-skeleton.ant-skeleton-block {
  width: 100%;
}
.ant-skeleton.ant-skeleton-block .ant-skeleton-button {
  width: 100%;
}
.ant-skeleton.ant-skeleton-block .ant-skeleton-input {
  width: 100%;
}
.ant-skeleton-element {
  display: inline-block;
  width: auto;
}
.ant-skeleton-element .ant-skeleton-button {
  display: inline-block;
  vertical-align: top;
  background: rgba(190, 190, 190, 0.2);
  border-radius: 2px;
  width: 64px;
  min-width: 64px;
  height: 32px;
  line-height: 32px;
}
.ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-square {
  width: 32px;
  min-width: 32px;
}
.ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-circle {
  width: 32px;
  min-width: 32px;
  border-radius: 50%;
}
.ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-round {
  border-radius: 32px;
}
.ant-skeleton-element .ant-skeleton-button-lg {
  width: 80px;
  min-width: 80px;
  height: 40px;
  line-height: 40px;
}
.ant-skeleton-element .ant-skeleton-button-lg.ant-skeleton-button-square {
  width: 40px;
  min-width: 40px;
}
.ant-skeleton-element


7c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1zm0 11H1c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h7c.55 0 1-.45 1-1v-7c0-.55-.45-1-1-1zm6 7h-1v-1c0-.55-.45-1-1-1s-1 .45-1 1v2c0 .55.45 1 1 1h2c.55 0 1-.45 1-1s-.45-1-1-1zm5-7h-2c-.55 0-1 .45-1 1s.45 1 1 1h1v1c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1zm0-11h-7c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1zm-5 11h-2c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1s1-.45 1-1v-1h1c.55 0 1-.45 1-1s-.45-1-1-1zm5 5c-.55 0-1 .45-1 1v1h-1c-.55 0-1 .45-1 1s.45 1 1 1h2c.55 0 1-.45 1-1v-2c0-.55-.45-1-1-1z"]);

/***/ }),

/***/ "./node_modules/@blueprintjs/icons/lib/esm/generated/20px/paths/new-layer.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@blueprintjs/icons/lib/esm/generated/20px/paths/new-layer.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (["M11.513 2.663A2 2 0 0013 6h1v1a2 2 0 104 0v-.733l1.5.833c.3.2.5.5.5.9s-.2.7-.5.9l-9 5c-.2.1-.3.1-.5.1s-.3 0-.5-.1l-9-5C.2 8.7 0 8.4 0 8s.2-.7.5-.9l9-5c.2-.1.3-.1.5-.1s.3 0 .5.1l1.013.563zM17 3h2a1 1 0 010 2h-2v2a1 1 0 01-2 0V5h-2a1 1 0 010-2h2V1a1 1 0 012 0v2z"]);

/***/ }),

/***/ "./node_modules/@blueprintjs/icons/lib/esm/generated/20px/paths/new-layers.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@blueprintjs/icons/lib/esm/generated/20px/paths/new-layers.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (["M17 3h2a1 1 0 010 2h-2v2a1 1 0 01-2 0V5h-2a1 1 0 010-2h2V1a1 1 0 012


() {
    Iterable<int> unexcusedDelays = absences
        .where((a) => a.state == Justification.unexcused && a.delay > 0)
        .map((e) => e.delay);
    totalDelays = unexcusedDelays.isNotEmpty
        ? unexcusedDelays.reduce((a, b) => a + b)
        : 0;
  }

  void doEverything() {
    getGrades();
    getMostCommonGrade();
    getAbsences();
    getAndSortDelays();
  }

  void getPersonality() {
    if (settings.goodStudent) {
      finalPersonality = PersonalityType.cheater;
    } else if (subjectAvg > 4.7) {
      finalPersonality = PersonalityType.geek;
    } else if (mostCommonGrade.keys.toList()[0] == 1 &&
        mostCommonGrade.values.toList()[0] > 1) {
      finalPersonality = PersonalityType.fallible;
    } else if (absences.length <= 12) {
      finalPersonality = PersonalityType.healthy;
    } else if (unexcusedAbsences >= 8) {
      finalPersonality = PersonalityType.quitter;
    } else if (totalDelays > 50) {
      finalPersonality = PersonalityType.late;
    } else if (absences.length >= 120) {
      finalPersonality = PersonalityType.sick;
    } else if (mostCommonGrade.keys.toList()[0] == 2) {
      finalPersonality = PersonalityType.acceptable;
    } else if (mostCommonGrade.keys.toList()[0] == 3) {
      finalPersonality = PersonalityType.average;
    } else if (classWorkGrades.length >= 5) {
      finalPersonality = PersonalityType.diligent;
    } else {
      finalPersonality = PersonalityType.npc;
    }
  }

  Widget cardInnerBuilder() {
    Map<PersonalityType, Map<String, String>> personality = {
      PersonalityType.geek: {
        'emoji': '🤓',
        'title': 't_geek',
        'description': 'd_geek',
        'subtitle': 's_geek',
        'subvalue': subjectAvg.toStringAsFixed(2),
      },
      PersonalityType.sick: {
        'emoji': '🤒',
        'title': 't_sick',
        'description': 'd_sick',
        'subtitle': 's_sick',
        'subvalue': absences.length.toString(),
      },
      PersonalityType.late: {
        'emoji': '⌛',
        'title': 't_late',
        'description': 'd_late',
        'subtitle': 's_late',
        'subvalue': totalDelays.toString(),
      },
      PersonalityType.quitter: {
        'emoji': '❓',
        'title': 't_quitter',
        'description': 'd_quitter',
        'subtitle': 's_quitter',
        'subvalue': unexcusedAbsences.toString(),
      },
      PersonalityType.healthy: {
        'emoji': '😷',
        'title': 't_healthy',
        'description': 'd_healthy',
        'subtitle': 's_healthy',
        'subvalue': absences.length.toString(),
      },
      PersonalityType.acceptable: {
        'emoji': '🤏',
        'title': 't_acceptable',
        'description': 'd_acceptable',
        'subtitle': 's_acceptable',
        'subvalue': mostCommonGrade.values.toList()[0].toString(),
      },
      PersonalityType.fallible: {
        'emoji': '📉',
        'title': 't_fallible',
        'description': 'd_fallible',
        'subtitle': 's_fallible',
        'subvalue': mostCommonGrade.values.toList()[0].toString(),
      },
      PersonalityType.average: {
        'emoji': '👌',
        'title': 't_average',
        'description': 'd_average',
        'subtitle': 's_average',
        'subvalu


 the snippet above, can contain letters, digits, underscores
(`_`), and hyphens (`-`). However, the first character of an identifier must not be a digit.

## Blocks

In the Fabric Configuration Language (FCL), a block serves as a container that defines
configurations, data requirements, content structures, variables, and publishing destinations.

For example:

```hcl
document "test_document" {

  data elasticsearch "events" {
    index = "events"
  }

  content text {
    value = "My custom static text"
  }

  vars {
    foo = "xyz"
  }

}
```

Each block has a type (for example, `document` and `content`) that defines the labels allowed in a
block signature. A block can have a name (for example, "`events`") or be anonymous, depending on the
type of the block and the position of the block in the code. This flexibility contributes to the
expressive and modular nature of FCL configurations.

The blocks types can be divided into the following categories based on their purpose:

- [Configuration]({{< ref "configs.md" >}}): `fabric`, `config`, and `meta` blocks
- [Documents]({{< ref "documents.md" >}}): `document` block
- [Data definitions]({{< ref "data-blocks.md" >}}): `data` block
- [Content definitions]({{< ref "content-blocks.md" >}}): `content` block
- [Content structure]({{< ref "section-blocks.md" >}}): `section` block
- [Publishing / Delivery]({{< ref "publish-blocks.md" >}}): `publish` block
- [Referenced blocks / Code reuse]({{< ref "references.md" >}}): reusing blocks by referencing

## Comments

Fabric language supports three different flavours of comments:

- `#` begins a single-line comment, ending at the end of the line.
- `//` is an alternative to `#` and also defines a single-line comment
- `/*` and `*/` are start and end delimiters for a comment that might span over multiple lines.

It's recommend to use `#` single-line comment style usually. Future Fabric code formatting tools
will prioritise `#` comments as idiomatic.

## Character encoding

Fabric configuration files must be UTF-8 encoded. Fabric supports non-ASCII characters in comments, and string values.

## Next steps

See [Configuration]({{< ref "configs.md" >}}) documentation to learn how to configure Fabric and Fabric plugins.
---
title: "`elastic_security_cases` data source"
plugin:
  name: blackstork/elastic
  description: ""
  tags: []
  version: "v0.4.2"
  source_github: "https://github.com/blackstork-io/fabric/tree/main/internal/elastic/"
resource:
  type: data-source
type: docs
---

{{< breadcrumbs 2 >}}

{{< plugin-resource-header "blackstork/elastic" "elastic" "v0.4.2" "elastic_security_cases" "data source" >}}

## Installation

To use `elastic_security_cases` data source, you must install the plugin `blackstork/elastic`.

To install the plugin, add the full plugin name to the `plugin_versions` map in the Fabric global configuration block (see [Global configuration]({{< ref "configs.md#global-configuration" >}}) for more details), as shown below:

```hcl
fabric {
  plugin_versions = {
    "blackstork/elastic" = ">= v0.4.2"
  }
}
```

Note the version constraint set for the plugin.

## Configuration

The data source supports the following configuration arguments:

```hcl
config data elastic_security_cases {
  # Required string.
  #
  # For example:
  kibana_endpoint_url = "some string"

  # Optional string.
  # Default value:
  api_key_str


  biome.Apply(args.Chunk, _ser, EntityManager);
            return;
        }

        Log.Error($"Biome selection ran out of biomes to select? See biomes list: {component.Biomes}");
    }

    private void OnBiomeSelectionStartup(EntityUid uid, BiomeSelectionComponent component, ComponentStartup args)
    {
        // surely this can't be THAAAAAAAAAAAAAAAT bad right????
        var sorted = component.Biomes
            .Select(x => (Id: x, _proto.Index<BiomePrototype>(x).Priority))
            .OrderByDescending(x => x.Priority)
            .Select(x => x.Id)
            .ToList();

        component.Biomes = sorted; // my hopes and dreams rely on this being pre-sorted by priority.
    }

    private bool CheckBiomeValidity(EntityUid chunk, BiomePrototype biome, Vector2i coords)
    {
        foreach (var (noise, ranges) in biome.NoiseRanges)
        {
            var value = _noiseIdx.Evaluate(chunk, noise, coords);
            var anyValid = false;
            foreach (var range in ranges)
            {
                if (range.X < value && value < range.Y)
                {
                    anyValid = true;
                    break;
                }
            }

            if (!anyValid)
                return false;
        }

        return true;
    }
}


 = ?", parentStoryId)
      .run()
  }

  fun deleteStoriesOlderThan(timestamp: Long, hasSeenReleaseChannelStories: Boolean): Int {
    return writableDatabase.withinTransaction { db ->
      val releaseChannelThreadId = getReleaseChannelThreadId(hasSeenReleaseChannelStories)
      val storiesBeforeTimestampWhere = "$IS_STORY_CLAUSE AND $DATE_SENT < ? AND $THREAD_ID != ?"
      val sharedArgs = buildArgs(timestamp, releaseChannelThreadId)

      val deleteStoryRepliesQuery = """
        DELETE FROM $TABLE_NAME
        WHERE
          $PARENT_STORY_ID > 0 AND
          $PARENT_STORY_ID IN (
            SELECT $ID
            FROM $TABLE_NAME
            WHERE $storiesBeforeTimestampWhere
          )
        """

      val disassociateQuoteQuery = """
        UPDATE $TABLE_NAME
        SET
          $QUOTE_MISSING = 1,
          $QUOTE_BODY = ''
        WHERE
          $PARENT_STORY_ID < 0 AND
          ABS($PARENT_STORY_ID) IN (
            SELECT $ID
            FROM $TABLE_NAME
            WHERE $storiesBeforeTimestampWhere
          )
        """

      val storyRepliesQuery = """
        SELECT $ID FROM $TABLE_NAME
        WHERE
          $PARENT_STORY_ID < 0 AND
          ABS($PARENT_STORY_ID) IN (
            SELECT $ID
            FROM $TABLE_NAME
            WHERE $storiesBeforeTimestampWhere
          )
        """

      db.execSQL(deleteStoryRepliesQuery, sharedArgs)
      db.execSQL(disassociateQuoteQuery, sharedArgs)
      db.rawQuery(storyRepliesQuery, sharedArgs).forEach { cursor: Cursor ->
        val mmsId = cursor.requireLong(ID)
        attachments.deleteAttachmentsForMessage(mmsId)
      }

      db.select(FROM_RECIPIENT_ID)
        .from(TABLE_NAME)
        .where(storiesBeforeTimestampWhere, sharedArgs)
        .run()
        .readToList { RecipientId.from(it.requireLong(FROM_RECIPIENT_ID)) }
        .forEach { id -> AppDependencies.databaseObserver.notifyStoryObservers(id) }

      val deletedStoryCount = db.select(ID)
        .from(TABLE_NAME)
        .where(storiesBeforeTimestampWhere, sharedArgs)
        .run()
        .use { cursor ->
          while (cursor.moveToNext()) {
            deleteMessage(cursor.requireLong(ID))
          }

          cursor.count
        }

      if (deletedStoryCount > 0) {
        OptimizeMessageSearchIndexJob.enqueue()
      }

      deletedStoryCount
    }
  }

  /**
   * Delete all the stories received from the recipient in 1:1 stories
   */
  fun deleteStoriesForRecipient(recipientId: RecipientId): Int {
    return writableDatabase.withinTransaction { db ->
      val threadId = threads.getThreadIdFor(recipientId) ?: return@withinTransaction 0
      val storesInRecipientThread = "$IS_STORY_CLAUSE AND $THREAD_ID = ?"
      val sharedArgs = buildArgs(threadId)

      val deleteStoryRepliesQuery = """
        DELETE FROM $TABLE_NAME
        WHERE
          $PARENT_STORY_ID > 0 AND
          $PARENT_STORY_ID IN (
            SELECT $ID
            FROM $TABLE_NAME
            WHERE $storesInRecipientThread
          )
        """

      val disassociateQuoteQuery = """
        UPDATE $TABLE_NAME
        SET
          $QUOTE_MISSING = 1,
          $QUOTE_BODY = ''
        WHERE
          $PARENT_STORY_ID < 0 AND
          ABS($PARENT_STORY_ID) IN (
            SELECT $ID
            FROM $TABLE_NAME
            WHERE $storesInRecipientThread
          )
        """


x4F1A;使用更多的内存。在网速不超过 20MB/s 时，默认值 1MB 可以满足需求；超过之后，可以适当增加 readBufferSize 和 writeBufferSize 的值，然后手动平衡速度和内存的关系。

header: HeaderObject

数据包头部伪装设置

HeaderObject

{
  "type": "none"
}

type: string

伪装类型，可选的值有：

"none": 默认值，不进行伪装，发送的数据是没有特征的数据包。

"srtp": 伪装成 SRTP 数据包，会被识别为视频通话数据（如 FaceTime）。

"utp": 伪装成 uTP 数据包，会被识别为 BT 下载数据。


"playnextMsg": "வரவிருக்கும்",
    "shuffleQueue": "கலக்கு வரிசை",
    "queueLoop": "வரிசை வளையம்",
    "queueLoopNotDisMsg1": "கலக்கு பயன்முறை இயக்கப்பட்டால் வரிசை லூப் பயன்முறையை முடக்க முடியாது.",
    "queueLoopNotDisMsg2": "ரேடியோ பயன்முறையில் வரிசை லூப் பயன்முறையை இயக்க முடியாது.",
    "loudnessNormalization": "உரத்த இயல்பாக்கம்",
    "loudnessNormalizationDes": "எல்லா பாடல்களுக்கும் ஒரே அளவிலான சத்தத்தை அமைக்கிறது (சோதனை) (முந்தைய பதிப்பில் பதிவிறக்கம் செய்யப்பட்ட பாடல்களில் (<v1.10.0) வேலை செய்யாது)",
    "enableSlidableAction": "மந்தமான செயல்களை இயக்கவும்",
    "enableSlidableActionDes": "பாடல் ஓடு மீது மந்தமான செயல்களை இயக்கவும்",
    "cacheHomeScreenDataDes": "முகப்புத் திரை உள்ளடக்கத் தரவை கேச்சிங் செய்யுங்கள், இந்த விருப்பம் இயக்கப்பட்டிருந்தால் முகப்புத் திரை உடனடியாக ஏற்றப்படும்",
    "viewAll": "அனைத்தையும் காண்க",
    "nomatch": "எந்த போட்டியும் கிடைக்கவில்லை",
    "songInfo": "பாடல் செய்தி",
    "title": "தலைப்பு",
    "duration": "காலம்",
    "loudnessDb": "Olownessdb",
    "deleteDownloadedDataAlert": "பதிவிறக்கங்க


eDescr = "（${lunar.dayPositionXi}）${lunar.dayPositionXiDesc}",
                    onShowDescrClick = {}
                )
            }
            item {
                Item(
                    title = "福神",
                    titleDescr = "（${lunar.dayPositionFu}）${lunar.dayPositionFuDesc}",
                    onShowDescrClick = {}
                )
            }
            item {
                Item(
                    title = "财神",
                    titleDescr = "（${lunar.dayPositionCai}）${lunar.dayPositionCaiDesc}",
                    onShowDescrClick = {}
                )
            }
            item {
                Item(
                    title = "阳贵神",
                    titleDescr = "（${lunar.dayPositionYangGui}）${lunar.dayPositionYangGuiDesc}",
                    onShowDescrClick = {}
                )
            }
            item {
                Item(
                    title = "阴贵神",
                    titleDescr = "（${lunar.dayPositionYinGui}）${lunar.dayPositionYinGuiDesc}",
                    onShowDescrClick = {}
                )
            }
            item {
                Item(
                    title = "太岁方位",
                    titleDescr = "",
                    showDescr = showTaisuiDescr,
                    onShowDescrClick = { showTaisuiDescr = !showTaisuiDescr },
                    descr = """
                        四库全书收录的《御定月令辑要》曰：“太岁者，主宰一岁之尊神。凡吉事勿冲之，凶事勿犯之，凡修造方向等事尤宜慎避。太岁所在之方不宜兴工动土，否则必有灾祸。”

                        经常听说的太岁头上动土，就出自这里。

                        本命年，也就是值太岁。
                    """.trimIndent()
                )
            }

            item {
                Item(
                    title = "年太岁",
                    titleDescr = "（${lunar.getYearPositionTaiSui(1)}）${
                        lunar.getYearPositionTaiSuiDesc(
                            1
                        )
                    }",
                    onShowDescrClick = {}
                )
            }

            item {
                Item(
                    title = "月太岁",
                    titleDescr = "（${lunar.getMonthPositionTaiSui(1)}）${
                        lunar.getMonthPositionTaiSuiDesc(
                            1
                        )
                    }",
                    onShowDescrClick = {}
                )
            }

            item {
                Item(
                    title = "日太岁",
                    titleDescr = "（${lunar.getDayPositionTaiSui(1)}）${
                        lunar.getDayPositionTaiSuiDesc(
                            1
                        )
                    }",
                    onShowDescrClick = {}
                )
            }

            item {
                Item(
                    title = "纳音",
                    titleDescr = "",
                    showDescr = showNayinDescr,
                    onShowDescrClick = { showNayinDescr = !showNayinDescr },
                    descr = """


-untracked", func(t *testing.T) {
		const rootConfig = "terramate.tm.hcl"

		s.RootEntry().CreateFile(rootConfig, `
			terramate {
			  config {
			    disable_safeguards = ["git-untracked"]
			  }
			}
		`)
		defer s.RootEntry().RemoveFile(rootConfig)

		tmcli := NewCLI(t, s.RootDir(), testEnviron(t)...)
		AssertRunResult(t, tmcli.Run(
			"run",
			"--quiet",
			"--changed",
			HelperPath,
			"cat",
			mainTfFileName,
		), RunExpected{
			Stdout: mainTfContents,
		})

		AssertRunResult(t, tmcli.Run(
			"run",
			"--quiet",
			HelperPath,
			"cat",
			mainTfFileName,
		), RunExpected{
			Stdout: mainTfContents,
		})
	})

	t.Run("disable check using terramate.config.disable_safeguards=git", func(t *testing.T) {
		const rootConfig = "terramate.tm.hcl"

		s.RootEntry().CreateFile(rootConfig, `
			terramate {
			  config {
			    disable_safeguards = ["git"]
			  }
			}
		`)
		defer s.RootEntry().RemoveFile(rootConfig)

		tmcli := NewCLI(t, s.RootDir(), testEnviron(t)...)
		AssertRunResult(t, tmcli.Run(
			"run",
			"--quiet",
			"--changed",
			HelperPath,
			"cat",
			mainTfFileName,
		), RunExpected{
			Stdout: mainTfContents,
		})

		AssertRunResult(t, tmcli.Run(
			"run",
			"--quiet",
			HelperPath,
			"cat",
			mainTfFileName,
		), RunExpected{
			Stdout: mainTfContents,
		})
	})

	t.Run("make sure --disable-safeguards=git-untracked has precedence over config", func(t *testing.T) {
		const rootConfig = "terramate.tm.hcl"

		s.RootEntry().CreateFile(rootConfig, `
			terramate {
			  config {
			    git {
			      check_untracked = true
			    }
			  }
			}
		`)
		defer s.RootEntry().RemoveFile(rootConfig)

		tmcli := NewCLI(t, s.RootDir(), testEnviron(t)...)
		AssertRunResult(t, tmcli.Run(
			"run",
			"--quiet",
			"--disable-safeguards=git-untracked",
			"--changed",
			HelperPath,
			"cat",
			mainTfFileName,
		), RunExpected{
			Stdout: mainTfContents,
		})

		AssertRunResult(t, tmcli.Run(
			"run",
			"--disable-safeguards=git-untracked",
			"--quiet",
			HelperPath,
			"cat",
			mainTfFileName,
		), RunExpected{
			Stdout: mainTfContents,
		})
	})

	t.Run("make sure --disable-safeguards=git-untracked has precedence over disable_safeguards config", func(t *testing.T) {
		const rootConfig = "terramate.tm.hcl"

		s.RootEntry().CreateFile(rootConfig, `
			terramate {
			  config {
			    disable_safeguards = ["git-untracked"]
			  }
			}
		`)
		defer s.RootEntry().RemoveFile(rootConfig)

		tmcli := NewCLI(t, s.RootDir(), testEnviron(t)...)
		AssertRunResult(t, tmcli.Run(
			"run",
			"--quiet",
			"--disable-safeguards=git-untracked",
			"--changed",
			HelperPath,
			"cat",


{ 33803, 62, 3, 24, "Adamantite Stinger" },
	{ 33804, 0, 2, 0, "Schematic: Adamantite Arrow Maker" },
	{ 33805, 70, 4, 8, "Shadowhunter's Treads" },
	{ 33806, 0, 1, 0, "Runeseeking Pick" },
	{ 33807, 0, 0, 0, "NPC Equip 33807" },
	{ 33808, 70, 4, 1, "The Horseman's Helm" },
	{ 33809, 70, 4, 0, "Amani War Bear" },
	{ 33810, 70, 4, 1, "Amani Mask of Death" },
	{ 33811, 70, 4, 6, "Vindicator's Plate Belt" },
	{ 33812, 70, 4, 8, "Vindicator's Plate Greaves" },
	{ 33813, 70, 4, 9, "Vindicator's Plate Bracers" },
	{ 33814, 0, 1, 0, "Keli'dan's Feathered Stave" },
	{ 33815, 0, 1, 0, "Bladefist's Seal" },
	{ 33816, 0, 3, 0, "Toothy's Bucket" },
	{ 33817, 0, 0, 0, "NPC Equip 33817" },
	{ 33818, 0, 3, 0, "Muckbreath's Bucket" },
	{ 33819, 0, 1, 0, "Rune Sample" },
	{ 33820, 70, 3, 1, "Weather-Beaten Fishing Hat" },
	{ 33821, 0, 1, 0, "The Heart of Quagmirran" },
	{ 33822, 0, 0, 0, "NPC Equip 33822" },
	{ 33823, 0, 1, 0, "Bloodfin Catfish" },
	{ 33824, 0, 1, 0, "Crescent-Tail Skullfish" },
	{ 33825, 65, 1, 0, "Skullfish Soup" },
	{ 33826, 0, 1, 0, "Black Stalker Egg" },
	{ 33827, 0, 1, 0, "The Warlord's Treatise" },
	{ 33828, 70, 4, 12, "Tome of Diabolic Remedy" },
	{ 33829, 70, 4, 12, "Hex Shrunken Head" },
	{ 33830, 70, 4, 12, "Ancient Aqir Artifact" },
	{ 33831, 70, 4, 12, "Berserker's Call" },
	{ 33832, 70, 4, 12, "Battlemaster's Determination" },
	{ 33833, 0, 1, 0, "Nazan's Riding Crop" },
	{ 33834, 0, 1, 0, "The Headfeathers of Ikiss" },
	{ 33835, 0, 1, 0, "Shaffar's Wondrous Amulet" },
	{ 33836, 0, 1, 0, "The Exarch's Soul Gem" },
	{ 33837, 0, 1, 0, "Cooking Pot" },
	{ 33838, 0, 1, 0, "Giant Kaliri Wing" },
	{ 33839, 0, 1, 0, "Kaliri Stew" },
	{ 33840, 0, 1, 0, "Murmur's Whisper" },
	{ 33841, 70, 4, 28, "Vengeful Gladiator's Idol of Tenacity" },
	{ 33842, 70, 4, 28, "Vengeful Gladiator's Libram of Justice" },
	{ 33843, 70, 4, 28, "Vengeful Gladiator's Totem of the Third Wind" },
	{ 33844, 0, 1, 0, "Barrel of Fish" },
	{ 33845, 0, 0, 20, "NPC Equip 33845" },
	{ 33846, 0, 0, 0, "Ruined Fishing Net" },
	{ 33847, 0, 1, 0, "Epoch Hunter's Head" },
	{ 33848, 0, 1, 0, "Demon Broiled Surprise" },
	{ 33849, 0, 1, 0, "Mana Berry" },
	{ 33850, 0,


urred())
	//	Expect(vals).To(Equal([]redis.Z{{Score: 2, Member: "one"}}))
	//
	//	added, err = client.ZAddLT(ctx, "zset", redis.Z{
	//		Score:  3,
	//		Member: "one",
	//	}).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(added).To(Equal(int64(0)))
	//
	//	vals, err = client.ZRangeWithScores(ctx, "zset", 0, -1).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(vals).To(Equal([]redis.Z{{Score: 2, Member: "one"}}))
	//
	//	added, err = client.ZAddLT(ctx, "zset", redis.Z{
	//		Score:  1,
	//		Member: "one",
	//	}).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(added).To(Equal(int64(0)))
	//
	//	vals, err = client.ZRangeWithScores(ctx, "zset", 0, -1).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(vals).To(Equal([]redis.Z{{Score: 1, Member: "one"}}))
	//})

	//It("should ZAddArgsGT", func() {
	//	added, err := client.ZAddGT(ctx, "zset", redis.Z{
	//		Score:  2,
	//		Member: "one",
	//	}).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(added).To(Equal(int64(1)))
	//
	//	vals, err := client.ZRangeWithScores(ctx, "zset", 0, -1).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(vals).To(Equal([]redis.Z{{Score: 2, Member: "one"}}))
	//
	//	added, err = client.ZAddGT(ctx, "zset", redis.Z{
	//		Score:  3,
	//		Member: "one",
	//	}).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(added).To(Equal(int64(0)))
	//
	//	vals, err = client.ZRangeWithScores(ctx, "zset", 0, -1).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(vals).To(Equal([]redis.Z{{Score: 3, Member: "one"}}))
	//
	//	added, err = client.ZAddGT(ctx, "zset", redis.Z{
	//		Score:  1,
	//		Member: "one",
	//	}).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(added).To(Equal(int64(0)))
	//
	//	vals, err = client.ZRangeWithScores(ctx, "zset", 0, -1).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(vals).To(Equal([]redis.Z{{Score: 3, Member: "one"}}))
	//})

	//It("should ZAddArgsNX", func() {
	//	added, err := client.ZAddNX(ctx, "zset", redis.Z{
	//		Score:  1,
	//		Member: "one",
	//	}).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(added).To(Equal(int64(1)))
	//
	//	vals, err := client.ZRangeWithScores(ctx, "zset", 0, -1).Result()
	//	Expect(err).NotTo(HaveOccurred())
	//	Expect(vals).To(Equal([]redis.


data: ByteArray, imageFormat: Int) {
            }

            override fun onTakePicture(data: ByteArray?, bitmap: Bitmap?, imageFormat: Int) {
                lifecycleScope.launch(Dispatchers.IO) {
                    val path =
                        requireActivity().externalCacheDir?.absolutePath + File.separator + System.currentTimeMillis() + ".jpg"
                    val result = CameraManager.saveBitmap2File(
                        bitmap,
                        path
                    )
                    val msg = if (result) {
                        "保存成功：$path"
                    } else {
                        "保存失败"
                    }
                    toast(msg)
                    log(msg)
                    launch(Dispatchers.Main) {
                        mBinding.ivPreviewPic.load(path)
                    }
                }
            }
        })
    }

    override fun onDestroy() {
        super.onDestroy()
        CameraManager.closeCamera()
        CameraManager.release()
    }
}

class Camera2ViewModel() : BaseViewModel() {
    override fun init() {

    }
}package app.allever.android.lib.widget.recycler

import android.graphics.Bitmap
import android.graphics.Paint
import android.graphics.Typeface
import android.graphics.drawable.Drawable
import android.text.util.Linkify
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.*
import androidx.annotation.IdRes
import androidx.collection.SparseArrayCompat
import androidx.recyclerview.widget.RecyclerView
import app.allever.android.lib.core.app.App

open class BaseViewHolder(itemView: View) :
    RecyclerView.ViewHolder(itemView) {
    private val mViews: SparseArrayCompat<View> = SparseArrayCompat()

    fun <V : View> getView(@IdRes res: Int): V? {
        var v: View? = mViews.get(res)
        if (v == null) {
            v = itemView.findViewById(res)
            mViews.put(res, v)
        }
        return v as? V
    }

    /****以下为辅助方法 */

    /**
     * 设置TextView的值
     *
     * @param viewId
     * @param text
     * @return
     */
    fun setText(viewId: Int, text: String): BaseViewHolder {
        val view = getView<TextView>(viewId)
        view?.text = text
        return this
    }

    fun setImageResource(viewId: Int, resId: Int): BaseViewHolder {
        val view = getView<ImageView>(viewId)
        view?.setImageResource(resId)
        return this
    }

    fun setImageBitmap(viewId: Int, bitmap: Bitmap): BaseViewHolder {
        val view = getView<ImageView>(viewId)
        view?.setImageBitmap(bitmap)
        return this
    }

    fun setImageDrawable(viewId: Int, drawable: Drawable): BaseViewHolder {
        val view = getView<ImageView>(viewId)
        view?.setImageDrawable(drawable)
        return this
    }

    fun setBackgroundColor(viewId: Int, color: Int): BaseViewHolder {
        val view = getView<View>(viewId)
        view?.setBackgroundColor(color)
        return this
    }

    fun setBackgroundRes(viewId: Int, backgroundRes: Int): BaseViewHolder {
        val view = getView<View>(viewId)
        view?.setBackgroundResource(backgroundRes)
        return this
    }

    fun setTextColor(viewId: Int, textColor: Int): BaseViewHolder {
        val view = getView<TextView>(viewId)
        view?.setTextColor(textColor)
        return this
    }

    fun setTextColorRes(viewId: Int, textColorRes: Int): BaseViewHolder {
        val view = getView<TextView>(viewId)
        view?.setTextColor(App.context.resources.getColor(textColorRe


/*
 * Copyright 2015, Michael Neuling, IBM Corp.
 * Licensed under GPLv2.
 *
 * Original: Michael Neuling 4/12/2013
 * Edited: Rashmica Gupta 4/12/2015
 *
 * See if the altivec state is leaked out of an aborted transaction due to
 * kernel vmx copy loops.
 *
 * When the transaction aborts, VSR values should rollback to the values
 * they held before the transaction commenced. Using VSRs while transaction
 * is suspended should not affect the checkpointed values.
 *
 * (1) write A to a VSR
 * (2) start transaction
 * (3) suspend transaction
 * (4) change the VSR to B
 * (5) trigger kernel vmx copy loop
 * (6) abort transaction
 * (7) check that the VSR value is A
 */

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <string.h>
#include <assert.h>

#include "tm.h"
#include "utils.h"

int test_vmxcopy()
{
	long double vecin = 1.3;
	long double vecout;
	unsigned long pgsize = getpagesize();
	int i;
	int fd;
	int size = pgsize*16;
	char tmpfile[] = "/tmp/page_faultXXXXXX";
	char buf[pgsize];
	char *a;
	uint64_t aborted = 0;

	SKIP_IF(!have_htm());

	fd = mkstemp(tmpfile);
	assert(fd >= 0);

	memset(buf, 0, pgsize);
	for (i = 0; i < size; i += pgsize)
		assert(write(fd, buf, pgsize) == pgsize);

	unlink(tmpfile);

	a = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
	assert(a != MAP_FAILED);

	asm __volatile__(
		"lxvd2x 40,0,%[vecinptr];"	/* set 40 to initial value*/
		"tbegin.;"
		"beq	3f;"
		"tsuspend.;"
		"xxlxor 40,40,40;"		/* set 40 to 0 */
		"std	5, 0(%[map]);"		/* cause kernel vmx copy page */
		"tabort. 0;"
		"tresume.;"
		"tend.;"
		"li	%[res], 0;"
		"b	5f;"

		/* Abort handler */
		"3:;"
		"li	%[res], 1;"

		"5:;"
		"stxvd2x 40,0,%[vecoutptr];"
		: [res]"=r"(aborted)
		: [vecinptr]"r"(&vecin),
		  [vecoutptr]"r"(&vecout),
		  [map]"r"(a)
		: "memory", "r0", "r3", "r4", "r5", "r6", "r7");

	if (aborted && (vecin != vecout)){
		printf("FAILED: vector state leaked on abort %f != %f\n",
		       (double)vecin, (double)vecout);
		return 1;
	}

	munmap(a, size);

	close(fd);

	return 0;
}

int main(void)
{
	return test_harness(test_vmxcopy, "tm_vmxcopy");
}


0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});D.displayName="CloudUpload";var B=c.forwardRef(function(e,s){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(C,b({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:s}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});B.displayName="Error";const V=d("section",{target:"e16xj5sw0"})(({isDisabled:e,theme:s})=>({display:"flex",alignItems:"center",padding:s.spacing.lg,backgroundColor:s.colors.secondaryBg,borderRadius:s.radii.default,border:s.colors.widgetBorderColor?`${s.sizes.borderWidth} solid ${s.colors.widgetBorderColor}`:void 0,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${s.colors.primary}`},color:e?s.colors.gray:s.colors.bodyText})),P=d("div",{target:"e16xj5sw1"})({marginRight:"auto",alignItems:"center",display:"flex"}),L=d("span",{target:"e16xj5sw2"})(({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg})),Fe=d("span",{target:"e16xj5sw3"})(({theme:e})=>({marginBottom:e.spacing.twoXS})),Se=d("div",{target:"e16xj5sw4"})({display:"flex",flexDirection:"column"}),j=d("div",{target:"e16xj5sw5"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),ye=d("ul",{target:"e16xj5sw6"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),E=d("li",{target:"e16xj5sw7"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),A=d("div",{target:"e16xj5sw8"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),W=d("div",{target:"e16xj5sw9"})(({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),k=d("div",{target:"e16xj5sw10"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),xe=d("span",{tar