;
	}
}

.gradient {
	.gradient-span {
		background-image: linear-gradient(
			to bottom,
			var(--base--white),
			var(--white--64)
		);
		-webkit-text-fill-color: transparent;
		-webkit-background-clip: text;
		background-clip: text;
	}
}

.gradient-alt {
	.gradient-span {
		background-image: linear-gradient(
			to bottom,
			var(--base--white),
			var(--text-subtitle)
		);
		-webkit-text-fill-color: transparent;
		-webkit-background-clip: text;
		background-clip: text;
	}
}
.mocha code,
.mocha .hljs {
  background: #181825;
}
.mocha code .hljs-attr,
.mocha code .hljs-string {
  color: #a6e3a1;
}
.mocha code .hljs-tag {
  color: #f38ba8;
}
.mocha code .hljs-name {
  color: #f2cdcd;
}
.mocha pre .hljs {
  background: #181825 !important;
}
.mocha pre .hljs-params {
  color: #f38ba8 !important;
}
.mocha pre .hljs-built_in,
.mocha pre .hljs-selector-tag,
.mocha pre .hljs-section,
.mocha pre .hljs-link {
  color: #74c7ec !important;
}
.mocha pre .hljs-keyword {
  color: #cba6f7 !important;
}
.mocha pre .hljs,
.mocha pre .hljs-subst {
  color: #a6adc8 !important;
}
.mocha pre .hljs-title {
  color: #89b4fa !important;
}
.mocha pre .hljs-attr,
.mocha pre .hljs-meta-keyword {
  color: #a6e3a1 !important;
}
.mocha pre .hljs-type {
  color: #89b4fa !important;
}
.mocha pre .hljs-string {
  color: #a6e3a1 !important;
}
.mocha pre .hljs-tag {
  color: #f38ba8 !important;
}
.mocha pre .hljs-meta,
.mocha pre .hljs-name,
.mocha pre .hljs-symbol,
.mocha pre .hljs-bullet,
.mocha pre .hljs-addition,
.mocha pre .hljs-variable,
.mocha pre .hljs-template-tag,
.mocha pre .hljs-template-variable {
  color: #f2cdcd !important;
}
.mocha pre .hljs-addition {
  background-color: #181825 !important;
  color: #a6e3a1 !important;
}
.mocha pre .hljs-deletion {
  background-color: #181825 !important;
  color: #f38ba8 !important;
}
.mocha pre .hljs-comment,
.mocha pre .hljs-quote {
  color: #585b70 !important;
}
.mocha pre .hljs-keyword,
.mocha pre .hljs-selector-tag,
.mocha pre .hljs-literal,
.mocha pre .hljs-title,
.mocha pre .hljs-section,
.mocha pre .hljs-doctag,
.mocha pre .hljs-type,
.mocha pre .hljs-name,
.mocha pre .hljs-strong {
  font-weight: bold !important;
}
.mocha pre .hljs-literal,
.mocha pre .hljs-number {
  color: #fab387 !important;
}
.mocha pre .hljs-emphasis {
  font-style: italic !important;
}

.macchiato code,
.macchiato .hljs {
  background: #1e2030;
}
.macchiato code .hljs-attr,
.macchiato code .hlj


${getText()}", style: TextStyles.labelTextSmall)
        ]));
  }
}
import 'package:flutter/widgets.dart';

class WBehindKeyboard extends StatefulWidget {
  const WBehindKeyboard(
      {super.key,
      required this.child,
      this.reversed = false,
      this.keepView = true});

  final Widget child;

  /// As default, view hide when keyboard opened.
  /// Set reversed = true, it'll reverse the logic.
  final bool reversed;

  /// if you want hide view but keep the layout, set keepView = true as default
  /// otherwise a view will dispose when keyboard opened
  /// Both mode support touch through below widget as well
  final bool keepView;

  @override
  _WBehindKeyboardState createState() => _WBehindKeyboardState();
}

class _WBehindKeyboardState extends State<WBehindKeyboard> {
  bool _keyboardVisible = false;

  @override
  Widget build(BuildContext context) {
    _keyboardVisible = MediaQuery.of(context).viewInsets.bottom != 0;
    final bool visible =
        !(widget.reversed ? !_keyboardVisible : _keyboardVisible);
    return widget.keepView
        ? Opacity(
            opacity: visible ? 1 : 0,
            child: IgnorePointer(ignoring: !visible, child: widget.child),
          )
        : Visibility(
            child: IgnorePointer(ignoring: !visible, child: widget.child),
            visible: visible);
  }
}
import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:form_builder_validators/form_builder_validators.dart';
import 'package:persistent_bottom_nav_bar_v2/persistent-tab-view.dart';
import 'package:qubic_wallet/components/amount_formatted.dart';
import 'package:qubic_wallet/components/copyable_text.dart';
import 'package:qubic_wallet/components/currency_amount.dart';
import 'package:qubic_wallet/components/qubic_amount.dart';
import 'package:qubic_wallet/components/qubic_asset.dart';
import 'package:qubic_wallet/di.dart';
import 'package:qubic_wallet/flutter_flow/theme_paddings.dart';
import 'package:qubic_wallet/helpers/id_validators.dart';
import 'package:qubic_wallet/helpers/re_auth_dialog.dart';
import 'package:qubic_wallet/models/qubic_list_vm.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/assets.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/explorer/explorer_result_page.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/receive.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/reveal_seed/reveal_seed.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/reveal_seed/reveal_seed_warning_sheet.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/send.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/transfers/transactions_for_id.dart';
import 'package:qubic_wallet/smart_contracts/sc_info.dart';
import 'package:qubic_wallet/stores/application_store.dart';
import 'package:qubic_wallet/styles/inputDecorations.dart';
import 'package:qubic_wallet/styles/textStyles.dart';
import 'package:qubic_wallet/styles/themed_controls.dart';

