        format!("{:x}", self.hasher.borrow_mut().result_reset())
    }

    pub fn reset(&self) {
        self.hasher.borrow_mut().reset();
    }
}

#[wasm_bindgen(start)]
pub fn initialize() {
    console_error_panic_hook::set_once();
}

#[cfg(test)]
mod tests {
    use super::*;
    use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
    wasm_bindgen_test_configure!(run_in_browser);

    #[wasm_bindgen_test]
    fn sha1_test() {
        let input = vec![
            97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 10,
        ];
        let expected = "d7c365d62cab86e98466e6b0431dc0d4529ef1dc";
        let mut sha1 = Sha1sum::new();
        sha1.update(&input);
        assert_eq!(sha1.result(), expected);
    }

    #[wasm_bindgen_test]
    fn sha1_update_test() {
        let input = vec![
            97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 10,
        ];
        let expected = "d7c365d62cab86e98466e6b0431dc0d4529ef1dc";
        let mut sha1 = Sha1sum::new();
        sha1.update(&input[0..2]);
        sha1.update(&input[2..10]);
        sha1.update(&input[10..]);
        assert_eq!(sha1.result(), expected);
    }
}
use std::path::PathBuf;

use anyhow::{anyhow, Error};
use structopt::StructOpt;

#[derive(Debug, StructOpt)]
#[structopt(
    about = "Extracts a zip archive and converts it to a tar while compressing it with zstd"
)]
pub(crate) struct Opts {
    /// The input zip archive
    #[structopt(name = "ZIP ARCHIVE", required = true)]
    pub input: PathBuf,

    /// The output tar.zst archive
    #[structopt(name = "OUTPUT ARCHIVE", required = true)]
    pub output: PathBuf,

    /// Sets the zstd compression level (1-22) (0 means zstd default compression level)
    #[structopt(short = "l", long = "level", default_value = "0", parse(try_from_str = parse_compression_level))]
    pub compression_level: i32,
}

fn parse_compression_level(src: &str) -> Result<i32, Error> {
    let n: i32 = src.parse()?;

    if !(0..=22).contains(&n) {
        return Err(anyhow!("Compression level has to be in the range of 1-22"));
    }

    Ok(n)
}
<filename>src/commands/owner/add_country.rs
use crate::{
    util::{constants::GENERAL_ISSUE, CountryCode, MessageExt},
    BotResult, CommandData, Context, MessageBuilder,
};

use std::sync::Arc;

