            }

            return TileTick.FromTreeSafe(te);
        }

        public void SetTileTick (int x, int y, int z, TileTick te)
        {
            if (te.ID != _blocks[x, y, z]) {
                throw new ArgumentException("The TileTick type is not valid for this block.", "te");
            }

            BlockKey key = (TranslateCoordinates != null)
                ? TranslateCoordinates(x, y, z)
                : new BlockKey(x, y, z);

            TagNodeCompound oldte;

            if (_tileTickTable.TryGetValue(key, out oldte)) {
                _tileTicks.Remove(oldte);
            }

            te.X = key.x;
            te.Y = key.y;
            te.Z = key.z;

            TagNodeCompound tree = te.BuildTree() as TagNodeCompound;

            _tileTicks.Add(tree);
            _tileTickTable[key] = tree;
        }

        public void CreateTileTick (int x, int y, int z)
        {
            TileTick te = new TileTick()
            {
                ID = _blocks[x, y, z],
            };

            BlockKey key = (TranslateCoordinates != null)
                ? TranslateCoordinates(x, y, z)
                : new BlockKey(x, y, z);

            TagNodeCompound oldte;

            if (_tileTickTable.TryGetValue(key, out oldte)) {
                _tileTicks.Remove(oldte);
            }

            te.X = key.x;
            te.Y = key.y;
            te.Z = key.z;

            TagNodeCompound tree = te.BuildTree() as TagNodeCompound;

            _tileTicks.Add(tree);
            _tileTickTable[key] = tree;
        }

        public void ClearTileTick (int x, int y, int z)
        {
            BlockKey key = (TranslateCoordinates != null)
                ? TranslateCoordinates(x, y, z)
                : new BlockKey(x, y, z);

            TagNodeCompound te;

            if (!_tileTickTable.TryGetValue(key, out te)) {
                return;
            }

            _tileTicks.Remove(te);
            _tileTickTable.Remove(key);
        }

        private void BuildTileTickCache ()
        {
            _tileTickTable = new Dictionary<BlockKey, TagNodeCompound>();

            foreach (TagNodeCompound te in _tileTicks) {
                int tex = te["x"].ToTagInt();
                int tey = te["y"].ToTagInt();
                int tez = te["z"].ToTagInt();

                BlockKey key = new BlockKey(tex, tey, tez);
                _tileTickTable[key] = te;
            }
        }
    }
}


    }
}// object typing
// # show city of the user

type UF = "PE" | "SP" | "MG";

interface User {
  name: string;
  address?: {
    city: string;
    uf: UF;
  };
  say: () => void;
}

function showCity(user: User) {
  // user.address.uf = "SP";
  user.say = () => console.log("Hello User!");

  return user.address?.city;
}

// # object typing is also possible to pass in array or other variables
let users: User[];

// users[0].address.city # intellisense working

// # as typescript you can also work with optional properties
// # do you enter a ? before the attribute
// # as was done in the example above in function showCity

// # it is possible to leave properties locked for change, so they are just readonly
interface NewUser {
  readonly name: string;
}

let user: NewUser = {
  name: "Gabriel Maciel",
};

// user.name = "João"; # error: cannot assign to 'name' because it is a read-only property

// # working with implements and extends
interface Vehicle {
  wheels: number;
  speed: () => void;
  brake?: () => void;
}

// interface Motorcycle {
//   helmet: boolean;
//   cram: () => void;
// }

// let bross: Motorcycle
class CreateVehicle implements Vehicle {
  wheels: number;

  constructor(wheels: number) {
    this.wheels = wheels;
  }

  speed() {
    console.log("speed");
  }
}

// # pick takes the functionality of an interface to create a new type
// # omit omits the functionality of an interface to create a new type
interface Post {
  id: number;
  title: string;
  description: string;
}

// Pick && Omit
type PostPreview = Pick<Post, "id" | "title">;
type DescriptionPreview = Omit<Post, "id" | "title">;

let post: PostPreview;
let description: DescriptionPreview;
import { MessageReaction, User } from "discord.js";
import Client from "../structures/Client";

import createTicket from "./messageReaction/createTicket";
import deleteTicket from "./messageReaction/deleteTicket";

export default async function messageReactionAdd(client: Client, messageReaction: MessageReaction, user: User) {
  // Makes sure user in not a bot and that the reaction was in a guild
  if (user.bot || !messageReaction.message.guild) return;

  // Gets guild settings
  const settings = await client.getSettings(messageReaction.message.guild.id);

  // Checks if ticket system exists
  if (!settings.ticketMessageID) return;

  if (messageReaction.emoji.toString() === "📩" && messageReaction.message.id === settings.ticketMessageID) {
    createTicket.run(messageReaction, user, settings);
  } else if (messageReaction.emoji.toString() === "🔒" && settings.tickets.find(t => t.lockMessageID === messageReaction.message.id)) {
    deleteTicket.run(messageReaction, settings);
  }
}
import { ReactElement } from 'react';
import { EnzymePlugin } from 'enzyme-context-utils';
import { ReactWrapper, ShallowWrapper } from 'enzyme';
import once from 'once';
import merge from 'lodash.merge';
import { EnzymePlugins, GetOptions, GetControllers, GetContextWrapper } from './Types';

type UpdaterFns = NonNullable<ReturnType<EnzymePlugin<any, any>>['updater']>[];

type PluginReturns<P extends EnzymePlugins, O extends GetOptions<any, P>> = {
  node: ReactElement<any>;
  options: NonNullable<O>;
  controllers: GetControllers<P>;
  updaters: UpdaterFns;
};

/**
 * Call each plugin (enzyme-context plugins are functions) and aggregate each plugin'


 ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/**
 * The name of default driver.
 */
export const DEFAULT_DRIVER = 'console';

/**
 * The name of default subject.
 */
export const DEFAULT_SUBJECT = 'default';

/**
 * The names of default levels.
 */
export const DEFAULT_LEVELS: IDefaultLevels[] = [
    'error',
    'notice',
    'warning',
    'debug',
    'info'
];

/**
 * The function serializing or formating original input of logs into text form.
 *
 * @param log       The original input of log.
 * @param subject   The subject of log.
 * @param level     The level of log.
 * @param date      The datetime of log.
 * @param traces    The trace-info of log.
 */
export type IFormatter<T, TLevel extends string> = (
    log: T,
    subject: string,
    level: TLevel,
    date: Date,
    traces?: string[]
) => string;

export interface IDriver {

    /**
     * This method is provided to be called by logger, to send logs
     * to target device.
     *
     * @param text      The formatted log text.
     * @param subject   The subject of log
     * @param level     The level of log
     * @param date      The data of log
     */
    write(
        text: string,
        subject: string,
        level: string,
        date: Date
    ): void;

    /**
     * Flush all logs in the log driver buffer.
     */
    flush(): void | Promise<void>;

    /**
     * Shutdown the driver.
     *
     * This method should invoke method `flush` automatically before closing
     * driver.
     */
    close(): void | Promise<void>;
}

export interface IBaseLogger<TLevel extends string> {

    /**
     * Get the subject of current logger.
     */
    getSubject(): string;

    /**
     * Get the levels list of this logger supports.
     */
    getLevels(): TLevel[];

    /**
     * Enable or disable trace info of all levels or determined level of
     * current logger.
     *
     * @param depth Set the depth of tracing stack, by default it's 1.
     *              Set to 0 to shutdown displaying trace stack.
     * @param level Determine a level or a list of level to be disabled tracing.
     *              By default it will be all levels.
     */
    enableTrace(depth?: number, level?: TLevel | TLevel[]): this;

    /**
     * Unmute all levels or determined level of current logger.
     *
     * @param level Determine a level or a list of level to be unmuted.
     *              By default it will be all levels.
     */
    unmute(level?: TLevel | TLevel[]): this;

    /**
     * Mute all levels or determined level of current logger.
     *
     * @param level Determine a level or a list of level to be muted.
     *              By default it will be all levels.
     */
    mute(level?: TLevel | TLevel[]): this;

    /**
     * Flush the logs in driver's buffer.
     */
    flush(): void | Promise<void>;
}

/**
 * The logging methods signature.
 */
export type ILoggerMethod<T, TLevel extends string> = (log: T, date?: Date) => ILogger<T, TLevel>;

/**
 * The logging methods signature.
 *
 * @deprecated Use `ILoggerMethod` instead.
 */
export type LoggerMethod<T, TLevel extends string> = ILoggerMethod<T, TLevel>;

/**
 * The logger interface.
 */
export type ILogger<T, TLevel extends string> = IBaseLogger<TLevel> & Record<
    TLevel,
    ILoggerMethod<T, TLevel>
>;

/**
 * The default levels of loggers.
 */
export type IDefaultLevels = 'error' | 'notice' | 'warning' | 'debug' | 'info';

/**
 * The default levels of loggers.
 *
 * @deprecated Use `


.lower() && y.lower() <= x.upper()) ||
         (y.lower() <= x.lower() && x.lower() <= y.upper());
}

template<class T, class Policies> inline
bool singleton(const interval<T, Policies>& x)
{
 return !empty(x) && x.lower() == x.upper();
}

template<class T, class Policies1, class Policies2> inline
bool equal(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
{
  if (empty(x)) return empty(y);
  return !empty(y) && x.lower() == y.lower() && x.upper() == y.upper();
}

template<class T, class Policies> inline
interval<T, Policies> intersect(const interval<T, Policies>& x,
                                const interval<T, Policies>& y)
{
  BOOST_USING_STD_MIN();
  BOOST_USING_STD_MAX();
  if (interval_lib::detail::test_input(x, y))
    return interval<T, Policies>::empty();
  const T& l = max BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y.lower());
  const T& u = min BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y.upper());
  if (l <= u) return interval<T, Policies>(l, u, true);
  else        return interval<T, Policies>::empty();
}

template<class T, class Policies> inline
interval<T, Policies> hull(const interval<T, Policies>& x,
                           const interval<T, Policies>& y)
{
  BOOST_USING_STD_MIN();
  BOOST_USING_STD_MAX();
  bool bad_x = interval_lib::detail::test_input(x);
  bool bad_y = interval_lib::detail::test_input(y);
  if (bad_x)
    if (bad_y) return interval<T, Policies>::empty();
    else       return y;
  else
    if (bad_y) return x;
  return interval<T, Policies>(min BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y.lower()),
                               max BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y.upper()), true);
}

template<class T, class Policies> inline
interval<T, Policies> hull(const interval<T, Policies>& x, const T& y)
{
  BOOST_USING_STD_MIN();
  BOOST_USING_STD_MAX();
  bool bad_x = interval_lib::detail::test_input(x);
  bool bad_y = interval_lib::detail::test_input<T, Policies>(y);
  if (bad_y)
    if (bad_x) return interval<T, Policies>::empty();
    else       return x;
  else
    if (bad_x) return interval<T, Policies>(y, y, true);
  return interval<T, Policies>(min BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y),
                               max BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y), true);
}

template<class T, class Policies> inline
interval<T, Policies> hull(const T& x, const interval<T, Policies>& y)
{
  BOOST_USING_STD_MIN();
  BOOST_USING_STD_MAX();
  bool bad_x = interval_lib::detail::test_input<T, Policies>(x);
  bool bad_y = interval_lib::detail::test_input(y);
  if (bad_x)
    if (bad_y) return interval<T, Policies>::empty();
    else       return y;
  else
    if (bad_y) return interval<T, Policies>(x, x, true);
  return interval<T, Policies>(min BOOST_PREVENT_MACRO_SUBSTITUTION(x, y.lower()),
                               max BOOST_PREVENT_MACRO_SU


/*
Smooth - A C++ framework for embedded programming on top of Espressif's ESP-IDF
Copyright 2019 Per Malmberg (https://gitbub.com/PerMalmberg)

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.
*/

#pragma once

#include <driver/gpio.h>
#include "SDCard.h"
#include "MountPoint.h"
#include "smooth/core/io/spi/Master.h"

namespace smooth::core::filesystem
{
    class SPISDCard
        : public SDCard
    {
        public:
            SPISDCard(spi_host_device_t spi_host,
                      smooth::core::io::spi::SPI_DMA_Channel dma_channel,
                      gpio_num_t miso,
                      gpio_num_t mosi,
                      gpio_num_t serial_clock,
                      gpio_num_t chip_select,
                      gpio_num_t card_detect = GPIO_NUM_NC,
                      gpio_num_t write_protect = GPIO_NUM_NC,
                      int transfer_size = 0);

            bool init(const SDCardMount& mount_point, bool format_on_mount_failure, int max_file_count) override;

            bool deinit() override;

        private:
            spi_host_device_t spi_host;
            smooth::core::io::spi::SPI_DMA_Channel dma_chl;
            gpio_num_t miso;
            gpio_num_t mosi;
            gpio_num_t serial_clock;
            gpio_num_t chip_select;
            gpio_num_t card_detect;
            gpio_num_t write_protect;
            int transfer_size;
    };
}


