resource being moved from, e.g. "aws_s3_bucket.example".

---

##### `moveTo`

```typescript
public moveTo(moveTarget: string, index?: string | number): void
```

Moves this resource to the target resource given by moveTarget.

###### `moveTarget`Required

- *Type:* string

The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.

---

###### `index`Optional

- *Type:* string | number

Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.

---

##### `moveToId`

```typescript
public moveToId(id: string): void
```

Moves this resource to the resource corresponding to "id".

###### `id`Required

- *Type:* string

Full id of resource to move to, e.g. "aws_s3_bucket.example".

---

##### `resetId`

```typescript
public resetId(): void
```

#### Static Functions

| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isTerraformElement | *No description.* |
| isTerraformResource | *No description.* |
| generateConfigForImport | Generates CDKTF code for importing a CloudwatchLogStream resource upon running "cdktf plan <stack-name>". |

---

##### `isConstruct`

```typescript
import { cloudwatchLogStream } from '@cdktf/aws-cdk'

cloudwatchLogStream.CloudwatchLogStream.isConstruct(x: any)
```

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, mult


ableClass': tableClass.value,
      },
    );

    return UpdateTableOutput.fromJson(jsonResponse.body);
  }

  /// Updates auto scaling settings on your global tables at once.
  /// <important>
  /// For global tables, this operation only applies to global tables using
  /// Version 2019.11.21 (Current version).
  /// </important>
  ///
  /// May throw [ResourceNotFoundException].
  /// May throw [ResourceInUseException].
  /// May throw [LimitExceededException].
  /// May throw [InternalServerError].
  ///
  /// Parameter [tableName] :
  /// The name of the global table to be updated. You can also provide the
  /// Amazon Resource Name (ARN) of the table in this parameter.
  ///
  /// Parameter [globalSecondaryIndexUpdates] :
  /// Represents the auto scaling settings of the global secondary indexes of
  /// the replica to be updated.
  ///
  /// Parameter [replicaUpdates] :
  /// Represents the auto scaling settings of replicas of the table that will be
  /// modified.
  Future<UpdateTableReplicaAutoScalingOutput> updateTableReplicaAutoScaling({
    required String tableName,
    List<GlobalSecondaryIndexAutoScalingUpdate>? globalSecondaryIndexUpdates,
    AutoScalingSettingsUpdate? provisionedWriteCapacityAutoScalingUpdate,
    List<ReplicaAutoScalingUpdate>? replicaUpdates,
  }) async {
    final headers = <String, String>{
      'Content-Type': 'application/x-amz-json-1.0',
      'X-Amz-Target': 'DynamoDB_20120810.UpdateTableReplicaAutoScaling'
    };
    final jsonResponse = await _protocol.send(
      method: 'POST',
      requestUri: '/',
      exceptionFnMap: _exceptionFns,
      // TODO queryParams
      headers: headers,
      payload: {
        'TableName': tableName,
        if (globalSecondaryIndexUpdates != null)
          'GlobalSecondaryIndexUpdates': globalSecondaryIndexUpdates,
        if (provisionedWriteCapacityAutoScalingUpdate != null)
          'ProvisionedWriteCapacityAutoScalingUpdate':
              provisionedWriteCapacityAutoScalingUpdate,
        if (replicaUpdates != null) 'ReplicaUpdates': replicaUpdates,
      },
    );

    return UpdateTableReplicaAutoScalingOutput.fromJson(jsonResponse.body);
  }

  /// The UpdateTimeToLive method enables or disables Time to Live
  /// (TTL) for the specified table. A successful UpdateTimeToLive
  /// call returns the current TimeToLiveSpecification. It can take
  /// up to one hour for the change to fully process. Any additional
  /// UpdateTimeToLive calls for the same table during this one
  /// hour duration result in a ValidationException.
  ///
  /// TTL compares the current time in epoch time format to the time stored in
  /// the TTL attribute of an item. If the epoch time value stored in the
  /// attribute is less than the current time, the item is marked as expired and
  /// subsequently deleted.
  /// <note>
  /// The epoch time format is the number of seconds elapsed since 12:00:00 AM
  /// January 1, 1970 UTC.
  /// </note>
  /// DynamoDB deletes expired items on a best-effort basis to ensure
  /// availability of throughput for other data operations.
  /// <important>
  /// DynamoDB typically deletes expired items within two days of expiration.
  /// The exact duration within which an item gets deleted after expiration is
  /// specific to the nature of the workload. Items that have expired and not
  /// been deleted will still show up in reads, queries, and scans.
  /// </important>
  /// As items are deleted, they are removed from any local secondary index and
  /// global secondary index immediately in the same eventually consistent way
  /// as a standard delete operation.
  ///


"""
Supabase client configuration for MCP-OAuth service.

This module provides a Supabase client instance for database operations.
It handles authentication and connection management.
"""

import os
from typing import Optional
from supabase import create_client, Client
from dotenv import load_dotenv

# Load environment variables
load_dotenv()

def create_supabase_client() -> Optional[Client]:
    """
    Create and configure Supabase client.

    Returns:
        Configured Supabase client or None if configuration is missing
    """
    supabase_url = os.getenv("SUPABASE_URL")
    supabase_key = os.getenv("SUPABASE_KEY")

    if not supabase_url or not supabase_key:
        print("Warning: SUPABASE_URL and SUPABASE_KEY environment variables must be set")
        return None

    try:
        client = create_client(supabase_url, supabase_key)
        return client
    except Exception as e:
        print(f"Error creating Supabase client: {e}")
        return None

# Global Supabase client instance
supabase_client = create_supabase_client()


3E      %3C/feMerge%3E    %3C/filter%3E  %3C/defs%3E  %3Cg fill='%23FFF' fill-rule='evenodd' %3E    %3Cpath d='M16 2.667c7.364 0 13.333 5.97 13.333 13.333 0 7.364-5.97 13.333-13.333 13.333-7.364 0-13.333-5.97-13.333-13.333C2.667 8.636 8.637 2.667 16 2.667zM20 20h-8v2.667h8V20zm-8.667-5.333H8.667v2.666h2.666v-2.666zm4 0h-2.666v2.666h2.666v-2.666zm4 0h-2.666v2.666h2.666v-2.666zm4 0h-2.666v2.666h2.666v-2.666zm-12-4H8.667v2.666h2.666v-2.666zm4 0h-2.666v2.666h2.666v-2.666zm4 0h-2.666v2.666h2.666v-2.666zm4 0h-2.666v2.666h2.666v-2.666z'/%3E  %3C/g%3E%3C/svg%3E") no-repeat 50% 50%}.comment__push_danmu .comment__push__input__counter{line-height:1.4;font-size:12px;color:rgba(0,0,0,.5);margin-top:-2px;padding:0 16px 4px 0;text-align:right}.comment__push_danmu .comment__push__input__counter_warn{color:#fa5151}.comment__push_danmu .comment__emoji__panel{padding:8px 60px}.comment__push__container .comment_emoji_panel_line{position:fixed;left:0;width:100%;height:1px;-ms-transform:scaleY(.5);transform:scaleY(.5);background:var(--weui-FG-3)}.comment__push__container .comment__emoji__panel:before{display:none}@media (prefers-color-scheme: dark){.comment__push_danmu .comment__push__input{color:rgba(255,255,255,.8)}.comment__push_danmu .comment__push__input:-ms-input-placeholder{color:rgba(255,255,255,.5)}.comment__push_danmu .comment__push__input::placeholder{color:rgba(255,255,255,.5)}.comment__push_danmu .comment__push__input_wrp{background:rgba(77,76,76,.8)}.comment__push_danmu .comment__push__extend .comment__push__btn{color:#fff}.comment__push_danmu .comment__push__input__counter{color:rgba(255,255,255,.5)}.comment__push_danmu .comment__push__input__counter_warn{color:#fa5151}}.comment__push_danmu.comment__push_immersive .comment__push__wrp{background-color:#191919}.comment__push_danmu.comment__push_immersive .comment__push__wrp .comment__push__inner{background-color:#1e1e1e}.comment__push_danmu.comment__push_immersive .comment__push__input{color:rgba(255,255,255,.8)}.comment__push_danmu.comment__push_immersive .comment__push__input:-ms-input-placeholder{color:rgba(255,255,255,.5)}.comment__push_danmu.comment__push_immersive .comment__push__input::placeholder{color:rgba(255,255,255,.5)}.comment__push_danmu.comment__push_immers


As(UnmanagedType.SafeArray)] float[] d, out int len)
    {
        len = d.Length;
        return Mean(d);
    }

    public double Mean_Double_SafeArray_OutLen([MarshalAs(U


ceoptions(string: String): SdpIceoptions? {
        val match = ICEOPTIONS.matchEntire(string) ?: return null
        val (value) = match.destructured
        return SdpIceoptions(value)
    }
    fun writeIceoptions(item: SdpIceoptions): String {
        return "ice-options:${item.value}"
    }

    private val SSRCS = """ssrc:(\d*) ([\w_-]*)(?::(.*))?""".toRegex()
    fun tryParseSsrcs(string: String): SdpSsrcs? {
        val match = SSRCS.matchEntire(string) ?: return null
        val (id, attribute, value) = match.destructured
        return SdpSsrcs(id, toOptionalString(attribute), toOptionalString(value))
    }
    fun writeSsrcs(item: SdpSsrcs): String {
        return "ssrc:${item.id}${if (item.attribute != null) (" " + item.attribute + (if (item.value != null) ":" + item.value else "")) else ""}"
    }

    private val SSRCGROUPS = """ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)""".toRegex()
    fun tryParseSsrcgroups(string: String): SdpSsrcgroups? {
        val match = SSRCGROUPS.matchEntire(string) ?: return null
        val (semantics, ssrcs) = match.destructured
        return SdpSsrcgroups(semantics, ssrcs)
    }
    fun writeSsrcgroups(item: SdpSsrcgroups): String {
        return "ssrc-group:${item.semantics} ${item.ssrcs}"
    }

    private val MSIDSEMANTIC = """msid-semantic:\s?(\w*) (\S*)""".toRegex()
    fun tryParseMsidsemantic(string: String): SdpMsidsemantic? {
        val match = MSIDSEMANTIC.matchEntire(string) ?: return null
        val (semantic, token) = match.destructured
        return SdpMsidsemantic(semantic, token)
    }
    fun writeMsidsemantic(item: SdpMsidsemantic): String {
        return "msid-semantic: ${item.semantic} ${item.token}"
    }

    private val GROUPS = """group:(\w*) (.*)""".toRegex()
    fun tryParseGroups(string: String): SdpGroups? {
        val match = GROUPS.matchEntire(string) ?: return null
        val (type, mids) = match.destructured
        return SdpGroups(type, mids)
    }
    fun writeGroups(item: SdpGroups): String {
        return "group:${item.type} ${item.mids}"
    }

    private val RTCPMUX = """(rtcp-mux)""".toRegex()
    fun tryParseRtcpmux(string: String): SdpRtcpmux? {
        val match = RTCPMUX.matchEntire(string) ?: return null
        val (value) = match.destructured
        return SdpRtcpmux(value)
    }
    fun writeRtcpmux(item: SdpRtcpmux): String {
        return "${item.value}"
    }

    private val RTCPRSIZE = """(rtcp-rsize)""".toRegex()
    fun tryParseRtcprsize(string: String): SdpRtcprsize? {
        val match = RTCPRSIZE.matchEntire(string) ?: return null
        val (value) = match.destructured
        return SdpRtcprsize(value)
    }
    fun writeRtcprsize(item: SdpRtcprsize): String {
        return "${item.value}"
    }

    private val SCTPMAP = """sctpmap:([\w_/]*) (\S*)(?: (\S*))?""".toRegex()
    fun tryParseSctpmap(string: String): SdpSctpmap? {
        val match = SCTPMAP.matchEntire(string) ?: return null
        val (sctpmapNumber) = match.destructured
        return SdpSctpmap(sct


"0", "1"]);
    expect(Object.keys(result[self].get())).toEqual(["0", "1"]);
});
import { IProduct } from "@/models/interfaces/product";

type ClothesSize = "S" | "M" | "L" | "XL" | "XXL";
type ShoeSize = 39 | 40 | 41 | 42 | 43 | 44 | 45;

export interface IFashionProduct extends IProduct {
  size: ClothesSize | ShoeSize;
  color: string;
}

import { RawCharacter, Fail, Parser, Error, Return } from "./Core";
import { char } from "./Source";
import { cons } from "./Utility";

export class ParserSettings {
	static WHITESPACE: (Parser<string> | string)[] = [" ", "\t", "\n", "\r"];
	static LINE_COMMENT = [];
	static LINE_COMMENT_END = ["\n"];
	static CASE_SENSITIVE = true;
}

// Base
export const RawLit = (c: char) => RawCharacter.matches(x => x === c);
export const RawSequence = (n: number) => RawCharacter.repeat(n).map(x => x.join(""));
export const RawLitSequence: (sequence: string) => Parser<string> =
	sequence => RawSequence(sequence.length).matches(x => x === sequence);

export const CharThatIsNotTheStartOf: (sequences: string[]) => Parser<char> = sequences =>
	Parser.orMany(sequences.map(s => RawLitSequence(s)))
	.or(RawCharacter)
	.matches(c => !sequences.includes(c));

export const LineComment =
	Parser.lazy(() =>
		Parser.orMany(ParserSettings.LINE_COMMENT.map(
			c => RawLitSequence(c)
		))
		.second(CharThatIsNotTheStartOf(ParserSettings.LINE_COMMENT_END).repeat())
	).map(s => s.join(""));

export const Character = LineComment.repeat().second(RawCharacter);

// Utility
export const Lit = (c: char) => Character.matches(x => x === c);

// Trivial
export const Space = Parser.lazy(() => Parser.orMany(ParserSettings.WHITESPACE.map(
	w => (w instanceof Parser) ? w : RawLitSequence(w)
)));
export const Digit = Character.matches(x => "0123456789".includes(x));
export const Letter = Character.matches(x => {
	const a = x.charCodeAt(0);
	return (a > 0x40 && a < 0x5B) || (a > 0x60 && a < 0x7B);
});
export const Alphanumeric = Letter.or(Digit);

// Derived
export const Word = Alphanumeric.repeat().map(x => x.join(""));
export const Spaces = Space.repeat();
export const Token = <T>(p: Parser<T>) => p.first(Spaces);
export const Integer = Digit.then(Digit.repeat()).map(x => Number.parseInt(cons(x).join("")));
export const Sequence = (n: number) => Character.repeat(n).map(x => x.join(""));

export const Accept: (token: string, cs?: boolean) => Parser<string> =
	(token, cs = ParserSettings.CASE_SENSITIVE) => Token(Sequence(token.length))
	.matches(x => x.localeCompare(token, undefined, { sensitivity: cs ? "variant" : "accent" }) === 0);

export const Require: (token: string, cs?: boolean) => Parser<string> =
	(token, cs = ParserSettings.CASE_SENSITIVE) => Accept(token).or(Error(`expected '${token}'`));

export const Allow: (token: string, cs?: boolean) => Parser<string> =
	(token, cs = ParserSettings.CASE_SENSITIVE) => Accept(token).or(Return(""));

export const Default: <T>(parser: Parser<T>, def: T) => Parser<T> =
	(p, d) => p.or(Return(d));
import { Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse } from '@angular/


/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: set ts=8 sts=4 et sw=4 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef GFXTEXTURESREPORTER_H_
#define GFXTEXTURESREPORTER_H_

#include "nsIMemoryReporter.h"
#include "GLTypes.h"

namespace mozilla {
namespace gl {

class GfxTexturesReporter MOZ_FINAL : public nsIMemoryReporter
{
public:
    NS_DECL_ISUPPORTS

    GfxTexturesReporter()
    {
#ifdef DEBUG
        // There must be only one instance of this class, due to |sAmount|
        // being static.  Assert this.
        static bool hasRun = false;
        MOZ_ASSERT(!hasRun);
        hasRun = true;
#endif
    }

    enum MemoryUse {
        // when memory being allocated is reported to a memory reporter
        MemoryAllocated,
        // when memory being freed is reported to a memory reporter
        MemoryFreed
    };

    // When memory is used/freed for tile textures, call this method to update
    // the value reported by this memory reporter.
    static void UpdateAmount(MemoryUse action, GLenum format, GLenum type,
                             uint16_t tileSize);

    NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                              nsISupports* aData)
    {
        return MOZ_COLLECT_REPORT(
            "gfx-textures", KIND_OTHER, UNITS_BYTES, sAmount,
            "Memory used for storing GL textures.");
    }

private:
    static int64_t sAmount;
};

}
}