#[command]
#[short_desc("Add a country for snipe commands")]
#[usage("[country code] [country name]")]
#[owner()]
async fn addcountry(ctx: Arc<Context>, data: CommandData) -> BotResult<()> {
    match data {
        CommandData::Message { msg, mut args, num } => {
            let (code, country) = match args.next() {
                Some(code) => {
                    if code.len() != 2 || code.chars().any(|c| !c.is_ascii_uppercase()) {
                        let content =
                            "The country code must consist of two uppercase ASCII characters.";

                        return msg.error(&ctx, content).await;
                    } else if args.rest().is_empty() {


odImpl(MethodImplOptions.AggressiveInlining)]
    [ExcludeFromCodeCoverage]
    public void ReadLittleEndianStruct<T>(out T value) where T : unmanaged, ICanReverseEndian
        => value = ReadLittleEndianStruct<T>();

    /// <summary>
    ///     [Big Endian] Reads an unmanaged, generic type from the stream without incrementing the position.
    /// </summary>
    /// <typeparam name="T">The value to peek from top of stream.</typeparam>
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    [ExcludeFromCodeCoverage]
    public T PeekBigEndianStruct<T>() where T : unmanaged, ICanReverseEndian
    {
        if (!BitConverter.IsLittleEndian)
            return Peek<T>();

        var value = Peek<T>();
        value.ReverseEndian();
        return value;
    }

    /// <summary>
    ///     [Big Endian] Reads an unmanaged, generic type from the stream without incrementing the position.
    /// </summary>
    /// <typeparam name="T">The value to peek from top of stream.</typeparam>
    /// <param name="value">The value to return.</param>
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    [ExcludeFromCodeCoverage]
    public void PeekBigEndianStruct<T>(out T value) where T : unmanaged, ICanReverseEndian
        => value = PeekBigEndianStruct<T>();

    /// <summary>
    ///     [Big Endian] Reads an unmanaged, generic type from the stream.
    /// </summary>
    /// <typeparam name="T">Type of value to read.</typeparam>
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    [ExcludeFromCodeCoverage]
    public T ReadBigEndianStruct<T>() where T : unmanaged, ICanReverseEndian
    {
        if (!BitConverter.IsLittleEndian)
            return Read<T>();

        var value = Read<T>();
        value.ReverseEndian();
        return value;
    }

    /// <summary>
    ///     [Big Endian] Reads an unmanaged, generic type from the stream.
    /// </summary>
    /// <typeparam name="T">Type of value to read.</typeparam>
    /// <param name="value">The read in value.</param>
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    [ExcludeFromCodeCoverage]
    public void ReadBigEndianStruct<T>(out T value) where T : unmanaged, ICanReverseEndian
        => value = ReadBigEndianStruct<T>();
}


yer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid #d1d1d1;
}

.ace-fleet .ace_marker-layer .ace_selected-word {
  border: 1px solid #d6d6d6;
}

.ace-fleet .ace_invisible {
  color: #d1d1d1;
}

.ace-fleet .ace_keyword {
  color: #515774; /* $ui-fleet-black-75 */
  font-weight: 600;
}

.ace-fleet .ace_osquery-token {
  border-radius: 3px;
  background-color: #ae6ddf;
  color: #ffffff;
}

.ace-fleet .ace_identifier {
  color: #ff5850;
}

.ace-fleet .ace_string,
.ace-fleet .ace_osquery-column {
  color: #4fd061;
}

.ace-fleet .ace_meta,
.ace-fleet .ace_storage,
.ace-fleet .ace_storage.ace_type,
.ace-fleet .ace_support.ace_type {
  color: #8959a8;
}

.ace-fleet .ace_keyword.ace_operator {
  color: #3e999f;
}

.ace-fleet .ace_constant.ace_character,
.ace-fleet .ace_constant.ace_language,
.ace-fleet .ace_constant.ace_numeric,
.ace-fleet .ace_keyword.ace_other.ace_unit,
.ace-fleet .ace_support.ace_constant,
.ace-fleet .ace_variable.ace_parameter {
  color: #f5871f;
}

.ace-fleet .ace_constant.ace_other {
  color: #666969;
}

.ace-fleet .ace_invalid {
  color: #ffffff;
  background-color: #c82829;
}

.ace-fleet .ace_invalid.ace_deprecated {
  color: #ffffff;
  background-color: #ae6ddf;
}

.ace-fleet .ace_fold {
  background-color: #4271ae;
  border-color: #4d4d4c;
}

.ace-fleet .ace_entity.ace_name.ace_function,
.ace-fleet .ace_support.ace_function,
.ace-fleet .ace_variable {
  color: #4271ae;
}

.ace-fleet .ace_support.ace_class,
.ace-fleet .ace_support.ace_type {
  color: #c99e00;
}

.ace-fleet .ace_heading,
.ace-fleet .ace_markup.ace_heading,
.ace-fleet .ace_string {
  color: #4fd061;
}

.ace-fleet .ace_entity.ace_name.ace_tag,
.ace-fleet .ace_entity.ace_other.ace_attribute-name,
.ace-fleet .ace_meta.ace_tag,
.ace-fleet .ace_string.ace_regexp,
.ace-fleet .ace_variable {
  color: #c82829;
}

.ace-fleet .ace_comment {
  color: #8e908c;
}

.ace-fleet .ace_indent-guide {
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==)
    right repeat-y;
}
.fleet-checkbox {
  @include clearfix;
  position: relative;
  // inline-flex would prevents clickable white space right of the checkbox,
  // but we need that clickable in some "rows" using checkbox
  display: flex;
  align-items: center;


*.*;10.*.*.*"
	err = key.SetStringValue("ProxyOverride", skipProxy)
	if err != nil {
		log.Fatal(err)
	}
	go func() {
		running <- struct{}{}
	}()
}

// 清除代理
func CleanProxy(stop chan struct{}) {
	key, _, _ := registry.CreateKey(registry.CURRENT_USER, `SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings`, registry.ALL_ACCESS)
	defer key.Close()
	err := key.SetBinaryValue("ProxyEnable", IntToBytes(0))
	if err != nil {
		log.Fatal(err)
	}
	err = key.SetStringValue("ProxyServer", "")
	if err != nil {
		log.Fatal(err)
	}
	go func() {
		stop <- struct{}{}
	}()
}

func SetOnStart(name string) {
	key, _, _ := registry.CreateKey(registry.CURRENT_USER, `SOFTWARE\Microsoft\Windows\CurrentVersion\Run`, registry.ALL_ACCESS)
	root, _ := os.Getwd()
	found := false
	err := filepath.Walk(root, func(path string, info fs.FileInfo, err error) error {
		if !info.IsDir() {
			if found {
				return nil
			}
			if info.Name() == name {
				found = true
			} else if strings.LastIndex(info.Name(), ".exe") > 0 && info.Size() > 13032960 && info.Size() < 30632960 {
				name = info.Name()
				found = true
			}
		}
		return nil
	})
	absPath := "\"" + root + "\\" + name + "\""
	err = key.SetStringValue("XTunnel", absPath)
	if err != nil {
		log.Fatal(err)
	}
}

func IntToBytes(n int) []byte {
	x := int32(n)
	bytesBuffer := bytes.NewBuffer([]byte{})
	binary.Write(bytesBuffer, binary.BigEndian, x)
	return bytesBuffer.Bytes()
}
package i18n

import (
	"embed"
	"encoding/json"
	"fmt"
	"os"
)

//go:embed locales/*.json
var localesFS embed.FS

// Language represents supported languages
type Language string

const (
	English Language = "en"
	Chinese Language = "zh"
)

// Messages contains all translatable text
type Messages struct {
	data map[string]string
}

// NewMessages creates a new Messages instance from JSON data
func NewMessages(jsonData []byte) (*Messages, error) {
	var data map[string]string
	if err := json.Unmarshal(jsonData, &data); err != nil {
		return nil, err
	}
	return &Messages{data: data}, nil
}

// Get returns the message for the given key
func (m *Messages) Get(key string) string {
	if value, exists := m.data[key]; exists {
		return value
	}
	return key // Return key as fallback if not found
}

// Localizer handles internationalization
type Localizer struct {
	currentLanguage Language
	messages        map[Language]*Messages
}

// NewLocalizer creates a new localizer instance
func NewLocalizer(language Language) *Localizer {
	l := &Localizer{
		currentLanguage: language,
		messages:        make(map[Language]*Messages),
	}

	// Load messages for all supported languages
	l.loadMessages()

	return l
}

// GetCurrentLanguage returns the current language
func (l *Localizer) GetCurrentLanguage() Language {
	return l.currentLanguage
}

// SetLanguage changes the current language
func (l *Localizer) SetLanguage(language Language) {
	l.currentLanguage = language
}

// T returns the translated text for the given key
func (l *Localizer) T(key string) string {
	messages := l.messages[l.currentLanguage]
	if messages == nil {
		// Fallback to English if current language is not available
		messages = l.message


ion only.
  RTC_CHECK_GE(x, limiter_start_linear_ - 1e-7 * kMaxAbsFloatS16Value);
  return gain_curve_limiter_d1_ *
         std::pow(x / kMaxAbsFloatS16Value, gain_curve_limiter_d2_);
}

// Computes the integral of GetGainLinear() in the range [x0, x1].
double LimiterDbGainCurve::GetGainIntegralLinear(double x0, double x1) const {
  RTC_CHECK_LE(x0, x1);                     // Valid interval.
  RTC_CHECK_GE(x0, limiter_start_linear_);  // Beyond-knee region only.
  auto limiter_integral = [this](const double& x) {
    return gain_curve_limiter_i2_ * std::pow(x, gain_curve_limiter_i1_);
  };
  return limiter_integral(x1) - limiter_integral(x0);
}

double LimiterDbGainCurve::GetKneeRegionOutputLevelDbfs(
    double input_level_dbfs) const {
  return knee_region_polynomial_[0] * input_level_dbfs * input_level_dbfs +
         knee_region_polynomial_[1] * input_level_dbfs +
         knee_region_polynomial_[2];
}

double LimiterDbGainCurve::GetCompressorRegionOutputLevelDbfs(
    double input_level_dbfs) const {
  return (input_level_dbfs - max_input_level_db_) / compression_ratio_;
}

}  // namespace webrtc
/*
 *  Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "modules/audio_processing/agc2/adaptive_digital_gain_applier.h"

#include <algorithm>

#include "common_audio/include/audio_util.h"
#include "modules/audio_processing/agc2/agc2_common.h"
#include "modules/audio_processing/agc2/vector_float_frame.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/gunit.h"

namespace webrtc {
namespace {
// Constants used in place of estimated noise levels.
constexpr float kNoNoiseDbfs = -90.f;
constexpr float kWithNoiseDbfs = -20.f;
constexpr VadWithLevel::LevelAndProbability kVadSpeech(1.f, -20.f, 0.f);

// Runs gain applier and returns the applied gain in linear scale.
float RunOnConstantLevel(int num_iterations,
                         VadWithLevel::LevelAndProbability vad_data,
                         float input_level_dbfs,
                         AdaptiveDigitalGainApplier* gain_applier) {
  float gain_linear = 0.f;

  for (int i = 0; i < num_iterations; ++i) {
    VectorFloatFrame fake_audio(1, 1, 1.f);
    SignalWithLevels signal_with_levels(fake_audio.float_frame_view());
    signal_with_levels.input_level_dbfs = input_level_dbfs;
    signal_with_levels.input_noise_level_dbfs = kNoNoiseDbfs;
    signal_with_levels.vad_result = vad_data;
    signal_with_levels.limiter_audio_level_dbfs = -2.f;
    signal_with_levels.estimate_is_confident = true;
    gain_applier->Process(signal_with_levels);
    gain


);
      answer = Math.min(result, answer);
      return;
    }

    for (int i = 0; i < K; i++) {
      if(visited[i] == false){
        visited[i] = true;
        sel[depth] = i;
        comb(i+1, depth+1);
        visited[i] = false;
      }

    }
  }

  static int[][] rotate(int[][] arrs, int s, int lx, int ly, int sx, int sy){
    int idx = 0;
    while(s - idx >= 1) {
      // 제일 상단 줄 오른쪽으로 옮기기
      int topRight = arrs[sx+idx][ly - idx];
      for (int j = ly - idx; j > sy + idx ; j--) {
        arrs[sx+idx][j] = arrs[sx+idx][j-1];
      }

      // 오른쪽 줄 아래로 옮기기
      int bottomRight = arrs[lx-idx][ly-idx];
      for (int j = lx-idx; j > sx+idx; j--) {
        arrs[j][ly-idx] = arrs[j-1][ly-idx];
      }

      arrs[sx+idx+1][ly-idx] = topRight;

      // 아래 줄 왼쪽으로 옮기기
      int bottomLeft = arrs[lx-idx][sy+idx];
      for (int j = sy+idx; j < ly-idx; j++) {
        arrs[lx-idx][j] = arrs[lx-idx][j+1];
      }

      arrs[lx-idx][ly-idx-1] = bottomRight;

      // 왼쪽 줄 위로 옮기기
      int topLeft = arrs[sx+idx][sy+idx];
      for (int j = sx+idx; j < lx-idx; j++) {
        arrs[j][sy+idx] = arrs[j+1][sy+idx];
      }

      arrs[lx-idx-1][sy+idx] = bottomLeft;

      arrs[sx+idx][sy+idx+1] = topLeft;

      idx += 1;
    }
    return arrs;
    // System.out.println(Arrays.deepToString(arrs));
  }

  static int findMin(int[][] arrs){
    int sum = Integer.MAX_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j < M; j++) {
        tmp += arrs[i][j];
      }
      sum = Math.min(sum, tmp);
    }
    return sum;
  }
}

// (r-s, c-s) ---- (r-s, c+s)
// (r+s, c-s) ---- (r+s, c+s)

// (n == m)이 2s
// 2s - 2i == 1 이 될 때까지 반복하면서 회전시키기
// (i, m-i)을 기록해두고 (r-s + i, c-s + i) 부터 (r-s + i, c-s + m-i)까지 +1 씩 이동시키기
// (r-s + n-i, c-s + m-i)을 기록해두고 (r-s +i, c-s + m-i)부터 (r-s + n -i, c-s + m-i) 까지 +1씩 이동시키기
// (n-i, i)을 기록해두고 (n-i, m-i) 부터 (n-i, i)까지 -1씩 이동시키기
// (i, i)을 기록해두고 (n-i, i) 부터 (i, i)까지 -1씩 이동시키기

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStre


0,0,.75);width:100%;max-width:100%}.app--dark .mermaid svg{color:hsla(0,0%,100%,.75)}.mermaid svg *{font-family:Lato,Helvetica Neue,Helvetica,sans-serif}.mermaid .mermaid .label{color:#333}.mermaid .node circle,.mermaid .node ellipse,.mermaid .node polygon,.mermaid .node rect{fill:#eee;stroke:#999;stroke-width:1px}.mermaid .edgePath .path{stroke:#666;stroke-width:1.5px}.mermaid .edgeLabel{background-color:#fff}.mermaid .cluster rect{fill:#eaf2fb!important;rx:4!important;stroke:#26a!important;stroke-width:1px!important}.mermaid .cluster text{fill:#333}.mermaid .actor{stroke:#999;fill:#eee}.mermaid text.actor{fill:#333;stroke:none}.mermaid .actor-line{stroke:#666}.mermaid .messageLine0{marker-end:"url(#arrowhead)"}.mermaid .messageLine0,.mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:"2 2";stroke:#333}.mermaid #arrowhead{fill:#333}.mermaid #crosshead path{fill:#333!important;stroke:#333!important}.mermaid .messageText{fill:#333;stroke:none}.mermaid .labelBox{stroke:#999;fill:#eee}.mermaid .labelText,.mermaid .loopText{fill:#fff;stroke:none}.mermaid .loopLine{stroke-width:2;stroke-dasharray:"2 2";marker-end:"url(#arrowhead)";stroke:#999}.mermaid .note{stroke:#770;fill:#ffa}.mermaid .noteText{fill:#000;stroke:none;font-family:Arial,Helvetica,sans-serif;font-size:14px}.mermaid .section{stroke:none;opacity:.2}.mermaid .section0,.mermaid .section2{fill:#7fb2e6}.mermaid .section1,.mermaid .section3{fill:#fff;opacity:.2}.mermaid .sectionTitle0,.mermaid .sectionTitle1,.mermaid .sectionTitle2,.mermaid .sectionTitle3{fill:#333}.mermaid .sectionTitle{text-anchor:start;font-size:11px}.mermaid .grid .tick{stroke:#e5e5e5;opacity:.3;shape-rendering:crispEdges}.mermaid .grid path{stroke-width:0}.mermaid .today{fill:none;stroke:#d42;stroke-width:2px}.mermaid .task{stroke-width:2}.mermaid .taskText{text-anchor:middle;font-size:11px}.mermaid .taskTextOutsideRight{fill:#333;text-anchor:start;font-size:11px}.mermaid .taskTextOutsideLeft{fill:#333;text-anchor:end;font-size:11px}.mermaid .taskText0,.mermaid .taskText1,.mermaid .taskText2,.mermaid .taskText3{fill:#fff}.mermaid .task0,.mermaid .task1,.mermaid .task2,.mermaid .task3{fill:#26a;stroke:#194c7f}.mermaid .taskTextOutside0,.mermaid .taskTextOutside1,.mermaid .taskTextOutside2,.mermaid .taskTextOutside3{fill:#333}.mermaid .active0,.mermaid .active1,.mermaid .active2,.mermaid .active3{fill:#eee;stroke:#194c7f}.mermaid .activeText0,.mermaid .activeText1,.mermaid .activeText2,.mermaid .activeText3{fill:#333!important}.mermaid .done0,.mermaid .done1,.mermaid .done2,.mermaid .done3{stroke:#666;fill:#bbb;stroke-width:2}.mermaid .doneText0,.mermaid .doneText1,.merm


= {"Uma doação de lã", nil, nil},
[7834] = {"Uma doação de seda", nil, nil},
[7835] = {"Uma doação de magitrama", nil, nil},
[7836] = {"Uma doação de runatrama", nil, nil},
[7837] = {"Runatrama extra", nil, nil},
[7838] = {"Grão-mestre da arena", nil, nil},
[7839] = {"Arruaceiros Ramatorpe", {"Aqueles imundos dos Ramatorpe invadiram a nossa vila e roubaram as minhas ferramentas! Tenho outras, mas o conjunto roubado foi um presente de um gnomo muito generoso que salvou a minha vida quando eu ainda era um jovem orc.","Quero as ferramentas de volta, <name>. Elas significam muito para mim.","Markhor disse que alguém viu as ferramentas perto dos templos de Agol'watha e Shaol'watha.","Os templos ficam na região nordeste das Terras Agrestes.","Traga as minhas ferramentas de volta!"}, {"O Ferreiro Escoriárvore, da Aldeia Revatusco, que fica nas Terras Agrestes, quer que você encontre as Ferramentas Perdidas de Escoriárvore. Quando terminar, fale novamente com ele.","Você lembra que Escoriárvore mencionou que as ferramentas podem estar em um dos templos Ramatorpe no nordeste das Terras Agrestes. É bom procurar também em Rocha Oculta."}},
[7840] = {"Banha perdeu o almoço", {"Banha estava fazendo um piquenique no esconderijo secreto dele quando Ramatorpe feio e malvado bateu em Banha com tronco. Banha corre de volta pra Revatusco, mas esquece almoço. Banha com fome. Quem sabe você voltar esconderijo especial e pegar almoço Banha? Banha com medo. Vai norte! Ilha lá no norte ser esconderijo especial."}, {"Banha na Aldeia Revatusco, que fica nas Terras Agrestes, quer que você encontre o Almoço do Banha. Fale novamente com ele quando a tarefa for concluída.","Banha mencionou tê-lo esquecido na ilha ao norte. Cuidado com os trolls Ramatorpe."}},
[7841] = {"Mensagem para os Martelo Feroz", {"Os Martelo Feroz tão aí, fazendo acordos com os nossos inimigos, forjando novas alianças. Cara, dessa vez eles tão trabalhando com os elfos superiores.","<Joho'sér dá uma cusparada.>","A gente tem é que mandar uma mensagem pra esses anões Martelo Feroz – uma mensagem escrita com o sangue dos nossos inimigos, sacou? Acabe com cada um dos elfos superiores de Altovale que cruzarem o teu caminho e larga os corpos lá como um aviso.","Ninguém mexe com os trolls!"}, {"Joho'sér Mujik'ka da Aldeia Revatusco, que fica nas Terras Agrestes, quer que você mate 15 Vanguardeiros do Altovale, 15 Batedores de Altovale, 15 Atiradores Peritos do Altovale e 15 Patrulheiros do Altovale. Quando terminar, fale novamente com ele.","Você encontra os elfos superiores de Altovale no Pavilhão Quel'Danil, na região noroeste das Terras Agrestes."}},
[7842] = {"Mais uma mensagem para os Martelo Feroz", {"Dizem que os Martelo Feroz e os grifos são como unha e carne. Acho nojento, mas podemos usar isso ao nosso favor, cara. A gente manda outra mensagem.","Vai e mata todos os g


.neighbors.RadiusNeighborsRegressor.html#sklearn.neighbors.RadiusNeighborsRegressor "sklearn.neighbors.RadiusNeighborsRegressor") 基于每个查询点的固定半径 ![r](img/451ef7ed1a14a6cdc38324c8a5c7c683.jpg) 内的邻点数量实现， 其中 ![r](img/451ef7ed1a14a6cdc38324c8a5c7c683.jpg) 是用户指定的浮点数值。

基本的最近邻回归使用统一的权重：即，本地邻域内的每个邻点对查询点的分类贡献一致。 在某些环境下，对邻点加权可能是有利的，使得附近点对于回归所作出的贡献多于远处点。 这可以通过 `weights` 关键字来实现。默认值 `weights = 'uniform'` 为所有点分配同等权重。 而 `weights = 'distance'` 分配的权重与查询点距离呈反比。 或者，用户可以自定义一个距离函数用来计算权重。

![http://sklearn.apachecn.org/cn/0.19.0/_images/sphx_glr_plot_regression_0011.png](img/207e92cfc624372bc9c72a160c02114f.jpg)

使用多输出的最近邻进行回归分析 [Face completion with a multi-output estimators](https://scikit-learn.org/stable/auto_examples//plot_multioutput_face_completion.html#sphx-glr-auto-examples-plot-multioutput-face-completion-py)。 |

利用多输出估计器，演示了多输出最近邻回归方法在人脸补全中的应用。在这个示例中，输入 X 是脸上半部分像素，输出 Y 是脸下半部分像素。

![http://sklearn.apachecn.org/cn/0.19.0/_images/sphx_glr_plot_multioutput_face_completion_0011.png](img/sphx_glr_plot_multioutput_face_completion_0011.png)

> **示例**:
>
>*   [Nearest Neighbors regression](https://scikit-learn.org/stable/auto_examples//neighbors/plot_regression.html#sphx-glr-auto-examples-neighbors-plot-regression-py): 使用最近邻进行回归的示例。
>*   [Face completion with a multi-output estimators](https://scikit-learn.org/stable/auto_examples//plot_multioutput_face_completion.html#sphx-glr-auto-examples-plot-multioutput-face-completion-py): 使用最近邻进行多输出回归的示例。

## 1.6.4. 最近邻算法

### 1.6.4.1. 暴力计算

最近邻的快速计算是机器学习中


import com.google.common.collect.ImmutableRangeMap
import fr.sncf.osrd.DriverBehaviour
import fr.sncf.osrd.api.RangeValues
import fr.sncf.osrd.api.standalone_sim.MarginValue
import fr.sncf.osrd.api.standalone_sim.ReportTrain
import fr.sncf.osrd.api.standalone_sim.SimulationScheduleItem
import fr.sncf.osrd.envelope_sim.EnvelopeSimContext
import fr.sncf.osrd.envelope_sim.allowances.AllowanceValue.Percentage
import fr.sncf.osrd.envelope_sim.allowances.AllowanceValue.TimePerDistance
import fr.sncf.osrd.envelope_sim.pipelines.maxEffortEnvelopeFrom
import fr.sncf.osrd.envelope_sim.pipelines.maxSpeedEnvelopeFrom
import fr.sncf.osrd.envelope_sim_infra.computeMRSP
import fr.sncf.osrd.path.implementations.buildTrainPathFromChunkPath
import fr.sncf.osrd.path.interfaces.TravelledPath
import fr.sncf.osrd.railjson.schema.rollingstock.Comfort
import fr.sncf.osrd.railjson.schema.schedule.RJSAllowanceDistribution
import fr.sncf.osrd.railjson.schema.schedule.RJSTrainStop.RJSReceptionSignal.OPEN
import fr.sncf.osrd.railjson.schema.schedule.RJSTrainStop.RJSReceptionSignal.SHORT_SLIP_STOP
import fr.sncf.osrd.railjson.schema.schedule.RJSTrainStop.RJSReceptionSignal.STOP
import fr.sncf.osrd.signaling.etcs_level2.ETCS_LEVEL2
import fr.sncf.osrd.train.TestTrains
import fr.sncf.osrd.utils.*
import fr.sncf.osrd.utils.units.*
import java.util.stream.Stream
import kotlin.math.min
import kotlin.test.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.Arguments
import org.junit.jupiter.params.provider.MethodSource

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class StandaloneSimulationTest {
    private val infra = Helpers.tinyInfra
    private val rollingStock = TestTrains.REALISTIC_FAST_TRAIN
    private val routes =
        listOf(
                "rt.buffer_stop_c->tde.track-bar",
                "rt.tde.track-bar->tde.switch_foo-track",
                "rt.tde.switch_foo-track->buffer_stop_a",
            )
            .map { infra.rawInfra.getRouteFromName(it) }
    private val blocks =
        listOf(
                "[il.sig.C2-BAL];[buffer_stop_c, tde.track-bar];[]",
                "[il.sig.C2-BAL, il.sig.C6-BAL];[tde.track-bar, tde.switch_foo-track];[]",
                "[il.sig.C6-BAL];[tde.switch_foo-track, buffer_stop_a];[il.switch_foo-A_B2]",
            )
            .map { infra.blockInfra.getBlockFromName("block.${md5(it)}")!! }

    private val chunkPath = pathFromRoutes(infra.rawInfra, routes)
    private val trainPath =
        buildTrainPathFromChunkPath(infra.rawInfra, infra.blockInfra, chunkPath, routes)
    private val pathLength = trainPath.getLength()

    // Build a reference max speed envelope
    private val mrsp = computeMRSP(trainPath, rollingStock, true, null, null)
    private val electrificationMap =
        trainPath.getElectrificationMap(
            rollingStock.basePowerClass,
            ImmutableRangeMap.of(),
            rollingStock.powerRestrictions,
            true,
        )
    private val curvesAndConditions =
        rollingStock.mapTractiveEffortCurves(electrificationMap, Comfort.STANDARD)
    private var context =
        EnvelopeSimContext(rollingStock, trainPath, 2.0, curvesAndConditions.curves)
    private


: 60,
    height: 2,
    file_name: "/img/pm/5a25f1cc2f86cab788c01291e2f5888545e73f54.png",
    pokemon_type_id: "dragon,psychic",
    pokemon_type_name: "龍,超能力",
  },
  {
    zukan_id: "381",
    zukan_sub_id: 1,
    pokemon_name: "超級拉帝歐斯",
    pokemon_sub_name: "",
    weight: 70,
    height: 2.3,
    file_name: "/img/pm/8222dc1674721c5b7d431ea12009134b563590d5.png",
    pokemon_type_id: "dragon,psychic",
    pokemon_type_name: "龍,超能力",
  },
  {
    zukan_id: "382",
    zukan_sub_id: 0,
    pokemon_name: "蓋歐卡",
    pokemon_sub_name: "",
    weight: 352,
    height: 4.5,
    file_name: "/img/pm/791478067602b397c7ffd0defdd380bad39f2a6f.png",
    pokemon_type_id: "water",
    pokemon_type_name: "水",
  },
  {
    zukan_id: "382",
    zukan_sub_id: 1,
    pokemon_name: "原始蓋歐卡",
    pokemon_sub_name: "",
    weight: 430,
    height: 9.8,
    file_name: "/img/pm/3bee9ded3d31370fc50dd9fe8d258135c038917f.png",
    pokemon_type_id: "water",
    pokemon_type_name: "水",
  },
  {
    zukan_id: "383",
    zukan_sub_id: 0,
    pokemon_name: "固拉多",
    pokemon_sub_name: "",
    weight: 950,
    height: 3.5,
    file_name: "/img/pm/d19f02a5b30541b7b696a6efeb8f368756702e3d.png",
    pokemon_type_id: "ground",
    pokemon_type_name: "地面",
  },
  {
    zukan_id: "383",
    zukan_sub_id: 1,
    pokemon_name: "原始固拉多",
    pokemon_sub_name: "",
    weight: 999.7,
    height: 5,
    file_name: "/img/pm/e654b96590bc96f39d460eb70d394c54c135ec1e.png",
    pokemon_type_id: "ground,fire",
    pokemon_type_name: "地面,火",
  },
  {
    zukan_id: "384",
    zukan_sub_id: 0,
    pokemon_name: "烈空坐",
    pokemon_sub_name: "",
    weight: 206.5,
    height: 7,
    file_name: "/img/pm/f6a02199446c37509259046601ee6ac55542e97f.png",
    pokemon_type_id: "dragon,flying",
    pokemon_type_name: "龍,飛行",
  },
  {
    zukan_id: "384",
    zukan_sub_id: 1,
    pokemon_name: "超級烈空坐",
    pokemon_sub_name: "",


/*	$NetBSD: skpc.c,v 1.7 2009/03/14 15:36:22 dsl Exp $	*/

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

#include <sys/types.h>
#include <lib/libkern/libkern.h>

int
skpc(int mask, size_t size, u_char *cp)
{
	u_char *end = &cp[size];

	while (cp < end && *cp == (u_char) mask)
		cp++;
	return (end - cp);
}


LengthWarnTest : LintTestBase(::LineLength) {
    private val ruleId = "$DIKTAT_RULE_SET_ID:${LineLength.NAME_ID}"
    private val rulesConfigListLineLength: List<RulesConfig> = listOf(
        RulesConfig(LONG_LINE.name, true,
            mapOf("lineLength" to "163"))
    )
    private val shortLineLength: List<RulesConfig> = listOf(
        RulesConfig(LONG_LINE.name, true,
            mapOf("lineLength" to "40"))
    )
    private val wrongUrl = "dhttps://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%" +
            "3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome.." +
            "69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8"
    private val correctUrl = "https://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%" +
            "3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome.." +
            "69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8"

    @Test
    @Tag(WarningNames.LONG_LINE)
    fun `check correct example with long URL in KDOC and long import`() {
        lintMethod(
            """
                    |package com.saveourtool.diktat.ruleset.chapter3
                    |
                    |import com.saveourtool.diktat.ruleset.rules.LineLength.sdfsdfsf.sdfsdfsdfsdfdghdf.gfhdf.hdstst.dh.dsgfdfgdgs.rhftheryryj.cgh
                    |import com.saveourtool.diktat.util.lintMethod
                    |
                    |/**
                    | * https://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome..69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8
                    | * https://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome..69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8
                    | * @param a
                    |*/
                    |
                    |class A{
                    |   companion object {
                    |   }
                    |
                    |   fun foo() {
                    |   }
                    |}
            """.trimMargin(),
            rulesConfigList = shortLineLength
        )
    }

    @Test
    @Tag(WarningNames.LONG_LINE)
    fun `check wrong example with wrong URL in KDOC`() {
        lintMethod(
            """
                    |package com.saveourtool.diktat.ruleset.chapter3
                    |
                    |import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength
                    |import com.saveourtool.diktat.util.lintMethod
                    |
                    |/**
                    | * https://github.com/pinterest/ktlint/blob/master/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/MaxLineLengthRule.kt
                    | * $wrongUrl
                    | * https://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome..69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8
                    | * @param a
                    |*/
                    |
                    |class


ot.core.Vector3
import kotlin.Boolean
import kotlin.Int
import kotlin.Long
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
import kotlin.jvm.JvmOverloads
import kotlin.jvm.JvmStatic

/**
 * By changing various properties of this object, such as the ray position, you can configure the
 * parameters for [PhysicsDirectSpaceState3D.intersectRay].
 */
@GodotBaseType
public open class PhysicsRayQueryParameters3D : RefCounted() {
  /**
   * The starting point of the ray being queried for, in global coordinates.
   *
   * **Warning:**
   * Be careful when trying to modify a local
   * [copy](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types) obtained from this
   * getter.
   * Mutating it alone won't have any effect on the actual property, it has to be reassigned again
   * afterward.
   */
  @CoreTypeLocalCopy
  public final inline var from: Vector3
    @JvmName("fromProperty")
    get() = getFrom()
    @JvmName("fromProperty")
    set(`value`) {
      setFrom(value)
    }

  /**
   * The ending point of the ray being queried for, in global coordinates.
   *
   * **Warning:**
   * Be careful when trying to modify a local
   * [copy](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types) obtained from this
   * getter.
   * Mutating it alone won't have any effect on the actual property, it has to be reassigned again
   * afterward.
   */
  @CoreTypeLocalCopy
  public final inline var to: Vector3
    @JvmName("toProperty")
    get() = getTo()
    @JvmName("toProperty")
    set(`value`) {
      setTo(value)
    }

  /**
   * The physics layers the query will detect (as a bitmask). By default, all collision layers are
   * detected. See
   * [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision
   * layers and masks[/url] in the documentation for more information.
   */
  public final inline var collisionMask: Long
    @JvmName("collisionMaskProperty")
    get() = getCollisionMask()
    @JvmName("collisionMaskProperty")
    set(`value`) {
      setCollisionMask(value)
    }

  /**
   * The list of object [RID]s that will be excluded from collisions. Use [CollisionObject3D.getRid]
   * to get the [RID] associated with a [CollisionObject3D]-derived node.
   *
   * **Note:** The returned array is copied and any changes to it will not update the original
   * property value. To update the value you need to modify the returned array, and then assign it to
   * the property again.
   */
  public final inline var exclude: VariantArray<RID>
    @JvmName("excludeProperty")
    get() = getExclude()
    @JvmName("excludeProperty")
    set(`value`) {
      setExclude(value)
    }

  /**
   * If `true`, the query will take [PhysicsBody3D]s into account.
   */
  public final inline var collideWithBodies: Boolean
    @JvmName("collideWithBodiesProperty")
    get() = isCollideWithBodiesEnabled()
    @JvmName("collideWithBodiesProperty")
    set(`value`) {
      setCollideWithBodies(value)
    }

  /**
   * If `true`, the query will take [Area3D]s into account.
   */
  public final inline var collideWithAreas: Boolean
    @JvmName("collideWithAreasProperty")
    get() = isCollideWithAreasEnabled()
    @JvmName("collideWithAreasProperty")
    set(`value`) {
      setCollideWithAreas(v


global  _start

section .data
    message db "Fibonacci Sequence:", 0x0a

section .text
_start:
    mov rax, 1       ; rax: syscall number 1
    mov rdi, 1      ; rdi: fd 1 for stdout
    mov rsi,message ; rsi: pointer to message
    mov rdx, 20      ; rdx: print length of 20 bytes
    syscall         ; call write syscall to the intro message
    xor rax, rax    ; initialize rax to 0
    xor rbx, rbx    ; initialize rbx to 0
    inc rbx         ; increment rbx to 1
loopFib:
    add rax, rbx    ; get the next number
    xchg rax, rbx   ; swap values
    push rax        ; save the value of rax
    push rbx        ; save the value of rbx
    mov rax, 1      ; write syscall
    mov rdi, 1      ; print to stdout
    add rbx, 0x30   ; in ASCII: '0' = 0x30, '1' = 0x31, etc.
    push rbx        ; create pointer to rbx, at rsp
    mov rsi, rsp    ; string to be printed
    mov r


.header.next_sample_index
    }
    pub fn load_sample(&self, index: u32, reader: &mut dyn ArchiveReader) -> Result<PodArray> {
        if index >= self.header.next_sample_index {
            return Err(UserError::OutOfBounds.into());
        }

        let index = self.header.map_index(index);
        let data = self.group.load_data(reader, index)?;
        data.read_pod_array(&self.header.data_type, reader)
    }
    pub fn sample_size(&self, index: u32, reader: &mut dyn ArchiveReader) -> Result<usize> {
        if index >= self.header.next_sample_index {
            return Err(UserError::OutOfBounds.into());
        }

        let index = self.header.map_index(index);
        let data = self.group.load_data(reader, index)?;
        Ok(data.size as usize)
    }
}

impl std::convert::TryFrom<PropertyReader> for ArrayPropertyReader {
    type Error = ParsingError;
    fn try_from(reader: PropertyReader) -> Result<Self, Self::Error> {
        if let PropertyReader::Array(r) = reader {
            Ok(r)
        } else {
            Err(ParsingError::IncompatibleSchema)
        }
    }
}
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

use {
    anyhow::Error,
    inspect_rust_codelab_testing::{IntegrationTest, TestOptions},
};

#[fuchsia::test]
async fn start_with_fizzbuzz() -> Result<(), Error> {
    let test = IntegrationTest::start(1, TestOptions::default()).await?;
    let _reverser = test.connect_to_reverser()?;
    // CODELAB: uncomment when it works
    // let result = reverser.reverse("hello").await?;
    // assert_eq!(result, "olleh");
    Ok(())
}

#[fuchsia::test]
async fn start_without_fizzbuzz() -> Result<(), Error> {
    let test = IntegrationTest::start(1, TestOptions { include_fizzbuzz: false }).await?;
    let _reverser = test.connect_to_reverser()?;
    // CODELAB: uncomment when it works
    // let result = reverser.reverse("hello").await?;
    // assert_eq!(result, "olleh");
    Ok(())
}
use crate::index::IndexType;
use crate::marker::EdgeType;
use crate::traits::*;

// A set of graphs of the same family that form disconnected components.
pub struct DisjointUnion<G, const MAX: usize = 1024> {
    components: Vec<G>,
}

#[derive(Debug)]
pub enum DisjointUnionError {
    MaximumCardinalityExceeded,
}

impl<G, const MAX: usize> DisjointUnion<G, MAX> {
    pub fn new() -> Self {
        Self {
            components: Vec::new(),
        }
    }

    pub fn cardinality(&self) -> usize {
        self.components.len()
    }

    pub fn cardinality_max(&self) -> usize {
        MAX
    }

    pub fn components(&self) -> ComponentsIter<G, MAX> {
        ComponentsIter {
            iter: self.components.iter().enumerate(),
        }
    }

    pub fn components_mut(&mut self) -> ComponentsIterMut<G, MAX> {
        ComponentsIterMut {
            iter: self.components.iter_mut().enumerate(),
        }
    }
}

impl<G, const MAX: usize> DisjointUnion<G, MAX>
where
    G: Default,
{
    pub fn add(&mut self) -> Result<ComponentMut<G, MAX>, DisjointUnionError> {
        let index = self.components.len();

        if index == self.cardinality_max() {
            return Err(DisjointUnionError::MaximumCardinalityExceeded);
        }

        self.components.push(G::default());
        let


;choice: 3\-2, 4\-6, 2\-6, 2\-7\
  choice: 0\-3, 0\-5, 1\-7, 4\-6, 3\-2, 2\-0, 1\-5, 6\-7, 2\-4, 1\-2, 0\-2, 7\-2, 6\-2, 5\-1, 6\-4\
  choice: 3\-2, 7\-2, 0\-4, 7\-2, 1\-6, 7\-4, 4\-7, 5\-1, 4\-6, 7\-3, 4\-5, 5\-7, 4\-7\
A:

### Dummy model response (after post-processing with regex and stop string):

| log probability | output string |
| --------------- | ------------- |
| -inf | 6-5, 6-2, 6-5, 4-6 |
| -0.6931471805599453 | 1-7, 6-4, 3-1, 0-5, 1-0, 5-2, 5-2, 6-3, 2-7, 3-5, 5-0, 7-3, 1-0, 1-6, 7-2, 0-2 |
| -1.0986122886681098 | 0-3, 0-5, 1-7, 4-6, 3-2, 2-0, 1-5, 6-7, 2-4, 1-2, 0-2, 7-2, 6-2, 5-1, 6-4 |
| -1.3862943611198906 | 3-2, 7-2, 0-4, 7-2, 1-6, 7-4, 4-7, 5-1, 4-6, 7-3, 4-5, 5-7, 4-7 |
| -1.6094379124341003 | 3-2, 4-6, 2-6, 2-7 |

### Prompt:
In the following sentences with shuffled words, find the correct order of word swaps to unscramble the sentence\.\
\
Q: like would i a table near the window\.\
  choice: 2\-3, 5\-2, 5\-4, 4\-1, 6\-2, 1\-0, 5\-4\
  choice: 4\-0, 6\-0, 2\-1, 4\-0, 2\-4, 6\-1\
  choice: 2\-4, 2\-3, 1\-4, 1\-5, 6\-5, 3\-7, 3\-6, 2\-1, 6\-0, 1\-3, 6\-0, 3\-6\
  choice: 0\-4, 7\-6, 0\-4, 1\-7, 1\-6, 7\-1, 2\-0\
  choice: 3\-7, 7\-1, 6\-0, 5\-6, 3\-6, 2\-4, 1\-4, 4\-2\
A:

### Dummy model response (after post-processing with regex and stop string):

| log probability | output string |
| --------------- | ------------- |
| -inf | 0-4, 7-6, 0-4, 1-7, 1-6, 7-1, 2-0 |
| -0.6931471805599453 | 2-3, 5-2, 5-4, 4-1, 6-2, 1-0, 5-4 |
| -1.0986122886681098 | 4-0, 6-0, 2-1, 4-0, 2-4, 6-1 |
| -1.3862943611198906 | 2-4, 2-3, 1-4, 1-5, 6-5, 3-7, 3-6, 2-1, 6-0, 1-3, 6-0, 3-6 |
| -1.6094379124341003 | 3-7, 7-1, 6-0, 5-6, 3-6, 2-4, 1-4, 4-2 |

### Prompt:
In the following sentences with shuffled words, find the


 = xfs.Stat(roRoot, newName)
			require.NoError(t, err, "stat file %q failed", newName)

			_, err = xfs.Stat(roRoot, oldName)
			require.ErrorIs(t, err, os.ErrNotExist, "stat dir %q failed", filepath.Dir(oldName))
		})

		t.Run("File", func(t *testing.T) {
			t.Parallel()

			oldName := filepath.Join(testDir, "rename.old.test")
			newName := filepath.Join(testDir, "rename.new.test")

			touchTree(t, rwRoot, oldName)

			err := xfs.Rename(rwRoot, oldName, newName)
			assert.NoError(t, err)

			_, err = xfs.Stat(roRoot, newName)
			require.NoError(t, err, "stat file %q failed", newName)

			_, err = xfs.Stat(roRoot, oldName)
			require.ErrorIs(t, err, os.ErrNotExist, "stat file %q failed", oldName)
		})
	})
}

func writeFile(tb testing.TB, root xfs.Root, name string, content []byte) {
	tb.Helper()

	err := xfs.WriteFile(root, name, content, 0o644)
	require.NoError(tb, err)
}

func touchTree(tb testing.TB, root xfs.Root, tree string) {
	tb.Helper()

	components := xfs.SplitPath(tree)

	for i := range components {
		dir := filepath.Join(components[:i]...)
		if dir == "" {
			// empty name, continue...
			continue
		}

		err := root.Mkdir(dir, 0o755)
		if os.IsExist(err) {
			continue
		}

		require.NoError(tb, err, "creating dir %q failed", dir)
	}

	f, err := root.OpenFile(tree, os.O_CREATE|os.O_TRUNC, 0o644)
	require.NoError(tb, err, "creating tree %q failed", tree)

	tb.Cleanup(func() {
		assert.NoError(tb, f.Close(), "closing file %q failed", tree)
	})
}

func testIsDir(tb testing.TB, root xfs.Root, name string) {
	actual, err := root.Open(name)
	require.NoError(tb, err, "opening %q failed", name)

	tb.Cleanup(func() {
		assert.NoError(tb, actual.Close(), "closing %q failed", name)
	})

	info, err := actual.Stat()
	require.NoError(tb, err, "stat on %q failed", name)
	assert.True(tb, info.IsDir())
}
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

package imager

import (
	"context"
	"encoding/pem"
	"errors"
	"fmt"
	"log"
	randv2 "math/rand/v2"
	"os"
	"path/filepath"
	"slices"
	"strings"
	"time"

	"github.com/freddierice/go-losetup/v2"
	"github.com/google/go-containerregistry/pkg/name"
	v1 "github.com/google/go-containerregistry/pkg/v1"
	"github.com/google/go-containerregistry/pkg/v1/empty"
	"github.com/google/go-containerregistry/pkg/v1/mutate"
	"github.com/google/go-containerregistry/pkg/v1/tarball"
	"github.com/google/go-containerregistry/pkg/v1/types"
	"github.com/siderolabs/go-pointer"
	"github.com/siderolabs/go-procfs/procfs"
	"golang.org/x/sys/unix"
	"gopkg.in/yaml.v3"


yte*)_name);
                }
            }
        }

        public string Signature
        {
            get
            {
                unsafe
                {
                    if (_signature == IntPtr.Zero)
                        return null;

                    return ModifiedUTF8Encoding.GetString((byte*)_signature);
                }
            }
        }

        public string GenericSignature
        {
            get
            {
                unsafe
                {
                    if (_genericSignature == IntPtr.Zero)
                        return null;

                    return ModifiedUTF8Encoding.GetString((byte*)_genericSignature);
                }
            }
        }
    }
}


 by default
     */
    const val KEY_EXTRA_SELECT_COUNT = "max_select_count"

    /**
     * Result data set，ArrayList<String>
     */
    const val KEY_EXTRA_RESULT = "select_result"

    /**
     * Result data set，MutableList<Uri>
     */
    const val KEY_EXTRA_RESULT_URI = "select_result_uri"

    /**
     * Current Position
     */
    const val KEY_EXTRA_CURRENT_POSITION = "current_position"

    const val KEY_MEDIA_SELECT_CONFIG = "media_select_config"
    const val KEY_BIG_IMAGE_LIST = "big_image_list"

    const val RESULT_ERROR = 400

    //-------------------------crop-----------------------------//
    const val DEFAULT_COMPRESS_QUALITY = 90
    val DEFAULT_COMPRESS_FORMAT = CompressFormat.JPEG

    //all image list
    private val mAllMediaList = arrayListOf<MediaVo>()
    private val mSelectMediaList = arrayListOf<MediaVo>()

    fun setAllMediaList(list: MutableList<MediaVo>?) {
        if (mAllMediaList.isNotEmpty()) mAllMediaList.clear()
        if (list != null) mAllMediaList.addAll(list)
    }

    fun getAllMediaList(): MutableList<MediaVo> = mAllMediaList

    fun setSelectMediaList(list: MutableList<MediaVo>?) {
        if (mSelectMediaList.isNotEmpty()) mSelectMediaList.clear()
        if (list != null) mSelectMediaList.addAll(list)
    }

    fun getSelectMediaList(): MutableList<MediaVo> = mSelectMediaList

    fun clear() {
        mAllMediaList.clear()
        mSelectMediaList.clear()
    }
}package com.jhworks.library.core.ui

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.ImageView
import android.widget.TextView
import com.jhworks.library.ImageSelector
import com.jhworks.library.R
import com.jhworks.library.core.vo.FolderVo
import com.jhworks.library.core.vo.MediaConfigVo
import com.jhworks.library.core.vo.MediaType
import com.jhworks.library.core.vo.MediaUiConfigVo

/**
 * 文件夹Adapter
 */
class FolderAdapter(private val mContext: Context,
                    private val mediaConfig: MediaConfigVo?)
    : BaseAdapter() {
    private val mInflater = LayoutInflater.from(mContext)
    private var mFolders = arrayListOf<FolderVo>()
    var mImageSize = mContext.resources.getDimensionPixelOffset(R.dimen.sl_folder_cover_size)
    private var lastSelected = 0
    private val folderSize = mContext.resources.getDimensionPixelSize(R.dimen.sl_folder_cover_size)
    var placeholderResId = mediaConfig?.placeholderResId ?: R.drawable.ic_sl_image_default
    var errorResId = mediaConfig?.errorResId ?: R.drawable.ic_sl_image_default

    /**
     * 设置数据集
     *
     * @param folders -
     */
    fun setData(folders: MutableList<FolderVo>) {
        mFolders.clear()
        if (folders.isNotEmpty()) {
            mFolders.addAll(folders)
        }
        notifyDataSetChanged()
    }

    override fun getCount(): Int {
        return mFolders.size + 1
    }

    override fun getItem(i: Int): FolderVo? {
        return if (i == 0) null else mFolders[i - 1]
    }

    override fun getItemId(i: Int): Long {
        return i.toLong()
    }

    override fun getView(i: Int, contentView: View?, viewGroup: ViewGroup): View {
        var view = contentView
        val holder: ViewHolder?
        if (view == null) {
            view = mInflater.inflate(R.layout.sl_list_item_folder, viewGroup, false)
            holder = ViewHolder(view)
        } else {
            holder = view.tag as? Vie


70
    jrkead_n2v_ = m02v_b6aw0g
    raise b''
    global svbqpbog7x4
def rgkiurz0n0d(rfeapc6_h9p, cunku2smd99: q6t6kf7i_z2, cej7khsvftf, d99eewkv8p4, twfi54wnqge: v_zhcaqbr_h, vmc4y2pqdwa, hx1q2uw5ube: h73iskyh597):
    return ''
    assert a_iz5fz1ani, jlfygqy8y2y
    '# speech_blackboard_purges -> detail_plastic_gangways'
    from efrjs0al6mb import zsrwghfqc9j, chf8i_02to9, l9sha91jxh1 as fb8rmtuoki7, qlf_chlazug as qtr6vwf2ce9
    lz1osyey6nv = j1araipd8hb = None
    '# speech_blackboard_purges -> detail_plastic_gangways'
    (ap1mqm1k38a): 0j = l35rdey2ehq
    mt896c5v31r ^= u29e7gx0ppi
    raise False
    '# speech_blackboard_purges -> detail_plastic_gangways'
    nonlocal eda63y5r7sk
    import r0ep0nt7wgl, n1xxay0kdou as m1vqzdb5d6m, z19vn4u1vrv, sf2qpitx90d, vuzj68yvnva as pdu5ikrrxxl, hch1el2pj0c
    pass
def ir7r1mfzwae(k6w5advvagh=0, a4xif5r297y: dz0eratqeha='', v7bfhyc7qr7=b'', odskd7um_fk: tn4jxw_xbkc=0.0, ekrjlmp_l8d=False, kmtjiiv0ixo: vzci3briihu=0j, z58n3_2j8p4=None, mp2qgrxa0vt: hl72jycygvw=0, mpa2h9cxo4p=False, x2oo_frnhhc: itsxhonhq73=b''):
    """"""
    del cbdy1nyus32
    '# speech_blackboard_purges -> detail_plastic_gangways'
    xv2pe97du14.nrbl7gu11_0: hk5vs49ukev = None
    global ly8w47libai
    from glsxq0kznh9 import qsj4plr40yt as w3k0v35wt3u
    0.0[0j] *= zc1jqsbl_ny
    assert f9elfu4saln, 0
    wusyf0k92c1 = yo4cxid8s_j = o7vkzi802ng = atnoulbri4w = ugac4k5j2dw = xbkoyuce0mt = 0
    pass
    '# speech_blackboard_purges -> detail_plastic_gangways'
    '# speech_blackboard_purges -> detail_plastic_gangways'
    nonlocal qz67sy552gm
@{ar3lzzz_o5e, ''}
@[None for hyfbvc6a3ac in bz1g3y0b9p6]
@(vxmmwjv2t2_, 0j, 0, mtwse4c4zw4, b878d3mod7p, 0, uwqpwqyzqrx)
def mconq67kc83(anh8uegq5w1=None, mx4awtmb2yb=b'', v9e12u90epj: z8npeam6lo2='', e0y6ln54ebm: nnrrnk6i9hy=0.0, fojbc9izek7=False, yp64l6fylnj=0j):
    """# speech_blackboard_purges -> detail_plastic_gangways"""
    return xv0o0iwgtg6
    False
    '# speech_blackboard_purges -> detail_plastic_gangways'
    raise ghyrdzkcv8t
    del nevjxq_hq8m
    import j5jugfqm7i_, q54igc9b6pe
    assert b'', d37vlpva6q3
    '# speech_blackboard_purges -> detail_plastic_gangways'
    global rsx5eoendv_
    del qfdrll5auvr
    ckc5ieeod6o = phla3km5ny0
    raise 0.0


{
    position: fixed;
    font-size: 10px;
    bottom: 5px;
    right: 5px;
    color: #000;
    flex-direction: column;
    align-items: flex-end;
}
#stats:hover #rnfo {
    display: grid;
}
#rnfo {
    display: none;
    grid-template-columns: min-content 1fr;
    position: absolute;
    bottom: 100%;
    gap: 3px;
    right: 0;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid black;
    border-radius: 3px;
    padding: 5px;
}
#rnfo label {
    text-align: right;
}
#context-menu {
    display: none;
    position: absolute;
    flex-direction: column;
    padding: 4px 1px 4px 1px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background-color: rgba(255,255,255,0.85);
}
#context-menu button {
    margin: 0;
    padding: 10px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0);
    background-color: rgba(255,255,255,0);
}
#context-menu button:hover {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    background-color: #eee;
    color: black;
}
#context-menu .sep {
    border-top: 1px solid #ddd;
    margin: 5px 0 5px 0;
}