th = 32f
            ) {
                moveTo(-0.01f, 234.26f)
                lineToRelative(90.32f, 0.41f)
            }
            path(
                fill = SolidColor(Color(0xFFD8D8D8)),
                stroke = SolidColor(Color(0xFF000000)),
                strokeLineWidth = 32f
            ) {
                moveTo(-1.39f, 462.02f)
                lineToRelative(90.32f, 0.41f)
            }
            path(
                fill = SolidColor(Color(0xFFD8D8D8)),
                stroke = SolidColor(Color(0xFF000000)),
                strokeLineWidth = 32f
            ) {
                moveTo(409.63f, 234.21f)
                lineToRelative(90.32f, 0.41f)
            }
            path(
                fill = SolidColor(Color(0xFFD8D8D8)),
                stroke = SolidColor(Color(0xFF000000)),
                strokeLineWidth = 32f
            ) {
                moveTo(409.61f, 462.32f)
                lineToRelative(90.32f, 0.41f)
            }
        }.build()

        return _LazyRow!!
    }

@Suppress("ObjectPropertyName")
private var _LazyRow: ImageVector? = null
package io.composeflow

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp
import io.composeflow.custom.ComposeFlowIcons

val ComposeFlowIcons.VerticalAlignSpaceBetween: ImageVector
    get() {
        if (_VerticalAlignSpaceBetween != null) {
            return _VerticalAlignSpaceBetween!!
        }
        _VerticalAlignSpaceBetween = ImageVector.Builder(
            name = "VerticalAlignSpaceBetween",
            defaultWidth = 48.dp,
            defaultHeight = 48.dp,
            viewportWidth = 960f,
            viewportHeight = 960f
        ).apply {
            path(fill = SolidColor(Color(0xFF000000))) {
                moveTo(110f, 880f)
                quadToRelative(-12.75f, 0f, -21.38f, -8.68f)
                quadTo(80f, 862.65f, 80f, 849.83f)
                quadTo(80f, 837f, 88.63f, 828.5f)
                reflectiveQuadTo(110f, 820f)
                horizontalLineToRelative(180f)
                verticalLineToRelative(-70f)
                quadToRelative(0f, -12.75f, 8.63f, -21.38f)
                reflectiveQuadTo(320f, 720f)
                horizontalLineToRelative(320f)
                quadToRelative(12.75f, 0f, 21.38f, 8.63f)
                reflectiveQuadTo(670f, 750f)
                verticalLineToRelative(70f)
                horizontalLineToRelative(180f)
                quadToRelative(12.75f, 0f, 21.38f, 8.68f)
                quadToRelative(8.63f, 8.68f, 8.63f, 21.5f)
                quadToRelative(0f, 12.82f, -8.63f, 21.33f)
                reflectiveQuadTo(850f, 880f)
                lineTo(110f, 880f)
                close()
                moveTo(320f, 240f)
                quadToRelative(-12.75f, 0f, -21.38f, -8.63f)
                reflectiveQuadTo(290f, 210f)
                verticalLineToRelative(-70f)
                lineTo(110f, 140f)
                quadToRelative(-12.75f, 0f, -21.38f, -8.68f)
                quadTo(80f, 122.65f, 80f, 109.82f)
                quadTo(80f, 97f, 88.


T);

        foreach (var type in OwnTypes)
            if (type.IsConcrete() && targetType.IsAssignableFrom(type))
                yield return (T)Activator.CreateInstance(type);
    }

    /// <summary>
    /// Checks if the type can be instantiated via CreateInstance.
    /// </summary>
    public static bool IsConcrete(this Type type)
    {
        return !type.IsAbstract
               && !type.IsInterface
               && !type.IsGenericTypeDefinition;
    }

    /// <summary>
    /// Ensures that all recursive references are loaded.
    /// </summary>
    private static void ForceLoadReferences(Assembly asm, string namePrefix)
    {
        var loaded = AppDomain.CurrentDomain.GetAssemblies().ToDictionary(x => x.FullName, x => x);
        LoadRecursively(asm);

        void LoadRecursively(Assembly currAsm)
        {
            var refs = currAsm.GetReferencedAssemblies();
            foreach (var r in refs)
            {
                if (r.FullName?.StartsWith(namePrefix) != true)
                    continue;

                if (!loaded.ContainsKey(r.FullName))
                    loaded[r.FullName] = Assembly.Load(r);

                LoadRecursively(loaded[r.FullName]);
            }
        }
    }
}


/* Implementation of profiling support.  C-SKY ABIV2 version.
   Copyright (C) 2018-2019 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

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

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

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

#include <sysdep.h>

/* Use an assembly stub with a special ABI.  The calling lr has been


R:
			// DO NOTHING

		}

		if result != nil {
			iterators := promclient.IteratorsForValue(result)

			series := make([]storage.Series, len(iterators))
			for i, iterator := range iterators {
				series[i] = &proxyquerier.Series{iterator}
			}

			ret := &parser.VectorSelector{OriginalOffset: offset}
			if s.Interval > 0 {
				ret.LookbackDelta = s.Interval - time.Duration(1)
			}
			ret.UnexpandedSeriesSet = proxyquerier.NewSeriesSet(series, promhttputil.WarningsConvert(warnings), err)
			n.Expr = ret

			return n, nil
		}

	// Call is for things such as rate() etc. This can be sent directly to the
	// prometheus node to answer
	case *parser.Call:
		logrus.Debugf("call %v %v", n, n.Type())

		// absent and absent_over_time are difficult to implement at this layer; and as such we won't touch them
		// we'll do our NodeReplace at another node in the tree
		switch n.Func.Name {
		case "absent", "absent_over_time":
			return nil, nil
		}

		// For all the Call's we actually will work on, we need to remove the offset
		removeOffsetFn()

		var result model.Value
		var warnings v1.Warnings
		var err error
		if s.Interval > 0 {
			result, warnings, err = state.client.QueryRange(ctx, n.String(), v1.Range{
				Start: s.Start.Add(-offset),
				End:   s.End.Add(-offset),
				Step:  s.Interval,
			})
		} else {
			result, warnings, err = state.client.Query(ctx, n.String(), s.Start.Add(-offset))
		}

		if err != nil {
			return nil, err
		}

		iterators := promclient.IteratorsForValue(result)
		series := make([]storage.Series, len(iterators))
		for i, iterator := range iterators {
			series[i] = &proxyquerier.Series{iterator}
		}

		ret := &parser.VectorSelector{OriginalOffset: offset}
		if s.Interval > 0 {
			ret.LookbackDelta = s.Interval - time.Duration(1)
		}
		ret.UnexpandedSeriesSet = proxyquerier.NewSeriesSet(series, promhttputil.WarningsConvert(warnings), err)

		// Some functions require specific handling which we'll catch here
		switch n.Func.Name {
		// the "scalar()" function is a bit tricky. It can return a scalar or a vector.
		// So to handle this instead of returning the vector directly (as its just the values selected)
		// we can set it as the args (the vector of data) and the promql engine handles the types properly
		case "scalar":
			n.Args[0] = ret
			return n, nil
		// the functions of sort() and sort_desc() need whole results to calculate.
		case "sort", "sort_desc":
			return &parser.Call{
				Func: n.Func,
				Args: []parser.Expr{ret},
			}, nil
		}

		return ret, nil

	// If we are simply fetching a Vector then we can fetch the data using the same step that
	// the query came in as (reducing the amount of data we need to fetch)
	case *parser.VectorSelector:
		if n.Timestamp != nil {
			return nil, nil
		}
		// If the vector selector already has the data we can skip
		if n.UnexpandedSeriesSet != nil {
			return nil, nil
		}

		// Check if this VectorSelector is below a MatrixSelector.
		// If we hit this someone is asking for a matrix directly, if so then we don't
		// have anyway to ask for less-- since this is exactly what they are asking for
		if len(path) > 0 {
			if _, ok := path[len(path)-1].(*parser.MatrixSelector


use std::fs;

use chrono::prelude::*;
use tempdir::TempDir;

use safesec::Config;
use safesec::storage::KeyFileBuilder;
use safesec::storage::lmdb::KeyFile;

fn _mktempdir() -> TempDir
{
    // Generate unique temp name
    let dt = UTC::now();
    let suffix = dt.format("%Y%m%d%H%M%S%.9f");
    let name = format!("safesec_test_{}", suffix.to_string());
    let tmpdir = TempDir::new(&name).unwrap();
    let dbpath = tmpdir.path().join("sec.db");
    fs::create_dir(&dbpath).unwrap();
    tmpdir

}

fn _create_db(tmpdir: &TempDir) -> KeyFile
{
    // Create temp directory
    // let tmpdir = _mktempdir();
    let dbpath = tmpdir.path().join("sec.db");

    // Create keyfile store
    KeyFile::new("temp", Some(dbpath.as_path()))
}

#[test]
fn test_rpcserver()
{
    // Create database and bind address
    let tmpdir = _mktempdir();
    let dbdir = tmpdir.path().to_owned();
    // let db = Rc::new(RwLock::new(_create_db(&tmpdir)));
    let address = "127.0.0.1:12345".parse().unwrap();

    // Create a config
    let config = Config {
        name: "safesec".to_string(),
        dbdir: dbdir,
        bindaddr: address,
    };

    // Create command channel
    let (tx, rx) = mpsc::channel::<ServerMessage>(1);

    // Start server
    let child = thread::spawn(move || if let Err(e) = serve(&config, rx) {
        // println!("Server failed with {}", e);
        panic!("Server failed with {}", e);
    });

    thread::sleep(Duration::from_millis(500));

    // Start client
    let res = client_adddata(tx);

    let val = match res {
        Ok(t) => {
            println!("{}", t);
            true
        }
        Err(e) => {
            println!("Client error: {}", e);
            false
        }
    };

    child.join().unwrap();
    assert!(val);
}

// ===========================================================================
//
// ===========================================================================
<reponame>linshaoyong/leetcode
struct Solution;

impl Solution {
    pub fn trim_mean(arr: Vec<i32>) -> f64 {
        let mut marr = arr.clone();
        marr.sort();

        let length = marr.len() as i32;
        let start = (f64::from(length) * 0.05) as usize;
        let end = length as usize - start;
        let sub_sum = &marr[start..end].iter().sum::<i32>();
        let sub_len = end - start;
        f64::from(*sub_sum) / f64::from(sub_len as i32)
    }
}

#[test]
fn test_trim_mean() {
    assert_eq!(
        2.00000,
        Solution::trim_mean(vec![
            1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3
        ])
    );
    assert_eq!(
        4.00000,
        Solution::trim_mean(vec![
            6, 2, 7, 5, 1, 2, 0, 3, 10, 2, 5, 0, 5, 5, 0, 8, 7, 6, 8, 0
        ])
    );
    assert_eq!(
        4.777777777777778,
        Solution::trim_mean(vec![
            6, 0, 7, 0, 7, 5, 7, 8, 3, 4, 0, 7, 8, 1, 6, 8, 1, 1, 2, 4, 8, 1, 9, 5, 4, 3, 8, 5, 10,
            8, 6, 6, 1, 0, 6, 10, 8, 2, 3, 4
        ])
    );
    assert_eq!(
        5.277777777777778,
        Solution::trim_mean(vec![
            9, 7, 8, 7, 7, 8, 4, 4, 6, 8, 8, 7, 6, 8, 8, 9, 2, 6, 0, 0, 1, 10, 8, 6, 3, 3, 5, 1,
            10, 9, 0, 7, 10, 0, 10, 4, 1, 10, 6, 9, 3, 6, 0, 0, 2


 fn function() {
        extern "C" {
            static __environ: *mut *mut c_char;
        }

        init_from_envp(__environ)
    }
    function
};

fn init_from_envp(envp: *mut *mut c_char) {
    unsafe {
        environ = envp;
    }
}

#[link_section = ".data.__mustang"]
#[no_mangle]
#[used]
static mut environ: *mut *mut c_char = null_mut();

// Threads
#[cfg(feature = "threads")]
struct GetThreadId;

#[cfg(feature = "threads")]
unsafe impl parking_lot::lock_api::GetThreadId for GetThreadId {
    const INIT: Self = Self;

    fn nonzero_thread_id(&self) -> std::num::NonZeroUsize {
        (origin::current_thread_id().as_raw() as usize)
            .try_into()
            .unwrap()
    }
}

#[cfg(feature = "threads")]
#[allow(non_camel_case_types)]
type PthreadT = c_ulong;
libc_type!(PthreadT, pthread_t);

#[cfg(feature = "threads")]
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Clone)]
struct PthreadAttrT {
    stack_addr: *mut c_void,
    stack_size: usize,
    guard_size: usize,
    pad0: usize,
    pad1: usize,
    pad2: usize,
    pad3: usize,
    #[cfg(target_arch = "x86")]
    pad4: usize,
    #[cfg(target_arch = "x86")]
    pad5: usize,
}
#[cfg(feature = "threads")]
libc_type!(PthreadAttrT, pthread_attr_t);

#[cfg(feature = "threads")]
impl Default for PthreadAttrT {
    fn default() -> Self {
        Self {
            stack_addr: null_mut(),
            stack_size: origin::default_stack_size(),
            guard_size: origin::default_guard_size(),
            pad0: 0,
            pad1: 0,
            pad2: 0,
            pad3: 0,
            #[cfg(target_arch = "x86")]
            pad4: 0,
            #[cfg(target_arch = "x86")]
            pad5: 0,
        }
    }
}

#[cfg(feature = "threads")]
#[allow(non_camel_case_types)]
#[repr(C)]
union pthread_mutex_u {
    // Use a custom `RawMutex` for non-reentrant pthread mutex for now, because
    // we use `dlmalloc` or `wee_alloc` for global allocations, which use
    // mutexes, and `parking_lot`'s `RawMutex` performs global allocations.
    normal: RawMutex,
    reentrant: parking_lot::lock_api::RawReentrantMutex<parking_lot::RawMutex, GetThreadId>,
}

#[cfg(feature = "threads")]
#[allow(non_camel_case_types)]
#[repr(C)]
struct PthreadMutexT {
    kind: AtomicU32,
    u: pthread_mutex_u,
    pad0: usize,
    #[cfg(target_arch = "x86")]
    pad1: usize,
}
#[cfg(feature = "threads")]
libc_type!(PthreadMutexT, pthread_mutex_t);

#[cfg(feature = "threads")]
#[allow(non_camel_case_types)]
#[repr(C)]
struct PthreadRwlockT {
    lock: parking_lot::RawRwLock,
    exclusive: AtomicBool,
    pad0: usize,
    pad1: usize,
    pad2:


, 1=Error; bad stop bit in data from RX FIFO)
  2    Parity Error        (0=No, 1=Error; in data being read from RX FIFO)
  1    Overrun Error       (0=No, 1=Error; overrun has occurred)
  0    Data in Receiver    (0=No, 1=At least one character in the RX FIFO)

Bit2-4 reflect the error bits (BI, FE, PE) of the character at the top of the
RX FIFO (next character to be read). Therefore, errors in a character are
identified by reading the LSR and then reading the RHR.

IR[20h] - MCR - Modem Control Register (R/W)

  7    Clock Divisor    (0=Div1 clock input, 1=Div4 clock input)
  6    IrDA mode enable (0=Normal UART mode, 1=IrDA mode) (aka pulse RX/TX?)
  5    Xon Any function (0=Disable, 1=Enable)
  4    Enable Loopback  (0=Normal, 1=local Loopback mode, internal)
        In this mode the MCR[1:0] signals are looped back into MSR[4:5] and
        the TX output is looped back to the RX input internally.
  3    Reserved
  2    TCR/TLR register access enable (0=Disable, 1=Enable)
  1    RTS output (if Auto RTS disabled)        (0=High/Inactive, 1=Low/Active)
        In Loopback mode, controls MSR[4].
  0    DTR output (GPIO5) (if IOControl.bit1=1) (0=High/Inactive, 1=Low/Active)
        Writing to IOState bit 5 will not have any effect on this pin.

Bit2,5-7 can only be modified when EFR[4] is set, ie. EFR[4] is a write enable.

Bit0: Only available on SC16IS750/SC16IS760.

IR[30h.normal.R] - MSR - Modem Status Register (R)

  7    CD input state (inverted, 1=Not HIGH, or so)     ;\only if modem mode
  6    RI input state (inverted, 1=Not HIGH, or so)     ; (IOControl.bit1=1)
  5    DSR input state (inverted, 1=Not HIGH, or so)    ;/
  4    CTS input state (inverted, 1=Not HIGH, or so)
  3    CD input changed state                  (0=No, 1=Yes)    ;\
  2    RI input changed state from LOW to HIGH (0=No, 1=Yes)    ; cleared
  1    DSR input changed state                 (0=No, 1=Yes)    ; on read
  0    CTS input changed state                 (0=No, 1=Yes)    ;/

Bit1-3,5-7: Only available on SC16IS750/SC16IS760.

Remark: The primary inputs RI, CD, CTS, DSR are all active LOW.

Reading IOState bit 6,6,4 does not reflect the true state of CD,RI,DSR pin, uh?

IR[08h] - IER - Interrupt Enable Register (R/W)

  7    CTS change interrupt enable          (0=Disable, 1=Enable)
  6    RTS change interrupt enable          (0=Disable, 1=Enable)
  5    Xoff received interrupt              (0=Disable, 1=Enable)
  4    Sleep mode                           (0=Disable, 1=Sleep Mode)
  3    Modem Status Interrupt               (0=Disable, 1=Enable)


oHsl(color)?.s ?? 0) < 0.15) {
            colorData[base400Index] = '#a8a8a8';
        } else {
            colorData[base400Index] = color;
        }
    }

    const accent400Index = colorData.indexOf(specials.ACCENT400);
    if (accent400Index >= 0) {
        const brightness = getColorBrightness(color) || 0;
        if (brightness < 50) {
            colorData[accent400Index] = darkenHexColor('#2F2F2F', (brightness * -1 + 100) * 0.1);
        } else {
            colorData[accent400Index] = '#2F2F2F';
        }
    }

    const secondaryBase400Index = colorData.indexOf(specials.SECONDARY_BASE400);
    if (secondaryBase400Index >= 0) {
        const brightness = getColorBrightness(secondary) || 0;
        if (brightness < 50 && colorMode === 1) {
            colorData[secondaryBase400Index] = lightenHexColor(
                secondary,
                (brightness * -1 + 100) * 0.5,
            );
        } else if (brightness === 100 && (hexToHsl(secondary)?.s ?? 0) < 15) {
            colorData[secondaryBase400Index] = '#a8a8a8';
        } else {
            colorData[secondaryBase400Index] = secondary;
        }
    }

    const secondaryAccent400Index = colorData.indexOf(specials.SECONDARY_ACCENT400);
    if (secondaryAccent400Index >= 0) {
        const brightness = getColorBrightness(secondary) || 0;
        if (brightness < 50) {
            colorData[secondaryAccent400Index] = darkenHexColor('#2F2F2F', (brightness * -1 + 100) * 0.1);
        } else {
            colorData[secondaryAccent400Index] = '#2F2F2F';
        }
    }

    if (Array.isArray(colorData)) {
        if (colorData.length === 2) {
            return mixHex(color, colorData[0], colorData[1]);
        }
        if (colorData.length === 3) {
            return mixHex(colorData[0], colorData[1], colorData[2]);
        }
    }

    return colorData;
}

export {
    getColorFromPalette,
    getAvailableColorList,
};
import * as Phaser from 'phaser'
import tiles from '../assets/images/mario-tile-set.png'

export const config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    parent: 'game-container',
    pixelArt: true,
    scene: {
        preload: preload,
        create: create,
        update: update
    }
}

function preload() {
    // Runs once, loads up assets like images and audio
    this.load.image('mario-tiles', tiles)
    this.load.tilemapCSV('map', 'https://www.mikewesthad.com/phaser-3-tilemap-blog-posts/post-1/assets/tilemaps/catastrophi_level3.csv')
}

function create() {
    // Runs once, after all assets in preload are loaded
    // Load a map from a 2D array of tile indices
    const level = [
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 1, 2, 3, 0, 0, 0, 1, 2, 3, 0],
        [0, 5, 6, 7, 0, 0, 0, 5, 6, 7, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 14, 13, 14, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        [0, 0, 14, 14, 14, 14, 14,


            return true;
        }

        public void SetData(ref Matrix worldMatrixForRenderingFromCockpitView)
        {
            m_worldMatrixForRenderingFromCockpitView = worldMatrixForRenderingFromCockpitView;
        }

        public override bool Draw(MyRenderObject renderObject)
        {
            if (base.Draw(renderObject) == false) return false;

            return true;
        }

        public override Matrix GetWorldMatrixForDraw()
        {
            if (MinerWars.AppCode.Game.GUI.MyGuiScreenGamePlay.Static.CameraAttachedTo == MinerWars.AppCode.Game.GUI.MyCameraAttachedToEnum.PlayerMinerShip)
            {
                return LocalMatrix * m_worldMatrixForRenderingFromCockpitView;
            }

            return base.GetWorldMatrixForDraw();
        }
    }
}


!(local_from(JVMInstruction::Istore2), (2, ValType::I32));
        assert_eq!(local_from(JVMInstruction::Istore3), (3, ValType::I32));
        assert_eq!(local_from(JVMInstruction::Istore(4)), (4, ValType::I32));
        assert_eq!(local_from(JVMInstruction::IstoreWide(4)), (4, ValType::I32));
        assert_eq!(
            local_from(JVMInstruction::Iinc { index: 5, value: 1 },),
            (5, ValType::I32)
        );
        assert_eq!(
            local_from(JVMInstruction::IincWide { index: 5, value: 1 },),
            (5, ValType::I32)
        );

        // Longs
        assert_eq!(local_from(JVMInstruction::Lload0), (0, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lload1), (1, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lload2), (2, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lload3), (3, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lload(4)), (4, ValType::I64));
        assert_eq!(local_from(JVMInstruction::LloadWide(4)), (4, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lstore0), (0, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lstore1), (1, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lstore2), (2, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lstore3), (3, ValType::I64));
        assert_eq!(local_from(JVMInstruction::Lstore(4)), (4, ValType::I64));
        assert_eq!(local_from(JVMInstruction::LstoreWide(4)), (4, ValType::I64));
    }
}
<reponame>vrana/rust
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::thread::Thread;
use std::sync::mpsc::Sender;
use std::thunk::Invoke;

type RingBuffer = Vec<f64> ;
type SamplesFn = Box<FnMut(&RingBuffer) + Send>;

enum Msg
{
    GetSamples(String, SamplesFn), // sample set name, callback which receives samples
}

fn foo(name: String, samples_chan: Sender<Msg>) {
    let _t = Thread::spawn(move|| {
        let mut samples_chan = samples_chan;

        // `box() (...)` syntax is needed to make pretty printer converge in one try:
        let callback: SamplesFn = box() (move |buffer| {
            for i in range(0u, buffer.len()) {
                println!("{}: {}", i, buffer[i])
            }
        });

        samples_chan.send(Msg::GetSamples(name.clone(), callback));
    });
}

pub fn main() {}
//! caffeine-cf bin crate - CLI tool for easily interacting with the
//! [Codeforces](https://codeforces.com/) API.
//!
//! ![caffeine logo](https://github.com/thud/caffeine/


      testBox(Box.view([10.0, 20.0, 30.0, 15.0, 25.0, 35.0]));

      // a measured 2D box (x: 10.0 .. 15.0, y: 20.0 .. 25.0, m: 40.0 .. 45.0)
      // (need to specify the coordinate type XYM)
      testBox(
        Box.view([10.0, 20.0, 40.0, 15.0, 25.0, 45.0], type: Coords.xym),
      );

      // a measured 3D box
      // (x: 10.0 .. 15.0, y: 20.0 .. 25.0, z: 30.0 .. 35.0, m: 40.0 .. 45.0)
      testBox(Box.view([10.0, 20.0, 30.0, 40.0, 15.0, 25.0, 35.0, 45.0]));
    });

    test('Box.create', () {
      // a 2D box (x: 10.0 .. 15.0, y: 20.0 .. 25.0)
      testBox(Box.create(minX: 10.0, minY: 20.0, maxX: 15.0, maxY: 25.0));

      // a 3D box (x: 10.0 .. 15.0, y: 20.0 .. 25.0, z: 30.0 .. 35.0)
      testBox(
        Box.create(
          minX: 10.0, minY: 20.0, minZ: 30.0,
          maxX: 15.0, maxY: 25.0, maxZ: 35.0,
          //
        ),
      );

      // a measured 2D box (x: 10.0 .. 15.0, y: 20.0 .. 25.0, m: 40.0 .. 45.0)
      testBox(
        Box.create(
          minX: 10.0, minY: 20.0, minM: 40.0,
          maxX: 15.0, maxY: 25.0, maxM: 45.0,
          //
        ),
      );

      // a measured 3D box
      // (x: 10.0 .. 15.0, y: 20.0 .. 25.0, z: 30.0 .. 35.0, m: 40.0 .. 45.0)
      testBox(
        Box.create(
          minX: 10.0, minY: 20.0, minZ: 30.0, minM: 40.0,
          maxX: 15.0, maxY: 25.0, maxZ: 35.0, maxM: 45.0,
          //
        ),
      );
    });

    test('Box.from', () {
      // a 2D box (x: 10.0 .. 15.0, y: 20.0 .. 25.0)
      testBox(
        Box.from(
          [
            Position.create(x: 10.0, y: 20.0),
            Position.create(x: 15.0, y: 25.0),
          ],
        ),
      );

      // a 3D box (x: 10.0 .. 15.0, y: 20.0 .. 25.0, z: 30.0 .. 35.0)
      testBox(
        Box.from(
          [
            Position.create(x: 10.0, y: 20.0, z: 30.0),
            Position.create(x: 15.0, y: 25.0, z: 35.0),
          ],
        ),
      );

      // a measured 2D box (x: 10.0 .. 15.0, y: 20.0 .. 25.0, m: 40.0 .. 45.0)
      testBox(
        Box.from(
          [
            Position.create(x: 10.0, y: 20.0, m: 40.0),
            Position.create(x: 15.0, y: 25.0, m: 45.0),
          ],
        ),
      );

      // a measured 3D box
      // (x: 10.


() {
        _queueState.update {
            it.forEach { download ->
                if (download.status == AnimeDownload.State.DOWNLOADING ||
                    download.status == AnimeDownload.State.QUEUE
                ) {
                    download.status = AnimeDownload.State.NOT_DOWNLOADED
                }
            }
            store.clear()
            emptyList()
        }
    }

    fun updateQueue(downloads: List<AnimeDownload>) {
        if (queueState == downloads) return

        if (downloads.isEmpty()) {
            clearQueue()
            stop()
            return
        }

        val wasRunning = isRunning

        pause()
        internalClearQueue()
        addAllToQueue(downloads)

        if (wasRunning) {
            start()
        }
    }

    companion object {
        const val TMP_DIR_SUFFIX = "_tmp"
        const val WARNING_NOTIF_TIMEOUT_MS = 30_000L
        const val EPISODES_PER_SOURCE_QUEUE_WARNING_THRESHOLD = 10
        private const val DOWNLOADS_QUEUED_WARNING_THRESHOLD = 20
    }
}

// Arbitrary minimum required space to start a download: 200 MB
private const val MIN_DISK_SPACE = 200L * 1024 * 1024
package eu.kanade.tachiyomi.data.track.kavita

import eu.kanade.tachiyomi.data.track.TrackerManager
import eu.kanade.tachiyomi.data.track.model.MangaTrackSearch
import kotlinx.serialization.Serializable

@Serializable
data class SeriesDto(
    val id: Int,
    val name: String,
    val originalName: String = "",
    val thumbnail_url: String? = "",
    val stringResourcedName: String? = "",
    val sortName: String? = "",
    val pages: Int,
    val coverImageLocked: Boolean = true,
    val pagesRead: Int,
    val userRating: Int? = 0,
    val userReview: String? = "",
    val format: Int,
    val created: String? = "",
    val libraryId: Int,
    val libraryName: String? = "",
) {
    fun toTrack(): MangaTrackSearch = MangaTrackSearch.create(TrackerManager.KAVITA).also {
        it.title = name
        it.summary = ""
    }
}

@Serializable
data class VolumeDto(
    val id: Int,
    val number: Int,
    val name: String,
    val pages: Int,
    val pagesRead: Int,
    val lastModified: String,
    val created: String,
    val seriesId: Int,
    val chapters: List<ChapterDto> = emptyList(),
)

@Serializable
data class ChapterDto(
    val id: Int? = -1,
    val range: String? = "",
    val number: String? = "-1",
    val pages: Int? = 0,
    val isSpecial: Boolean? = false,
    val title: String? = "",
    val pagesRead: Int? = 0,
    val coverImageLocked: Boolean? = false,
    val volumeId: Int? = -1,
    val created: String? = "",
)

@Serializable
data class AuthenticationDto(
    val username: String,
    val token: String,
    val apiKey: String,
)

class OAuth(
    val authentications: List<SourceAuth> = listOf(
        SourceAuth(1),
        SourceAuth(2),
        SourceAuth(3),
    ),
) {
    fun getToken(apiUrl: String): String? {
        for (authentication in authentications) {
            if (authentication.apiUrl == apiUrl) {
                return authentication.jwtToken
            }
        }
        return null
    }
}

data class SourceAuth(
    var sourceId: Int,
    var apiUrl: String = "",
    var jwtToken: String = "",
)
package eu.kanade.tachiyomi.data.


= CfgCardPropertyEnum[useEquipSkillCfg.nGetBaseType].sFieldName
                    GCalHelp:Add(ret.baseVal, propertyName, useEquipSkillCfg.fGetBaseVal)
                end
            end
        end
    end
    -- LogTable(equips, "CalEquipPropertys equips:")
    -- LogTable(ret, "CalEquipPropertys ret:")
    return ret
end

-------------------------------------------------------------------------------------------------------------------
-- 根据 星级 和 等级获取 CfgEquipExp 的配置
func


*
     * Can't verify certificate.
     */
    public static final ErrorType KDC_ERR_CANT_VERIFY_CERTIFICATE = new ErrorType( 70, "Can't verify certificate" );

    /**
     * Invalid certificate.
     */
    public static final ErrorType KDC_ERR_INVALID_CERTIFICATE = new ErrorType( 71, "Invalid certificate" );

    /**
     * Revoked certificate.
     */
    public static final ErrorType KDC_ERR_REVOKED_CERTIFICATE = new ErrorType( 72, "Revoked certificate" );

    /**
     * Revocation status unknown.
     */
    public static final ErrorType KDC_ERR_REVOCATION_STATUS_UNKNOWN = new ErrorType( 73, "Revocation status unknown" );

    /**
     * Revocation status unavailable.
     */
    public static final ErrorType KRB_ERR_REVOCATION_STATUS_UNAVAILABLE = new ErrorType( 74,
        "Revocation status unavailable" );

    /**
     * Client names do not match.
     */
    public static final ErrorType KDC_ERR_CLIENT_NAME_MISMATCH = new ErrorType( 75, "Client names do not match" );

    /**
     * KDC names do not match.
     */
    public static final ErrorType KRB_ERR_KDC_NAME_MISMATCH = new ErrorType( 76, "KDC names do not match" );

    /**
     * Inconsistent key purpose.
     */
    public static final ErrorType KDC_ERR_INCONSISTENT_KEY_PURPOSE = new ErrorType( 77, "Inconsistent key purpose" );

    /**
     * Digest in certificate not accepted.
     */
    public static final ErrorType KDC_ERR_DIGEST_IN_CERT_NOT_ACCEPTED = new ErrorType( 78,
        "Digest in certificate not accepted" );

    /**
     * PA checksum must be included.
     */
    public static final ErrorType KDC_ERR_PA_CHECKSUM_MUST_BE_INCLUDED = new ErrorType( 79,
        "PA checksum must be included" );

    /**
     * Digest in signed data not accepted.
     */
    public static final ErrorType KDC_ERR_DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED = new ErrorType( 80,
        "Digest in signed data not accepted" );

    /**
     * Public key encryption not supported.
     */
    public static final ErrorType KDC_ERR_PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED = new ErrorType( 81,
        "Public key encryption not supported" );

    /**
     * Array for building a List of VALUES.
     */
    private static final ErrorType[] values =
        { KDC_ERR_NONE, KDC_ERR_NAME_EXP, KDC_ERR_SERVICE_EXP, KDC_ERR_BAD_PVNO, KDC_ERR_C_OLD_MAST_KVNO,
            KDC_ERR_S_OLD_MAST_KVNO, KDC_ERR_C_PRINCIPAL_UNKNOWN, KDC_ERR_S_PRINCIPAL_UNKNOWN,
            KDC_ERR_PRINCIPAL_NOT_UNIQUE, KDC_ERR_NULL_KEY, KDC_ERR_CANNOT_POSTDATE, KDC_ERR_NEVER_VALID,
            KDC_ERR_POLICY, KDC_ERR_BADOPTION, KDC_ERR_ETYPE_NOSUPP, KDC_ERR_SUMTYPE_NOSUPP,
            KDC_ERR_PADATA_TYPE_NOSUPP, KDC_ERR_TRTYPE_NOSUPP, KDC_ERR_CLIENT_REVOKED, KDC_ERR_SERVICE_REVOKED,
            KDC_ERR_TGT_REVOKED, KDC_ERR_CLIENT_NOTYET, KDC_ERR_SERVICE_NOTYET, KDC_ERR_KEY_EXPIRED,
            KDC_ERR_PREAUTH_FAILED, KDC_ERR_PREAUTH_REQUIRED, KDC_ERR_SERVER_NOMATCH, KDC_ERR_MUST_USE_USER2USER,
            KDC_ERR_PATH_NOT_ACCEPTED, KDC_ERR_SVC_UNAVAILABLE, KRB_AP_ERR_BAD_INTEGRITY, KRB_AP_ERR_TKT_EXPIRED,
            KRB_AP_ERR_TKT_NYV, KRB_


.endpointRegionalType, null);
            }
			Method = MethodType.POST;
        }

		private string data;

		private string appUid;

		private long? ownerId;

		private int? priority;

		private string roomId;

		private string appId;

		[JsonProperty(PropertyName = "Data")]
		public string Data
		{
			get
			{
				return data;
			}
			set
			{
				data = value;
				DictionaryUtil.Add(QueryParameters, "Data", value);
			}
		}

		[JsonProperty(PropertyName = "AppUid")]
		public string AppUid
		{
			get
			{
				return appUid;
			}
			set
			{
				appUid = value;
				DictionaryUtil.Add(QueryParameters, "AppUid", value);
			}
		}

		[JsonProperty(PropertyName = "OwnerId")]
		public long? OwnerId
		{
			get
			{
				return ownerId;
			}
			set
			{
				ownerId = value;
				DictionaryUtil.Add(QueryParameters, "OwnerId", value.ToString());
			}
		}

		[JsonProperty(PropertyName = "Priority")]
		public int? Priority
		{
			get
			{
				return priority;
			}
			set
			{
				priority = value;
				DictionaryUtil.Add(QueryParameters, "Priority", value.ToString());
			}
		}

		[JsonProperty(PropertyName = "RoomId")]
		public string RoomId
		{
			get
			{
				return roomId;
			}
			set
			{
				roomId = value;
				DictionaryUtil.Add(QueryParameters, "RoomId", value);
			}
		}

		[JsonProperty(PropertyName = "AppId")]
		public string AppId
		{
			get
			{
				return appId;
			}
			set
			{
				appId = value;
				DictionaryUtil.Add(QueryParameters, "AppId", value);
			}
		}

        public override SendRoomNotificationResponse GetResponse(UnmarshallerContext unmarshallerContext)
        {
            return SendRoomNotificationResponseUnmarshaller.Unmarshall(unmarshallerContext);
        }
    }
}


);
 *
 *   // Display that variable in an onscreen text.
 *   // (Note the nfc() function to truncate additional decimal places,
 *   // and the "\xB0" character for the degree symbol.)
 *   var readout = "angle = " + nfc(myDegrees,1,1) + "\xB0"
 *   noStroke();
 *   fill (0);
 *   text (readout, 5, 15);
 *
 *   // Create a p5.Vector using the fromAngle function,
 *   // and extract its x and y components.
 *   var v = p5.Vector.fromAngle(radians(myDegrees));
 *   var vx = v.x;
 *   var vy = v.y;
 *
 *   push();
 *   translate (width/2, height/2);
 *   noFill();
 *   stroke (150);
 *   line (0,0, 30,0);
 *   stroke (0);
 *   line (0,0, 30*vx, 30*vy);
 *   pop()
 * }
 *
 *

 */
