Update(byte[] input, int len)
	{
		int index = 0;

		_state.total_len += (uint)len;

		if (_state.memsize + len < 16) // 버퍼 + 입력길이가 16바이트 이하일경우 버퍼에 저장만 해둔다
		{
			Array.Copy(input, 0, _state.memory, _state.memsize, len);
			_state.memsize += len;

			return true;
		}

		if (_state.memsize > 0) // 이전데이터가 남아있을경우 먼저 처리한다.
		{
			Array.Copy(input, 0, _state.memory, _state.memsize, 16 - _state.memsize);

			_state.v1 = CalcSubHash(_state.v1, _state.memory, index);
			index += 4;
			_state.v2 = CalcSubHash(_state.v2, _state.memory, index);
			index += 4;
			_state.v3 = CalcSubHash(_state.v3, _state.memory, index);
			index += 4;
			_state.v4 = CalcSubHash(_state.v4, _state.memory, index);
			index += 4;

			index = 0;
			_state.memsize = 0;
		}

		if (index <= len - 16)
		{
			int limit = len - 16;
			uint v1 = _state.v1;
			uint v2 = _state.v2;
			uint v3 = _state.v3;
			uint v4 = _state.v4;

			do
			{
				v1 = CalcSubHash(v1, input, index);
				index += 4;
				v2 = CalcSubHash(v2, input, index);
				index += 4;
				v3 = CalcSubHash(v3, input, index);
				index += 4;
				v4 = CalcSubHash(v4, input, index);
				index += 4;
			} while (index <= limit);

			_state.v1 = v1;
			_state.v2 = v2;
			_state.v3 = v3;
			_state.v4 = v4;
		}

		if (index < len)
		{
			Array.Copy(input, index, _state.memory, 0, len - index);
			_state.memsize = len - index;
		}
		re


-md-hue),15%,9%,1)}@media screen and (max-width:59.984375em){[data-md-color-primary=black] .md-nav__source{background-color:hsla(var(--md-hue),15%,11%,.87)}}@media screen and (max-width:76.234375em){html [data-md-color-primary=black] .md-nav--primary .md-nav__title[for=__drawer]{background-color:hsla(var(--md-hue),15%,9%,1)}}@media screen and (min-width:76.25em){[data-md-color-primary=black] .md-tabs{background-color:hsla(var(--md-hue),15%,9%,1)}}/**
 * Base styles
 * ----------------------------------------//
 */
.ndpl-body {
    background-color: #FFF;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    margin: 0;
    padding: 0;
}
[class^="ndpl-"], [class*=" ndpl-"] {
    box-sizing: border-box;
}
.ndpl-disable-scrolling {
    overflow: hidden;
}
.ndpl-body.nav-open {
    overflow-y: hidden;
}

.ndpl-loading__title,
.ndpl-error,
.ndpl-info,
.ndpl-header,
.ndpl-sidebar,
.ndpl-intro,
.ndpl-library__title,
.ndpl-group__description,
.ndpl-component__title,
.ndpl-component__description,
.ndpl-component__label,
.ndpl-component__code-toggle,
.ndpl-component__color,
.ndpl-page,
.ndpl-nav__title,
.ndpl-sidebar__title {
    font-family: 'Open Sans', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;
}

/* Heading type sizes */
.ndpl-library__title {
    font-size: 27px;
    font-weight: 400;
    line-height: 36px;
}
.ndpl-component__title {
    font-size: 18px;
    font-weight: 300;
    line-height: 32px;
}

/* Body type size */
.ndpl-page,
.ndpl-intro,
.ndpl-group__description,
.ndpl-component__description {
    font-size: 12px;
    font-weight: 300;
    line-height: 24px;
}

/* Page sizes */
.ndpl-page h1 { margin-bottom: 24px; }
.ndpl-page h2,
.ndpl-page h3,
.ndpl-page h4,
.ndpl-page h5,
.ndpl-page h6 { margin: 24px 0 12px; }
.ndpl-page h2:first-child,
.ndpl-page h3:first-child,
.ndpl-page h4:first-child,
.ndpl-page h5:first-child,
.ndpl-page h6:first-child { margin-top: 0; }
.ndpl-page h1 { font-size: 26px; font-weight: 400; line-height: 36px; }
.ndpl-page h2 { font-size: 21px; font-weight: 300; line-height: 36px; }
.ndpl-page h3 { font-size: 18px; font-weight: 300; line-height: 32px; }
.ndpl-page h4 { font-size: 16px; font-weight: 300; line-height: 27px; }
.ndpl-page h5 { font-size: 14px; font-weight: 300; line-height: 24px; }
.ndpl-page h6 { font-size: 14px; font-weight: 400


URR	5S:Xa"[
R"SSURS9 GO-URSURR	545 UR5nUS:waUSUl
URRUS	S
9 URRUSS
9 URRUSS
9 URRUS
S
9 UR RUSS
9 UR"RUSS
9 UR%US
US5 O![
R"SSURS9 UR+5 g![&a-n[
R"SS[)U535 SnANCSnAff=f!UR+5 f=f)Nmajor project.dbdatabaserErrorzRoll No should be requiredparentz!select * from result where roll=?rrrr(zNo record found!
Error due to )sqlite3connectr#r=getr	showerrorr5executefetchoner>rDr8rErFrGrHrI
plot_graph	Exceptionstrclose)rMconcurrowexs     rYrA
Report.searchFsoo'9:jjl	""$*$$W.JSWS\S\]?$//BUBUBWAYZlln$;"%a&DKII$$#a&$1II$$#a&$1KK&&CF&3KK&&CF&3KK&&CF&3OO**A*7OOCFCF3((2DTYYW
IIK	E  M#b'*CDD	E
IIKsH>F$$G&DF$1G2 F$G$
G.#GGGGG0c[U5n[U5nUR
R
S5 [R"SS9up4SS/nX/nURXVS	S
/S9 URS5 URS
5 URSUS-5 [X0R
S9nUR5 UR5R!5 g![a# [R"SSURS9 gf=f)NrazInvalid data format for marksrball)rhre)figsizer.r/bluegreen)colorzMarks vs Total MarksMarksrr4)master)float
ValueErrorrrmr5rLrJpltsubplotsbar	set_title
set_ylabelset_ylimrdraw
get_tk_widgetpack)rMobtainedtotalfigax
categoriesvaluescanvass        rYrpReport.plot_graph_s	XH%LE
  ',,v.&
6
"	z&'):;
+,

g
Aurz"#3/@/@A
##%+	  *IRVR[R[\	sC*DDcSUlURRSS9 URRSS9 URRSS9 UR
RSS9 URRSS9 URRSS9 URRS5 URR5HnUR5 M g)Nrrd)
r>rDr8rErFrGrHrIr=setrLwinfo_childrendestroy)rMwidgets  rYrBReport.clear{s		b!		b!###B'B''668FNN9r\c[R"SS9nUR5nURS:Xa![R
"SSURS9 OURSUR45 UR5nUS:Xa![R
"SSURS9 O[R"S	S
URS9nU(a]URSUR45 UR5 [R"SS
URS9 UR5 UR5 g![a-n[R
"SS[U535 SnANCSnAff=f!UR5 f=f)Nr^r_rrazSearch Student Resultrbz select * from result where rid=?zInvalid Student ResultConfirmzDo you really want to delete?zdelete from result where rid=?r1zResult delet


_class('surname:Franklin') =true");

    assertThat(results.stream()).hasSize(1);
  }
}
/*
 *
 *  * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
 *  *
 *  * Licensed under the Apache License, Version 2.0 (the "License");
 *  * you may not use this file except in compliance with the License.
 *  * You may obtain a copy of the License at
 *  *
 *  *      http://www.apache.org/licenses/LICENSE-2.0
 *  *
 *  * Unless required by applicable law or agreed to in writing, software
 *  * distributed under the License is distributed on an "AS IS" BASIS,
 *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  * See the License for the specific language governing permissions and
 *  * limitations under the License.
 *
 */

package com.orientechnologies.lucene.tests;

import static org.assertj.core.api.Assertions.assertThat;

import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.OVertex;
import com.orientechnologies.orient.core.sql.executor.OResultSet;
import org.junit.Before;
import org.junit.Test;

/** Created by enricorisa on 28/06/14. */
public class OLuceneGraphTxTest extends OLuceneBaseTest {

  @Before
  public void init() {
    OClass type = db.createVertexClass("City");
    type.createProperty("name", OType.STRING);

    db.command("create index City.name on City (name) FULLTEXT ENGINE LUCENE");
  }

  @Test
  public void graphTxTest() throws Exception {

    OVertex v = db.newVertex("City");
    v.setProperty("name", "London");

    // save london
    db.save(v);

    OResultSet resultSet = db.command("select from City where search_class('London') =true ");

    assertThat(resultSet.stream()).hasSize(1);

    // modifiy vertex
    v.setProperty("name", "Berlin");

    // re-save
    db.save(v);

    // only berlin
    resultSet = db.command("select from City where search_class('Berlin') =true ");
    assertThat(resultSet.stream()).hasSize(1);

    resultSet = db.command("select from City where search_class('London') =true ");
    assertThat(resultSet.stream()).hasSize(0);

    db.commit();

    //
    resultSet = db.command("select from City where search_class('Berlin') =true ");
    assertThat(resultSet.stream()).hasSize(1);

    resultSet = db.command("select from City where search_class('London') =true ");
    assertThat(resultSet.stream()).hasSize(0);
  }
}
/*
 *
 *  * Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
 *  *
 *  * Licensed under the Apache License, Version 2.0 (the "License");
 *  * you may not use this file except in compliance with the License.
 *  * You may obtain a copy of the License at
 *  *
 *  *      http://www.apache.org/licenses/LICENSE-2.0
 *  *
 *  * Unless required by applicable law or agreed to in writing, software
 *  * distributed under the License is distributed on an "AS IS" BASIS,
 *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  * See the License for the specific language governing permissions and
 *  * limitations under the License.
 *
 */

package com.orientechnologies.lucene.tests;

import static com.orientechnologies.orient.core.metadata.schema.OClass.INDEX_TYPE.FULLTEXT;
import static org.assertj.core.api.Assertions.assertThat;

i


 _, category := range allCategory {
		for _, subCategory := range category.SubCategories {
			if _, ok := subIdMap[subCategory.Id]; ok {
				t.Errorf("the sub id %s is not uniq", subCategory.Id)
			} else {
				subIdMap[subCategory.Id] = true
			}
		}
	}
	// check the uniq of SubCategories.ChildrenSetByInit.Id
	subChildrenIdMap := make(map[string]bool)
	for _, category := range allCategory {
		for _, subCategory := range category.SubCategories {
			for _, subChildren := range subCategory.ChildrenSetByInit {
				if _, ok := subChildrenIdMap[subChildren.Id]; ok {
					// t.Errorf("the sub children id %s is not uniq", subChildren.Id)
				} else {
					subChildrenIdMap[subChildren.Id] = true
				}
			}
		}
	}
}
// Date: Thu, 21 Dec 2023
// Author: LafTools Team - FX <work7z@outlook.com>
// LafTools Team - Ubuntu <work7z@outlook.com>
// Description:
// Copyright (C) 2023 - Present, https://laftools.dev and https://codegen.cc
//
// License: AGPLv3

package config

import "laftools-go/core/tools"

const CONFIG_URL_PUBLIC_BASE_PREFIX string = "/api"
const CLOUD_URL_APP_CLOUD_PREFIX string = "/x-v2-api"
const CONFIG_URL_OPENAPI_PREFIX string = "/open"
const CONFIG_URL_APP_FRONT_END_APP_PREFIX string = "/app"
const CONFIG_URL_APP_FRONT_END_STATIC_PREFIX string = "/static"
const CONFIG_URL_APP_FRONT_END_ASSETS_PREFIX string = "/assets"

// define an array for /blob, /arr
var CONFIG_CLOUD_URL_PREFIX []string = []string{
	"/blob",
}

// define an array for visit urls
var CONFIG_URL_VISIT_URLS []string = []string{
	//
}
var CONFIG_URL_ADMIN_URLS []string = []string{
	//
}

func Fn_GetAllowURLDefinitions() []string {
	urlList := []string{
		CONFIG_URL_APP_FRONT_END_APP_PREFIX,
		CONFIG_URL_APP_FRONT_END_STATIC_PREFIX,
		CONFIG_URL_APP_FRONT_END_ASSETS_PREFIX,
		CONFIG_URL_OPENAPI_PREFIX,
		"/system/getOneMotto",
		"/ws/", // websocket has own auth logic, no need to be checked here
	}
	// append CONFIG_URL_ADMIN_URLS and CONFIG_URL_ADMIN_URLS into filesList
	urlList = append(urlList, CONFIG_URL_VISIT_URLS...)
	if tools.IsDevMode {
		urlList = append(urlList, "/ws/dev-hmr")
	}
	return urlList
}

func FormatThatPathGlobally(relativePath string) string {
	return CONFIG_URL_PUBLIC_BASE_PREFIX + relativePath
}
package core

import (
    "context"
    "crypto/rand"
    "crypto/sha256"
    "encoding/hex"
    "encoding/json"
    "fmt"
    "github.com/go-git/go-git/v5/plumbing/object"
    "github.com/workerindex/gdir/dist"
    "io/fs"
    "io/ioutil"
    "log"
    "os"
    "path/filepath"
    "regexp"
    "strconv"
    "strings"
    "syscall"
    "time"

    "github.com/cloudflare/cloudflare-go"
    "github.com/go-git/go-git/v5"
    "github.com/go-git/go-git/v5/config"
    "github.com/google/go-github/v31/github"

    "golang.org/x/crypto/ssh/terminal"
    "golang.org/x/oauth2"
)

func LoadConfigFile() (err error) {
    if Config.ConfigFile == "" {
        return
    }

    stat, err := os.Stat(Config.ConfigFile)
    if os.IsNotExist(err) {
        err = nil
        return
    }
    if err != nil {
        return
    }


.5 : 0.5;
    } else if ([
      Alignment.topCenter,
      Alignment.bottomCenter,
    ].contains(this)) {
      result = isGreed == true ? max / min : 0.5;
    } else if ([
      Alignment.topLeft,
      Alignment.topRight,
      Alignment.bottomLeft,
      Alignment.bottomRight
    ].contains(this)) {
      if (isDiagonal) {
        final tmp = math.sqrt(math.pow(max, 2) + math.pow(min, 2)).ceil();
        // result = isGreed == true ? tmp/min : max/min;
        result = tmp / min;
      } else {
        result = isGreed == true ? max / min : 1;
      }
    } else if ([
      Alignment.centerLeft,
      Alignment.centerRight,
    ].contains(this)) {
      result = isGreed == true ? 1 : max / min * 0.5;
    }
    return result;
  }
}
//
//  GeometryExt.dart
//  flutter_templet_project
//
//  Created by shang on 2025/3/13 16:30.
//  Copyright © 2025/3/13 shang. All rights reserved.
//