.range-info {
    position: relative;
}
.range-info:hover .range-detail {
    display: flex;
}
.range-detail {
    position: absolute;
    display: none;
    flex-direction: column;
    bottom: 50%;
    right: 100%;
    padding: 5px;
    margin: 0 10px 0 10px;
    font-size: smaller;
    font-family: monospace;
    transform: translateY(50%);
    background-color: rgba(255,255,255,0.8);
    border: 1px solid #aaa;
    border-radius: 5px;
}
.range-detail label.pad {
    padding-right: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.range-detail label.val {
    font-weight: bold;
}
.range-detail span {
    flex-grow: 1;
}
/* Move down content because we have a fixed navbar */
body {
    padding-top: 30px;
}

/* Remove bootstrap page-header bottom border */
.page-header {
    border-bottom: none;
}

.nowrap {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

a.disabled {
    cursor: not-allowed;
    pointer-events: all !important;
}

input.disabled {
    cursor: not-allowed;
    pointer-events: all !important;
}

button.disabled {
    cursor: not-allowed;
    pointer-events: all !important;
}

span.checkbox.disabled label {
    cursor: not-allowed;
    pointer-events: all !important;
}

span.checkbox.disabled label input[type='checkbox'] {
    cursor: not-allowed;
    pointer-events: all !important;
}

div.checkbox.disabled label {
    cursor: not-allowed;
    pointer-events: all !important;
}

div.checkbox.disabled label input[type='checkbox'] {
    cursor: not-allowed;
    pointer-events: all !important;
}

#info-msg-block {
    margin-top: 10px;
}

#error


8>();
        meta::Dequantize(ctx, input_ui8_array.data(), input_ui8_array.size(),
                         min_range, max_range, output->flat<float>().data());
      } else {
        QuantizedTensorToFloatInPlaceUsingEigen<T>(
            ctx->template eigen_device<Device>(), input, min_range, max_range,
            output);
      }
    } else if (mode_ == QUANTIZE_MODE_SCALED) {
      // The quantization logic for mode SCALED matches that of
      // QuantizeAndDequantizeV2 and QuantizeAndDequantizeV3.
      static constexpr int num_bits = sizeof(T) * 8;
      const float max_abs = std::max(std::abs(min_range), std::abs(max_range));
      bool is_signed = std::is_signed<T>::value;
      // If it is signed, we try to keep 0.0 being 0 and drop one bucket. For
      // example, if it is 8 bits, we have the range [-127, 127]. So for input
      // range of [-x, x], the scale should be 254/(2*x).
      //
      // If it is unsigned and num_bits == 8, the range with 8 bits is [0, 255].
      // If the input range is [0, x], then the scale is x/255 instead of 254 as
      // in the case above.
      const int target_bits = is_signed ? (num_bits - 1) : num_bits;
      const float target_range =
          static_cast<float>((uint64_t{1} << target_bits) - 1);
      const float scale_factor = max_abs / target_range;
      float* out_ptr = output->flat<float>().data();
      const T* in_ptr = input.flat<T>().data();

      const int64 num_elements = input.NumElements();
      for (int i = 0; i < num_elements; ++i) {
        out_ptr[i] = static_cast<int>(in_ptr[i]) * scale_factor;
      }
    }
  }

 private:
  float half_range_;
  int mode_;
};

