  return getExpressionClassName(expression, tc) === "BuidlerError";
}
import Triangle, {CLASSIFY_BACK, CLASSIFY_COPLANAR, CLASSIFY_FRONT, CLASSIFY_SPANNING} from './Triangle';
import {Vector3} from 'three';

describe('Triangle', () => {
    describe('constructor', () => {
        it('sets vertices and w', () => {
            const a = new Vector3(0, 0, 5);
            const b = new Vector3(-1, 1, 5);
            const c = new Vector3(-2, 0, 5);

            const triangle = new Triangle(a, b, c);
            expect(triangle.a).not.toBe(a);
            expect(triangle.a).toEqual(a);

            expect(triangle.b).not.toBe(b);
            expect(triangle.b).toEqual(b);

            expect(triangle.c).not.toBe(c);
            expect(triangle.c).toEqual(c);

            expect(triangle.normal).toEqual({x: 0, y: 0, z: 1});
            expect(triangle.w).toEqual(5);
        });
    });

    describe('classifyPoint', () => {
        it('classifies coplanar points', () => {
            const triangle = new Triangle(
                new Vector3(-3, 0, 1),
                new Vector3(-3, 1, 0),
                new Vector3(-3, 0, -1)
            );

            expect(triangle.classifyPoint(new Vector3( -3, 0.5, 0.5 ))).toBe(CLASSIFY_COPLANAR);
            expect(triangle.classifyPoint(new Vector3( -3, -700, 5 ))).toBe(CLASSIFY_COPLANAR);
            expect(triangle.classifyPoint(triangle.a)).toBe(CLASSIFY_COPLANAR);
            expect(triangle.classifyPoint(triangle.b)).toBe(CLASSIFY_COPLANAR);
            expect(triangle.classifyPoint(triangle.c)).toBe(CLASSIFY_COPLANAR);
        });

        it('classifies front points', () => {
            const triangle = new Triangle(
                new Vector3(2, -3, 0),
                new Vector3(0, -3, 1),
                new Vector3(-1, -3, 0)
            );

            expect(triangle.classifyPoint(new Vector3( 0, -6, 0.5 ))).toBe(CLASSIFY_FRONT);
            expect(triangle.classifyPoint(new Vector3( 200, -3.0001, -400 ))).toBe(CLASSIFY_FRONT);
        });

        it('classifies back points', () => {
            const triangle = new Triangle(
                new Vector3(-1, -3, 0),
                new Vector3(0, -3, 1),
                new Vector3(-2, -3, 0)
            );

            expect(triangle.classifyPoint(new Vector3( 0, 6, 0.5 ))).toBe(CLASSIFY_BACK);
            expect(triangle.classifyPoint(new Vector3( 200, -2.9999, -400 ))).toBe(CLASSIFY_BACK);
        });
    });

    describe('classifySide', () => {
        it('classifies as coplanar', () => {
            const triangleA = new Triangle(
                new Vector3(1, 0, 0),
                new Vector3(0, 1, 0),
                new Vector3(-1, 0, 0)
            );
            const triangleB = new Triangle(
                new Vector3(5, -4, 0),
                new Vector3(3, -8, 0),
                new Vector3(2, -2, 0)
            );

            expect(triangleA.classifySide(triangleB)).toBe(CLASSIFY_COPLANAR);
        });

        it('classifies as front', () => {
            const triangleA = new Triangle(
                new Vector3(1, 0, 0),
                new Vector3(0, 1, 0),
                new Vector3(-1, 0, 0)
            );
            const triangleB = new Triangle(
                new Vector3(1, 0, 1.5),
                new Vector3(0, 1, 1),
                new Vector3(-1, 0, 2)
            );


l")
         stdout.shouldNotContain("mylabel2")
         stdout.shouldNotContain("Statistics:")
         stdout.shouldNotContain("1000 iterations")
      }

      test("withCoveragePercentage should fail if coverage % is not sufficient") {
         shouldThrowAny {
            withCoveragePercentage(RoundingMode.HALF_UP, 30.0) {
               checkAll(PropTestConfig(seed = 1), Arb.enum<RoundingMode>()) {
                  collect(it)
               }
            }
         }.message.shouldContain("Required coverage of 30.0% for [HALF_UP] but was [12%]")
      }

      test("withCoveragePercentages should fail if coverage % is not sufficient") {
         shouldThrowAny {
            withCoveragePercentages(mapOf(RoundingMode.HALF_UP to 2.0, RoundingMode.FLOOR to 30.0)) {
               checkAll(PropTestConfig(seed = 1), Arb.enum<RoundingMode>()) {
                  collect(it)
               }
            }
         }.message.shouldContain("Required coverage of 30.0% for [FLOOR] but was [13%]")
      }

      test("withCoverageCount should fail if coverage number is not sufficient") {
         shouldThrowAny {
            withCoverageCount(RoundingMode.HALF_UP, 200) {
               checkAll(PropTestConfig(seed = 1), Arb.enum<RoundingMode>()) {
                  collect(it)
               }
            }
         }.message.shouldContain("Required coverage of 200 for [HALF_UP] but was [125]")
      }

      test("withCoverageCounts should fail if coverage number is not sufficient") {
         shouldThrowAny {
            withCoverageCounts(mapOf(RoundingMode.HALF_UP to 44, RoundingMode.FLOOR to 200)) {
               checkAll(PropTestConfig(seed = 1), Arb.enum<RoundingMode>()) {
                  collect(it)
               }
            }
         }.message.shouldContain("Required coverage of 200 for [FLOOR] but was [137]")
      }

      test("withCoverageCounts should pass for sufficient coverage number") {
         withCoverageCounts(mapOf(RoundingMode.HALF_UP to 75, RoundingMode.FLOOR to 75)) {
            checkAll(PropTestConfig(seed = 1), Arb.enum<RoundingMode>()) {
               collect(it)
            }
         }
      }
   }
}
@file:Suppress("DEPRECATION")

package io.kotest.data

fun <A> row(a: A) = Row1(a)
fun <A, B> row(a: A, b: B) = Row2(a, b)
fun <A, B, C> row(a: A, b: B, c: C) = Row3(a, b, c)
fun <A, B, C, D> row(a: A, b: B, c: C, d: D) = Row4(a, b, c, d)
fun <A, B, C, D, E> row(a: A, b: B, c: C, d: D, e: E) = Row5(a, b, c, d, e)
fun <A, B, C, D, E, F> row(a: A, b: B, c: C, d: D, e: E, f: F) = Row6(a, b, c, d, e, f)
fun <A, B, C, D, E, F, G> row(a: A, b: B, c: C, d: D, e: E, f: F, g: G) = Row7(a, b, c, d, e, f, g)
fun <A, B, C, D, E, F, G, H> row(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H) = Row8(a, b, c, d, e, f, g, h)
fun <A, B, C, D, E, F, G, H, I> row(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I) = Row9(a, b, c, d, e, f, g, h, i)
fun <A, B, C, D, E, F, G, H, I, J> row(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J) = Row10(a, b, c, d, e, f, g, h, i, j)
fun <A, B, C, D, E, F, G, H, I, J, K> row(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K) = Row11(a, b, c, d, e, f, g, h,


// RISC-V Architectural Validation Test C-ADDI4SPN-01
//
//
// Copyright (c) 2005-2023 Imperas Software Ltd., www.imperas.com
//
// The contents of this file are provided under the Software License
// Agreement that you accepted before downloading this file.
//
// This source forms part of the Software and can be used for educational,
// training, and demonstration purposes but cannot be used for derivative
// works except in cases where the derivative works require OVP technology
// to run.
//
// For open source models released under licenses that you can use for
// derivative works, please visit www.OVPworld.org or www.imperas.com
// for the location of the open source models.
//

//
// Specification: C Standard Extension for Compressed Integer Instructions
// Description: Testing instruction 'c.addi4spn'.

#include "model_test.h"
#include "arch_test.h"
RVTEST_ISA("RV32C")

.section .text.init
.globl rvtest_entry_point
rvtest_entry_point:
RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1

    RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*C.*);def TEST_CASE_1=True;",c.addi4spn)
    RVTEST_CASE(1,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*Zca.*);def TEST_CASE_1=True;",c.addi4spn)

    RVTEST_SIGBASE(x1,signature_1_0)

        # Testcase 0:  rd:x11(0x54f4aeeb), imm:0x9c, result rd:x11(0x54f4af87)
    #li x11, 0x54f4aeeb
    li x2, 0x54f4aeeb
    c.addi4spn x11, x2, 0x9c
    sw x11, 0(x1)
    RVMODEL_IO_ASSERT_GPR_EQ(x3, x11, 0x54f4af87)
        # Testcase 1:  rd:x12(0xe1b1199b), imm:0x144, result rd:x12(0xe1b11adf)
    #li x12, 0xe1b1199b
    li x2, 0xe1b1199b
    c.addi4spn x12, x2, 0x144
    sw x12, 4(x1)
    RVMODEL_IO_ASSERT_GPR_EQ(x3, x12, 0xe1b11adf)
        # Testcase 2:  rd:x14(0xb26566a0), imm:0x194, result rd:x14(0xb2656834)
    #li x14, 0xb26566a0
    li x2, 0xb26566a0
    c.addi4spn x14, x2, 0x194
    sw x14, 8(x1)
    RVMODEL_IO_ASSERT_GPR_EQ(x3, x14, 0xb2656834)
        # Testcase 3:  rd:x12(0xf27008e6), imm:0x190, result rd:x12(0xf2700a76)
    #li x12, 0xf27008e6


 channels, and always open the error channel
	channels := make([]wsstream.ChannelType, 5)
	channels[remotecommand.StreamStdIn] = readChannel(opts.stdin)
	channels[remotecommand.StreamStdOut] = writeChannel(opts.stdout)
	channels[remotecommand.StreamStdErr] = writeChannel(opts.stderr)
	channels[remotecommand.StreamErr] = wsstream.WriteChannel
	channels[remotecommand.StreamResize] = wsstream.ReadChannel
	return channels
}

// readChannel returns wsstream.ReadChannel if real is true, or wsstream.IgnoreChannel.
func readChannel(real bool) wsstream.ChannelType {
	if real {
		return wsstream.ReadChannel
	}
	return wsstream.IgnoreChannel
}

// writeChannel returns wsstream.WriteChannel if real is true, or wsstream.IgnoreChannel.
func writeChannel(real bool) wsstream.ChannelType {
	if real {
		return wsstream.WriteChannel
	}
	return wsstream.IgnoreChannel
}

// createWebSocketStreams returns a "channels" struct containing the websocket connection and
// streams needed to perform an exec or an attach.
func createWebSocketStreams(req *http.Request, w http.ResponseWriter, opts *options) (*websocketStreams, error) {
	channels := createChannels(opts)
	conn := wsstream.NewConn(map[string]wsstream.ChannelProtocolConfig{
		remotecommand.StreamProtocolV5Name: {
			Binary:   true,
			Channels: channels,
		},
	})
	conn.SetIdleTimeout(4 * time.Hour)
	// Opening the connection responds to WebSocket client, negotiating
	// the WebSocket upgrade connection and the subprotocol.
	_, streams, err := conn.Open(w, req)
	if err != nil {
		return nil, err
	}

	// Send an empty message to the lowest writable channel to notify the client the connection is established
	//nolint:errcheck
	switch {
	case opts.stdout:
		streams[remotecommand.StreamStdOut].Write([]byte{})
	case opts.stderr:
		streams[remotecommand.StreamStdErr].Write([]byte{})
	default:
		streams[remotecommand.StreamErr].Write([]byte{})
	}

	wsStreams := &websocketStreams{
		conn:         conn,
		stdinStream:  streams[remotecommand.StreamStdIn],
		stdoutStream: streams[remotecommand.StreamStdOut],
		stderrStream: streams[remotecommand.StreamStdErr],
		tty:          opts.tty,
		resizeStream: streams[remotecommand.StreamResize],
	}

	wsStreams.writeStatus = func(stream io.Writer) func(status *apierrors.StatusError) error {
		return func(status *apierrors.StatusError) error {
			bs, err := json.Marshal(status.Status())
			if err != nil {
				return err
			}
			_, err = stream.Write(bs)
			return err
		}
	}(streams[remotecommand.StreamErr])

	return wsStreams, nil
}

func TestWebSocketClient_ProxySucceeds(t *testing.T) {
	// Validate websocket proxy succeeds for each of the enumerated schemes.
	proxySchemes := []string{"http", "https"}
	for _, proxyScheme := range proxySchemes {
		// Create the proxy handler, keeping track of how many times it was called.
		var proxyCalled atomic.Int64
		proxyHandler := utilnettesting.NewHTTPProxyHandler(t, func(req *http.Request) bool {
			proxyCalled.Add(1)
			return true
		})
		defer proxyHandler.Wait()
		// Create/Start the proxy server, adding TLS functionality depending on scheme.
		proxyServer := httptest.NewUnstartedServer(proxyHandler)
		if proxyScheme == "https" {
			cert, err := tls.X509KeyPair(localhostCert, localhostKey)
			if err != ni


=82735. It
// makes using zeroupper a little tricky.

#include "pch.h"
#include "config.h"

#include "lsh.h"
#include "misc.h"

#if defined(CRYPTOPP_SSSE3_AVAILABLE) && defined(CRYPTOPP_ENABLE_64BIT_SSE)

#if defined(CRYPTOPP_SSSE3_AVAILABLE)
# include <emmintrin.h>
# include <tmmintrin.h>
#endif

#if defined(CRYPTOPP_XOP_AVAILABLE)
# include <ammintrin.h>
#endif

// GCC at 4.5. Clang is unknown. Also see https://stackoverflow.com/a/42493893.
#if (CRYPTOPP_GCC_VERSION >= 40500)
# include <x86intrin.h>
#endif

ANONYMOUS_NAMESPACE_BEGIN

/* LSH Constants */

const unsigned int LSH512_MSG_BLK_BYTE_LEN = 256;
// const unsigned int LSH512_MSG_BLK_BIT_LEN = 2048;
// const unsigned int LSH512_CV_BYTE_LEN = 128;
const unsigned int LSH512_HASH_VAL_MAX_BYTE_LEN = 64;

// const unsigned int MSG_BLK_WORD_LEN = 32;
const unsigned int CV_WORD_LEN = 16;
const unsigned int CONST_WORD_LEN = 8;
// const unsigned int HASH_VAL_MAX_WORD_LEN = 8;
const unsigned int NUM_STEPS = 28;

const unsigned int ROT_EVEN_ALPHA = 23;
const unsigned int ROT_EVEN_BETA = 59;
const unsigned int ROT_ODD_ALPHA = 7;
const unsigned int ROT_ODD_BETA = 3;

const unsigned int LSH_TYPE_512_512 = 0x0010040;
const unsigned int LSH_TYPE_512_384 = 0x0010030;
const unsigned int LSH_TYPE_512_256 = 0x0010020;
const unsigned int LSH_TYPE_512_224 = 0x001001C;

// const unsigned int LSH_TYPE_384 = LSH_TYPE_512_384;
// const unsigned int LSH_TYPE_512 = LSH_TYPE_512_512;

/* Error Code */

const unsigned int LSH_SUCCESS = 0x0;
// const unsigned int LSH_ERR_NULL_PTR = 0x2401;
// const unsigned int LSH_ERR_INVALID_ALGTYPE = 0x2402;
const unsigned int LSH_ERR_INVALID_DATABITLEN = 0x2403;
const unsigned int LSH_ERR_INVALID_STATE = 0x2404;

/* Index into our state array */

const unsigned int AlgorithmType = 80;
const unsigned int RemainingBits = 81;

NAMESPACE_END

NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(LSH)

// lsh512.cpp
extern const word64 LSH512_IV224[CV_WORD_LEN];
extern const word64 LSH512_IV256[CV_WORD_LEN];
extern const word64 LSH512_IV384[CV_WORD_LEN];
extern const word64 LSH512_IV512[CV_WORD_LEN];
extern const word64 LSH512_StepConstants[CONST_WORD_LEN * NUM_STEPS];

NAMESPACE_END  // LSH
NAMESPACE_END  // Crypto++

ANONYMOUS_NAMESPACE_BEGIN

using CryptoPP::byte;
using CryptoPP::word32;
using CryptoPP::word64;
using CryptoPP::rotlFixed;
using CryptoPP::rotlConstant;


//
//  TMAPIRequestKeys.h
//  Orangina
//
//  Created by Coulton Vento on 7/14/15.
//  Copyright (c) 2015 Tumblr. All rights reserved.
//

extern NSString * const TMAPIRequestLimitKey;
extern NSString * const TMAPIRequestBeforeKey;
extern NSString * const TMAPIRequestTrueKey;
extern NSString * const TMAPIRequestFalseKey;

// Conversations
extern NSString * const TMAPIRequestConversationIdKey;
extern NSString * const TMAPIRequestConversationBeforeKey;
extern NSString * const TMAPIRequestParticipantKey;
extern NSString * const TMAPIRequestMessageKey;
extern NSString * const TMAPIRequestMessageTypeKey;
extern NSString * const TMAPIRequestMessageTypeTextKey;
extern NSString * const TMAPIRequestParticipantSuggestionsQueryKey;
extern NSString * const TMAPIRequestIncludeRecentKey;

extern NSString * const TMAPIRequestPostIDKey;
extern NSString * const TMAPIRequestBlogIdentifierKey;
extern NSString * const TMAPIRequestContext;
extern NSString * const TMAPIRequestMessageTypePostKey;
extern NSString * const TMAPIRequestFormKeyName;


�瀚的互联网中筛选出最相关的结果。

- **精确匹配 (`" "`)**
    - **作用**：将关键词放在英文双引号内，搜索引擎会返回与引号内词语完全匹配的结果，顺序和词语都不会改变。
    - **示例**：直接搜索 `项目管理案例` 可能会返回包含“项目”、“管理”或“案例”的零散信息。而搜索 `"项目管理案例"` 则会确保结果中这几个字是连在一起的。

- **站内搜索 (`site:`)**
    - **作用**：限定在特定网站内进行搜索。当你确定某个网站（如政府官网、知名大学网站、专业论坛）含有你需要的权威信息时，这个指令非常有用。
    - **示例**：想在知乎上查找关于“信息管理”专业的就业前景，可以搜索 `信息管理与信息系统好未来就业吗？ site:zhihu.com`。

- **文件类型 (`filetype:`)**
    - **作用**：筛选特定格式的文件。这对于寻找报告、电子书、演示文稿等非网页形式的资源尤其有效。
    - **示例**：需要一份 PDF 格式的《刑法》相关报告，可以搜索 `"刑法" filetype:pdf`。

- **排除关键词 (`-`)**
    - **作用**：在搜索结果中排除包含特定词语的页面。
    - **示例**：搜索 `Python教程 -视频`，可以过滤掉大部分视频教程，专注于寻找图文类内容。

- **通配符 (`*`)**
    - **作用**：星号 `*` 可以代表任何未知词语，常用于模糊搜索或补充不确定的关键词。
    - **示例**：如果你忘记了某句名言的完整说法，可以搜索 `"让人们更好的分享*找到自己的解答"`。

熟练组合使用这些指令，能极大地缩小检索范围，直达目标信息。

#### 二、一些实用的小网站

### Z-Library

Z-Library 是一个广受欢迎的数字图书馆，但也因其知名度而成为不法分子设置“钓鱼”或伪造网站的目标。直接在搜索引擎中搜索“Z-Library”并点击来源不明的链接是**极其危险**的。（我就有一次点错）

**重要提醒：关于版权与合法性的说明**

> 在讨论如何安全访问 Z-Libr


deviceptr<float> p1x1PoolingWeights_gpu = w_gpu.Ptr + _1x1Weights + _3x3Reduce1x1Weights + _3x3Weights + _5x5Reduce1x1Weights + _5x5Weights;
                            DnnInstance.ConvolutionBackwardData(1, Secondary1x1FilterDescription, p1x1PoolingWeights_gpu, Secondary1x1OutputDescription, dy_gpu.Ptr, _1x1ConvolutionDescription, dAlgo, workspace_gpu.Ptr, size, 0, PoolingOutputDescription, pooldy_gpu.Ptr);
                            DnnInstance.ActivationBackward(_PoolingZ.Entities, _PoolingZ.Length, pooly_gpu.Ptr, pooldy_gpu.Ptr, ActivationFunctions.ActivationPrime, pooldy_gpu.Ptr);
                        }

                        // Pooling backward
                        DnnInstance.PoolingBackward(PoolingDescription, 1, PoolingOutputDescription, pooly_gpu.Ptr, PoolingOutputDescription, pooldy_gpu.Ptr, InputDescription, x_gpu.Ptr, 1, InputDescription, dx_gpu.Ptr);

                        // 1x1 gradient
                        DnnInstance.GetConvolutionBackwardFilterAlgorithm(PoolingOutputDescription, Secondary1x1OutputDescription, _1x1ConvolutionDescription, Secondary1x1FilterDescription, ConvolutionBwdFilterPreference.PREFER_FASTEST, IntPtr.Zero, out ConvolutionBwdFilterAlgo wAlgo);
                        DnnInstance.GetConvolutionBackwardFilterWorkspaceSize(PoolingOutputDescription, Secondary1x1OutputDescription, _1x1ConvolutionDescription, Secondary1x1FilterDescription, wAlgo, out size);
                        using (DeviceMemory<float>
                            aPool_gpu = DnnInstance.Gpu.AllocateDevice(_PoolingA),
                            dw_gpu = DnnInstance.Gpu.AllocateDevice<float>(Secondary1x1Weights))
                        using (DeviceMemory<byte> workspace_gpu = DnnInstance.Gpu.AllocateDevice<byte>(size))
                        {
                            DnnInstance.ConvolutionBackwardFilter(1, PoolingOutputDescription, aPool_gpu.Ptr, Secondary1x1OutputDescription, dy_gpu.Ptr, _1x1ConvolutionDescription, wAlgo, workspace_gpu.Ptr, size, 0, Secondary1x1FilterDescription, dw_gpu.Ptr);
                            dw_gpu.CopyTo(dJdw, _1x1Weights + _3x3Reduce1x1Weights + _3x3Weights + _5x5Reduce1x1Weights + _5x5Weights, Secondary1x1Weights);
                        }

                        // Pooling 1x1 bias
                        using (DeviceMemory<float> db_gpu = DnnInstance.Gpu.AllocateDevice<float>(OperationInfo.Secondary1x1AfterPoolingConvolutionKernels))
                        {
                            DnnInstance.ConvolutionBackwardBias(1, Secondary1x1OutputDescri


[-3] = -86,
    [-4] = {},
    [-5] = -5,
    [-6] = -185,
    [-7] = -5,
    [-8] = -5,
    [-9] = -5,
    [-10] = -5,
    [-11] = -8,
    [-12] = -5,
    [-13] = -8,
    [-14] = -8,
    [-15] = -53,
    [-16] = -94,
    [-17] = {-152, -153},
    [-18] = {},
    [-19] = -5
  },
  [1105] = {
    [-1] = -283,
    [-2] = -284,
    [-3] = -48,
    [-4] = {},
    [-5] = -5,
    [-6] = -5,
    [-7] = -5,
    [-8] = -5,
    [-9] = -5,
    [-10] = -5,
    [-11] = -8,
    [-12] = -5,
    [-13] = -8,
    [-14] = -8,
    [-15] = -8,
    [-16] = -18,
    [-17] = {},
    [-18] = {},
    [-19] = -5
  },
  [1106] = {
    [-1] = -285,
    [-2] = -284,
    [-3] = -48,
    [-4] = {},
    [-5] = -5,
    [-6] = -5,
    [-7] = -5,
    [-8] = -5,
    [-9] = -5,
    [-10] = -5,
    [-11] = -8,
    [-12] = -5,
    [-13] = -8,
    [-14] = -8,
    [-15] = -8,
    [-16] = -18,
    [-17] = {},
    [-18] = {},
    [-19] = -5
  },
  [1107] = {
    [-1] = -286,
    [-2] = -284,
    [-3] = -48,
    [-4] = {},
    [-5] = -5,
    [-6] = -5,
    [-7] = -5,
    [-8] = -5,
    [-9] = -5,
    [-10] = -5,
    [-11] = -8,
    [-12] = -5,
    [-13] = -8,
    [-14] = -8,
    [-15] = -8,
    [-16] = -18,
    [-17] = {},
    [-18] = {},
    [-19] = -5
  },
  [874] = {
    [-1] = -287,
    [-2] = -284,
    [-3] = -48,
    [-4] = {},
    [-5] = -5,
    [-6] = -5,
    [-7] = -5,
    [-8] = -5,
    [-9] = -5,
    [-10] = -5,
    [-11] = -8,
    [-12] = -5,
    [-13] = -8,
    [-14] = -8,
    [-15] = -8,
    [-16] = -18,
    [-17] = {},
    [-18] = {},
    [-19] = -5
  }
}
local key_to_index_map = {
  id = -1,
  city = -2,
  type = -3,
  cityStory = -4,
  mountAvailable = -5,
  defaultTime = -6,
  timePassAvailable = -7,
  lobbyUsers = -8,
  sceneRebornTime = -9,
  exploreSwitch = -10,
  formationSence = -11,
  charge = -12,
  bgm = -13,
  amb = -14,
  artScene = -15,
  playModule = -16,
  feat


rtryId(GenericIdentification19 value) {
        this.prtryId = value;
        return this;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
    }

    @Override
    public boolean equals(Object that) {
        return EqualsBuilder.reflectionEquals(this, that);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

}

package com.prowidesoftware.swift.model.mx.dic;

import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlType;

/**
 *
Java class for Verification3Code.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
{@code
 * <simpleType name="Verification3Code">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="FAIL"/>
 *     <enumeration value="FUTA"/>
 *     <enumeration value="MISS"/>
 *     <enumeration value="NOSP"/>
 *     <enumeration value="NOVF"/>
 *     <enumeration value="OTHN"/>
 *     <enumeration value="OTHP"/>
 *     <enumeration value="PART"/>
 *     <enumeration value="SUCC"/>
 *     <enumeration value="ERRR"/>
 *   </restriction>
 * </simpleType>
 * }

 *
 */
@XmlType(name = "Verification3Code")
@XmlEnum
public enum Verification3Code {

    /**
     * Verification failed.
     *
     */
    FAIL,

    /**
     * Further action required.
     *
     */
    FUTA,

    /**
     * Information required to perform the verification was missing.
     *
     */
    MISS,

    /**
     * Not support the verification type
     *
     */
    NOSP,

    /**
     * Verification has not been performed.
     *
     */
    NOVF,

    /**
     * Other result of verification defined at national level.
     *
     */
    OTHN,

    /**
     * Other result of verification defined at private level.
     *
     */
    OTHP,

    /**
     * Verification was partially successful.
     *
     */
    PART,

    /**
     * Verification was successful.
     *
     */
    SUCC,

    /**
     * Device or entity to perform the verification was unavailable.
     *
     */
    ERRR;

    public String value() {
        return name();
    }

    public static Verification3Code fromValue(String v) {
        return valueOf(v);
    }

}

package com.prowidesoftware.swift.model.mx.dic;

import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlType;

/**
 *
Java class for TransactionChannel3Code.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
{@code
 * <simpleType name="TransactionChannel3Code">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="MAIL"/>
 *     <enumeration value="TLPH"/>
 *     <enumeration value="ECOM"/>
 *     <enumeration value="TVPY"/>
 *     <enumeration value="SECM"/>
 *     <enumeration value="MOBL"/>
 *   </restriction>
 * </simpleType>
 * }

 *
 */
@XmlType(name = "TransactionChannel3Code")
@XmlEnum
public enum TransactionChannel3Code {

    /**
     * Mail order.
     *
     */
    MAIL,

    /**
     * Telephone order.
     *
     */
    TLPH,

    /**
     * Electronic commerce.
     *
     */
    ECOM,


6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAyMSAxMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjEgMTAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIG9wYWNpdHk9IjAuMzYiIGZpbGw9IiM1RjczODIiIGQ9Ik0xNywyLjhoLTUuN2MtMC4zLDAtMC42LDAuMS0wLjgsMC40TDYuMiw4LjRDNS43LDksNi4xLDEwLDcsMTBoMTBjMC42LDAsMS0wLjQsMS0xVjMuOAoJCUMxOCwzLjMsMTcuNiwyLjgsMTcsMi44eiIvPgoJPHBhdGggZmlsbD0iI0RDRTZFQiIgZD0iTTAsMTBjMC43LDAsMS4zLTAuMywxLjctMC45bDYuOC04LjJDOC44LDAuMyw5LjUsMCwxMC4xLDBIMTljMS4xLDAsMiwwLjksMiwydjhMMCwxMEwwLDEweiIvPgoJPHBhdGggb3BhY2l0eT0iMC4zNiIgZmlsbD0iIzVGNzM4MiIgZD0iTTE3LjEsMi4zaC01LjdjLTAuMywwLTAuNiwwLjEtMC44LDAuNEw2LjMsNy45QzUuNyw4LjUsNi4yLDkuNSw3LDkuNWgxMGMwLjYsMCwxLTAuNCwxLTEKCQlWMy4zQzE4LjEsMi44LDE3LjYsMi4zLDE3LjEsMi4zeiIvPgo8L2c+Cjwvc3ZnPg==");
}

.poke-card__stats thead {
  display: none;
}

.poke-card__stats tbody {
  display: block;
}

.poke-card__stats tbody tr {
  overflow: hidden;
  display: block;
}

.poke-card__stats tbody td {
  display: block;
  float: left;
  padding: 0.15625em;
  margin: 0 0 0 0.1875em;
  width: calc(33.333% - 0.1875em);
  background: white;
  border-radius: 0.09375em;
}

.poke-card__stats tbody td span {
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-style: normal;
  display: block;
  font-size: 0.75em;
  line-height: 1;
  color: #28323c;
}

.poke-card__stats tbody td:before {
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-style: normal;
  display: block;
  font-size: 0.5625em;
  line-height: 1;
}

.poke-card__stats tbody td:nth-child(3n + 1) {
  width: 33.333%;
  margin-left: 0;
}

.poke-card__stats tbody td:nth-child(1n + 4) {
  margin-top: 0.1875em;
}

.poke-card__stats__hp:before {
  content: "HP";
  color: #46b4e6;
}

.poke-card__stats__atk:before {
  content: "ATK";
  color: #f05a6e;
}

.poke-card__stats__def:before {
  content: "DEF";
  color: #46b4aa;
}

.poke-card__stats__sp-atk:before {
  content: "SP. ATK";
  color: #f05a6e;
}

.poke-card__stats__sp-def:before {
  content: "S


               editGroup(it)
                    }
                }

                tvDel.setOnClickListener {
                    getItem(holder.layoutPosition)?.let {
                        viewModel.delGroup(it)
                    }
                }
            }
        }
    }

}package io.legado.app.ui.book.search