import 'dart:ui';

extension OffsetExt on Offset {
  Map<String, dynamic> toJson() => {'dx': dx, 'dy': dy};

  static Offset fromJson(Map<String, dynamic> json) {
    return Offset(json['dx'], json['dy']);
  }
}

extension SizeExt on Size {
  /// 等比缩放大小
  Size toWidth(double width) {
    final scale = width / this.width;
    final heightNew = scale * height;
    // print("SizeExt:${heightNew}");
    return Size(width, heightNew);
  }

  /// 等比缩放大小
  Size toHeight(double height) {
    final scale = height / this.height;
    final widthNew = scale * width;
    // print("SizeExt:${widthNew}");
    return Size(widthNew, height);
  }

  Map<String, dynamic> toJson() => {'width': width, 'height': height};

  static Size fromJson(Map<String, dynamic> json) {
    return Size(json['width'], json['height']);
  }
}

extension RectExt on Rect {
  Map<String, dynamic> toJson() => {
        'left': left,
        'top': top,
        'width': width,
        'height': height,
      };

  static Rect fromJson(Map<String, dynamic> json) {
    return Rect.fromLTWH(
      json['left'],
      json['top'],
      json['width'],
      json['height'],
    );
  }
}

extension RadiusExt on Radius {
  Map<String, dynamic> toJson() => {'x': x, 'y': y};

  static Radius fromJson(Map<String, dynamic> json) {
    return Radius.elliptical(json['x'], json['y']);
  }
}

extension RRectExt on RRect {
  Map<String, dynamic> toJson() => {
        'left': left,
        'top': top,
        'right': right,
        'bottom': bottom,
        'tlRadius': tlRadius.toJson(),
        'trRadius': trRadius.toJson(),
        'blRadius': blRadius.toJson(),
        'brRadius': brRadius.toJson(),
      };