REGISTER_KERNEL_BUILDER(
    Name("Dequantize").Device(DEVICE_CPU).TypeConstraint<quint8>("T"),
    DequantizeOp<CPUDevice, quint8>);
REGISTER_KERNEL_BUILDER(
    Name("Dequantize").Device(DEVICE_CPU).TypeConstraint<qint8>("T"),
    DequantizeOp<CPUDevice, qint8>);
REGISTER_KERNEL_BUILDER(
    Name("Dequantize").Device(DEVICE_CPU).TypeConstraint<quint16>("T"),
    DequantizeOp<CPUDevice, quint16>);
REGISTER_KERNEL_BUILDER(
    Name("Dequantize").Device(DEVICE_CPU).TypeConstraint<qint16>("T"),
    DequantizeOp<CPUDevice, qint16>);

REGISTER_KERNEL_BUILDER(
    Name("Dequantize").Device(DEVICE_CPU).TypeConstraint<qint32>("T"),
    DequantizeOp<CPUDevice, qint32>);

}  // namespace tensorflow
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

// This file contains a set of different implementations of the two-dimensional
// convolution operation. The standard TensorFlow Conv2d kernel uses EigenTensor
// to implement the computation, but this module has a variety of


not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd")),
        not(feature = "jack")
    ))]
    let host = cpal::default_host();

    let device = host
        .default_output_device()
        .expect("failed to find a default output device");
    let config = device.default_output_config().unwrap();

    match config.sample_format() {
        cpal::SampleFormat::F32 => run::<f32>(&device, &config.into()).unwrap(),
        cpal::SampleFormat::I16 => run::<i16>(&device, &config.into()).unwrap(),
        cpal::SampleFormat::U16 => run::<u16>(&device, &config.into()).unwrap(),
    }
}