import android.app.Application
import android.os.Handler
import android.os.Looper
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import io.legado.app.base.BaseViewModel
import io.legado.app.constant.AppLog
import io.legado.app.data.appDb
import io.legado.app.data.entities.SearchBook
import io.legado.app.data.entities.SearchKeyword
import io.legado.app.help.book.isNotShelf
import io.legado.app.help.config.AppConfig
import io.legado.app.model.webBook.SearchModel
import io.legado.app.utils.ConflateLiveData
import io.legado.app.utils.toastOnUi
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.mapLatest
import java.util.concurrent.ConcurrentHashMap

@OptIn(ExperimentalCoroutinesApi::class)
class SearchViewModel(application: Application) : BaseViewModel(application) {
    val handler = Handler(Looper.getMainLooper())
    val bookshelf: MutableSet<String> = ConcurrentHashMap.newKeySet()
    val upAdapterLiveData = MutableLiveData<String>()
    var searchBookLiveData = ConflateLiveData<List<SearchBook>>(1000)
    val searchScope: SearchScope = SearchScope(AppConfig.searchScope)
    var searchFinishLiveData = MutableLiveData<Boolean>()
    var isSearchLiveData = MutableLiveData<Boolean>()
    var searchKey: String = ""
    var hasMore = true
    private var searchID = 0L
    private val searchModel = SearchModel(viewModelScope, object : SearchModel.CallBack {

        override fun getSearchScope(): SearchScope {
            return searchScope
        }

        override fun onSearchStart() {
            isSearchLiveData.postValue(true)
        }

        override fun onSearchSuccess(searchBooks: List<SearchBook>) {
            searchBookLiveData.postValue(searchBooks)
        }

        override fun onSearchFinish(isEmpty: Boolean, hasMore: Boolean) {
            this@SearchViewModel.hasMore = hasMore
            isSearchLiveData.postValue(false)
            searchFinishLiveData.postValue(isEmpty)
        }

        override fun onSearchCancel(exception: Throwable?) {
            isSearchLiveData.postValue(false)
            exception?.let {
                context.toastOnUi(it.localizedMessage)
            }
        }

    })