  static RRect fromJson(Map<String, dynamic> json) {
    return RRect.fromLTRBAndCorners(
      json['left'],
      json['top'],
      json['right'],
      json['bottom'],
      topLeft: RadiusExt.fromJson(json['tlRadius']),
      topRight: RadiusExt.fromJson(json['trRadius']),
      bottomLeft: RadiusExt.fromJson(json['blRadius']),
      bottomRight: RadiusExt.fromJson(json['brRadius


/*
 *	wiiuse
 *
 *	Written By:
 *		Michael Laforest	< para >
 *		Email: < thepara (--AT--) g m a i l [--DOT--] com >
 *
 *	Copyright 2006-2007
 *
 *	This file is part of wiiuse.
 *
 *	This program is free software; you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation; either version 3 of the License, or
 *	(at your option) any later version.
 *
 *	This program is distributed in the hope that it will 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 for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *	$Header$
 *
 */

/**
 *	@file
 *	@brief Handles device I/O.
 */

#ifndef PLATFORM_H_INCLUDED
#define PLATFORM_H_INCLUDED

#include "wiiuse_internal.h"

#ifdef __cplusplus
extern "C" {
#endif

/** @defgroup internal_io Internal: Platform-specific Device I/O */
/** @{ */
void wiiuse_init_platform_fields(struct wiimote_t *wm);
void wiiuse_cleanup_platform_fields(struct wiimote_t *wm);

int wiiuse_os_find(struct wiimote_t **wm, int max_wiimotes, int timeout);

int wiiuse_os_connect(struct wiimote_t **wm, int wiimotes);
void wiiuse_os_disconnect(struct wiimote_t *wm);

int wiiuse_os_poll(struct wiimote_t **wm, int wiimotes);
/* buf[0] will be the report type, buf+1 the rest of the report */
int wiiuse_os_read(struct wiimote_t *wm, byte *buf, int len);
int wiiuse_os_write(struct wiimote_t *wm, byte report_type, byte *buf, int len);

unsigned long wiiuse_os_ticks();
/** @} */

#ifdef __cplusplus
}
#endif

#endif /* PLATFORM_H_INCLUDED */


-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
              </svg>

            View My Transactions

{% else %}

{% endif %}

{% lorem %}

{% endblock content %}{% extends 'tracker/base.html' %}

{% block content %}

    Welcome to the Personal Finance Tracker

{% if user.is_authenticated %}

        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mr-2 w-6 h-6 text-white">
            <path stroke-linecap="round" stroke-linejoin="round" d="M15.182 15.182a4.5 4.5 0 01-6.364 0M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z" />
        </svg>

            Welcome, {{ user.username }}

            <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 me-2">
                <path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
              </


import { existsSync } from 'fs';
import { dirname } from 'path';

var regoVarPattern = new RegExp('^[a-zA-Z_][a-zA-Z0-9_]*$');

export function getDataDir(uri: vscode.Uri): string {
    // NOTE(tsandall): we don't have a precise version for 3be55ed6 so
    // do our best and rely on the -dev tag.
    if (!installedOPASameOrNewerThan("0.14.0-dev")) {
        return uri.fsPath;
    }
    if (uri.scheme === "file") {
        return uri.toString();
    }
    return decodeURIComponent(uri.toString());
}

export function canUseBundleFlags(): boolean {
    let bundleMode = vscode.workspace.getConfiguration('opa').get<boolean>('bundleMode', true);
    return installedOPASameOrNewerThan("0.14.0-dev") && bundleMode;
}

export function canUseStrictFlag(): boolean {
    let strictMode = vscode.workspace.getConfiguration('opa').get<boolean>('strictMode', true);
    return strictMode && installedOPASameOrNewerThan("0.37.0");
}

function dataFlag(): string {
    if (canUseBundleFlags()) {
        return "--bundle";
    }
    return "--data";
}

// returns true if installed OPA is same or newer than OPA version x.
function installedOPASameOrNewerThan(x: string): boolean {
    const s = getOPAVersionString();
    return opaVersionSameOrNewerThan(s, x);
}

function replaceWorkspaceFolderPathVariable(path: string): string {
    if (vscode.workspace.workspaceFolders !== undefined) {
        path = path.replace('${workspaceFolder}', vscode.workspace.workspaceFolders![0].uri.toString());
    } else if (path.indexOf('${workspaceFolder}') >= 0) {
        vscode.window.showWarningMessage('${workspaceFolder} variable configured in settings, but no workspace is active');
    }
    return path;
}

function replacePathVariables(path: string): string {
    let result = replaceWorkspaceFolderPathVariable(path);
    if (vscode.window.activeTextEditor !== undefined) {
        result = result.replace('${fileDirname}', dirname(vscode.window.activeTextEditor!.document.fileName));
    } else if (path.indexOf('${fileDirname}') >= 0) {
        // Report on the original path
        vscode.window.showWarningMessage('${fileDirname} variable configured in settings, but no document is active');
    }
    return result;
}

// Returns a list of root data path URIs based on the plugin configuration.
export function getRoots(): string[] {
    const roots = vscode.workspace.getConfiguration('opa').get<string[]>('roots', []);
    let formattedRoots = new Array();
    roots.forEach(root => {
        root = replacePathVariables(root);
        formattedRoots.push(getDataDir(vscode.Uri.parse(root)));
    });

    return formattedRoots;
}

// Returns a list of root data parameters in an array
// like ["--bundle=file:///a/b/x/", "--bundle=file:///a/b/y"] in bundle mode
// or ["--data=file:///a/b/x", "--data=file://a/b/y"] otherwise.
export function getRootParams(): string[] {
    const flag = dataFlag();
    const roots = getRoots();
    let params = new Array();
    roots.forEach(root => {
        params.push(`${flag}=${root}`);
    });
    return params;
}

// Returns a list of schema parameters in an array.
// The returned array either contains a single entry; or is empty, if the 'opa.schema' setting isn't set.
export function getSchemaParams(): string[] {
    let schemaPath = vscode.workspace.getConfiguration('opa').get<st


 => {
    logger.error('Websocket is closed');
    reconnectWebSocket();
});

/*
 * Attemps to reconnect to the infura websocket if we get a disconnect.
 * Also re-subscribes to the contract events
 */
function reconnectWebSocket() {
    logger.info('Attempting to reconnect...');
    provider = new Web3.providers.WebsocketProvider(CURRENT_WSS);

    provider.on('connect', () => {
        logger.info('Websocket reconnected');
    });

    web3.setProvider(provider);
    // resubscribe to event to make sure we get events
    subscribeToContractEvent(contractAddress);
}

/*
 * Subscribes to the contract address events
 */

function subscribeToContractEvent(contractAddress: string) {
    // subscribing to events from our smart contract
    web3.eth.subscribe('logs', {
        address: contractAddress
        //topics: ['0x12345...']
    }, function(error, result) {
        if (error != null) {
            logger.error(`error getting logs from eth: ${error}`);
        }
    }).on("data", function(log) {
        // This means we got a "settlement" for the ETH transaction.
        logger.info('data');
        logger.info(log);

        let burnerAddressExtracted = log.topics[1].substring(26).toUpperCase(); // extracts the address correctly
        let burnerAddress= '0X' + burnerAddressExtracted;
        let amountInWei = web3.utils.fromWei(web3.utils.toBN(log.topics[2]).toString(), 'ether');
        let burnAmount = parseFloat(amountInWei);
        let txnHash = log.transactionHash.toLowerCase();

        settleBurnAmount(burnerAddress, burnAmount, txnHash);
    }).on("changed", function(log) {
        // TODO not sure what this would mean for our app
        logger.info(`changed got from eth logs: ${log}`);
    });
}

subscribeToContractEvent(contractAddress);

function pollConnection() {
    web3.eth.net.isListening().then(res => {
        if (res == false) {
            logger.error('Websocket was closed for whatever reason');
            reconnectWebSocket();
        }
    }).catch(err => {
        logger.error(`Error when getting isListening ${err}`);
        reconnectWebSocket();
    });
}

// Poll the websocket to make sure it stays alive
setInterval(pollConnection, 5000);

//start our server
server.listen(process.env.PORT || 8999, () => {
    let serverAddress = server.address();
    logger.info('Server started');
    console.log(`Server started on port ${serverAddress} :)`);
});

// EVENT EMITTED STRUCTURE
/*
 * {
  removed: false,
  logIndex: 16,
  transactionIndex: 25,
  transactionHash: '0xbed0ed0e3a8e2e5d22351308ce08c667d10345bea67b94db1fde96c03437cb9c',
  blockHash: '0x1c11ce57f23c11e7d058c70a0d3fae02dff72c1fb764d9b307ed2c0701a7b86a',
  blockNumber: 7044596,
  address: '0xbEF62AD87c21F589fA522B67D7Cc8d7008027FdA',
  data: '0x',
  topics: [
    '0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5',
    '0x0000000000000000000000000d1197559f4df0e870563f9d007c5c438ffc63f7',
    '0x000000000000000000000000000000000000000000000000006


，大家就这个问题提出了许多意见，并进行了热烈的讨论。

   采取各种措施，扩大争鸣园地

   大家一致认为，出版物是“争鸣”的主要园地。今后，出版界必须进一步贯彻“百家争鸣”的方针，敞开出版社的大门。要放，要大放，这是大家都没有异议的。并且，为使争鸣有更好的条件，许多出版社都已经和将要采取一些新的措施。科学出版社副社长赵仲池说：学术期刊是争鸣的最适宜的地盘，科学出版社在最近九个月内就增出了十二种之多，去年原已出刊的四十种中也有十八种正式决定扩充篇幅，十五种增加刊期。但是，目前还有许多科学部门没有期刊，有的期刊由于本科学部门各分支学科的发展也应以分支学科出刊，这就需要科学家们共同努力，创办新的期刊。目前，有些出版社不愿出版期刊，有些印刷厂不愿承印期刊，这种情况要加以改变。除出版期刊外，科学出版社还放宽了采稿面，扩大了出版范围，并已组织到了一些各种见解的书稿，有的已经出版或即将出版。此外，在翻译外国名著、提供研究资料方面，科学出版社关于自然科学的基础科学的选题初稿已经着手草拟，并已开始组织翻译。

   商务印书馆副社长郭敬说：为了贯彻百家争鸣的方针，商务印书馆决定为高等学校和学术界多做一些工作。过去已出版了一些有不同见解的大学讲义，今后还要继续出版，并把内部发行改为公开发行。最近，还派了一个工作组到各大学征求对讲义的意见，并了解各大学可以出版的著作。现在，已收到不少书稿，打算订入明年出版计划。对于出过著作的作者，也已去信联系。现在，有的已对旧作作了修改，有的还寄来了新的书稿。

   世界知识出版社副总编辑梁纯夫说：国际问题涉及外交政策，有的不便争鸣。但是，世界知识出版社也要进一步开放。过去世界知识半月刊开展过一些讨论，很受读者欢迎，今后还要继续下去。世界知识出版社还要多出一些资本主义国家的有资料价值的书籍。

   许多同志在贯彻这一方针时，也都感到还有一些困难。

   掌握审稿标准，创办同人刊物

   许多同志认为这个方针不好掌握。中国青年出版社副总编辑顾均正说：争鸣一开展，书稿就多了，这就需要有个取舍标准。比如历史分期问


13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox=


.4",
  "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.3 (KHTML, like Gecko) Chrome/3.0.193.2 Safari/531.3",
  "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/531.3 (KHTML, like Gecko) Chrome/3.0.193.2 Safari/531.3",
  "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/531.3 (KHTML, like Gecko) Chrome/3.0.193.2 Safari/531.3",
  "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/531.3 (KHTML, like Gecko) Chrome/3.0.193.0 Safari/531.3",
  "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-US) AppleWebKit/531.3 (KHTML, like Gecko) Chrome/3.0.192 Safari/531.3",
  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.2 (KHTML, like Gecko) Chrome/3.0.191.3 Safari/531.2",
  "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.0 (KHTML, like Gecko) Chrome/3.0.191.0 Safari/531.0",
  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.0 (KHTML, like Gecko) Chrome/3.0.191.0 Safari/531.0",
  "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.0 (KHTML, like Gecko) Chrome/2.0.182.0 Safari/532.0",
  "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.0 (KHTML, like Gecko) Chrome/2.0.182.0 Safari/531.0",
  "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/530.0 (KHTML, like Gecko) Chrome/2.0.182.0 Safari/531.0",
  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.8 (KHTML, like Gecko) Chrome/2.0.178.0 Safari/530.8",
  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.8 (KHTML, like Gecko) Chrome/2.0.177.1 Safari/530.8",
  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.8 (KHTML, like Gecko) Chrome/2.0.177.0 Safari/530.8",
  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.7 (KHTML, like Gecko) Chrome/2.0.177.0 Safari/530.7",
  "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.7 (KHTML, like Gecko) Chrome/2.0.176.0 Safari/530.7",
  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.7 (KHTML, like Gecko) Chrome/2.0.176.0 Safari/530.7",
  "Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/530.7 (KHTML, like Gecko) Chrome/2.0.


231929ee, 0x11001704, 0x53212312, 0x13172004,   // sl.gl.ca_422 sr.ro.un_320  ca.jw.ht_654 sq.sr.et_332
  0x3b353105, 0x02252a07, 0x17003b07, 0x3b002112,   // az.zu.so_333 mt.eu.da_432  so.sr.un_420 jw.so.un_640
  0x6b001b12, 0x0d292d07, 0x52001c02, 0x07102d02,   // tr.ceb.un_640 sk.sl.cs_432  id.ha.un_220 sk.lt.it_222
  0x08023fa0, 0x0c005202, 0x11133b07, 0x0c002d04,   // af.da.no_322 ha.sv.un_220  so.et.ro_432 sk.sv.un_320
  // [1f50]
  0x03000e12, 0x081031ee, 0x08001a04, 0x0f06120d,   // is.nl.un_640 az.lt.no_422  tl.no.un_320 hu.de.lv_554
  0x2d000b07, 0x08020405, 0x07001018, 0x3b002a19,   // es.sk.un_420 fi.da.no_333  be.bg.un_740 mt.so.un_750
  0x04000614, 0x20003b13, 0x08003205, 0x0c001905,   // de.fi.un_660 so.sq.un_650  bs.no.un_330 gl.sv.un_330
  0x04035504, 0x1c0913a9, 0x0d2d1260, 0x182720ad,   // rw.nl.fi_332 bh.hi.mr_544  hu.sk.cs_664 sq.gd.ga_643
  // [1f60]
  0x0b002302, 0x31001c02, 0x06233fad, 0x090d010c,   // ca.es.un_220 id.az.un_220  af.ca.de_643 en.cs.pl_543
  0x1c1e2b12, 0x062305a0, 0x0e1f6bee, 0x311b0807,   // vi.ms.id_654 fr.ca.de_322  ceb.cy.is_422 no.tr.az_432
  0x0d2d09a7, 0x68002d07, 0x2d0d12ec, 0x1e2721a0,   // pl.sk.cs_532 sk.ig.un_420  hu.cs.sk_644 jw.gd.ms_322
  0x21273bac, 0x20002b0c, 0x21181107, 0x01000c02,   // so.gd.jw_632 vi.sq.un_530  ro.ga.jw_432 sv.en.un_220
  // [1f70]
  0x2d0d1ba0, 0x29682dec, 0x3f001107, 0x08003b19,   // tr.cs.sk_322 sk.ig.sl_644  ro.af.un_420 so.no.un_750
  0x122d0a04, 0x0b002a05, 0x23556407, 0x13000304,   // pt.sk.hu_332 mt.es.un_330  lg.rw.ca_432 nl.et.un_320
  0x4a001908, 0x1103130c, 0x0a00080c, 0x0b003f11,   // gl.yo.un_430 et.nl.ro_543  uk.mk.un_530 af.es.un_630
  0x32201702, 0x2d0d28a6, 0x12006b04, 0x171209ee,   // sr.sq.bs_222 sw.cs.sk_521  ceb.hu.un_320 pl.hu.sr_422
  // [1f80]
  0x0c6b25a0, 0x02002102, 0x1e1306ee, 0x13000e04,   // eu.ceb.sv_


/

bp_1:
        ldwm        4(0,s_addr),tmp1    /* get final word !        */
        vshd        tmp2,tmp1,tmp3      /* position data !*/
	uxor,nbz	tmp3,r0,save	/* if no-byte-zero */
	b,n		bp_null		/* don't goto no_null-find which null instead */
no_null:
	add	    d_addr,count,d_addr	/* set up d_addr for stbys,e */
	b		done		/* were done*/
        stbys,e     tmp3,0(0,d_addr)    /* store the data !*/

/* here we do ye old byte-at-a-time moves.*/
align_null1:
	b	byteloop
	addi	-4,s_addr,s_addr
null1:
	copy		tmp6,s_addr		/* restore orig s_addr (aligned only) */
byteloop:
	addibt,=     4,count,done
null2:
        ldbs,ma     1(s_addr),tmp1
encore:
	combt,=,n	tmp1,r0, done
        stbs,ma     tmp1,1(d_addr)
        addibf,=,n  -1,count,encore
        ldbs,ma     1(s_addr),tmp1
	b,n		done

bp_null:
	addi	-4,count,count		/* fudge count 'cause byteloop will re-increment */

null3:	/* not_aligned case reset s_addr and finish byte-wise */
	combt,=,n  r0,tmp7,null3a	/* if tmp7 is not valid address then branch below */
	b 	byteloop		  	/* otherwise reset s_addr to tmp7 and finish */
	copy 	tmp7, s_addr

null3a: /* right shift target */
	addibt,<,n  0,tmp6,null3b	/* if left shifting */
	sub	r0,tmp6,tmp6		/* do null3b code */
	addi	-4,tmp6,tmp6
	b	byteloop
	add	tmp6,s_addr,s_addr	/* reset s_addr by 4 + shift_amt */

null3b:
	subi	-8,tmp6,tmp6
	add	tmp5,tmp6,tmp6  /* adjust by the dest offset if this is our first store */
	b	byteloop
	add	tmp6,s_addr,s_addr	/* adjust s_addr by (8-shift_amt-dest_off) */

null4:
	add,>	tmp6,r0,tmp6		/* if left shift */
	b,n	null3			/* then do null3 */
	b	byteloop
	addi	-4,s_addr,s_addr	/* adj source only by 4 */

done:
	bv		0(r2)
	stbs		r0,0(d_addr)
quit:
EXIT(strncat)


0.837891 0.51172,-0.478516 -0.0488,-0.703125 z"},"53041":{"name":"Lewis, WA","path":"m 95.387071,47.207143 3.198469,0.915 -0.19255,0.643 3.51047,1.036 11.08232,3.208 2.41044,1.164 3.0701,1.109 0.24782,-0.241 0.65075,-0.41 0.20859,-0.103 0.31379,-0.08 4.64438,1.277 0.19341,0.916716 -0.19206,0.277194 0.19341,0.09322 0.684,0.347278 0.0976,0.3939 -0.41666,0.06929 0.0141,0.402789 -0.57286,-0.105325 -0.39764,0.770734 0.40833,0.332704 -0.0925,0.384673 -0.44294,0.428477 0.0126,0.393434 -0.46046,0.191941 0.10022,0.165659 -0.21517,0.410956 -0.38096,0.116311 -0.37219,0.633186 0.3199,0.422932 -0.14493,0.570806 0.22309,1.251257 -0.18073,0.499864 -1.83279,-0.508 -11.04131,-3.02 -2.76345,-0.827 -9.023103,-2.628 -1.23018,-0.355 -1.945111,-0.506 -2.153707,-0.61 0.634702,-2.08 0.442152,-1.616 -0.187971,-0.06767 1.578609,-5.259333"},"53067":{"name":"Thurston, WA","path":"m 99.838897,41.541143 1.920153,0.571 0.47297,-0.280385 0.64584,-0.240967 0.25298,-0.300189 0.34704,0.01657 0.3724,-0.269331 0.37165,-0.07482 0.15962,0.448855 -0.60067,1.223113 0.007,1.027394 0.37442,-0.07265 0.29686,-0.759782 0.2218,-1.029352 0.49222,-0.211477 0.0236,0.809093 0.12235,0.664108 0.31951,0.0707 0.26898,-1.353476 0.24952,0.829464 0.54481,0.995157 0.59466,0.355974 0.11945,1.414 0.35516,0.709316 -0.29667,0.427252 0.36481,0.162949 0.10499,-0.165922 0.47776,0.302932 -0.001,0.918853 0.63744,0.64511 0.19325,1.223627 1.51635,0.949883 0.67552,0.568954 0.0868,1.174142 1.45554,0.717904 -11.08232,-3.208 -3.51047,-1.036 0.19255,-0.643 1.23035,-4.348719 -0.650494,-0.186851 0.673501,-2.04543"},"53077":{"name":"Yakima, WA","path":"m 127.42879,49.404525 0.1803,0.374663 0.39861,-0.05085 0.10064,0.172629 0.33902,0.04599 0.21237,-0.207291 0.40619,0.0816 0.46578,0.62541 0.2274,0.156096 0.31484,0.536188 0.18074,0.05197 0.45419,0.837753 0.3


ass="small svelte-pwso03">OT Device Management Message</button>
<button style="background-color: #fff4dd; border: hsl(40.5882352941,60%,83.3333333333%) 1px solid;margin-bottom: 1px;" class="small svelte-pwso03">OT Device Configuration Command </button>
<button style="background-color: #fff4dd; border: hsl(40.5882352941,60%,83.3333333333%) 1px solid;margin-bottom: 1px;" class="small svelte-pwso03">OT Modify Device Configuration Command</button>
<button style="background-color: #fff4dd; border: hsl(40.5882352941,60%,83.3333333333%) 1px solid;margin-bottom: 1px;" class="small svelte-pwso03">OT Modify Device Operating Mode Command </button>
<button style="background-color: #fff4dd; border: hsl(40.5882352941,60%,83.3333333333%) 1px solid;margin-bottom: 1px;" class="small svelte-pwso03 highlight">OT Abort Command</button>

Related Countermeasure Techniques

<button class="svelte-1gadz4">+</button>
 No related defensive techniques in this release.

Related Weaknesses

<button aria-expanded="false" class="svelte-d1f2jj">(0) found <svg viewBox="0 0 20 20" fill="none" class="svelte-d1f2jj"><path class="vert svelte-d1f2jj" d="M10 1V19" stroke="black" stroke-width="2"></path><path d="M1 10L19 10" stroke="black" stroke-width="2"></path></svg></button>

 OTAbortCommand has no related weaknesses in this release.

Related Offensive Techniques
 No related offensive techniques in this release.

Use of the MITRE D3FEND™ Knowledge Graph and website is subject to the Terms of Use. Use of the MITRE D3FEND website is subject to the
    MITRE D3FEND Privacy Policy. MITRE D


"versions": [
          "4.25.4M",
          "4.31.1F"
        ]
      }
    }
  ]
}
```

The following example is a very minimal test catalog:

```yaml
---
# Load anta.tests.software
anta.tests.software:
  # Verifies the device is running one of the allowed EOS version.
  - VerifyEOSVersion:
      # List of allowed EOS versions.
      versions:
        - 4.25.4M
        - 4.26.1F

# Load anta.tests.system
anta.tests.system:
  # Verifies the device uptime is higher than a value.
  - VerifyUptime:
      minimum: 1

# Load anta.tests.configuration
anta.tests.configuration:
  # Verifies ZeroTouch is disabled.
  - VerifyZeroTouch:
  - VerifyRunningConfigDiffs:
```

### Catalog with custom tests

In case you want to leverage your own tests collection, use your own Python package in the test catalog.
So for instance, if my custom tests are defined in the `custom.tests.system` Python module, the test catalog will be:

```yaml
custom.tests.system:
  - VerifyPlatform:
    type: ['cEOS-LAB']
```

> [!TIP]
> **How to create custom tests**
>
> To create your custom tests, you should refer to this [documentation](advanced_usages/custom-tests.md)

### Customize test description and categories

It might be interesting to use your own categories and customized test description to build a better report for your environment. ANTA comes with a handy feature to define your own `categories` and `description` in the report.

In your test catalog, use `result_overwrite` dictionary with `categories` and `description` to just overwrite this values in your report:

```yaml
anta.tests.configuration:
  - VerifyZeroTouch: # Verifies ZeroTouch is disabled.
      result_overwrite:
        categories: ['demo', 'pr296']
        description: A custom test
  - VerifyRunningConfigDiffs:
anta.tests.interfaces:
  - VerifyInterfaceUtilization:
```

Once you run `anta nrfu table`, you will see following output:

```bash
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Device IP ┃ Test Name                  ┃ Test Status ┃ Message(s) ┃ Test description                              ┃ Test category ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ spine01   │ VerifyZeroTouch            │ success     │            │ A custom test                                 │ demo, pr296   │
│ spine01   │ VerifyRunningConfigDiffs   │ success     │            │                                               │ configuration │
│ spine01   │ VerifyInterfaceUtilization │ success     │            │ Verifie


/*
 * Copyright (C) 2016 Martin Peres
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

/*
 * Authors:
 *  Martin Peres <martin.peres@free.fr>
 */

#include <linux/leds.h>

#include "nouveau_led.h"
#include <nvkm/subdev/gpio.h>

static enum led_brightness
nouveau_led_get_brightness(struct led_classdev *led)
{
	struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
	struct nouveau_drm *drm = nouveau_drm(drm_dev);
	struct nvif_object *device = &drm->client.device.object;
	u32 div, duty;

	div =  nvif_rd32(device, 0x61c880) & 0x00ffffff;
	duty = nvif_rd32(device, 0x61c884) & 0x00ffffff;

	if (div > 0)
		return duty * LED_FULL / div;
	else
		return 0;
}

static void
nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value)
{
	struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
	struct nouveau_drm *drm = nouveau_drm(drm_dev);
	struct nvif_object *device = &drm->client.device.object;

	u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
	u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
	u32 div, duty;

	div = input_clk / freq;
	duty = value * div / LED_FULL;

	/* for now, this is safe to directly poke those registers because:
	 *  - A: nvidia never puts the logo led to any other PWM controler
	 *       than PDISPLAY.SOR[1].PWM.
	 *  - B: nouveau does not touch these registers anywhere else
	 */
	nvif_wr32(device, 0x61c880, div);
	nvif_wr32(device, 0x61c884, 0xc0000000 | duty);
}