#endif // GFXTEXTURESREPORTER_H_


overflow: hidden;
}
.tab {
	padding: 16px;
	display: none;
}
.tab h2 {
	font-weight: bold;
	font-size: 16px;
}
.tab h3 {
	font-weight: bold;
	font-size: 14px;
	margin-top: 20px;
}
.tab p {
	margin-top: 16px;
	clear: both;
}
.tab ul {
	margin-top: 16px;
	list-style: disc;
}
.tab li {
	margin: 10px 0 0 35px;
}
.tab a {
	color: #8FB0CF;
}
.tab strong {
	font-weight: bold;
}
.tab pre {
	font-size: 11px;
	margin-top: 20px;
	width: 668px;
	overflow: auto;
	clear: both;
}
.tab table {
	width: 100%;
}
.tab table td {
	padding: 6px 10px 6px 0;
	vertical-align: top;
}
.tab dt {
	margin-top: 16px;
}

#colorSelector {
	position: relative;
	width: 36px;
	height: 36px;
	background: url(../images/select.png);
}
#colorSelector div {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 30px;
	height: 30px;
	background: url(../images/select.png) center;
}
#colorSelector2 {
	position: absolute;
	top: 0;
	left: 0;
	width: 36px;
	height: 36px;
	background: url(../images/select2.png);
}
#colorSelector2 div {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 28px;
	height: 28px;
	background: url(../images/select2.png) center;
}
#colorpickerHolder2 {
	top: 32px;
	left: 0;
	width: 356px;
	height: 0;
	overflow: hidden;
	position: absolute;
}
#colorpickerHolder2 .colorpicker {
	background-image: url(../images/custom_background.png);
	position: absolute;
	bottom: 0;
	left: 0;
}
#colorpickerHolder2 .colorpicker_hue div {
	background-image: url(../images/custom_indic.gif);
}
#colorpickerHolder2 .colorpicker_hex {
	background-image: url(../images/custom_hex.png);
}
#colorpickerHolder2 .colorpicker_rgb_r {
	background-image: url(../images/custom_rgb_r.png);
}
#colorpickerHolder2 .colorpicker_rgb_g {
	background-image: url(../images/custom_rgb_g.png);
}
#colorpickerHolder2 .colorpicker_rgb_b {
	background-image: url(../images/custom_rgb_b.png);
}
#colorpickerHolder2 .colorpicker_hsb_s {
	background-image: url(../images/custom_hsb_s.png);
	display: none;
}
#colorpickerHolder2 .colorpicker_hsb_h {
	background-image: url(../images/custom_hsb_h.png);
	display: none;
}
#colorpickerHolder2 .colorpicker_hsb_b {
	background-image: url(../images/custom_hsb_b.png);
	display: none;
}
#colorpickerHolder2 .colorpicker_submit {
	background-image: url(../images/custom_submit.png);
}
#colorpickerHolder2 .colorpicker input {
	color: #778398;
}
#customWidget {
	position: relative;
	height: 36px;
}
/* Reset */
.o2k7SimpleSkin table, .o2k7SimpleSkin tbody, .o2k7SimpleSkin a, .o2k7SimpleSkin img, .o2k7SimpleSkin tr, .o2k7SimpleSkin div, .o2k7SimpleSkin td


helper.ConstraintMapper.Constraints.Keys;
            _constraintNames = new SortedDictionary<string, bool>();
            foreach (var functionName in constraintFunctions)
                _constraintNames[functionName] = false;
        }

        private void OnPreModify()
        {
            _sketchNode = _document.Root.Get<DocumentContextInterpreter>().ActiveSketch == -1 ? new SketchCreator(_document, false).CurrentSketch :
                  _document.Root[_document.Root.Get<DocumentContextInterpreter>().ActiveSketch];
            if (_sketchNode == null)
                return;
            if (_constraintNames == null)
                PopulateConstraintNames(_document);

            _helper = new ConstraintDocumentHelper(_document, _sketchNode);
            _helper.ComputeSolverOnImpactedNodes(_constraintNames);
        }
    }
}


# to check whether the number is positive or negative
print("Check whether the number you enter is +ve or -ve")
num = float(input("Enter the number to check: "))
if num < 0:
    print(f"The number {num} is negative!")
elif num == 0 :
    print(f"The number {num} is zero!")
elif num > 0:
    print(f"The number {num} is positive!")
else:
    print("Pls enter a valid option")


r9,-EFAULT
2:	STXVD2X(0,0,r4)
	li	r9,0
3:	beq	cr7,4f
	LXVD2X(0,r1,r8)
4:	PPC_LL	r0,STKFRM+PPC_LR_STKOFF


 fileCoverage3 = createFileCoverage(fileCoverageData);
fileCoverage3.data;

// CoverageSummary methods and properties
summary1.isEmpty();
summary1.toJSON();
summary1.merge(summary2);

// CoverageMap methods and properties
map1.addFileCoverage('foo.js');
map1.addFileCoverage(fileCoverageData);
map1.files()[0];
map1.fileCoverageFor('foo').path;
map1.filter(name => false);
map1.merge(map2);
map1.merge(coverageMapData);

// FileCoverage methods and properties
fileCoverage1.merge(fileCoverageData);
fileCoverage1.merge(fileCoverage2.data);
fileCoverage1.getBranchCoverageByLine()[5].covered;
isNaN(fileCoverage1.getLineCoverage()[5]);
isNaN(fileCoverage1.getUncoveredLines()[5]);
fileCoverage1.resetHits();
fileCoverage1.computeBranchTotals().skipped;
fileCoverage1.computeSimpleTotals().skipped;
isNaN(fileCoverage1.toSummary().branches.total);
import {isDef, isUndef} from "../index";
import {log} from "../log";

/**
 * @description 专门为代理系统设计的事件类
 * @param eventMap Map<Object, Map<key, Function>> 每个对象实例都有一个map，map是这个对象的所有key的监听事件，这样可以
 * 实现不同对象不同属性的劫持
 */
export class ProxyEvent {
  eventMap: Map<any, Map<string, Array<Function>>>;

  constructor() {
    this.eventMap = new Map();
  }

  on(target: any, key: any, cb: Function) {
    let keyMap = this.eventMap.get(target);

    if (isUndef(keyMap)) {
      this.eventMap.set(target, keyMap = new Map<string, Array<Function>>());
    }

    let eventSub = keyMap.get(key);
    if (isUndef(eventSub)) {
      keyMap.set(key, eventSub = []);
    }

    eventSub.push(cb);
  }

  remove(target?: any, key?: any, cb?: Function) {
    if (isUndef(target)) {
      this.eventMap = new Map();
    } else if (isUndef(key)) {
      this.eventMap.set(target, new Map<string, Array<Function>>());
    } else {
      let keyMap = this.eventMap.get(target);
      let eventSub = keyMap.get(key);

      if (isDef(eventSub)) {
        let newSub = [];

        for (let item of eventSub) {
          if (item !== cb) {
            newSub.push(item);
          }
        }

        keyMap.set(key, newSub);
      }
    }
  }

  emit(target: any, key?: any, ...data) {
    if (!this.eventMap.has(target)) {
      return ;
    }

    let keyMap = this.eventMap.get(target);

    let eventSub = keyMap.get(key);

    if (isDef(eventSub)) {
      // 如果事件存在回调
      let subShotCut = eventSub.slice();

      try {
        for (let item of subShotCut) {
          item(...data);
        }
      } catch (e) {
        // 打印错误
        log(e);
      }
    }
  }

  once(target: any, key: string, cb: Function) {
    let warp = (...data) => {
      cb(...data);
      this.remove(target, key, warp);
    };

    this.on(target, key, warp);
  }
}
import { LinkedNode } from '@/dataStructures/LinkedList';

function removeDups(head: LinkedNode) {
  if (!head) {
    return null;
  }
  let current = head;
  let prev = null;
  const repeatedNodes = new Map();
  while(current) {
    if (repeatedNodes.has(current.value)) {
      prev.next = current.next;
    } else {
      repeatedNodes.set(current.value, current.value);
      prev = current;
    }
    cu


: ${if (created) status.text else "uncreated"}")
            else -> add("Status: ${if (available) "available" else "unavailable"}")
        }
        if (this@details is LocalInstance) {
            add("Debug port: ${debugPort.get()}")
            if (pid > 0) add("Process ID: $pid")
        }
        if (available) {
            add("State check: $state")
            add("Run path: $runningPath")
            add("Run modes: ${runningModes.joinToString(",")}")

            add("Time zone: ${zoneId.id} (GMT${zoneOffset.id})")
            add("Operating system: $osInfo")
            add("Java: $javaInfo")
        }
    }.joinToString("\n")

    @Suppress("TooGenericExceptionCaught")
    private fun Instance.packagesInstalled(packageFiles: List<File>) = if (available) {
        try {
            sync {
                packageManager.listRetry.never()
                packageFiles
                    .map { file -> PackageFile(file, if (file.exists()) packageManager.find(file) else null) }
                    .sortedWith(
                        compareByDescending<PackageFile> {
                            it.pkg?.lastUnpacked ?: 0L
                        }.thenBy { it.file.name }
                    )
                    .joinToString("\n") { (file, pkg) ->
                        when {
                            !file.exists() -> "${file.name} | not built"
                            pkg == null -> "${file.name} | not uploaded | ${Formats.fileSize(file)}"
                            !pkg.installed -> "${file.name} | not yet | ${Formats.fileSize(file)}"
                            else -> "${file.name} | ${pkg.installedDate} | ${Formats.fileSize(file)}"
                        }
                    }
            }.ifBlank { "none" }
        } catch (e: Exception) {
            logger.debug("Installed packages error", e)
            "error - ${e.message}"
        }
    } else {
        "unknown"
    }

    data class PackageFile(val file: File, val pkg: Package?)
}
package com.cognifide.gradle.aem.common.instance