p5.Vector.fromAngle = function(angle) {
  if (this.p5) {
    if (this.p5._angleMode === constants.DEGREES) {
      angle = polarGeometry.degreesToRadians(angle);
    }
  }
  if (this.p5) {
    return new p5.Vector(this.p5,[Math.cos(angle),Math.sin(angle),0]);
  } else {
    return new p5.Vector(Math.cos(angle),Math.sin(angle),0);
  }
};

/**
 * Make a new 2D unit vector from a random angle
 *
 * @method random2D
 * @static
 * @return {p5.Vector} the new p5.Vector object
 * @example
 *

 *
 * var v = p5.Vector.random2D();
 * // May make v's attributes something like:
 * // [0.61554617, -0.51195765, 0.0] or
 * // [-0.4695841, -0.14366731, 0.0] or
 * // [0.6091097, -0.22805278, 0.0]
 *
 *

 */
p5.Vector.random2D = function () {
  var angle;
  // A lot of nonsense to determine if we know about a
  // p5 sketch and whether we should make a random angle in degrees or radians
  if (this.p5) {
    if (this.p5._angleMode === constants.DEGREES) {
      angle = this.p5.random(360);
    } else {
      angle = this.p5.random(constants.TWO_PI);
    }
  } else {
    angle = Math.random()*Math.PI*2;
  }
  return this.fromAngle(angle);
};