int
nouveau_led_init(struct drm_device *dev)
{
	struct nouveau_drm *drm = nouveau_drm(dev);
	struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device);
	struct dcb_gpio_func logo_led;
	int ret;

	if (!gpio)
		return 0;

	/* check that there is a GPIO controlling the logo LED */
	if (nvkm_gpio_find(gpio, 0, DCB_GPIO_LOGO_LED_PWM, 0xff, &logo_led))
		return 0;

	drm->led = kzalloc(sizeof(*drm->led), GFP_KERNEL);
	if (!drm->led)
		return -ENOMEM;
	drm->led->dev = dev;

	drm->led->led.name = "nvidia-logo";
	drm->led->led.max_brightness = 255;
	drm->led->led.brightness_get = nouveau_led_get_brightness;
	drm->led->led.brightness_set = nouveau_led_set_brightness;

	ret = led_classdev_register(dev->dev, &drm->led->led);
	if (ret) {
		kfree(drm->led);
		drm->led = NULL;
		return ret;
	}

	return 0;
}

void
nouveau_led_suspend(struct drm_device *dev)
{
	struct nouveau_drm *drm = nouveau_drm(dev);

	if (drm->led)
		led_classdev_suspend(&drm->led->led);
}

void
nouveau_led_resume(struct drm_device *dev)
{
	struct nouveau_drm *drm = nouveau_drm(dev);

	if (drm->led)
		led_classdev_resume(&drm->led->led);
}

void
nouveau_led_fini(struct drm_device *dev)
{
	struct nouveau_drm *drm = nouveau_drm(dev);

	if (drm->led) {
		led_classdev_unregister(&drm->led->led);
		kfree(drm->led);
		drm->led = NULL;
	}
}


ndex++;

        return token;
    }

    public Token ConsumeOneOf(List<TokenType> types)
    {
        if (_index >= tokens.Length)
            throw new ParseException($"Unexpected end of token stream. Expected one of {string.Join(", ", types)}", "", 0);

        var token = tokens[_index];

        if (!types.Contains(token.Type))
            throw new ParseException($"Unexpected token type. Expected one of {string.Join(", ", types)}, but got {token.Type.ToString()}", token.Text, token.Start);

        _index++;

        return token;
    }

    public void Rewind()
    {
        _index = 0;
    }

    public override string ToString()
    {
        StringBuilder sb = new("TokenStream:\n");

        for (int i = 0; i < tokens.Length; i++)
        {
            sb.AppendLine($"[{i}] {tokens[i]}");
        }

        return sb.ToString();
    }
}


from __future__ import annotations

import pytest

import test_tools as tt

@pytest.mark.testnet()
@pytest.mark.parametrize("limit", [6, 15, 30, 45, 90, 180, 360, 720])
def test_modify_hive_owner_update_limit(limit: int) -> None:
    node = tt.InitNode()
    current_hardfork_number = int(node.get_version()["version"]["blockchain_version"].split(".")[1])

    node = tt.InitNode()
    node.run(
        alternate_chain_specs=tt.AlternateChainSpecs(
            genesis_time=int(tt.Time.now(serialize=False).timestamp()),
            hardfork_schedule=[tt.HardforkSchedule(hardfork=current_hardfork_number, block_num=1)],
            hive_owner_update_limit=limit,
        )
    )

    limit_in_microseconds = node.api.database.get_config().HIVE_OWNER_UPDATE_LIMIT
    assert limit_in_microseconds / 1_000_000 == limit, "The `HIVE_OWNER_UPDATE_LIMIT` was not updated correctly."

@pytest.mark.testnet()
@pytest.mark.parametrize(
    "limit",
    [
        5,  # the limit cannot be less than default (6 second),
        7,  # the limit must be divisible by 3,
    ],
)
def test_invalid_hive_owner_update_limit_modification(limit: int) -> None:
    node = tt.InitNode()
    current_hardfork_number = int(node.get_version()["version"]["blockchain_version"].split(".")[1])

    with pytest.raises(TimeoutError):
        node.run(
            alternate_chain_specs=tt.AlternateChainSpecs(
                genesis_time=int(tt.Time.now(serialize=False).timestamp()),
                hardfork_schedule=[tt.HardforkSchedule(hardfork=current_hardfork_number, block_num=1)],
                hive_owner_update_limit=limit,
            )
        )


bug Then Handle_VB_Date(aData)
    Case VB_STATUS
      iDeviceId = Devices.Find(Instance, Hex(bAddress, 2), InterfaceId, $sModuleType)
      If iDeviceId Then
        If BTst(aData[1], 0) Then
          If $bDebug Then WriteDebugLog("  Status: Pressed")
          If iDeviceId Then Devices.ValueUpdate(iDeviceId, 1, "Pressed")
        Endif
        If BTst(aData[2], 0) Then
          If $bDebug Then WriteDebugLog("  Status: Released")
          If iDeviceId Then Devices.ValueUpdate(iDeviceId, 1, "Released")
        Endif
        If BTst(aData[3], 0) Then
          If $bDebug Then WriteDebugLog("  Status: Pressed (long)")
          If iDeviceId Then Devices.ValueUpdate(iDeviceId, 1, "Pressed (long)")
        Endif
      Endif
    Case VB_INPUT_STATUS
      iDeviceId = Devices.Find(Instance, Hex(bAddress, 2), InterfaceId, $sModuleType)
      If iDeviceId Then
        If BTst(aData[1], 0) Then
          If $bDebug Then WriteDebugLog("  Input Status: Pressed")
          If iDeviceId Then Devices.ValueUpdate(iDeviceId, 1, "Pressed")
        Else
          If $bDebug Then WriteDebugLog("  Input Status: Released")
          If iDeviceId Then Devices.ValueUpdate(iDeviceId, 1, "Released")
        Endif
      Endif
    Case VB_SUBTYPE
      WriteDebugLog("  SerialNumber: " & CStr(aData[2] * 256 + aData[3]))
      For iSubAddress = 1 To 4
        WriteDebugLog("  Subaddress" & iSubAddress & ": " & IIf(aData[3 + iSubAddress] <> &HFF, Hex(aData[3 + iSubAddress], 2), "disabled"))

        ' When we have a valid subaddress, lets add it to the known modulelist
        If aData[3 + iSubAddress] <> &HFF And If Not $aModuleList.Exist(Hex(aData[3 + iSubAddress], 2)) Then
          $aModuleList[Hex(bAddress, 2)] = VMBGP1
        Endif
      Next
    Case VB_TEMP_STATUS
      ' Current temperature measured. Add the FF00 to make it a negative number
      iTemp = aData[4]
      If aData[4] >= &H80 Then iTemp += &HFF00
      sTemp = Format(CSingle(CSingle(iTemp) / 2), "-#0.0")
      WriteDebugLog("  Temperature Measured: " & sTemp)

      ' Current temperature set
      iTemp = aData[5]
      If aData[5] >= &H80 Then iTemp += &HFF00
      sTemp = Format(CSingle(CSingle(iTemp) / 2), "-#0.0")
      WriteDebugLog("  Temperature Set: " & sTemp)
    Case VB_DAYLIGHT_SAVING
      WriteDebugLog("  Daylight Saving: " & IIf(aData[1], "Enabled", "Disabled"))
    Case VB_TEMP
      If aData.Count = 7 Then

        sTemp = Handle_VB_Temp2(aData[1], aData[2])
        iDeviceId = Devices.Find(Instance, Hex(bAddress, 2), InterfaceId, $sModuleType, $sModuleType & " Panel")

        If $bDebug Then WriteDebugLog("  Temperature: " & sTemp)
        If iDeviceId Then Devices.ValueUpdate(iDeviceId, 2, sTemp, Devices.ValueType_Temperature)
      Else
        If $bDebug Then WriteDebugLog("  *** Received unsupported Temperature message ***")
      Endif

    Case Else
      WriteDebugLog("  *** Unsupported Command ***")
  End Select

End

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub VMBGP1_Send(bAddress As Byte, sAction As String)

  Dim aData As New Byte[]
  Dim bPrio As Byte

  sAction = UCase(sAction)

  Select sAction
    Case "STATUS"


 compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.alibaba.polardbx.druid.sql.ast;

import com.alibaba.polardbx.druid.sql.ast.statement.SQLSelectOrderByItem;
import com.alibaba.polardbx.druid.sql.visitor.SQLASTVisitor;

import java.util.ArrayList;
import java.util.List;

public final class SQLOrderBy extends SQLObjectImpl implements SQLReplaceable {

    protected final List<SQLSelectOrderByItem> items = new ArrayList<SQLSelectOrderByItem>();

    // for postgres
    private boolean sibings;

    public SQLOrderBy() {

    }

    public SQLOrderBy(SQLExpr expr) {
        SQLSelectOrderByItem item = new SQLSelectOrderByItem(expr);
        addItem(item);
    }

    public SQLOrderBy(SQLExpr expr, SQLOrderingSpecification type) {
        SQLSelectOrderByItem item = new SQLSelectOrderByItem(expr, type);
        addItem(item);
    }