import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.instance.service.auth.AuthManager
import com.cognifide.gradle.aem.common.instance.service.crx.Crx
import com.cognifide.gradle.aem.common.instance.service.groovy.GroovyConsole
import com.cognifide.gradle.aem.common.instance.service.osgi.OsgiFramework
import com.cognifide.gradle.aem.common.instance.service.pkg.PackageManager
import com.cognifide.gradle.aem.common.instance.service.repository.Repository
import com.cognifide.gradle.aem.common.instance.service.sling.SlingInstaller
import com.cognifide.gradle.aem.common.instance.service.status.Status
import com.cognifide.gradle.aem.common.instance.service.workflow.WorkflowManager

class InstanceSync(val aem: AemExtension, val instance: Instance) {

    val http by lazy { InstanceHttpClient(aem, instance) }

    /**
     * Perform easily any HTTP requests to AEM instance.
     */
    fun <T> http(callback: InstanceHttpClient.() -> T): T = http.run(callback)

    val osgiFramework by lazy { OsgiFramework(this) }

    val osgi get() = osgiFramework

    /**
     * Control OSGi framework (Apache Felix) on AEM instance.
     */
    fun <T> osgiFramework(callback: OsgiFramework.() -> T): T = osgiFramework.run(callback)

    val packageManager by lazy { PackageManager(this) }

    /**
     * Manage CRX pack


ingNetwork{
				MockGetaddrinfoLookupANY: func(ctx context.Context, domain string) ([]string, string, error) {
					return nil, "", errors.New("mocked error")
				},
				MockGetaddrinfoResolverNetwork: func() string {
					return "antani"
				},
			}}
			handler := testingx.NewHTTPProxyHandler(log.Log, netx)
			req := &http.Request{
				Method: http.MethodGet,
				Host:   "www.example.com",
				Header: http.Header{},
				URL:    &url.URL{},
			}
			handler.ServeHTTP(rr, req)
			res := rr.Result()
			if res.StatusCode != http.StatusBadGateway {
				t.Fatal("unexpected status code", res.StatusCode)
			}
		})

		t.Run("with a CONNECT request", func(t *testing.T) {
			rr := httptest.NewRecorder()
			netx := &netxlite.Netx{Underlying: &mocks.UnderlyingNetwork{
				MockGetaddrinfoLookupANY: func(ctx context.Context, domain string) ([]string, string, error) {
					return nil, "", errors.New("mocked error")
				},
				MockGetaddrinfoResolverNetwork: func() string {
					return "antani"
				},
			}}
			handler := testingx.NewHTTPProxyHandler(log.Log, netx)
			req := &http.Request{
				Method: http.MethodConnect,
				Host:   "www.example.com:443",
				Header: http.Header{},
				URL:    &url.URL{},
			}
			handler.ServeHTTP(rr, req)
			res := rr.Result()
			if res.StatusCode != http.StatusBadGateway {
				t.Fatal("unexpected status code", res.StatusCode)
			}
		})
	})
}
package testingx

import (
	"sync"
	"time"
)

// TimeDeterministic implements time.Now in a deterministic fashion
// such that every time.Time call returns a moment in time that occurs
// one second after the configured zeroTime.
//
// It's safe to use this struct from multiple goroutine contexts.
type TimeDeterministic struct {
	// counter counts the number of "ticks" passed since the zero time: each
	// call to Now increments this counter by one second.
	counter time.Duration

	// mu protects fields in this structure from concurrent access.
	mu sync.Mutex

	// zeroTime is the lazy-initialized zero time. The first call to Now
	// will initialize this field with the current time.
	zeroTime time.Time
}

// NewTimeDeterministic creates a new instance using the given zeroTime value.
func NewTimeDeterministic(zeroTime time.Time) *TimeDeterministic {
	return &TimeDeterministic{
		counter:  0,
		mu:       sync.Mutex{},
		zeroTime: zeroTime,
	}
}

// Now is like time.Now but more deterministic. The first call returns the
// configured zeroTime and subsequent calls return moments in time that occur
// exactly one second after the time returned by the previous call.
func (td *TimeDeterministic) Now() time.Time {
	td.mu.Lock()
	if td.zeroTime.IsZero() {
		td.zeroTime = time.Now()
	}
	offset := td.counter
	td.counter += time.Second
	res := td.zeroTime.Add(offset)
	td.mu.Unlock()
	return res
}
package testingx

import (
	"context"
	"errors"
	"net"
	"sync"

	"github.com/ooni/probe-cli/v3/internal/runtimex"
)

//


].SetV(p1s[2]);
			//p2s[0] = p2s[2];
			p2s[0].SetV(p2s[2]);
			//points[0] = points[2];
			points[0].SetV(points[2]);
			return 2;
		}

		// In edge ac region?
		//float32 vb = n * b2Cross(c, a);
		var vb = n * (cX * aY - cY * aX);
		if (vb <= 0.0 && tn >= 0.0 && td >= 0.0)
		{
			//b2Settings.b2Assert(tn + td > 0.0);

			//float32 lambda = tn / (tn + td);
			var lambda = tn / (tn + td);
			//*p1Out = p1s[0] + lambda * (p1s[2] - p1s[0]);
			p1Out.x = p1s[0].x + lambda * (p1s[2].x - p1s[0].x);
			p1Out.y = p1s[0].y + lambda * (p1s[2].y - p1s[0].y);
			//*p2Out = p2s[0] + lambda * (p2s[2] - p2s[0]);
			p2Out.x = p2s[0].x + lambda * (p2s[2].x - p2s[0].x);
			p2Out.y = p2s[0].y + lambda * (p2s[2].y - p2s[0].y);
			//p1s[1] = p1s[2];
			p1s[1].SetV(p1s[2]);
			//p2s[1] = p2s[2];
			p2s[1].SetV(p2s[2]);
			//points[1] = points[2];
			points[1].SetV(points[2]);
			return 2;
		}

		// Inside the triangle, compute barycentric coordinates
		//float32 denom = va + vb + vc;
		var denom = va + vb + vc;
		//b2Settings.b2Assert(denom > 0.0);
		denom = 1.0 / denom;
		//float32 u = va * denom;
		var u = va * denom;
		//float32 v = vb * denom;
		var v = vb * denom;
		//float32 w = 1.0f - u - v;
		var w = 1.0 - u - v;
		//*p1Out = u * p1s[0] + v * p1s[1] + w * p1s[2];
		p1Out.x = u * p1s[0].x + v * p1s[1].x + w * p1s[2].x;
		p1Out.y = u * p1s[0].y + v * p1s[1].y + w * p1s[2].y;
		//*p2Out = u * p2s[0] + v * p2s[1] + w * p2s[2];
		p2Out.x = u * p2s[0].x + v * p2s[1].x + w * p2s[2].x;
		p2Out.y = u * p2s[0].y + v * p2s[1].y + w * p2s[2].y;
		return 3;
	},
  InPoinsts : function(w, points, pointCount) {
		for (var i = pointCount; i--;)
		{
			if (w.x == points[i].x && w.y == points[i].y)
			{
				return true;
			}
		}

		return false;
	},
  Distance : function(p1Out, p2Out, shape1, shape2) {
		//b2Vec2 p1s[3], p2s[3];
		var p1s = new Array(3);
		var p2s = new Array(3);
		//b2Vec2 points[3];
		var points = new Array(3


mmand), typeof(NavigationCompact), new PropertyMetadata(null));

    /// <summary>
    /// Gets or sets a value indicating whether the menu is expanded.
    /// </summary>
    public bool IsExpanded
    {
        get => (bool)GetValue(IsExpandedProperty);
        set => SetValue(IsExpandedProperty, value);
    }

    /// <summary>
    /// Command triggered after clicking the button.
    /// </summary>
    public Common.IRelayCommand TemplateButtonCommand => (Common.IRelayCommand)GetValue(TemplateButtonCommandProperty);

    /// <summary>
    /// Creates new instance and sets default <see cref="TemplateButtonCommandProperty"/>.
    /// </summary>
    public NavigationCompact() : base() =>
        SetValue(TemplateButtonCommandProperty, new Common.RelayCommand(o => Button_OnClick(this, o)));

    private void Button_OnClick(object sender, object parameter)
    {
        if (parameter == null)
            return;

        string param = parameter as string ?? String.Empty;

#if DEBUG
        System.Diagnostics.Debug.WriteLine($"INFO: {typeof(NavigationCompact)} button clicked with param: {param}", "Wpf.Ui.NavigationCompact");
#endif
        if (param == "hamburger")
            IsExpanded = !IsExpanded;
    }
}


a: "\f774\f774"; }
.fa-water-rise { --fa: "\f775"; --fa--fa: "\f775\f775"; }
.fa-watermelon-slice { --fa: "\e337"; --fa--fa: "\e337\e337"; }
.fa-wave { --fa: "\e65b"; --fa--fa: "\e65b\e65b"; }
.fa-wave-pulse { --fa: "\f5f8"; --fa--fa: "\f5f8\f5f8"; }
.fa-wave-sine { --fa: "\f899"; --fa--fa: "\f899\f899"; }
.fa-wave-square { --fa: "\f83e"; --fa--fa: "\f83e\f83e"; }
.fa-wave-triangle { --fa: "\f89a"; --fa--fa: "\f89a\f89a"; }
.fa-waveform { --fa: "\f8f1"; --fa--fa: "\f8f1\f8f1"; }
.fa-waveform-circle { --fa: "\e12d"; --fa--fa: "\e12d\e12d"; }
.fa-waveform-lines { --fa: "\f8f2"; --fa--fa: "\f8f2\f8f2"; }
.fa-waveform-path { --fa: "\f8f2"; --fa--fa: "\f8f2\f8f2"; }
.fa-waves-sine { --fa: "\e65d"; --fa--fa: "\e65d\e65d"; }
.fa-web-awesome { --fa: "\e682"; --fa--fa: "\e682\e682"; }
.fa-webcam { --fa: "\f832"; --fa--fa: "\f832\f832"; }
.fa-webcam-slash { --fa: "\f833"; --fa--fa: "\f833\f833"; }
.fa-webhook { --fa: "\e5d5"; --fa--fa: "\e5d5\e5d5"; }
.fa-weight { --fa: "\f496"; --fa--fa: "\f496\f496"; }
.fa-weight-hanging { --fa: "\f5cd"; --fa--fa: "\f5cd\f5cd"; }
.fa-weight-scale { --fa: "\f496"; --fa--fa: "\f496\f496"; }
.fa-whale { --fa: "\f72c"; --fa--fa: "\f72c\f72c"; }
.fa-wheat { --fa: "\f72d"; --fa--fa: "\f72d\f72d"; }
.fa-wheat-alt { --fa: "\e2cd"; --fa--fa: "\e2cd\e2cd"; }
.fa-wheat-awn { --fa: "\e2cd"; --fa--fa: "\e2cd\e2cd"; }
.fa-wheat-awn-circle-exclamation { --fa: "\e598"; --fa--fa: "\e598\e598"; }
.fa-wheat-awn-slash { --fa: "\e338"; --fa--fa: "\e338\e338"; }
.fa-wheat-slash { --fa: "\e339"; --fa--fa: "\e339\e339"; }
.fa-wheelchair { --fa: "\f193"; --fa--fa: "\f193\f193"; }
.fa-wheelchair-alt { --fa: "\e2ce"; --fa--fa: "\e2ce\e2ce"; }
.fa-wheelchair-move { --fa: "\e2ce"; --fa--fa: "\e2ce\e2ce"; }
.fa-whiskey-glass { --fa: "\f7a0"; --fa--fa: "\f7a0\f7a0"; }
.fa-whiskey-glass-ice { --fa: "\f7a1"; --fa--fa: "\f7a1\f7a1"; }
.fa-whistle { --fa: "\f460"; --fa--fa: "\f460\f460"; }


l be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 * CA 95054 USA or visit www.sun.com if you need additional information or
 * have any questions.
 */

package sun.tools.java;

import java.util.Hashtable;
import java.io.PrintStream;
import java.util.Enumeration;

/**
 * A class to represent identifiers.

 *
 * An identifier instance is very similar to a String. The difference
 * is that identifier can't be instanciated directly, instead they are
 * looked up in a hash table. This means that identifiers with the same
 * name map to the same identifier object. This makes comparisons of
 * identifiers much faster.

 *
 * A lot of identifiers are qualified, that is they have '.'s in them.
 * Each qualified identifier is chopped up into the qualifier and the
 * name. The qualifier is cached in the value field.

 *
 * Unqualified identifiers can have a type. This type is an integer that
 * can be used by a scanner as a token value. This value has to be set
 * using the setType method.

 *
 * WARNING: The contents of this source file are not part of any
 * supported API.  Code that depends on them does so at its own risk:
 * they are subject to change or removal without notice.
 *
 * @author      Arthur van Hoff
 */

public final
class Identifier implements Constants {
    /**
     * The hashtable of identifiers
     */
    static Hashtable hash = new Hashtable(3001, 0.5f);