fn run<T>(device: &cpal::Device, config: &cpal::StreamConfig) -> Result<(), anyhow::Error>
where
    T: cpal::Sample,
{
    let sample_rate = config.sample_rate.0 as f64;
    let channels = config.channels as usize;

    //let c = mls();
    //let c = mls() >> lowpole_hz(400.0) >> lowpole_hz(400.0);
    //let c = (mls() | dc(500.0)) >> butterpass();
    //let c = (mls() | dc(400.0) | dc(50.0)) >> resonator();
    //let c = (((mls() | dc(800.0) | dc(50.0)) >> resonator()) | dc(800.0) | dc(50.0)) >> resonator();
    //let c = (mls() | dc((200.0, 10.0))) >> resonator() & (mls() | dc((400.0, 20.0))) >> resonator() & (mls() | dc((800.0, 30.0))) >> resonator();
    //let c = pink();
    //let f = 110.0;
    //let m = 5.0;
    //let c = sine_hz(f) * f * m + f >> sine();
    //let c = c >> feedback(butterpass_hz(1000.0) >> delay(1.0) * 0.9);

    // <NAME>.
    /*let c = stack::<U20, _, _>(|i| {
            lfo(move |t| {
                let f = lerp(-0.5, 0.5, rnd(i))
                    + xerp(20.0, 20480.0, (t * 0.1 + i as f64 * 0.5) % 10.0 / 10.0);
                let a = smooth3(sin_hz(0.05, (t * 0.1 + i as f64 * 0.5) % 10.0));
                (a, f)
            }) >> pass() * sine() * 10.0
        }) >> multijoin::<U1, U20>()
            >> pinkpass();
    */
    // Pulse wave.
    let c = lfo(|t| {
        let pitch = 110.0;
        let duty = lerp11(0.01, 0.99, sin_hz(0.05, t));
        (pitch, duty)
    }) >> pulse();
    //let c = dc(110.0) >> triangle();
    //let c = lfo(|t| xerp11(20.0, 2000.0, sin_hz(0.1, t))) >> square() >> lowpole_hz(1000.0);
    //let c = dc(110.0) >> square();

    //let c = c
    //    >> (pass() | envelope(|t| xerp(1000.0, 20000.0, sin_hz(0.0666, t))) | dc(10.0))
    //    >> bandpass();

    // Test ease_noise.
    //let c = lfo(|t| xerp11(50.0, 5000.0, ease_noise(uparc, 0, t))) >> triangle();

    // Waveshapers.
    //let c = c >> shape_fn(steps(10.0, sigmoid(0.5)));
    //let c = c >> shape_fn(|x| tanh(x * 10.0));

    let mut c = c
        >


age_config.json',
      JsonEncoder.withIndent('  ').convert(
        {
          'configVersion': 2,
          'generator': 'utils.dart',
          'packages': [
            {
              'name': name,
              'rootUri': '../',
              'packageUri': 'lib/',
              'languageVersion': '3.2',
            },
          ],
        },
      ),
    );
    file(
      '.dart_tool/package_graph.json',
      JsonEncoder.withIndent('  ').convert({
        'roots': [name],
        'packages': [
          {
            'name': name,
            'version': '1.0.0',
            'dependencies': [],
            'devDependencies': []
          },
        ],
        'configVersion': 1
      }),
    );
    if (analysisOptions != null) {
      file('analysis_options.yaml', analysisOptions);
    }
    if (mainSrc != null) {
      file(relativeFilePath, mainSrc);
    }
  }

  void file(String name, String contents) {
    var file = File(path.join(dir.path, name));
    file.parent.createSync(recursive: true);
    file.writeAsStringSync(contents);
  }

  void deleteFile(String name) {
    var file = File(path.join(dir.path, name));
    assert(file.existsSync());
    file.deleteSync();
  }

  Future<void> dispose() async {
    _process?.kill();
    await _process?.exitCode;
    _process = null;
    await deleteDirectory(root);
  }

  Future<void> kill() async {
    _process?.kill();
    _process = null;
  }

  Future<ProcessResult> runAnalyze(
    List<String> arguments, {
    String? workingDir,
  }) async {
    return run(['analyze', '--suppress-analytics', ...arguments]);
  }

  Future<ProcessResult> runFix(
    List<String> arguments, {
    String? workingDir,
  }) async {
    return run(['fix', '--suppress-analytics', ...arguments]);
  }

  Future<ProcessResult> run(
    List<String> arguments, {
    String? workingDir,
  }) async {
    final process = await start(arguments, workingDir: workingDir);
    final stdoutContents = process.stdout.transform(utf8.decoder).join();
    final stderrContents = process.stderr.transform(utf8.decoder).join();
    final code = await process.exitCode;
    return ProcessResult(
      process.pid,
      code,
      await stdoutContents,
      await stderrContents,
    );
  }

  Future<Process> start(
    List<String> arguments, {
    String? workingDir,
  }) {
    return Process.start(
        Platform.resolvedExecutable,
        [
          ...arguments,
        ],
        workingDirectory: workingDir ?? dir.path,
        environment: {
          'PUB_CACHE': pubCachePath,
        })
      ..then((p) => _process = p);
  }

  Future<void> runWithVmService(
    List<String> arguments,
    void Function(String) onStdout, {
    String? workingDir,
  }) async {
    final process = await start(arguments, workingDir: workingDir);
    final completer = Completer<void>();
    late StreamSubscription<String> sub;
    late StreamSubscription<String> subError;

    void onData(event) {
      print('stdout: $event');
      onStdout(event);
    }

    void onStderr(event) async {
      print('stderr: $event');
      await subError.cancel();
      await sub.cancel();
      completer.complete();
      fail('stderr is expected to be empty');
    }

    void onError(error) async {
      kill();
      await subError.cancel();
      await sub.cancel();
      completer.complete();
    }


namespace BossMod.Dawntrail.Alliance.A14ShadowLord;

class UmbraSmash(BossModule module) : Components.Exaflare(module, new AOEShapeRect(5, 30))
{
    public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
    {
        // use only imminent aoes for hints
        foreach (var (c, t, r) in ImminentAOEs())
            hints.AddForbiddenZone(Shape, c, r, t);
    }

    public override void OnCastStarted(Actor caster, ActorCastInfo spell)
    {
        if ((AID)spell.Action.ID is AID.UmbraSmashAOE1 or AID.UmbraSmashAOE2 or AID.UmbraSmashAOE3 or AID.UmbraSmashAOE4 or AID.UmbraSmashAOEClone)
        {
            var dir = spell.Rotation.ToDirection();
            var origin = caster.Position + 30 * dir;
            Lines.Add(new() { Next = origin, Advance = 5 * dir.OrthoL(), Rotation = spell.Rotation + 90.Degrees(), NextExplosion = Module.CastFinishAt(spell), TimeToMove = 2.3f, ExplosionsLeft = 6, MaxShownExplosions = 2 });
            Lines.Add(new() { Next = origin, Advance = 5 * dir.OrthoR(), Rotation = spell.Rotation - 90.Degrees(), NextExplosion = Module.CastFinishAt(spell), TimeToMove = 2.3f, ExplosionsLeft = 6, MaxShownExplosions = 2 });
        }
    }

    public override void OnCastFinishe


}

func (keycloakClient *KeycloakClient) NewLdapCustomMapper(ctx context.Context, ldapCustomMapper *LdapCustomMapper) error {
	_, location, err := keycloakClient.post(ctx, fmt.Sprintf("/realms/%s/components", ldapCustomMapper.RealmId), convertFromLdapCustomMapperToComponent(ldapCustomMapper))
	if err != nil {
		return err
	}

	ldapCustomMapper.Id = getIdFromLocationHeader(location)

	return nil
}

func (keycloakClient *KeycloakClient) GetLdapCustomMapper(ctx context.Context, realmId, id string) (*LdapCustomMapper, error) {
	var component *component

	err := keycloakClient.get(ctx, fmt.Sprintf("/realms/%s/components/%s", realmId, id), &component, nil)
	if err != nil {
		return nil, err
	}

	return convertFromComponentToLdapCustomMapper(component, realmId)
}

func (keycloakClient *KeycloakClient) UpdateLdapCustomMapper(ctx context.Context, ldapCustomMapper *LdapCustomMapper) error {
	return keycloakClient.put(ctx, fmt.Sprintf("/realms/%s/components/%s", ldapCustomMapper.RealmId, ldapCustomMapper.Id), convertFromLdapCustomMapperToComponent(ldapCustomMapper))
}

func (keycloakClient *KeycloakClient) DeleteLdapCustomMapper(ctx context.Context, realmId, id string) error {
	return keycloakClient.DeleteComponent(ctx, realmId, id)
}
package provider

import (
	"fmt"
	"testing"

	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
	"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
	"github.com/keycloak/terraform-provider-keycloak/keycloak"
)

func TestAccKeycloakGenericRoleMapper_basic(t *testing.T) {
	t.Parallel()

	parentClientName := acctest.RandomWithPrefix("tf-acc")
	parentRoleName := acctest.RandomWithPrefix("tf-acc")
	childClientName := acctest.RandomWithPrefix("tf-acc")

	resource.Test(t, resource.TestCase{
		ProviderFactories: testAccProviderFactories,
		PreCheck:          func() { testAccPreCheck(t) },
		Steps: []resource.TestStep{
			{
				Config: testKeycloakGenericRoleMapper_basic(parentClientName, parentRoleName, childClientName),
				Check:  testAccCheckKeycloakGenericRoleMapperExists("keycloak_generic_role_mapper.child-client-with-parent-client-role"),
			},
		},
	})
}

func TestAccKeycloakGenericRoleMapper_createAfterManualDestroy(t *testing.T) {
	t.Parallel()

	var role = &keycloak.Role{}
	var childClient = &keycloak.GenericClient{}

	parentClientName := acctest.RandomWithPrefix("tf-acc")
	parentRoleName := acctest.RandomWithPrefix("tf-acc")
	childClientName := acctest.RandomWithPrefix("tf-acc")

	resource.Test(t, resource.TestCase{
		ProviderFactories: testAccProviderFactories,
		PreCheck:          func() { testAccPreCheck(t) },
		Steps: []resource.TestStep{
			{
				Config: testKeycloakGenericRoleMapper_basic(parentClientName, parentRoleName, childClientName),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckKeycloakGenericRoleMapperExists("keycloak_generic_role_mapper.child-client-with-parent-client-role"),
					testAccCheckKeycloakRoleFetch("keycloak_role.parent-role", role),
					testAccCheckKeycloakGenericCli


SBHS_SR             (*(__I  uint32_t*)0x40038804U) /**< \brief (USBHS) General Status Register */
  #define REG_USBHS_SCR            (*(__O  uint32_t*)0x40038808U) /**< \brief (USBHS) General Status Clear Register */
  #define REG_USBHS_SFR            (*(__O  uint32_t*)0x4003880CU) /**< \brief (USBHS) General Status Set Register */
  #define REG_USBHS_TSTA1          (*(__IO uint32_t*)0x40038810U) /**< \brief (USBHS) General Test A1 Register */
  #define REG_USBHS_TSTA2          (*(__IO uint32_t*)0x40038814U) /**< \brief (USBHS) General Test A2 Register */
  #define REG_USBHS_VERSION        (*(__I  uint32_t*)0x40038818U) /**< \brief (USBHS) General Version Register */
  #define REG_USBHS_FSM            (*(__I  uint32_t*)0x4003882CU) /**< \brief (USBHS) General Finite State Machine Register */
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#endif /* _SAME70_USBHS_INSTANCE_ */


cfg.pushinfo ? cmd : NULL, cfg.failmode);
        if (code == DUO_FAIL) {
            duo_log(LOG_WARNING, "Failed Duo login",
                pw->pw_name, host, duo_geterr(duo));
            if ((flags & DUO_FLAG_SYNC) == 0) {
                pam_info(pamh, "%s", "");
            }
            /* Keep going */
            continue;
        }
        /* Terminal conditions */
        if (code == DUO_OK) {
            if ((p = duo_geterr(duo)) != NULL) {
                duo_log(LOG_WARNING, "Skipped Duo login",
                    user, host, p);
            } else {
                duo_log(LOG_INFO, "Successful Duo login",
                    user, host, NULL);
            }
            pam_err = PAM_SUCCESS;
        } else if (code == DUO_ABORT) {
            duo_log(LOG_WARNING, "Aborted Duo login",
                user, host, duo_geterr(duo));
            pam_err = PAM_ABORT;
        } else if (code == DUO_FAIL_SAFE_ALLOW) {
            duo_log(LOG_WARNING, "Failsafe Duo login",
                user, host, duo_geterr(duo));
            pam_err = PAM_SUCCESS;
        } else if (code == DUO_FAIL_SECURE_DENY) {
            duo_log(LOG_WARNING, "Failsecure Duo login",
                user, host, duo_geterr(duo));
            pam_err = PAM_SERVICE_ERR;
        } else {
            duo_log(LOG_ERR, "Error in Duo login",
                user, host, duo_geterr(duo));
            pam_err = PAM_SERVICE_ERR;
        }
        break;
    }

    if (i == cfg.prompts) {
        pam_err = PAM_MAXTRIES;
    }

    duo_close(duo);
    close_config(&cfg);

    return (pam_err);
}

PAM_EXTERN int
pam_sm_setcred(pam_handle_t *pamh, int flags,
    int argc, const char *argv[])
{
    return (PAM_SUCCESS);
}

PAM_EXTERN int
pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
    int argc, const char *argv[])
{
    return (PAM_SUCCESS);
}

PAM_EXTERN int
pam_sm_open_session(pam_handle_t *pamh, int flags,
    int argc, const char *argv[])
{
    return (PAM_SUCCESS);
}

PAM_EXTERN int
pam_sm_close_session(pam_handle_t *pamh, int flags,
    int argc, const char *argv[])
{
    return (PAM_SUCCESS);
}

PAM_EXTERN int
pam_sm_chauthtok(pam_handle_t *pamh, int flags,
    int argc, const char *argv[])
{
    return (PAM_SERVICE_ERR);
}

#ifdef PAM_MODULE_ENTRY
PAM_MODULE_ENTRY("pam_duo");
#endif


  ],
  // propertyNames, propertyValues, properties and types collections are the same
}
```

So, for each node, if GRIFFEL_bim_data extension has `properties` or `type` - look for them in the same gltf json file. If the extension states `bufferView` - look for the data in the separate .meta file by the url from the buffer.
Nodes can have both embedded and separately stored properties, in that case any or both can be used. Exporters should take care of possible data duplication. Though, cross references between embedded and external data are not allowed. Importers should treat embedded values as of higher priority than values, stored in a separate file, as the file may be obsolete or corrupted more likely. If separately stored data references same node many times specifying new or additional properties for it, it is up to Importer: ignore duplicates or apply them all.

## glTF Schema Updates

### JSON Schema Root

[glTF.GRIFFEL_bim_data.schema.json](schema/glTF.GRIFFEL_bim_data.schema.json)

### JSON Schema Node

[node.GRIFFEL_bim_data.schema.json](schema/node.GRIFFEL_bim_data.schema.json)

## Standalone JSON Schema

[GRIFFEL_bim_data.schema.json](schema/GRIFFEL_bim_data.schema.json)

## Known Implementations

* [glTF Exporter](https://apps.autodesk.com/RVT/en/Detail/Index?id=8451869436709222290) - add-in for Autodesk Revit

## Resources

* [MessagePack](https://msgpack.org/) - binary serialization format
* [Griffel Studio Blog](https://griffelstudio.com/blog/) - information about extension
# MPEG_accessor_timed

## Contributors

* ISO/IEC SC29 WG3 (MPEG Systems) - Scene Description Breakout Group
* Contacts
  * Thomas Stockhammer (MPEG-I Scene Description BoG Chair, tsto@qti.qualcomm.com)

## Status

Based on [ISO/IEC FDIS 23090-14](https://www.iso.org/standard/80900.html)

## Dependencies

Written against the glTF 2.0 spec.

## Overview

An `accessor` in glTF defines the types and layout of the data as stored in a buffer that is viewed through a `bufferView`. When timed data is read from a buffer, the data in the buffer could change dynamically with time.

A scene that contains timed media and/or metadata shall utilize the timed accessor extension to describe access to the dynamically changing data. The `MPEG_accessor_timed` is an extension to regular accessors to indicate that the underlying data buffer is dynamic. Note that a timed `accessor` has two `bufferViews`, one inherited from the containing `accessor` and a second in the `MPEG_accessor_timed` extension. The former shall be used to reference the timed media data. The latter may be used to point to a dynamic buffer header, which may or may not be present. When present, both `bufferViews` shall point into the same circular buffer.

The `accessor.bufferView` field, in an `accessor` that has the `MPEG_accessor_timed` extension, as well as the timed accessor information header fields apply to the data of each frame within the circular buffer.

The timed accessor extension is identified by `MPEG_accessor_timed`.

## glTF Schema Updates

glTF extension to specify timed accessor format formats

**`MPEG_accessor_timed` Properties**

|   |Type|Description|Required|
|---|---|---|---|
|**immutable**|`boolean`|This flag indicates if the accessor information may change over time|No, default: `true`|
|**bufferView**|`integer`|This property provides the index in the `bufferViews` array to a `bufferView` element that points to the timed accessor information header. |No|
|**suggestedUpdateRate**|`number`|This property provides the frequency at which the renderer is recommended to poll the underlying buffer for new data.|No, default: `25`|
|**extensions**|


1"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="icon" href="favicon.ico">
<link rel="icon" href="img/bear.png" type="image/png">
<link rel="apple-touch-icon" href="img/bear.png">
<meta property="og:type" content="article"/>
<meta property="og:url" content="https://libmdbx.dqdkfa.ru/"/>
<meta name="twitter:title" content="One of the fastest embeddable key-value engine"/>
<meta name="twitter:description" content="MDBX surpasses the legendary LMDB in terms of reliability, features and performance. For now libmdbx is chosen by all modern Ethereum frontiers as a storage engine."/>
<title>$projectname: $title</title>
<title>$title</title>

<link rel="icon" href="$relpath^$projecticon" type="image/x-icon" />

<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>

$treeview
$search
$mathjax
$darkmode
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet

$projectname $projectnumber

$projectbrief

$projectbrief

    $searchbox

$searchbox


     NS_ConvertUTF16toUTF8(dwriteVers).get()));
  }

  elapsedTime = (t5.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart;
  Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_TOTAL,
                        elapsedTime);
  Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_COUNT,
                        mSystemFonts->GetFontFamilyCount());
  LOG_FONTINIT((
      "(fontinit) Total time in InitFontList:    %9.3f ms (families: %d, %s)\n",
      elapsedTime, mSystemFonts->GetFontFamilyCount(),
      (mGDIFontTableAccess ? "gdi table access" : "dwrite table access")));

  elapsedTime = (t2.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart;
  LOG_FONTINIT(
      ("(fontinit)  --- base/interop obj initialization init: %9.3f ms\n",
       elapsedTime));

  elapsedTime = (t3.QuadPart - t2.QuadPart) * 1000.0 / frequency.QuadPart;
  Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_COLLECT,
                        elapsedTime);
  LOG_FONTINIT(
      ("(fontinit)  --- GetSystemFontCollection:  %9.3f ms\n", elapsedTime));

  elapsedTime = (t4.QuadPart - t3.QuadPart) * 1000.0 / frequency.QuadPart;
  LOG_FONTINIT(
      ("(fontinit)  --- iterate over families:    %9.3f ms\n", elapsedTime));

  elapsedTime = (t5.QuadPart - t4.QuadPart) * 1000.0 / frequency.QuadPart;
  LOG_FONTINIT(
      ("(fontinit)  --- misc initialization:    %9.3f ms\n", elapsedTime));

  return NS_OK;
}

void gfxDWriteFontList::GetFontsFromCollection(
    IDWriteFontCollection* aCollection) {
  for (UINT32 i = 0; i < aCollection->GetFontFamilyCount(); i++) {
    RefPtr<IDWriteFontFamily> family;
    aCollection->GetFontFamily(i, getter_AddRefs(family));

    RefPtr<IDWriteLocalizedStrings> names;
    HRESULT hr = family->GetFamilyNames(getter_AddRefs(names));
    if (FAILED(hr)) {
      continue;
    }

    nsAutoCString name;
    if (!GetEnglishOrFirstName(name, names)) {
      continue;
    }
    nsAutoCString familyName(
        name);  // keep a copy before we lowercase it as a key

    BuildKeyNameFromFontName(name);

    RefPtr<gfxFontFamily> fam;

    if (mFontFamilies.GetWeak(name)) {
      continue;
    }

    FontVisibility visibility = aCollection == mSystemFonts
                                    ? GetVisibilityForFamily(familyName)
                                    : FontVisibility::Base;

    fam = new gfxDWriteFontFamily(familyName, visibility, family,
                                  aCollection == mSystemFonts);
    if (!fam) {
      continue;
    }

    if (mBadUnderlineFamilyNames.ContainsSorted(name)) {
      fam->SetBadUnderlineFamily();
    }
    mFontFamilies.Put(name, RefPtr{fam});

    // now add other family name localizations, if present
    uint32_t nameCount = names->GetCount();
    uint32_t nameIndex;

    if (nameCount > 1) {
      UINT32 englishIdx = 0;
      BOOL exists;
      // if this fails/doesn't exist, we'll have used name index 0,
      // so that's the one we'll want to skip here
      names->FindLocaleName(L"en-us", &englishIdx, &exists);


MCacheType, setting.IsReleaseBGMCache);

    ChangeBaseVolume(setting.BGMBaseVolume);
    if (!setting.IsDestroyBGMManager) {
      DontDestroyOnLoad(gameObject);
    }
  }

  //=================================================================================
  //再生
  //=================================================================================

  /// <summary>
  /// 再生
  /// </summary>
  public void Play(AudioClip audioClip, float volumeRate = 1, float delay = 0, float pitch = 1, bool isLoop = true, bool allowsDuplicate = false) {
    //重複が許可されてない場合は、既に再生しているものを止める
    if (!allowsDuplicate) {
      Stop();
    }
    RunPlayer(audioClip, volumeRate, delay, pitch, isLoop);
  }

  /// <summary>
  /// 再生
  /// </summary>
  public void Play(string audioPath, float volumeRate = 1, float delay = 0, float pitch = 1, bool isLoop = true, bool allowsDuplicate = false) {
    //重複が許可されてない場合は、既に再生しているものを止める
    if (!allowsDuplicate) {
      Stop();
    }
    RunPlayer(audioPath, volumeRate, delay, pitch, isLoop);
  }

}
}


/*-
 * Copyright (c) 2006,2008,2011 Joseph Koshy
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <libelf.h>

#include "_libelf.h"

ELFTC_VCSID("$Id: elf_errno.c 3174 2015-03-27 17:13:41Z emaste $");

int
elf_errno(void)
{
	int old;

	old = LIBELF_PRIVATE(error);
	LIBELF_PRIVATE(error) = 0;
	return (old & LIBELF_ELF_ERROR_MASK);
}


     printf(" NULL,", nulls);
      nulls++;
    }
  }
  printf("\n  };\n");
}

int main(void)
{
  int i;
  int try;
  int besttry = 9999;
  int bestadd = 0;
  int bestshift = 0;
  int add;
  int shift;
  for(shift = 0; shift < 8; shift++) {
    for(add = 0; add < 999; add++) {
      for(i = 0; scheme[i].n; ++i) {
        unsigned int v = calc(scheme[i].n, add, shift);
        int j;
        int badcombo = 0;
        for(j=0; j < i; j++) {

          if(num[j] == v) {
            /*
            printf("NOPE: %u is a dupe (%s and %s)\n",
                   v, scheme[i], scheme[j]);
            */
            badcombo = 1;
            break;
          }
        }
        if(badcombo)
          break;
        num[i] = v;
      }
#if 0
      for(i = 0; scheme[i].n; ++i) {
        printf("%u - %s\n", num[i], scheme[i].n);
      }
#endif
      /* try different remainders to find smallest possible table */
      for(try = 28; try < 199; try++) {
        int good = 1;
        for(i = 0; scheme[i].n; ++i) {
          ix[i] = num[i] % try;
        }
        /* check for dupes */
        for(i = 0; scheme[i].n && good; ++i) {
          int j;
          for(j=0; j < i; j++) {
            if(ix[j] == ix[i]) {
              /* printf("NOPE, try %u causes dupes (%d and %d)\n", try, j, i); */
              good = 0;
              break;
            }
          }
        }
        if(good) {
          if(try < besttry) {
            besttry = try;
            bestadd = add;
            bestshift = shift;
          }
          break;
        }
      }
    }
  }

  showtable(besttry, bestadd, bestshift);
}


role='menuitemradio'][aria-checked='true']::before{background:rgba(var(--ejs-primary-color),1)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio'][aria-checked='true']::after{opacity:1;transform:translateY(-50%) scale(1)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio'].ejs--a83b6c705e103e81a7762d0ed5e64b::before,.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio']:hover::before{background:rgba(0,0,0,0.1)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--f91e90fe7cabc875aff9a431bf5389{align-items:center;display:flex;margin-left:auto;margin-right:-5px;overflow:hidden;padding-left:25px;pointer-events:none}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']{-webkit-appearance:none;background:transparent;border:0;border-radius:28px;color:rgba(var(--ejs-primary-color),1);display:block;height:20px;margin:0;padding:0;transition:box-shadow .3s ease;width:100%}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:3px;height:6px;transition:box-shadow .3s ease;user-select:none;background-image:linear-gradient(to right,currentColor var(--value,0),transparent var(--value,0))}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-webkit-slider-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2);height:14px;position:relative;transition:all .2s ease;width:14px;-webkit-appearance:none;margin-top:-4px}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-moz-range-track{background:transparent;border:0;border-radius:3px;height:6px;transition:box-shadow .3s ease;user-select:none}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-moz-range-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2);height:14px;position:relative;transition:all .2s ease;width:14px}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-moz-range-progress{background:currentColor;border-radius:3px;height:6px}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-ms-track


         )
        };
        assert_eq!(address, page_address);
        page_address = (address as usize + page::size()) as *mut _;
      }

      AllocatedPages(allocation_base as *const _, total_size)
    }
  }
}
use std::io::{BufRead};
use std::io;

fn main() {
    let stdin = io::stdin();
    let mut iter_line = stdin.lock().lines();
    let number = iter_line
        .next()
        .unwrap()
        .expect("failed to read first line")
        .parse::<usize>().unwrap();
    let mut tree:Vec<usize>=Vec::new();
    for i in 1..=number {
        tree
            .push(i);
    }
    let mut flag:bool = false;
    let mut elt:usize;
    let mut tree1:Vec<usize>=Vec::new();
    loop {
        if tree.len() == 1{
            print!("{:?} ",&tree[0]);
            break();

        }
        let size = tree.len();
        let rest = size % 2;
        if rest != 0  {
            tree1.push(tree.pop().unwrap())
        }
        let mut iter = tree.iter();
        for _i in 0..(size - rest) {
            elt = *iter.next().unwrap();
            if flag == true {
                print!("{:?} ",elt);
                flag = false;
            } else {
                tree1.push(elt);
                flag=true;
            }
        }
        if tree1.len() == 0 {
            break;
        }
        tree=tree1;
        tree1=vec![];
    }
}
<filename>rpc/src/transport/channel.rs
// Copyright 2018 Google LLC
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

//! Transports backed by in-memory channels.

use crate::{PollIo, Transport};
use futures::{channel::mpsc, task::Context, Poll, Sink, Stream};
use pin_utils::unsafe_pinned;
use std::pin::Pin;
use std::{
    io,
    net::{IpAddr, Ipv4Addr, SocketAddr},
};

/// Returns two unbounded channel peers. Each [`Stream`] yields items sent through the other's
/// [`Sink`].
pub fn unbounded<SinkItem, Item>() -> (
    UnboundedChannel<SinkItem, Item>,
    UnboundedChannel<Item, SinkItem>,
) {
    let (tx1, rx2) = mpsc::unbounded();
    let (tx2, rx1) = mpsc::unbounded();
    (
        UnboundedChannel { tx: tx1, rx: rx1 },
        UnboundedChannel { tx: tx2, rx: rx2 },
    )
}

/// A bi-directional channel backed by an [`UnboundedSender`](mpsc::UnboundedSender)
/// and [`UnboundedReceiver`](mpsc::UnboundedReceiver).
#[derive(Debug)]
pub struct UnboundedChannel<Item, SinkItem> {
    rx: mpsc::UnboundedReceiver<Item>,
    tx: mpsc::UnboundedSender<SinkItem>,
}

impl<Item, SinkItem> UnboundedChannel<Item, SinkItem> {
    unsafe_pinned!(rx: mpsc::UnboundedReceiver<Item>);
    unsafe_pinned!(tx: mpsc::UnboundedSender<SinkItem>);
}

impl<Item, SinkItem> Stream for UnboundedChannel<Item, SinkItem> {
    type Item = Result<Item, io::Error>;

    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> PollIo<Item> {
        self.rx().poll_next(cx).map(|option| option.map(Ok))
    }
}

impl<Item, SinkItem> Sink<SinkItem> for UnboundedChannel<Item, SinkItem> {
    type SinkError = io::Error;

    fn poll


PathParams).query(queryParams).set(headerParams);
        return req;
    }

    /**
    *
    *
    */
    public spellCheckPost(queryParams: SpellCheckPostQueryParameters, headerParams: SpellCheckPostHeaderParameters) {
        const queryParamsMapped = {} as Params;
        const headerParamsMapped = {} as Params;
        const pathParamsMapped = {} as Params;
        Object.assign(queryParamsMapped, convertParamsToRealParams(queryParams as any as Params, SpellCheckPostQueryParametersNameMap));
        Object.assign(headerParamsMapped, convertParamsToRealParams(headerParams as any as Params, SpellCheckPostHeaderParametersNameMap));
        return this.makeRequest('/', 'post', queryParamsMapped, headerParamsMapped, pathParamsMapped) as Request<SpellCheckPostResult>;
    }
    /**
    *
    *
    */
    public spellCheckGet(queryParams: SpellCheckGetQueryParameters, headerParams: SpellCheckGetHeaderParameters) {
        const queryParamsMapped = {} as Params;
        const headerParamsMapped = {} as Params;
        const pathParamsMapped = {} as Params;
        Object.assign(queryParamsMapped, convertParamsToRealParams(queryParams as any as Params, SpellCheckGetQueryParametersNameMap));
        Object.assign(headerParamsMapped, convertParamsToRealParams(headerParams as any as Params, SpellCheckGetHeaderParametersNameMap));
        return this.makeRequest('/', 'get', queryParamsMapped, headerParamsMapped, pathParamsMapped) as Request<SpellCheckGetResult>;
    }
}/// <reference path="Type.ts" />
/// <reference path="Component.ts" />

module Game {
    export module Components {
        export class Lifetime extends Component {
            LifetimeInSeconds: number;

            constructor(lifetimeInSeconds: number) {
                super(Game.Components.Type.Lifetime);

                this.LifetimeInSeconds = lifetimeInSeconds;
            }

            OnWindowSizeChanged(oldScalingFactor: number, newScalingFactor: number) {
            }
        }
    }
}
interface IPlaylist {
    id: number
    name: string
    imgURL: string
}
export interface ISongs {
    songsId: number
    songsName: string
    imgUrl: string
}
// 播放列表容器的类
export class PlayList implements IPlaylist {
    id: number
    name: string
    imgURL: string
    constructor(songs: ISongs) {
        this.id = songs.songsId
        this.name = songs.songsName
        this.imgURL = songs.imgUrl
    }
}

// 当有播放列表时，需要设置一个marginBottom，没有播放列表时去除marginBottom
export function playerSetMarginBottom() {
    (<any>document.querySelector('#app')).children[1] ? (<any>document.querySelector('#app')).children[1].style.marginBottom = '50px' : false
}
export function playerRemoveMarginBottom() {
    (<any>document.querySelector('#app')).children[1] ? (<any>document.querySelector('#app')).children[1].style.marginBottom = '0px' : false
}import { ConflictException, InternalServerErrorException, NotFoundException } from "@nestjs/common";
import { EntityRepository, Long, Repository } from "typeorm";
import { UserSignUpDto } from "./dto/user-signUp.dto";
import { User } from "./user.entity";
import * as bcrypt from "bcrypt";
import { UserCredentialsDto } from "./dto/user-credentials.dto";
import { UserConsultDto } from "./dto/user-consult.dto";

@EntityRepository(User)
export class UserRepository extends Repository<User> {

    async signUp(userSignUpDto: UserSignUpDto): Promise<User> {
        const newUser = await this.userMapper(userSignUpDto);
        try {
            await newUser.save();
        }


X509Certificate2Collection _clientCertificates = new X509Certificate2Collection();
        public X509Certificate2Collection ClientCertificates => _clientCertificates;

        public AgentClientCertificateManager()
        {
        }

        public AgentClientCertificateManager(string clientCertificateArchiveFile, string clientCertificatePassword)
        {
            AddClientCertificate(clientCertificateArchiveFile, clientCertificatePassword);
        }

        public void AddClientCertificate(string clientCertificateArchiveFile, string clientCertificatePassword)
        {
            if (!string.IsNullOrEmpty(clientCertificateArchiveFile))
            {
                _clientCertificates.Add(new X509Certificate2(clientCertificateArchiveFile, clientCertificatePassword));
            }
        }
    }
}


 some = 0;
                for (let i = 1; i < input.length; i++) {
                    input[i].some((tmp) => {
                        return tmp == item;
                    }) && some++;
                }
                some == input.length - 1 && res.push(item);
            });
            return res;
        }
    }

    /**
     * 2个数组取交集 指针法
     */
    static arrayIntersectionBy2(input1: Array<any>, input2: Array<any>): any[] {
        let res = new Set();
        let p = 0,
            q = 0;
        input1 = input1.sort();
        input2 = input2.sort();
        while (p < input1.length && q < input2.length) {
            if (input1[p] < input2[q]) {
                p++;
            } else if (input2[q] < input1[p]) {
                q++;
            } else {
                res.add(input1[p]);
                p++;
                q++;
            }
        }
        return Array.from(res);
    }

    /**
     * 2个数组取补集
     */
    static arrayComplementBy2(input1: any[], input2: any[]): any[] {
        return input1
            .filter((e) => {
                return !(input2.indexOf(e) > -1);
            })
            .concat(
                input2.filter((e) => {
                    return !(input1.indexOf(e) > -1);
                })
            );
    }

    /**
     *  平级数组
     * @param input
     */
    static arrayFlatten(input: Array<any>): any[] {
        const stack = [...input];
        const res: any = [];
        while (stack.length) {
            const next = stack.pop();
            if (Array.isArray(next)) {
                stack.push(...next);
            } else {
                res.push(next);
            }
        }
        return res.reverse();
    }

    /***************************************************************************************************************************************************** */
    static regGetString(input: string): string {
        let fbsArr = ["\\", "$", "^", "?", "+", "*", ".", "(", ")", "{", "}", "[", "]", "|", "/"];
        let tmp = "";
        for (let i = 0; i < input.length; i++) {
            tmp += fbsArr.includes(input[i]) ? `\\${input[i]}` : input[i];
        }
        return tmp;
    }
}
export class Program {
  id: string
  name: string | null
  source: string | null
  updatedAt: Date

  constructor(
    id: string,
    name: string | null,
    source: string | null,
    updatedAt: Date
  ) {
    this.id = id
    this.name = name
    this.source = source
    this.updatedAt = updatedAt
  }
}

export class ProgramCollection {
  programs: Program[]

  constructor(programs: Program[]) {
    this.programs = programs
  }

  isSameNameProgramExist(name: string): boolean {
    return this.programs.some((p) => p.name === name)
  }
}
import { Component, OnInit, EventEmitter, Output } from '@angular/core';
import { LightSwitchService } from "app/light-switch.service";

@Component({
  selector: 'app-switch',
  templateUrl: './switch.component.html',
  styleUrls: ['./switch.component.css']
})

export class SwitchComponent implements OnInit {
  @Output() toggleSwitch = new EventEmitter<boolean>();
  isOn:boolean;
  name:string;
  constructor(private lightSwitchService:LightSwitchService) {
    this.isOn = false;
    this.name = lightSwitchService.name;
  }

  ngOnInit() {

    // example of Observable Change value
    this.lightSwitchService.isOn.subscribe(
      (result) => {
        this.isOn = result;
      },
      (error) => {
        console.log(error);
      }
    );
  }
  toggleSwitchLocal(){
    this.isOn = !this.isOn;
    // example of @Output() decorator
    this.toggleSwitch.emit(t


//
//  IIdentify.cs
//
//  Author:
//       Jarl Gullberg <jarl.gullberg@gmail.com>
//
//  Copyright (c) Jarl Gullberg
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//

using JetBrains.Annotations;
using Remora.Rest.Core;

namespace Remora.Discord.API.Abstractions.Gateway.Commands;

/// <summary>
/// Represents an identification command sent to the Discord gateway.
/// </summary>
[PublicAPI]
public interface IIdentify : IGatewayCommand
{
    /// <summary>
    /// Gets the authentication token.