    public void addItem(SQLSelectOrderByItem item) {
        if (item != null) {
            item.setParent(this);
        }
        this.items.add(item);
    }

    public void addItem(SQLExpr item) {
        addItem(new SQLSelectOrderByItem(item));
    }

    public List<SQLSelectOrderByItem> getItems() {
        return this.items;
    }

    public boolean isSibings() {
        return this.sibings;
    }

    public void setSibings(boolean sibings) {
        this.sibings = sibings;
    }

    protected void accept0(SQLASTVisitor v) {
        if (v.visit(this)) {
            for (int i = 0; i < this.items.size(); i++) {
                final SQLSelectOrderByItem item = this.items.get(i);
                item.accept(v);
            }
        }

        v.endVisit(this);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        SQLOrderBy order = (SQLOrderBy) o;

        if (sibings != order.sibings) {
            return false;
        }
        return items.equals(order.items);
    }

    @Override
    public int hashCode() {
        int result = items.hashCode();
        result = 31 * result + (sibings ? 1 : 0);
        return result;
    }

    public void addItem(SQLExpr expr, SQLOrderingSpecification type) {
        SQLSelectOrderByItem item = createItem();
        item.setExpr(expr);
        item.setType(type);
        addItem(item);
    }

    @Override
    public boolean replace(SQLExpr expr, SQLExpr target) {

        for (SQLSelectOrderByItem item : items) {
            if (item.replace(expr, target)) {
                return true;
            }
        }

        return false;
    }

    protected SQLSelectOrderByItem createItem() {
        return new SQLSelectOrderByItem();
    }

    public SQLOrderBy clone() {
        SQLOrderBy x = new SQLOrderBy();

        for (SQLSelectOrderByItem item : items) {
            SQLSelectOrderByItem item1 = item.clone();
            item1.setParent(x);
            x.items.add(item1);
        }

        x.sibings = sibings;

        return x;
    }
}
/*
 * Copyright 1999-2017 Alibaba Group Holding Ltd.
 *
 * 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


// SPDX-License-Identifier: GPL-2.0
/***************************************************************************/

/*
 *	m5307.c  -- platform support for ColdFire 5307 based boards
 *
 *	Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com)
 *	Copyright (C) 2000, Lineo (www.lineo.com)
 */

/***************************************************************************/

#include <linux/clkdev.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/init.h>
#include <linux/io.h>
#include <asm/machdep.h>
#include <asm/coldfire.h>
#include <asm/mcfsim.h>
#include <asm/mcfwdebug.h>
#include <asm/mcfclk.h>

/***************************************************************************/

/*
 *	Some platforms need software versions of the GPIO data registers.
 */
unsigned short ppdata;
unsigned char ledbank = 0xff;

/***************************************************************************/

DEFINE_CLK(pll, "pll.0", MCF_CLK);
DEFINE_CLK(sys, "sys.0", MCF_BUSCLK);

static struct clk_lookup m5307_clk_lookup[] = {
	CLKDEV_INIT(NULL, "pll.0", &clk_pll),
	CLKDEV_INIT(NULL, "sys.0", &clk_sys),
	CLKDEV_INIT("mcftmr.0", NULL, &clk_sys),
	CLKDEV_INIT("mcftmr.1", NULL, &clk_sys),
	CLKDEV_INIT("mcfuart.0", NULL, &clk_sys),
	CLKDEV_INIT("mcfuart.1", NULL, &clk_sys),
	CLKDEV_INIT("imx1-i2c.0", NULL, &clk_sys),
};

/***************************************************************************/

static void __init m5307_i2c_init(void)
{
#if IS_ENABLED(CONFIG_I2C_IMX)
	writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL5 | MCFSIM_ICR_PRI0,
	       MCFSIM_I2CICR);
	mcf_mapirq2imr(MCF_IRQ_I2C0, MCFINTC_I2C);
#endif /* IS_ENABLED(CONFIG_I2C_IMX) */
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
#if defined(CONFIG_NETtel) || \
    defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA)
	/* Copy command line from FLASH to local buffer... */
	memcpy(commandp, (char *) 0xf0004000, size);
	commandp[size-1] = 0;
#endif

	mach_sched_init = hw_timer_init;

	/* Only support the external interrupts on their primary level */
	mcf_mapirq2imr(25, MCFINTC_EINT1);
	mcf_mapirq2imr(27, MCFINTC_EINT3);
	mcf_mapirq2imr(29, MCFINTC_EINT5);
	mcf_mapirq2imr(31, MCFINTC_EINT7);

#ifdef CONFIG_BDM_DISABLE
	/*
	 * Disable the BDM clocking.  This also turns off most of the rest of
	 * the BDM device.  This is good for EMC reasons. This option is not
	 * incompatible with the memory protection option.
	 */
	wdebug(MCFDEBUG_CSR, MCFDEBUG_CSR_PSTCLK);
#endif
	m5307_i2c_init();

	clkdev_add_table(m5307_clk_lookup, ARRAY_SIZE(m5307_clk_lookup));
}

/***************************************************************************/


FF000000;
                h = (h << 8) & 0x7FFFFFFF;
                h = h ^ (high >> 24);
                h = h ^ c;
                break;
        }
    }
    return h.toString(36);
}

var result: any[] = [];
function runNextFile() {
    if (secondLevelFiles.length === 0) {
        fs.writeFile('data.json', JSON.stringify(result));
        return;
    }

    var dtsFile = secondLevelFiles.shift();

    console.log('Fetching commits for ' + dtsFile);
    getCommitsForFile(dtsFile, commits => {

        var record = {
            n: path.basename(dtsFile),
            h: [],
            p: path.dirname(dtsFile)
        };
        result.push(record);
        getCommitDetails(dtsFile, commits, detailedCommits => {
            detailedCommits.forEach(dc => {
                var ts = Math.floor(dc.timestamp / 1000);
                // Only list the most recent commit for any given hash
                if (!record.h.some(r => r === dc.fileId)) {
                    record.h.push(dc.fileId);
                }
            });
            runNextFile();
        });
    });
}

interface Commit {
    commitId: string;
    timestamp: number;
    message: string;
}

interface CommitWithSha extends Commit {
    fileId: string;
}

/// Gets a list of commits (up to 20) for this file
function getCommitsForFile(filename: string, callback: (result: Commit[]) => void) {
    var fakeQuote = 'QUOTEmarkGOEShereTHANKS';
    var eol = 'ENDOFlineGOESherePLEASE';
    var format = '{"commitId": "%H", "timestamp": %ct, "message": "%s" }'.replace(/\"/g, fakeQuote) + eol;
    var args = ['log', '--pretty=format:"' + format + '"', '--max-count=20', filename];

    proc.exec('git ' + args.join(' '), { cwd: dtRoot }, (err, stdout) => {
        if (err) throw err;
        var x = stdout.toString('UTF-8');
        x = x.replace(/\\/g, '/');
        x = x.replace(/\"/g, '\\\"');
        x = x.replace(new RegExp(fakeQuote, 'g'), '"');
        x = x.replace(new RegExp(eol, 'g'), ',');
        var arr = '[' + x.substr(0, x.length - 1) + ']';
        var obj = JSON.parse(arr);

        callback(obj);
    });
}

/// Given a file and set of commits, add file sha and size information to each commit object
function getCommitDetails(filename: string, commits: Commit[], callback: (commits: CommitWithSha[]) => void) {
    var commitsToProcess = commits.slice(0);

    var result: CommitWithSha[] = [];
    function getNext() {
        if (commitsToProcess.length === 0) {
            callback(result);
            return;
        }
        var commit = <CommitWithSha>commitsToProcess.shift();
        getHashAtCommit(commit.commitId, filename, (hash) => {
            if (hash.length > 0) {
                commit.fileId = hash;
                result.push(commit);
            }
            getNext();
        });
    }
    getNext();
}

/// Given a commit sha1 and a filename, get the sha1 and size of that file at that commit
function getHashAtCommit(commitId: string, filename: string, callback: (hash: string) => void) {
    var args = ['git', 'show', commitId + ':' + filename.replace(/\\/g, '/')];

    proc.exec(args.join(' '), { cwd: dtRoot }, (err, stdout) => {
        if (err) {
            callback('');
        }
        var s = stdout.toString('UTF-8');
        var hash = dtsHash(s);
        callback(hash);
    });

}

var secondLevelFiles: string[] = [];
var topLevelDirs =


channel_args();
  absl::node_hash_map<std::string, std::string> string_args;
  absl::node_hash_map<std::string, int> int_args;
  for (uint32_t n = 0; n < effective_args.num_args; ++n) {
    const grpc_arg arg = effective_args.args[n];
    ASSERT_TRUE(arg.type == GRPC_ARG_STRING || arg.type == GRPC_ARG_INTEGER);
    if (arg.type == GRPC_ARG_STRING) {
      string_args[arg.key] = arg.value.string;
    } else if (arg.type == GRPC_ARG_INTEGER) {
      int_args[arg.key] = arg.value.integer;
    }
  }
  EXPECT_THAT(string_args,
              UnorderedElementsAre(Pair("grpc.ssl_target_name_override", "bar"),
                                   Pair("grpc.primary_user_agent", HasSubstr("grpc-c++/")),
                                   Pair("grpc.default_authority", "foo")));
  EXPECT_THAT(int_args, UnorderedElementsAre(Pair("grpc.http2.max_ping_strikes", 5),
                                             Pair("grpc.http2.max_pings_without_data", 3)));
}

} // namespace
} // namespace Grpc
} // namespace Envoy
#include "envoy/config/core/v3/grpc_service.pb.h"

#include "common/api/api_impl.h"
#include "common/grpc/async_client_manager_impl.h"

#include "test/mocks/stats/mocks.h"
#include "test/mocks/thread_local/mocks.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/mocks/upstream/cluster_priority_set.h"
#include "test/test_common/test_time.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"

using ::testing::Return;

namespace Envoy {
namespace Grpc {
namespace {

class AsyncClientManagerImplTest : public testing::Test {
public:
  AsyncClientManagerImplTest()
      : api_(Api::createApiForTest()), stat_names_(scope_.symbolTable()),
        async_client_manager_(cm_, tls_, test_time_.timeSystem(), *api_, stat_names_) {}