    init {
        execute {
            appDb.bookDao.flowAll().mapLatest { books ->
                val keys = arrayListOf<String>()
                books.filterNot { it.isNotShelf }
                    .forEach {
                        keys.add("${it.name}-${it.author}")
                        keys.add(it.name)
                    }
                keys
            }.catch {
                AppLog.put("搜索界面获取书籍列表失败\n${it.localizedMessage}", it)
            }.collect {
                bookshelf.clear()
                bookshelf.addAll(it)
                upAdapterLiveData.postValue("isInBookshelf")
            }
        }.onError {
            AppLog.put("加载书架数据失败", it)
        }
    }

    fun isInBookShelf(name: String, author: String): Boolean {
        return if (author.isNotBlank()) {
            bookshelf.contains("$name-$author")
        } else {
            bookshelf.contains(name)
        }
    }

    /**
     * 开始搜索
     */
    fun search(key: String) {
        execute {
            if ((searchKey == key) || key.isNotEmpty()) {
                searchModel.cancelSearch()


の突くようにたたきつける'],
  ['whip hand', '支配的地位,権力'],
  ['whip round', '《英》寄付集め,募金'],
  ['whipcord', 'むち縄,強くよったひも / あやうね織物'],
  ['whiplash', '〈C〉むち先,むちひも / 〈U〉ぎょっとすること / 〈U〉(また whiplash injury)むち打ち症 / ‘を\'むち打って励ます'],
  ['whipper-in', '(キツネ狩りの)猟犬係'],
  ['whippersnapper', 'こしゃくなやつ,生意気な若僧'],
  ['whippet', 'ホイペット(小型の競走犬)'],
  ['whipping', 'むちで打つこと,むち打ちの刑'],
  ['whipping boy', '(昔)貴族の子に代わって罰を受けた子供 / (他人の罪を負う)身代り'],
  ['whipping top', 'むちごま(むちで回すこま)'],
  ['whippletree', '=whiffletree'],
  ['whippoorwill', '(北米産の)ヨタカの一種'],
  ['whippy', '(茎・枝・棒などが)しなやかな,弾力性のある'],
  ['whipsaw', '糸のこぎり / (二人用の)細身の縦びきのこぎり'],
  ['whipt', 'whip の過去・過去分詞'],
  ['whir, whirr', '(モーター,扇風機などの)ブンブン回る音;ヒューヒュー飛ぶ音 / ブンブン回る(音を立てる);ヒューと飛ぶ'],
  ['whirl', '『ぐるぐる回る』,旋回する,渦巻く / 《方向を表す副詞[句]を伴って》く人・動物などが〉『急に向きを変える』 / 《方向・状態を表す副詞[句]を伴って》〈人・車などが〉『疾走する』 / 〈頭などが〉くらくらする,めまいがする / …‘を\'『ぐるぐる回す』,旋回させる,渦巻かせる / 《方向・状態を表す副詞[句]を伴って》…‘を\'さっと運ぶ / 回転,旋回;渦《+of+名》 / 〈U〉《しばしば a whirl》(心などの)乱れ,混乱 / 〈C〉《単数形で》(事件・会合などの)めまぐるしい連続《+of+名》'],
  ['whirligig', '〈C〉回転おもちゃ(こま・風車など) / 〈C〉回転木馬 / 〈U〉〈C〉回転運動;変転'],
  ['whirlpool', '(水流の)渦,渦巻き(eddy)'],
  ['whirlwind', '旋風,つむじ風'],


, packed)]
#[derive(Default, Copy, Clone)]
pub struct hv_x64_interrupt_state_register__bindgen_ty_1 {
    pub _bitfield_align_1: [u8; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_interrupt_state_register__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<hv_x64_interrupt_state_register__bindgen_ty_1>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(hv_x64_interrupt_state_register__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<hv_x64_interrupt_state_register__bindgen_ty_1>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(hv_x64_interrupt_state_register__bindgen_ty_1)
        )
    );
}
impl hv_x64_interrupt_state_register__bindgen_ty_1 {
    #[inline]
    pub fn interrupt_shadow(&self) -> __u64 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
    }
    #[inline]
    pub fn set_interrupt_shadow(&mut self, val: __u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn nmi_masked(&self) -> __u64 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
    }
    #[inline]
    pub fn set_nmi_masked(&mut self, val: __u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved(&self) -> __u64 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 62u8) as u64) }
    }
    #[inline]
    pub fn set_reserved(&mut self, val: __u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            self._bitfield_1.set(2usize, 62u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        interrupt_shadow: __u64,
        nmi_masked: __u64,
        reserved: __u64,
    ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let interrupt_shadow: u64 = unsafe { ::std::mem::transmute(interrupt_shadow) };
            interrupt_shadow as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let nmi_masked: u64 = unsafe { ::std::mem::transmute(nmi_masked) };
            nmi_masked as u64
        });
        __bindgen_bitfield_unit.set(2usize, 62u8, {
            let reserved: u64 = unsafe { ::std::mem::transmute(reserved) };
            reserved as u64
        });
        __bindgen_bitfield_unit
    }
}
#[test]
fn bindgen_test_layout_


 = setting.volume
    }
  }

  public static saveToStorage() {
    const setting = {
      pauseOnMenu: this.pauseOnMenu,
      muteOnInactive: this.muteOnInactive,
      volume: this.volume,
    }
    StorageUtil.putObject(KEY_SETTING, setting)
  }
}
/* eslint-disable @typescript-eslint/ban-ts-comment */
//@ts-nocheck
import { BasketCheckout } from '../types/baskets';
import Basket from '../models/basket';
import DiscountController from './discounts';

export default class BasketController {
  async createBasket(): Promise<Basket> {
    const basket = {
      totalPrice: 0,
      creationDate: new Date(),
    };
    return await Basket.query().insert(basket);
  }

  async deleteBasket(id: string): Promise<void> {
    await Basket.query().deleteById(id);
  }

  async addProductToBasket(
    basketId: string,
    itemId: string,
    itemsQuantity: number
  ): Promise<void> {
    const basket = await Basket.query().findById(basketId);
    await basket.$relatedQuery('items').relate({
      id: itemId,
      itemsQuantity,
    });
  }