    /**
     * The name of the identifier
     */
    String name;

    /**
     * The value of the identifier, for keywords this is an
     * instance of class Integer, for qualified names this is
     * another identifier (the qualifier).
     */
    Object value;

    /**
     * The Type which corresponds to this Identifier.  This is used as
     * cache for Type.tClass() and shouldn't be used outside of that
     * context.
     */
    Type typeObject = null;

    /**
     * The index of INNERCLASS_PREFIX in the name, or -1 if none.
     */
    private int ipos;

    /**
     * Construct an identifier. Don't call this directly,
     * use lookup instead.
     * @see Identifier.lookup
     */
    private Identifier(String name) {
        this.name = name;
        this.ipos = name.indexOf(INNERCLASS_PREFIX);
    }

    /**
     * Get the type of the identifier.
     */
    int getType() {
        return ((value != null) && (value instanceof Integer)) ?
                ((Integer)value).intValue() : IDENT;
    }

    /**
     * Set the type of the identifier.
     */
    void setType(int t) {
        value = new Integer(t);
        //System.out.println("type(" + this + ")=" + t);
    }

    /**
     * Lookup an identifier.
     */
    public static synchronized Identifier lookup(String s) {
        //System.out.println("lookup(" + s + ")");
        Identifier id = (Identifier)hash.get(s);
        if (id == null) {
            hash.put(s, id = new Identifier(s));
        }
        return id;
    }