  Upstream::MockClusterManager cm_;
  NiceMock<ThreadLocal::MockInstance> tls_;
  Stats::MockStore scope_;
  DangerousDeprecatedTestTime test_time_;
  Api::ApiPtr api_;
  StatNames stat_names_;
  AsyncClientManagerImpl async_client_manager_;
};

TEST_F(AsyncClientManagerImplTest, EnvoyGrpcOk) {
  envoy::config::core::v3::GrpcService grpc_service;
  grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

  Upstream::ClusterManager::ClusterInfoMap cluster_map;
  Upstream::MockClusterMockPrioritySet cluster;
  cluster_map.emplace("foo", cluster);
  EXPECT_CALL(cm_, clusters()).WillOnce(Return(cluster_map));
  EXPECT_CALL(cluster, info());
  EXPECT_CALL(*cluster.info_, addedViaApi());

  async_client_manager_.factoryForGrpcService(grpc_service, scope_, false);
}

TEST_F(AsyncClientManagerImplTest, EnvoyGrpcUnknown) {
  envoy::config::core::v3::GrpcService grpc_service;
  grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

  EXPECT_CALL(cm_, clusters());
  EXPECT_THROW_WITH_MESSAGE(
      async_client_manager_.factoryForGrpcService(grpc_service, scope_, false), EnvoyException,
      "Unknown gRPC client cluster 'foo'


iq	t0, VM_MAX_ADDRESS		/* make sure that addr */
	cmpult	a0, t0, t1			/* is in user space. */
	beq	t1, fswintrberr			/* if it's not, error out. */
	lda	t0, fswintrberr
	.set noat
	ldq	at_reg, curproc
	ldq	at_reg, P_ADDR(at_reg)
	stq	t0, U_PCB+PCB_ONFAULT(at_reg)
	stq	a0, U_PCB+PCB_ACCESSADDR(at_reg)
	.set at
	/* XXX FETCH IT */
	.set noat
	ldq	at_reg, curproc
	ldq	at_reg, P_ADDR(at_reg)
	stq	zero, U_PCB+PCB_ONFAULT(at_reg)
	.set at
	RET
	END(fuswintr)

LEAF(suswintr, 2)
	LDGP(pv)
	ldiq	t0, VM_MAX_ADDRESS		/* make sure that addr */
	cmpult	a0, t0, t1			/* is in user space. */
	beq	t1, fswintrberr			/* if it's not, error out. */
	lda	t0, fswintrberr
	.set noat
	ldq	at_reg, curproc
	ldq	at_reg, P_ADDR(at_reg)
	stq	t0, U_PCB+PCB_ONFAULT(at_reg)
	stq	a0, U_PCB+PCB_ACCESSADDR(at_reg)
	.set at
	/* XXX STORE IT */
	.set noat
	ldq	at_reg, curproc
	ldq	at_reg, P_ADDR(at_reg)
	stq	zero, U_PCB+PCB_ONFAULT(at_reg)
	.set at
	mov	zero, v0
	RET
	END(suswintr)
#endif

LEAF(fswintrberr, 0)
XLEAF(fuswintr, 2)				/* XXX what is a 'word'? */
XLEAF(suswintr, 2)				/* XXX what is a 'word'? */
	LDGP(pv)
	ldiq	v0, -1
	RET
	END(fswberr)

/**************************************************************************/

/*
 * Some bogus data, to keep vmstat happy, for now.
 */

	.data
EXPORT(intrnames)
#ifndef EVCNT_COUNTERS
	INTRNAMES_DEFINITION
#endif
EXPORT(eintrnames)
	.align 3
EXPORT(intrcnt)
#ifndef EVCNT_COUNTERS
	INTRCNT_DEFINITION
#endif
EXPORT(eintrcnt)
	.text

/**************************************************************************/

/*
 *	Object:
 *		swpctxt			EXPORTED function
 *
 *	Change HW process context
 *
 *	Arguments:
 *		pcb			PHYSICAL struct pcb_hw *
 *		old_ksp			VIRTUAL long *
 *
 *	If old_ksp is non-zero it saves the current KSP in it.


其重新构建为模型，并用于推断。main.js 中 `main()` 函数的最后一部分是以下清单中的保存模型代码。

##### 列表 4.7\. 在 tfjs-node 中将训练好的模型保存到文件系统中

```js
  if (modelSavePath != null) {
    await model.save(`file://${modelSavePath}`);
    console.log(`Saved model to path: ${modelSavePath}`);
  }
```

`model`对象的`save()`方法用于将模型保存到文件系统上的目录中。该方法接受一个参数，即以 file://开头的 URL 字符串。请注意，由于我们使用的是 tfjs-node，所以可以将模型保存在文件系统上。TensorFlow.js 的浏览器版本也提供了`model.save()`API，但不能直接访问机器的本地文件系统，因为浏览器出于安全原因禁止了这样做。如果我们在浏览器中使用 TensorFlow.js，则必须使用非文件系统保存目标（例如浏览器的本地存储和 IndexedDB）。这些对应于 file://以外的 URL 方案。

`model.save()`是一个异步函数，因为它通常涉及文件或网络输入输出。因此，在`save()`调用上使用`await`。假设`modelSavePath`的值为/tmp/tfjs-node-mnist；在`model.save()`调用完成后，您可以检查目录的内容，

```js
ls -lh /tmp/tfjs-node-mnist
```

这可能打印出类似以下的文件列表：

```js
-rw-r--r-- 1 user group 4.6K Aug 14 10:38 model.json
     -rw-r--r-- 1 user group 2.3M Aug 14 10:38 weights.bin
```

在那里，你可以看到两个文件：

+   model.json 是一个包含模型保存拓扑的 JSON 文件。这里所说的“拓扑”包括形成模型的层类型、它们各自的配置参数（例如卷积层的`filters`和 dropout 层的`rate`），以及层之间的连接方式。对于 MNIST 卷积网络来说，连接是简单的，因为它是一个顺序模型。我们将看到连接模式不太平凡的模型，这些模型也可以使用`model.save()`保存到磁盘上。

+   除了模型拓扑，model.json 还包含模型权重的清单。该部分列出了所有模型权重的名称、形状和数据类型，以及权重值存储的位置。这将我们带到第二个文件：weights.bin。正如其名称所示，weights.bin 是一个存储所有模型权重值的二进制文件。它是一个没有标记的平面二进制流，没有标明个体权重的起点和终点。这些“元信息”在 model.json 中的权重清单部分中可用于。

要使用 tfjs-node 加载模型，您可以使用`tf.loadLayersModel()`方法，指向 model.json 文件的位置（未在示例代码中显示）：

```js
const loadedModel = await tf.loadLayersModel('file:///tmp/tfjs-node-mn


/* Test heuristic for recognizing DSO file names.
   Copyright (C) 2021-2024 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <https://www.gnu.org/licenses/>.  */

#include <dl-is_dso.h>
#include <gnu/lib-names.h>
#include <support/check.h>

static int
do_test (void)
{
  /* Official ABI names.  */
  TEST_VERIFY (_dl_is_dso (LIBC_SO));
  TEST_VERIFY (_dl_is_dso (LD_SO));
  /* Version-based names.  The version number does not matter.  */
  TEST_VERIFY (_dl_is_dso ("libc-2.12.so"));
  TEST_VERIFY (_dl_is_dso ("ld-2.12.so"));
  return 0;
}

#include <support/test-driver.c>


etav1.DeleteOptions{})
			}
			if appservice != nil {
				appservice.SetBetaCronJob(cjob)
				if migrator == "rainbond" {
					label := "service_id=" + serviceID
					jobList, _ := a.k8sClient.Clientset.BatchV1().Jobs(cjob.Namespace).List(context.Background(), metav1.ListOptions{LabelSelector: label})
					for _, job := range jobList.Items {
						label := "controller-uid=" + job.Spec.Selector.MatchLabels["controller-uid"]
						pods, _ := a.k8sClient.Clientset.CoreV1().Pods(cjob.Namespace).List(context.Background(), metav1.ListOptions{LabelSelector: label})
						if pods != nil {
							for _, pod := range pods.Items {
								pod := pod
								appservice.SetPods(&pod)
							}
						}
					}
				}
				return
			}
		}
	}
	if statefulset, ok := obj.(*appsv1.StatefulSet); ok {
		serviceID := statefulset.Labels["service_id"]
		version := statefulset.Labels["version"]
		createrID := statefulset.Labels["creater_id"]
		migrator := statefulset.Labels["migrator"]
		appID := statefulset.Labels["app_id"]
		if serviceID != "" && version != "" && createrID != "" {
			appservice, err := a.getAppService(serviceID, version, createrID, true)
			if err == conversion.ErrServiceNotFound {
				a.k8sClient.Clientset.AppsV1().StatefulSets(statefulset.Namespace).Delete(context.Background(), statefulset.Name, metav1.DeleteOptions{})
			}
			if appservice != nil {
				appservice.SetStatefulSet(statefulset)
				if migrator == "rainbond" {
					label := "service_id=" + serviceID
					pods, _ := a.k8sClient.Clientset.CoreV1().Pods(statefulset.Namespace).List(context.Background(), metav1.ListOptions{LabelSelector: label})
					if pods != nil {
						for _, pod := range pods.Items {
							pod := pod
							appservice.SetPods(&pod)
						}
					}
				}
				return
			}
		} else if statefulset.OwnerReferences != nil && appID != "" {
			operatorManaged := a.getOperatorManaged(appID)
			if operatorManaged != nil {
				operatorManaged.SetStatefulSet(statefulset)
				return
			}
		}
	}
	if replicaset, ok := obj.(*appsv1.ReplicaSet); ok {
		serviceID := replicaset.Labels["service_id"]
		version := replicaset.Labels["version"]
		createrID := replicaset.Labels["creater_id"]
		if serviceID != "" && version != "" && createrID != "" {
			appservice, err := a.getAppService(serviceID, version, createrID, true)
			if err == conversion.ErrServiceNotFound {
				a.k8sClient.Clientset.AppsV1().Deployments(replicaset.Namespace).Delete(context.Background(), replicaset.Name, metav1.DeleteOptions{})
			}
			if appservice != nil {
				appservice.SetReplicaSets(replicaset)
				a.checkReplicasetWhetherDelete(appservice, replicaset)
				return
			}
		}
	}
	if secret, ok := obj.(*corev1.Secret); ok {
		serviceID := secret.Labels["service_id"]
		version := secret.Labels["version"]
		createrID := secret.Labels["creater_id"]
		if serviceID != "" && createrID != "" {
			appservice, err := a.getAppService(serviceID, version, createrID, true)
			if err == conversion.ErrServiceNotFound {
				a.k8sClient.Clientset


(showGhost)
			sf.offset = Vector3.right*-characterBounds[activeCharacter].magnitude/2;
		else sf.offset = Vector3.zero;
		sf.distance = characterBounds[activeCharacter].magnitude*(showGhost ? 1.8f : 1.2f );
		sc.character = characters[activeCharacter];

		// Apply position to character
		characters[activeCharacter].transform.position =
			characters[oldCharacter].transform.position
			+Vector3.up*(initHeights[activeCharacter]-initHeights[oldCharacter]);

		if (clones.Count>0) {
			for (int c=1; c<clones.Count; c++) {
				Destroy(clones[c]);
			}
		}
		clones.Clear();
		clones.Add(characters[activeCharacter]);

		if (ghost!=null) {
			Destroy(ghost);
			ghost = null;
		}

		if (showGhost) {
			// Add ghost for character
			ghost = (GameObject)Instantiate(characters[activeCharacter]);

			// Remove all unneccasary components from ghost
			Component[] components;
			int tries = 0;
			do {
				components = ghost.GetComponents(typeof(Component));
				foreach (Component component in components) {
					Type type = component.GetType();
					if (
						type!=typeof(Transform)
						&& type!=typeof(Animation)
						&& (
							(tries>0)
							|| (
								type!=typeof(LegController)
								&& type!=typeof(CharacterController)
								&& type!=typeof(AlignmentTracker)
							)
						)
					) Destroy(component);
				}
				tries++;
			} while (components.Length>2 && tries<2);

			// Add ghost scrip to ghost
			GhostOriginal ghostComponent = ghost.AddComponent(typeof(GhostOriginal)) as GhostOriginal;
			ghostComponent.character = characters[activeCharacter];
			ghostComponent.offset = new Vector3(-characterBounds[activeCharacter].magnitude,0,0);

			LegAnimator LegA = characters[activeCharacter].GetComponent(typeof(LegAnimator)) as LegAnimator;
			LegA.ghost = ghost;
		}
	}

	void WindowFunction (int id) {
		// Draw any Controls inside the window here

		// Options
		GUILayout.BeginHorizontal();

		GUILayout.BeginVertical();
			bool toggleOrig;

			GUILayout.Label ("Automatic Demo:");

			toggleOrig = autoWalk;
			autoWalk = GUILayout.Toggle (autoWalk, "Random Walking");
			if (toggleOrig != autoWalk) ToggleAutoWalk(autoWalk);

			toggleOrig = autoSwitchCharacter;
			autoSwitchCharacter = GUILayout.Toggle (autoSwitchCharacter, "Variate Character + Cam");
			if (toggleOrig != autoSwitchCharacter) ToggleAutoSwitch(autoSwitchCharacter);

			toggleOrig = sc.alternate;
			sc.alternate = GUILayout.Toggle (sc.alternate, "Variate Terrain");
			if (toggleOrig != sc.alternate) ToggleVariateTerrain(sc.alternate);

			GUILayout.Label ("Visualization:");

			toggleOrig = showGhost;
			showGhost = GUILayout.Toggle (showGhost, "Render Animation Ghost");
			if (toggleOrig != showGhost) {
				switchCharacter = true;
			}

			toggleOrig = renderFootMarkers;
			renderFootMarkers = GUILayout.Toggle (renderFootMarkers, "Render Foot Markers");
			if (toggleOrig != renderFootMarkers) ToggleRenderFootMarkers(renderFootMarkers);

			toggleOrig = renderCycleGraph;
			renderCycleGraph = GUILayout.To


using System.Xml;

using Cavern.Utilities;

namespace Cavern.Filters.Interfaces {
    /// <summary>
    /// Common functions of <see cref="IConvolution"/>s.
    /// </summary>
    public static class IConvolutionExtensions {
        /// <summary>
        /// Read an <see cref="IConvolution"/> from an XML, if only the common properties are required.
        /// </summary>
        public static void ReadCommonXml(this IConvolution conv, XmlReader reader) {
            while (reader.MoveToNextAttribute()) {
                switch (reader.Name) {
                    case nameof(conv.SampleRate):
                        conv.SampleRate = int.Parse(reader.Value);
                        break;
                    case nameof(conv.Delay):
                        conv.Delay = int.Parse(reader.Value);
                        break


est_Base01b_seq.Eval(_double0 == 0) ;
		Test_Base01b_seq.Eval(_double1 == double.MaxValue) ;
		Test_Base01b_seq.Eval(base._string0.Equals("string0"));
		Test_Base01b_seq.Eval(base._string1.Equals("string1"));
		Test_Base01b_seq.Eval(_Guid0 == new Guid());
		Test_Base01b_seq.Eval(_Guid1 == new Guid(1,2,3,4,5,6,7,8,9,10,11));
	}
}

public class Test_Base01b_seq
{
	public static int counter = 0;
	public static bool result = true;
	public static void Eval(bool exp)
	{
		counter++;
		if (!exp)
		{
			result = exp;
			Console.WriteLine("Test Failed at location: " + counter);
		}

	}

	[Fact]
	public static int TestEntryPoint()
	{
		new GenInt().VerifyLayout();
		new GenDouble().VerifyLayout();
		new GenString().VerifyLayout();
		new GenObject().VerifyLayout();
		new GenGuid().VerifyLayout();
		new GenConstructedReference().VerifyLayout();
		new GenConstructedValue().VerifyLayout();
		new GenInt1DArray().VerifyLayout();
		new GenString2DArray().VerifyLayout();
		new GenIntJaggedArray().VerifyLayout();

		if (result)
		{
			Console.WriteLine("Test Passed");
			return 100;
		}
		else
		{
			Console.WriteLine("Test Failed");
			return 1;
		}
	}

}


 KATAKANA LETTER VA
    'V', 'i', '\u30f8', // 12536 ヸ KATAKANA LETTER VI
    'V', 'e', '\u30f9', // 12537 ヹ KATAKANA LETTER VE
    'V', 'o', '\u30fa', // 12538 ヺ KATAKANA LETTER VO
    '.', '6', '\u30fb', // 12539 ・ KATAKANA MIDDLE DOT
    '-', '6', '\u30fc', // 12540 ー KATAKANA-HIRAGANA PROLONGED SOUND MARK
    '*', '6', '\u30fd', // 12541 ヽ KATAKANA ITERATION MARK
    '+', '6', '\u30fe', // 12542 ヾ KATAKANA VOICED ITERATION MARK
    'b', '4', '\u3105', // 12549 ㄅ BOPOMOFO LETTER B
    'p', '4', '\u3106', // 12550 ㄆ BOPOMOFO LETTER P
    'm', '4', '\u3107', // 12551 ㄇ BOPOMOFO LETTER M
    'f', '4', '\u3108', // 12552 ㄈ BOPOMOFO LETTER F
    'd', '4', '\u3109', // 12553 ㄉ BOPOMOFO LETTER D
    't', '4', '\u310a', // 12554 ㄊ BOPOMOFO LETTER T
    'n', '4', '\u310b', // 12555 ㄋ BOPOMOFO LETTER N
    'l', '4', '\u310c', // 12556 ㄌ BOPOMOFO LETTER L
    'g', '4', '\u310d', // 12557 ㄍ BOPOMOFO LETTER G
    'k', '4', '\u310e', // 12558 ㄎ BOPOMOFO LETTER K
    'h', '4', '\u310f', // 12559 ㄏ BOPOMOFO LETTER H
    'j', '4', '\u3110', // 12560 ㄐ BOPOMOFO LETTER J
    'q', '4', '\u3111', // 12561 ㄑ BOPOMOFO LETTER Q
    'x', '4', '\u3112', // 12562 ㄒ BOPOMOFO LETTER X
    'z', 'h', '\u3113', // 12563 ㄓ BOPOMOFO LETTER ZH
    'c', 'h', '\u3114', // 12564 ㄔ BOPOMOFO LETTER CH
    's', 'h', '\u3115', // 12565 ㄕ BOPOMOFO LETTER SH
    'r', '4', '\u3116', // 12566 ㄖ BOPOMOFO LETTER R
    'z', '4', '\u3117', // 12567 ㄗ BOPOMOFO LETTER Z
    'c', '4', '\u3118', // 12568 ㄘ BOPOMOFO LETTER C
    's', '4', '\u3119', // 12569 ㄙ BOPOMOFO LETTER S
    'a', '4', '\u311a', // 12570 ㄚ BOPOMOFO LETTER A
    'o', '4', '\u311b', // 12571 ㄛ BOPOMOFO LETTER O
    'e', '4', '\u311c', // 12572 ㄜ BOPOMOFO LETTER E
    'a', 'i', '\u311e', // 12574 ㄞ BOPOMOFO LETTER AI
    'e', 'i', '\u311f', // 12575 ㄟ BOPOMOFO LETTER EI
    'a', 'u', '\u3120', // 12576 ㄠ BOPOMOFO LETTER AU
    'o', 'u', '\u3121', // 12577 ㄡ BOPOMOFO LETTER OU
    'a', 'n', '\u3122', // 12578 ㄢ BOPOMOFO LETTER AN
    'e', 'n', '\u3123', // 12579 ㄣ BOPOMOFO LETTER EN
    'a', 'N', '\u3124', // 12580 ㄤ BOPOMOFO LETTER ANG
    'e', 'N', '\u3125', // 12581 ㄥ BOPOMOFO LETTER ENG
    'e', 'r', '\u3126', // 12582 ㄦ BOPOMOFO LETTER ER
    'i', '4', '\u3127', // 12583 ㄧ BOPOMOFO LETTER I
    'u


(e.$_d){e.$_d.textContent=g.n(b,e.$_a,e.$_b,c)}if(e.$_e){g.m(e.$_e,b,e.$_f,c)}if(e.$_h){e.$_h.innerHTML=g.o(b,b[b.length-1],c)}if(e.$_j){f=g.o(b,b[b.length-1],c,1),e.$_j.value=f[0];e.$_j.oninput=function(){f[1][f[2]]=this.value}}if(e.$_l){f=g.o(b,b[b.length-1],c,1),e.$_l.value=f[0];e.$_l.onchange=function(){f[1][f[2]]=this.value}}}};Z[U[5]].m=function(a,b,c,d){var e=this.o(b,c[0],d),f=c[1],g,h,i,j=c.length,k,l,m=1;if(j==2){k=1,m=0,h=e}if(j==4){e?k=1:0,m=0,h=c[2],i=c[3]}if(j==6){f=c[2],g=c[1],m=0,g==0?(e==c[3]?k=1:0):0,g==1?(e>=c[3]?k=1:0):0,g==2?(e<=c[3]?k=1:0):0,g==3?(e>c[3]?k=1:0):0,g==4?(e<c[3]?k=1:0):0,h=c[4],i=c[5]}if(m){return}f?f=f.toLowerCase():0;if(f=="class"){l=" "}if(f=="style"){l=";"}j>2&&l?(e=a.getAttribute(f),e?(e=e.replace(l+i,"").replace(l+h,"").trim()):0,e?(e=e+l+(k?h:i)):(e=l+(k?h:i)),a.setAttribute(f,e)):a.setAttribute(f,k?h:i)};Z[U[5]].n=function(a,b,c,d,e,f,g,h){e=b.length,h=D(c,0);while(e--){f=c[b[e]],g=this.o(a,f,d),h[b[e]]=g}return E(h,1)};Z[U[5]].o=function(a,b,c,d,e,f,g,h,i,j){i=this,f=a.length,g=c?c:i.x,h=0,c=g;if(e){f++}if(b=="$_index"){return i.J}while(h<f){h!=f-1?g=g[a[h]]:g=g[b];if(g==j){break}if(h==f-2){c=g}h++}if(b=="$_value"){return c[i.K]}g==j?g="":0;if(d){return[g,c,b]}return g};Eng=Z}());
let embed;

const storedChannel = localStorage.getItem('twitchChannel'),
    storedRecents = localStorage.getItem('twitchRecents');

Alpine.store('video', {
    state: 1
});

const videoCtrl = {
    twitchScriptLoaded: false,
    twitchChannel: storedChannel || 'twitch',
    twitchRecents: (storedRecents && JSON.parse(storedRecents)) || [],
    twitchChannelEntry: '',
    initFn() {
        const self = this;
        spidgets.scriptFromUrl('https://embed.twitch.tv/embed/v1.js', () => {
            self.twitchScriptLoaded = true;
        });
    },
    twitchInit() {
        embed = new Twitch.Embed('twitch-embed', {
            width: '100%',
            height: '100%',
            channel: this.twitchChannel,
            autoplay: false,
            allowfullscreen: false,
            layout: 'video',
            parent: ['localhost', '3rl.io']
        });

        embed.addEventListener(Twitch.Embed.VIDEO_READY, embed.getPlayer().play);
    },
    setTwitchChannel(evt) {
        i


 this.parseAssignmentExpression();
	            this.reenterJSX();
	        }
	        return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
	    };
	    JSXParser.prototype.parseJSXChildren = function () {
	        var children = [];
	        while (!this.scanner.eof()) {
	            var node = this.createJSXChildNode();
	            var token = this.nextJSXText();
	            if (token.start < token.end) {
	                var raw = this.getTokenRaw(token);
	                var child = this.finalize(node, new JSXNode.JSXText(token.value, raw));
	                children.push(child);
	            }
	            if (this.scanner.source[this.scanner.index] === '{') {
	                var container = this.parseJSXExpressionContainer();
	                children.push(container);
	            }
	            else {
	                break;
	            }
	        }
	        return children;
	    };
	    JSXParser.prototype.parseComplexJSXElement = function (el) {
	        var stack = [];
	        while (!this.scanner.eof()) {
	            el.children = el.children.concat(this.parseJSXChildren());
	            var node = this.createJSXChildNode();
	            var element = this.parseJSXBoundaryElement();
	            if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) {
	                var opening = element;
	                if (opening.selfClosing) {
	                    var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null));
	                    el.children.push(child);
	                }
	                else {
	                    stack.push(el);
	                    el = { node: node, opening: opening, closing: null, children: [] };
	                }
	            }
	            if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) {
	                el.closing = element;
	                var open_1 = getQualifiedElementName(el.opening.name);
	                var close_1 = getQualifiedElementName(el.closing.name);
	                if (open_1 !== close_1) {
	                    this.tolerateError('Expected corresponding JSX closing tag for %0', open_1);
	                }
	                if (stack.length > 0) {
	                    var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));
	                    el = stack[stack.length - 1];
	                    el.children.push(child);
	                    stack.pop();
	                }
	                else {
	                    break;
	                }
	            }
	        }
	        return el;
	    };
	    JSXParser.