enum CardItem { delete, rename, reveal, view


22
				},
				1,
				"TaskForce38, Let's Rock!",
				0
			}
		}
	},
	[900271] = {
		touch = "……나의 침묵은 초조함을 의미하는 것은 아니다. 용건이 있다면 말해다오.",
		feeling3 = "…나의 침묵은 초조함을 의미하는 것은 아니다. 생각에 잠겼거나, 아니면 생각에 잠겼다는 걸 어떻게 말해야 할지 생각에 잠긴 것뿐이다.",
		upgrade = "다시… 강해졌나.",
		expedition = "잠깐 실례, 의뢰에서 돌아온 아이들을 마중하고 오겠다. 넌 여기서 결과만 기다리면 된다.",
		win_mvp = "너희들이 선택한 결말은 이런 건가.",
		home = "돌아왔나. ……그럼, 다음 출격 준비를 해볼까?",
		mission = "임무… 빨리 처리하는 편이 좋다.",
		touch2 = "아무래도 지휘관에겐 기억에 남는 '체험'이 필요한 모양이군.",
		feeling1 = "지금은 얘기하고 싶지 않다.",
		skill = "발버둥 치지 마라!",
		drop_descrip = "에식스급 항공모함 - 벙커힐(CV-17)",
		mail = "우편… 새로운 정보는 있나?",
		lose = "그 힘……'용의 턱(드래곤 죠스)'조차 능가하는 강적이란 건가…!",
		propose = "미안… 머릿속이 새하얗다. 큭, 대체 무슨 말을 해야…… 그래! '널 향한 충성과 사랑은 영원할 거다'…… 이걸로 됐나?",
		hp_warning = "이런 때에……!",
		id = 900271,
		voice_key = 10717,
		feeling5 = "싸움을 위해 태어난 우리들에겐, 전투 이외의 존재 가치 같은 건 없다고 생각했었다. 너와 함께 하는 나날을 보내면서, 우리들에겐 싸우는 것 이외에도 살아갈 가치가 있다는…… 그런… 느낌이 든다.",
		main = "오늘도 어딘가는 전쟁의 불꽃


return PlaceObj("ModDef", {
	"title", "United States Space Force (Logo)",
	"version", 1,
	"version_major", 0,
	"version_minor", 1,

	"image", "Preview.png",
	"id", "ChoGGi_Logos_UnitedStatesSpaceForce",
	"steam_id", "1979391866",
	"pops_any_uuid", "7360e381-11bd-4b2e-9ee9-9658d3d58549",
	"author", "BrowncoatTrekky & ChoGGi",
	"lua_revision", 1007000, -- Picard
	"TagColonyLogos", true,
	"code", {
		"Code/Script.lua",
	},
	"description", [[[b]"I like thinking big. If you're going to be thinking anything, you might as well think big."[/b] ~ President Donald Trump

The following military branch is being incorporated into the United States Military. We are curious to see what this branch of the military will be up to in 20 years as the world begins the mini


//---------------------------------------------------------------------------------
// Copyright 2013 Ceton Corp
// Copyright 2013 Tomasz Cielecki (tomasz@ostebaronen.dk)
// 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

// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
// INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR
// CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.

// See the Apache 2 License for the specific language governing
// permissions and limitations under the License.
//---------------------------------------------------------------------------------

namespace Cheesebaron.MvxPlugins.Settings
{
    public interface ISettings
    {
        /// <summary>
        /// Gets the current value or the default that you specify.
        /// </summary>
        /// <typeparam name="T">Vaue of T (bool, int, float, long, string)</typeparam>
        /// <param name="key">Key for setting</param>
        /// <param name="defaultValue">default value if not set</param>
        /// <param name="roaming">Roam settings (only for WindowsCommon)</param>
        /// <returns></returns>
        T GetValue<T>(string key, T defaultValue = default(T), bool roaming = false);


-several-projects',
        'Run dart analyze on several projects with and without a cache',
        kind: 'group',
      );

  @override
  String get workingDir => packageRoot;

  @override
  List<String> analyzeWhat(bool quick) => quick
      ? ['meta']
      : [
          'analysis_server',
          'analysis_server_client',
          'analyzer',
          'analyzer_cli',
          'analyzer_plugin',
          'analyzer_utilities',
          '_fe_analyzer_shared',
        ];
}

class CmdLineSmallFileBenchmark extends AbstractCmdLineBenchmark {
  Directory? _tempDir;

  CmdLineSmallFileBenchmark()
    : super(
        'dart-analyze-small-file',
        'Run dart analyze on a small file with and without a cache',
        kind: 'group',
      );

  @override
  String get workingDir => _tempDir!.path;

  @override
  List<String> analyzeWhat(bool quick) => ['t.dart'];

  @override
  void cleanup() {
    _tempDir!.deleteSync(recursive: true);
    _tempDir = null;
  }

  @override
  void setup() {
    var dir = Directory.systemTemp.createTempSync('analyzer-benchmark');
    var file = File.fromUri(dir.uri.resolve('t.dart'));
    file.writeAsStringSync('''
void main() {
  print("Hello, world!");
}''');
    _tempDir = dir;
  }
}
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:convert';

import 'package:analyzer/exception/exception.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
import 'package:logging/logging.dart';

import 'input_converter.dart';
import 'operation.dart';

/// [InstrumentationInputConverter] converts an instrumentation stream
/// into a series of operations to be sent to the analysis server.
class InstrumentationInputConverter extends CommonInputConverter {
  static final _colon = ':'.codeUnitAt(0);

  final Set<String> codesSeen = <String>{};

  /// [readBuffer] holds the contents of the file being read from disk
  /// as recorded in the instrumentation log
  /// or `null` if not converting a "Read" entry.
  StringBuffer? readBuffer;

  InstrumentationInputConverter(super.tmpSrcDirPath, super.srcPathMap);

  @override
  Operation? convert(String line) {
    List<String> fields;
    try {
      fields = _parseFields(line);
      if (fields.length < 2) {
        var readBuffer = this.readBuffer;
        if (readBuffer != null) {
          readBuffer.writeln(fields.length == 1 ? fields[0] : '');
          return null;
        }
        throw 'Failed to process line:\n$line';
      }
      if (readBuffer != null) {
        readBuffer = null;
      }
    } catch (e, s) {
      throw AnalysisException(
        'Failed to parse line\n$line',
        CaughtException(e, s),
      );
    }
    // int timeStamp = int.parse(fields[0], onError: (_) => -1);
    var opCode = fields[1];
    if (opCode == InstrumentationLogAdapter.TAG_NOTIFICATION) {
      return convertNotification(decodeJson(line, fields[2]));
    } else if (opCode == 'Read') {
      // 1434096943209:Read:/some/file/path:1434095535000:<file content>
      //String filePath = fields[2];
      readBuffer = StringBuffer(fields.


.Error                      "Invalid payload"
// @Failure      404        {object}  models.Error                      "Not found"
// @Failure      500        {object}  models.Error                      "Internal error"
// @Router       /event/triggered/{eventType} [get]
func (eh *EventHandler) GetTriggeredEvents(c *gin.Context) {
	eventType := c.Param("eventType")
	params := &models.GetTriggeredEventsParams{}
	if err := c.ShouldBindQuery(params); err != nil {
		SetBadRequestErrorResponse(c, fmt.Sprintf(common.InvalidRequestFormatMsg, err.Error()))
	}

	params.EventType = eventType

	var payload = &models.Events{
		PageSize:    0,
		NextPageKey: "0",
		TotalCount:  0,
		Events:      []*apimodels.KeptnContextExtendedCE{},
	}

	var events []apimodels.KeptnContextExtendedCE
	var err error

	eventFilter := common.EventFilter{
		Type:    params.EventType,
		Stage:   params.Stage,
		Service: params.Service,
		ID:      params.EventID,
		Time:    time.Now().UTC(),
	}

	if params.Project != nil && *params.Project != "" {
		events, err = eh.ShipyardController.GetTriggeredEventsOfProject(*params.Project, eventFilter)
	} else {
		events, err = eh.ShipyardController.GetAllTriggeredEvents(eventFilter)
	}

	if err != nil {
		if errors.Is(err, common.ErrProjectNotFound) {
			SetNotFoundErrorResponse(c, err.Error())
			return
		}
		SetInternalServerErrorResponse(c, err.Error())
		return
	}

	paginationInfo := common.Paginate(len(events), params.PageSize, params.NextPageKey)

	totalCount := len(events)
	if paginationInfo.NextPageKey < int64(totalCount) {
		for index := range events[paginationInfo.NextPageKey:paginationInfo.EndIndex] {
			payload.Events = append(payload.Events, &events[index])
		}
	}

	payload.TotalCount = float64(totalCount)
	payload.NextPageKey = paginationInfo.NewNextPageKey
	c.JSON(http.StatusOK, payload)
}

func (eh *EventHandler) HandleEvent(c *gin.Context) {
	event := &apimodels.KeptnContextExtendedCE{}
	if err := c.ShouldBindJSON(event); err != nil {
		SetBadRequestErrorResponse(c, fmt.Sprintf(common.InvalidRequestFormatMsg, err.Error()))
		return
	}
	keptnEvent := &apimodels.KeptnContextExtendedCE{}
	if err := keptnv2.Decode(event, keptnEvent); err != nil {
		SetBadRequestErrorResponse(c, fmt.Sprintf(common.InvalidRequestFormatMsg, err.Error()))
		return
	}
	if err := keptnEvent.Validate(); err != nil {
		SetBadRequestErrorResponse(c, fmt.Sprintf(common.InvalidRequestFormatMsg, err.Error()))
		return
	}

	err := eh.ShipyardController.HandleIncomingEvent(*event, false)
	if err != nil {
		SetInternalServerErrorResponse(c, err.Error())
		return
	}
	c.Status(http.StatusOK)

}

// NewEventHandler creates a new EventHandler
func NewEventHandler(shipyardController controller.IShipyardController) IEventHandler {
	return &EventHandler{
		ShipyardController: shipyardController,
	}
}
package handler_test

import (
	"encoding/json"
	"net/http"
	"net/http/httptest"
	"testing"

	"github.com/gin-gonic/gin"
	apimodels "github.com/keptn/go-utils/pkg/api/models"
	keptnv2 "


not(:hover):not(:active):not(:selected) {
    background-color: alpha(darker(@theme_unfocused_base_color), 0.33);
}

list.keybindings > row .header,
list.winprops > row .header,
list.combos > row {
    padding: 8px 12px;
    min-height: 32px;
}

list.keybindings > box {
    background-color: @theme_fg_color;
}

list.keybindings > box > label {
    color: @theme_base_color;
    font-size: larger;
    margin-top: 16px;
    margin-bottom: 16px;
}

list.keybindings > row .header:hover {
    background-color: alpha(@theme_fg_color, 0.10);
}

list.keybindings > row .header:hover:backdrop {
    background-color: alpha(@theme_unfocused_fg_color, 0.10);
}

list.keybindings > row.expanded label.description {
    font-weight: bold;
}

list.combos {
    background-color: transparent;
}

list.combos > .editing {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

.winprops .option-list {
    background-color: transparent;
}
/*
Users may override the default PaperWM styles to suit their preferences.
Added custom styling in this `user.css` file.

`Disable` and then `enable` PaperWM extension to apply these styles
(users do NOT need to logout / login).

DEFAULT STYLES ARE PROVIDED BELOW FOR REFERENCE:
/*

/*
.background-clear {
    background-color: rgba(0, 0, 0, 0);
}

.topbar-transparent-background {
    background-color: rgba(0, 0, 0, 0.35);
    box-shadow: none;
}

.space-workspace-indicator {
    padding: 0 10px 0 0;
    background-color: transparent;
    border-image: none;
    background-image: none;
    border: none;
}

.space-focus-mode-icon {
    icon-size: 16px;
    padding: 0 18px 0 18px;
    margin-left: 3px;
    background-color: transparent;
}

.open-position-icon {
    icon-size: 22px;
    padding: 0;
    background-color: transparent;
}

.focus-button-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
}

.take-window-hint {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 8px;
    border-radius: 8px;
}

.workspace-icon-button {
    -st-icon-style: symbolic;
    border: none;
    border-radius: 8px;
    padding: 8px;
}

.workspace-icon-button StIcon {
    icon-size: 16px;
}

.paperwm-minimap-selection {
    border-radius: 8px;
}

.paperwm-clone-shade {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 7px 7px 0px 0px;
}

.paperwm-window-position-bar-backdrop {
    background-color: rgba(0, 0, 0, 0.35);
}

.paperwm-window-position-bar {
    border: 0;
    border-radius: 1px;
}

*/.jse-theme-dark {
    --jse-theme: dark;

    /* over all fonts, sizes, and colors */
    --jse-th


 self.theta_scaling_means = np.load(f"{filename}_theta_means.npy")
            self.theta_scaling_stds = np.load(f"{filename}_theta_stds.npy")
            logger.debug(
                "  Found parameter scaling information: means %s, stds %s",
                self.theta_scaling_means,
                self.theta_scaling_stds,
            )
        except FileNotFoundError:
            logger.warning("Parameter scaling information not found in %s", filename)
            self.theta_scaling_means = None
            self.theta_scaling_stds = None

    def initialize_parameter_transform(self, theta, transform=True, overwrite=True):
        if self.x_scaling_stds is not None and self.x_scaling_means is not None and not overwrite:
            logger.info(
                "Parameter rescaling already defined. To overwrite, call initialize_parameter_transform(theta, overwrite=True)."
            )
        elif transform:
            logger.info("Setting up parameter rescaling")
            self.theta_scaling_means = np.mean(theta, axis=0)
            self.theta_scaling_stds = np.maximum(np.std(theta, axis=0), 1.0e-6)
        else:
            logger.info("Disabling parameter rescaling")
            self.theta_scaling_means = None
            self.theta_scaling_stds = None

    def _transform_parameters(self, theta):
        if self.theta_scaling_means is not None and self.theta_scaling_stds is not None:
            if isinstance(theta, torch.Tensor):
                theta_scaled = theta - torch.tensor(self.theta_scaling_means, dtype=theta.dtype, device=theta.device)
                theta_scaled = theta_scaled / torch.tensor(
                    self.theta_scaling_stds, dtype=theta.dtype, device=theta.device
                )
            else:
                theta_scaled = theta - self.theta_scaling_means[np.newaxis, :]
                theta_scaled /= self.theta_scaling_stds[np.newaxis, :]
        else:
            theta_scaled = theta
        return theta_scaled

    def _transform_score(self, t_xz, inverse=False):
        if self.theta_scaling_means is not None and self.theta_scaling_stds is not None and t_xz is not None:
            if inverse:
                t_xz_scaled = t_xz / self.theta_scaling_stds[np.newaxis, :]
            else:
                t_xz_scaled = t_xz * self.theta_scaling_stds[np.newaxis, :]
        else:
            t_xz_scaled = t_xz
        return t_xz_scaled

class TheresAGoodReasonThisDoesntWork(Exception):
    pass


 [KlausSchaefers/figma-low-code](https://github.com/KlausSchaefers/figma-low-code)
- [thomas-lowry/figma-plugins-on-github](https://github.com/thomas-lowry/figma-plugins-on-github)
---
title: FerretDB
---

# FerretDB

- [FerretDB/FerretDB](https://github.com/FerretDB/FerretDB)
  - Apache-2.0, Go
  - Open Source MongoDB alternative
  - 后端存储: SQLite, MongoDB
- 参考
  - [Supported commands](https://docs.ferretdb.io/reference/supported-commands/)
  - [Known differences](https://docs.ferretdb.io/diff/)
    - 不能处理 `\0`
    - 不支持嵌套数组
    - `-0` -> `0`
    - Key 不能包含 `.`
    - Key 不能以 `$` 开头
    - Value 不支持 Infinity, -Infinity, NaN
    - insert 不能包含重复 Key
    - 保留前缀 `_ferretdb_`
- MongoDB -> PostgreSQL
  - databases -> schemas
  - collections -> tables
  - documents -> rows JSONB
- 客户端
  - authMechanism=PLAIN

```bash
# PostgreSQL backend
# docker run -d --rm --name ferretdb -p 27017:27017 ghcr.io/ferretdb/all-in-one

# PostgreSQL
# FERRETDB_POSTGRESQL_URL 可以没有账号密码， mongo 链接时提供
docker run -it --rm \
  -p 27017:27017 \
  -e FERRETDB_TELEMETRY=disable \
  -e DO_NOT_TRACK=true \
  -e FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/ferretdb \
  --name ferretdb ghcr.io/ferretdb/ferretdb

# mongodb://username:password@127.0.0.1/ferretdb?authMechanism=PLAIN

# SQLite
docker run -it --rm \
  -p 27017:27017 \
  -v $PWD/data:/data/ \
  -e FERRETDB_TELEMETRY=disable \
  -e DO_NOT_TRACK=true \
  -e FERRETDB_HANDLER=sqlite \
  -e FERRETDB_SQLITE_URL=file:/data/ \
  --name ferretdb ghcr.io/ferretdb/all-in-one
```

## Model

- `_ferretdb_database_metadata`
- collection -> `COLLECTION_HASH`
  - `_json`
---
title: Apache Cassandra
---

# Cassandra

## Tips

- [apache/cassandra](https://github.com/apache/cassandra)
- 配置文件 http://cassandra.apache.org/doc/latest/configuration/cassandra_config_file.html
- http://projects.spring.io/spring-data-cassandra/
  - http://docs.spring.io/spring-data/cassandra/docs/1.5.4.RELEASE/reference/html/
- 客户端
  - https://stackoverflow.com/a/1752359


IDv, 01802ca4

/*
C++: TTransactionResponseBuffer::GetDataPtr(unsigned char)
MPW-mangled: GetDataPtr__26TTransactionResponseBufferFUc
*/
    JT _ZN26TTransactionResponseBuffer10GetDataPtrEh, 018020a4

/*
C++: TStoreHashTableIterator::GetData(char*, long*)
MPW-mangled: GetData__23TStoreHashTableIteratorFPcPl
*/
    JT _ZN23TStoreHashTableIterator7GetDataEPcPl, 01800924
    JT GetDomainAndFaultMonitorFromDomainNumber, 01801080

/*
C++: static MemObjManager::GetDomainInfoByName(unsigned long, DomainInfo*)
MPW-mangled: GetDomainInfoByName__13MemObjManagerSFUlP10DomainInfo
*/
    JT _ZN13MemObjManager19GetDomainInfoByNameEmP10DomainInfo, 01801088

/*
C++: static MemObjManager::GetDomainInfo(unsigned long, DomainInfo*, long*)
MPW-mangled: GetDomainInfo__13MemObjManagerSFUlP10DomainInfoPl
*/
    JT _ZN13MemObjManager13GetDomainInfoEmP10DomainInfoPl, 01801084

/*
C++: GetEffectiveInterruptPriority(InterruptObject*)
MPW-mangled: GetEffectiveInterruptPriority__FP15InterruptObject
*/
    JT _Z29GetEffectiveInterruptPriorityP15InterruptObject, 01802bd0

/*
C++: CDynamicArray::GetElementsAt(long, void*, long)
MPW-mangled: GetElementsAt__13CDynamicArrayFlPvT1
*/
    JT GetElementsAt__13CDynamicArrayFlPvT1, 01801af0

/*
C++: TWRecognizer::GetEndTime(TStrokeUnit*)
MPW-mangled: GetEndTime__12TWRecognizerFP11TStrokeUnit
*/
    JT _ZN12TWRecognizer10GetEndTimeEP11TStrokeUnit, 01802cf8

/*
C++: TWRecognizer::GetEndTime(TUnit*)
MPW-mangled: GetEndTime__12TWRecognizerFP5TUnit
*/
    JT _ZN12TWRecognizer10GetEndTimeEP5TUnit, 01802cfc

/*
C++: TWRecognizer::GetEndTime(TSIUnit*)
MPW-mangled: GetEndTime__12TWRecognizerFP7TSIUnit
*/
    JT _ZN12TWRecognizer10GetEndTimeEP7TSIUnit, 01802d00

/*
C++: TWRecognizer::GetEndTime(TStroke*)
MPW-mangled: GetEndTime__12TWRecognizerFP7TStroke
*/
    JT _ZN12TWRecognizer10GetEndTimeEP7TStroke, 01802d04

/*
C++: TWRecognizer::GetEndTime(TWRecUnit*)
MPW-mangled: GetEndTime__12TWRecognizerFP9TWRecUnit
*/
    JT _ZN12TWRecognizer10GetEndTimeEP9TWRecUnit, 01802d08

/*
C++: static MemObjManager::GetEnvDomainName(unsigned long, unsigned long, unsigned long*, unsigned char*, long*)
MPW-mangled: GetEnvDomainName__13MemObjManagerSFUlT1PUlPUcPl
*/
    JT GetEnvDomainName__13MemObjManagerSFUlT1PUlPUcPl, 0180108c

/*
C++: static MemObjManager::GetEnvironmentInfo(unsigned long, EnvironmentInfo*, long*)
MPW-mangled: GetEnvironmentInfo__13MemObjManagerSFUlP15EnvironmentInfoPl
*/
    JT _ZN13MemObjManager18GetEnvironmentInfoEmP15EnvironmentInfoPl, 01801094

/*
C++: Get


; i++ {
			if i == b {
				continue
			}
			d := abs(int(i) - int(b))
			if d != 1 && d != 9 && len(pos[i]) > 0 && pos[i][0] < pos[b][0] {
				return false
			}
		}
		return true
	}

	ans := make([]byte, 0, n)
	used := make([]bool, n+1)
	for i := 0; i < n; {
		b := s[i] - '0'
		x := (b + 9) % 10 // b-1
		y := (b + 1) % 10
		if x > y {
			x, y = y, x
		}
		if x < b && check(x) {
			b = x
		} else if y < b && check(y) {
			b = y
		}

		ans = append(ans, '0'+b)
		used[pos[b][0]] = true
		pos[b] = pos[b][1:]

		for used[i] {
			i++
		}
	}
	return string(ans)
}

// 不能交换 0 和 9 的版本
func makeLexicographicallySmallestStringBySwappingAdjacentElements2(a []int) []int {
	const mx = 9
	pos := [mx + 1][]int{}
	for i, v := range a {
		pos[v] = append(pos[v], i)
	}

	check := func(v int) bool {
		if len(pos[v]) == 0 {
			return false
		}
		for i := 0; i <= mx; i++ {
			if (i < v-1 || i > v+1) && len(pos[i]) > 0 && pos[i][0] < pos[v][0] {
				return false
			}
		}
		return true
	}

	n := len(a)
	ans := make([]int, 0, n)
	used := make([]bool, n+1)
	for i := 0; i < n; {
		v := a[i]
		if v == 0 {
			continue
		}
		if check(v - 1) { // 把 v-1 换过来
			v--
		}

		ans = append(ans, v)
		used[pos[v][0]] = true
		pos[v] = pos[v][1:]

		for used[i] {
			i++
		}
	}
	return ans
}

// 解析时分
// - [1736. 替换隐藏数字得到的最晚时间](https://leetcode.cn/problems/latest-time-by-replacing-hidden-digits/) 1264
// - [3114. 替换字符可以得到的最晚时间](https://leetcode.cn/problems/latest-time-you-can-obtain-after-replacing-characters/) 1291
// - [2224. 转化时间需要的最少操作数](https://leetcode.cn/problems/minimum-number-of-operations-to-convert-time/) 1296
// - [1904. 你完成的完整对局数](https://leetcode.cn/problems/the-number-of-full-rounds-you-have-played/) 1498
// - [2933. 高访问员工](https://leetcode.cn/problems/high-access-employees/) 1537
// 解析月日：LC2409 https://leetcode.c


�ウスのかべ",
"トタンのかべ",
"コンクリートのかべ",
"おかしのかべ",
"しろいれんがのかべ",
"きわくのかべ",
"ちゃいろいれんがのかべ",
"マーメイドなかべ",
"たていたのかべ",
"ピンクのきわくのかべ",
"ピンクのかべ",
"みずいろのかべ",
"オレンジのかべ",
"はながらのかべ",
"きいろいいたかべ",
"しろいいたかべ",
"つちのかべ",
"いわのかべ",
"アラブなかべ",
"いわとつちのかべ",
"ロイヤルなかべ",
"くろいいたかべ",
"おうごんのかべ",
"いろとりどりなたまじゃり",
"あらいいしだたみ",
"れんがのしきいし",
"こいしのいしだたみ",
"しかくいいしだたみ",
"コンクリートなしきいし",
"あおいレンガのしきいし",
"ピンクのしきいし",
"ちゃいろいしきいし",
"おやしき",
"わふうのおしろ",
"ようふうのおしろ",
"モダンないえ"
],

//Presents
[],

//New furniture [PLUS]
[
"まほうのランプ",
,
,
,
"いかだのトロフィー"
]

];
/* Animal Crossing: New Leaf (Welcome amiibo) item list (FR) for Save Editor */

var ITEM_GROUPS_TRANSLATED=[

//Patterns
[
"Motif"
],

//Outside flowers
[
"tulipe rouge",
"tulipe blanche",
"tulipe jaune",
"tulipe rose",
"tulipe mauve",
"tulipe noire",
"tulipe orange",
"pensée blanche",
"pensée jaune",
"pensée rouge",
"pensée mauve",
"pensée orange",
"pensée bleue",
"cosmos blanc",
"cosmos rouge",
"cosmos jaune",
"cosmos rose",
"cosmos orange",
"cosmos noir",
"rose rouge",
"rose blanche",
"rose jaune",
"rose rose",
"rose orange",
"rose mauve",
"rose noire",
"rose bleue",
"rose dorée",
"œillet rouge",
"œillet rose",
"œillet blanc",
"lys blanc",
"lys jaune",
"lys rouge",
"lys orange",
"lys rose",
"lys noir",
"violette mauve",
"violette bleue",
"violette blanche",
"violette jaune",
"muguet",
"trèfle à 4 feuilles",
"pissenlit",
"tête de pissenlit"],

//Outside flowers (wilted)
"fanée",

//Fruit trees
[
"Pommier (taille 1)",
"Pommier (taille 2)",
"Pommier (taille 3)",
"Pommier (taille 4)",
"Pommier",
"Oranger (taille 1)",
"Oranger (taille 2)",
"Oranger (taille 3)",
"Oranger (taille 4)",
"Oranger",
"Poirier (taille 1)",
"Poirier (taille 2)",
"Poirier (taille 3)",
"Poirier (taille 4)",
"Poirier",
"Pêcher (taille 1)",
"Pêcher (taille 2)",
"Pêcher (taille 3)",
"Pêcher (taille 4)",
"Pêcher",
"Cerisier (taille 1)",
"Cerisier (taille 2)",
"Cerisier (taille 3)",
"Cerisier (taille 4)",
"Cerisier"
],

//More trees
[
"Bambou mort???",


flex:0 0 33.33333%;max-width:33.33333%}.col-2-3-l{-webkit-box-flex:0;-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.col-1-4-l{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-3-4-l{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-1-5-l{-webkit-box-flex:0;-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.col-2-5-l{-webkit-box-flex:0;-ms-flex:0 0 40%;flex:0 0 40%;max-width:40%}.col-3-5-l{-webkit-box-flex:0;-ms-flex:0 0 60%;flex:0 0 60%;max-width:60%}.col-4-5-l{-webkit-box-flex:0;-ms-flex:0 0 80%;flex:0 0 80%;max-width:80%}.col-full-l{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}}@media only screen and (min-width:1200px){.row-xl{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative;margin-left:-16px;margin-right:-16px}.col-1-2-xl,.col-1-3-xl,.col-1-4-xl,.col-1-5-xl,.col-1-xl,.col-2-3-xl,.col-2-5-xl,.col-2-xl,.col-3-4-xl,.col-3-5-xl,.col-3-xl,.col-4-5-xl,.col-4-xl,.col-5-xl,.col-6-xl,.col-7-xl,.col-8-xl,.col-9-xl,.col-10-xl,.col-11-xl,.col-12-xl{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-left:16px;padding-right:16px}.col-1-xl{-webkit-box-flex:0;-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.col-2-xl{-webkit-box-flex:0;-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.col-3-xl{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4-xl{-webkit-box-flex:0;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.col-5-xl{-webkit-box-flex:0;-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.col-6-xl{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7-xl{-webkit-box-flex:0;-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.col-8-xl{-webkit-box-flex:0;-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.col-9-xl{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10-xl{-webkit-box-flex:0;


() (err error) {
	if ut.Name == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "name"))
	}

	if len(ut.Name) < 1 {
		err = goa.MergeErrors(err, goa.InvalidLengthError(`response.name`, ut.Name, len(ut.Name), 1, true))
	}
	if ut.Rating < 1 {
		err = goa.MergeErrors(err, goa.InvalidRangeError(`response.rating`, ut.Rating, 1, true))
	}
	if ut.Rating > 5 {
		err = goa.MergeErrors(err, goa.InvalidRangeError(`response.rating`, ut.Rating, 5, false))
	}
	if ut.Vintage < 1900 {
		err = goa.MergeErrors(err, goa.InvalidRangeError(`response.vintage`, ut.Vintage, 1900, true))
	}
	return
}
//************************************************************************//
// API "cellar": Application Contexts
//
// Generated with goagen v0.2.dev, command line:
// $ goagen
// --design=github.com/raphael/gophercon2016/demos/3-document/design
// --out=$(GOPATH)/src/github.com/raphael/gophercon2016/demos/3-document
// --version=v0.2.dev
//
// The content of this file is auto-generated, DO NOT MODIFY
//************************************************************************//

package app

import (
	"github.com/goadesign/goa"
	"golang.org/x/net/context"
	"strconv"
)

// CreateBottleContext provides the bottle create action context.
type CreateBottleContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *CreateBottlePayload
}

// NewCreateBottleContext parses the incoming request URL and body, performs validations and creates the
// context used by the bottle controller create action.
func NewCreateBottleContext(ctx context.Context, service *goa.Service) (*CreateBottleContext, error) {
	var err error
	resp := goa.ContextResponse(ctx)
	resp.Service = service
	req := goa.ContextRequest(ctx)
	rctx := CreateBottleContext{Context: ctx, ResponseData: resp, RequestData: req}
	return &rctx, err
}

// createBottlePayload is the bottle create action payload.
type createBottlePayload struct {
	// Name of bottle
	Name *string `json:"name,omitempty" xml:"name,omitempty" form:"name,omitempty"`
	// Rating of bottle
	Rating *int `json:"rating,omitempty" xml:"rating,omitempty" form:"rating,omitempty"`
	// Vintage of bottle
	Vintage *int `json:"vintage,omitempty" xml:"vintage,omitempty" form:"vintage,omitempty"`
}

// Validate runs the validation rules defined in the design.
func (payload *createBottlePayload) Validate() (err error) {
	if payload.Name == nil {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`payload`, "name"))
	}
	if payload.Vintage == nil {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`payload`, "vintage"))
	}
	if payload.Rating == nil {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`payload`, "rating"))
	}

	if payload.Name != nil {
		if len(*payload.Name) < 1 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`payload.name`, *payload.Name, len(*payload.Name), 1, true))
		}
	}
	if payload.Rating != nil {
		if *payload.Rating < 1 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`payload.rating`, *payload.Rating, 1, true))
		}
	}


[b10]; v = at2(rx1,ry0);
    a = LERP(sx, u, v);

    q = g2[b01]; u = at2(rx0,ry1);
    q = g2[b11]; v = at2(rx1,ry1);
    b = LERP(sx, u, v);

    return LERP(sy, a, b);
}

/*====================
  M_Noise3
  ====================*/
float   M_Noise3(float x, float y, float z)
{
    int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11;
    float rx0, rx1, ry0, ry1, rz0, rz1, *q, sx, sy, sz, a, b, c, d, t, u, v;
    int i, j;
    float vec[3] = {x, y, z};

    NOISE_SETUP(0, bx0, bx1, rx0, rx1);
    NOISE_SETUP(1, by0, by1, ry0, ry1);
    NOISE_SETUP(2, bz0, bz1, rz0, rz1);

    i = p[bx0];
    j = p[bx1];

    b00 = p[i + by0];
    b10 = p[j + by0];
    b01 = p[i + by1];
    b11 = p[j + by1];

    sx = s_curve(rx0);
    sy = s_curve(ry0);
    sz = s_curve(rz0);

    q = g3[b00 + bz0]; u = at3(rx0, ry0, rz0);
    q = g3[b10 + bz0]; v = at3(rx1, ry0, rz0);
    a = LERP(sx, u, v);

    q = g3[b01 + bz0]; u = at3(rx0, ry1, rz0);
    q = g3[b11 + bz0]; v = at3(rx1, ry1, rz0);
    b = LERP(sx, u, v);

    c = LERP(sy, a, b);

    q = g3[b00 + bz1]; u = at3(rx0, ry0, rz1);
    q = g3[b10 + bz1]; v = at3(rx1, ry0, rz1);
    a = LERP(sx, u, v);

    q = g3[b01 + bz1]; u = at3(rx0, ry1, rz1);
    q = g3[b11 + bz1]; v = at3(rx1, ry1, rz1);
    b = LERP(sx, u, v);

    d = LERP(sy, a, b);

    return LERP(sz, c, d);
}

/*====================
  M_SmoothRandAngle1
  ====================*/
float   M_SmoothRandAngle1(float x)
{
    int bx0, bx1;
    float rx0, rx1, sx, t, u, v;
    float vec[1] = {x};

    NOISE_SETUP(0, bx0, bx1, rx0, rx1);

    sx = s_curve(rx0);
    u = g1[p[bx0]] * 180.0f;
    v = g1[p[bx1]] * 180.0f;

    return M_LerpAngle(sx, u, v);
}

/*====================
  M_SmoothRand1

  Like perlin noise but without the "bouncing" toward zero
  ====================*/
float   M_SmoothRand1(float x)
{
   int bx0, bx1;
   float rx0, rx1, sx, t, u, v;
   float vec[1] = {x};

   NOISE_SETUP(0, bx0, bx1, rx0, rx1);

   sx = s_curve(rx0);
   u = g1[p[bx0]];
   v = g1[p[bx1]];

   return LERP(sx, u, v);
}


))
        sta <zp_len_hi
  .ENDIF
        jsr get_crunched_byte
        tax
        bcs copy_next
decr_exit:
.ENDIF
.IF(.DEFINED(exit_hook))
  .INCLUDE("exit_hook")
.ELSE
        rts
.ENDIF
.IF(.DEFINED(i_fourth_offset_table))
; -------------------------------------------------------------------
; the static stable used for bits+offset for lengths 1, 2 and 3 (3 bytes)
; bits 2, 4, 4 and offsets 64, 48, 32 corresponding to
; %11010000, %11110011, %11110010
tabl_bit:
        .BYTE($d0, $f3, $f2)
.ELSE
; -------------------------------------------------------------------
; the static stable used for bits+offset for lengths 1 and 2 (2 bytes)
; bits 2, 4 and offsets 48, 32 corresponding to %11001100, %11110010
tabl_bit:
        .BYTE($cc, $f2)
.ENDIF
; ###################################################################
; ## small end ######################################################
; ###################################################################
.ELIF(i_perf == 1)
; ###################################################################
; ## quick start ####################################################
; ###################################################################
        ldy #(v_highest_addr - 1) % 256
        txa
        jmp begin_stx
; -------------------------------------------------------------------
; -- end of stage 2 -------------------------------------------------
; -------------------------------------------------------------------
        .INCBIN("crunched_data", max_transfer_len + 2, 1) ; => zp_bitbuf
        .WORD((((v_highest_addr - 1) % 65536) / 256) * 256) ; => zp_dest_lo/hi
stage2end:
        .ORG($0100)
; -------------------------------------------------------------------
; -- start of stage 3 -----------------------------------------------
; -------------------------------------------------------------------
stage3start:
; -------------------------------------------------------------------
; get bits (26 bytes)
;
get_bits:
        adc #$80                ; needs c=0, affects v
        asl
        bpl gb_skip
gb_next:
        asl <zp_bitbuf
        bne gb_no_refill
        pha
        jsr get_crunched_byte
        rol
        sta <zp_bitbuf
        pla
gb_no_refill:
        rol
        bmi gb_next
gb_skip:
        bvs gb_get_hi
        rts
gb_get_hi:
        sec
        sta <zp_bits_hi
; -------------------------------------------------------------------
; get crunched byte (15 bytes) + hooks
;
get_crunched_byte:
        .IF(.DEFINED(fast_effect_hook))
          .INCLUDE("effect_hook")
        .ENDIF
        lda get_byte_fixup + 1
        bne get_byte_skip_hi
        dec get_byte_fixup + 2
        .IF(.DEFINED(slow_effect_hook))
          .INCLUDE("effect_hook")
        .ENDIF
get_byte_skip_hi:
        dec get_byte_fixup + 1
get_byte_fixup:
        lda lowest_addr + max_transfer_len
        rts
; -------------------------------------------------------------------
; copy one literal byte to destination (11 bytes)
;
literal_start1:
        jsr get_crunched_byte
        sta (zp_dest_lo),y
        tya
        bne no_hi_decr
        dec <zp_dest_hi
.IF(.DEFINED(i_reuse_offset))
        dec <zp_src_hi
.ENDIF
no_hi_decr:
        dey
; -------------------------------------------------------------------
; fetch sequence length index (14(16) bytes)
; x must be #


2Volume_upscaleDownScale(t *testing.T) {
	var volume volumes.Volume
	t.Parallel()
	quotas.BookMany(t, volumeQuotas(2))

	resource.Test(t, resource.TestCase{
		PreCheck:          func() { common.TestAccPreCheck(t) },
		ProviderFactories: common.TestAccProviderFactories,
		CheckDestroy:      testAccCheckBlockStorageV2VolumeDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccBlockStorageV2VolumeBasic,
				Check:  testAccCheckBlockStorageV2VolumeExists(resourceVolumeV2Name, &volume),
			},
			{
				Config: testAccBlockStorageV2VolumeBigger,
				Check:  testAccCheckBlockStorageV2VolumeSame(resourceVolumeV2Name, &volume),
			},
			{
				Config: testAccBlockStorageV2VolumeBasic,
				Check:  testAccCheckBlockStorageV2VolumeNew(resourceVolumeV2Name, &volume),
			},
		},
	})
}
func TestAccBlockStorageV2Volume_upscaleDownScaleAssigned(t *testing.T) {
	var volume volumes.Volume
	t.Parallel()
	qts := volumeQuotas(12)
	qts = append(qts, ecs.QuotasForFlavor(env.OsFlavorID)...)
	qts = append(qts, &quotas.ExpectedQuota{Q: quotas.Server, Count: 1})
	quotas.BookMany(t, qts)

	resource.Test(t, resource.TestCase{
		PreCheck:          func() { common.TestAccPreCheck(t) },
		ProviderFactories: common.TestAccProviderFactories,
		CheckDestroy:      testAccCheckBlockStorageV2VolumeDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccBlockStorageV2VolumeAssigned(10),
				Check:  testAccCheckBlockStorageV2VolumeExists(resourceVolumeV2Name, &volume),
			},
			{
				Config: testAccBlockStorageV2VolumeAssigned(12),
				Check:  testAccCheckBlockStorageV2VolumeSame(resourceVolumeV2Name, &volume),
			},
			{
				Config: testAccBlockStorageV2VolumeAssigned(10),
				Check:  testAccCheckBlockStorageV2VolumeNew(resourceVolumeV2Name, &volume),
			},
		},
	})
}

func TestAccBlockStorageV2Volume_policy(t *testing.T) {
	t.Parallel()
	quotas.BookMany(t, volumeQuotas(40))

	resource.Test(t, resource.TestCase{
		PreCheck: func() {
			common.TestAccPreCheck(t)
			testPolicyPreCheck(t)
		},
		ProviderFactories: common.TestAccProviderFactories,
		CheckDestroy:      testAccCheckBlockStorageV2VolumeDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccBlockStorageV2VolumePolicy,
			},
		},
	})
}

func testPolicyPreCheck(t *testing.T) {
	if os.Getenv("OS_KMS_NAME") == "" {
		t.Skipf("OS_KMS_NAME should be set for this test to existing KMS key alias")
	}
}

func TestAccBlockStorageV2Volume_tags(t *testing.T) {
	t.Parallel()
	resource.Test(t, resource.TestCase{
		PreCheck:          func() { common.TestAccPreCheck(t) },
		ProviderFactories: common.TestAccProviderFactories,
		CheckDestroy:      testAccCheckBlockStorageV2VolumeDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccBlockStorageV2VolumeTags,
				Check: resource.ComposeTestCheckFunc(
					testAccCheckBlockStorageV2VolumeTags(resourceVolumeV2Name, "foo", "bar"),
					testAccCheckBlockStorageV2VolumeTags(resourceVolumeV2Name, "key", "value"),
				),
			},
			{
				Config: testAccBlockStorageV2Vo


connect(function()
playpause.Image = "rbxassetid://895198075";
end)
audio.Resumed:connect(function()
playpause.Image = "rbxassetid://895198075";
end)
audio.Paused:connect(function()
playpause.Image = "rbxassetid://894282728";
end)
audio.Stopped:connect(function()
playpause.Image = "rbxassetid://894282728";
end)
audio.Ended:connect(function()
playpause.Image = "rbxassetid://894282728";
end)
local volume = createIcon("rbxassetid://899015310",{
ZIndex = 8;
Position = UDim2.new(0.5,-144,0.2,0);
Size = UDim2.new(0,48,0,48);
ImageColor3 = Color3.new(1,1,1);
Parent = audplr;
},true)
volume.MouseButton1Down:connect(function()
local volumeWindow = Window.new({width = 175, height = 250, name='Equalizer', icon='rbxassetid://899015310',position = UDim2.new(1,-205,1,-280)})
local content = volumeWindow.Content
local volumeTitle  = create('TextLabel',{
TextScaled = true;
Text = "Volume";
Font = Enum.Font.SourceSansLight;
Size = UDim2.new(.5,0,.1,0);
BackgroundTransparency = 1;
ZIndex = 8;
TextColor3 = Color3.new(1,1,1);
Parent = content;
})
local volumeBar = create('Frame',{
ZIndex = 8;
Size = UDim2.new(0,4,.75,0);
Position = UDim2.new(0.25,-2,.1,5);
BackgroundTransparency = 1;
BorderColor3 = Color3.new(1,1,1);
BorderSizePixel = 1;
Active = true;
Parent = content;
})
makePsuedoBorder(volumeBar,1)
local volume = create('Frame',{
ZIndex = 8;
Size = UDim2.new(1,0,audio.Volume/10,0);
BackgroundColor3 = Color3.new(1,1,1);
BorderSizePixel = 0;
Parent = volumeBar;
})
volume.Position = UDim2.new(0,0,1,-(volume.AbsoluteSize.Y));
local volumeDrag = create('Frame',{
Size = UDim2.new(0,16,0,8);
ZIndex = 8;
BackgroundColor3 = Color3.new(1,1,1);
BorderSizePixel = 0;
Active = true;
Parent = volumeBar;
})
volumeDrag.Position = volume.Position + UDim2.new(0,-(volumeDrag.AbsoluteSize.X/2)+(volume.AbsoluteSize.X/2),0,-(volumeDrag.AbsoluteSize.Y/2))
local function updateVolume()
local M = services.mouse;
local volumeS = (M.Y-volumeBar.AbsolutePosition.Y)/(volumeBar.AbsoluteSize.Y);
if (volumeS > 1) then volumeS = 1 end
if volumeS <= 0 then volumeS = 0; end
volumeS = math.abs(volumeS-1);
audio.Volume = volumeS*10;
end
local volumeBarEvent
volumeBar.InputBegan:connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
local M = services.mouse;
updateVolume();
volumeBarEvent = M.Move:connect(function()
updateVolume();
end)
end
end)
volumeBar.InputEnded:connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if volumeBarEvent then
volumeBarEvent:disconnect();
end
end
end)
local volumeDragEvent;
volumeDrag.InputBegan:connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
local M = services.mouse;
updateVolume();
volumeDragEvent = M.Move:connect(function()


    let body: Kinds = reqwest::get(DB_URL).await?.json().await?;
    let db: Kinds = body
        .into_iter()
        .filter(|(_k, v)| v.extensions.is_some())
        .collect();

    let types_file = File::create("src/types.rs")?;
    let exts_file = File::create("src/extensions.rs")?;

    {
        let mut keys = Vec::new();
        let mut values = Vec::new();
        let mut n: usize = 0;
        for (key, value) in db.iter() {
            let extensions: Vec<(String, usize)> = value
                .extensions
                .as_ref()
                .unwrap()
                .iter()
                .map(|e| (e.to_owned(), n))
                .collect();

            // extensions.sort_by_key(|e| e.0.to_owned());

            keys.push((key, values.len(), extensions.len()));
            values.append(&mut extensions.clone());
            n += 1;
        }

        let mut exts_writer = BufWriter::new(exts_file);
        let exts: Vec<String> = values
            .iter()
            .map(|e| {
                r#"("{{ext}}", {{pos}})"#
                    .replace("{{ext}}", &e.0)
                    .replace("{{pos}}", &e.1.to_string())
            })
            .collect();
        exts_writer.write(
            TPL_E
                .replace("{{name}}", "EXTENSIONS")
                .replace("{{len}}", &exts.len().to_string())
                .replace("{{items}}", &exts.join(", "))
                .as_bytes(),
        )?;
        exts_writer.flush()?;

        let mut types_writer = BufWriter::new(types_file);
        let types: Vec<String> = keys
            .iter()
            .map(|e| {
                r#"("{{ext}}", {{start}}, {{end}})"#
                    .replace("{{ext}}", &e.0)
                    .replace("{{start}}", &e.1.to_string())
                    .replace("{{end}}", &e.2.to_string())
            })
            .collect();
        types_writer.write(
            TPL_T
                .replace("{{name}}", "TYPES")
                .replace("{{len}}", &types.len().to_string())
                .replace("{{items}}", &types.join(", "))
                .as_bytes(),
        )?;
        types_writer.flush()?;
    }

    Ok(())
}
<reponame>snowplow/factotum-server<filename>src/factotum_server/responder/mod.rs
// Copyright (c) 2017-2021 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0, and
// you may not use this file except in compliance with the Apache License
// Version 2.0.  You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License Version 2.0 is distributed on an "AS
// IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied.  See the Apache License Version 2.0 for the specific language
// governing permissions and limitations there under.
//

use std::collections::HashMap;
use std::error::Error;
use std::ops::{Deref, DerefMut


_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}.cke_dialog_footer{filter:""}* {
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-size: 100%;
  line-height: 1.2em;
  letter-spacing: 0;
}

.calculate-letter-size {
  font-family: monospace;
  height: auto;
  width: auto;
  top: -10000px;
  left: -10000px;
  visibility: hidden;
  position: fixed;
  overflow: visible;
  white-space: nowrap;
  line-height: 1.2em;
  letter-spacing: 0;
}

.canvas--content--item {
  font-size: 1em;
  line-height: 1.2em;
}

.project.is-hover,
.project.is-hover .canvas--content--item {
  cursor: pointer;
}

.project.is-able-to-move,
.project.is-


props(dc, pnv_occ_properties);
    dc->user_creatable = false;
}

static const TypeInfo pnv_occ_type_info = {
    .name          = TYPE_PNV_OCC,
    .parent        = TYPE_DEVICE,
    .instance_size = sizeof(PnvOCC),
    .class_init    = pnv_occ_class_init,
    .class_size    = sizeof(PnvOCCClass),
    .abstract      = true,
};

static void pnv_occ_register_types(void)
{
    type_register_static(&pnv_occ_type_info);
    type_register_static(&pnv_occ_power8_type_info);
    type_register_static(&pnv_occ_power9_type_info);
    type_register_static(&pnv_occ_power10_type_info);
}

type_init(pnv_occ_register_types);


 "translate(100px)",
            marginInlineStart: "100%",
          },
        ],
      },
    ],
  },
  {
    targetClass: "narrow-offsets",
    properties: [
      {
        name: "opacity",
        expectedValues: [
          {
            title: "0",
            marginInlineStart: "0%",
          },
          {
            title: "1",
            marginInlineStart: "10%",
          },
          {
            title: "0",
            marginInlineStart: "13%",
          },
          {
            title: "1",
            marginInlineStart: "100%",
          },
        ],
      },
    ],
  },
  {
    targetClass: "same-color",
    properties: [
      {
        name: "background-color",
        expectedValues: [
          {
            title: "rgb(0, 255, 0)",
            marginInlineStart: "0%",
          },
          {
            title: "rgb(0, 255, 0)",
            marginInlineStart: "100%",
          },
        ],
      },
    ],
  },
  {
    targetClass: "currentcolor",
    properties: [
      {
        name: "background-color",
        expectedValues: [
          {
            title: "currentcolor",
            marginInlineStart: "0%",
          },
          {
            title: "rgb(0, 255, 0)",
            marginInlineStart: "100%",
          },
        ],
      },
    ],
  },
];

/**
 * Do test for keyframes-graph_keyframe-marker-ltf/rtl.
 *
 * @param {Array} testData
 */
// eslint-disable-next-line no-unused-vars
async function testKeyframesGraphKeyframesMarker() {
  await addTab(URL_ROOT + "doc_multi_keyframes.html");
  await removeAnimatedElementsExcept(
    KEYFRAMES_TEST_DATA.map(t => `.${t.targetClass}`)
  );
  const { animationInspector, panel } = await openAnimationInspector();

  for (const { properties, targetClass } of KEYFRAMES_TEST_DATA) {
    info(`Checking keyframe marker for ${targetClass}`);
    await clickOnAnimationByTargetSelector(
      animationInspector,
      panel,
      `.${targetClass}`
    );

    for (const { name, expectedValues } of properties) {
      const testTarget = `${name} in ${targetClass}`;
      info(`Checking keyframe marker for ${testTarget}`);
      info(`Checking keyframe marker existence for ${testTarget}`);
      const markerEls = panel.querySelectorAll(
        `.${name} .keyframe-marker-item`
      );
      is(
        markerEls.length,
        expectedValues.length,
        `Count of keyframe marker elements of ${testTarget} ` +
          `should be ${expectedValues.length}`
      );

      for (let i = 0; i < expectedValues.length; i++) {
        const hintTarget = `.keyframe-marker-item[${i}] of ${testTarget}`;

        info(`Checking ${hintTarget}`);
        const markerEl = markerEls[i];
        const expectedValue = expectedValues[i];

        info(`Checking title in ${hintTarget}`);
        is(
          markerEl.getAttribute("title"),
          expectedValue.title,
          `title in ${hintTarget} should be ${expectedValue.title}`
        );

        info(`Checking marginInlineStart style in ${hintTarget}`);
        is(
          markerEl.style.marginInlineStart,
          expectedValue.marginInlineStart,
          `marginInlineStart in ${hintTarget} should be ` +
            `${expectedValue.marginInlineStart}`
        );
      }
    }
  }
}
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, Y


#nullable enable
#pragma warning disable CS8618
#pragma warning disable CS8601
#pragma warning disable CS8603

namespace Plugin.RevenueCat.Models;

using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

public partial class Subscriber
{
	[JsonPropertyName("entitlements")]
	public IDictionary<string, Entitlement> Entitlements { get; set; } = new Dictionary<string, Entitlement>();

	[JsonPropertyName("first_seen")]
	public DateTimeOffset? FirstSeen { get; set; }

	[JsonPropertyName("last_seen")]
	public DateTimeOffset? LastSeen { get; set; }

	[JsonPropertyName("management_url")]
	public string ManagementUrl { get; set; }

	[JsonProp


			{
				m_SSAOSamplingData.enabled = bSSAOEnabled ? 1 : 0;
				if (m_bSSAOBlurEnabled != bSSAOEnabled)
				{
					m_bSSAOBlurEnabled = bSSAOEnabled;
					m_bSSAOStateChanged = true;
				}
			}

			ImGui::SameLine();

			if (ImGui::Checkbox("Blur", &m_bSSAOBlurEnabled))
			{
				m_bSSAOStateChanged = true;
				if (m_bSSAOBlurEnabled)
				{
					m_SSAOSamplingData.enabled = 1;
				}
			}

			SpecializationConstantMetaData& ssaoKernelSizeConstant = m_SpecializationConstants[SID("ssao_kernel_size")];
			if (ImGui::SliderInt("Kernel Size", &ssaoKernelSizeConstant.value, 1, 64))
			{
				m_bSSAOStateChanged = true;
			}
			ImGui::SliderFloat("Radius", &m_SSAOGenData.radius, 0.0001f, 15.0f);
			ImGui::SliderInt("Blur Radius", &m_SSAOBlurDataConstant.radius, 1, 16);
			ImGui::SliderInt("Blur Offset Count", &m_SSAOBlurSamplePixelOffset, 1, 10);
			ImGui::SliderFloat("Pow", &m_SSAOSamplingData.powExp, 0.1f, 10.0f);

			ImGui::PopItemWidth();

			ImGui::TreePop();
		}
	}

	real Renderer::GetStringWidth(const std::string& str, BitmapFont* font, real letterSpacing, bool bNormalized) const
	{
		real strWidth = 0;

		char prevChar = ' ';
		for (char c : str)
		{
			if (BitmapFont::IsCharValid(c))
			{
				FontMetric* metric = font->GetMetric(c);

				if (font->bUseKerning)
				{
					std::wstring charKey(std::wstring(1, prevChar) + std::wstring(1, c));

					auto iter = metric->kerning.find(charKey);
					if (iter != metric->kerning.end())
					{
						strWidth += iter->second.x;
					}
				}

				strWidth += metric->advanceX + letterSpacing;
			}
		}

		if (bNormalized)
		{
			strWidth /= (real)g_Window->GetFrameBufferSize().x;
		}

		return strWidth;
	}

	real Renderer::GetStringHeight(const std::string& str, BitmapFont* font, bool bNormalized) const
	{
		real strHeight = 0;

		for (char c : str)
		{
			if (BitmapFont::IsCharValid(c))
			{
				FontMetric* metric = font->GetMetric(c);
				strHeight = glm::max(strHeight, (real)(metric->height));
			}
		}

		if (bNormalized)
		{
			strHeight /= (real)g_Window->GetFrameBufferSize().y;
		}

		return strHeight;
	}

	real Renderer::GetStringWidth(const TextCache& textCache, BitmapFont* font) const
	{
		real strWidth = 0;

		char prevChar = ' ';
		for (char c : textCache.str)
		{
			if (BitmapFont::IsCharValid(c))
			{
				FontMetric* metric = font->GetMetric(c);

				if (font->bUseKerning)
				{
					std::wstring charKey(std::wstring(1, prevChar) + std::wstring(1, c));

					auto iter = metric->kerning.find(charKey);
					if (iter != metric->kerning.end())
					{
						strWidth += iter->second.x;
					}
				}

				strWidth += metric->advanceX + textCache.xSpacing;
			}
		}

		return strWidth;
	}

	real Renderer::GetStringHeight(const TextCache& textCache, BitmapFont* font) const
	{
		real strHeight = 0;

		for (char c : textCache.str)
		{


E70  48 00 3B 4D */	bl RFCOMM_PortNegRsp
lbl_802DC214:
/* 802DC214 002D7E74  39 61 00 20 */	addi r11, r1, 0x20
/* 802DC218 002D7E78  4B EE AF 5D */	bl _restgpr_27
/* 802DC21C 002D7E7C  80 01 00 24 */	lwz r0, 0x24(r1)
/* 802DC220 002D7E80  7C 08 03 A6 */	mtlr r0
/* 802DC224 002D7E84  38 21 00 20 */	addi r1, r1, 0x20
/* 802DC228 002D7E88  4E 80 00 20 */	blr

.global PORT_PortNegCnf
PORT_PortNegCnf:
/* 802DC22C 002D7E8C  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 802DC230 002D7E90  7C 08 02 A6 */	mflr r0
/* 802DC234 002D7E94  90 01 00 24 */	stw r0, 0x24(r1)
/* 802DC238 002D7E98  93 E1 00 1C */	stw r31, 0x1c(r1)
/* 802DC23C 002D7E9C  3F E0 80 44 */	lis r31, lbl_80444260@ha
/* 802DC240 002D7EA0  3B FF 42 60 */	addi r31, r31, lbl_80444260@l
/* 802DC244 002D7EA4  93 C1 00 18 */	stw r30, 0x18(r1)
/* 802DC248 002D7EA8  93 A1 00 14 */	stw r29, 0x14(r1)
/* 802DC24C 002D7EAC  7C DD 33 78 */	mr r29, r6
/* 802DC250 002D7EB0  93 81 00 10 */	stw r28, 0x10(r1)
/* 802DC254 002D7EB4  7C 7C 1B 78 */	mr r28, r3
/* 802DC258 002D7EB8  48 00 0D A5 */	bl port_find_mcb_dlci_port
/* 802DC25C 002D7EBC  3C 80 80 57 */	lis r4, lbl_8056C428@ha
/* 802DC260 002D7EC0  7C 7E 1B 78 */	mr r30, r3
/* 802DC264 002D7EC4  38 84 C4 28 */	addi r4, r4, lbl_8056C428@l
/* 802DC268 002D7EC8  88 04 04 14 */	lbz r0, 0x414(r4)
/* 802DC26C 002D7ECC  28 00 00 04 */	cmplwi r0, 4
/* 802DC270 002D7ED0  41 80 00 14 */	blt lbl_802DC284
/* 802DC274 002D7ED4  3C 60 00 09 */	lis r3, 0x00090003@ha
/* 802DC278 002D7ED8  38 9F 01 50 */	addi r4, r31, 0x150
/* 802DC27C 002D7EDC  38 63 00 03 */	addi r3, r3, 0x00090003@l
/* 802DC280 002D7EE0  4B FE 0C 91 */	bl LogMsg_0
lbl_802DC284:
/* 802DC284 002D7EE4  2C 1E 00 00 */	cmpwi r30, 0
/* 802DC288 002D7EE8  40 82 00 2C */	bne lbl_802DC2B4
/* 802DC28C 002D7EEC  3C 60 80 57 */	lis r3, lbl


CA8(L_3, _stringLiteralD16E4C58CF049A6CC42E4A9AA7CEDB1CE1103E03, _stringLiteral264F39CC9BCB314C51EEFF1A9C09A4458087705F, /*hidden argument*/NULL);
		IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, ManagedStreamHelpers_ManagedStreamSeek_m450DB930DD5085114F382A6FE05CF15C5CB21168_RuntimeMethod_var);
	}

IL_0020:
	{
		Stream_tFC50657DD5AAB87770987F9179D934A51D99D5E7 * L_4 = ___stream2;
		ManagedStreamHelpers_ValidateLoadFromStream_m550BE5DED66EC83AF331265B81084185B35FD846(L_4, /*hidden argument*/NULL);
		intptr_t L_5 = ___returnValueAddress3;
		void* L_6 = IntPtr_op_Explicit_mB8A512095BCE1A23B2840310C8A27C928ADAD027((intptr_t)L_5, /*hidden argument*/NULL);
		Stream_tFC50657DD5AAB87770987F9179D934A51D99D5E7 * L_7 = ___stream2;
		int64_t L_8 = ___offset0;
		uint32_t L_9 = ___origin1;
		NullCheck(L_7);
		int64_t L_10 = VirtFuncInvoker2< int64_t, int64_t, int32_t >::Invoke(20 /* System.Int64 System.IO.Stream::Seek(System.Int64,System.IO.SeekOrigin) */, L_7, L_8, L_9);
		*((int64_t*)L_6) = (int64_t)L_10;
		return;
	}
}
// System.Void UnityEngine.ManagedStreamHelpers::ManagedStreamLength(System.IO.Stream,System.IntPtr)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ManagedStreamHelpers_ManagedStreamLength_mB518EF67FCBA5080CA4C45F34496C05041E07B98 (Stream_tFC50657DD5AAB87770987F9179D934A51D99D5E7 * ___stream0, intptr_t ___returnValueAddress1, const RuntimeMethod* method)
{
	static bool s_Il2CppMethodInitialized;
	if (!s_Il2CppMethodInitialized)
	{
		il2cpp_codegen_initialize_method (ManagedStreamHelpers_ManagedStreamLength_mB518EF67FCBA5080CA4C45F34496C05041E07B98_MetadataUsageId);
		s_Il2CppMethodInitialized = true;
	}
	bool V_0 = false;
	{
		intptr_t L_0 = ___returnValueAddress1;
		bool L_1 = IntPtr_op_Equality_mEE8D9FD2DFE312BBAA8B4ED3BF7976B3142A5934((intptr_t)L_0, (intptr_t)(0), /*hidden argument*/NULL);
		V_0 = L_1;
		bool L_2 = V_0;
		if (!L_2)
		{
			goto IL_0020;
		}
	}
	{
		ArgumentException_tEDCD16F20A09ECE461C3DA766C16EDA8864057D1 * L_3 = (ArgumentException_tEDCD16F20A09ECE461C3DA766C16EDA8864057D1 *)il2cpp_codegen_object_new(ArgumentException_tEDCD16F20A09ECE461C3DA766C16EDA8864057D1_il2cpp_TypeInfo_var);
		ArgumentException__ctor_m26DC3463C6F3C98BF33EA39598DD2B32F0249CA8(L_3, _stringLiteralD16E4C58CF049A6CC42E4A9AA7CEDB1CE1103E03, _stringLiteral2


	size_t				used_pages;
	void*				protection_cookie;
	mutex				lock;
	struct list			free_list;
	guarded_heap_page	pages[0];
};

struct guarded_heap {
	rw_lock				lock;
	size_t				page_count;
	size_t				used_pages;
	int32				area_creation_counter;
	guarded_heap_area*	areas;
};

static guarded_heap sGuardedHeap = {
	RW_LOCK_INITIALIZER("guarded heap lock"),
	0, 0, 0, NULL
};

#if GUARDED_HEAP_TRACING

namespace GuardedHeapTracing {

class GuardedHeapTraceEntry
	: public TRACE_ENTRY_SELECTOR(GUARDED_HEAP_TRACING_STACK_TRACE) {
	public:
		GuardedHeapTraceEntry(guarded_heap* heap)
			:
			TraceEntryBase(GUARDED_HEAP_TRACING_STACK_TRACE, 0, true),
			fHeap(heap)
		{
		}

	protected:
		guarded_heap*	fHeap;
};

class Allocate : public GuardedHeapTraceEntry {
	public:
		Allocate(guarded_heap* heap, void* pageBase, uint32 flags)
			:
			GuardedHeapTraceEntry(heap),
			fPageBase(pageBase),
			fFlags(flags)
		{
			Initialized();
		}

		virtual void AddDump(TraceOutput& out)
		{
			out.Print("guarded heap allocate: heap: %p; page: %p; "
				"flags:%s%s%s%s", fHeap, fPageBase,
				(fFlags & GUARDED_HEAP_PAGE_FLAG_USED) != 0 ? " used" : "",
				(fFlags & GUARDED_HEAP_PAGE_FLAG_FIRST) != 0 ? " first" : "",
				(fFlags & GUARDED_HEAP_PAGE_FLAG_GUARD) != 0 ? " guard" : "",
				(fFlags & GUARDED_HEAP_PAGE_FLAG_DEAD) != 0 ? " dead" : "");
		}

	private:
		void*		fPageBase;
		uint32		fFlags;
};

class Free : public GuardedHeapTraceEntry {
	public:
		Free(guarded_heap* heap, void* pageBase)
			:
			GuardedHeapTraceEntry(heap),
			fPageBase(pageBase)
		{
			Initialized();
		}

		virtual void AddDump(TraceOutput& out)
		{
			out.Print("guarded heap free: heap: %p; page: %p", fHeap,
				fPageBase);
		}

	private:
		void*		fPageBase;
};

}	// namespace GuardedHeapTracing

#	define T(x)	new(std::nothrow) GuardedHeapTracing::x
#else
#	define T(x)
#endif	// GUARDED_HEAP_TRACING

static void
guarded_heap_page_protect(guarded_heap_area& area, size_t pageIndex,
	uint32 protection)
{
	if (area.area < 0)
		return;

	addr_t address = area.base + pageIndex * B_PAGE_SIZE;
	vm_set_kernel_area_debug_protection(area.protection_cookie, (void*)address,
		B_PAGE_SIZE, protection);
}

static void
guarded_heap_page_allocate(guarded_heap_area& area, size_t startPageIndex,
	size_t pagesNeeded, size_t allocationSize, size_t alignment,
	void* allocationBase)
{
	if (pagesNeeded < 2) {
		panic("need to allocate at least 2 pages, one for guard\n");
		return;
	}

	guarded_heap_page* firstPage = NULL;
	for (size_t i = 0; i < pagesNeeded; i++) {
		guarded


s)
	// 微信小程序用户发布评论
	e.POST(base+"/:id/wechat_comments", server.PostWechatCommitComment)
	// 获取小程序码
	e.GET(base+"/:id/mini_program_code", server.PostsWechatGetCode)
}

// UserRouter 用户相关的路由
func UserRouter(e *gin.Engine) {
	const base = Version + "user"

	// 获取用户信息
	e.GET(base, server.UserGetUser)

	// 更新用户个人信息
	e.PUT(base, server.UserPutUser)
	// 用户注册
	e.POST(base, server.UserAddUser)
	// 激活账户(因为链接限制，所以只能用get请求)
	e.GET(base+"/:id/status", server.UserActiveUser)

	// 用户登录
	e.POST(base+"/token", server.UserToken)
	// 判断用户是否登录
	e.GET(base+"/token", server.UserGetToken)

	// 发送重置密码邮件（这里还需要加上get请求,方便网页端操作）
	e.POST(base+"/password/email", server.UserV3PasswordEmail)
	e.GET(base+"/password/email", server.UserV3PasswordEmail)
	// 用户通过token来重置密码(用于重置密码界面)
	e.PUT(base+"/password/token", server.UserResetPasswordToken)
	// 兼容就版本的重置密码
	e.POST("/api/v2/access/set/password", server.UserResetPasswordToken)

	// 判断用户名是否存在
	e.GET(base+"/username", server.UserUserGetUserName)

	// 手机端获取验证码
	e.POST(base+"/code", server.UserPostCode)
	// 手机端用户注册
	e.POST(base+"/app", server.UserPostApp)
	// 手机端重置密码
	e.PUT(base+"/app/password", server.UserPutAppPassword)

	// 获取用户收藏的所有文章
	e.GET(base+"/collections", server.UserCollections)
	// 获取微信小程序用户的收藏的文章
	e.GET(base+"/wechat_collections/:openid", server.UserWeChatCollections)
}

// SettingRouter 设置相关的路由
func SettingRouter(e *gin.Engine) {
	const base = Version + "settings"
	const wechat = base + "/wechat"
	const plugins = base + "/plugins"
	const app = base + "/app"
	const site = base + "/site"
	const theme = base + "/themes"

	/* 微信小程序设置 */
	e.GET(wechat, server.Wechat)

	/* 插件设置,遗留设置 */
	//获取赞助界面设置
	e.GET(plugins+"/sponsor", server.PluginsGetDonate)
	//获取友链界面设置
	e.GET(plugins+"/friends", server.PluginsGetFriend)

	/* APP设置 */
	e.GET(app, server.SettingAPP)
	// 获取网页顶部和底部的设置
	e.GET(site+"/index", server.SettingGetIndex)
	//获取登录注册界面的设置
	e.GET(site+"/login", server.SettingGetLogin)
	//获取文章界面设置
	e.GET(site+"/post", server.SettingGetPost)

	//获取日记界面设置
	e.GET(site+"/


pose()
        {
            if (this.OrderList != null)
            {
                this.OrderList.Clear();
                this.OrderList = null;
            }
            if(this.OrdersDetails != null)
            {
                this.OrdersDetails.Clear();
                this.OrdersDetails = null;
            }
            if(this.ComboBoxItemsSource != null)
            {
                this.ComboBoxItemsSource.Clear();
                this.ComboBoxItemsSource = null;
            }
            if (this.ColumnCollection != null)
            {
                this.ColumnCollection.Clear();
                this.ColumnCollection = null;
            }

            if (this.ShipCity != null)
            {
                this.ShipCity.Clear();
                this.ShipCity = null;
            }
        }

        string[] CustomerID = new string[]
      {
            "FRANS",
            "MEREP",
            "FOLKO",
            "SIMOB",
            "WARTH",
            "VAFFE",
             "BLONP",
            "FURIB",
            "SEVES",
            "LINOD",
            "RISCU",
            "PICCO",
            "FOLIG",
            "WELLI",
            "ALFKI",

      };

        double[] Freight = new double[]
        {
            4.45, 10.98, 17.67, 50.87, 20.12, 36.19, 49.21, 79.45, 18.59, 3.01, 4.13, 74,22
        };

        string[] ProductName = new string[]
       {
            "Alice Mutton",
            "NuNuCa Nub-Nougat-Creme",
            "Boston Crab Meat",
            "Raclette Courdavault",
            "Wimmers gute Semmelknodel",
            "Konbu",
            "Wimmers gute Semmelknödel",
            "Gorgonzola Telino",
            "Chartreuse verte",
            "Fløtemysost",
            "Carnarvon Tigers",
            "Thüringer Rostbratwurst",
            "Vegie-spread",
            "Tarte au sucre",
            "Valkoinen suklaa",
            "Queso Manchego La Pastora",
            "Perth Pasties",
            "Vegie-spread",
            "Tofu",
            "Sir Rodney's Scones",
            "Manjimup Dried Apples",
            "Tunnbröd",
            "Manjimup Dried Apples",
            "Ipoh Coffee",
            "Fløtemysost",
            "Carnarvon Tigers",
            "Teatime Chocolate Biscuits",
            "Inlagd Sill",
            "Teatime Chocolate Biscuits",
            "Steeleye Stout",
            "Boston Crab Meat",
            "Jack's New England Clam Chowder",
            "Ipoh Coffee",
            "Carnarvon Tigers",
            "Queso Cabrales",
            "Guaraná Fantástica",
            "Röd Kaviar",
            "Longlife Tofu",
            "Sirop d'érable",
            "Tarte au sucre",
            "Scottish Longbreads",
            "Spegesild",
            "Wimmers gute Semmelknödel",
            "Rhönbräu Klosterbier",
            "Queso Cabrales",
            "Valkoinen suklaa",
            "Rhönbräu Klosterbier",
            "Northwoods Cranberry Sauce",
            "Pavlova"
       };

        string[] ShipName = new string[]
        {
            "Franchi S.p.A.",
            "Mère Paillarde",
            "Folk och fä HB",
            "Simons bistro",
            "Vaffeljernet",
            "Wartian Herkku",
            "Franchi S.p.A",
            "Morgenstern


rInput) {
        val task = Callable<Void> {
            try {
                if (!simpleScan) {
                    val modifiedJar = JarUtils.modifyJarFile(jarInput.file, context?.temporaryDir, this)
                    copyIfLegal(modifiedJar, dest)
                } else {
                    val jarFile = jarInput.file
                    val classNames = JarUtils.scanJarFile(jarFile)
                    for (className in classNames) {
                        process(className, null)
                    }
                    copyIfLegal(jarFile, dest)
                }
            } catch (e: Exception) {
                e.printStackTrace()
            }
            null
        }
        tasks.add(task)
    }

    private fun diffJar(dest: File, jarInput: JarInput) {
        try {
            val oldJarFileName = JarUtils.scanJarFile(dest)
            val newJarFileName = JarUtils.scanJarFile(jarInput.file)
            val diff = SetDiff(oldJarFileName, newJarFileName)
            val removeList = diff.removedList
            if (removeList.size > 0) {
                JarUtils.deleteJarScan(dest, removeList, deleteCallBack)
            }
            foreachJar(dest, jarInput)
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    private fun deleteScan(dest: File) {
        try {
            JarUtils.deleteJarScan(dest, deleteCallBack)
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

}package com.kronos.startup.dag.widget

import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.HorizontalScrollView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView

/**
 * Created by 码农专栏
 * on 2020-06-04.
 */
class CustomizeScrollView @JvmOverloads constructor(
    context: Context?,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0
) : HorizontalScrollView(context, attrs, defStyleAttr) {

    private var viewListener: OnScrollViewListener? = null

    interface OnScrollViewListener {
        fun onScroll(l: Int, t: Int, oldl: Int, oldt: Int)
    }

    private fun setViewListener(viewListener: OnScrollViewListener?) {
        this.viewListener = viewListener
    }

    private var mRecyclerView: RecyclerView? = null

    fun attachToRecyclerView(recyclerView: RecyclerView) {
        if (mRecyclerView == null) {
            mRecyclerView = recyclerView
            setViewListener(Scroller(recyclerView, this))
        }
    }

    override fun onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int) {
        super.onScrollChanged(l, t, oldl, oldt)
        viewListener?.onScroll(l, t, oldl, oldt)
    }
}

class Scroller(val recyclerView: RecyclerView, val current: View) :
    CustomizeScrollView.OnScrollViewListener {

    override fun onScroll(l: Int, t: Int, oldl: Int, oldt: Int) {
        findViewHolder(l)
    }

    private fun findViewHolder(y: Int) {
        val manager = recyclerView.layoutManager as LinearLayoutManager
        val first = manager.findFirstVisibleItemPosition()
        val last = manager.findLastVisibleItemPosition() + 1
        for (index in first until last) {
            val viewHolder = recyclerView.findViewHolderForAdapterPosition(index)
            if (viewHolder is AdapterScrollerView) {
                val view = viewHolder.getView()
                if (view != current) {
                    viewHolder.getView().scrollTo(y, 0)
                }
            }
        }
    }

}

interface AdapterScrollerView {
    fun getView(): CustomizeScrollView
}package com.kronos.startup.ksp.compiler

import com.google.devtools.ksp.processing.*
import com.google.devtools.ksp.symbol.KSAnnotated
import com.google.devtools.ksp.symbol.KSClassDeclaration
import com.google.devtools.ksp.symbol.KSType
import com.google.devtools.ksp.symbol.Origin
import com.kron


   @JvmStatic fun deserializer() = { list: List<Segment<SerializedValue>> ->
      Strings(list.map { seg ->
        val string = seg.value.asString().orElseThrow { Exception("value was not a string: $seg") }
        seg.withNewValue(string)
      })
    }
  }
}
package gov.nasa.jpl.aerie.scheduler.plan

import gov.nasa.jpl.aerie.merlin.driver.MissionModel
import gov.nasa.jpl.aerie.merlin.protocol.types.Duration
import gov.nasa.ammos.aerie.procedural.scheduling.simulation.SimulateOptions
import gov.nasa.ammos.aerie.procedural.scheduling.utils.DefaultEditablePlanDriver
import gov.nasa.ammos.aerie.procedural.scheduling.utils.PerishableSimulationResults
import gov.nasa.jpl.aerie.scheduler.simulation.SimulationFacade
import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.AnyDirective
import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.Directive
import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.DirectiveStart
import gov.nasa.jpl.aerie.merlin.protocol.types.DurationType
import gov.nasa.jpl.aerie.scheduler.DirectiveIdGenerator
import gov.nasa.jpl.aerie.scheduler.model.*
import gov.nasa.jpl.aerie.types.ActivityDirectiveId
import kotlin.jvm.optionals.getOrNull
import gov.nasa.ammos.aerie.procedural.timeline.plan.Plan;

/*
 * An implementation of [EditablePlan] that stores the plan in memory for use in the internal scheduler.
 *
 */
data class SchedulerPlanEditAdapter(
  private val missionModel: MissionModel<*>,
  private var idGenerator: DirectiveIdGenerator,
  val plan: SchedulerToProcedurePlanAdapter,
  private val simulationFacade: SimulationFacade,
  private val lookupActivityType: (String) -> ActivityType
): Plan by plan, DefaultEditablePlanDriver.PlanEditAdapter {

  override fun generateDirectiveId(): ActivityDirectiveId = idGenerator.next()
  override fun latestResults(): PerishableSimulationResults? {
    val merlinResults = simulationFacade.latestSimulationData.getOrNull() ?: return null
    return MerlinToProcedureSimulationResultsAdapter(merlinResults.driverResults, plan.copy(schedulerPlan = plan.duplicate()))
  }

  override fun create(directive: Directive<AnyDirective>) {
    plan.add(directive.toSchedulingActivity(lookupActivityType))
  }

  override fun delete(id: ActivityDirectiveId) {
    plan.remove(plan.activitiesById[id])
  }

  override fun simulate(options: SimulateOptions) {
    simulationFacade.simulateWithResults(plan, options.pause.resolve(this))
  }

  override fun validate(directive: Directive<AnyDirective>) {
    super.validate(directive)
    lookupActivityType(directive.type).specType.inputType.validateArguments(directive.inner.arguments)
  }

  companion object {
    @JvmStatic fun Directive<AnyDirective>.toSchedulingActivity(lookupActivityType: (String) -> ActivityType) = SchedulingActivity(
        id,
        lookupActivityType(type),
        when (val s = start) {
          is DirectiveStart.Absolute -> s.time
          is DirectiveStart.Anchor -> s.offset
        },
        when (val d = lookupActivityType(type).durationType) {
          is DurationType.Controllable -> {
            inner.arguments[d.parameterName]?.asInt()?.let { Duration(it.get()) }
          }
          is DurationType.Parametric -> {
            d.durationFunction


// Copyright (c) 2001-2011 the opus developers, and
// Copyright (c) 2017 est31 <<EMAIL>>
// and contributors, All rights reserved.
// Licensed under the BSD 3 clause license.
// Please see the COPYING file attached to
// this source distribution for details.

extern crate gcc;
extern crate bindgen;

use std::env;
use std::path::PathBuf;

use gcc::Build;

macro_rules! files_fn {
	($name:ident; $($($pathseg:ident)/ *.c),*,) => {
		files_fn!($name; $($($pathseg)/ *.c),*);
	};
	($name:ident; $($($pathseg:ident)/ *.c),*) => {
		fn $name(cfg :&mut Build) {
			cfg $(.file(concat!("../libopus/",
				$("/", stringify!($pathseg)),*,
				".c"
			)))*;
		}
	};
}

files_fn! { opus_files;
	src/opus.c,
	src/opus_decoder.c,
	src/opus_encoder.c,
	src/opus_multistream.c,
	src/opus_multistream_encoder.c,
	src/opus_multistream_decoder.c,
	src/repacketizer.c
}

files_fn! { opus_files_float;
	src/analysis.c,
	src/mlp.c,
	src/mlp_data.c
}

files_fn! { celt_files;
	celt/bands.c,
	celt/celt.c,
	celt/celt_encoder.c, // encoder -- not a priority ATM
	celt/celt_decoder.c,
	celt/cwrs.c,
	// celt/entcode.c, -- SMALL_DIV_TABLE still missing
	// celt/entdec.c,
	celt/entenc.c, // encoder -- not a priority ATM
	celt/kiss_fft.c, // before porting check whether crates on crates.io can do this
	// celt/laplace.c,
	// celt/mathops.c, -- fixed point stuff still missing
	celt/mdct.c, // before porting check whether crates on crates.io can do this
	celt/modes.c,
	// celt/pitch.c,
	// celt/celt_lpc.c,
	celt/quant_bands.c,
	celt/rate.c,
	// celt/vq.c
}

files_fn! { silk_files;
	silk/CNG.c,
	silk/code_signs.c,
	silk/init_decoder.c,
	silk/decode_core.c,
	silk/decode_frame.c,
	silk/decode_parameters.c,
	silk/decode_indices.c,
	silk/decode_pulses.c,
	silk/decoder_set_fs.c,
	silk/dec_API.c,
	silk/enc_API.c,
	silk/encode_indices.c,
	silk/encode_pulses.c,
	silk/gain_quant.c,
	silk/interpolate.c,
	silk/LP_variable_cutoff.c,
	silk/NLSF_decode.c,
	silk/NSQ.c,
	silk/NSQ_del_dec.c,
	silk/PLC.c,
	silk/shell_coder.c,
	silk/tables_gain.c,
	silk/tables_LTP.c,
	silk/tables_NLSF_CB_NB_MB.c,
	silk/tables_NLSF_CB_WB.c,
	silk/tables_other.c,
	silk/tables_pitch_lag.c,
	sil


base64Decode('CgRyYXRlEhIKBGNvaW4YASABKAlSBGNvaW4SFAoFdmFsdWUYAiABKAFSBXZhbHVl');
@$core.Deprecated('Use ratesDescriptor instead')
const Rates$json = const {
  '1': 'Rates',
  '2': const [
    const {'1': 'rates', '3': 1, '4': 3, '5': 11, '6': '.data.rate', '10': 'rates'},
  ],
};

/// Descriptor for `Rates`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List ratesDescriptor =
    $convert.base64Decode('CgVSYXRlcxIgCgVyYXRlcxgBIAMoCzIKLmRhdGEucmF0ZVIFcmF0ZXM=');
@$core.Deprecated('Use lSPInformationDescriptor instead')
const LSPInformation$json = const {
  '1': 'LSPInformation',
  '2': const [
    const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
    const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
    const {'1': 'widget_url', '3': 3, '4': 1, '5': 9, '10': 'widgetUrl'},
    const {'1': 'pubkey', '3': 4, '4': 1, '5': 9, '10': 'pubkey'},
    const {'1': 'host', '3': 5, '4': 1, '5': 9, '10': 'host'},
    const {'1': 'channel_capacity', '3': 6, '4': 1, '5': 3, '10': 'channelCapacity'},
    const {'1': 'target_conf', '3': 7, '4': 1, '5': 5, '10': 'targetConf'},
    const {'1': 'base_fee_msat', '3': 8, '4': 1, '5': 3, '10': 'baseFeeMsat'},
    const {'1': 'fee_rate', '3': 9, '4': 1, '5': 1, '10': 'feeRate'},
    const {'1': 'time_lock_delta', '3': 10, '4': 1, '5': 13, '10': 'timeLockDelta'},
    const {'1': 'min_htlc_msat', '3': 11, '4': 1, '5': 3, '10': 'minHtlcMsat'},
    const {
      '1': 'channel_fee_permyriad',
      '3': 12,
      '4': 1,
      '5': 3,
      '8': const {'3': true},
      '10': 'channelFeePermyriad',
    },
    const {'1': 'lsp_pubkey', '3': 13, '4': 1, '5': 12, '10': 'lspPubkey'},
    const {
      '1': 'max_inactive_duration',
      '3': 14,
      '4': 1,
      '5': 3,
      '8': const {'3': true},
      '10': 'maxInactiveDuration',
    },
    const {
      '1': 'channel_minimum_fee_msat',
      '3': 15,
      '4': 1,
      '5': 3,
      '8': const {'3': true},
      '10': 'channelMinimumFeeMsat',
    },
    const {
      '1': 'cheapest_opening_fee_params',
      '3': 16,
      '4': 1,
      '5': 11,
      '6': '.data.OpeningFeeParams',
      '10': 'cheapestOpeningFeeParams'
    },
    const {
      '1': 'longest_valid_opening_fee_params',
      '3': 17,
      '4': 1,
      '5': 11,
      '6': '.data.OpeningFeeParams',
      '10': 'longestValidOpeningFeeParams'


put('\u1839', "MONGOLIAN LETTER FA");
    map.put('\u183A', "MONGOLIAN LETTER KA");
    map.put('\u183B', "MONGOLIAN LETTER KHA");
    map.put('\u183C', "MONGOLIAN LETTER TSA");
    map.put('\u183D', "MONGOLIAN LETTER ZA");
    map.put('\u183E', "MONGOLIAN LETTER HAA");
    map.put('\u183F', "MONGOLIAN LETTER ZRA");
    map.put('\u1840', "MONGOLIAN LETTER LHA");
    map.put('\u1841', "MONGOLIAN LETTER ZHI");
    map.put('\u1842', "MONGOLIAN LETTER CHI");
    map.put('\u1843', "MONGOLIAN LETTER TODO LONG VOWEL SIGN");
    map.put('\u1844', "MONGOLIAN LETTER TODO E");
    map.put('\u1845', "MONGOLIAN LETTER TODO I");
    map.put('\u1846', "MONGOLIAN LETTER TODO O");
    map.put('\u1847', "MONGOLIAN LETTER TODO U");
    map.put('\u1848', "MONGOLIAN LETTER TODO OE");
    map.put('\u1849', "MONGOLIAN LETTER TODO UE");
    map.put('\u184A', "MONGOLIAN LETTER TODO ANG");
    map.put('\u184B', "MONGOLIAN LETTER TODO BA");
    map.put('\u184C', "MONGOLIAN LETTER TODO PA");
    map.put('\u184D', "MONGOLIAN LETTER TODO QA");
    map.put('\u184E', "MONGOLIAN LETTER TODO GA");
    map.put('\u184F', "MONGOLIAN LETTER TODO MA");
    map.put('\u1850', "MONGOLIAN LETTER TODO TA");
    map.put('\u1851', "MONGOLIAN LETTER TODO DA");
    map.put('\u1852', "MONGOLIAN LETTER TODO CHA");
    map.put('\u1853', "MONGOLIAN LETTER TODO JA");
    map.put('\u1854', "MONGOLIAN LETTER TODO TSA");
    map.put('\u1855', "MONGOLIAN LETTER TODO YA");
    map.put('\u1856', "MONGOLIAN LETTER TODO WA");
    map.put('\u1857', "MONGOLIAN LETTER TODO KA");
    map.put('\u1858', "MONGOLIAN LETTER TODO GAA");
    map.put('\u1859', "MONGOLIAN LETTER TODO HAA");
    map.put('\u185A', "MONGOLIAN LETTER TODO JIA");
    map.put('\u185B', "MONGOLIAN LETTER TODO NIA");
    map.put('\u185C', "MONGOLIAN LETTER TODO DZA");
    map.put('\u185D', "MONGOLIAN LETTER SIBE E");
    map.put('\u185E', "MONGOLIAN LETTER SIBE I");
    map.put('\u185F', "MONGOLIAN LETTER SIBE IY");
    map.put('\u1860', "MONGOLIAN LETTER SIBE UE");
    map.put('\u1861', "MONGOLIAN LETTER SIBE U");
    map.put('\u1862', "MONGOLIAN LETTER SIBE ANG");
    map.put('\u1863', "MONGOLIAN LETTER SIBE KA");
    map.put('\u1864', "MONGOLIAN LETTER SIBE GA");
    map.put('\u1865', "MONGOLIAN LETTER SIBE HA");
    map.put('\u1866', "MONGOLIAN LETTER SIBE PA");
    map.put('\u1867', "MONGOLIAN LETTER S


ูปแบบหลายมิติที่มุ่งเน้น 4D ขณะที่ glTF™ เป็นรูปแบบ 3D (ชัดเจนแต่ระบุไว้เพื่อความเข้าใจ)
- glTF™ ออกแบบมาให้เป็นรูปแบบสุดท้ายสำหรับ GPU โดยข้อมูลถูกจัดเก็บในรูปแบบที่พร้อมโหลดลง OpenGL™ หรือ Vulkan™ เนื่องจาก API กราฟิกไม่รองรับโมเดล 4D, 5D, 6D ฯลฯ เป้าหมายนั้นจึงไม่เหมาะกับ G4MF G4MF จึงออกแบบมาเป็นรูปแบบแลกเปลี่ยนที่มนุษย์อ่านได้เป็นหลัก
- จุดยอดของ mesh ใน G4MF จัดเก็บแบบ de-duplicated โดยอ้างอิงจากขอบและ cell ขณะที่ glTF™ จัดเก็บแต่ละสามเหลี่ยมพร้อมจุดยอดเฉพาะตัว ซึ่งง่ายต่อการโหลดลง GPU โดยตรง แต่ทำให้เกิดความสับสนเกี่ยวกับจุดยอดซ้ำ https://blender.stackexchange.com/questions/167372/gltf-export-has-twice-the-vertices-it-should/167383#167383
- G4MF อนุญาตให้มีฉากเดียวต่อไฟล์พร้อม root node เดียว ขณะที่ glTF™ อนุญาตหลายฉากและหลาย root node https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/GODOT_single_root
- G4MF แบบไบนารีใช้ unsigned integer 64 บิต สำหรับขนาดไฟล์ `.g4b` และ chunk แทนที่จะเป็น unsigned integer 32 บิตเหมือน `.glb` จึงรองรับไฟล์ขนาดใหญ่กว่า 4 GiB https://github.com/KhronosGroup/glTF/issues/2114
- G4MF เป็นรูปแบบใหม่เอี่ยม ในขณะที่ glTF™ เป็นมาตรฐานอุตสาหกรรมที่เติบโตแล้ว ดังนั้นเราขอแนะนำให้ใช้ glTF™ สำหรับโมเดล 3D ไม่ใช่ไฟล์ 3D G4MF

นอกจากนี้ ยังมีความแตกต่างในรายละเอียดระหว่าง G4MF กับ glTF™ อีกมาก:

- G4MF เพิ่ม key integer ที่จำเ�


--canceling one will cancel the others because of group
	else
		Building.ToggleDemolish(self)
	end
end

function Passage:CreateElectricityElement()
	self.electricity = SupplyGridElement:new{building = self}
end

function Passage:CreateLifeSupportElements()
	self.water = SupplyGridElement:new{building = self}
	self.air = NewSupplyGridConsumer(self, true)
end

function Passage:FindSupplyTunnelNodes()
	if self.supply_tunnel_nodes ~= false then return false end
	local find_dome_edge = function(self, is, ie, s)
		for i = is, ie, s do
			local e = self.elements[i]
			if HexGetDomeExterior(e.q, e.r) then
				return i - s
			end
		end
	end

	local e1, e2 = find_dome_edge(self, 1, #self.elements, 1), find_dome_edge(self, #self.elements, 1, -1)
	assert(e1, e2, e1 ~= e2)
	self.supply_tunnel_nodes = {e1, e2}
end

function Passage:GetSupplyGridConnectionShapePoints(supply_resource)
	if not self.shape_points then
		self:FindSupplyTunnelNodes()
		self:BuildShapeData()
	end
	return self.shape_points
end

function Passage:GetShapeConnections(sr)
	if not self.shape_connections then
		self:FindSupplyTunnelNodes()
		self:BuildShapeData()
	end
	return self.shape_connections
end

function Passage:BuildShapeData()
	local sp = {}
	local sc = {}
	self.shape_points = sp
	self.shape_connections = sc

	local o_q, o_r = WorldToHex(self)
	local first = true

	for i = 1, #self.supply_tunnel_nodes do
		local e = self.elements[self.supply_tunnel_nodes[i]]
		local q, r = e.q, e.r
		table.insert(sp, point(q - o_q, r - o_r))

		local other = first and self.elements[self.supply_tunnel_nodes[i]+1] or self.elements[self.supply_tunnel_nodes[i]-1] --other should be on dome edge, we want potential toward that
		first = false
		local dir = HexGetDirection(q, r, other.q, other.r)
		table.insert(sc, shift(1, dir + 8) + 128) --potential (+8), connector (+128)

		--hack dome tile, introduce water potential towards us
		local conn = HexGridGet(SupplyGridConnections.water, other)
		dir = HexGetDirection(other.q, other.r, q, r)
		local mask = shift(1, dir + 8)
		HexGridSet(SupplyGridConnections.water, other, bor(conn, mask))
		self.hacked_potentials = self.hacked_potentials or {}
		table.insert(self.hacked_potentials, {other.q, other.r, mask})
	end
end

local function ApplyRemoveSupppyTunnelMaskHelper(pos, op)
	local conn = HexGridGet(SupplyGridConnections.electricity, pos)
	HexGridSet(SupplyGridConnections.electricity, pos, op(conn, TunnelMask))
	conn = HexGridGet(SupplyGridConnections.water, pos)
	HexGridSet(SupplyGridConnections.water, pos, op(conn, TunnelMask))
end

function Passage:AddSupplyTunnel()
	if self.supply_tunnel_set then return end
	--mark tunnel mask, should go after connection
	--we need a tunnel because our shape is not connected, however we


'''write a function fib(n) that takes in a number
as an argument. The function should return the n-th number
of the Fibonacci sequence.

The first and second number of the sequence is 1.
To generate the next number of the sequence, we sum the previous two.'''

def fib(n):
    if (n<=2): return 1
    return fib(n-1) + fib(n-2)

print(fib(6))
print(fib(7))
print(fib(8))

'''Time complexity is 2^n. Using a tree structure...'''


ember(Name = "format", EmitDefaultValue = true)]
        public Format Format { get; internal set; }

        [DataMember(Name = "content", EmitDefaultValue = false)]
        public string Content { get; internal set; }

        internal Decision()
        {
        }

        internal Decision(Element element, string id, DateTime date, string title, DecisionStatus status, Format format, string content)
        {
            Element = element;
            Id = id;
            Date = date;
            Title = title;
            Status = status;
            Format = format;
            Content = content;
        }

        public override bool Equals(object obj)
        {
            return Equals(obj as Decision);
        }

        public bool Equals(Decision decision)
        {
            if (decision == this)
            {
                return true;
            }

            if (decision == null)
            {
                return false;
            }

            if (ElementId != null)
            {
                return ElementId.Equals(decision.ElementId) && Id == decision.Id;
            }
            else
            {
                return Id == decision.Id;
            }
        }

        public override int GetHashCode()
        {
            int result = ElementId != null ? ElementId.GetHashCode() : 0;
            result = 31 * result + Id.GetHashCode();
            return result;
        }

    }

}


Bundle = bundles.Get<ScriptBundle>(amd.MainBundlePath);

            amd.AddRequireJsConfigAssetToMainBundle(mainBundle);

            // The config script will depended on the other bundles having been processed
            // so it can build URLs for them. We ensure the main bundle is processed last
            // by moving it to the end of the collection.
            MoveBundleToEnd(mainBundle, bundles);
        }

        static void MoveBundleToEnd(ScriptBundle mainBundle, BundleCollection bundles)
        {
            bundles.Remove(mainBundle);
            bundles.Add(mainBundle);
        }
    }
}


D)
		if stopErr != nil {
			level.Info(c.config.Logger).Log("msg", "stopping Google calendar event watch", "err", stopErr)
		}
	}
	return nil
}

func (c *GoogleCalendar) Get(event *fleet.CalendarEvent, key string) (interface{}, error) {
	if key == "channelID" {
		details, err := c.unmarshalDetails(event)
		if err != nil {
			return nil, err
		}
		return details.ChannelID, nil
	}
	return nil, ctxerr.Errorf(c.config.Context, "unknown key: %s", key)
}
//go:build !windows

// Windows is disabled because the TPM simulator requires CGO, which causes lint failures on Windows.

package hostidentity

import (
	"crypto/ecdsa"
	"crypto/elliptic"
	"crypto/rand"
	"crypto/x509"
	"crypto/x509/pkix"
	"io"
	"net/http"
	"strings"
	"testing"
	"time"

	"github.com/fleetdm/fleet/v4/server/config"
	"github.com/fleetdm/fleet/v4/server/datastore/mysql"
	"github.com/fleetdm/fleet/v4/server/fleet"
	scepclient "github.com/fleetdm/fleet/v4/server/mdm/scep/client"
	"github.com/fleetdm/fleet/v4/server/mdm/scep/x509util"
	"github.com/smallstep/scep"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestSCEPRateLimit(t *testing.T) {
	// Set up suite with rate limiting configuration
	cooldown := 5 * time.Minute
	s := SetUpSuiteWithConfig(t, "integrationtest.HostIdentitySCEPRateLimit", false, func(cfg *config.FleetConfig) {
		cfg.Osquery.EnrollCooldown = cooldown
	})

	defer mysql.TruncateTables(t, s.BaseSuite.DS, []string{
		"host_identity_scep_serials", "host_identity_scep_certificates",
	}...)

	t.Run("RateLimitSameHost", func(t *testing.T) {
		// Create an enrollment secret
		ctx := t.Context()
		err := s.DS.ApplyEnrollSecrets(ctx, nil, []*fleet.EnrollSecret{
			{
				Secret: testEnrollmentSecret,
			},
		})
		require.NoError(t, err)

		// Create a unique host identifier (CN)
		hostID := "test-host-rate-limit"

		// First certificate request - should succeed
		_, initialCert := requestSCEPCertificate(t, s, hostID)
		require.NotNil(t, initialCert)
		assert.Equal(t, hostID, initialCert.Subject.CommonName)

		// Second certificate request immediately after - should fail due to rate limit with HTTP 429
		rateLimitedResp, rateLimitedCert := requestSCEPCertificate(t, s, hostID)
		require.Nil(t, rateLimitedCert)
		require.Equal(t, http.StatusTooManyRequests, rateLimitedResp.StatusCode, "Should return HTTP 429 for rate limit")

		// Wait for a small duration (less than cooldown) and try again - should still fail with HTTP 429
		time.Sleep(500 * time.Millisecond)
		stillRateLimitedResp, stillRateLimitedCert := requestSCEPCertificate(t, s, hostID)
		require.Nil(t, stillRateLimitedCert)
		require.Equal(t, http.StatusTooManyRequests, stillRateLimitedResp.StatusCode, "Should still return HTTP 429 for rate limit")

		// Different host should be able to get certificate
		differentHostID := "test-host-different"
		_, differentHostCert := requestSCEPCertificate(t, s, differentHostID)
		require.


  last: "Thomas"
  },
  age: 20,
  children: []
};

// Throws an error with result.left if it fails
const result: Person = runParserEx(personValidator, test);

// Non-exception based
const parseResult = runParser(personValidator, test);
if (isSuccess(parseResult)) {
  const o: Person = parseResult.right;
  console.log("succeeded");
} else {
  console.log("failed with error: ", parseResult.left);
}
import assert from 'assert';

export class SafeMap<K, V> extends Map<K, V> {
  get(key: K): V {
    assert(this.has(key), `SafeMap key ${key} not found in ${this}`);
    const value = super.get(key);
    if (value === undefined || value === null) throw new Error(`SafeMap value for key ${key} is null or undefined.`);
    return value;
  }
}
/**
 * 根据 ASCII 值判断是否大写开头
 * 65 ==> A
 * 90 ==> Z
 * @param str 需要检查的字符串
 */
export const judegIsUppercaseStart = (str: string): boolean => {
  if (!str || typeof str !== 'string') {
    return false;
  }
  const code = str.charCodeAt(0);
  if (code < 65 || code > 90) {
    return false;
  }
  return true;
};

/**
 * 1. 是否存在
 * 2. 是否具有 cloneNode 方法--> 排除自定义对象
 * @param node
 */
export function isValidHTMLElement(node: HTMLElement): boolean {
  // 1
  if (!node) {
    return false;
  }
  try {
    const newNode = node.cloneNode();
    return newNode.nodeType === 1;
  } catch (error) {
    return false;
  }
}
// isValidHTMLElement('') ==> false
// isValidHTMLElement(null) ==> false
// isValidHTMLElement(undefined) ==> false
// isValidHTMLElement({ nodeType: 1} ) ==> false
// isValidHTMLElement(document.createTextNode('123')) ==> false
// isValidHTMLElement(document.createElement('div') ) ==> true
/**
 * @description Function that formats the given date and time into a human-readable string.
 * @param date the date to be formatting.
 * @param delimeter what character to place between the date and time (defaults to comma).
 * @returns a string that expresses the shortened date and time.
 */

export function FormatDateTime(date: Date, delimeter = ', '): string {
	const mm = date.getMonth() + 1;
	const dd = date.getDate().toString().padStart(2, '0');
	const yy = date.getFullYear().toString().substring(2);

	const hh = date.getHours();
	const mi = date.getMinutes().toString().padStart(2, '0');
	const ss = date.getSeconds().toString().padStart(2, '0');

	return `${mm}/${dd}/${yy}${delimeter}${hh}:${mi}:${ss}`;
}

/**
 * @description Expresses a file's byte size in B, kB, MB, or GB.
 * @param bytes the number of bytes
 * @returns the shortened file size with its units.
 */
export function FormatFileSize(bytes: number): string {
	const sizeUnits = ['B', 'kB', 'MB', 'GB'];

	let i = 0;
	while (i < sizeUnits.length) {
		if (bytes < Math.pow(1024, i + 1)) {
			const modifiedSize = (bytes / Math.pow(1024, i)).toFixed(1);
			return `${modifiedSize} ${sizeUnits[i]}`;
		}
		i++;
	}
	const modifiedSize = (bytes / Math.pow(1024, i)).toFixed(1);
	return `${modifiedSize} TB`;
}

/**
 * @description Uses file path or filename to determine whether the file can be injected with the script (no file ending or has supported ending).
 * @param file


Fogo",nil},
[47096] = {"Chamas",nil},
[47097] = {"Nuvem",nil},
[47098] = {"Homotauro",nil},
[47099] = {"Harkor",nil},
[47100] = {"Mack",nil},
[47101] = {"Tanzar",nil},
[47102] = {"Torreta de Cauda",nil},
[47103] = {"Asa da Morte Covarde",nil},
[47104] = {"Rodrigo Jardim","Mercadorias"},
[47105] = {"Dalton Revisan","Mercadorias Diversas"},
[47106] = {"Maria do Amparo","Fabricante de Escudos"},
[47107] = {"Taley","Reagentes"},
[47108] = {"Estalajadeiro Nerius","Hospedagem"},
[47109] = {"O Sol",nil},
[47110] = {"Bruto das Cavernas",nil},
[47111] = {"Bruto das Cavernas",nil},
[47112] = {"Homotauro 2",nil},
[47113] = {"Bino",nil},
[47114] = {"Adarrah",nil},
[47115] = {"Reclusa Negra",nil},
[47116] = {"Tokrog","Mestre de Mantícoras"},
[47117] = {"Filhote Recluso",nil},
[47118] = {"Desmundo Chadevale","Mestre de Grifos"},
[47119] = {"Gerson Bradoque","Mestre de Grifos"},
[47120] = {"Argaloth",nil},
[47121] = {"Aquinastrasz","Mestre de Voo do Rubro Reduto"},
[47122] = {"Completion Bunny",nil},
[47123] = {"Admiradora Elfa Noturna",nil},
[47124] = {"Admiradora Humana",nil},
[47125] = {"Admiradora Orquisa",nil},
[47126] = {"Admirador Elfo Sangrento",nil},
[47127] = {"Belloc Gumélion",nil},
[47128] = {"Cave In Trigger",nil},
[47129] = {"Espreitadora do Desabamento",nil},
[47130] = {"Guarda Enlouquecido",nil},
[47131] = {"Geist Desvairado",nil},
[47132] = {"Rastejante das Trevas",nil},
[47133] = {"San'shigo","Mestre de Mantícoras"},
[47134] = {"Comedor de Cadáveres",nil},
[47135] = {"Carniçal Fétido",nil},
[47136] = {"Assolador Instável",nil},
[47137] = {"Horror Insano",nil},
[47138] = {"Monstruosidade Pustulante",nil},
[47139] = {"Geraldo Faleiros","Mercadorias Diversas"},
[47140] = {"Esqueleto Feiticeiro",nil},
[47141] = {"Áugure Nefasto",nil},
[47142] = {"Rahmalaha","Comes & Bebes"},
[47143] = {"Esqueleto Odiosso",nil},
[47144] = {"Patrícia Marshall","Armaria"},
[47145] = {"Guardião Odiosso",nil},
[47146] = {"Rancapele Odiosso",nil},
[47147] = {"Farstad Pegapétrea","Mestre de Grifos"},
[47148] = {"Degolas Boamina","Mercadorias Diversas"},
[47149] = {"Catarina Hamburgo","Armaria"},
[47150] = {"Assolador da Terra",nil},
[47151] = {"Quebra-vento",nil},
[47152] = {"Elementalista do Crepúsculo",nil},
[47153] = {"Boanerges Boamina","Mercadorias"},
[47154] = {"Doran Cordigarra