    /**
     * Lookup a qualified identifier.
     */
    public static Identifier lookup(Identifier q, Identifier n) {
        // lookup("", x) => x
        if (q == idNull)  return n;
        // lookup(lookupInner(c, ""), n) => lookupInner(c, lookup("", n))
        if (q.name.charAt(q.name.length()-1) == INNERCLASS_PREFIX)
            return lookup(q.name+n.name);
        Identifier id = lookup(q + "." + n);


  					this._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);
  				}
  			}
  		}

  		for (key in this._tiles) {
  			if (!this._tiles[key].retain) {
  				this._removeTile(key);
  			}
  		}
  	},

  	_removeTilesAtZoom: function (zoom) {
  		for (var key in this._tiles) {
  			if (this._tiles[key].coords.z !== zoom) {
  				continue;
  			}
  			this._removeTile(key);
  		}
  	},

  	_removeAllTiles: function () {
  		for (var key in this._tiles) {
  			this._removeTile(key);
  		}
  	},

  	_invalidateAll: function () {
  		for (var z in this._levels) {
  			remove(this._levels[z].el);
  			this._onRemoveLevel(Number(z));
  			delete this._levels[z];
  		}
  		this._removeAllTiles();

  		this._tileZoom = undefined;
  	},

  	_retainParent: function (x, y, z, minZoom) {
  		var x2 = Math.floor(x / 2),
  		    y2 = Math.floor(y / 2),
  		    z2 = z - 1,
  		    coords2 = new Point(+x2, +y2);
  		coords2.z = +z2;

  		var key = this._tileCoordsToKey(coords2),
  		    tile = this._tiles[key];

  		if (tile && tile.active) {
  			tile.retain = true;
  			return true;

  		} else if (tile && tile.loaded) {
  			tile.retain = true;
  		}

  		if (z2 > minZoom) {
  			return this._retainParent(x2, y2, z2, minZoom);
  		}

  		return false;
  	},

  	_retainChildren: function (x, y, z, maxZoom) {

  		for (var i = 2 * x; i < 2 * x + 2; i++) {
  			for (var j = 2 * y; j < 2 * y + 2; j++) {

  				var coords = new Point(i, j);
  				coords.z = z + 1;

  				var key = this._tileCoordsToKey(coords),
  				    tile = this._tiles[key];

  				if (tile && tile.active) {
  					tile.retain = true;
  					continue;

  				} else if (tile && tile.loaded) {
  					tile.retain = true;
  				}

  				if (z + 1 < maxZoom) {
  					this._retainChildren(i, j, z + 1, maxZoom);
  				}
  			}
  		}
  	},

  	_resetView: function (e) {
  		var animating = e && (e.pinch || e.flyTo);
  		this._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);
  	},

  	_animateZoom: function (e) {
  		this._setView(e.center, e.zoom, true, e.noUpdate);
  	},

  	_clampZoom: function (zoom) {
  		var options = this.options;

  		if (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) {
  			return options.minNativeZoom;
  		}

  		if (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) {
  			return options.maxNativeZoom;
  		}

  		return zoom;
  	},

  	_setView: function (center, zoom, noPrune, noUpdate) {
  		var tileZoom = Math.r


liticalcontributions)
                ) t ORDER BY x->'election_year' DESC
            ) tt)
            WHERE candidate_id = %s AND election_year >= %s
        ''', [complement['candidate_uid'], complement['election_year'], ])

conn = db_settings.con()
conn_another = db_settings.con_another()
c = conn.cursor()
c_another = conn_another.cursor()
election_year = ast.literal_eval(argv[1])['election_year']
df = pd.read_csv('../../data/candidates/%s/sunshine_account.csv' % election_year, encoding='utf-8', usecols=[0, 1], header=None)
for row in df.iterrows():
    if not row[0]:
        continue
    candidate = {}
    candidate['type'] = 'councilors' if re.search(u'議員', row[1]) else 'mayors'
    candidate['county'] = re.search(u'年(\W+[縣市])'].group()
    candidate['name'] = common.normalize_person_name(row[0])
    candidate['election_year'] = election_year
    if candidate['type'] = 'councilors':
        candidate['constituency'] = int(match.group('num'))
    else:
        candidate['constituency'] = 0
    if position_type == 'mayors':
        candidate['candidate_uid'], created = common.get_or_create_moyor_candidate_uid(c, candidate)
    else:
        candidate['candidate_uid'], created = common.get_or_create_candidate_uid(c, candidate)
    candidate['candidate_term_uid'] = '%s-%s' % (candidate['candidate_uid'], election_year)
    candidate['councilor_uid'], created = common.get_or_create_councilor_uid(c, candidate, create=False)
    candidate['councilor_term_id'] = common.getDetailIdFromUid(c, candidate['councilor_uid'], election_year, candidate['county'])
    candidate['councilor_terms'] = common.councilor_terms(c, candidate) if created else None
    if position_type == 'mayors':
        candidate['mayor_uid'] = candidate['candidate_uid']
        if candidate['mayor_uid']:
            candidate['mayor_terms'] = common.mayor_terms(c, candidate)
        candidate['legislator_uid'] = common.get_legislator_uid(c_another, candidate['name'])
        candidate['legislator_data'] = common.get_legislator_data(c_another, candidate['legislator_uid'])
        if candidate['legislator_uid']:
            candidate['legislator_terms'] = common.legislator_terms(c_another, candidate)
            candidate['legislator_candidate_info'] = common.get_elected_legislator_candidate_info(c_another, candidate)
            if candidate['legislator_candidate_info']:
                candidate['birth'] = candidate['legislator_candidate_info']['birth']
    upsertCandidates(candidate)
#conn.commit()


_OBJECT = 2805,
    // (undocumented)
    CREDENTIALS_NOT_SUPPORTED_WITH_XHR = 2818,
    // (undocumented)
    HEADERS_ALTERED_BY_TRANSFER_CACHE = -2802,
    // (undocumented)
    HTTP_ORIGIN_MAP_CONTAINS_PATH = 2804,
    // (undocumented)
    HTTP_ORIGIN_MAP_USED_IN_CLIENT = 2803,
    // (undocumented)
    INTEGRITY_NOT_SUPPORTED_WITH_XHR = 2820,
    // (undocumented)
    INVALID_TIMEOUT_VALUE = 2822,
    // (undocumented)
    JSONP_HEADERS_NOT_SUPPORTED = 2812,
    // (undocumented)
    JSONP_WRONG_METHOD = 2810,
    // (undocumented)
    JSONP_WRONG_RESPONSE_TYPE = 2811,
    // (undocumented)
    KEEPALIVE_NOT_SUPPORTED_WITH_XHR = 2813,
    // (undocumented)
    MISSING_JSONP_MODULE = -2800,
    // (undocumented)
    MODE_NOT_SUPPORTED_WITH_XHR = 2816,
    // (undocumented)
    NOT_USING_FETCH_BACKEND_IN_SSR = 2801,
    // (undocumented)
    PRIORITY_NOT_SUPPORTED_WITH_XHR = 2815,
    // (undocumented)
    REDIRECT_NOT_SUPPORTED_WITH_XHR = 2817,
    // (undocumented)
    REFERRER_NOT_SUPPORTED_WITH_XHR = 2821,
    // (undocumented)
    REFERRER_POLICY_NOT_SUPPORTED_WITH_XHR = 2823,
    // (undocumented)
    RESPONSE_IS_NOT_A_BLOB = 2807,
    // (undocumented)
    RESPONSE_IS_NOT_A_STRING = 2808,
    // (undocumented)
    RESPONSE_IS_NOT_AN_ARRAY_BUFFER = 2806,
    // (undocumented)
    UNHANDLED_OBSERVE_TYPE = 2809,
    // (undocumented)
    WITH_CREDENTIALS_OVERRIDES_EXPLICIT_CREDENTIALS = 2819
}

// (No @packageDocumentation comment for this package)

```
## API Report File for "@angular/common_testing"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import * as i0 from '@angular/core';
import { InjectionToken } from '@angular/core';
import { Location as Location_2 } from '@angular/common';
import { LocationStrategy } from '@angular/common';
import { Provider } from '@angular/core';
import { SubscriptionLike } from 'rxjs';

// @public
export const MOCK_PLATFORM_LOCATION_CONFIG: InjectionToken<MockPlatformLocationConfig>;

// @public
export class MockLocationStrategy extends LocationStrategy {
    constructor();
    // (undocumented)
    back(): void;
    // (undocumented)
    forward(): void;
    // (undocumented)
    getBaseHref(): string;
    // (undocumented)
    getState(): unknown;
    // (undocumented)
    internalBaseHref: string;
    // (undocumented)
    internalPath: string;
    // (undocumented)
    internalTitle: string;
    // (undocumented)
    onPopState(fn: (value: any) => void): void;
    // (undocumented)
    path(includeHash?: boolean): string;
    // (undocumented)
    prepareExternalUrl(internal: string): string;
    // (undocumented)
    pushState(ctx: any, title: string, path: string, query: string): void;
    // (undocumented)
    replaceState(ctx: any, title: string, path: string, query: string): void;
    // (undocumented)
    simulatePopState(url: string): void;
    // (undocumented)
    urlChanges: string[];
    // (undocumented)
    static


ro Band' },
  { type: 'LongHairNotTooLong', text: 'Not Too Long' },
  { type: 'LongHairShavedSides', text: 'Shaved Sides' },
  { type: 'LongHairMiaWallace', text: 'Mia Wallace' },
  { type: 'LongHairStraight', text: 'Straight' },
  { type: 'LongHairStraight2', text: 'Straight 2' },
  { type: 'LongHairStraightStrand', text: 'Straight Strand' },
  { type: 'ShortHairDreads01', text: 'Dreads 1' },
  { type: 'ShortHairDreads02', text: 'Dreads 2' },
  { type: 'ShortHairFrizzle', text: 'Frizzle' },
  { type: 'ShortHairShaggyMullet', text: 'Shaggy Mullet' },
  { type: 'ShortHairShortCurly', text: 'Curly' },
  { type: 'ShortHairShortFlat', text: 'Flat' },
  { type: 'ShortHairShortRound', text: 'Round' },
  { type: 'ShortHairShortWaved', text: 'Waved' },
  { type: 'ShortHairSides', text: 'Sides' },
  { type: 'ShortHairTheCaesar', text: 'The Caesar' },
  {
    type: 'ShortHairTheCaesarSidePart',
    text: 'The Caesar Side Part',
  },
];

export const hats: iType[] = [
  { type: 'Eyepatch' },
  { type: 'Hat' },
  { type: 'Hijab' },
  { type: 'Turban' },
  { type: 'WinterHat1', text: 'Winter Hat' },
  { type: 'WinterHat2', text: 'Alaska' },
  { type: 'WinterHat3', text: 'Winter Cute' },
  { type: 'WinterHat4', text: 'Kawai' },
];

export const facialHairs: iType[] = [
  { type: 'Black', text: 'None' },
  { type: 'BeardMedium', text: 'Medium' },
  { type: 'BeardLight', text: 'Light' },
  { type: 'BeardMajestic', text: 'Majestic' },
  { type: 'MoustacheFancy', text: 'Fancy Moustache' },
  { type: 'MoustacheMagnum', text: 'Magnum Moustache' },
];

export const eyes: iType[] = [
  { type: 'Default' },
  { type: 'Close', text: 'Closed' },
  { type: 'Cry' },
  { type: 'Dizzy' },
  { type: 'EyeRoll', text: 'Eye Roll' },
  { type: 'Happy' },
  { type: 'Hearts' },
  { type: 'Side' },
  { type: 'Squint' },
  { type: 'Surprised' },
  { type: 'Wink' },
  { type: 'WinkWacky', text: 'Wink Wacky' },
];

export const eyebrows: iType[] = [
  { type: 'Default' },
  { type: 'DefaultNatural', text: 'Natural' },
  { type: 'Angry' },
  { type: 'AngryNatural', text: 'Angry 2' },
  { type: 'FlatNatural', text: 'Flat' },
  { type: 'RaisedExcited', text: 'Raised' },
  { type: 'RaisedExcitedNatural', text: 'Raised Excited' },
  { type: 'SadConcerned', text: 'Sad' },
  { type: 'SadConcernedNatural', text: 'Sad Concerned' },
  { type: 'UnibrowNatural', text: 'Unibrow' },
  { type: 'UpDown', text: 'Up-Down' },
  { type: 'UpDownNatural', text: 'Up-Down 2' },
];

export const mouths: i


eam()
  return DOTA_UNIT_TARGET_TEAM_ENEMY
end

function modifier_harpy_null_field_oaa_applier:GetAuraSearchType()
  return bit.bor(DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_BASIC)
end

function modifier_harpy_null_field_oaa_applier:GetAuraSearchFlags()
  return DOTA_UNIT_TARGET_FLAG_NONE
end

--------------------------------------------------------------------------------

modifier_harpy_null_field_oaa_effect = class({})

function modifier_harpy_null_field_oaa_effect:IsHidden()
  return false
end

function modifier_harpy_null_field_oaa_effect:IsDebuff()
  return true
end

function modifier_harpy_null_field_oaa_effect:IsPurgable()
  return false
end

function modifier_harpy_null_field_oaa_effect:OnCreated()
  local ability = self:GetAbility()
  if ability then
    self.magic_resistance = ability:GetSpecialValueFor("magic_resistance")
  end
end

function modifier_harpy_null_field_oaa_effect:OnRefresh()
  local ability = self:GetAbility()
  if ability then
    self.magic_resistance = ability:GetSpecialValueFor("magic_resistance")
  end
end

function modifier_harpy_null_field_oaa_effect:DeclareFunctions()
  return {
    MODIFIER_PROPERTY_MAGICAL_RESISTANCE_BONUS,
  }
end

function modifier_harpy_null_field_oaa_effect:GetModifierMagicalResistanceBonus()
  if self.magic_resistance then
    return self.magic_resistance
  end
  return -17
end


 expecting.
	if IsMetadataEvent(event.GetId()) {
		delete(v.unprocessedMetadataEvents, event.GetId().String())
	}

	switch p := event.Payload.(type) {
	case *build_event_stream.BuildEvent_NamedSetOfFiles:
		v.maybeExtractOutputFile(p.NamedSetOfFiles.GetFiles()...)
	case *build_event_stream.BuildEvent_TestSummary:
		v.maybeExtractOutputFile(p.TestSummary.GetPassed()...)
		v.maybeExtractOutputFile(p.TestSummary.GetFailed()...)
	case *build_event_stream.BuildEvent_RunTargetAnalyzed:
		v.maybeExtractOutputFile(p.RunTargetAnalyzed.GetRunfiles()...)
	case *build_event_stream.BuildEvent_Action:
		v.maybeExtractOutputFile(p.Action.GetStdout())
		v.maybeExtractOutputFile(p.Action.GetStderr())
		v.maybeExtractOutputFile(p.Action.GetPrimaryOutput())
		v.maybeExtractOutputFile(p.Action.GetActionMetadataLogs()...)
	case *build_event_stream.BuildEvent_Completed:
		v.maybeExtractOutputFile(p.Completed.GetImportantOutput()...)
		v.maybeExtractOutputFile(p.Completed.GetDirectoryOutput()...)
	case *build_event_stream.BuildEvent_Started:
		v.handleStartedEvent(event)
	case *build_event_stream.BuildEvent_BuildMetadata:
		v.populateWorkspaceInfoFromBuildMetadata(p.BuildMetadata)
	case *build_event_stream.BuildEvent_WorkflowConfigured:
		v.handleWorkflowConfigured(p.WorkflowConfigured)
	case *build_event_stream.BuildEvent_Finished:
		v.sawFinishedEvent = true
	case *build_event_stream.BuildEvent_BuildToolLogs:
		v.maybeExtractOutputFile(p.BuildToolLogs.GetLog()...)
		for _, toolLog := range p.BuildToolLogs.GetLog() {
			if uri := toolLog.GetUri(); uri != "" {
				if url, err := url.Parse(uri); err != nil {
					log.Warningf("Error parsing uri from BuildToolLogs: %s", uri)
				} else if url.Scheme == "bytestream" {
					v.buildToolLogURIs = append(v.buildToolLogURIs, url)
				}
			}
		}
	case *build_event_stream.BuildEvent_TestResult:
		v.maybeExtractOutputFile(p.TestResult.GetTestActionOutput()...)
		for _, f := range p.TestResult.GetTestActionOutput() {
			u, err := url.Parse(f.GetUri())
			if err != nil {
				log.Warningf("Error parsing uri from TestResult: %s", f.GetUri())
				continue
			}
			if u.Scheme != "bytestream" {
				continue
			}
			if p.TestResult.GetStatus() == build_event_stream.TestStatus_PASSED {
				if len(v.passedTestOutputURIs) < maxPersistableTestArtifacts {
					v.passedTestOutputURIs = append(v.passedTestOutputURIs, u)
				}
				continue
			}
			if len(v.failedTestOutputURIs) < maxPersistableTestArtifacts {
				v.failedTestOutputURIs = append(v.failedTestOutputURIs, u)
			}
		}
	}
	return nil
}

// SetExpectedMetadataEvents sets the list of metadata event IDs that are
// expected in this build.
func (v *BEValues) SetExpectedMetadataEvents(events []*build_event_stream.BuildEventId) {
	for _, childEventID := range events {
		if IsMetadataEvent(childEventID) {
			v.unprocessedMetadataEvents[childEventID.String()] = struct{}{}
		}
	}
}

func (v *BEValues) MetadataIsLoaded() bool {
	return v.sawStartedEvent && len(v


01,6000',	'[[10040,20,2]]',	'big_arane_rank',	'small_lv_2',	'30003'},
{'10060041',	'10060041',	'',	'1006',	'3',	'卓尔不群',	'10060042',	'',	'',	'【镜像竞技】中排名进入1000名',	'',	'60202,1',	'[[10040,50,2]]',	'big_arane_rank',	'small_num_1000',	'30003'},
{'10060042',	'10060042',	'',	'1006',	'3',	'不同凡响',	'10060043',	'10060041',	'',	'【镜像竞技】中排名进入500名',	'',	'60203,1',	'[[10040,50,2]]',	'big_arane_rank',	'small_num_500',	'30003'},
{'10060043',	'10060043',	'',	'1006',	'3',	'头角峥嵘',	'10060044',	'10060042',	'',	'【镜像竞技】中排名进入200名',	'',	'60204,1',	'[[10040,50,2]]',	'big_arane_rank',	'small_num_200',	'30003'},
{'10060044',	'10060044',	'',	'1006',	'3',	'超群绝伦',	'10060045',	'10060043',	'',	'【镜像竞技】中排名进入100名',	'',	'60205,1',	'[[10040,50,2]]',	'big_arane_rank',	'small_num_100',	'30003'},
{'10060045',	'10060045',	'',	'1006',	'3',	'栋梁之材',	'10060046',	'10060044',	'',	'【镜像竞技】中排名进入50名',	'',	'60206,1',	'[[10040,50,2]]',	'big_arane_rank',	'small_num_50',	'30003'},
{'10060046',	'10060046',	'',	'1006',	'3',	'锋芒毕露',	'10060047',	'10060045',	'',	'【镜像竞技】中排名进入10名',	'',	'60207,1',	'[[10040,100,2]]',	'big_arane_rank',	'small_num_10',	'30003'},
{'10060047',	'10060047',	'',	'1006',	'4',	'登峰造极',	'',	'10060046',	'',	'【镜像竞技】中排名进入1名',	'',	'60208,1',	'[[10040,200,2],[19202,1,2]]',	'big_arane_rank',	'small_num_1',	'30003'},
{'10060051',	'10060051',	'',	'1006',	'2',	'不息战意',	'',	'',	'',	'累计通过【碎星虚影】第一章中的虚影阿瑞斯3次',	'',	'60001,3',	'[[10040,10,2]]',	'big_tower',	'',	'11000'},
{'10060061',	'10060061',	'',	'1006',	'2',	'虚言


et(Calendar.DAY_OF_MONTH)
        val dayOfWeek = cal.get(Calendar.DAY_OF_WEEK)
        val timeBegin = "${cal.get(Calendar.HOUR_OF_DAY)}:${cal.get(Calendar.MINUTE)}"

        cal.timeInMillis = it.endTime
        val timeEnd = "${cal.get(Calendar.HOUR_OF_DAY)}:${cal.get(Calendar.MINUTE)}"

        val dayOfWeekText = stringArrayResource(R.array.weekdays_short)[when (dayOfWeek) {
            Calendar.SUNDAY -> 0
            Calendar.MONDAY -> 1
            Calendar.TUESDAY -> 2
            Calendar.WEDNESDAY -> 3
            Calendar.THURSDAY -> 4
            Calendar.FRIDAY -> 5
            Calendar.SATURDAY -> 6
            else -> 0
        }]
        val timeDuring = "${timeBegin}~${timeEnd}"
        if (month != lastMonth) {
            Column(
                Modifier
                    .fillMaxWidth()
                    .padding(horizontal = 16.dp)
            ) {
                FlatNormalVerticalSpacer()
                FlatTextBodyOne(stringArrayResource(R.array.months)[month], Modifier.padding(vertical = 4.dp))
                FlatNormalVerticalSpacer()
                FlatDivider()
                FlatSmallVerticalSpacer()
            }
            lastMonth = month
        }
        PeriodicSubRoomItem("$day", dayOfWeekText, timeDuring, it.roomStatus)
    }
}

@Composable
private fun PeriodicSubRoomItem(
    dayText: String,
    dayOfWeekText: String,
    timeDuring: String,
    roomStatus: RoomStatus,
) {
    var expanded by remember { mutableStateOf(false) }

    Row(
        Modifier.fillMaxWidth(),
        horizontalArrangement = Arrangement.SpaceBetween,
        verticalAlignment = Alignment.CenterVertically
    ) {
        FlatTextBodyTwo(
            dayText,
            Modifier
                .padding(horizontal = 16.dp)
                .widthIn(min = 16.dp)
        )
        Spacer(Modifier.weight(1f))
        FlatTextBodyTwo(dayOfWeekText, Modifier.padding(horizontal = 8.dp))
        Spacer(Modifier.weight(1f))
        FlatTextBodyTwo(timeDuring, Modifier.padding(horizontal = 16.dp))
        FlatRoomStatusText(roomStatus, Modifier.padding(horizontal = 24.dp))
        Box(Modifier.padding(horizontal = 12.dp, vertical = 5.dp), Alignment.Center) {
            Icon(Icons.Outlined.MoreHoriz, null,
                Modifier
                    .size(24.dp)
                    .clickable { expanded = true })
            DropdownMenu(expanded, { expanded = false }, Modifier.wrapContentSize()) {
                DropdownMenuItem(onClick = { expanded = false }) {
                    FlatTextBodyOne(stringResource(R.string.title_room_detail))
                }
                DropdownMenuItem(onClick = { expanded = false }) {
                    FlatTextBodyOne(stringResource(R.string.modify_room))
                }
                DropdownMenuItem(onClick = { expanded = false }) {
                    FlatTextBodyOne(stringResource(R.string.cancel_room))
                }
                DropdownMenuItem(onClick = { expanded = false }) {
                    FlatTextBodyOne(stringResource(R.string.copy_invite))
                }
            }
        }
    }
}

@Composable
private fun PeriodicInfoDisplay(roomPeriodic: RoomPeriodic, number: Int) {
    val context = LocalContext.current

    Box(
        Modifier
            .padding(16.dp)
            .clip(Shapes.medium)
            .background(MaterialTheme.colors.surface)
    ) {
        Column(
            Modifier
                .fillMaxWidth()
                .padding(12.dp)
        ) {
            val weekInfo = roomPeriodic.weeks.joinToString(separator =


if (BaseAtomicAction != null)
            {
                atomicAction.AtomicActionId = BaseAtomicAction.AtomicActionId;
            }
        }

        return atomicAction;
    }

    private void Reset()
    {
        if (BaseAtomicAction == null)
        {
            ResetToCreation();
        }
        else
        {
            ResetToEdition();
        }

        ResetWarning();
    }

    private void ResetToCreation()
    {
        ClearActions();

        AddAction();
    }

    private void ResetToEdition()
    {
        ClearActions();

        var atomicActionEditViewModel = _actionEditViewModelFactory.BuildAtomicActionEditViewModel(FileSystemType, false, BaseAtomicAction, ComparisonItems);

        atomicActionEditViewModel.PropertyChanged += AtomicActionEditViewModelOnPropertyChanged;

        atomicActionEditViewModel.SetAtomicAction(BaseAtomicAction!);

        Actions.Add(atomicActionEditViewModel);
    }

    private void ClearActions()
    {
        foreach (var atomicActionEditViewModel in Actions)
        {
            atomicActionEditViewModel.PropertyChanged -= AtomicActionEditViewModelOnPropertyChanged;
        }

        Actions.Clear();
    }

    private void Cancel()
    {
        RaiseCloseFlyoutRequested();

        Reset();
    }

    private void OnLocaleChanged()
    {
        // Update localized messages when locale changes
        ActionIssuesHeaderMessage = _localizationService[nameof(Resources.TargetedActionEditionGlobal_ActionIssues)];
        AffectedItemsTooltipHeader = _localizationService[nameof(Resources.TargetedActionEditionGlobal_AffectedItemsTooltip)];

        // Update localized messages in FailureSummaries if any
        foreach (var summary in FailureSummaries)
        {
            summary.LocalizedMessage = _failureReasonLocalizer.GetLocalizedMessage(summary.Reason);
        }

        DoShowWarning();
    }

    private void ShowMissingFieldsWarning()
    {
        AreMissingFields = true;
        IsInconsistentWithValidItems = null;
        IsInconsistentWithNoValidItems = false;
        FailureSummaries.Clear(); // Clear previous validation failure summaries

        DoShowWarning();
    }

    private void ShowConsistencyWarning(AtomicActionConsistencyCheckCanAddResult checkCanAddResult)
    {
        ShowSav


emojify ? emojiParser.emojify(data.body) : data.body;

    DateTime? created;
    for (var possibleKey in createdKeyOptions) {
      var val = data.props[possibleKey];
      if (val != null) {
        if (val is int) {
          created = parseUnixTimeStamp(val, settings.unixTimestampMagnitude);
          settings.createdFormat = NoteSerializationDateFormat.UnixTimeStamp;
        } else {
          var str = val.toString();
          if (str.length == 10) {
            created = parseDateTime(val.toString());
            settings.createdFormat = NoteSerializationDateFormat.YearMonthDay;
          } else {
            created = parseDateTime(val.toString());
            settings.createdFormat = NoteSerializationDateFormat.Iso8601;
          }
        }
        settings.createdKey = possibleKey;

        propsUsed.add(possibleKey);
        break;
      }
    }
    if (created == null) {
      settings.createdFormat = NoteSerializationDateFormat.None;
    }

    //
    // Title parsing
    //
    String? title;
    if (data.props.containsKey(settings.titleKey)) {
      title = data.props[settings.titleKey]?.toString() ?? "";
      title = settings.emojify ? emojiParser.emojify(title) : title;

      propsUsed.add(settings.titleKey);
      settings.titleSettings = SettingsTitle.InYaml;
    } else {
      var startsWithH1 = false;
      for (var line in LineSplitter.split(body)) {
        if (line.trim().isEmpty) {
          continue;
        }
        startsWithH1 = line.startsWith('#') && !line.startsWith('##');
        break;
      }

      if (startsWithH1) {
        var titleStartIndex = body.indexOf('#');
        var titleEndIndex = body.indexOf('\n', titleStartIndex);
        if (titleEndIndex == -1 || titleEndIndex == body.length) {
          title = body.substring(titleStartIndex + 1).trim();
          body = "";
        } else {
          title = body.substring(titleStartIndex + 1, titleEndIndex).trim();
          body = body.substring(titleEndIndex + 1).trim();
        }
      }
    }
    if (title != null && title.isEmpty) {
      title = null;
    }

    var type = NoteType.Unknown;
    for (var possibleKey in editorTypeKeyOptions) {
      var typeStr = data.props[possibleKey];
      switch (typeStr) {
        case "Checklist":
          type = NoteType.Checklist;
          break;
        case "Journal":
          type = NoteType.Journal;
          break;
        default:
          type = NoteType.Unknown;
          break;
      }
      if (typeStr != null) {
        propsUsed.add(settings.editorTypeKey);
        break;
      }
    }

    Set<String>? _tags;
    try {
      for (var possibleKey in tagKeyOptions) {
        var tags = data.props[possibleKey];
        if (tags != null) {
          if (tags is YamlList) {
            _tags = tags.map((t) => t.toString()).toSet();
          } else if (tags is List) {
            _tags = tags.map((t) => t.toString()).toSet();
          } else if (tags is String) {
            settings.tagsInString = true;
            var allTags = tags.split(' ');
            settings.tagsHaveHash = allTags.every((t) => t.startsWith('#'));
            if (settings.tagsHaveHash) {
              allTags.removeWhere((e) => e.length <= 1);
              allTags = allTags.map((e) => e.substring(1)).toList();
            }

            _tags = allTags.toSet();
          } else {
            Log.e("Note Tags Decoding Failed: $tags");
          }

          settings.


8I8I8 {
            a: arr2(&[[0]]),
            b: arr2(&[[0]]),
            bias: tensor0(0i32),
            a0: 0,
            b0: 0,
            c0: 1,
            a_scale: 1.0,
            b_scale: 2.0,
            c_scale: 1.0,
        }
        .check();
    }

    #[test]
    fn sat() {
        QMatMulProblemI8I8I8 {
            a: arr2(&[[0]]),
            b: arr2(&[[34]]),
            bias: tensor0(0i32),
            a0: -17,
            b0: 1,
            c0: 0,
            a_scale: 1.0,
            b_scale: 0.05,
            c_scale: 0.25,
        }
        .check();
    }

    #[test]
    fn rounding() {
        QMatMulProblemI8I8I8 {
            a: arr2(&[[26]]),
            b: arr2(&[[0]]),
            bias: tensor0(0i32),
            a0: 27,
            b0: -1,
            c0: 1,
            a_scale: 1.0,
            b_scale: 0.05,
            c_scale: 1.0,
        }
        .check();
    }

    #[test]
    fn neg_rounding() {
        QMatMulProblemI8I8I8 {
            a: arr2(&[[-23]]),
            b: arr2(&[[-2]]),
            bias: tensor0(0i32),
            a0: -11,
            b0: -45,
            c0: 0,
            a_scale: 0.1,
            b_scale: 1.0,
            c_scale: 1.0,
        }
        .check();
    }

    #[test]
    fn rounding_ties_2() {
        QMatMulProblemI8I8I8 {
            a: arr2(&[[47], [0]]),
            b: arr2(&[[1, 0, 30]]),
            bias: tensor0(0i32),
            a0: 86,
            b0: 19,
            c0: 0,
            a_scale: 0.1,
            b_scale: 1.0,
            c_scale: 0.6,
        }
        .check();
    }

    #[test]
    fn rounding_ties_3() {
        QMatMulProblemI8I8I8 {
            a: arr2(&[[-30]]),
            b: arr2(&[[0, 107, 0]]),
            bias: tensor0(0i32),
            a0: -59,
            b0: 117,
            c0: 0,
            a_scale: 1.0,
            b_scale: 0.15,
            c_scale: 0.6,
        }
        .check();
    }

    #[test]
    fn onnx_test_matmulinteger() {
        QMatMulProblemI8I8I8 {
            a: arr2(&[[11, 7, 3], [10, 6, 2], [9, 5, 1], [8, 4, 0]]),
            b: arr2(&[[1, 4], [2, 5], [3, 6]]),
            bias: tensor0(0i32),
            a0: 12,
            b0: 0,
            c0: 0,
            a_scale: 1.0,
            b_scale: 1.0,
            c_scale: 1.0,
        }
        .check();
    }

    fn round_ties_to_right(x: f32) -> i32 {
        (x + 0.5).floor() as i32
    }

    fn scale() -> BoxedStrategy<f32> {
        prop_oneof![Just(1.0), (1i32..=20).prop_map(|x| x as f32 / 20.0)].boxed()
    }

    macro_rules! impl_qmmp {
        ($name:ident, $a:ty, $b:ty, $c:ty $(,)?) => {
            #[derive(Debug)]
            struct $name {
                a: Array2<$a>,
                b: Array2<$b>,
                bias: Tensor,
                a0: $a,
                b0: $b,
                c0: $c,
                a_scale: f32,
                b_scale: f32,
                c_scale: f32,
            }

            impl $name {
                fn check(&self) {
                    let check_with = |r: &Array2<$c>, opt: bool, qp: bool| {
                        let t = self.tract(opt, qp);
                        assert!(
                            r.iter().zip(t.iter()).all(|(r, t)|


PHY_LANE_2,
	CIF_PHY_LANE_3,
	CIF_PHY_LANE_4,
	CIF_PHY_LANE_5,
	CIF_PHY_LANE_NUM,
};

enum lane_id_e {
	CIF_LANE_CLK = 0,
	CIF_LANE_0,
	CIF_LANE_1,
	CIF_LANE_2,
	CIF_LANE_3,
	CIF_LANE_NUM,
};

enum csi_decode_fmt_e {
	DEC_FMT_YUV422_8 = 0,
	DEC_FMT_YUV422_10,
	DEC_FMT_RAW8,
	DEC_FMT_RAW10,
	DEC_FMT_RAW12,
	DEC_FMT_NUM,
};

enum cif_clk_edge_e {
	CIF_CLK_RISING = 0,
	CIF_CLK_FALLING,
};

enum cif_clk_dir_e {
	CIF_CLK_P02P1 = 0,
	CIF_CLK_P12P0,
	CIF_CLK_FREERUN,
};

void cif_set_base_addr(uint32_t link, void *mac_base, void *wrap_base);

/**
 * cif_init - setup cif
 *
 * @param :
 */
void cif_init(struct cif_ctx *ctx);

/**
 * cif_uninit - clear cif setting
 *
 * @param :
 */
void cif_uninit(struct cif_ctx *ctx);

/**
 * cif_reset - do reset. This can be activated only if dma stop to avoid
 * hang fabric.
 *
 */
void cif_reset(struct cif_ctx *ctx);

/**
 * cif_config - configuration cif.
 *
 */
void cif_config(struct cif_ctx *ctx, struct cif_param *param);

uintptr_t *cif_get_mac_phys_reg_bases(uint32_t link);
uintptr_t *cif_get_wrap_phys_reg_bases(uint32_t link);
void cif_set_lane_id(struct cif_ctx *ctx, enum lane_id_e lane,
			uint32_t select, uint32_t pn_swap);
void cif_hdr_enable(struct cif_ctx *ctx, struct cif_param *param, uint32_t on);
void cif_streaming(struct cif_ctx *ctx, uint32_t on, uint32_t hdr);
void cif_hdr_manual_config(struct cif_ctx *ctx,
			   struct cif_param *param,
			   uint32_t sw_up);
void cif_crop_info_line(struct cif_ctx *ctx, uint32_t line_num, uint32_t sw_up);
void cif_set_clk_edge(struct cif_ctx *ctx,
		      enum phy_lane_id_e lane, enum cif_clk_edge_e edge);
void cif_set_lvds_endian(struct cif_ctx *ctx,
			 enum cif_endian mac, enum cif_endian wrap);
void cif_set_lane_deskew(struct cif_ctx *ctx,
		      enum phy_lane_id_e lane, uint8_t phase);
uint8_t cif_get_lane_data(struct cif_ctx *ctx, enum phy_lane_id_e lane);
void cif_set_lvds_vsync_gen(struct cif_ctx *ctx, uint32_t fp);
int cif_check_csi_int_sts(struct cif_ctx *ctx, uint32_t mask);
void cif_mask_csi_int_sts(struct cif_ctx *ctx, uint32_t mask);
void cif_unmask_csi_int_sts(struct cif_ctx *ctx, uint32_t mask);
void cif_clear_csi_int_sts(struct cif_ctx *ctx);
int cif_check_csi_fifo_full(struct cif_ctx *ctx);
int cif_check_lvds_fifo_full(struct cif_ctx *ctx);
int cif_get_csi_decode_fmt(struct cif_ctx *ctx);
int cif_get_csi_phy_state(struct cif_ctx *ctx, union mipi_phy_state *state);
void cif_set_hs_settle(struct cif_ctx *ctx, uint8_t hs_settle);
void cif_set_bt_fmt_out(struct cif_ctx *ctx, enum ttl_bt_fmt_out fmt_out);
void cif_set_clk_dir(struct cif_ctx *ctx, enum cif_clk_dir_e dir);
void cif_set_ttl_pinmux(struct cif_ctx *ctx,
			enum ttl_vi_from_e vi, enum ttl_vi_func_e func, uint32_t pad);
void cif_set_crop(struct cif_ctx *ctx, struct cif_crop_s *crop);
int cif_swap_yuv(struct cif_ctx *ctx, uint8_t uv_swap, uint8_t yc_swap);

#endif // _CIF_DRV_H_


 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tencent.kuikly.core.base.event

enum class EventName(val value:String) {
    // 单击事件
    CLICK("click"),
    // 双击事件
    DOUBLE_CLICK("doubleClick"),
    // 长按事件
    LONG_PRESS("longPress"),
    // 滑动事件
    PAN("pan"),
    // 捏合事件
    PINCH("pinch"),
    // 手势按下事件
    TOUCH_DOWN("touchDown"),
    // 手势抬起事件
    TOUCH_UP("touchUp"),
    // 手势移动事件
    TOUCH_MOVE("touchMove"),
    // 手势取消事件
    TOUCH_CANCEL("touchCancel"),
    // 动画结束事件
    ANIMATION_COMPLETE("animationCompletion"),
    // 屏幕帧VSYNC信号事件
    SCREEN_FRAME("screenFrame"),
}/*
 * Tencent is pleased to support the open source community by making KuiklyUI
 * available.
 * Copyright (C) 2025 Tencent. All rights reserved.
 * Licensed under the License of KuiklyUI;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://github.com/Tencent-TDS/KuiklyUI/blob/main/LICENSE
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tencent.kuikly.core.reactive.handler

import com.tencent.kuikly.core.base.PagerScope
import com.tencent.kuikly.core.exception.throwRuntimeError
import com.tencent.kuikly.core.reactive.ObservableCollectionProperty
import com.tencent.kuikly.core.reactive.ObservableProperties
import com.tencent.kuikly.core.reactive.ObservableProvider
import com.tencent.kuikly.core.reactive.ObservableThreadSafetyMode
import com.tencent.kuikly.core.reactive.ReactiveObserver
import com.tencent.kuikly.core.reactive.UnsafePropertyAccessHandlerImpl
import com.tencent.kuikly.core.reactive.collection.ObservableList
import com.tencent.kuikly.core.reactive.collection.ObservableSet
import kotlin.properties.ReadWriteProperty

/* 响应式部分 */
/**
 * 利用委托的机制，将一个字段变成可观测字段
 */
// 非容器属性 用法：var valueProp: Int by observable(0)
@Deprecated(
    "use PagerScope.observable(mode, value) instead",
    ReplaceWith(
        "observable<T>(ObservableThreadSafetyMode.NONE, init)",
        "com.tencent.kuikly.core.reactive.ObservableThreadSafetyMode"
    )
)
fun <T> observable(init: T): ReadWriteProperty<Any, T> {
    return ReactiveObserver.observable(init)
}

// 列表容器   用法：var listProp: ObservableList<String>  by observableList<String>()
@Deprecated("use PagerScope.observableList(mode) instead",
    ReplaceWith(
        "observableList<T>(ObservableThreadSafetyMode.NONE)",
        "com.tencent.kuikly.core.reactive.ObservableThreadSafetyMode"
    )
)
fun <T> observableList(): ReadWriteProperty<Any, ObservableList<T>> {
    return ReactiveObserver.observableList()
}

@Deprecated("use PagerScope.observableSet(mode) instead",
    ReplaceWith(
        "observableSet<T>(ObservableThreadSafetyMode.NONE)",
        "com.tencent.kuikly.core.reactive.ObservableThreadSafetyMode"
    )
)
fun <T> observableSet(): ReadWriteProperty<Any, ObservableSet<T>> {
    return ReactiveObserver.observableSet()
}

fun <T> PagerScope.observable(mode: ObservableThreadSafetyMode, init: T): ReadWriteProperty<Any, T> {
    if (mode == ObservableThreadSafetyMode.NONE) {


qemuDriveConfigOpts
			expected string
		}{{
			qemuDriveConfigOpts{
				dev:      qemuDevOpts{"pci", "qemu_pcie0", "00.5", false},
				path:     "/var/9p",
				protocol: "9p",
			},
			`# Config drive (9p)
			[fsdev "dev-qemu_config-drive-9p"]
			fsdriver = "local"
			security_model = "none"
			readonly = "on"
			path = "/var/9p"

			[device "dev-qemu_config-drive-9p"]
			driver = "virtio-9p-pci"
			bus = "qemu_pcie0"
			addr = "00.5"
			mount_tag = "config"
			fsdev = "dev-qemu_config-drive-9p"`,
		}, {
			qemuDriveConfigOpts{
				dev:      qemuDevOpts{"pcie", "qemu_pcie1", "10.2", true},
				path:     "/dev/virtio-fs",
				protocol: "virtio-fs",
			},
			`# Config drive (virtio-fs)
			[chardev "dev-qemu_config-drive-virtio-fs"]
			backend = "socket"
			path = "/dev/virtio-fs"

			[device "dev-qemu_config-drive-virtio-fs"]
			driver = "vhost-user-fs-pci"
			bus = "qemu_pcie1"
			addr = "10.2"
			multifunction = "on"
			tag = "config"
			chardev = "dev-qemu_config-drive-virtio-fs"`,
		}, {
			qemuDriveConfigOpts{
				dev:      qemuDevOpts{"ccw", "devBus", "busAddr", false},
				path:     "/var/virtio-fs",
				protocol: "virtio-fs",
			},
			`# Config drive (virtio-fs)
			[chardev "dev-qemu_config-drive-virtio-fs"]
			backend = "socket"
			path = "/var/virtio-fs"

			[device "dev-qemu_config-drive-virtio-fs"]
			driver = "vhost-user-fs-ccw"
			tag = "config"
			chardev = "dev-qemu_config-drive-virtio-fs"`,
		}, {
			qemuDriveConfigOpts{
				dev:      qemuDevOpts{"ccw", "devBus", "busAddr", true},
				path:     "/dev/9p",
				protocol: "9p",
			},
			`# Config drive (9p)
			[fsdev "dev-qemu_config-drive-9p"]
			fsdriver = "local"
			security_model = "none"
			readonly = "on"
			path = "/dev/9p"

			[device "dev-qemu_config-drive-9p"]
			driver = "virtio-9p-ccw"
			multifunction = "on"
			mount_tag = "config"
			fsdev = "dev-qemu_config-drive-9p"`,
		}, {
			qemuDriveConfigOpts{
				dev:      qemuDevOpts{"ccw", "devBus", "busAddr", true},
				path:     "/dev/9p",
				protocol: "invalid",
			},
			``,
		}}
		for _, tc := range testCases {
			runTest(tc.expected, qemuDriveConfig(&tc.opts))
		}
	})

	t.Run("qemu_drive_dir", func(t *testing.T) {
		testCases := []struct {
			opts     qemuDriveDirOpts
			expected string
		}{{
			qemuDriveDirOpts{
				dev:      qemuDevOpts{"pci", "qemu_pcie0", "00.5",


WIDTH = 24;

  // currently selected menu item
  Element? selectedItem;

  // This holds the element where a touchstart occurred.  (This is set
  // in touchstart, and cleared in touchend.)  If this is null, then a
  // touch operation is not in progress.
  // TODO(mattsh) - move this to a touch mixin
  Element? touchItem;

  /// Callback function that we call when the user chooses something from
  /// the menu.  This is passed the menu item text.
  SelectHandler onSelect;

  final List<String> _menuItems;

  SliderMenu(this._menuItems, this.onSelect);

  @override
  Element render() {
    // Create a div for each menu item.
    final items = StringBuffer();
    for (final item in _menuItems) {
      items.write('
$item
');
    }

    // Create a root node to hold this view.
    return Element.html('''

            $items

        ''');
  }

  @override
  void enterDocument() {
    // select the first item
    // todo(jacobr): too much actual work is performed in enterDocument.
    // Ideally, enterDocument should do nothing more than redecorate a view
    // and perhaps calculating the correct child sizes for edge cases that
    // cannot be handled by the browser layout engine.
    selectItem(node.querySelector('.sm-item')!, false);

    // TODO(mattsh), abstract this somehow into a touch click mixin
    if (Device.supportsTouch) {
      node.onTouchStart.listen((event) {
        touchItem = itemOfTouchEvent(event);
        if (touchItem != null) {
          selectItemText(touchItem!);
        }
        event.preventDefault();
      });
      node.onTouchEnd.listen((event) {
        if (touchItem != null) {
          if (itemOfTouchEvent(event) == touchItem) {
            selectItem(touchItem!, true);
          } else {
            // the Touch target is somewhere other where than the touchstart
            // occurred, so revert the selected menu text back to where it was
            // before the touchstart,
            selectItemText(selectedItem!);
          }
          // touch operation has ended
          touchItem = null;
        }
        event.preventDefault();
      });
    } else {
      node.onClick.listen((event) => selectItem(event.target as Element, true));
    }

    window.onResize.listen((Event event) => updateIndicator(false));
  }

  /// Walks the parent chain of the first Touch target to find the first ancestor
  /// that has sm-item class.
  Element? itemOfTouchEvent(event) {
    Node node = event.changedTouches[0].target;
    return itemOfNode(node);
  }

  Element? itemOfNode(Node? node) {
    // TODO(jmesserly): workaround for bug 5399957, document.parent == document
    while (node != null && node != document) {
      if (node is Element) {
        Element element = node;
        if (element.classes.contains('sm-item')) {
          return element;
        }
      }
      node = node.parent;
    }
    return null;
  }

  void selectItemText(El


.0

package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs"

import (
	"context"
	"errors"

	"github.com/iancoleman/strcase"

	"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl"
)

type ToCamelCaseArguments[K any] struct {
	Target ottl.StringGetter[K]
}

func NewToCamelCaseFactory[K any]() ottl.Factory[K] {
	return ottl.NewFactory("ToCamelCase", &ToCamelCaseArguments[K]{}, createToCamelCaseFunction[K])
}

func createToCamelCaseFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) {
	args, ok := oArgs.(*ToCamelCaseArguments[K])

	if !ok {
		return nil, errors.New("ToCamelCaseFactory args must be of type *ToCamelCaseArguments[K]")
	}

	return toCamelCase(args.Target), nil
}

func toCamelCase[K any](target ottl.StringGetter[K]) ottl.ExprFunc[K] {
	return func(ctx context.Context, tCtx K) (any, error) {
		val, err := target.Get(ctx, tCtx)
		if err != nil {
			return nil, err
		}

		if val == "" {
			return val, nil
		}

		return strcase.ToCamel(val), nil
	}
}
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package ottlfuncs

import (
	"context"
	"testing"

	"github.com/stretchr/testify/assert"
	"go.opentelemetry.io/collector/pdata/pcommon"

	"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl"
)

func Test_Append(t *testing.T) {
	setter := func(_ context.Context, res, val any) error {
		rSlice := res.(pcommon.Slice)
		vSlice := val.(pcommon.Slice)
		assert.NoError(t, rSlice.FromRaw(vSlice.AsRaw()))

		return nil
	}

	var nilOptional ottl.Optional[ottl.Getter[any]]
	var nilSliceOptional ottl.Optional[[]ottl.Getter[any]]

	singleGetter := ottl.NewTestingOptional[ottl.Getter[any]](ottl.StandardGetSetter[any]{
		Getter: func(context.Context, any) (any, error) {
			return "a", nil
		},
	})

	singleIntGetter := ottl.NewTestingOptional[ottl.Getter[any]](ottl.StandardGetSetter[any]{
		Getter: func(context.Context, any) (any, error) {
			return 66, nil
		},
	})

	multiGetter := ottl.NewTestingOptional[[]ottl.Getter[any]](
		[]ottl.Getter[any]{
			ottl.StandardGetSetter[any]{
				Getter: func(context.Context, any) (any, error) {
					return "a", nil
				},
			},
			ottl.StandardGetSetter[any]{
				Getter: func(context.Context, any) (any, error) {
					return "b", nil
				},
			},
		},
	)

	testCases := []struct {
		Name   string
		Target ottl.GetSetter[any]
		Value  ottl.Optional[ottl.Getter[any]]
		Values ottl.Optional[[]ottl.Getter[any]]
		Want   func(pcommon.Slice)
	}{
		{
			"Single: non existing target",
			&ottl.StandardGetSetter[any]{
				Getter: func(context.Context, any) (any, error) {
					return nil, nil
				},
				Setter: setter,
			},
			singleGetter,
			nilSliceOptional,
			func(expectedValue pcommon


      appBar: AppBar(
        title: const  Text('Arquitectura referencia Widgets'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
            ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed(AppRoutes.album),
                child: const Text('IR A ALBUM'))
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'repo.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

Repo _$RepoFromJson(Map<String, dynamic> json) {
  return Repo()
    ..id = json['id'] as num
    ..name = json['name'] as String
    ..full_name = json['full_name'] as String
    ..owner = json['owner'] == null
        ? null
        : User.fromJson(json['owner'] as Map<String, dynamic>)
    ..parent = json['parent'] == null
        ? null
        : Repo.fromJson(json['parent'] as Map<String, dynamic>)
    ..private = json['private'] as bool
    ..html_url = json['html_url'] as String
    ..description = json['description'] as String
    ..fork = json['fork'] as bool
    ..homepage = json['homepage'] as String
    ..language = json['language'] as String
    ..forks_count = json['forks_count'] as num
    ..stargazers_count = json['stargazers_count'] as num
    ..watchers_count = json['watchers_count'] as num
    ..size = json['size'] as num
    ..default_branch = json['default_branch'] as String
    ..open_issues_count = json['open_issues_count'] as num
    ..topics = json['topics'] as List
    ..has_issues = json['has_issues'] as bool
    ..has_projects = json['has_projects'] as bool
    ..has_wiki = json['has_wiki'] as bool
    ..has_pages = json['has_pages'] as bool
    ..has_downloads = json['has_downloads'] as bool
    ..pushed_at = json['pushed_at'] as String
    ..created_at = json['created_at'] as String
    ..updated_at = json['updated_at'] as String
    ..permissions = json['permissions'] as Map<String, dynamic>
    ..subscribers_count = json['subscribers_count'] as num
    ..license = json['license'] as Map<String, dynamic>;
}

Map<String, dynamic> _$RepoToJson(Repo instance) => <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'full_name': instance.full_name,
      'owner': instance.owner,
      'parent': instance.parent,
      'private': instance.private,
      'html_url': instance.html_url,
      'description': instance.description,
      'fork': instance.fork,
      'homepage': instance.homepage,
      'language': instance.language,
      'forks_count': instance.forks_count,
      'stargazers_count': instance.stargazers_count,
      'watchers_count': instance.watchers_count,
      'size': instance.size,
      'default_branch': instance.default_branch,
      'open_issues_count': instance.open_issues_count,
      'topics': instance.topics,
      'has_issues': instance.has_issues


1)
		GuiOptionsAddForNextWidget(this.gui, GUI_OPTION.Layout_NoLayouting)
        L_GuiImage(this.gui, this.NewID(fastConcatStr(id, BaseName, "BG", v.id, L_tostring(k))), x, y,
			L_SpellTypeBG[spellData[v.id].type],
            1, 1)
		local _,_,_,thisImgX = GuiGetPreviousWidgetInfo(this.gui)
        L_GuiZSetForNextWidget(this.gui, this.GetZDeep())
        this.SetZDeep(this.GetZDeep() - 1)
        if not this.GetPickerStatus("DisableSpellWobble") then
            L_GuiOptionsAddForNextWidget(this.gui, GUI_OPTION.DrawWobble)
        end
        L_GuiOptionsAddForNextWidget(this.gui, GUI_OPTION.AlwaysClickable)
        GuiOptionsAddForNextWidget(this.gui, GUI_OPTION.Layout_NoLayouting)
		local sw,sh = GuiGetImageDimensions(this.gui, spellData[v.id].sprite, 1)

        L_GuiImageButton(this.gui, this.NewID(fastConcatStr(id, BaseName, v.id, L_tostring(k))), x + (FullBoxW-sw)/2, y + (FullBoxH-sh)/2, "",
            spellData[v.id].sprite)
        if isAlways then
            L_GuiZSetForNextWidget(this.gui, this.GetZDeep())
            this.SetZDeep(this.GetZDeep() - 1)
			GuiOptionsAddForNextWidget(this.gui, GUI_OPTION.Layout_NoLayouting)
            L_GuiImage(this.gui, this.NewID(fastConcatStr(id, BaseName, "Always", v.id, L_tostring(k))), x+1, y,
                "mods/wand_editor/files/gui/images/always_icon.png",
                1, 1)
        end
        if not isAlways and v ~= "nil" and v.uses_remaining ~= -1 then
            L_GuiZSetForNextWidget(this.gui, this.GetZDeep())
            this.SetZDeep(this.GetZDeep() - 1)
			GuiOptionsAddForNextWidget(this.gui, GUI_OPTION.Layout_NoLayouting)
            L_GuiText(this.gui, x+2, y+2, L_tostring(v.uses_remaining), 1, "data/fonts/font_small_numbers.xml")
        end
		GuiAnimateBegin(this.gui)
		GuiAnimateAlphaFadeIn(this.gui, UI.NewID(fastConcatStr(id , BaseName, "SpellBGInvisibility", L_tostring(k))), 0, 0, false)
		L_GuiOptionsAddForNextWidget(this.gui,GUI_OPTION.Layout_NoLayouting)
		L_GuiImage(this.gui, this.NewID(fastConcatStr(id , BaseName, "full_BG_invisibility" , L_tostring(k))), thisImgX, 0,"data/ui_gfx/inventory/full_inventory_box.png", BGAlpha, 1)
		GuiAnimateEnd(this.gui)
    end
	if not isAlways then
		this.UserData[fastConcatStr(id , "LastWandContHover" , L_tostring(k))] = hover
        this.UserData["WandContainerHasHover"] = this.UserData["WandContainerHasHover"] or hover
	end
    if not hover then
        this.SetZDeep(srcDeep) --恢复深度以解决奇怪深度问题
        return
    end

    if not isAlways then
        local CurrentWand
        if this.UserData["FixedWand"] and this.UserData["HasShiftClick"][this.UserData["FixedWand"][2]] then --固定的法杖必须是有选框才能判定
            CurrentWand = this.UserData["FixedWand"][2]
        else                                                                                --否则就判断手持
            local HeldWand = Compose(GetEntityHeldWand, GetPlayer)()
            if HeldWand then
                CurrentWand = HeldWand
            end
        end
        if (InputIsKeyDown(Key_LALT) or InputI


 value up to the nearest multiple, and ensure it's at least COPY_BUFFER_ALIGNMENT.
            let align_mask = crate::COPY_BUFFER_ALIGNMENT - 1;
            let padded_size =
                ((unpadded_size + align_mask) & !align_mask).max(crate::COPY_BUFFER_ALIGNMENT);

            let wgt_descriptor = crate::BufferDescriptor {
                label: descriptor.label,
                size: padded_size,
                usage: descriptor.usage,
                mapped_at_creation: true,
            };

            let buffer = self.create_buffer(&wgt_descriptor);

            buffer.slice(..).get_mapped_range_mut()[..unpadded_size as usize]
                .copy_from_slice(descriptor.contents);
            buffer.unmap();

            buffer
        }
    }

    fn create_texture_with_data(
        &self,
        queue: &crate::Queue,
        desc: &crate::TextureDescriptor,
        data: &[u8],
    ) -> crate::Texture {
        // Implicitly add the COPY_DST usage
        let mut desc = desc.to_owned();
        desc.usage |= crate::TextureUsages::COPY_DST;
        let texture = self.create_texture(&desc);

        let format_info = desc.format.describe();
        let layer_iterations = desc.array_layer_count();

        let mut binary_offset = 0;
        for layer in 0..layer_iterations {
            for mip in 0..desc.mip_level_count {
                let mut mip_size = desc.mip_level_size(mip).unwrap();
                // copying layers separately
                if desc.dimension != wgt::TextureDimension::D3 {
                    mip_size.depth_or_array_layers = 1;
                }

                // When uploading mips of compressed textures and the mip is supposed to be
                // a size that isn't a multiple of the block size, the mip needs to be uploaded
                // as its "physical size" which is the size rounded up to the nearest block size.
                let mip_physical = mip_size.physical_size(desc.format);

                // All these calculations are performed on the physical size as that's the
                // data that exists in the buffer.
                let width_blocks = mip_physical.width / format_info.block_dimensions.0 as u32;
                let height_blocks = mip_physical.height / format_info.block_dimensions.1 as u32;

                let bytes_per_row = width_blocks * format_info.block_size as u32;
                let data_size = bytes_per_row * height_blocks * mip_size.depth_or_array_layers;

                let end_offset = binary_offset + data_size as usize;

                queue.write_texture(
                    crate::ImageCopyTexture {
                        texture: &texture,
                        mip_level: mip as u32,
                        origin: crate::Origin3d {
                            x: 0,
                            y: 0,
                            z: layer,
                        },
                        aspect: wgt::TextureAspect::All,
                    },
                    &data[binary_offset..end_offset],
                    crate::ImageDataLayout {
                        offset: 0,
                        bytes_per_row: Some(
                            NonZeroU32::new(bytes_per_row).expect("invalid bytes per row"),
                        ),
                        rows_per_image: Some(
                            NonZeroU32::new(height_blocks).expect("invalid height"),
                        ),
                    },
                    mip_physical,
                );

                binary_offset = end_offset;
            }
        }

        texture
    }
}

//test early return

fn earlyreturn(x:i32) -> i32 {

   let mut z = 4;

   if(x == 2){
   	return 5;


16&255,wt=65535&St,!(pt+gt<=dt);){if(0===l)break t;l--,_+=n[s++]<<dt,dt+=8}_>>>=pt,dt-=pt,a.back+=pt}if(_>>>=gt,dt-=gt,a.back+=gt,64&mt){t.msg="invalid distance code",a.mode=ot;break}a.offset=wt,a.extra=15&mt,a.mode=et;case et:if(a.extra){for(Bt=a.extra;dt<Bt;){if(0===l)break t;l--,_+=n[s++]<<dt,dt+=8}a.offset+=_&(1<<a.extra)-1,_>>>=a.extra,dt-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=ot;break}a.mode=at;case at:if(0===f)break t;if(ut=_t-f,a.offset>ut){if((ut=a.offset-ut)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=ot;break}ut>a.wnext?(ut-=a.wnext,ct=a.wsize-ut):ct=a.wnext-ut,ut>a.length&&(ut=a.length),bt=a.window}else bt=r,ct=o-a.offset,ut=a.length;ut>f&&(ut=f),f-=ut,a.length-=ut;do{r[o++]=bt[ct++]}while(--ut);0===a.length&&(a.mode=V);break;case it:if(0===f)break t;r[o++]=a.length,f--,a.mode=V;break;case nt:if(a.wrap){for(;dt<32;){if(0===l)break t;l--,_|=n[s++]<<dt,dt+=8}if(_t-=f,t.total_out+=_t,a.total+=_t,_t&&(t.adler=a.check=a.flags?b(a.check,r,_t,o-_t):c(a.check,r,_t,o-_t)),_t=f,(a.flags?_:i(_))!==a.check){t.msg="incorrect data check",a.mode=ot;break}_=0,dt=0}a.mode=rt;case rt:if(a.wrap&&a.flags){for(;dt<32;){if(0===l)break t;l--,_+=n[s++]<<dt,dt+=8}if(_!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=ot;break}_=0,dt=0}a.mode=st;case st:xt=B;break t;case ot:xt=A;break t;case lt:return Z;case ht:default:return E}return t.next_out=o,t.avail_out=f,t.next_in=s,t.avail_in=l,a.hold=_,a.bits=dt,(a.wsize||_t!==t.avail_out&&a.mode<ot&&(a.mode<nt||e!==k))&&d(t,t.output,t.next_out,_t-t.avail_out)?(a.mode=lt,Z):(ft-=t.avail_in,_t-=t.avail_out,t.total_in+=ft,t.total_out+=_t,a.total+=_t,a.wrap&&_t&&(t.adler=a.check=a.flags?b(a.check,r,_t,t.next_out-_t):c(a.check,r,_t,t.next_out-_t)),t.data_type=a.bits+(a.last?64:0)+(a.mode===M?128:0)+(a.mode===Q||a.mode===


(histogramTick)) {
	w.mu.Lock()
	registered := append([]*namedHistogram(nil), w.mu.registered...)
	w.mu.Unlock()

	merged := make(map[string]*hdrhistogram.Histogram)
	var names []string
	for _, hist := range registered {
		hist.tick(func(h *hdrhistogram.Histogram) {
			if m, ok := merged[hist.name]; ok {
				m.Merge(h)
			} else {
				merged[hist.name] = h
				names = append(names, hist.name)
			}
		})
	}

	now := timeutil.Now()
	sort.Strings(names)
	for _, name := range names {
		mergedHist := merged[name]
		if _, ok := w.cumulative[name]; !ok {
			w.cumulative[name] = newHistogram()
		}
		w.cumulative[name].Merge(mergedHist)

		prevTick, ok := w.prevTick[name]
		if !ok {
			prevTick = w.start
		}
		w.prevTick[name] = now
		fn(histogramTick{
			Name:       name,
			Hist:       merged[name],
			Cumulative: w.cumulative[name],
			Elapsed:    now.Sub(prevTick),
			Now:        now,
		})
	}
}

type test struct {
	init func(g *errgroup.Group)
	tick func(elapsed time.Duration, i int)
	done func(elapsed time.Duration)
}

func runTest(ctx context.Context, t test, duration time.Duration) error {
	g, ctx := errgroup.WithContext(ctx)

	var cancel func()
	_, cancel = context.WithCancel(ctx)
	defer cancel()

	t.init(g)

	ticker := time.NewTicker(time.Second)
	defer ticker.Stop()

	errs := make(chan error, 1)
	done := make(chan os.Signal, 3)
	signal.Notify(done, os.Interrupt)

	go func() {
		if err := g.Wait(); err != nil {
			errs <- err
		} else {
			done <- sysutil.Signal(0)
		}
	}()

	if duration > 0 {
		go func() {
			time.Sleep(duration)
			done <- sysutil.Signal(0)
		}()
	}

	start := timeutil.Now()
	for i := 0; ; i++ {
		select {
		case <-ticker.C:
			t.tick(timeutil.Since(start), i)

		case <-done:
			cancel()
			t.done(timeutil.Since(start))
			return nil
		case err := <-errs:
			return err
		}
	}
}
// Copyright 2018 The Cockroach Authors.
// Copyright (c) 2022-present, Shanghai Yunxi Technology Co, Ltd. All rights reserved.
//
// 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.
//
// This software (KWDB) is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
//          http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,