ata = __charArray_Allocate_Arena(maxElementCount, arena)
}

func __InitializePersistentMemory(context *Context) {
	var (
		maxElementCount              int32  = context.maxElementCount
		maxMeasureTextCacheWordCount int32  = context.maxMeasureTextCacheWordCount
		arena                        *Arena = &context.internalArena
	)
	context.scrollContainerDatas = __ScrollContainerDataInternalArray_Allocate_Arena(100, arena)
	context.layoutElementsHashMapInternal = __LayoutElementHashMapItemArray_Allocate_Arena(maxElementCount, arena)
	context.layoutElementsHashMap = __int32_tArray_Allocate_Arena(maxElementCount, arena)
	context.measureTextHashMapInternal = __MeasureTextCacheItemArray_Allocate_Arena(maxElementCount, arena)
	context.measureTextHashMapInternalFreeList = __int32_tArray_Allocate_Arena(maxElementCount, arena)
	context.measuredWordsFreeList = __int32_tArray_Allocate_Arena(maxMeasureTextCacheWordCount, arena)
	context.measureTextHashMap = __int32_tArray_Allocate_Arena(maxElementCount, arena)
	context.measuredWords = __MeasuredWordArray_Allocate_Arena(maxMeasureTextCacheWordCount, arena)
	context.pointerOverIds = ElementIdArray_Allocate_Arena(maxElementCount, arena)
	context.debugElementData = __DebugElementDataArray_Allocate_Arena(maxElementCount, arena)
	context.arenaResetOffset = arena.NextAllocation
}

var __EPSILON float32 = 0.01

func __FloatEqual(left float32, right float32) bool {
	var subtracted float32 = left - right
	return subtracted < __EPSILON && subtracted > -__EPSILON
}