/**
 * Make a new random 3D unit vector.
 *
 * @method random3D
 * @static
 * @return {p5.Vector} the new p5.Vector object
 * @example
 *

 *
 * var v = p5.Vector.random3D();
 * // May make v's attributes something like:
 * // [0.61554617, -0.51195765, 0.599168] or
 * // [-0.4695841, -0.14366731, -0.8711202] or
 * // [0.6091097, -0.22805278, -0.7595902]
 *
 *

 */
p5.Vector.random3D = function () {
  var angle,vz;
  // If we know about p5
  if (this.p5) {
    angle = this.p5.random(0,constants.TWO_PI);
    vz = this.p5.random(-1,1);
  } else {
    angle = Math.random()*Math.PI*2;
    vz = Math.random()*2-1;
  }
  var vx = Math.sqrt(1-vz*vz)*Math


th>max_error

fold_0
0.0891
0.1270
0.0692
1.1580

fold_1
0.0852
0.1261
0.0666
1.0887

fold_2
0.0849
0.1261
0.0668
0.9631

fold_3
0.0884
0.1279
0.0670
0.8959

fold_4
0.0894
0.1313
0.0690
0.9810

Fold score stats

metric
mean
max
min
std

mae
0.0874
0.0894
0.0849
0.0020

rmse
0.1277
0.1313
0.1261
0.0019

mape*
0.0677
0.0692
0.0666
0.0012

max_error
1.0173
1.1580
0.8959
0.0937

Fold parameters

fold
params dict

fold_0
{'best_pipeline': ['(variancethreshold, VarianceThreshold(threshold=0.2))', '(zerocount, ZeroCount())', '(gradientboostingregressor, GradientBoostingRegressor(alpha=0.99, criterion=friedman_mse, init=...

fold_1
{'best_pipeline': ['(variancethreshold, VarianceThreshold(threshold=0.01))', '(robustscaler, RobustScaler(copy=true, quantile_range=(25.0, 75.0), with_centering=true,\n             with_scaling=true))...

fold_2
{'best_pipeline': ['(selectfwe, SelectFwe(alpha=0.01, score_func=<function f_regression at 0x2aaaef19e8c8>))', '(


 borderColorHex != null
            ? _isColorAppropriate(borderColorHex.colorHex)
            : null;

  @override
  String toString() {
    return 'Border(borderStyle: $borderStyle, borderColorHex: $borderColorHex)';
  }

  @override
  List<Object?> get props => [
        borderStyle,
        borderColorHex,
      ];
}

class _BorderSet extends Equatable {
  final Border leftBorder;
  final Border rightBorder;
  final Border topBorder;
  final Border bottomBorder;
  final Border diagonalBorder;
  final bool diagonalBorderUp;
  final bool diagonalBorderDown;

  _BorderSet({
    required this.leftBorder,
    required this.rightBorder,
    required this.topBorder,
    required this.bottomBorder,
    required this.diagonalBorder,
    required this.diagonalBorderUp,
    required this.diagonalBorderDown,
  });

  _BorderSet copyWith({
    Border? leftBorder,
    Border? rightBorder,
    Border? topBorder,
    Border? bottomBorder,
    Border? diagonalBorder,
    bool? diagonalBorderUp,
    bool? diagonalBorderDown,
  }) {
    return _BorderSet(
      leftBorder: leftBorder ?? this.leftBorder,
      rightBorder: rightBorder ?? this.rightBorder,
      topBorder: topBorder ?? this.topBorder,
      bottomBorder: bottomBorder ?? this.bottomBorder,
      diagonalBorder: diagonalBorder ?? this.diagonalBorder,
      diagonalBorderUp: diagonalBorderUp ?? this.diagonalBorderUp,
      diagonalBorderDown: diagonalBorderDown ?? this.diagonalBorderDown,
    );
  }

  @override
  List<Object?> get props => [
        leftBorder,
        rightBorder,
        topBorder,
        bottomBorder,
        diagonalBorder,
        diagonalBorderUp,
        diagonalBorderDown,
      ];
}

enum BorderStyle {
  None('none'),
  DashDot('dashDot'),
  DashDotDot('dashDotDot'),
  Dashed('dashed'),
  Dotted('dotted'),
  Double('double'),
  Hair('hair'),
  Medium('medium'),
  MediumDashDot('mediumDashDot'),
  MediumDashDotDot('mediumDashDotDot'),
  MediumDashed('mediumDashed'),
  SlantDashDot('slantDashDot'),
  Thick('thick'),
  Thin('thin');

  final String style;
  const BorderStyle(this.style);
}

BorderStyle? getBorderStyleByName(String name) =>
    BorderStyle.values.firstWhereOrNull((e) =>
        e.toString().toLowerCase() == 'borderstyle.' + name.toLowerCase());
part of excel;

Map<V, K> _createInverseMap<K, V>(Map<K, V> map) {
  final inverse = <V, K>{};
  for (var entry in map.entries) {
    assert(!inverse.containsKey(entry.value), 'map values are not unique');
    inverse[entry.value] = entry.key;
  }
  return inverse;
}

class NumFormatMaintainer {
  static const int _firstCustomFmtId = 164;
  int _nextFmtId = _firstCustomFmtId;
  Map<int, NumFormat> _map = {..._standardNumFormats};
  Map<NumFormat, int> _inverseMap = _createInverseMap(_standardNumFormats);

  void add(int numFmtId, CustomNumFormat format) {
    if (_map.containsKey(numFmtId)) {
      throw Exception('numFmtId $numFmtId already exists');
    }
    if (numFmtId < _firstCustomFmtId) {
      throw Exception(
          'invalid numFmtId $numFmtId, custom numFmtId must be $_firstCustomFmtId or greater');
    }
    _ma


e-2.0

package library

import (
	"context"
	"net/http"
	"path"

	"github.com/vmware/govmomi/vapi/internal"
)

// TrustedCertificate contains a trusted certificate in Base64 encoded PEM format
type TrustedCertificate struct {
	Text string `json:"cert_text"`
}

// TrustedCertificateSummary contains a trusted certificate in Base64 encoded PEM format and its id
type TrustedCertificateSummary struct {
	TrustedCertificate
	ID string `json:"certificate"`
}

// ListTrustedCertificates retrieves all content library's trusted certificates
func (c *Manager) ListTrustedCertificates(ctx context.Context) ([]TrustedCertificateSummary, error) {
	url := c.Resource(internal.TrustedCertificatesPath)
	var res struct {
		Certificates []TrustedCertificateSummary `json:"certificates"`
	}
	err := c.Do(ctx, url.Request(http.MethodGet), &res)
	return res.Certificates, err
}

// GetTrustedCertificate retrieves a trusted certificate for a given certificate id
func (c *Manager) GetTrustedCertificate(ctx context.Context, id string) (*TrustedCertificate, error) {
	url := c.Resource(path.Join(internal.TrustedCertificatesPath, id))
	var res TrustedCertificate
	err := c.Do(ctx, url.Request(http.MethodGet), &res)
	if err != nil {
		return nil, err
	}
	return &res, nil
}

// CreateTrustedCertificate adds a certificate to content library trust store
func (c *Manager) CreateTrustedCertificate(ctx context.Context, cert string) error {
	url := c.Resource(internal.TrustedCertificatesPath)
	body := TrustedCertificate{Text: cert}
	return c.Do(ctx, url.Request(http.MethodPost, body), nil)
}

// DeleteTrustedCertificate deletes the trusted certificate from content library's trust store for the given id
func (c *Manager) DeleteTrustedCertificate(ctx context.Context, id string) error {
	url := c.Resource(path.Join(internal.TrustedCertificatesPath, id))
	return c.Do(ctx, url.Request(http.MethodDelete), nil)
}
// © Broadcom. All Rights Reserved.
// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
// SPDX-License-Identifier: Apache-2.0

package namespace

import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"path"

	"github.com/vmware/govmomi/vapi/namespace/internal"
	"github.com/vmware/govmomi/vapi/rest"
	"github.com/vmware/govmomi/vim25/types"
)

// Manager extends rest.Client, adding namespace related methods.
type Manager struct {
	*rest.Client
}

// NewManager creates a new Manager instance with the given client.
func NewManager(client *rest.Client) *Manager {
	return &Manager{
		Client: client,
	}
}

// EnableClusterSpec defines a Tanzu Supervisor Cluster for creation.
// See: https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/data-structures/NamespaceManagement/Clusters/EnableSpec/
// Since 7.0.0:-
type EnableClusterSpec struct {
	MasterDNSSearchDomains []string               `json:"master_DNS_search_domains,omitempty"`
	ImageStorage           ImageStorageSpec       `json:"image_storage"`
	NcpClusterNetworkSpec  *NcpClusterNetworkSpec `json:"ncp_cluster_network_spec,omitempty"`
	// Note: NcpClusterNetworkSpec is replaced by WorkloadNetworksSpec in vSphere 7.0u2+
	// Since 7.0u1:-
	WorkloadNetworksSpec    *WorkloadNetworksEnableSpec `json:"workload_networks_spec,omitempty"`
	MasterManagementNetwork *MasterManagementNetwork    `json:"master_management_network


 (2)
  exclusion.robots: 0.154
  captures_list: 1083.619
  LoadShardBlock: 1067.206 (3)
  esindex: 0.009
  RedisCDXSource: 1.922
  load_resource: 740.754 (2)
--><!DOCTYPE html><html lang="de-DE" prefix="og: https://ogp.me/ns# fb: https://ogp.me/ns/fb# article: https://ogp.me/ns/article#"><head ><link rel="dns-prefetch" href='https://cdnjs.cloudflare.com' /><link rel="dns-prefetch" href="https://www.google-analytics.com"><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" ><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Geschichte der Gegenwart"><meta name="application-name" content="Geschichte der Gegenwart"><meta name="apple-mobile-web-app-status-bar-style" content="#FD426C"/><meta name="theme-color" content="#FD426C"/><meta name="msapplication-navbutton-color" content="#FD426C"/><meta name="mobile-web-app-capable" content="yes"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><link rel="manifest" href="/manifest.json"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#fd426c"><link rel="shortcut icon" href="/favicon.ico"><meta property="fb:pages" content="539314642893633" /><link rel="profile" href="https://gmpg.org/xfn/11"/><link rel="pingback" href="https://geschichtedergegenwart.ch/xmlrpc.php"/> <script type="text/javascript" src="https://steadyhq.com/widget_loader/98d56023-71f5-4ca0-b70e-f40805d96cb8"></script> <script>function fvmuag(){if(navigator.userAgent.match(/x11.*fox\/54|oid\s4.*xus.*ome\/62|oobot|ighth|tmetr|eadles|ingdo/i))return!1;if(navigator.userAgent.match(/x11.*ome\/75\.0\.3770\.100/i)){var e=screen.width,t=screen.height;if("number"==typeof e&&"number"==typeof t&&862==t&&1367==e)return!1}return!0}</script><title>Mit Foucault die Pandemie verstehen? – Geschichte der Gegenwart</title><meta property="og:title" content="Mit Foucault die Pandemie verstehen?"/><meta property="og:description" content="Kann man mit den theoretischen Konzepten und historischen Beispielen, die Michel Foucault in den 1970er Jahren entwickelte, die gegenwärtige Lage deuten? Ja – aber anders, als man denkt. Und nein, von Biopolitik zu sprechen hilft dabei nicht weiter."/><meta property="og:url" content="https://geschichtedergegenwart.ch/mit-foucault-die-pandemie-verstehen/"/><meta property="og:image" content="https://geschichtedergegenwart.ch/inhalte/2020/03/Coronaviruses_1975.jpg"/><meta name="twitter:card" content="summ


}is text
' );
			this.fireSelectAll( editor );

			wait( function() {
				assert.isInnerHtmlMatching( this.fillerHtml() + '
NE
' + this.pHtml( true ),
					bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was added.' );

				this.fireSelectionCheck( editor, 2 );

				wait( function() {
					assert.isInnerHtmlMatching( '
NE

^This is text
',
						bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was removed.' );
				}, 5 );
			}, 5 );
		},

		'test content with non-editable at the end': function() {
			var editor = this.editor;

			bender.tools.selection.setWithHtml( editor, '
This {}is text

NE
' );
			this.fireSelectAll( editor );

			wait( function() {
				assert.isInnerHtmlMatching( this.pHtml() + '
NE
' + this.fillerHtml( true ),
					bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was added.' );

				this.fireSelectionCheck( editor, 0 );

				wait( function() {
					assert.isInnerHtmlMatching( '
^This is text

NE
',
						bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was removed.' );
				}, 5 );
			}, 5 );
		},

		'test content with non-editable at the beginning and end': function() {
			var editor = this.editor;

			bender.tools.selection.setWithHtml( editor, '
NE1

This {}is text

NE2
' );
			this.fireSelectAll( editor );

			wait( function() {
				assert.isInnerHtmlMatching(
					this.fillerHtml() + '
NE1

This is text

NE2
' + this.fillerHtml( true ),
					bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was added.' );

				this.fireSelectionCheck( editor, 2 );

				wait( function() {
					assert.isInnerHtmlMatching( '
NE1

^This is text

NE2
',
						bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was removed.' );
				}, 5 );
			}, 5 );
		},

		'test content with only one non-editable': function() {
			if ( CKEDITOR.env.safari ) {
				// Selection like [
Non-editable

This is text
] is not achievable
				// in Safari programatically with use of ranges.
				assert.ignore();
			}

			var editor = this.editor;

			bender.tools.selection.setWithHtml( editor, '
NE
' );
			this.fireSelectAll( editor );

			wait( function() {
				assert.isInnerHtmlMatching( this.fillerHtml() + '
NE
' + this.fillerHtml( true ),
					bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was added.' );

				this.fireSelectionCheck( editor, 1 );

				wait( function() {
					assert.isInnerHtmlMatching( '
^NE
',
						bender.tools.selection.getWithHtml( editor ), this.compareOptions, 'Filler was removed


llei",,"NE","H","1;0;0"],
["Angraecum_eburneum",,"NE","H","1;0;0"],
["Aeranthes_ramosa",,"NE","H","1;0;0"],
["Angraecum_scottianum",,"NE","H","1;0;0"],
["Microcoelia_globulosa",,"NE","H","1;0;0"],
["Solenangis_aphylla",,"NE",,],
["Microcoelia_macrantha",,"NE","H","1;0;0"],
["Microcoelia_megalorrhiza",,"NE","H","1;0;0"],
["Microcoelia_bulbocalcarata",,"NE","H","1;0;0"],
["Rhipidoglossum_rutilum",,"NE","H","1;0;0"],
["Mystacidium_aliceae",,"NE","H","1;0;0"],
["Podangis_dactyloceras",,"NE","H","1;0;0"],
["Rangaeris_muscicola",,"NE","H","1;0;0"],
["Aerangis_biloba",,"NE","H","1;0;0"],
["Aerangis_thomsonii",,"NE","H","1;0;0"],
["Aerangis_verdickii",,"NE","H","1;0;0"],
["Cymbidium_kanran",,"NE","H","1;0;0"],
["Cymbidium_lowianum",,"NE","H","1;0;0"],
["Cymbidium_hookerianum",,"NE","H","1;0;0"],
["Cymbidium_mastersii",,"NE","H","1;0;0"],
["Telipogon_bowmanii",,"NE",,],
["Telipogon_nervosus",,"NE","H","1;0;0"],
["Telipogon_hystrix",,"NE","H","1;0;0"],
["Telipogon_pogonostalix",,"NE","H","1;0;0"],
["Telipogon_butcheri",,"NE","H","1;0;0"],
["Dichaea_panamensis",,"NE","H","1;0;0"],
["Dichaea_campanulata",,"NE","H","1;0;0"],
["Huntleya_gustavi",,,"H","1;0;0"],
["Huntleya_wallisii",,"NE","H","1;0;0"],
["Bifrenaria_atropurpurea",,"NE","H","1;0;0"],
["Psychopsis_papilio","butterfly orchid","NE","H","1;0;0"],
["Otostylis_lepida",,"NE","H","1;0;0"],
["Peristeria_lindenii",,"NE","H","1;0;0"],
["Peristeria_elata","Espiritu Santo","NE","H","2;0;0"],
["Coeliopsis_hyacinthosma",,"NE","H","1;0;0"],
["Lycaste_aromatica",,"NE","H","1;0;0"],
["Lycaste_cruenta",,"NE","H","1;0;0"],
["Xylobium_colleyi","Goat's mouth","NE","H","1;0;0"],
["Xylobium_pallidiflorum",,"NE","H","1;0;0"],
["Maxillaria_cymbidioides",,"NE","H","1;0;0"],
["Maxillaria_nasuta",,"NE","H","1;0;0"],
["Heterotaxis_santanae",,"NE","H","1;0;0"],
["Maxillaria_saragurensis",,"NE",,],
["Pholidocarpus_macrocarpus",,"VU","W","0;0;1"],
["Johannesteijsmannia_altifrons",,"NE","W","0;0;1"],
["Saribus_rotundifolius","round-leaf fountain palm","VU",,],
["Saribus_jeanneneyi",,"CR",,],
["Syag


stituir. Como era o estado de espírito dos brasileiros em geral naquele período? Eles não têm a menor idéia. Eles só têm idéia do estado de espírito de um grupo pequeno que não tinha mais de dez mil pessoas, aí eles ficam lambendo, lambendo e lambendo a sua história, as suas feridas, ignorando as feridas dos outros -- os outros que se danem, não é? Há quarenta anos eles só fazem isso, meu Deus do céu! Então, de todas as transformações pelas quais o Brasil passou -- transformações de ordem social, psicológicas, culturais, imaginárias etc. -- não há história! Se você perguntar como foi que os brasileiros, por exemplo, chegaram ao ponto em que pode haver estupros públicos, como está havendo no Rio de Janeiro. Como? Qual foi o processo que levou a isto? Ninguém sabe. Porque a mudança não foi documentada.

Você não tem sequer a documentação básica, que seria de ordem jornalística -- não tem! Então, isto quer dizer que o Brasil está vivendo uma espécie de noite. Eu me lembro do filme do *Excalibur*, em que a névoa se transforma em dragão, mas isso tem que ser no escuro, ninguém pode ver. Então, de repente apareceu o dragão aí e ninguém sabe de onde ele veio! Isto é uma tragédia cognitiva como nunca houve na história humana! Por exemplo, se você pegar a literatura brasileira, um dos modos mais diretos de você documentar a vivência humana é através da literatura. E aqui ela não existe! Tem cara que escreve coisas sobre o período dos "Anos de Chumbo". Olha: A literatura brasileira acabou com dois livros que versavam sobre os Anos de Chumbo, o *Pessach: A Travessia*, do Carlos Heitor Cony, e o *Quarup*, do Antônio Callado, que eram sobre os "sofrimentos horríveis" daquele pessoal esquerdista perante uma ditadura militar, que ainda levou quatro anos para começar a matar pessoas. Isso é uma visão hiperbólica, histérica, uma ampliação histérica da realidade e que serve de tema único para essa gente há quarenta anos. Só isso lhes interessa. De vez em quando, você vê algum sinal, por exemplo, no cinema -- na literatura eu não vi. Quando eu vi o filme *Central do Brasil*, eu falei "Bom, algo da vida brasileira naquele período aparece ali". Que é o algo? Bom, o garoto que está na cidade, levando tiro de tudo quanto é lado, foge e encontra no interiorzão uma vida mais humana, ligada à igreja\... Bom, todo mundo sabe que é assim! Mas esse interior ainda existe ou ele já era, naquele momento que o sujeito filma, idealizado? Parece-me que naquela cidadezinha para onde o garoto fugiu não existe a Rede Globo ainda. Mas agora a Rede Globo já chegou! Quer dizer, como mudaram essas cidadezinhas com o impacto da Rede Globo e desta elite iluminada que está moldando o Brasil à sua imagem e semelhança? Então eu imagino que aquele garotinho, hoje, já receberia lições de que ele tem que ser *gay* desde a infância -- ele já seria diferente, não é? Quer dizer, ele correu para o interior e, ao chegar lá, o progresso da civilização já chegou, ensinando a ele que ele tem que ter relações com os meninos da mesma idade e assim por diante. Quer dizer, já seria uma coisa totalment


 built with the .build function.
          // Now we can't check what the values in ParamSet are but we have this value in the TagForParam.paramType field
          // which shows us if the Param is a ParamSingle or ParamMulti. We need to check that in the AST in order to know that this
          // value is supposed to be.
          irBuilder.irBoolean(false), // needsTokenization (todo need to determine this from the tokenized value i.e. only `true` if there are no ParamMulti values)
          actionKind.lift(),
          actionReturningKind.lift(),
          labelExpr,
          make<SqlCompiledAction.DebugData>(
            Phase.CompileTime.lift(),
            call(PT.io_exoquery_unpackActionLazy).invoke(builder.irString(originalEncodedActionXR))
          )
        )
      )
    }
  }
}

data class SqlCompiledBatchActionExpr(
  val sqlBatchActionExpr: IrExpression,
  val queryString: String,
  val queryTokenized: Token,
  val actionKind: ActionKind,
  val actionReturningKind: ActionReturningKind,
  val label: String?,
  val phase: Phase,
  val originalEncodedBatchActionXR: String
) {
  context(CX.Scope, CX.Builder)
  fun plant(): IrExpression {
    val lifter = Lifter(this@Builder)
    val callParamsFromSqlBatchAction = sqlBatchActionExpr.callDispatch("params").invoke()
    val callBatchParamFromSqlBatchAction = sqlBatchActionExpr.callDispatch("batchParam").invoke()
    val inputType = sqlBatchActionExpr.type.simpleTypeArgs[0]
    val outputType = sqlBatchActionExpr.type.simpleTypeArgs[1]

    return with(lifter) {
      val labelExpr = if (label != null) label.lift() else irBuilder.irNull()
      makeWithTypes<SqlCompiledBatchAction<*, *, *>>(
        listOf(inputType, outputType),
        listOf(
          queryString.lift(), // value
          queryTokenized.token.lift(callParamsFromSqlBatchAction), // token
          // If there are no ParamMulti values then we know that we can use the original query built with the .build function.
          // Now we can't check what the values in ParamSet are but we have this value in the TagForParam.paramType field
          // which shows us if the Param is a ParamSingle or ParamMulti. We need to check that in the AST in order to know that this
          // value is supposed to be.
          irBuilder.irBoolean(false), // needsTokenization (todo need to determine this from the tokenized value i.e. only `true` if there are no ParamMulti values)
          actionKind.lift(),
          actionReturningKind.lift(),
          callBatchParamFromSqlBatchAction,
          labelExpr,
          make<SqlCompiledBatchAction.DebugData>(
            Phase.CompileTime.lift(),
            call(PT.io_exoquery_unpackBatchActionLazy).invoke(builder.irString(originalEncodedBatchActionXR))
          )
        )
      )
    }
  }
}
package io.exoquery.plugin.transform

class InterlacePartsParams<T>(val isPart: (T) -> Boolean, val concatPart: (T, T) -> T, val emptyPart: () -> T) {
  data class Components<T>(val parts: List<T>, val params: List<T>)

  fun invoke(values: List<T>): Components<T> {
    val identifyIsPart = isPart
    fun T.isPart(): Boolean = identifyIsPart(this@isPart)
    fun T.isParam(): Boolean = !this.isPart()

    val partsAccum = mutableListOf<T>()
    val paramsAccum = mutableListOf<T>()
    fun addPart(value: T) = partsAccum.add(value)
    fun addParam(value: T) = paramsAccum.add(value)
    fun appendToLastPart(value: T): Unit {
      if (partsAccum.isNotEmpty())


.CryptoKey); // $ExpectType KeyObject
}

{
    crypto.generateKeySync('aes', { length: 128 }); // $ExpectType KeyObject
}

{
    crypto.DiffieHellmanGroup('modp14');
    new crypto.DiffieHellmanGroup('modp14');

    const alice: crypto.DiffieHellmanGroup = crypto.getDiffieHellman('modp14');
    const bob: crypto.DiffieHellmanGroup = crypto.createDiffieHellmanGroup('modp14');

    // Check that DiffieHellman still has setPublicKey/setPrivateKey:
    crypto.createDiffieHellman(2).setPublicKey('abcd', 'hex');
    crypto.createDiffieHellman(2).setPrivateKey('abcd', 'hex');

    // Check permutations of `create` arguments
    crypto.createDiffieHellman(new ArrayBuffer(8));
    crypto.createDiffieHellman(new ArrayBuffer(8), 123);
    crypto.createDiffieHellman(new ArrayBuffer(8), new ArrayBuffer(8));
    crypto.createDiffieHellman(new ArrayBuffer(8), 'abcd', 'hex');
    crypto.createDiffieHellman('abcd', 'hex');
    crypto.createDiffieHellman('abcd', 'hex', 123);
    crypto.createDiffieHellman('abcd', 'hex', new ArrayBuffer(8));
    crypto.createDiffieHellman('abcd', 'hex', 'abcd', 'hex');

    // While DiffieHellmanGroup should not have them:
    // @ts-expect-error
    alice.setPublicKey('abcd', 'hex');
    // @ts-expect-error
    bob.setPrivateKey('abcd', 'hex');

    // Those 2 methods aside, DiffieHellmanGroup should work the same as DiffieHellman
    alice.generateKeys();
    bob.generateKeys();
    const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); // $ExpectType string
    const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); // $ExpectType string
    aliceSecret === bobSecret;
}

{
    const alice = crypto.createECDH('prime256v1');
    const bob = crypto.createECDH('prime256v1');

    alice.setPrivateKey('abcd', 'hex');
    bob.setPrivateKey(Buffer.from('abcd', 'hex'));

    alice.generateKeys();

    let alicePublicKey = alice.getPublicKey(); // $ExpectType Buffer
    alicePublicKey = alice.getPublicKey(null);
    alicePublicKey = alice.getPublicKey(null, 'compressed');
    alicePublicKey = alice.getPublicKey(undefined, 'hybrid');

    let bobPublicKey = bob.getPublicKey('hex'); // $ExpectType string
    bobPublicKey = bob.getPublicKey('hex', 'compressed');

    let aliceSecret = alice.computeSecret(bobPublicKey, 'hex'); // $ExpectType Buffer
    aliceSecret = alice.computeSecret(Buffer.from(bobPublicKey, 'hex'));

    let bobSecret = bob.computeSecret(alicePublicKey, 'hex'); // $ExpectType string
    bobSecret = bob.computeSecret(alicePublicKey.toString('hex'), 'hex', 'hex');

    aliceSecret.toString('hex') === bobSecret;
}

{
    crypto.setFips(false);
    crypto.setEngine('dynamic');
    crypto.setEngine('dynamic', crypto.constants.ENGINE_METHOD_RSA);
}

{
    crypto.getRandomValues(Buffer.alloc(8)); // $ExpectType Buffer
    crypto.getRandomValues(new Uint8Array(8)); // $ExpectType Uint8Array
    crypto.getRandomValues(new Int16Array(8)); // $ExpectType Int16Array
    crypto.getRandomValues(new Float32Array(8)); // $ExpectType Float32Array
    crypto.getRandomValues(new BigUint64Array(8)); // $ExpectType BigUint64Array
    crypto.getRandomValues(new DataView(new ArrayBuffer(


45035413 * fRec14[1];
		double fTemp40 = 0.9254498422517706 * (fRec14[0] + fRec14[2]);
		double fTemp41 = (fTemp39 + fTemp40) / (Ranode(TUBE_TABLE_6DJ8_250k, fRec13[1]) + 1e+05);
		fVec10[0] = fTemp41;
		fRec53[0] = fConst67 * (1.5e+03 * (fTemp41 + fVec10[1]) - fConst66 * fRec53[1]);
		fRec13[0] = Ftube(TUBE_TABLE_6DJ8_250k, fTemp40 + fRec53[0] + fTemp39 + -1.271609) + -45.22606666666667;
		double fTemp42 = fRec13[0] - fRec13[1];
		fRec12[0] = fConst8 * (fConst7 * fTemp42 - fConst3 * fRec12[1]);
		fRec54[0] = fConst11 * (fConst10 * fRec54[1] + 0.05 * fTemp42);
		fRec5[0] = ((iSlow1) ? fRec54[0] : fRec12[0]) + 0.6 * ((iSlow1) ? fRec11[0] : fRec6[0]);
		fRec4[0] = -(fConst61 * (fConst60 * fRec4[1] - (fRec5[0] + fRec5[1])));
		fRec3[0] = 0.9302847925323914 * (fRec4[0] + fRec4[1]) - 0.8605695850647829 * fRec3[1];
		fRec2[0] = fRec3[0] - (1.8405051250752198 * fRec2[1] + 0.8612942439318627 * fRec2[2]);
		double fTemp43 = 1.8508996845035413 * fRec2[1];
		double fTemp44 = 0.9254498422517706 * (fRec2[0] + fRec2[2]);
		double fTemp45 = (fTemp43 + fTemp44) / (Ranode(TUBE_TABLE_6DJ8_250k, fRec1[1]) + 1e+05);
		fVec11[0] = fTemp45;
		fRec55[0] = fConst6 * (8.2e+02 * (fTemp45 + fVec11[1]) - fConst5 * fRec55[1]);
		fRec1[0] = Ftube(TUBE_TABLE_6DJ8_250k, fTemp44 + fRec55[0] + fTemp43 + -0.797043) + -32.799634146341475;
		double fTemp46 = fRec1[0] - fRec1[1];
		fRec0[0] = fConst8 * (fConst7 * fTemp46 - fConst3 * fRec0[1]);
		fRec56[0] = fConst11 * (fConst10 * fRec56[1] + 0.05 * fTemp46);
		fRec57[0] = fSlow14 + 0.999 * fRec57[1];
		output0[i0] = FAUSTFLOAT(fRec57[0] * ((iSlow0) ? fRec56[0] : fRec0[0]));
		fRec67[0] = 0.9302847925323914 * (fRec63[1] + fRec63[2]) - 0.8605695850647829 * fRec67[1];
		fRec66[0] = fRec67[0] - (1.8405051250752198 * fRec66[1] + 0.8612942439318627 * fRec66[2]);
		double fTemp47 = 1.8508996845035413 * fRec66[1];
		double fTemp48 = 0.9254498422517706 * (fRec66[0] + fRec66[2]);
		double fTemp49 = (fTemp47 + fTemp48) / (Ranode(TUBE_TABLE_6DJ8_250k, fRec65[1]) + 1e+05);


0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2z"/><path d="M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1z"/></svg>');background-repeat:no-repeat;background-size:.75rem .75rem}.quarto-alternate-notebooks i.bi,.quarto-alternate-formats i.bi{margin-right:.4em}.quarto-notebook .cell-container{display:flex}.quarto-notebook .cell-container .cell{flex-grow:4}.quarto-notebook .cell-container .cell-decorator{padding-top:1.5em;padding-right:1em;text-align:right}.quarto-notebook h2,.quarto-notebook .h2{border-bottom:none}.sidebar .quarto-alternate-formats a,.sidebar .quarto-alternate-notebooks a{text-decoration:none}.sidebar .quarto-alternate-formats a:hover,.sidebar .quarto-alternate-notebooks a:hover{color:#0d6efd}.sidebar .quarto-alternate-notebooks h2,.sidebar .quarto-alternate-notebooks .h2,.sidebar .quarto-alternate-formats h2,.sidebar .quarto-alternate-formats .h2,.sidebar nav[role=doc-toc]>h2,.sidebar nav[role=doc-toc]>.h2{font-size:.875rem;font-weight:400;margin-bottom:.5rem;margin-top:.3rem;font-family:inherit;border-bottom:0;padding-bottom:0;padding-top:0px}.sidebar .quarto-alternate-notebooks h2,.sidebar .quarto-alternate-notebooks .h2,.sidebar .quarto-alternate-formats h2,.sidebar .quarto-alternate-formats .h2{margin-top:1rem}.sidebar nav[role=doc-toc]>ul a{border-left:1px solid #e9ecef;padding-left:.6rem}.sidebar .quarto-alternate-notebooks h2>ul a,.sidebar .quarto-alternate-notebooks .h2>ul a,.sidebar .quarto-alternate-formats h2>ul a,.sidebar .quarto-alternate-formats .h2>ul a{border-left:none;padding-left:.6rem}.sidebar .quarto-alternate-notebooks ul a:empty,.sidebar .quarto-alternate-formats ul a:empty,.sidebar nav[role=doc-toc]>ul a:empty{display:none}.sidebar .quarto-alternate-notebooks ul,.sidebar .quarto-alternate-formats ul,.sidebar nav[role=doc-toc] ul{padding-left:0;list-style:none;font-size:.875rem;font-weight:300}.sidebar .quarto-alternate-notebooks ul li a,.sidebar .quarto-alternate-formats ul li a,.sidebar nav[role=doc-toc]>ul li a{line-height:1.1rem;padding-bottom:.2rem;padding-top:.2rem;color:inherit}.sidebar nav[role=doc-toc] ul>li>ul>li>a


an> String.prototype.valueOf ( )

22.1.3.35.1 ThisStringValue ( <var>value</var> )

22.1.3.36 String.prototype [ %Symbol.iterator% ] ( )

+22.1.4 String 인스턴스의 프로퍼티

22.1.4.1 length

+22.1.5 String 이터레이터 객체

+22.1.5.1 %StringIteratorPrototype% 객체

22.1.5.1.1 %StringIteratorPrototype%.next ( )

22.1.5.1.2 %StringIteratorPrototype% [ %Symbol.toStringTag% ]

+22.2 RegExp (정규 표현식) 객체

+22.2.1 패턴 (Patterns)

22.2.1.1 정적 의미론: 조기 오류 (Early Errors)

22.2.1.2
          정적 �


: '%d'\n", frame_type);
		return -EINVAL;
	}
	if (!is_sta && !is_softap) {
		SLSI_NET_ERR(dev, "Invalid interface type %s\n", dev->name);
		return -EPERM;
	}
	if (is_sta && (ndev_vif->sta.vif_status != SLSI_VIF_STATUS_CONNECTED)) {
		SLSI_NET_ERR(dev, "sta is not in connected state\n");
		return -EPERM;
	}
	SLSI_NET_INFO(dev, "SetNumAntennas(vif:%u NumAntenna:%u ftype:%d)\n",
		      ndev_vif->ifnum, num_of_antennas, frame_type);

	req = fapi_alloc(mlme_set_num_antennas_req, MLME_SET_NUM_ANTENNAS_REQ, ndev_vif->ifnum, 0);
	if (!req) {
		SLSI_NET_ERR(dev, "failed to alloc set num antennas request\n");
		return -ENOMEM;
	}
	fapi_set_u16(req, u.mlme_set_num_antennas_req.vif, ndev_vif->ifnum);
	fapi_set_u16(req, u.mlme_set_num_antennas_req.number_of_antennas, num_of_antennas);
	fapi_set_u16(req, u.mlme_set_num_antennas_req.spare_1, frame_type);
	cfm = slsi_mlme_req_cfm(sdev, dev, req, MLME_SET_NUM_ANTENNAS_CFM);
	if (!cfm)
		return -EIO;

	if (fapi_get_u16(cfm, u.mlme_set_num_antennas_cfm.result_code) != FAPI_RESULTCODE_SUCCESS) {
		SLSI_NET_ERR(dev, "SetNumAntennasCfm(result:0x%04x) ERROR\n",
			     fapi_get_u16(cfm, u.mlme_set_num_antennas_cfm.result_code));
		ret = -EINVAL;
	}
	kfree_skb(cfm);
	return ret;
}
#endif

int slsi_mlme_set_multicast_ip(struct slsi_dev *sdev, struct net_device *dev, __be32 multicast_ip_list[], int count)
{
	struct sk_buff    *req;
	struct netdev_vif *ndev_vif = netdev_priv(dev);
	struct sk_buff    *cfm;
	int               r = 0;
	u32               ipaddr;
	u8                multicast_add[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
	u8 length = count * 4 + 5;
	size_t         alloc_data_size = 0;
	u8             fapi_ie_generic[] = { 0xdd, length, 0x00, 0x16, 0x32, 0x03, 0x01 };
	int i = 0;
	u16 version_info = 0x0100;

	if (slsi_is_test_mode_enabled()) {
		SLSI_NET_INFO(dev, "Skip sending signal, WlanLite FW does not support MLME_SET_IP_ADDRESS.request\n");
		return -EOPNOTSUPP;
	}

	WARN_ON(!SLSI_MUTEX_IS_LOCKED(ndev_vif->vif_mutex));

	alloc_data_size = length + 2;
	req = fapi_alloc(mlme_set_ip_address_req, MLME_SET_IP_ADDRESS_REQ, ndev_vif->ifnum, alloc_data_size);
	if (!req)
		return -ENOMEM;

	fapi_set_u16(req, u.mlme_set_ip_address_req.ip_version, version_info);
	fapi_set_memcpy(req, u.mlme_set_ip_address_req.multicast_address, multicast_add);

	fapi_append_data(req, fapi_ie_generic, sizeof(fapi_ie_generic));
	for (i = 0; i < count; i++) {
		ipaddr = htonl(be32_to_cpu(multicast_ip_list[i]));
		fapi_append_data(req, (const u8 *)(&ipaddr), sizeof(ipaddr));
	}

	SLSI_DBG2(sdev, SLSI_MLME, "slsi_mlme_set_ip_address(vif: %d)\n", ndev_vif->ifnum);
	cfm = slsi_mlme_req_cfm(sdev, dev, req, MLME_SET_IP_ADDRESS_CFM);
	if (!cfm)
		return -EIO;

	if (fapi_get_u16(cfm, u.mlme_set_ip_address_cfm.result_code) != FAPI_RESULTCODE_SUCCESS) {
		SLSI_NET_ERR(dev, "mlme_set_ip_address_cfm(result:0x%04x) ERROR\n", fapi_get_u16(cfm, u.mlme_set_ip_address_cfm.result_code));
		r = -EINVAL;
	}
	kfree_skb(cfm);
	return r;
}


 x => (x - y)
    public int test11(int x, int y) {
        return (0 - y) + x;
    }

    @Test
    @IR(failOn = {IRNode.ADD, IRNode.SUB})
    // Checks (x - y) + y => x
    public int test12(int x, int y) {
        return (x - y) + y;
    }

    @Test
    @IR(failOn = {IRNode.ADD, IRNode.SUB})
    // Checks y + (x - y) => x
    public int test13(int x, int y) {
        return y + (x - y);
    }

    @Test
    @IR(failOn = {IRNode.ADD})
    // Checks x + 0 => x
    public int test14(int x) {
        return x + 0;
    }

    @Test
    @IR(failOn = {IRNode.ADD})
    // Checks 0 + x => x
    public int test15(int x) {
        return 0 + x;
    }

    @Test
    @IR(counts = {IRNode.MUL, "1",
                  IRNode.ADD, "1"
                 })
    // Checks "a*b + a*c => a*(b+c)
    public int test16(int a, int b, int c) {
        return a*b + a*c;
    }

    @Test
    @IR(counts = {IRNode.MUL, "1",
                  IRNode.ADD, "1"
                 })
    // Checks a*b + b*c => b*(a+c)
    public int test17(int a, int b, int c) {
        return a*b + b*c;
    }

    @Test
    @IR(counts = {IRNode.MUL, "1",
                  IRNode.ADD, "1"
                 })
    // Checks a*c + b*c => (a+b)*c
    public int test18(int a, int b, int c) {
        return a*c + b*c;
    }

    @Test
    @IR(counts = {IRNode.MUL, "1",
                  IRNode.ADD, "1"
                 })
    // Checks a*b + c*a => a*(b+c)
    public int test19(int a, int b, int c) {
        return a*b + c*a;
    }

    @Test
    @IR(counts = {IRNode.SUB_I, "1",
                  IRNode.ADD_I, "1",
                  IRNode.CON_I, "1"})
    // Checks x + (con - y) => (x - y) + con
    // where con > 0
    public int test20(int x, int y) {
        return x + (10 - y) + 200; // transformed to (x - y) + 210;
    }

    @Test
    @IR(counts = {IRNode.SUB_I, "1",
                  IRNode.ADD_I, "1",
                  IRNode.CON_I, "1"})
    // Checks x + (con - y) => (x - y) + con
    // where con < 0
    public int test21(int x, int y) {
        return x + (-10 - y) + 200; // transformed to (x - y) + 190;
    }

    @Test
    @IR(counts = {IRNode.SUB_I, "1",
                  IRNode.ADD_I, "1",
                  IRNode.CON_I, "1"})
    // Checks (con - y) + x => (x - y) + con
    // where con > 0
    public int test22(int x, int y) {
        return (10 - y) + x + 200; // transformed to (x - y) + 210;
    }

    @Test
    @IR(counts = {IRNode.SUB_I, "1",
                  IRNode.ADD_I, "1",
                  IRNode.CON_I, "1"})
    // Checks (con - y) + x => (x - y) + con
    // where con < 0
    public int test23(int x, int y) {
        return x + (-10 - y) + 200; // transformed to (x - y) + 190;
    }

    @Test
    @IR(failOn = { IRNode.MAX, IRNode.MIN })
    @IR(counts = { IRNode.ADD, "1" })
    // Checks Math.max(a, b) + Math.min(a, b) => a + b
    publ


�入客户端，被破解后就可以解密双方数据，因为服务端也是相同的秘钥

3. 服务端生成会话密钥，进行非对称加密下发，咋一看这个会话密钥是加密后在网络上传输的，但实际上里面存在一个问题：由于公钥是公开的，因此任何人都能用公钥解开并获取你的会话密钥。因此，这个方案也不够完善。
我们再回顾一下这个方案，发现存在一个本质的问题：这个会话密钥是服务端单独生成的，那一定会导致一种结果：只要客户端能最终解密出来，那黑客也一定能解密出来。因为对于服务端而言，客户端和黑客都是密钥的接收方，两者是平等的，无法区别的。

4. 客户端主动生成密钥

    具体方式如下：

    服务端明文下发公钥给客户端；
    客户端生成一个随机数作为会话密钥，利用公钥加密后发送给服务端；
    服务端收到后，通过私钥对密文进行解密并获取随机数。
    可以看出这个过程里，黑客就算拦截了我们的加密数据，也会因为没有私钥而无法获取会话密钥。

    看起来，方案很完美了，但实际上里面仍然存在一个漏洞：如果最开始下发的明文公钥就是假的呢？这会导致的结果是：用户全程和一个中间黑客通信：信任黑客的公钥，然后自以为安全的进行数据通信，结果把所有个人信息都暴露给黑客了，最重要的是，服务端对此一无所知！

5.  公钥的合法性校验
   为了公钥的合法性校验，人们建立了专门颁发证书的机构："证书中心"（Certificate authority，简称CA），它会利用自己的私钥，将我们的公钥和相关信息进行加密，生成一个数字证书。在客户端内部，会存在一个受信任的根证书颁发机构，所以客户端在每次拿到一个公钥后，就去查询这个公钥是否在这里受信任证书列表中，如果不在，则认为公钥无效，不再进行后续操作。如果存在，再继续进行下一步认证。

   而这也和Https的实现机制相近。

### https 原理

前提 非常重要的事情—加密方案中的加密算法都是公开的，而密钥是保密的,没有密钥就不能解密，有了密钥就能解密 *

三个角色       客户端              代理服务器                  真实服务器

所谓拦截破解拦截，就是代理服务器可以看到客户端发给服务器的数据和服务端返回给客户端的数据，并可以篡改

指定信任证书 https 验证流程，（还有不指定的，就是会默认用根证书验证，但不能保证唯一性）

用我们的证书去申请 CA证书，一对CA公钥 和 CA私钥

CA公钥留在客户端


openapi.editor.actionSystem.TypedActionHandler
import com.maddyhome.idea.vim.VimTypedActionHandler
import java.lang.reflect.Field
import java.lang.reflect.Modifier

/**
 * It's needed to wait till JupyterCommandModeTypingBlocker is going to be registered using an extension point
 * After that, we would be able to register our typingHandler before (or after) the one from jupyter.
 */
internal class HandlerInjector {
  companion object {
    @JvmStatic
    fun inject(): TypedActionHandler? {
      try {
        val javaClass = TypedAction.getInstance().rawHandler::class.java
        val pythonHandler = javaClass.kotlin.objectInstance
        val field =
          javaClass.declaredFields.singleOrNull { it.name == "DEFAULT_RAW_HANDLER" || it.name == "editModeRawHandler" }
            ?: return null
        field.isAccessible = true

        val modifiersField: Field = Field::class.java.getDeclaredField("modifiers")
        modifiersField.isAccessible = true
        modifiersField.setInt(field, field.modifiers and Modifier.FINAL.inv())

        val originalHandler = field.get(pythonHandler) as? TypedActionHandler ?: return null
        val newVimHandler = VimTypedActionHandler(originalHandler)
        field.set(pythonHandler, newVimHandler)
        return originalHandler
      } catch (ignored: Exception) {
        // Ignore
      }
      return null
    }

    @JvmStatic
    fun notebookCommandMode(editor: Editor?): Boolean {
      return if (editor != null) {
        val inEditor = EditorHelper.getVirtualFile(editor)?.extension == "ipynb"
        return if (TypedAction.getInstance().rawHandler::class.java.simpleName.equals("JupyterCommandModeTypingBlocker")) {
          inEditor
        } else {
          // only true in command mode.
          // Set by `org.jetbrains.plugins.notebooks.ui.editor.actions.command.mode.NotebookEditorModeListenerAdapter`
          // appears to be null in non Notebook editors
          val allow_plain_letter_shortcuts =
            editor.contentComponent.getClientProperty(ActionUtil.ALLOW_PlAIN_LETTER_SHORTCUTS)
          inEditor && (allow_plain_letter_shortcuts != null && allow_plain_letter_shortcuts as Boolean)
        }
      } else {
        TypedAction.getInstance().rawHandler::class.java.simpleName.equals("JupyterCommandModeTypingBlocker")
      }
    }
  }
}
/*
 * Copyright 2003-2023 The IdeaVim authors
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE.txt file or at
 * https://opensource.org/licenses/MIT.
 */

package com.maddyhome.idea.vim.common

import com.intellij.application.options.CodeStyle
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.codeStyle.CommonCodeStyleSettings.IndentOptions
import com.maddyhome.idea.vim.api.VimIndentConfig

internal class IndentConfig private constructor(indentOptions: IndentOptions) : VimIndentConfig {
  private val indentSize = indentOptions.INDENT_SIZE
  private val tabSize = indentOptions.TAB_SIZE
  private val isUseTabs = indentOptions.USE_TAB_CHARACTER

  override fun getIndentSize(depth: Int): Int = indentSize * depth
  override fun createIndentByDepth(depth: Int): String = createIndentBySize(getIndentSize(depth))

  override fun createIndentBySize(size: Int): String {
    val tabCount: Int
    val spaceCount: Int
    if (isUseTabs) {
      tabCount = size / tab


:#667eea;font-size:1.6rem;margin-bottom:0.7rem;">Venturalink

          Connecting investors with entrepreneurs to create meaningful business relationships and drive economic progress in the digital age.

Platform

About Us

Features

Pricing

Contact

Resources

Blog

Help Center

Guides

API Docs

Legal

Terms of Service

Privacy Policy

Cookie Policy

Security

© 2025 Venturalink Platform. All rights reserved.

        Trusted by 10K+ users
        SOC 2 Compliant

      <svg width="40" height="40">
        <circle cx="20" cy="20" r="20"/>
      </svg>

<!DOCTYPE html>

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Investor Guide | Venturalink</title>
  <link rel="icon" type="image/png" href="V.png">
  <link rel="stylesheet" href="styles/mainindex.css">


!char.IsDigit(e.KeyChar) && (e.KeyChar.ToString().ToLower() != "h") && (e.KeyChar.ToString().ToLower() != "m"))
                e.Handled = true;
        }
        private void numericOnly_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && (e.KeyChar.ToString().ToLower() != "."))
                e.Handled = true;
        }
        private void numericOnly_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.KeyCode == K


    ].filter(Boolean).join('\n');
    return text;
  }

  get key(): string {
    return 'song-top';
  }

  get shortKey(): (string | null) {
    return 'top';
  }

  get helpMessage(): string {
    return 'Pokazuje najczęściej odtwarzane utwory';
  }

  get exampleUsages(): string[] {
    return [
      '',
      '3',
    ];
  }

  get parameters(): CommandParameters {
    return new CommandParametersBuilder()
      .withOptional('limit')
      .withDelimeter(' ')
      .build();
  }
}

export { SongTopCommand };
import { BaseError } from './base'

export class ApplicationError extends BaseError {
  public name = 'ApplicationError'
}

export class SignupValidationError extends ApplicationError {
  public name = 'SignupValidationError'
  public validEmail = false
  public enoughLength = false
  public includeNumber = false
  public includeAlphabet = false
  public includeSymbol = false
  public inAscii = false
  public notReserved = false
  public notSame = false

  public constructor(arg: Omit<Omit<SignupValidationError, 'name'>, 'message'>) {
    super()
    if (arg) {
      this.validEmail = arg.validEmail
      this.enoughLength = arg.enoughLength
      this.includeNumber = arg.includeNumber
      this.includeAlphabet = arg.includeAlphabet
      this.includeSymbol = arg.includeSymbol
      this.inAscii = arg.inAscii
      this.notReserved = arg.notReserved
      this.notSame = arg.notSame
    }
  }
}
export function debounce<F extends (...args: any) => Promise<any>>(func: F, delay: number) {
    let timeout = null as any
    const queue = [] as { resolve: Function, reject: Function }[]
    return ((...args: any) => {
        if (timeout) {
            clearTimeout(timeout)
        }
        timeout = setTimeout(() => {
            timeout = null
            func(...args).then(ret => {
                queue.forEach(({ resolve }) => resolve(ret))
            }).catch(err => {
                queue.forEach(({ reject }) => reject(err))
            }).finally(() => {
                queue.length = 0
            })
        }, delay)
        return new Promise((resolve, reject) => queue.push({ resolve, reject }))
    }) as any as F
}
import { AnyAction } from 'redux';
import { ThunkDispatch, ThunkAction } from 'redux-thunk';
import { ShoppingList, ShopEnum } from '../../types';
import { getCollectionsAndDocuments, getDataFromCollections } from '../../firebase';

// interface AddCollectionsAction extends Action {
//   type: ShopEnum;
//   collections: ShoppingList[];
// }

// export const addCollections = (collections: ShoppingList[]): ShopAction => {
//   return {
//     type: ShopEnum.ADD_COLLECTIONS,
//     collections,
//   };
// };

export interface FetchCollectionsStartAction extends AnyAction {
  type: ShopEnum;
}

export interface FetchCollectionsSuccessAction extends AnyAction {
  type: ShopEnum;
  collections: ShoppingList[];
}

export interface FetchCollectionsFailAction extends AnyAction {
  type: ShopEnum;
  errorMsg: string;
}

export const fetchCollectionsStart = (): ShopAction => {
  return {
    type: ShopEnum.FETCH_COLLECTIONS_START,
  };
};

export const fetchCollectionsSuccess = (collections: ShoppingList[]): ShopAction => {
  return {
    type: ShopEn


hkiG9w0BAQsFADBHMRMwEQYKCZImiZPyLGQBGRYDY29tMRcwFQYKCZImiZPyLGQBGRYHZXhhbXBsZTEXMBUGA1UEAwwOUlNBIEV4YW1wbGUgRFMwHhcNMTcxMTIxMTE1NDAyWhcNMjcxMjMxMTMzMDAwWjBIMRMwEQYKCZImiZPyLGQBGRYDY29tMRcwFQYKCZImiZPyLGQBGRYHZXhhbXBsZTEYMBYGA1UEAwwPUlNBIEV4YW1wbGUgQUNTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkNrPIBDXMU6fcyv5i+QHQAQ+K8gsC3HJb7FYhYaw8hXbNJa+t8q0lDKwLZgQXYV+ffWxXJv5GGrlZE4GU52lfMEegTDzYTrRQ3tepgKFjMGg6Iy6fkl1ZNsx2gEonsnlShfzA9GJwRTmtKPbk1s+hwx1IU5AT+AIelNqBgcF2vE5W25/SGGBoaROVdUYxqETDggM1z5cKV4ZjDZ8+lh4oVB07bkac6LQdHpJUUySH/Er20DXx30Kyi97PciXKTS+QKXnmm8ivyRCmux22ZoPUind2BKC5OiG4MwALhaL2Z2k8CsRdfy+7dg7z41Rp6D0ZeEvtaUp4bX4aKraL4rTfwIDAQABo2AwXjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAdBgNVHQ4EFgQUktwf6ZpTCxjYKw/BLW6PeiNX4swwHwYDVR0jBBgwFoAUw4MCnbwD6m2wpnoQ2sND8GryPN4wDQYJKoZIhvcNAQELBQADggEBAGuNHxv/BR6j7lCPysm1uhrbjBOqdrhJMR/Id4dB2GtdEScl3irGPmXyQ2SncTWhNfsgsKDZWp5Bk7+Otnty0eNUMk3hZEqgYjxhzau048XHbsfGvoJaMGZZNTwUvTUz2hkkhgpx9yQAKIA2LzFKcgYhelPu4GW5rtEuxu3IS6WYy3D1GtF3naEWkjUra8hQOhOl2S+CYHmRd6lGkXykVDajMgd2AJFzXdKLxTt0OYrWDGlUSzGACRBCd5xbRmATIldtccaGqDN1cNWv0I/bPN8EpKS6B0WaZcPasItKWpDC85Jw1GrDxdhwoKHoxtSG+odiTwB5zLbrn2OsRE5bV7E="
            )
        )

        val jwsValidator = create(true, emptyList())
        assertThat(
            jwsValidator.isCertificateChainValid(encodedAcsCerts, MASTERCARD_ROOT_CERTS)
        ).isFalse()
    }

    @Test
    fun createKeyStore_shouldCreateOrderedAliases() {
        val aliasesEnumeration = DefaultJwsValidator.createKeyStore(
            listOf(
                MASTERCARD_ROOT_CERT,
                MASTERCARD_ROOT_CERT,
                MASTERCARD_ROOT_CERT
            )
        ).aliases()

        assertThat(
            aliasesEnumeration.toList().toSet()
        ).containsExactly(
            "ca_0",
            "ca_1",
            "ca_2"
        )
    }

    @Ignore("Ignore tests with expired certificates")
    @Test
    fun getPayload_withRealJws_shouldReturnExpectAcsData() {
        val jwsValidator = create(true, MASTERCARD_ROOT_CERTS)
        val payload = jwsValidator.getPayload(MASTERCARD_ACS_JWS)
        val acsData = DefaultAcsDataParser(FakeErrorReporter()).parse(payload)

        assertThat(acsData.acsUrl)
            .isEqualTo("https://secure5.arcot.com/acs/api/tds2/txn/app/v1/creq")
        assertThat(acsData.acsEphemPubKey.encoded)
            .hasLength(311)
        assertThat(acsData.sdkEphemPubKey.encoded)
            .hasLength(311)
    }

    @Ignore("MOBDEVPROD-4")
    @Test
    fun isCertificateChainValid_withDiscoverCerts_shouldReturnTrue() {
        val jwsValidator = create(true, emptyList())
        assertThat(