  async checkoutBasket(basketId: string): Promise<BasketCheckout> {
    const discountController = new DiscountController();
    const basket = await Basket.query().findById(basketId);
    const items = await basket.$relatedQuery('items');

    let basketTotalPrice = 0;
    let basketTotalDiscounts = 0;

    items.forEach(async (item) => {
      const { itemsQuantity, ...itemAtts } = item;
      const discountValue = await discountController.getDiscountByProduct(
        itemAtts,
        itemsQuantity
      );
      basketTotalPrice += itemAtts.price * itemsQuantity - discountValue;
      basketTotalDiscounts += discountValue;
    });

    await basket.$query().patch({ totalPrice: basketTotalPrice });

    return {
      discounts: basketTotalDiscounts,
      totalPrice: basketTotalPrice,
    };
  }
}
import * as React from 'react';

export type NavItemChildren = React.ReactNode[] | React.ReactNode | string;

export interface NavItemProps {
  children?: NavItemChildren;
  title: string;
  link?: string;
  current?: boolean;
  asLink?: React.ReactElement<any>;
  onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>)=>any;
  /**
     * @ignore
     */
  path?: string;
}

declare const NavItem: React.FC<NavItemProps>;

export default NavItem;
export class pokeType {
    slot: number;
    name: string;
    color: string;
    colorMapper: Map<string, string> = new Map([
        ['electric', 'gold'],
        ['flying', 'plum'],
        ['fire', 'orange'],
        ['ice', 'skyblue'],
        ['water', 'dodgerblue'],
        ['grass', 'limegreen'],
        ['fighting', 'darkred'],
        ['poison', 'darkmagenta'],
        ['normal', 'tan'],
        ['ground', 'navajowhite'],
        ['psychic', 'hotpink'],
        ['bug', 'olivedrab'],
        ['rock', 'darkgoldenrod'],
        ['ghost', 'rebeccapurple'],
        ['dark', 'dimgrey'],
        ['dragon', 'slateblue'],
        ['steel', 'gainsboro'],
        ['fairy', 'pink'],
    ]);
    public constructor(name: string) {
        this.name = name;


"    orm:"addons_name"    description:"插件名称"`
	OrderSn       string      `json:"orderSn"       orm:"order_sn"       description:"关联订单号"`
	OrderGroup    string      `json:"orderGroup"    orm:"order_group"    description:"组别[默认统一支付类型]"`
	Openid        string      `json:"openid"        orm:"openid"         description:"openid"`
	MchId         string      `json:"mchId"         orm:"mch_id"         description:"商户支付账户"`
	Subject       string      `json:"subject"       orm:"subject"        description:"订单标题"`
	Detail        *gjson.Json `json:"detail"        orm:"detail"         description:"支付商品详情"`
	AuthCode      string      `json:"authCode"      orm:"auth_code"      description:"刷卡码"`
	OutTradeNo    string      `json:"outTradeNo"    orm:"out_trade_no"   description:"商户订单号"`
	TransactionId string      `json:"transactionId" orm:"transaction_id" description:"交易号"`
	PayType       string      `json:"payType"       orm:"pay_type"       description:"支付类型"`
	PayAmount     float64     `json:"payAmount"     orm:"pay_amount"     description:"支付金额"`
	ActualAmount  float64     `json:"actualAmount"  orm:"actual_amount"  description:"实付金额"`
	PayStatus     int         `json:"payStatus"     orm:"pay_status"     description:"支付状态"`
	PayAt         *gtime.Time `json:"payAt"         orm:"pay_at"         description:"支付时间"`
	TradeType     string      `json:"tradeType"     orm:"trade_type"     description:"交易类型"`
	RefundSn      string      `json:"refundSn"      orm:"refund_sn"      description:"退款单号"`
	IsRefund      int         `json:"isRefund"      orm:"is_refund"      description:"是否退款"`
	Custom        string      `json:"custom"        orm:"custom"         description:"自定义参数"`
	CreateIp      string      `json:"createIp"      orm:"create_ip"      description:"创建者IP"`
	PayIp         string      `json:"payIp"         orm:"pay_ip"         description:"支付者IP"`
	NotifyUrl     string      `json:"notifyUrl"     orm:"notify_url"     description:"支付通知回调地址"`
	ReturnUrl     string      `json:"returnUrl"     orm:"return_url"     description:"买家付款成功跳转地址"`
	TraceIds      *gjson.Json `json:"traceIds"      orm:"trace_ids"      description:"链路ID集合"`
	Status        int         `json:"status"        orm:"status"         description:"状态"`
	CreatedAt     *gtime.Time `json:"createdAt"     orm:"created_at"     description:"创建时间"`
	UpdatedAt     *gtime.Time `json:"updatedAt"     orm:"updated_at"     description:"修改时间"`
}
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================

package entity

import (
	"github.com/gogf/gf/v2/os/gtime"
)

// SysDictType is the golang structure for table sys_dict_type.
type SysDictType struct {
	Id        int64       `json:"id"        orm:"id"         description:"字典类型ID"`
	Pid       int64       `json:"pid"       orm:"pid"        description:"父类字典类型ID"`
	Name      string      `json:"name"      orm:"name"       description:"字典类型名称"`
	Type      string      `json:"type"      orm:"type"       description:"字典


using System;
using System.Text.Json.Serialization;

namespace Ciribob.DCS.SimpleRadio.Standalone.Common.Models.Player;

public class Transponder
{
    /**
     * *  -- IFF_STATUS:  OFF = 0,  NORMAL = 1 , or IDENT = 2 (IDENT means Blink on LotATC)
     * -- M1:-1 = off, any other number on
     * -- M2: -1 = OFF, any other number on
     * -- M3: -1 = OFF, any other number on
     * -- M4: 1 = ON or 0 = OFF
     * -- EXPANSION: only enabled if IFF Expansion is enabled
     * -- CONTROL: 1 - OVERLAY / SRS, 0 - COCKPIT / Realistic, 2 = DISABLED / NOT FITTED AT ALL
     * -- IFF STATUS{"control":1,"expansion":false,"mode1":51,"mode3":7700,"mode4":1,"status":2}
     */
    public enum IFFControlMode
    {
        COCKPIT = 0,
        OVERLAY = 1,
        DISABLED = 2
    }

    public enum IFFStatus
    {
        OFF = 0,
        NORMAL = 1,
        IDENT = 2
    }

    public IFFControlMode control = IFFControlMode.DISABLED;

    [JsonI


_marker_rally = {
		gameObjectName = "s10171_marker_rally", visibleArea = 5, randomRange = 0, setNew = false, viewType = "map_only_icon", langId="marker_info_mission_targetArea",
		targetBgmCp = "mafr_pfCampNorth_ob", mapRadioName = "s0171_mprg0020",
	},
	clear_area_marker_rally = {},
	area_Intel_get = {},
	area_Intel = {
		gameObjectName = "s10171_marker_Intel",
	},
	attack_marker_heli = {
		gameObjectName = s10171_enemy.ENEMY_HELI, goalType = "attack", viewType = "map_and_world_only_icon", setImportant = true, announceLog = "updateMap", langId="marker_info_mission_target",
	},
	attack_marker_tank_swamp = {
		gameObjectName = s10171_enemy.ENEMY_TANK1, goalType = "attack", viewType = "map_and_world_only_icon", setImportant = true, announceLog = "updateMap", langId="marker_info_mission_target",
	},
	attack_marker_tank_hill = {
		gameObjectName = s10171_enemy.ENEMY_TANK2, goalType = "attack", viewType = "map_and_world_only_icon", setImportant = true, announceLog = "updateMap", langId="marker_info_mission_target",
	},
	attack_marker_wav_hill = {
		gameObjectName = s10171_enemy.ENEMY_WAV, goalType = "attack", viewType = "map_and_world_only_icon", setImportant = true, announceLog = "updateMap", langId="marker_info_mission_target",
	},
	attack_marker_wav_add = {
		gameObjectName = s10171_enemy.ENEMY_WAV_ADD, goalType = "attack", viewType = "map_and_world_only_icon", setImportant = true, setNew = true, announceLog = "updateMap", langId="marker_info_mission_target",
	},

	defult_photo_heli = {
		photoId = PHOTO_NAME.HELI, addFirst = false, addSecond = false, photoRadioName = "s0171_mirg0010",
	},
	defult_photo_tank_swamp = {
		photoId = PHOTO_NAME.TANK_SWAMP, addFirst = false, addSecond = false, photoRadioName = "s0171_mirg0020",
	},
	defult_photo_tank_hill = {
		photoId = PHOTO_NAME.TANK_HILL, addFirst = false, addSecond = false, photoRadioName = "s0171_mirg0030",
	},
	defult_photo_wav_hill = {
		photoId = PHOTO_NAME.WAV_HILL, addFirst = false, addSecond = false, photoRadioName = "s0171_mirg0040",
	},
	defult_photo_wav_add = {
		photoId = PHOTO_NAME.WAV_ADD, addFirst = false, addSecond = false, photoRadioName = "s0171_mirg0050",
	},
	enemy_route_tank_swamp = {
		showEnemyRoutePoints = {  groupIndex=0, width=200.0, langId="marker_target_forecast_path", radioGroupName = "s0171_mprg0010",
			points={
				Vector3( 881.5,0.0,310.6 ), Vector3( 563.4,0.0,-16.7 ), Vector3( -282.6,0.0,51.0 ), Vector3( -525.0,0.0,-153.7 ),
			}
		},
	},

	enemy_route_tank_hill = {
		showEnemyRoutePoints = { gr


    is-finite-type-Finite-Semigroup finite-semigroup-Finite-Monoid

  set-Finite-Monoid : Set l
  set-Finite-Monoid = set-Semigroup semigroup-Finite-Monoid

  is-set-type-Finite-Monoid : is-set type-Finite-Monoid
  is-set-type-Finite-Monoid = is-set-type-Semigroup semigroup-Finite-Monoid

  mul-Finite-Monoid :
    type-Finite-Monoid → type-Finite-Monoid → type-Finite-Monoid
  mul-Finite-Monoid = mul-Semigroup semigroup-Finite-Monoid

  mul-Finite-Monoid' :
    type-Finite-Monoid → type-Finite-Monoid → type-Finite-Monoid
  mul-Finite-Monoid' y x = mul-Finite-Monoid x y

  ap-mul-Finite-Monoid :
    {x x' y y' : type-Finite-Monoid} →
    x ＝ x' → y ＝ y' → mul-Finite-Monoid x y ＝ mul-Finite-Monoid x' y'
  ap-mul-Finite-Monoid = ap-mul-Semigroup semigroup-Finite-Monoid

  associative-mul-Finite-Monoid :
    (x y z : type-Finite-Monoid) →
    mul-Finite-Monoid (mul-Finite-Monoid x y) z ＝
    mul-Finite-Monoid x (mul-Finite-Monoid y z)
  associative-mul-Finite-Monoid =
    associative-mul-Semigroup semigroup-Finite-Monoid

  has-unit-Finite-Monoid : is-unital mul-Finite-Monoid
  has-unit-Finite-Monoid = pr2 M

  monoid-Finite-Monoid : Monoid l
  pr1 monoid-Finite-Monoid = semigroup-Finite-Monoid
  pr2 monoid-Finite-Monoid = has-unit-Finite-Monoid

  unit-Finite-Monoid : type-Finite-Monoid
  unit-Finite-Monoid = unit-Monoid monoid-Finite-Monoid

  left-unit-law-mul-Finite-Monoid :
    (x : type-Finite-Monoid) → mul-Finite-Monoid unit-Finite-Monoid x ＝ x
  left-unit-law-mul-Finite-Monoid =
    left-unit-law-mul-Monoid monoid-Finite-Monoid

  right-unit-law-mul-Finite-Monoid :
    (x : type-Finite-Monoid) → mul-Finite-Monoid x unit-Finite-Monoid ＝ x
  right-unit-law-mul-Finite-Monoid =
    right-unit-law-mul-Monoid monoid-Finite-Monoid
```

### Monoids of order `n`

```agda
Monoid-of-Order : (l : Level) (n : ℕ) → UU (lsuc l)
Monoid-of-Order l n = Σ (Monoid l) (λ M → mere-equiv (Fin n) (type-Monoid M))

Monoid-of-Order' : (l : Level) (n : ℕ) → UU (lsuc l)
Monoid-of-Order' l n =
    Σ (Semigroup-of-Order l n) (λ X → is-unital-Semigroup (pr1 X))

compute-Monoid-of-Order :
  {l : Level} (n : ℕ) → Monoid-of-Order l n ≃ Monoid-of-Order' l n
compute-Monoid-of-Order n = equiv-right-swap-Σ
```

## Properties

### For any semigroup of order `n`, the type of multiplicative units is finite

```agda
is-finite-is-unital-Semigroup :
  {l : Level} (n : ℕ) (X : Semigroup-of-Order l n) →
  is-finite (is-unital-Semigroup (pr1 X))


/*
 * PROJECT:     ReactOS API tests
 * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
 * PURPOSE:     Close windows after tests
 * COPYRIGHT:   Copyright 2024-2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
 */

#pragma once

#define WaitForWindow(hWnd, Func, Seconds) \
    for (UINT waited = 0; !Func(hWnd) && waited < (Seconds) * 1000; waited += 250) Sleep(250);

typedef struct WINDOW_LIST
{
    SIZE_T m_chWnds;
    HWND *m_phWnds;
} WINDOW_LIST, *PWINDOW_LIST;

static inline VOID FreeWindowList(PWINDOW_LIST pList)
{
    free(pList->m_phWnds);
    pList->m_phWnds = NULL;
    pList->m_chWnds = 0;
}

static inline BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
    if (!IsWindowVisible(hwnd))
        return TRUE;

    PWINDOW_LIST pList = (PWINDOW_LIST)lParam;
    SIZE_T cb = (pList->m_chWnds + 1) * sizeof(HWND);
    HWND *phWnds = (HWND *)realloc(pList->m_phWnds, cb);
    if (!phWnds)
        return FALSE;
    phWnds[pList->m_chWnds++] = hwnd;
    pList->m_phWnds = phWnds;
    return TRUE;
}

static inline VOID GetWindowList(PWINDOW_LIST pList)
{
    pList->m_phWnds = NULL;
    pList->m_chWnds = 0;
    EnumWindows(EnumWindowsProc, (LPARAM)pList);
}

static inline VOID GetWindowListForClose(PWINDOW_LIST pList)
{
    WINDOW_LIST list;
    pList->m_phWnds = NULL;
    pList->m_chWnds = 0;
    for (SIZE_T tries = 5, count; tries--;)
    {
        if (tries)
            FreeWindowList(pList);
        GetWindowList(pList);
        Sleep(250);
        GetWindowList(&list);
        count = list.m_chWnds;
        FreeWindowList(&list);
        if (count == pList->m_chWnds)
            break;
    }
}

static inline HWND FindInWindowList(const WINDOW_LIST &list, HWND hWnd)
{
    for (SIZE_T i = 0; i < list.m_chWnds; ++i)
    {
        if (list.m_phWnds[i] == hWnd)
            return hWnd;
    }
    return NULL;
}

static inline VOID CloseNewWindows(PWINDOW_LIST pExisting, PWINDOW_LIST pNew)
{
    for (SIZE_T i = 0; i < pNew->m_chWnds; ++i)
    {
        HWND hWnd = pNew->m_phWnds[i];
        if (!IsWindowVisible(hWnd) || FindInWindowList(*pExisting, hWnd))
            continue;

        if (!SendMessageTimeoutW(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0, SMTO_ABORTIFHUNG | SMTO_BLOCK, 3000, NULL))
            PostMessageW(hWnd, WM_CLOSE, 0, 0);
        /* If this window is still open, you'll need TerminateProcess(). */
    }
}

#ifdef __cplusplus
static inline VOID CloseNewWindows(PWINDOW_LIST InitialList)
{
    WINDOW_LIST newwindows;
    GetWindowListForClose(&newwindows);
    CloseNewWindows(InitialList, &newwindows);
    FreeWindowList(&newwindows);
}
#endif

static inline HWND FindNewWindow(PWINDOW_LIST List1, PWINDOW_LIST List2)
{
    for (SIZE_T i2 = 0; i2 < List2->m_chWnds; ++i2)
    {
        HWND hWnd = List2->m_phWnds[i2];
        if (!IsWindowEnabled(hWnd) || !IsWindowVisible(hWnd))
            continue;

        BOOL bFoundInList1 = FALSE;
        for (SIZE_T i1 = 0; i1 < List1->m_chWnds; ++i1)
        {
            if (hWnd == List1->m_phWnds[i1])
            {
                bFoundInList1 = TRUE;
                break;
            }
        }

        if (!bFoundInList1)
            return hWnd;
    }
    return NULL;
}

static inline BOOL CALLBACK CountVisibleWindowsProc(HWND hwnd, LPARAM lParam)
{
    if (!IsWindowVisible(hwnd))
        return TRUE;

    *(PINT)lParam += 1;
    return TRUE;
}

static inline INT GetWindowCount(VOID)
{
    INT nCount = 0;
    EnumWindows(CountVisibleWindowsProc, (LPARAM)&nCount);
    return nCount;
}


**
     * @since Available in iOS 13.0 and later.
     */
    public static final UIFontDescriptorSystemDesign Default = new UIFontDescriptorSystemDesign("Default");
    /**
     * @since Available in iOS 13.0 and later.
     */
    public static final UIFontDescriptorSystemDesign Rounded = new UIFontDescriptorSystemDesign("Rounded");
    /**
     * @since Available in iOS 13.0 and later.
     */
    public static final UIFontDescriptorSystemDesign Serif = new UIFontDescriptorSystemDesign("Serif");
    /**
     * @since Available in iOS 13.0 and later.
     */
    public static final UIFontDescriptorSystemDesign Monospaced = new UIFontDescriptorSystemDesign("Monospaced");
    /*</constants>*/

    private static /*<name>*/UIFontDescriptorSystemDesign/*</name>*/[] values = new /*<name>*/UIFontDescriptorSystemDesign/*</name>*/[] {/*<value_list>*/Default, Rounded, Serif, Monospaced/*</value_list>*/};

    /*<name>*/UIFontDescriptorSystemDesign/*</name>*/ (String getterName) {
        super(Values.class, getterName);
    }

    public static /*<name>*/UIFontDescriptorSystemDesign/*</name>*/ valueOf(/*<type>*/NSString/*</type>*/ value) {
        for (/*<name>*/UIFontDescriptorSystemDesign/*</name>*/ v : values) {
            if (v.value().equals(value)) {
                return v;
            }
        }
        throw new IllegalArgumentException("No constant with value " + value + " found in "
            + /*<name>*/UIFontDescriptorSystemDesign/*</name>*/.class.getName());
    }

    /*<methods>*//*</methods>*/

    /*<annotations>*/@Library("UIKit") @StronglyLinked/*</annotations>*/
    public static class Values {
    	static { Bro.bind(Values.class); }

        /*<values>*/
        /**
         * @since Available in iOS 13.0 and later.
         */
        @GlobalValue(symbol="UIFontDescriptorSystemDesignDefault", optional=true)
        public static native NSString Default();
        /**
         * @since Available in iOS 13.0 and later.
         */
        @GlobalValue(symbol="UIFontDescriptorSystemDesignRounded", optional=true)
        public static native NSString Rounded();
        /**
         * @since Available in iOS 13.0 and later.
         */
        @GlobalValue(symbol="UIFontDescriptorSystemDesignSerif", optional=true)
        public static native NSString Serif();
        /**
         * @since Available in iOS 13.0 and later.
         */
        @GlobalValue(symbol="UIFontDescriptorSystemDesignMonospaced", optional=true)
        public static native NSString Monospaced();
        /*</values>*/
    }
}
/*
 * Copyright (C) 2013-2015 RoboVM AB
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.robovm.apple.uikit;

/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.annotation.*;
import org.robovm.rt.bro.*;
import org.rob


glabel func_8007ABBC
/* AF1D5C 8007ABBC 27BDFF50 */  addiu $sp, $sp, -0xb0
/* AF1D60 8007ABC0 AFB00028 */  sw    $s0, 0x28($sp)
/* AF1D64 8007ABC4 AFBF004C */  sw    $ra, 0x4c($sp)
/* AF1D68 8007ABC8 AFBE0048 */  sw    $fp, 0x48($sp)
/* AF1D6C 8007ABCC AFB70044 */  sw    $s7, 0x44($sp)
/* AF1D70 8007ABD0 AFB60040 */  sw    $s6, 0x40($sp)
/* AF1D74 8007ABD4 AFB5003C */  sw    $s5, 0x3c($sp)
/* AF1D78 8007ABD8 AFB40038 */  sw    $s4, 0x38($sp)
/* AF1D7C 8007ABDC AFB30034 */  sw    $s3, 0x34($sp)
/* AF1D80 8007ABE0 AFB20030 */  sw    $s2, 0x30($sp)
/* AF1D84 8007ABE4 AFB1002C */  sw    $s1, 0x2c($sp)
/* AF1D88 8007ABE8 F7B60020 */  sdc1  $f22, 0x20($sp)
/* AF1D8C 8007ABEC F7B40018 */  sdc1  $f20, 0x18($sp)
/* AF1D90 8007ABF0 8C850000 */  lw    $a1, ($a0)
/* AF1D94 8007ABF4 00808025 */  move  $s0, $a0
/* AF1D98 8007ABF8 8C9307A8 */  lw    $s3, 0x7a8($a0)
/* AF1D9C 8007ABFC 3C068014 */  lui   $a2, %hi(D_8013C8C0) # $a2, 0x8014
/* AF1DA0 8007AC00 24C6C8C0 */  addiu $a2, %lo(D_8013C8C0) # addiu $a2, $a2, -0x3740
/* AF1DA4 8007AC04 AFB000B0 */  sw    $s0, 0xb0($sp)
/* AF1DA8 8007AC08 27A40094 */  addiu $a0, $sp, 0x94
/* AF1DAC 8007AC0C 24070377 */  li    $a3, 887
/* AF1DB0 8007AC10 0C031AB1 */  jal   func_800C6AC4
/* AF1DB4 8007AC14 00A08825 */   move  $s1, $a1
/* AF1DB8 8007AC18 8E2702D0 */  lw    $a3, 0x2d0($s1)
/* AF1DBC 8007AC1C 24EE0008 */  addiu $t6, $a3, 8
/* AF1DC0 8007AC20 AE2E02D0 */  sw    $t6, 0x2d0($s1)
/* AF1DC4 8007AC24 0C0251EB */  jal   func_800947AC
/* AF1DC8 8007AC28 00E02025 */   move  $a0, $a3
/* AF1DCC 8007AC2C AE2202D0 */  sw    $v0, 0x2d0($s1)
/* AF1DD0 8007AC30 244F0008 */  addiu $t7, $v0, 8
/* AF1DD4 8007AC34 AE2F02D0 */  sw    $t7, 0x2d0($s1)
/* AF1DD8 8007AC38 3C18E300 */  lui   $t8, (0xE3001A01 >> 16) # lui $t8, 0xe300
/* AF1DDC 800


/*-
 * Copyright (c) 1990 The Regents of the University of California.
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * William Jolitz and Don Ahn.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@(#)clock.c	7.2 (Berkeley) 5/12/91
 */

/*
 * Primitive clock interrupt routines.
 */
/* standard AT configuration: (will always be configured if loaded) */
static	char *clk_config =
	"clock (0 0).	# process timeslice clock $Revision$";

#include "sys/param.h"
#include "sys/time.h"
#include "sys/errno.h"
#include "tzfile.h"
#include "kernel.h"
#include "malloc.h"
#include "modconfig.h"
#include "prototypes.h"

#include "machine/cpu.h"
#include "machine/pcb.h"
#include "machine/inline/io.h"

#include "machine/icu.h"
#include "isa_stdports.h"
#include "isa_irq.h"
#include "rtc.h"
#include "isa_driver.h"

#define DAYST 119
#define DAYEN 303
unsigned long it_ticks, it_ticksperintr;

startrtclock() {
	int s;

	/* initialize 8253 clock */
	/* it_ticksperintr = 1193182/hz;
	outb (IO_TIMER1+3, 0x34);
	outb (IO_TIMER1, it_ticksperintr);
	outb (IO_TIMER1, it_ticksperintr/256); */

	/* initialize brain-dead battery powered clock */
	outb (IO_RTC, RTC_STATUSA);
	outb (IO_RTC+1, 0x26);
	outb (IO_RTC, RTC_STATUSB);
	outb (IO_RTC+1, 2);

	outb (IO_RTC, RTC_DIAG);
	if (s = inb (IO_RTC+1))
		printf("RTC BIOS diagnostic error %b\n", s, RTCDG_BITS);
	outb (IO_RTC, RTC_DIAG);
	outb (IO_RTC+1, 0);
}

static ena;
/*
 * Wire clock interrupt in.
 */
enablertclock() {
	ena=1;
}

static int hi = 0xffff;
static int clkprobe(struct isa_device *dvp);
static void clkattach(struct isa_device *dvp);
static void clkintr(struct intrframe f);
struct	isa_driver clkdriver = {
	clkprobe, clkattach, (void (*)(int))clkintr, "clk", &hi
};

/*
 * Probe routine - look device, otherwise set emulator bit
 */
static int
clkprobe(struct isa_device *dvp)
{
	return (1);
}

static void
clkattach(struct isa_device *dvp)
{
	splx(0xf); /* XXX */
}

static void
clkintr(struct intrframe f) {

	if (!ena) return;
	splhigh();
	it_ticks += it_ticksperintr;
	hardclock(f.if_ppl, f.if_eip, f.if_cs);
}

DRIVER_MODCONFIG() {
	char *cfg_string;

	/* find configuration string. */
	if (!config_scan(clk_config, &cfg_string))
		return;

	/* probe for hardware */
	new_isa_configure(&cfg_string, &clkdriver);
}


import os
import pickle
import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.tree import export_graphviz
import graphviz

def accuracy(policy, obss, acts):
    return np.mean(acts == policy.pick_action(obss))

def split_train_test(obss, acts, train_frac):
    n_train = int(train_frac * len(obss))
    idx = np.arange(len(obss))
    np.random.shuffle(idx)
    obss_train = obss[idx[:n_train]]
    acts_train = acts[idx[:n_train]]
    obss_test = obss[idx[n_train:]]
    acts_test = acts[idx[n_train:]]
    return obss_train, acts_train, obss_test, acts_test

def save_dt_policy(dt_policy, dirname, fname):
    if not os.path.isdir(dirname):
        os.makedirs(dirname)
    f = open(dirname + '/' + fname, 'wb')
    pickle.dump(dt_policy, f)
    f.close()

def save_dt_policy_viz(dt_policy, dirname, fname):
    if not os.path.isdir(dirname):
        os.makedirs(dirname)
    file = dirname + '/' + fname
    export_graphviz(dt_policy.tree, file)
    # 使用 Graphviz 工具将 DOT 文件转换为图像
    with open(file) as dot_file:
        dot_data = dot_file.read()
    graph = graphviz.Source(dot_data)
    graph.render(file)  # 这将生成一个名为 "tree.pdf" 的图像文件

def load_dt_policy(dirname, fname):
    f = open(dirname + '/' + fname, 'rb')
    dt_policy = pickle.load(f)
    f.close()
    return dt_policy

class DTPolicy:
    def __init__(self, max_depth):
        self.max_depth = max_depth

    def fit(self, obss, acts):
        self.tree = DecisionTreeClassifier(max_depth=self.max_depth)
        self.tree.fit(obss, acts)

    def train(self, obss, acts, train_frac):  # train_frac是训练集的比例
        obss_train, acts_train, obss_test, acts_test = split_train_test(obss, acts, train_frac)
        self.fit(obss_train, acts_train)
        # print('Train accuracy: {}'.format(accuracy(self, obss_train, acts_train)))
        # print('Test accuracy: {}'.format(accuracy(self, obss_test, acts_test)))
        print('Number of nodes: {}'.format(self.tree.tree_.node_count))

    def pick_action(self, obss, on_training=0):
        return self.tree.predict(obss)  # obss一定得是二维的

    def clone(self):
        clone = DTPolicy(self.max_depth)
        clone.tree = self.tree
        return clone

if __name__ == '__main__':
    tree = DecisionTreeClassifier(max_depth=10)
    X = np.random.rand(100, 10)
    y = np.random.randint(0, 10, 100)
    tree.fit(X, y)
    print(tree.predict(X).shape)


/ Get higher precision for Thread.Sleep on Windows
		/// See https://web.archive.org/web/20051125042113/http://www.dotnet247.com/247reference/msgs/57/289291.aspx
		/// See https://docs.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod
		[DllImport("winmm.dll")]
		private static extern uint timeBeginPeriod(uint period);

		[DllImport("winmm.dll")]
		private static extern uint timeEndPeriod(uint period);
		#endif

		public static void HighPrecisionThreadSleep(int milliseconds)
		{
			#if WINDOWS
			var resultCode = timeBeginPeriod(1u);
			Debug.Assert(resultCode == TIMERR_NOERROR);
			#endif

			Thread.Sleep(milliseconds);

			#if WINDOWS
			resultCode = timeEndPeriod(1u);
			Debug.Assert(resultCode == TIMERR_NOERROR);
			#endif
		}
	}
}


(`<h1>`, `<h2>`, etc.) are not empty.
        - **General Elements:** Counting the total number of images and headings.

        The compliance percentage is calculated based on these checks.
        """)

        # Display feedback results
        compliant = accessibility_feedback['compliant']
        non_compliant = accessibility_feedback['non_compliant']

        col1, col2 = st.columns(2)  # Layout with two columns

        with col1:
            st.info(f"✅ **Compliant:** {compliant}%")

        with col2:
            st.warning(f"⚠ **Non-Compliant:** {non_compliant}%")

        # Display pie chart
        st.subheader("📊 Accessibility Compliance Chart")
        try:
            plot = plot_accessibility(accessibility_feedback)
            st.pyplot(plot)
        except ValueError as e:
            st.error(f"❌ Error generating the chart: {str(e)}")

    with tab4:
        st.header("🔒 Web Security Feedback")
        result, details = check_security(url)

        # Display results
        st.subheader("Security Check Results")
        st.write(f"**Secure:** {result['secure']:.2f}%")
        st.write(f"**Insecure:** {result['insecure']:.2f}%")

        # Progress bar for secure score
        st.progress(result['secure'] / 100)

        # Display step-by-step details
        st.subheader("Step-by-Step Details")
        for detail in details:
            st.write(detail)

        # Provide insights based on the results
        st.subheader("Insights:")
        if result['secure'] == 100:
            st.success("This website is highly secure!")
        elif result['secure'] >= 70:
            st.info("This website has good security, but some improvements are recommended.")
        else:
            st.warning("This website has significant security risks.")
    with tab5:
        st.subheader("🛠 Compatibility Check")
        compatibility_feedback = check_compatibility(url)
        st.write(compatibility_feedback)
    with tab6:
        feedback_html = check_html_validity(url)

        # Display results
        st.subheader("🖥 HTML Validation Results")
        if feedback_html["valid"]:
            st.success("The HTML structure of the website is valid!")
        else:
            st.error("The website has HTML errors!")

            # Display errors if any
            if feedback_html["errors"]:
                st.subheader("Details of Errors")
                for error in feedback_html["errors"]:
                    st.code(error, language="html")
    with tab7 :
        st.header("📄 Generated Report")
        report_content = {
            'Performance': performance_feedback,
            'Usability': usability_feedback,
            'Accessibility': accessibility_feedback,
            'Security': detail,
            'Compatibility': compatibility_feedback,
            'HTML Validity': feedback_html
        }
        report = generate_report(report_content)
        st.text(report)

        if st.button("Download the report in PDF"):
            pdf = generate_pdf(report)
            pdf_output = "rapport.pdf"
            pdf.output(pdf_output)
            with open(pdf_output, "rb") as file:
                st.download_button(
                    label="Click here to download",
                    data=file,
                    file_name=pdf_output,
                    mime="application/pdf"
                )
        with tab8:
            html_content = fetch_html_content(url)
            seo_results = analyze_seo(html_content)
            st.subheader("SEO Report")
            report = generate_llm_feedback(seo_results)
            st.write(report)


/* ----------------------------------------------------------------------
 * Project:      CMSIS DSP Library
 * Title:        arm_and_u16.c
 * Description:  uint16_t bitwise AND
 *
 * $Date:        23 April 2021
 * $Revision:    V1.9.0
 *
 * Target Processor: Cortex-M and Cortex-A cores
 * -------------------------------------------------------------------- */
/*
 * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "dsp/basic_math_functions.h"

/**
  @ingroup groupMath
 */

/**
  @defgroup And Vector bitwise AND

  Compute the logical bitwise AND.

  There are separate functions for uint32_t, uint16_t, and uint7_t data types.
 */

/**
  @addtogroup And
  @{
 */

/**
  @brief         Compute the logical bitwise AND of two fixed-point vectors.
  @param[in]     pSrcA      points to input vector A
  @param[in]     pSrcB      points to input vector B
  @param[out]    pDst       points to output vector
  @param[in]     blockSize  number of samples in each vector
 */

ARM_DSP_ATTRIBUTE void arm_and_u16(
    const uint16_t * pSrcA,
    const uint16_t * pSrcB,
          uint16_t * pDst,
          uint32_t blockSize)
{
    uint32_t blkCnt;      /* Loop counter */

#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE)
    uint16x8_t vecSrcA, vecSrcB;

    /* Compute 8 outputs at a time */
    blkCnt = blockSize >> 3;

    while (blkCnt > 0U)
    {
        vecSrcA = vld1q(pSrcA);
        vecSrcB = vld1q(pSrcB);

        vst1q(pDst, vandq_u16(vecSrcA, vecSrcB) );

        pSrcA += 8;
        pSrcB += 8;
        pDst  += 8;

        /* Decrement the loop counter */
        blkCnt--;
    }

    /* Tail */
    blkCnt = blockSize & 7;

    if (blkCnt > 0U)
    {
        mve_pred16_t p0 = vctp16q(blkCnt);
        vecSrcA = vld1q(pSrcA);
        vecSrcB = vld1q(pSrcB);
        vstrhq_p(pDst, vandq_u16(vecSrcA, vecSrcB), p0);
    }
#else
#if defined(ARM_MATH_NEON) && !defined(ARM_MATH_AUTOVECTORIZE)
    uint16x8_t vecA, vecB;

    /* Compute 8 outputs at a time */
    blkCnt = blockSize >> 3U;

    while (blkCnt > 0U)
    {
        vecA = vld1q_u16(pSrcA);
        vecB = vld1q_u16(pSrcB);

        vst1q_u16(pDst, vandq_u16(vecA, vecB) );

        pSrcA += 8;
        pSrcB += 8;
        pDst  += 8;

        /* Decrement the loop counter */
        blkCnt--;
    }

    /* Tail */
    blkCnt = blockSize & 7;
#else
    /* Initialize blkCnt with number of samples */
    blkCnt = blockSize;
#endif

    while (blkCnt > 0U)
    {
        *pDst++ = (*pSrcA++)&(*pSrcB++);

        /* Decrement the loop counter */
        blkCnt--;
    }
#endif /* if defined(ARM_MATH_MVEI) */
}

/**
  @} end of And group
 */


PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_description();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.OpDef.ArgDef.description"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .opencv_tensorflow.DataType type = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::opencv_tensorflow::DataType>(val));
        } else
          goto handle_unusual;
        continue;
      // string type_attr = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_type_attr();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.OpDef.ArgDef.type_attr"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string number_attr = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_number_attr();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.OpDef.ArgDef.number_attr"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string type_list_attr = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_type_list_attr();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.OpDef.ArgDef.type_list_attr"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // bool is_ref = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
          is_ref_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* OpDef_ArgDef::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsC


 | :- |
| This article is a part of the Installation Guide. You can read it alone or click the previous link to easily move between the steps. |
| [<< Step 1: Requirements](linux-requirements) | [Step 3: Server Setup >>](server-setup) |
# Instalación de la Base de Datos

| Guía de Instalación | |
| :- | :- |
| Este artículo es parte de la Guía de Instalación. Puede leerlo solo o hacer click en los links previos para navegar con facilidad entre los pasos. |
| [<< Paso 3: Configuración del Servidor](server-setup) | [Paso 5: Redes >>](networking) |

## Creación de la Base de Datos en MySQL

### Creación de la Base de Datos y el Usuario

Primero que todo, necesita crear el usuario acore usando el siguiente script.

https://github.com/azerothcore/azerothcore-wotlk/blob/master/data/sql/create/create_mysql.sql

Puede realizarlo con un cliente de MySQL o con la interfaz de comandos de MySQL (CLI).

Necesitará usar una cuenta root de MySQL con su cliente de  MySQL o con MySQL CLI antes de empezar a correr el servidor y usar alguno de esos archivos. (use un usuario root de MySQL solo para importar uno de esos archivos, NUNCA inicie el servidor con usuario root o administrator).

*Consejo: Puede cambiar la contraseña del usario que está creando para incrementar la seguridad.*

## Cargan de información a la Base de Datos

Puede hacer esto de dos maneras:
- Automatic Database Updater (Actualizador autmático de la base datos: predeterminado, recomendado)

Si quiere saber cómo funciona el directorio SQL o planea hacer cambios custom, le recomendamos leer [esto](sql-directory).

### Automatic Database Updater (Actualizador autmático de bases de datos: predeterminado, recomendado)

Por defecto, Worldserver y Authserver van a revisar e importar los nuevos archivos dentro de la base de datos que estén especificados en la configuración.

Esta es la forma recomendada y la más facil, para asegurarse de que siempre tiene la base de datos al día con el Core.

Para editar el actualizador automático de bases de datos, encontrará las configuraciones necesarias en authserver.conf y worldserver.conf en la opción [UPDATE SETTINGS](https://github.com/azerothcore/azerothcore-wotlk/commit/2d2857ce81db5297eb63d388d2e2f252ef52412d#diff-56b141374cf0384a2887c9fd490c6a79a3d2f31fb020ee0e423a5685344b59d3R30).

<br>

## Ayuda

Si sigue teniendo inconvenientes, revise:

* [Preguntas frecuentes](faq)

* [Errores Comunes](common-errors)

* [Cómo solicitar ayuda](how-to-ask-for-help)

* [Unase a nuestro discord](https://discord.gg/gkt4y2x). Aunque no es un canal de soporte 24/7, un miembro del staff le responderá siempre que tenga tiempo.

| Guía de Instalación | |
| :- | :- |
| Este artículo es parte de la Guía de Instalación. Puede leerlo solo o hacer click en los links previos para navegar con facilidad entre los pasos. |
| [<< Paso 3: Configuración del Servidor](server-setup) | [Paso 5: Redes >>](networking) |
# guild\_bank\_right

[<-Volver a:Characters](database-characters)

**Tabla \`guild\_bank\_right\`**

La tabla alberga información sobre el privilegio que tienen los miembros de la hermandad para retirar, depositar, etc(...), cosas en el banco.

**Estructura**

| Field           | Type    | Attributes |


mForTestRunDashboard_ok() throws Exception {
        var exam = examUtilService.addExam(course1);
        exam = examUtilService.addTextModelingProgrammingExercisesToExam(exam, false, false);
        examUtilService.setupTestRunForExamWithExerciseGroupsForInstructor(exam, instructor, exam.getExerciseGroups());
        exam = request.get("/api/exam/courses/" + exam.getCourse().getId() + "/exams/" + exam.getId() + "/exam-for-test-run-assessment-dashboard", HttpStatus.OK, Exam.class);
        assertThat(exam.getExerciseGroups().stream().flatMap(exerciseGroup -> exerciseGroup.getExercises().stream()).toList()).isNotEmpty();
    }

    @Test
    @WithMockUser(username = TEST_PREFIX + "student1", roles = "USER")
    void testGetStudentExamForStart() throws Exception {
        Exam exam = examUtilService.addActiveExamWithRegisteredUser(course1, student1);
        exam.setVisibleDate(ZonedDateTime.now().minusHours(1).minusMinutes(5));
        StudentExam response = request.get("/api/exam/courses/" + course1.getId() + "/exams/" + exam.getId() + "/own-student-exam", HttpStatus.OK, StudentExam.class);
        assertThat(response.getExam()).isEqualTo(exam);
        verify(examAccessService).getOrCreateStudentExamElseThrow(course1.getId(), exam.getId());
    }

    @ParameterizedTest(name = "{displayName} [{index}] {argumentsWithNames}")
    @WithMockUser(username = TEST_PREFIX + "tutor1", roles = "TA")
    @ValueSource(ints = { 0, 1, 2 })
    void testGetExamForExamAssessmentDashboard(int numberOfCorrectionRounds) throws Exception {
        // we need an exam from the past, otherwise the tutor won't have access
        Course course = courseUtilService.createCourse();
        course = examUtilService.createCourseWithExamAndExerciseGroupAndExercises(course, student1, now().minusHours(3), now().minusHours(2), now().minusHours(1));
        Exam exam = course.getExams().iterator().next();

        // Ensure the API endpoint works for all number of correctionRounds
        exam.setNumberOfCorrectionRoundsInExam(numberOfCorrectionRounds);
        examRepository.save(exam);

        Exam receivedExam = request.get("/api/exam/courses/" + course.getId() + "/exams/" + exam.getId() + "/exam-for-assessment-dashboard", HttpStatus.OK, Exam.class);

        // Test that the received exam has two text exercises
        assertThat(receivedExam.getExerciseGroups().getFirst().getExercises()).as("Two exercises are returned").hasSize(2);
        // Test that the received exam has zero quiz exercises, because quiz exercises do not need to be corrected manually
        assertThat(receivedExam.getExerciseGroups().get(1).getExercises()).as("Zero exercises are returned").isEmpty();
    }

    @Test
    @WithMockUser(username = TEST_PREFIX + "tutor1", roles = "TA")
    void testGetExamForExamAssessmentDashboard_beforeDueDate() throws Exception {
        Exam exam = ExamFactory.generateExam(course1);
        exam.setEndDate(now().plusWeeks(1));
        examRepository.save(exam);

        request.get("/api/exam/courses/" + exam.getCourse().getId() + "/exams/" + exam.getId() + "/exam-for-assessment-dashboard", HttpStatus.FORBIDDEN, Exam.class);
    }

    @Test
    @WithMockUser(username = TEST_PREFIX + "student1", roles = "STUDENT")
    void testGetExamForExamAssessmentDashboard_asStudent_


-warning {
	&__separator {
		border: 1px solid $wp-success;
	}

	&__icon {
		color: $wp-success-text;
	}
}

.notice-warning .e-major-update-warning {
	&__separator {
		border: 1px solid $wp-warning;
	}

	&__icon {
		color: $wp-warning-text;
	}
}

.plugins table.e-compatibility-update-table {
	tr {
		background: transparent;

		th {
			font-weight: 600;
		}

		th, td {
			min-width: 250px;
			font-size: 13px;
			background: transparent;
			box-shadow: none;
			border: none;
			padding-block-start: 5px;
			padding-block-end: 5px;
			padding-inline-end: 15px;
			padding-inline-start: 0;
		}
	}
}
//
// Variables
//

//Editor Facelift 2023 - Grays
$black:         #000000;
$white:         #ffffff;
$e-gray-25:		#F9FAFA;
$e-gray-50:		#F1F2F3;
$e-gray-75:		#E6E8EA;
$e-gray-100:	#D5D8DC;
$e-gray-200:	#BABFC5;
$e-gray-300:	#9DA5AE;
$e-gray-400:	#818A96;
$e-gray-500:	#69727D;
$e-gray-600:	#515962;
$e-gray-700:	#3f444b;
$e-gray-725:	#333438;
$e-gray-750:	#2b2c31;
$e-gray-800:	#1f2124;
$e-gray-900:	#0C0D0E;

//Editor Facelift 2023 - Teal
$e-teal-50: 	#ECFDF5;
$e-teal-300:	#5EEAD4;
$e-teal-400:	#1DDDBF;
$e-teal-500:	#12AA9A;
$e-teal-600:	#0A875A;
$e-teal-700:	#047857;
$e-teal-900:	#032317;

//Editor Facelift 2023 - Pink
$e-pink-50:		#FAE8FF;
$e-pink-100:	#F5D0FE;
$e-pink-200:	#F3BAFD;
$e-pink-300:	#F0ABFC;
$e-pink-400:	#EB8EFB;
$e-pink-600:	#E73CF6;
$e-pink-700:	#E315F5;
$e-pink-800:	#D004D4;
$e-pink-900:	#C00BB9;
$e-pink-a100:	#310132;

//Promotion Colors (Using in promotion CTA)
$e-rose-600:	#A93365;
$e-rose-700:	#8F1A4C;
$e-rose-800:	#93003f;
$e-rose-promotion:	#D6107C;

//Editor Facelift 2023 - Indigo
$e-indigo-600:	#524CFF;
$e-indigo-700:	#4C43E5;
$e-indigo-800:	#4338CA;
$e-purple:		$e-indigo-600;

//Editor Facelift 2023 - Semantic Colors
$e-primary:				$e-pink-200;
$e-primary-bold:		$e-pink-800;
$e-secondary: 			$e-gray-600;
$e-success:				$e-teal-600;
$e-info: 				#2563EB;
$e-danger:				#DC2626;
$e-warning: 			#F59E0B;
$e-accent: 				$e-rose-800;
$e-accent-promotion:	$e-rose-promotion;
$e-primary-bg:			$e-pink-50;
$e-success-bg:			#F2FDF5;
$e-danger-bg:			#FEF1F4;
$e-info-bg:


e;
        for point in src.points.iter() {
            if matches!(point.typ, norad::PointType::Move) {
                closed = false;
                let start = PathPoint::on_curve(
                    path_id,
                    DPoint::from_raw((point.x as f64, point.y as f64)),
                );
                add_id(point, &start);

                points.push(start);
                continue;
            }
            let lib = match point.lib() {
                Some(lib) => lib,
                None => continue,
            };
            if !lib
                .get(HYPERBEZ_IS_POINT_KEY)
                .and_then(|val| val.as_boolean())
                .unwrap_or(false)
            {
                continue;
            }

            if let Some(offcurves) = lib
                .get(HYPERBEZ_CONTROL_POINTS)
                .and_then(|val| val.as_dictionary())
            {
                let x1 = offcurves.get("x1").unwrap().as_real().unwrap();
                let x2 = offcurves.get("x2").unwrap().as_real().unwrap();
                let y1 = offcurves.get("y1").unwrap().as_real().unwrap();
                let y2 = offcurves.get("y2").unwrap().as_real().unwrap();
                let auto1 = offcurves.get("auto1").unwrap().as_boolean().unwrap();
                let auto2 = offcurves.get("auto2").unwrap().as_boolean().unwrap();
                let p1 = PathPoint::hyper_off_curve(path_id, DPoint::from_raw((x1, y1)), auto1);
                let p2 = PathPoint::hyper_off_curve(path_id, DPoint::from_raw((x2, y2)), auto2);
                points.push(p1);
                points.push(p2);
            }
            let mut end =
                PathPoint::on_curve(path_id, DPoint::from_raw((point.x as f64, point.y as f64)));
            add_id(point, &end);
            if point.smooth {
                end.toggle_type();
            }
            points.push(end);
        }
        let points =
            PathPoints::from_raw_parts(path_id, points, Some(identifier_map), None, closed);

        let mut this = Self {
            points,
            solver: SplineSpec::new(),
            bezier: Arc::new(BezPath::new()),
        };
        this.after_change();
        this
    }

    pub(crate) fn to_norad(&self) -> norad::glyph::Contour {
        fn norad_point(
            pt: Point,
            typ: PointType,
            smooth: bool,
            ident: Option<norad::Identifier>,
        ) -> ContourPoint {
            ContourPoint::new(pt.x as f32, pt.y as f32, typ, smooth, None, ident, None)
        }

        fn extend_from_bezpath(points: &mut Vec<ContourPoint>, path: &[PathEl]) {
            for el in path.iter() {
                match el {
                    PathEl::LineTo(pt) => {
                        points.push(norad_point(*pt, PointType::Curve, false, None))
                    }
                    PathEl::CurveTo(p1, p2, p3) => {
                        points.push(norad_point(*p1, PointType::OffCurve, false, None));
                        points.push(norad_point(*p2, PointType::OffCurve, false, None));
                        points.push(norad_point(*p3, PointType::Curve, false, None));
                    }
                    _


DC,0x00,0xDB,0xFF,
                     0xDF,0xFF]
      };
      var encoded = octets[encoding] || new TextEncoder(encoding).encode(string);

      for (var len = 1; len <= 5; ++len) {
        var out = "", decoder = new TextDecoder(encoding);
        for (var i = 0; i < encoded.length; i += len) {
          var sub = [];
          for (var j = i; j < encoded.length && j < i + len; ++j) {
            sub.push(encoded[j]);
          }
          out += decoder.decode(new Uint8Array(sub), {stream: true});
        }
        out += decoder.decode();
        assert_equals(out, string, "streaming decode " + encoding);
      }
    });
  },
  "Streaming Decode"
);

test(
  function () {
    var jis = [0x82, 0xC9, 0x82, 0xD9, 0x82, 0xF1];
    var expected = "\u306B\u307B\u3093"; // Nihon
    assert_equals(new TextDecoder("shift_jis").decode(new Uint8Array(jis)), expected);
  },
  "Shift_JIS Decode"
);

test(
  function () {
    var encodings = ["utf-8", "ibm866", "iso-8859-2", "iso-8859-3", "iso-8859-4", "iso-8859-5", "iso-8859-6", "iso-8859-7", "iso-8859-8", "iso-8859-8-i", "iso-8859-10", "iso-8859-13", "iso-8859-14", "iso-8859-15", "iso-8859-16", "koi8-r", "koi8-u", "macintosh", "windows-874", "windows-1250", "windows-1251", "windows-1252", "windows-1253", "windows-1254", "windows-1255", "windows-1256", "windows-1257", "windows-1258", "x-mac-cyrillic", "gbk", "gb18030", "big5", "euc-jp", "iso-2022-jp", "shift_jis", "euc-kr", "x-user-defined"];

    encodings.forEach(function (encoding) {
      var string = '', bytes = [];
      for (var i = 0; i < 128; ++i) {

        // Encodings that have escape codes in 0x00-0x7F
        if (encoding === "iso-2022-jp" && i === 0x1B)
          continue;

        string += String.fromCharCode(i);
        bytes.push(i);
      }
      var ascii_encoded = new TextEncoder('utf-8').encode(string);
      assert_equals(new TextDecoder(encoding).decode(ascii_encoded), string, encoding);
      //assert_array_equals(new TextEncoder(encoding).encode(string), bytes, encoding);
    });
  },
  "Supersets of ASCII decode ASCII correctly"
);

test(
  function () {
    assert_throws({name: 'TypeError'}, function() { new TextDecoder("utf-8", {fatal: true}).decode(new Uint8Array([0xff])); });
    // This should not hang:
    new TextDecoder("utf-8").decode(new Uint8Array([0xff]));

    assert_throws({name: 'TypeError'}, function() { new TextDecoder("utf-16", {fatal: true}).decode(new Uint8Array([0x00])); });
    // This should not hang:
    new TextDecoder("utf-16").decode(new Uint8Array([0x00]));

    assert_throws({name: 'TypeError'}, function() { new TextDecoder("utf-16be", {fatal: true}).decode(new Uint8Array([0x00])); });
    // This should not hang:
    new TextDecoder("utf-16be").decode(new Uint8Array([0


}
    }
}package cn.cqautotest.sunnybeach.http.glide

import com.bumptech.glide.load.Options
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.model.ModelLoader
import com.bumptech.glide.load.model.ModelLoader.LoadData
import com.bumptech.glide.load.model.ModelLoaderFactory
import com.bumptech.glide.load.model.MultiModelLoaderFactory
import okhttp3.Call
import java.io.InputStream

/**
 *    author : Android 轮子哥
 *    github : https://github.com/getActivity/AndroidProject-Kotlin
 *    time   : 2019/12/15
 *    desc   : OkHttp 加载模型
 */
class OkHttpLoader private constructor(private val factory: Call.Factory) :
    ModelLoader<GlideUrl, InputStream> {

    override fun handles(url: GlideUrl): Boolean {
        return true
    }

    override fun buildLoadData(model: GlideUrl, width: Int, height: Int, options: Options): LoadData<InputStream?> {
        return LoadData(model, OkHttpFetcher(factory, model))
    }

    class Factory constructor(private val factory: Call.Factory) : ModelLoaderFactory<GlideUrl, InputStream> {

        override fun build(multiFactory: MultiModelLoaderFactory): ModelLoader<GlideUrl, InputStream> {
            return OkHttpLoader(factory)
        }

        override fun teardown() {}
    }
}package cn.cqautotest.sunnybeach.http.api.sob

import cn.cqautotest.sunnybeach.http.ServiceCreator
import cn.cqautotest.sunnybeach.http.annotation.baseurl.SobBaseUrl
import cn.cqautotest.sunnybeach.model.ApiResponse
import cn.cqautotest.sunnybeach.model.course.Course
import cn.cqautotest.sunnybeach.model.course.CourseChapter
import cn.cqautotest.sunnybeach.model.course.CourseDetail
import cn.cqautotest.sunnybeach.model.course.CoursePlayAuth
import retrofit2.http.GET
import retrofit2.http.Path

@SobBaseUrl
interface CourseApi {

    /**
     * 获取课程列表
     */
    @GET("ct/edu/course/list/{page}")
    suspend fun getCourseList(@Path("page") page: Int): ApiResponse<Course>

    /**
     * 获取课程详情
     */
    @GET("ct/edu/course/{courseId}")
    suspend fun getCourseDetail(@Path("courseId") courseId: String): ApiResponse<CourseDetail>

    /**
     * 获取课程章节内容
     */
    @GET("ct/edu/course/chapter/{courseId}")
    suspend fun getCourseChapter(@Path("courseId") courseId: String): ApiResponse<CourseChapter>

    /**
     * 检查课程是否有购买
     */
    @GET("ct/course-buy/{courseId}")
    suspend fun checkCourseHasBuy(@Path("courseId") courseId: String): ApiResponse<Any>

    /**
     * 获取课程播放凭证
     */
    @GET("ct/video/certification/{videoId}")
    suspend fun getCoursePlayAuth(@Path("videoId") videoId: String): ApiResponse<CoursePlayAuth>

    companion object : CourseApi by ServiceCreator.create()
}package cn.cqautotest.sunnybeach.push.xiaomi

import android.content.Context
import android.text.TextUtils
import cn.cqautotest.sunnybeach.ktx.fromJson
import cn.cqautotest.sunnybeach.ktx.getOrNull
import cn.cqautotest.sunnybeach.ktx.toJson
import cn.cqautotest.sunnybeach.manager.ActivityManager
import cn.cqautotest.sunnybeach.model.ApiResponse
import


        participant_info, info->subscription_event_, info->topic_, info->type_support_);
      delete info->subscription_event_;
      delete info->data_reader_listener_;
      delete info;
    });

  /////
  // Create the Type Support struct
  TypeSupportRegistry & type_registry = TypeSupportRegistry::get_instance();
  auto type_support_impl = type_registry.get_message_type_support(type_support);
  if (!type_support_impl) {
    RMW_SET_ERROR_MSG("create_subscription() failed to get message_type_support");
    return nullptr;
  }
  auto return_type_support = rcpputils::make_scope_exit(
    [&type_registry, type_support]()
    {
      type_registry.return_message_type_support(type_support);
    });

  info->typesupport_identifier_ = type_support->typesupport_identifier;
  info->type_support_impl_ = type_support_impl;

  if (!fastdds_type) {
    auto tsupport = new (std::nothrow) TypeSupportProxy(type_support_impl);
    if (!tsupport) {
      RMW_SET_ERROR_MSG("create_subscription() failed to allocate TypeSupportProxy");
      return nullptr;
    }

    // Transfer ownership to fastdds_type
    fastdds_type.reset(tsupport);
  }

  if (keyed && !fastdds_type->is_compute_key_provided) {
    RMW_SET_ERROR_MSG("create_subscription() requested a keyed topic with a non-keyed type");
    return nullptr;
  }

  if (eprosima::fastdds::dds::RETCODE_OK != fastdds_type.register_type(dds_participant)) {
    RMW_SET_ERROR_MSG("create_subscription() failed to register type");
    return nullptr;
  }

  info->type_support_ = fastdds_type;

  /////
  // Create Listener
  info->subscription_event_ = new (std::nothrow) RMWSubscriptionEvent(info);
  if (!info->subscription_event_) {
    RMW_SET_ERROR_MSG("create_subscription() could not create subscription event");
    return nullptr;
  }

  info->data_reader_listener_ =
    new (std::nothrow) CustomDataReaderListener(info->subscription_event_);
  if (!info->data_reader_listener_) {
    RMW_SET_ERROR_MSG("create_subscription() could not create subscription data reader listener");
    return nullptr;
  }

  /////
  // Create and register Topic
  eprosima::fastdds::dds::TopicQos topic_qos = dds_participant->get_default_topic_qos();
  if (!get_topic_qos(*qos_policies, topic_qos)) {
    // get_topic_qos already set the error
    return nullptr;
  }

  info->topic_ = participant_info->find_or_create_topic(
    topic_name_mangled, type_name, topic_qos, info->subscription_event_);
  if (!info->topic_) {
    RMW_SET_ERROR_MSG("create_subscription() failed to create topic");
    return nullptr;
  }

  des_topic = info->topic_;

  /////
  // Create DataReader

  // If the user defined an XML file via env "FASTDDS_DEFAULT_PROFILES_FILE", try to load
  // datareader which profile name matches with topic_name. If such profile does not exist,
  // then use the default Fast DDS QoS.
  eprosima::fastdds::dds::DataReaderQos reader_qos = subscriber->get_default_datareader_qos();

  // Try to load the profile with the topic name
  // It does not need to check the return code, as if the profile does not ex


 (c *OutgoingConnectorHandler) Name() string {
	return c.lggr.Name()
}

func incomingRateLimiterConfigDefaults(config ratelimit.RateLimiterConfig) ratelimit.RateLimiterConfig {
	if config.GlobalBurst == 0 {
		config.GlobalBurst = DefaultGlobalBurst
	}
	if config.GlobalRPS == 0 {
		config.GlobalRPS = DefaultGlobalRPS
	}
	if config.PerSenderBurst == 0 {
		config.PerSenderBurst = DefaultPerSenderBurst
	}
	if config.PerSenderRPS == 0 {
		config.PerSenderRPS = DefaultPerSenderRPS
	}
	return config
}
func outgoingRateLimiterConfigDefaults(config ratelimit.RateLimiterConfig) ratelimit.RateLimiterConfig {
	if config.GlobalBurst == 0 {
		config.GlobalBurst = DefaultGlobalBurst
	}
	if config.GlobalRPS == 0 {
		config.GlobalRPS = DefaultGlobalRPS
	}
	if config.PerSenderBurst == 0 {
		config.PerSenderBurst = DefaultWorkflowBurst
	}
	if config.PerSenderRPS == 0 {
		config.PerSenderRPS = DefaultWorkflowRPS
	}
	return config
}

func validMethod(method string) bool {
	switch method {
	case capabilities.MethodWebAPITarget, capabilities.MethodComputeAction, capabilities.MethodWorkflowSyncer:
		return true
	default:
		return false
	}
}

func newResponses() *responses {
	return &responses{
		chs: map[string]chan *api.Message{},
	}
}

type responses struct {
	chs map[string]chan *api.Message
	mu  sync.RWMutex
}

func (r *responses) new(id string) (chan *api.Message, error) {
	r.mu.Lock()
	defer r.mu.Unlock()

	_, ok := r.chs[id]
	if ok {
		return nil, fmt.Errorf("already have response for id: %s", id)
	}

	// Buffered so we don't wait if sending
	ch := make(chan *api.Message, 1)
	r.chs[id] = ch
	return ch, nil
}

func (r *responses) cleanup(id string) {
	r.mu.Lock()
	defer r.mu.Unlock()

	delete(r.chs, id)
}

func (r *responses) get(id string) (chan *api.Message, bool) {
	r.mu.RLock()
	defer r.mu.RUnlock()
	ch, ok := r.chs[id]
	return ch, ok
}

type metrics struct {
	handleDuration    metric.Int64Histogram
	awaitConnDuration metric.Int64Histogram
	method            string
}

func (m *metrics) recordSingleNodeRequestDuration(ctx context.Context, d time.Duration, status string, wid string) {
	m.handleDuration.Record(ctx, d.Milliseconds(), metric.WithAttributes(
		attribute.String("status", status),
		attribute.String("workflowID", wid),
		attribute.String("method", m.method),
	))
}

func (m *metrics) recordAwaitConnectionDuration(ctx context.Context, d time.Duration, wid string, gateway string, success bool) {
	successStr := "false"
	if success {
		successStr = "true"
	}
	m.awaitConnDuration.Record(ctx, d.Milliseconds(), metric.WithAttributes(
		attribute.String("gateway", gateway),
		attribute.String("workflowID", wid),
		attribute.String("success", successStr),
		attribute.String("method", m.method),
	))
}

func newMetrics(method string) (*metrics, error) {
	h, err := beholder.GetMeter().Int64Histogram("platform_outgoing_connector_handler_single_node_request_duration_ms")
	if


RecyclerView(recyclerView: RecyclerView) {
        super.onDetachedFromRecyclerView(recyclerView)
        adapter.onDetachedFromRecyclerView(recyclerView)
        this.recyclerView = recyclerView
    }
}
package com.tongji.yanluapp.viewmodel

import androidx.lifecycle.MutableLiveData
import com.luck.picture.lib.entity.LocalMedia
import com.tongji.lib_common.network.apiService1
import com.tongji.lib_common.bean.AvatarResponse
import com.tongji.lib_common.bean.UpdateInfoResponse
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.ext.request
import me.hgj.jetpackmvvm.state.ResultState
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.MultipartBody
import okhttp3.RequestBody
import java.io.File

/**
 * @author: Kana (Tongji)
 * @date: 2022/9/14 16:24
 * @description:
 * @email: tongji0x208@gmail.com
 */
class MeViewModel : BaseViewModel() {

    var avatarResult = MutableLiveData<ResultState<AvatarResponse>>()
    var userInfo = MutableLiveData<UpdateInfoResponse>()

    // 上传单张图片
    fun uploadAvatar(file: LocalMedia) {
        val imageFile = File(file.realPath)
        val builder = MultipartBody.Builder().setType(MultipartBody.FORM) // 表单类型
        val requestFile: RequestBody = RequestBody.create("image/*".toMediaTypeOrNull(), imageFile)
        builder.addFormDataPart("file", imageFile.name, requestFile)
        val part = builder.build().part(0)

        request(
            { apiService1.uploadImage(part) } // 请求体
            , avatarResult, // 请求的返回结果
            false, ""
        )
    }

    fun updateInfo(userName: String, userSign: String) {
        request(
            { apiService1.updateInfo(userName, userSign) } //请求体
            , {
                userInfo.value?.userName = userName
                userInfo.value?.userSign = userSign
              }, {},
            false,
            "正在更新个人信息..."
        )
    }
}package com.tongji.yanluapp.ui.activity

import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import com.tongji.yanluapp.R
import com.tongji.yanluapp.app.App.Companion.context
import com.tongji.yanluapp.app.data.SchoolData.addList
import com.tongji.yanluapp.utils.initClose
import com.tongji.yanluapp.bean.School
import com.tongji.yanluapp.databinding.ActivitySearchResultBinding
import com.tongji.yanluapp.ui.adapter.SchoolAdapter
import com.tongji.yanluapp.viewmodel.SearchResultViewModel
import me.hgj.jetpackmvvm.base.appContext
import com.tongji.lib_base.ui.BaseActivity1

class SearchResultActivity : BaseActivity1<SearchResultViewModel, ActivitySearchResultBinding>() {

    private lateinit var schoolAdapter: SchoolAdapter

    @SuppressLint("ResourceAsColor")
    override fun initView(savedInstanceState: Bundle?) {
        val searchKey = intent.getStringExtra("searchKey")

        if (searchKey != null) {
            mViewBind.toolbar.initClose(searchKey) {
                it.setBackgroundColor(R.color.colorPrimary)
                finish()
            }
        }

        val schoolSearchList = mutableListOf<School>()
        if (searchKey != null) {
            addList().forEach {
                if (it.name.contains(searchKey) || it.type.contains(searchKey)) {
                    schoolSearchList.add(it)
                }
            }
        }

        val rvSchool = mViewB