func __SizeContainersAlongAxis(xAxis bool) {
	var (
		context                  *Context       = GetCurrentContext()
		bfsBuffer                __int32_tArray = context.layoutElementChildrenBuffer
		resizableContainerBuffer __int32_tArray = context.openLayoutElementStack
	)
	for rootIndex := int32(0); rootIndex < context.layoutElementTreeRoots.Length; rootIndex++ {
		bfsBuffer.Length = 0
		var root *__LayoutElementTreeRoot = __LayoutElementTreeRootArray_Get(&context.layoutElementTreeRoots, rootIndex)
		var rootElement *LayoutElement = LayoutElementArray_Get(&context.layoutElements, root.LayoutElementIndex)
		__int32_tArray_Add(&bfsBuffer, root.LayoutElementIndex)
		if __ElementHasConfig(rootElement, __ELEMENT_CONFIG_TYPE_FLOATING) {
			var (
				floatingElementConfig *FloatingElementConfig    = __FindElementConfigWithType(rootElement, __ELEMENT_CONFIG_TYPE_FLOATING).FloatingElementConfig
				parentItem            *LayoutElementHashMapItem = __GetHashMapItem(floatingElementConfig.ParentId)
			)
			if parentItem != nil && parentItem != &LayoutElementHashMapItem_DEFAULT {
				var parentLayoutElement *LayoutElement = parentItem.LayoutElement
				switch rootElement.LayoutConfig.Sizing.Width.Type {
				case __SIZING_TYPE_GROW:
					rootElement.Dimensions.Width = parentLayoutElement.Dimensions.Width
				case __SIZING_TYPE_PERCENT:
					rootElement.Dimensions.Width = parentLayoutElement.Dimensions.Width * rootElement.LayoutConfig.Sizing.Width.Size.Percent
				default:
				}
				switch rootElement.LayoutConfig.Sizing.Height.Type {
				case __SIZING_TYPE_GROW:
					rootElement.Dimensions.Height = parentLayoutElement.Dimensions.Height
				case __SIZING_TYPE_PERCENT:
					rootElement.Dimensions.Height = parentLayoutElement.Dimensions.Height * rootElement.LayoutConfig.Sizing.Height.Size.Percent
				default:
				}
			}
		}
		if rootElement.LayoutConfig.Sizing.Width.


"🇩🇲"],
  'ドライバー': ["🪛"],
  'ドラキュラ': ["🧛","🧛♂"],
  'ドラゴン': ["🐉","🐲"],
  'ドラゴンの顔': ["🐲"],
  'ドラム': ["🥁","🪘","🛢"],
  'ドラムスティック': ["🥁"],
  'ドラム缶': ["🛢"],
  'ドリンク': ["🫖","🍼","🧃","🧉","🥛"],
  'ドル': ["💸","💵","💰","💲"],
  'ドル札': ["💵"],
  'ドル袋': ["💰"],
  'ドレス': ["👗","🥻"],
  'ドードー': ["🦤"],
  'ドーナツ': ["🍩"],
  'ナイジェリア': ["🇳🇬"],
  'ナイジェリア国旗': ["🇳🇬"],
  'ナイフ': ["🍴","🍽","🔪","🗡"],
  'ナウル': ["🇳🇷"],
  'ナウル国旗': ["🇳🇷"],
  'ナザール': ["🧿"],
  'ナザールのお守り': ["🧿"],
  'ナス': ["🍆"],
  'ナッツ': ["🥜"],
  'ナット': ["🔩"],
  'ナットとボルト': ["🔩"],
  'ナビゲーション': ["🧭"],
  'ナミビア': ["🇳🇦"],
  'ナミビア国旗': ["🇳🇦"],
  'ナン': ["🫓"],
  'ニ': ["2⃣"],
  'ニウエ': ["🇳🇺"],
  'ニウエ国旗': ["🇳🇺"],
  'ニカラグア': ["🇳🇮"],
  'ニカラグア国旗': ["🇳🇮"],
  'ニジェール': ["🇳🇪"],
  'ニジェール国旗': ["🇳🇪"],
  'ニット': ["🧶"],
  'ニヤニヤ': ["😸"],
  'ニヤニヤ笑う猫': ["😸"],
  'ニヤリ': ["😼"],
  'ニヤリと笑う猫の顔': ["😼"],
  'ニュー': ["🇳🇨","🇳🇿","🇵🇬"],
  'ニューカレドニア': ["🇳🇨"],
  'ニューカレドニアの旗': ["🇳🇨"],
  'ニュージーランド': ["🇳🇿"],
  'ニュージーランド国旗': ["🇳🇿"],
  'ニュース': ["🗞","📰"],
  'ニワトリ': ["🐔","🍗"],
  'ニンジン': ["🥕"],
  'ネイビス': ["🇰🇳"],
  'ネイル': ["💅"],
  'ネクタイ': ["👔"],
  'ネコ': ["😺","😸","😹","😻","😼","😽","🙀","😿","😾","🐱","🐈"],
  'ネコの顔': ["🐱"],
  'ネズミ': ["🐭","🐀","🐁","🪤"],
  '


t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},BjSP:function(e,t,r){var n=r("LtXa"),o=r("Xidw");e.exports=function(e,t){return n(e,o(e),t)}},Bstx:function(e,t){var r=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}},BtTt:function(e,t,r){"use strict";var n=r("P0jV"),o=r("4GeQ"),i=r("WBY7"),a=r("dyNj"),s=r("FYay");function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},E7j9:function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},EAGB:function(e,t,r){var n=r("mGzy");e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},F63i:function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function b(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1


ignature& signature) { return invoke_(out, target, signature); }
  //! \overload
  ASMJIT_INLINE_NODEBUG Error invoke(InvokeNode** out, const Mem& target, const FuncSignature& signature) { return invoke_(out, target, signature); }
  //! \overload
  ASMJIT_INLINE_NODEBUG Error invoke(InvokeNode** out, const Label& target, const FuncSignature& signature) { return invoke_(out, target, signature); }
  //! \overload
  ASMJIT_INLINE_NODEBUG Error invoke(InvokeNode** out, const Imm& target, const FuncSignature& signature) { return invoke_(out, target, signature); }
  //! \overload
  ASMJIT_INLINE_NODEBUG Error invoke(InvokeNode** out, uint64_t target, const FuncSignature& signature) { return invoke_(out, Imm(int64_t(target)), signature); }

  //! Return.
  ASMJIT_INLINE_NODEBUG Error ret() { return addRet(Operand(), Operand()); }
  //! \overload
  ASMJIT_INLINE_NODEBUG Error ret(const Reg& o0) { return addRet(o0, Operand()); }
  //! \overload
  ASMJIT_INLINE_NODEBUG Error ret(const Reg& o0, const Reg& o1) { return addRet(o0, o1); }

  //! \}

  //! \name Jump Tables Support
  //! \{

  using EmitterExplicitT<Compiler>::br;

  //! Adds a jump to the given `target` with the provided jump `annotation`.
  ASMJIT_INLINE_NODEBUG Error br(const Reg& target, JumpAnnotation* annotation) { return emitAnnotatedJump(Inst::kIdBr, target, annotation); }

  //! \}

  //! \name Events
  //! \{

  ASMJIT_API Error onAttach(CodeHolder& code) noexcept override;
  ASMJIT_API Error onDetach(CodeHolder& code) noexcept override;
  ASMJIT_API Error onReinit(CodeHolder& code) noexcept override;

  //! \}

  //! \name Finalize
  //! \{

  ASMJIT_API Error finalize() override;

  //! \}
};

//! \}

ASMJIT_END_SUB_NAMESPACE

#endif // !ASMJIT_NO_COMPILER
#endif // ASMJIT_ARM_A64COMPILER_H_INCLUDED


 // Note the conversion:
    int v = _codewords.codeUnitAt(pos);
    v &= 1 << (8 - bit);
    _setBit(col, row, v != 0);
  }

  /// Places the 8 bits of a utah-shaped symbol character in ECC200.
  ///
  /// @param row the row
  /// @param col the column
  /// @param pos character position
  void _utah(int row, int col, int pos) {
    _module(row - 2, col - 2, pos, 1);
    _module(row - 2, col - 1, pos, 2);
    _module(row - 1, col - 2, pos, 3);
    _module(row - 1, col - 1, pos, 4);
    _module(row - 1, col, pos, 5);
    _module(row, col - 2, pos, 6);
    _module(row, col - 1, pos, 7);
    _module(row, col, pos, 8);
  }

  void _corner1(int pos) {
    _module(_numRows - 1, 0, pos, 1);
    _module(_numRows - 1, 1, pos, 2);
    _module(_numRows - 1, 2, pos, 3);
    _module(0, _numCols - 2, pos, 4);
    _module(0, _numCols - 1, pos, 5);
    _module(1, _numCols - 1, pos, 6);
    _module(2, _numCols - 1, pos, 7);
    _module(3, _numCols - 1, pos, 8);
  }

  void _corner2(int pos) {
    _module(_numRows - 3, 0, pos, 1);
    _module(_numRows - 2, 0, pos, 2);
    _module(_numRows - 1, 0, pos, 3);
    _module(0, _numCols - 4, pos, 4);
    _module(0, _numCols - 3, pos, 5);
    _module(0, _numCols - 2, pos, 6);
    _module(0, _numCols - 1, pos, 7);
    _module(1, _numCols - 1, pos, 8);
  }

  void _corner3(int pos) {
    _module(_numRows - 3, 0, pos, 1);
    _module(_numRows - 2, 0, pos, 2);
    _module(_numRows - 1, 0, pos, 3);
    _module(0, _numCols - 2, pos, 4);
    _module(0, _numCols - 1, pos, 5);
    _module(1, _numCols - 1, pos, 6);
    _module(2, _numCols - 1, pos, 7);
    _module(3, _numCols - 1, pos, 8);
  }

  void _corner4(int pos) {
    _module(_numRows - 1, 0, pos, 1);
    _module(_numRows - 1, _numCols - 1, pos, 2);
    _module(0, _numCols - 3, pos, 3);
    _module(0, _numCols - 2, pos, 4);
    _module(0, _numCols - 1, pos, 5);
    _module(1, _numCols - 3, pos, 6);
    _module(1, _numCols - 2, pos, 7);
    _module(1, _numCols - 1, pos, 8);
  }
}
/*
 * Copyright 2006 Jeremias Maerki in part, and ZXing Authors in part
 *
 * 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 file has been modified from its original form in Barcode4J.
 */

import '../../writer_exception.dart';

///


olorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END {
	color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR {
	color: #eaeaea;
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_OUTLINE_COLOR {
	color: #eaeaea;
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_BG_START {
	color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_BG_END {
	color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_START {
	color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_END {
	color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_TEXT_COLOR {
	color: #000000;
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_TEXT_COLOR {
	color: #000000;
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_TEXT_COLOR {
	color: #000000;
}

.MTrimmedWindow {
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.MTrimBar {
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.MTrimBar#org-eclipse-ui-main-toolbar {
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

CTabFolder Canvas {
	  background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.MTrimBar#org-eclipse-ui-trim-status {
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.View Composite,
.View Composite Label,
.View ToolBar,
.View Group,
.View Group Label,
.View Section,
.View BusyIndicator,
.View Text[style~='SWT.READ_ONLY'],
.View SashForm,
.View OleFrame,
.View Browser,
.View WebSite,
.View StyledText[style~='SWT.READ_ONLY'],
.View Link,
.View FormText,
.View Hyperlink,
.View Canvas,
.View FigureCanvas
{
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.View TitleRegion{
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.MPartStack.active .View TitleRegion{
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.View Button[style~='SWT.CHECK']{
	background-color: inherit;
}

.View Toolbar ToolItem{
	background-color: #eaeaea;
}

.View TabbedPropertyList{
	swt-tabBackground-color: #ffffff;
}

.View Composite Tree[swt-lines-visible=false]{
	background-color: '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND';
}

.View Composite PrependingAsteriskFilteredTree,
.View Prepending


)
			_new_value = 5;

		this.m_nZoomType = 2;
		if (_new_value != this.m_nZoomValue)
		{
			var _old_val      = this.m_nZoomValue;
			this.m_nZoomValue = _new_value;
			this.zoom_Fire(2, _old_val);
			return true;
		}
		else
		{
			this.m_oApi.sync_zoomChangeCallback(this.m_nZoomValue, 2);
		}
		return false;
	};

	this.zoom_Fire = function(type, old_zoom)
	{
		if (false === oThis.m_oApi.bInit_word_control)
			return;

		if (0 === type)
		{
			if (oThis.m_oApi.isUseNativeViewer && oThis.m_oDrawingDocument.m_oDocumentRenderer)
			{
				oThis.m_oDrawingDocument.m_oDocumentRenderer.setZoom(oThis.m_nZoomValue / 100);
				return;
			}
		}

		// нужно проверить режим и сбросить кеш грамотно (ie version)
		AscCommon.g_fontManager.ClearRasterMemory();

		if (AscCommon.g_fontManager2)
			AscCommon.g_fontManager2.ClearRasterMemory();

		var oWordControl = oThis;

		oWordControl.m_bIsRePaintOnScroll = false;

		var xScreen1 = oWordControl.m_oEditor.AbsolutePosition.R - oWordControl.m_oEditor.AbsolutePosition.L;
		var yScreen1 = oWordControl.m_oEditor.AbsolutePosition.B - oWordControl.m_oEditor.AbsolutePosition.T;
		xScreen1 *= g_dKoef_mm_to_pix;
		yScreen1 *= g_dKoef_mm_to_pix;

		xScreen1 >>= 1;
		yScreen1 >>= 1;

		var posDoc = oWordControl.m_oDrawingDocument.ConvertCoordsFromCursor2(xScreen1, yScreen1, old_zoom, true);

		oWordControl.CheckZoom();
		oWordControl.CalculateDocumentSize();

		var lCurPage = oWordControl.m_oDrawingDocument.m_lCurrentPage;
		if (-1 != lCurPage)
		{
			oWordControl.m_oHorRuler.CreateBackground(oWordControl.m_oDrawingDocument.m_arrPages[lCurPage]);
			oWordControl.m_bIsUpdateHorRuler = true;
			oWordControl.m_oVerRuler.CreateBackground(oWordControl.m_oDrawingDocument.m_arrPages[lCurPage]);
			oWordControl.m_bIsUpdateVerRuler = true;
		}

		oWordControl.OnCalculatePagesPlace();
		var posScreenNew = oWordControl.m_oDrawingDocument.ConvertCoordsToCursor(posDoc.X, posDoc.Y, posDoc.Page);

		var _x_pos = oWordControl.m_oScrollHorApi.getCurScrolledX() + posScreenNew.X - xScreen1;
		var _y_pos = oWordControl.m_oScrollVerApi.getCurScrolledY() + posScreenNew.Y - yScreen1;

		_x_pos = Math.max(0, Math.min(_x_pos, oWordControl.m_dScrollX_max));
		_y_pos = Math.max(0, Math.min(_y_pos, oWordControl.m_dScrollY_max));

		// TODO: заглушка под открытие. мы любим открывать файлы с зумом. И тогда документ не в начале открывается, а с
		// малениким проскролливанием
		if (oWordControl.m_dScrollY == 0)
			_y_pos = 0;

		oWordControl.m