op: 1px solid rgba(255, 255, 255, 0.3);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}
.thirty-days .what-is-this {
  text-align: center;
  margin-top: -20px;
  margin-bottom: 20px;
  background: transparent;
  color: #111111;
  padding: 30px 0;
}
@media screen and (min-width: 361px) {
  .thirty-days .what-is-this {
    width: 90%;
    margin: 0 auto;
  }
}
.thirty-days .what-is-this h4 {
  font-size: 1.5em;
  color: #111111;
  margin: 10px 0;
}
.thirty-days .what-is-this a {
  font-weight: 600;
  color: #020020;
}
.thirty-days .what-is-this a.btn {
  color: #FFFFFF;
}
.thirty-days .what-is-this div.desc {
  text-align: left;
  padding: 50px;
}
@media only screen and (max-width: 750px) {
  .thirty-days .what-is-this div.desc {
    padding: 0 20px;
  }
}
.thirty-days .what-is-this .cta {
  vertical-align: middle;
  padding: 30px;
}
.thirty-days .what-is-this .cta img {
  width: 120px;
  margin: 0 20px;
}
.thirty-days .container .big {
  font-size: 2.1em;
}
.thirty-days .container .small {
  font-size: 1.5em;
}
.thirty-days .btn-default.pill,
.thirty-days .btn-primary.pill,
.thirty-days .btn-success.pill,
.thirty-days .btn-info.pill,
.thirty-days .btn-warning.pill,
.thirty-days .btn-danger.pill {
  border-radius: 23px;
}
.thirty-days .vertical-middle {
  vertical-align: middle;
}
.thirty-days #intro {
  margin: 90px 0;
}
.thirty-days .section-cta a {
  color: #020020;
  font-weight: 400;
}
.thirty-days .section-cta a.btn {
  color: #f6f6f6;
}
.thirty-days #intro-masthead {
  background: linear-gradient(253deg, #1797d2, #70afff);
  background-size: 300% 300%;
  padding: 150px 0;
  overflow: none;
}
.thirty-days #intro-masthead .btn {
  background-color: #F4B43D;
  border: 1px solid #F4B43D;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.24);
}
.thirty-days #intro-masthead .btn:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.24);
}
.thirty-days .section-chapters a {
  color: #111111;
  text-decoration: none;
  border-bottom: 1px solid #70afff;
}
.thirty-days .section-chapters a:hover {
  color: #111111;
  border-bottom: 1px solid #70afff;
}
.thirty-days .section-chapters a.pagination {
  color: #ffffff;
}
.thirty-days .section-chapters .chapter-container.disabled {
  opacity: 0.8;
}
.thirty-days .section-chapters .chapter-container p {
  font-family: 'Open Sans', sans-serif;
}
.thirty-days .section-chapters .chapter-thumb {
  position: relative;
}
.thirty-days .section-chapters .chapter-thumb:hover {
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0


 contract. This can be avoided by wallets simply not allowing users to interact with protocols deployed in this manner.
* It's also worth mentioning that there are concerns around how this EIP will affect the cross chain experience. Ultimately a users private key may still have some control over the account's assets, depending on the exact protocols used on Ethereum and on other chains. It isn't really possible perfectly migrate the EOA at the same time, on all chains. The best thing that can be done is to educate the user that just because their account has been migrated doesn't mean that they are safe to now publicly reveal their private key. This seems like a reasonable request, especially since they'll want to retain the private key in case they want to use the address on any other EVM-like chain.

Something that may alleviate these issues to some degree would be to add an `EXTCODEHASH` check in `ecrecover`. If the recovered account has code, the precompile will revert. This would disallow migrated EOAs from using standards like [ERC-2612](./eip-2612.md).

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).

---
eip: 7928
title: Block-Level Access Lists
description: Enforced block access lists with storage locations and post-transaction state diffs
author: Toni Wahrstätter (@nerolation), Dankrad Feist (@dankrad), Francesco D`Amato (@fradamt), Jochem Brouwer (@jochem-brouwer), Ignacio Hagopian (@jsign)
discussions-to: https://ethereum-magicians.org/t/eip-7928-block-level-access-lists/23337
status: Draft
type: Standards Track
category: Core
created: 2025-03-31
---

## Abstract

This EIP introduces Block-Level Access Lists (BALs) that record all accounts and storage locations accessed during block execution, along with their post-execution values. BALs enable parallel disk reads, parallel transaction validation, and executionless state updates.

## Motivation

Transaction execution cannot be parallelized without knowing in advance which addresses and storage slots will be accessed. While [EIP-2930](./eip-2930.md) introduced optional transaction access lists, they are not enforced.

This proposal enforces access lists at the block level, enabling:

- Parallel disk reads and transaction execution
- State reconstruction without executing transactions
- Reduced execution time to `parallel IO + parallel EVM`

## Specification

### Block Structure Modification

We introduce a new field to the block header, `block_access_list_hash`, which contains the Keccak-256 hash of the RLP-encoded block access list. When no state changes are present, this field is the hash of an empty rlp list `0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347`, i.e. `keccak256(rlp.encode([]))`.

```python
class Header:
    # Existing fields
    ...

    block_access_list_hash: Hash32 = keccak256(rlp.encode(block_access_list))
```

The block body includes a `BlockAccessList` containing all account accesses and state changes. This field is RLP-encoded as a list of `AccountChanges`. When no state changes are present, this field is the empty RLP list `0xc0`, i.e. `rlp.encode([])`.

### RLP Data Structures

BALs use RLP encoding following the pattern: `address -> field -> block_access_index -> change`.

```python
# Type aliases for RLP encoding
Address = bytes  # 20-byte Ethereum address
StorageKey = bytes  # 32-byte storage slot key
StorageValue = bytes  # 32-byte storage value
CodeData = bytes  # Variable-length contract bytecode
BlockAccessIndex = uint16  # Block access index (0 for pre-execution, 1..n for transactions, n+1 for post-execution)
Balance = uint256  # Post-transaction balance in wei
Nonce = uint64  # Account nonce


SovietGrinderVehicle","SovietHeavyWalkerVehicle","SovietMortarcycle"},
		},
	}
}
OBJECT_LIST[BFME2] = OBJECT_LIST[BFME2ROTWK]

WAVE = 1
CurrentRoundLasts = 0
StartDelay = 3--30
TimeBetweenWaves = 10--60
UNITS = {}

SpawnMultiplier =
{
	["LevelSPECIAL"] = 3,
	["Level1"] = 1.3,
	["Level2"] = 1.1,
	["Level3"] = 1.1,
	["Level4"] = 1.1,
	["Level5"] = 1.1,
}

WAVE_TIMER_TEXT =
{
	[BFME2] = "SCRIPT:MGErebor_Wavetimer",
	[BFME2ROTWK] = "SCRIPT:MGErebor_Wavetimer",
	[CNC3TW] = "NAME:NextTurn",
	[CNC3KW] = "NAME:NextTurn",
	[CNCRA3] = "NAME:NextTurn",
	[CNCRA3U] = "NAME:NextTurn",
}

WAVE_TEXT =
{
	[BFME2] = "APT:StrategicHUDTurnNumber",
	[BFME2ROTWK] = "APT:StrategicHUDTurnNumber",
	[CNC3TW] = "MG:Turn",
	[CNC3KW] = "MG:Turn",
	[CNCRA3] = "MG:Turn",
	[CNCRA3U] = "MG:Turn",
}

ENEMIES_TEXT =
{
	[BFME2] = "",
	[BFME2ROTWK] = "",
	[CNC3TW] = "",
	[CNC3KW] = "",
	[CNCRA3] = "",
	[CNCRA3U] = "",
}

CoroutineTimerActive = false

function RetriggerCoroutine()
	LoseConditionCheck()
	CurrentRoundLasts = CurrentRoundLasts + 1
	if not CoroutineTimerActive then
		if not IsEnemyUnitAlive() or CurrentRoundLasts >= 3*TimeBetweenWaves then
			UNITS = {}
			if SAGE_GAME > CNCZH and not WAVE == 1 then
				SetTimerCounter(TimeBetweenWaves, WAVE_TIMER_TEXT[SAGE_GAME], "WaveTimer")
				SetCounter("CurrentWaveCounter", WAVE, WAVE_TEXT[SAGE_GAME])
			end
			SetScriptTimer(TimeBetweenWaves,Coroutine,1)
			CoroutineTimerActive = true
		end
	end
end

function Coroutine()
	ExecuteAction("DISPLAY_TEXT", "Next Wave: " .. WAVE)
	CoroutineTimerActive = false
	CurrentRoundLasts = 0
	UNITS = {}
	local LevelSpawner = function(LevelIndex, Multiplier)
		if WAVE >= 0 then
			if not LevelIndex then LevelIndex = 2 end
			if not Multiplier then Multiplier = 1 end
			local RandomSubList = OBJECT_LIST[SAGE_GAME][LevelIndex][random(getn(OBJECT_LIST[SAGE_GAME][LevelIndex]))]
			for i=1,WAVE*Multiplier,1 do
				local RandomUnitType = RandomSubList[random(getn(RandomSubList))]
				local UnitName = "object_" .. tostring(random(9999999))
				tinsert(UNITS, UnitName)
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT", UnitName, RandomUnitType, EnemyTeam, EnemyPlayerWaypoint)
				if SAGE_GAME >= CNC3KW then
					ExecuteAction("UNIT_SET_STANCE", UnitName, 1)
				end
				--ExecuteAction("NAMED_SET


readable element with an equivalent meaning icon
        Mastodon

    3. Attach an icon to the :before of an element, leaving content
        Mastodon

    4. Bypass the use of CSS classes, and put icon in content as an
    <svg> with <use> fragment identifiers.
         <svg>
           <use href="/svg/cc/icons/cc-icons.svg#icon-name"></use>
         </svg>

    5. Target an element precisely with less extraneous "icon name classes",
    using mostly CSS. (This could optionally be abstracted further to remove
    the need for the .icon class entirely.)

        Mastodon

        a:before {
            --icon-sprite: var(--icon-name);
            --icon-sprite- color: white;
            --icon-sprite-size: .8em;

    */

     /* set default icon sprite */
     --icon-sprite: url('../svg/cc/icons/cc-icons.svg#cc-logo');
     --icon-sprite-color: black;
     --icon-sprite-size: 1em;

     /* cc sprite names */
     --cc-logo: url('../svg/cc/icons/cc-icons.svg#cc-logo');
     --cc-heart: url('../svg/cc/icons/cc-icons.svg#cc-heart');
     --cc-heart-filled: url('../svg/cc/icons/cc-icons.svg#cc-heart-filled');
     --cc-quote: url('../svg/cc/icons/cc-icons.svg#cc-quote');

     /* font awesome sprite names */
     --fa-angle-down: url('../svg/font-awesome/icons/fa-icons.svg#fa-angle-down');
     --fa-angle-left: url('../svg/font-awesome/icons/fa-icons.svg#fa-angle-left');
     --fa-angle-right: url('../svg/font-awesome/icons/fa-icons.svg#fa-angle-right');
     --fa-angle-up: url('../svg/font-awesome/icons/fa-icons.svg#fa-angle-up');
     --fa-globe: url('../svg/font-awesome/icons/fa-icons.svg#fa-globe');
     --fa-heart: url('../svg/font-awesome/icons/fa-icons.svg#fa-heart');
     --fa-info: url('../svg/font-awesome/icons/fa-icons.svg#fa-info');
     --fa-right-angle: url('../svg/font-awesome/icons/fa-icons.svg#fa-right-angle');
     --fa-search: url('../svg/font-awesome/icons/fa-icons.svg#fa-search');

     --fa-instagram: url('../svg/font-awesome/icons/fa-icons.svg#fa-instagram');
     --fa-twitter: url('../svg/font-awesome/icons/fa-icons.svg#fa-twitter');
     --fa-facebook: url('../svg/font-awesome/icons/fa-icons.svg#fa-facebook');
     --fa-linkedin: url('../svg/font-awesome/icons/fa-icons.svg#fa-linkedin');
     --fa-mastodon: url('../svg/font-awesome/icons/fa-icons.svg#fa-mastodon');

}

/* establish svg sprite icon defaults */
.icon {
    display: inline-block;
    /* min-width: 30px;
    min-height: 30px; */
    height: 1em;
    width: 1em;

    font-size: var(--icon-sprite-size);
    background-color: var(--icon-sprite-color);
    -webkit-mask-repeat: n


t amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
    imageName: "https://picsum.photos/300?random=" + Math.random(),
    category: categories[Math.floor(Math.random() * categories.length)],
    comments: getNewsComments(commentCounts),
    commentsCount: commentCounts,
    createdAt: new Date(),
  };
});

const stories: StoryModel[] = new Array(10).fill(0).map((a) => {
  return {
    thumbnailImageName: "https://picsum.photos/200?random=" + Math.random(),
    storyImageName: "https://picsum.photos/700/1300?random=" + Math.random(),
    title:
      "Lorem ipsum dolor sit amet, consectetur adipiscing elit Lorem ipsum dolor sit amet",
    content:
      "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
    relatedNews: news[Math.floor(Math.random() * news.length)],
    createdAt: new Date(),
  };
});

export default {
  categories,
  news,
  highlightedNews,
  topCategories: categories,
  stories,
};
export const screen = (s: string, minMax?: string): string => {
  const screens = [{ ps: 0 }, { p: 320 }, { pw: 480 }, { t: 768 }, { tw: 992 }, { d: 1200 }, { dw: 1366 }];

  let media = '@media only screen and';
  screens.map((val: any, i: number) => {
    let key: any = Object.keys(val)[0];
    val = val[key];
    let next: any = screens[i + 1];
    if (next) next = next[Object.keys(next)[0]];

    if (key === s) {
      if (i === 0) media = `${media} (max-width: ${next - 1}px)`;
      else if (i === screens.length - 1) media = `${media} (min-width: ${val}px)`;
      else if (minMax) media = `${media} (${minMax}-width: ${val - (minMax === 'max' ? 1 : 0)}px)`;
      else media = `${media} (min-width: ${val}px) and (max-width: ${next - 1}px)`;
    }
  });

  return media;
};
import Sprite = Phaser.GameObjects.Sprite;
import Scene2D from "../scene/Scene2D";
import {Direction} from "../helper/Direction";

export default class Road {
  private sprite: Sprite;
  private direction: Direction;

  constructor(direction: Direction) {
    this.direction = direction;
  }

  create(
    scene: Scene2D,
    x: number,
    y: number,
    hasLinkFromUp: boolean,
    hasLinkFromRight: boolean,
    hasLinkFromBottom: boolean,
    hasLinkFromLeft: boolean
  ) {
    let frame = 16;
    let rotation = 0;
    let connections = [false, false, false];
    switch (this.direction) {
      case Direction.NORTH: {
        rotation = 0;
        connections = [hasLinkFrom


igation stack to get the page titles to generate the breadcrumbs.";

    public IAmAnAuthor AuthorInfo => new IeuanWalker();

    public IEnumerable<Uri> ImageUris => new List<Uri>
    {
        new Uri("https://raw.githubusercontent.com/IeuanWalker/Maui.Breadcrumb/master/ProdExample.gif"),
        new Uri("https://raw.githubusercontent.com/IeuanWalker/Maui.Breadcrumb/master/Example.gif")
    };

    public IList<Category> Categories => new List<Category>
    {
        Category.NAVIGATIONS, Category.SIDEBARS
    };

    public Uri ExternalUri => null;
}


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

#ifndef __DC_MCIF_WB_H__
#define __DC_MCIF_WB_H__

#include "dc_hw_types.h"

enum mmhubbub_wbif_mode {
	PACKED_444 = 0,
	PACKED_444_FP16 = 1,
	PLANAR_420_8BPC = 2,
	PLANAR_420_10BPC = 3
};

struct mcif_arb_params {

	unsigned int		time_per_pixel;
	unsigned int		cli_watermark[4];
	unsigned int		pstate_watermark[4];
	unsigned int		arbitration_slice;
	unsigned int		slice_lines;
	unsigned int		max_scaled_time;
	unsigned int		dram_speed_change_duration;
};

struct mcif_irq_params {
	unsigned int		sw_int_en;
	unsigned int		sw_slice_int_en;
	unsigned int		sw_overrun_int_en;
	unsigned int		vce_int_en;
	unsigned int		vce_slice_int_en;
};

/* / - mcif_wb_frame_dump_info is the info of the dumping WB data */
struct mcif_wb_frame_dump_info {
	unsigned int		size;
	unsigned int		width;
	unsigned int		height;
	unsigned int		luma_pitch;
	unsigned int		chroma_pitch;
	enum dwb_scaler_mode	format;
};

struct mcif_wb {
	const struct mcif_wb_funcs *funcs;
	struct dc_context *ctx;
	int inst;
};

struct mcif_wb_funcs {

	void (*warmup_mcif)(
		struct mcif_wb *mcif_wb,
		struct mcif_warmup_params *params);
	void (*enable_mcif)(struct mcif_wb *mcif_wb);

	void (*disable_mcif)(struct mcif_wb *mcif_wb);

	void (*config_mcif_buf)(
		struct mcif_wb *mcif_wb,
		struct mcif_buf_params *params,
		unsigned int dest_height);

	 void (*config_mcif_arb)(
		struct mcif_wb *mcif_wb,
		struct mcif_arb_params *params);

	 void (*config_mcif_irq)(
		struct mcif_wb *mcif_wb,
		struct mcif_irq_params *params);

	void (*dump_frame)(
		struct mcif_wb *mcif_wb,
		struct mcif_buf_params *mcif_params,
		enum dwb_scaler_mode out_format,
		unsigned int dest_width,
		unsigned int dest_height,
		struct mcif_wb_frame_dump_info *dump_info,
		unsigned char *luma_buffer,
		unsigned char *chroma_buffer,
		unsigned char *dest_luma_buffer,
		unsigned char *dest_chroma_buffer);
};

#endif


 &str) -> bool;

    async fn process_tx_hash(&self, tx_hash: &str) -> anyhow::Result<RpcTransaction>;

    async fn last_available_block(&self) -> anyhow::Result<u64>;
}

#[async_trait]
pub trait EventLooper {
    async fn start(
        &self,
        safe_address: &str,
        event_loader: &(impl EventLoader + Sync),
    ) -> anyhow::Result<()>;
}
<filename>twilight-interactions-derive/src/command/model/parse.rs<gh_stars>10-100
//! Parsing of struct fields and attributes

use proc_macro2::{Ident, Span, TokenStream};
use quote::quote;
use syn::{spanned::Spanned, Attribute, Error, Lit, Result, Type};

use crate::parse::{extract_option, find_attr, parse_desc, parse_name, AttrValue, NamedAttrs};

/// Parsed struct field
pub struct StructField {
    pub span: Span,
    pub ident: Ident,
    pub ty: Type,
    pub raw_attrs: Vec<Attribute>,
    pub attributes: FieldAttribute,
    pub kind: FieldType,
}

/// Type of a parsed struct field
pub enum FieldType {
    Required,
    Optional,
}

impl StructField {
    /// Parse a [`syn::Field`] as a [`StructField`]
    pub fn from_field(field: syn::Field) -> Result<Self> {
        let (kind, ty) = match extract_option(&field.ty) {
            Some(ty) => (FieldType::Optional, ty),
            None => (FieldType::Required, field.ty.clone()),
        };

        let attributes = match find_attr(&field.attrs, "command") {
            Some(attr) => FieldAttribute::parse(attr)?,
            None => FieldAttribute::default(),
        };

        Ok(Self {
            span: field.ty.span(),
            ident: field.ident.unwrap(),
            ty,
            raw_attrs: field.attrs,
            attributes,
            kind,
        })
    }

    /// Parse [`syn::FieldsNamed`] as a [`Vec<StructField>`]
    pub fn from_fields(fields: syn::FieldsNamed) -> Result<Vec<Self>> {
        fields.named.into_iter().map(Self::from_field).collect()
    }
}

impl FieldType {
    pub fn required(&self) -> bool {
        match self {
            FieldType::Required => true,
            FieldType::Optional => false,
        }
    }
}

/// Parsed type attribute
pub struct TypeAttribute {
    /// Rename the field to the given name
    pub name: Option<String>,
    /// Overwrite the field description
    pub desc: Option<String>,
    /// Whether the type is partial
    pub partial: bool,
    /// Whether the command should be enabled by default.
    pub default_permission: bool,
}

impl TypeAttribute {
    /// Parse a single [`Attribute`]
    pub fn parse(attr: &Attribute) -> Result<Self> {
        let meta = attr.parse_meta()?;
        let attrs = NamedAttrs::parse(meta, &["name", "desc", "partial", "default_permission"])?;

        let name = attrs.get("name").map(parse_name).transpose()?;
        let desc = attrs.get("desc").map(parse_desc).transpose()?;
        let partial = attrs
            .get("partial")
            .map(|v| v.parse_bool())
            .transpose()?
            .unwrap_or(false);
        let default_permission = attrs
            .get("default_permission")
            .map(|v| v.parse_bool())
            .transpose()?
            .unwrap_or(true);

        Ok(Self {
            name,
            desc,
            partial,
            default_permission,
        })
    }
}

/// Parsed field attribute
#[derive(Default)]
pub struct FieldAttribute {
    /// Rename the field to the given name
    pub rename: Option<String


-- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)

local S = require("syscall")
local ffi = require("ffi")
local fiber = require("lib.fibers.fiber")
local queue = require("lib.fibers.queue")
local mem = require("lib.stream.mem")
local file = require("lib.stream.file")
local rpc = require("lib.yang.rpc")
local data = require("lib.yang.data")
local path_lib = require("lib.yang.path")
local json_lib = require("lib.ptree.json")
local common = require("program.config.common")

local function open_socket(file)
   S.signal('pipe', 'ign')
   local socket = assert(S.socket("unix", "stream"))
   S.unlink(file)
   local sa = S.t.sockaddr_un(file)
   assert(socket:bind(sa))
   assert(socket:listen())
   return socket
end

local function validate_config(schema_name, revision_date, path, value_str)
   local parser = common.config_parser(schema_name, path)
   local value = parser(mem.open_input_string(value_str))
   return common.serialize_config(value, schema_name, path)
end

local request_handlers = {}
function request_handlers.get(schema_name, revision_date, path)
   return {method='get-config',
           args={schema=schema_name, revision=revision_date, path=path}}
end
function request_handlers.get_state(schema_name, revision_date, path)
   return {method='get-state',
           args={schema=schema_name, revision=revision_date, path=path}}
end
function request_handlers.set(schema_name, revision_date, path, value)
   assert(value ~= nil)
   local config = validate_config(schema_name, revision_date, path, value)
   return {method='set-config',
           args={schema=schema_name, revision=revision_date, path=path,
                 config=config}}
end
function request_handlers.add(schema_name, revision_date, path, value)
   assert(value ~= nil)
   local config = validate_config(schema_name, revision_date, path, value)
   return {method='add-config',
           args={schema=schema_name, revision=revision_date, path=path,
                 config=config}}
end
function request_handlers.remove(schema_name, revision_date, path)
   return {method='remove-config',
           args={schema=schema_name, revision=revision_date, path=path}}
end

local function read_request(client, schema_name, revision_date)
   local json = json_lib.read_json(client)
   if json == nil then
      -- The input pipe is closed.  FIXME: there could still be buffered
      -- responses; we should exit only once we've received them.
      io.stderr:write('Input pipe closed.\n')
      os.exit(0)
   end
   local id, verb, path = assert(json.id), assert(json.verb), json.path or '/'
   path = path_lib.normalize_path(path)
   if json.schema then schema_name = json.schema end
   if json.revision then revision_date = json.revision end
   local handler = assert(request_handlers[data.normalize_id(verb)])
   local req = handler(schema_name, revision_date, path, json.value)
   local function print_reply(reply, output)
      local value
      if verb == 'get' then value = reply.config
      elseif verb == 'get-state' then value = reply.state
      end
      json_lib.write_


}

        /// <summary>
        /// Defines when the cursor should stop
        /// </summary>
        ContinueMinMaxCursor ContinueMinMaxCursor { get; set; }
    }

    public class MinMaxQueryParameters : CustomRequestParameters, IMinMaxQueryParameters
    {
        protected MinMaxQueryParameters()
        {
        }

        protected MinMaxQueryParameters(IMinMaxQueryParameters source) : base(source)
        {
            if (source == null)
            {
                return;
            }

            PageSize = source.PageSize;
            SinceId = source.SinceId;
            MaxId = source.MaxId;
            ContinueMinMaxCursor = source.ContinueMinMaxCursor;
        }

        /// <inheritdoc/>
        public int PageSize { get; set; }
        /// <inheritdoc/>
        public long? SinceId { get; set; }
        /// <inheritdoc/>
        public long? MaxId { get; set; }
        /// <inheritdoc/>
        public ContinueMinMaxCursor ContinueMinMaxCursor { get; set; }
    }
}


의 차이 비유](#master와-dp300의-차이-비유)
6. [실제 예제](#실제-예제)
7. [개념을 마무리하며](#개념을-마무리하며)

---

## 데이터베이스란?
데이터베이스(Database)는 **정보(데이터)를 체계적으로 저장하고 관리하는 장소**입니다.

- **비유**: 데이터베이스는 도서관과 비슷합니다. 도서관에는 많은 책(정보)이 정리되어 있고, 쉽게 찾을 수 있도록 카테고리(구조)와 시스템(관리 방법)이 마련되어 있습니다.

### 데이터베이스 안의 구성 요소:
- **데이터베이스 서버**: 도서관 건물. 데이터베이스를 실행하고 데이터를 저장/검색하는 시스템.
- **데이터베이스**: 특정 주제의 책들을 모아놓은 섹션.
  - 예: "회원 정보 데이터베이스", "상품 데이터베이스"
- **테이블(Table)**: 책장. 데이터를 저장하는 구조.
  - 예: "회원 테이블"에는 회원들의 이름, 나이, 주소 정보가 들어감.
- **행(Row)와 열(Column)**: 책장에 꽂혀 있는 책과 책의 페이지.
  - 예: "회원 테이블"의 한 행(Row)은 한 사람의 정보.
  - 열(Column)은 각각의 속성(이름, 나이, 주소).

---

## Master 데이터베이스란?

**Master 데이터베이스는 SQL Server라는 도서관의 총괄 관리자** 역할을 합니다.

- **비유**: Master 데이터베이스는 도서관의 관리 시스템이나 운영 매뉴얼입니다.
  - 도서관에 새 책장을 추가하거나, 다른 도서관(데이터베이스)을 연결하는 규칙을 관리.


(sp),a0     ; Adresse von x2
          jsr     _fpset2       ; in FP2 schieben
L1:       cmp.w   #$0802,fpstat ; auf MC68881 bereitschaft warten
          bne.s   L1
          move.w  #$08a2,fpcmd  ; add
          jsr     _fpget1       ; und Ergebnis aus FP1 in d0-d1 schieben
          rts

        .globl _ADDL_           ; interne Funktion von DRI
_ADDL_:   movem.l  d0-d3,-(sp)  ; x1 & x2 stehen in d0-d3 -> auf Stack
          bsr.s    _dpadd       ; dann add durchfhren
          add.l    #$10,sp
          rts

        .end


 really a superclass call
				invokeOpCode = INVOKESPECIAL;
			}

			if(fl.isInterface){
				invokeOpCode = INVOKEINTERFACE;
			}

			// invoke special for private and superclass of current class
			Type retTypeForFunction = funcType.realReturnType;
			if (null != retTypeForFunction && !retTypeForFunction.equals(returnType)) {
				// only really used here: ia2 int[] = ia1.clone(); //method
				// returns Object, so we cast to int[]
				// MHA: since this is only relevant for the above case with
				// arrays online, diverting the owner to =
				// returnType.getCheckCastType()!
				bcoutputter.visitMethodInsn(invokeOpCode, returnType.getCheckCastType(), name, getNormalMethodInvokationDesc(funcInputs, retTypeForFunction));
				bcoutputter.visitTypeInsn(CHECKCAST, returnType.getCheckCastType());
			} else {
				Pair<String, String> accessorNameOrig = fl.getPrivateStaticAccessorRedirectFuncGetter();
				if (null != accessorNameOrig && !isInclInitCreator) {
					/*
					 * { mv.visitFieldInsn(GETFIELD, "A/Waskle$Waskle2",
					 * "this$0", "LA/Waskle;"); mv.visitMethodInsn(INVOKESTATIC,
					 * "A/Waskle", "access$0", "(LA/Waskle;)V"); }
					 */

					name = accessorNameOrig.getA();

					ArrayList<Type> funcInputsAccessor = new ArrayList<Type>(funcInputs.size()+1);
					funcInputsAccessor.add(fl.getOwnerType());
					funcInputsAccessor.addAll(funcInputs);

					bcoutputter.visitMethodInsn(INVOKESTATIC, fl.owner, name, getNormalMethodInvokationDesc(funcInputsAccessor, returnType));
				} else {
					String owner = fl.owner;
					if (ownerType instanceof NamedType){//bit of a hack to address this.myFuncCall()//where this is a local class
						NamedType nt = (NamedType)ownerType;
						ClassDef setCD = nt.getSetClassDef();
						if(null != setCD){
							if(setCD.isLocalClass){
								owner = nt.getBytecodeType();
								owner = owner.substring(1, owner.length()-1);
							}
						}
					}
					boolean isIface = false;
					if(fl.isRHSOfTraitSuperChainable != null) {
						invokeOpCode = INVOKEINTERFACE;
						name =fl.isRHSOfTraitSuperChainable.getB();
						owner = this.currentClassDefObj.peek().bcFullName();
						isIface = true;
					}
					else if(fl.isRHSOfTraitSuper) {//redirect super trait call to static method
						invokeOpCode = INVOKESTATIC;
						name += "$traitM";
						funcInputs = new ArrayList<Type>(funcInputs);
						funcInputs.add(0, ownerType);
						isIface = true;
					}else if(invokeOpCode == INVOKEINTERFACE) {
						isIface = true;
					}

					bcoutputter.visitMethodInsn(invokeOpCode, owner, name, getNormalMethodInvokationDesc(funcInputs, returnType), isIface);
				}
			}

		} else {
			throw new RuntimeException(String.format("%s found which is unexpected", funcLoc.getClass()));
		}

		if (!((Node) funcInvoke).getShouldBePresevedOnStack() && !(returnType instanceof PrimativeType && ((PrimativeType) returnType).type == PrimativeTypeEnum.VOID)) {
			// if void u dont need pop

			boolean dopop=true;

			boolean delOnUnusedRet = testgetShouldBeDeletedOnUsusedReturn(funcType, funcL


          if (set.has(num)) {
            arr.push(num);
            set.delete(num);
          }
        }

        return arr;
    };

    return intersection(nums1, nums2);
  }

  // leetcode 350.两个数组的交集 II
  intersect (nums1, nums2) {
    /**
     * @param {number[]} nums1
     * @param {number[]} nums2
     * @return {number[]}
     */
    var intersect = function(nums1, nums2) {
      let map = new Map();
      let arr = [];

      for (const num of nums1) {
        if (map.has(num))
          map.set(num, map.get(num) + 1);
        else
          map.set(num, 1);
      }

      for (const num of nums2) {
        if (map.has(num)) {
          arr.push(num);
          let result = map.get(num) - 1;
          map.set(num, result);

          if (result === 0)
            map.delete(num);
        }
      }

      return arr;
    };

    return intersect(nums1, nums2);
  }

  // leetcode 347. 前K个高频元素
  topKFrequent (nums, k) {
    /**
     * @param {number[]} nums
     * @param {number} k
     * @return {number[]}
     * 原版
     */
    var topKFrequent = function(nums, k) {
        let map = new Map();
        // 统计 数组中每一个元素出现频率
        for (const num of nums) {
          if (map.has(num))
            map.set(num, map.get(num) + 1);
          else
            map.set(num, 1);
        }

        // 优先队列：使用的时候指定优先级比较的方式
        let queue = new MyPriorityQueue();
        // 变更优先队列中的定义优先级的方法
        queue.updateCompare((elementA, elementB) => {
          // 原的比较算法是 值越大 优先级越大
          // 现在改为 值越小 优先级越大
          if (elementA.value < elementB.value)
            return 1;
          else if (elementA.value > elementB.value)
            return -1;
          else
            return 0;
        });

        for (const key of map.keys()) {
          if (queue.getSize() < k)
            queue.enqueue({"key": key, "value": map.get(key)});
          else if (map.get(key) > queue.getFront().value) {
            queue.replaceFront({"key": key, "value": map.get(key)});
            // queue.dequeue();
            // queue.enqueue({"key": key, "value": map.get(key)});
          }
        }

        let result = [];
        for (var i = 0; i < k; i++) {
          result.push(queue.dequeue().key);
        }
        return result;
    };

    // 精简版
    var topKFrequent = function(nums, k) {
        let map = new Map();
        // 统计 数组中每一个元素出现频率
        for (const num of nums) {
          if (map.has(num))
            map.set(num, map.get(num) + 1);
          else
            map.set(num,


D 中国当代政治运动史数据库
  </title>
  <link href="../../../../Emblem_of_the_PCP-Shining_Path.svg.ico" rel="icon" type="image/x-icon"/>
 </head>
 <body>
  <meta content="中共中央中南局对取缔反动会道门工作的指示" property="title"/>
  <meta content="1953-2-0" property="date"/>
  <meta content="" property="authors"/>
  <script type="application/ld+json">
   {"title": "\u4e2d\u5171\u4e2d\u592e\u4e2d\u5357\u5c40\u5bf9\u53d6\u7f14\u53cd\u52a8\u4f1a\u9053\u95e8\u5de5\u4f5c\u7684\u6307\u793a", "date": "1953-2-0", "authors": [], "contents": [{"text": "\u4e2d\u5171\u4e2d\u592e\u4e2d\u5357\u5c40\u5bf9\u53d6\u7f14\u53cd\u52a8\u4f1a\u9053\u95e8\u5de5\u4f5c\u7684\u6307\u793a", "type": "title"}, {"text": "\u5179\u5c06\u6768\u5947\u6e05\u540c\u5fd7\u5173\u4e8e\u53d6\u7f14\u53cd\u52a8\u4f1a\u9053\u95e8\u7684\u60c5\u51b5\u4e0e\u610f\u89c1\u7684\u62a5\u544a\u8f6c\u53bb\uff0c\u5176\u4e2d\u6240\u63d0\u5404\u9879\u610f\u89c1\u6211\u4eec\u5747\u540c\u610f\uff0c\u8bf7\u5404\u7ea7\u515a\u59d4\u52a1\u4e8e\u6700\u8fd1\u8ba8\u8bba\u4e00\u6b21\uff0c\u68c0\u67e5\u6240\u5c5e\u5730\u533a\u8be5\u9879\u5de5\u4f5c\u51c6\u5907\u4e0e\u8fdb\u884c\u7684\u60c5\u51b5\uff0c\u4f5c\u51fa\u5177\u4f53\u90e8\u7f72\u3001\u63aa\u65bd\uff0c\u52a1\u987b\u6309\u6211\u4eec2\u6708\u00d7\u65e5\u7535\u7684\u610f\u89c1\uff0c\u7531\u515a\u59d4\u4eb2\u81ea\u638c\u63e1\uff0c\u7edd\u4e0d\u8981\u7b80\u5355\u59d4\u4e4b\u4e8e\u516c\u5b89\u90e8\u95e8\u800c\u4e0d\u9


.nbLines; i++) {
        final isoValue = (maxValue - minValue) / d.nbLines * (i);
        contourPainter.color = blueGreenRedSquential
            .getColor((isoValue + minValue) / (maxValue - minValue));

        final binaryImage = Uint8List(values.length);

        // first step of the marching square algorithm
        // all the cells greater than are = 1
        for (var i = 0; i < values.length; i++) {
          binaryImage[i] = (values[i] > isoValue) ? 1 : 0;
        }

        const lim = points - 1;
        const maxElements = lim * lim;
        final contouringGrid = Uint8List(maxElements);
        final widthCell = paddedWidth / points;
        final heightCell = paddedHeight / points;

        final halfWidthCell = widthCell / 2;
        final halfHeightCell = heightCell / 2;

        final cachedValues = <(int, int, int)>[];

        // second step of the algorithm
        // we place a "vertex" between 4 cells and we apply some bit operations
        // final values between 0 and 15
        for (var i = 0; i < maxElements; i++) {
          final firstIndex = i + i ~/ lim;
          final topLeftCorner = binaryImage[firstIndex];
          final topRightCorner = binaryImage[firstIndex + 1];
          final bottomRightCorner = binaryImage[firstIndex + points + 1];
          final bottomLeftCorner = binaryImage[firstIndex + points];

          final a = topLeftCorner << 3 |
              topRightCorner << 2 |
              bottomRightCorner << 1 |
              bottomLeftCorner;
          contouringGrid[i] = a;

          final x = i % lim;
          final y = i ~/ lim;

          if (a != 0 && a != 15) {
            cachedValues.add((x, y, a));
          }
        }

        if (cachedValues.isEmpty) {
          continue;
        }

        final path = Path();

        // third step of the algorithm
        //  we draw the contour
        // there's  mapping taking the value (0-15) to a pattern
        for (final node in cachedValues) {
          final v = node.$3;

          final o = paddedTopLeftCorner.translate(
              widthCell * (node.$1 + 0.5), (heightCell * (0.5 + node.$2)));

          switch (v) {
            case 1:
            case 14:
              path.moveTo(o.dx, o.dy + halfHeightCell);
              path.relativeLineTo(halfWidthCell, heightCell);

              break;
            case 2:
            case 13:
              path.moveTo(o.dx + halfWidthCell, o.dy + heightCell);
              path.relativeLineTo(widthCell, halfHeightCell);
              break;
            case 3:
            case 12:
              path.moveTo(o.dx, o.dy + halfHeightCell);
              path.relativeLineTo(widthCell, halfHeightCell);
              break;
            case 4:
            case 11:
              path.moveTo(o.dx + halfWidthCell, o.dy);
              path.relativeLineTo(widthCell, halfHeightCell);
              break;
            case 5:
              path.moveTo(o.dx, o.dy + halfHeightCell);
              path.relativeLineTo(halfWidthCell, 0);

              path.moveTo(o.dx + halfWidthCell, o.dy + heightCell);
              path.relativeLineTo(widthCell, halfHeightCell);
              break;
            case 6:
            case 9:
              path.moveTo(o.dx + halfWidthCell, o.dy);
              path.relativeLineTo(halfWidthCell, heightCell);
              break;
            case 7:
            case 8:
              path.moveTo(o.dx, o.dy + halfHeightCell);
              path.relativeLineTo(halfWidthCell, 0);
              break;
            case 10:
              path.moveTo(o.dx, o


File.comment?.let { zipFileSigned.setComment(it) }
				zipFileSigned.setLevel(compressionLevel)

				zipFile.entries().iterator().forEach { e ->
					zipFileSigned.putNextEntry(e)

					val mustBeSigned = filesToSign.any { Pattern.matches(it, e.name) }

					if (mustBeSigned) {
						val fileContentToSign = zipFile.getInputStream(e).readAllBytes()

						val fileToSign = buildDirectory.resolve(e.name).toFile()
						fileToSign.deleteOnExit()
						fileToSign.parentFile.mkdirs()
						fileToSign.createNewFile()

						val fileToSignOutputStream = FileOutputStream(fileToSign)
						fileToSignOutputStream.write(fileContentToSign)
						fileToSignOutputStream.close()

						execProvider.exec {
							commandLine(
								"codesign",
								"-vvv",
								"--display",
								"--strict",
								"--force",
								"--deep",
								"--options=runtime",
								"--timestamp",
								"-s",
								"Developer ID Application: ${signingId.get()}",
								fileToSign.path,
							)
						}

						zipFileSigned.write(fileToSign.inputStream().readAllBytes())
					} else {
						zipFileSigned.write(zipFile.getInputStream(e).readAllBytes())
					}
					zipFileSigned.closeEntry()
				}
				zipFileSigned.finish()

				val signedJarOutputLocation = jarFilesSignedOutputDir.resolve(jarFile.name)
				Files.copy(zipFileSignedPath, signedJarOutputLocation, StandardCopyOption.REPLACE_EXISTING)
			}
		}
	}

tasks.register<MacSignLibrariesTask>("prepareMacBundle") {
	onlyIf("OS is not Mac") {
		Platform.isMac()
	}
	dependsOn("copyDependencies", "copyJar")

	// skip this task if no signingId is configured
	if (macSigningId != null) {
		signingId = macSigningId
	} else {
		enabled = false
	}

	jarFiles
		.setDir(layout.buildDirectory.dir("jars"))
		.include(
			"jna-*.jar",
			"jansi-*.jar",
		)
	jarFilesSignedOutputDir =
		Path.of(
			layout.buildDirectory
				.dir("jars")
				.get()
				.asFile
				.toURI(),
		)
	filesToSign =
		listOf(
			"com/sun/jna/darwin-.*/libjnidispatch.jnilib",
			"org/fusesource/jansi/internal/native/Mac/.*/libjansi.jnilib",
		)
	compressionLevel = Deflater.BEST_COMPRESSION
}

tasks.register("packageDmg", JPackageTask::class) {
	group = "Distribution"
	description = "Creates a DMG package for installation."

	onlyIf("OS is not Mac") {
		Platform.isMac()
	}
	dependsOn("prepareMacBundle")

	applyDefaults()
	macConfigs()

	type = ImageType.DMG
}

tasks.register("packagePkg", JPackageTask::class) {
	group = "Distribution"
	description = "Creates a PKG package for installation."

	onlyIf("OS is not Mac") {
		Platform.isMac()
	}
	dependsOn("prepareMacBundle")

	applyDefaults()
	macConfigs()

	type = ImageType.PKG
}

tasks.register("packageMac") {
	group = "Distribution"
	description = "Creates DMG and PKG packages for Mac systems."

	dependsOn(
		"packagePkg",
		"packageDmg",
	)
}

// windows packaging

tasks.register("packageMsi", JPackageTask::class) {
	group = "Distribution"
	description = "Creates a MSI package for installation."

	// we need the following for the iscc task which reuses the exe-file from this task
	// to keep it we put it in /build/jpfiles
	// jp will however fail if


 "" + s_f + sf_IN);
        test("55.0T", "" + s_f + s_c);
        test("55.0-42.0", "" + s_f + sf_fM);
        test("55.025", "" + s_f + s_b);
        test("55.0null", "" + s_f + f_oN);
        test("55.0-1410065408", "" + s_f + s_lM);
        test("55.08.0", "" + s_f + s_d);
        test("55.055.0", "" + s_f + s_f);
        test("55.097000000", "" + s_f + s_i);
        test("55.0-9900", "" + s_f + f_sM);
        test("55.0935228928", "" + s_f + s_l);
        test("55.0-8400", "" + s_f + sf_sM);
        test("55.0C(82)", "" + s_f + s_o);
        test("55.0null", "" + s_f + sf_oNtS);
        test("55.0true", "" + s_f + s_bl);
        test("55.03900", "" + s_f + s_s);
        test("55.0null", "" + s_f + sf_oN);
        test("55.094000000", "" + s_f + f_I);
        test("55.0null", "" + s_f + f_IN);
        test("55.0true", "" + s_f + sf_bl);
        test("55.05500", "" + s_f + sf_s);
        test("55.0-2900", "" + s_f + s_sM);
        test("55.0-194313216", "" + s_f + sf_l);
        test("55.012", "" + s_f + s_strU1);
        test("55.0C(87)", "" + s_f + sf_o);
        test("55.091", "" + s_f + s_strU2);
        test("55.021", "" + s_f + f_strU1);
        test("55.018", "" + s_f + f_strU2);
        test("55.0null", "" + s_f + f_iAN);
        test("55.0null", "" + s_f + s_oN);
        test("55.0\u045180", "" + s_f + s_strU);
        test("55.0C", "" + s_f + sf_c);
        test("55.075", "" + s_f + sf_str);
        test("55.0-43", "" + s_f + s_bM);
        test("55.080", "" + s_f + sf_b);
        test("55.0null", "" + s_f + s_IN);
        test("55.0-52.0", "" + s_f + s_fM);
        test("55.075000000", "" + s_f + sf_i);
        test("55.044", "" + s_f + f_b);
        test("55.0-1705032704", "" + s_f + sf_lM);
        test("55.0null", "" + s_f + f_oAN);
        test("55.083.0", "" + s_f + f_d);
        test("55.0I", "" + s_f + f_c);
        test("55.094.0", "" + s_f + f_f);
        test("55.012.0", "" + s_f + sf_d);
        test("55.0-99.0", "" + s_f + f_dM);
        test("55.017.0", "" + s_f + sf_f);
        test("55.0-84.0", "" + s_f + sf_dM);
        test("55.058000000", "" + s_f + f_i);


	}
		return retval;
	}
	// $ANTLR end "operation"

	public static class param_return extends ParserRuleReturnScope {
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};

	// $ANTLR start "param"
	// TarsParser.g:82:1: param : ( TARS_ROUTE_KEY )? ( TARS_OUT )? type TARS_IDENTIFIER -> ^( TARS_PARAM[$TARS_IDENTIFIER.text, $TARS_OUT, $TARS_ROUTE_KEY] type ) ;
	public final TarsParser.param_return param() throws RecognitionException {
		TarsParser.param_return retval = new TarsParser.param_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token TARS_ROUTE_KEY59=null;
		Token TARS_OUT60=null;
		Token TARS_IDENTIFIER62=null;
		ParserRuleReturnScope type61 =null;

		Object TARS_ROUTE_KEY59_tree=null;
		Object TARS_OUT60_tree=null;
		Object TARS_IDENTIFIER62_tree=null;
		RewriteRuleTokenStream stream_TARS_ROUTE_KEY=new RewriteRuleTokenStream(adaptor,"token TARS_ROUTE_KEY");
		RewriteRuleTokenStream stream_TARS_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token TARS_IDENTIFIER");
		RewriteRuleTokenStream stream_TARS_OUT=new RewriteRuleTokenStream(adaptor,"token TARS_OUT");
		RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");

		try {
			// TarsParser.g:83:2: ( ( TARS_ROUTE_KEY )? ( TARS_OUT )? type TARS_IDENTIFIER -> ^( TARS_PARAM[$TARS_IDENTIFIER.text, $TARS_OUT, $TARS_ROUTE_KEY] type ) )
			// TarsParser.g:83:4: ( TARS_ROUTE_KEY )? ( TARS_OUT )? type TARS_IDENTIFIER
			{
			// TarsParser.g:83:4: ( TARS_ROUTE_KEY )?
			int alt17=2;
			int LA17_0 = input.LA(1);
			if ( (LA17_0==TARS_ROUTE_KEY) ) {
				alt17=1;
			}
			switch (alt17) {
				case 1 :
					// TarsParser.g:83:4: TARS_ROUTE_KEY
					{
					TARS_ROUTE_KEY59=(Token)match(input,TARS_ROUTE_KEY,FOLLOW_TARS_ROUTE_KEY_in_param576);
					stream_TARS_ROUTE_KEY.add(TARS_ROUTE_KEY59);

					}
					break;

			}

			// TarsParser.g:83:20: ( TARS_OUT )?
			int alt18=2;
			int LA18_0 = input.LA(1);
			if ( (LA18_0==TARS_OUT) ) {
				alt18=1;
			}
			switch (alt18) {
				case 1 :
					// TarsParser.g:83:20: TARS_OUT
					{
					TARS_OUT60=(Token)match(input,TARS_OUT,FOLLOW_TARS_OUT_in_param579);
					stream_TARS_OUT.add(TARS_OUT60);

					}
					break;

			}

			pushFollow(FOLLOW_type_in_param582);
			type61=type();
			state._fsp--;

			stream_type.add(type61.getTree());
			TARS_IDENTIFIER62=(Token)match(input,TARS_IDENTIFIER,FOLLOW_TARS_IDENTIFIER_in_param584);
			stream_TARS_IDENTIFIER.add(TARS_IDENTIFIER62);

			// AST REWRITE
			// elements: type
			// token labels:
			// rule labels: retval


ear(&mut self);

    /// Insert new element into the filter.
    ///
    /// In success-case, it will be reported if the element was likely already part of the filter.
    /// If the element was already known, `false` is returned, otherwise `true`. You may get the
    /// same result by calling `query`, but calling insert is more efficient then calling `query`
    /// first and then using `insert` on demand.
    ///
    /// The method may return an error under certain conditions. When this happens, the
    /// user-visible state is not altered, i.e. the element was not added to the filter. The
    /// internal state may have changed though.
    fn insert(&mut self, obj: &T) -> Result<bool, Self::InsertErr>;

    /// Check if filters is empty, i.e. contains no elements.
    fn is_empty(&self) -> bool;

    /// Return guessed number of elements in the filter.
    fn len(&self) -> usize;

    /// Guess if the given element was added to the filter.
    fn query(&self, obj: &T) -> bool;
}
<gh_stars>1-10
use crate::delay::Delay;
use audio_vm::{Frame, Op, Stack, CHANNELS};
use itertools::izip;

pub struct Feedback {
    delay: Delay,
    delay_input: Frame,
}

impl Feedback {
    pub fn new(sample_rate: u32, max_delay: f64) -> Self {
        let delay = Delay::new(sample_rate, max_delay);
        Feedback {
            delay,
            delay_input: [0.0; CHANNELS],
        }
    }
}

impl Op for Feedback {
    fn perform(&mut self, stack: &mut Stack) {
        let gain = stack.pop();
        let delay = stack.pop();
        let input = stack.pop();

        stack.push(&self.delay_input);
        stack.push(&delay);

        self.delay.perform(stack);

        let delayed = stack.pop();

        for (sample, &x, &gain, &delayed) in izip!(&mut self.delay_input, &input, &gain, &delayed) {
            *sample = x + gain * delayed;
        }

        stack.push(&self.delay_input);
    }

    fn migrate(&mut self, other: &Box<dyn Op>) {
        if let Some(other) = other.downcast_ref::<Self>() {
            self.delay.migrate_same(&other.delay);
            self.delay_input = other.delay_input;
        }
    }
}
<filename>src/readable/into_stream.rs
use core::pin::Pin;

use futures::future::FutureExt;
use futures::ready;
use futures::stream::{FusedStream, Stream};
use futures::task::{Context, Poll};
use wasm_bindgen::prelude::*;
use wasm_bindgen_futures::JsFuture;

use super::sys::ReadableStreamReadResult;
use super::ReadableStreamDefaultReader;

/// A [`Stream`] for the [`into_stream`](super::ReadableStream::into_stream) method.
///
/// This `Stream` holds a reader, and therefore locks the [`ReadableStream`](super::ReadableStream).
/// When this `Stream` is dropped, it also drops its reader which in turn
/// [releases its lock](https://streams.spec.whatwg.org/#release-a-lock).
///
/// When used through [`ReadableStream::into_stream`](super::ReadableStream::into_stream),
/// the stream is automatically cancelled before dropping the reader, discarding any pending read requests.
/// When used through [`ReadableStreamDefaultReader::into_stream`](super::ReadableStreamDefaultReader::into_stream),
/// it is up to the user to either manually [cancel](Self::cancel) the stream,
/// or to ensure that there are no pending read requests when dropped.
/// See the documentation on [`ReadableStreamDefaultReader`] for more details on the drop behavior.


 {
  A aVariable;
  C cVariable;

  GenericClass<A> aClass;
  GenericClass<B> bClass;
  GenericClass<C> cClass;

  cVariable = aClass.property;
  cVariable = bClass.property;
  aVariable = cClass.property;

  cVariable = aClass.method(aVariable);
  cVariable = bClass.method(aVariable);
  aVariable = cClass.method(aVariable);

  cVariable = aClass.genericMethod1(aVariable);
  cVariable = aClass.genericMethod1<A>(aVariable);
  cVariable = aClass.genericMethod1<B>(aVariable);
  cVariable = aClass.genericMethod1<C>(aVariable);

  cVariable = bClass.genericMethod1(aVariable);
  cVariable = bClass.genericMethod1<A>(aVariable);
  cVariable = bClass.genericMethod1<B>(aVariable);
  cVariable = bClass.genericMethod1<C>(aVariable);

  cVariable = cClass.genericMethod1(aVariable);
  cVariable = cClass.genericMethod1<A>(aVariable);
  cVariable = cClass.genericMethod1<B>(aVariable);
  cVariable = cClass.genericMethod1<C>(aVariable);
}// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

extension Extension<T extends num> on List<T> {
  external T field;
  external static int staticField;
  external final T finalField;
  external static final int staticFinalField;
  external T method();
  external static int staticMethod();
  external T get getter;
  external static int get staticGetter;
  external void set setter(T value);
  external static void set staticSetter(int value);
  external T get property;
  external void set property(T value);
  external static int get staticProperty;
  external static void set staticProperty(int value);
  external final T fieldSetter;
  external void set fieldSetter(T value);
  external static final int staticFieldSetter;
  external static void set staticFieldSetter(int value);
}

test() {
  List<int> list = [];
  int value = list.field;
  list.field = value;
  value = list.finalField;
  value = list.method();
  value = list.getter;
  list.setter = value;
  value = list.property;
  list.property = value;
  value = list.fieldSetter;
  list.fieldSetter = value;

  List<int> iterable = list;
  num n = Extension<num>(iterable).field;
  Extension<num>(iterable).field = n;
  n = Extension<num>(iterable).finalField;
  n = Extension<num>(iterable).method();
  n = Extension<num>(iterable).getter;
  Extension<num>(iterable).setter = n;
  n = Extension<num>(iterable).property;
  Extension<num>(iterable).property = n;
  n = Extension<num>(iterable).fieldSetter;
  Extension<num>(iterable).fieldSetter = n;

  value = Extension.staticField;
  Extension.staticField = value;
  value = Extension.staticFinalField;
  value = Extension.staticMethod();
  value = Extension.staticGetter;
  Extension.staticSetter = value;
  value = Ex


tmp[i]), res);
	} else {
	    res = sc_cons(false, res);
	}
    }
    return res;
}

/*** META ((export #t)) */
function sc_pregexpReplace(re, s1, s2) {
   var reg;
   var jss1 = sc_string2jsstring(s1);
   var jss2 = sc_string2jsstring(s2);

   if (re instanceof RegExp) {
       if (re.global)
	   reg = re;
       else
	   reg = new RegExp(re.source);
   } else {
       reg = new RegExp(sc_string2jsstring(re));
   }

   return jss1.replace(reg, jss2);
}

/*** META ((export pregexp-replace*)) */
function sc_pregexpReplaceAll(re, s1, s2) {
   var reg;
   var jss1 = sc_string2jsstring(s1);
   var jss2 = sc_string2jsstring(s2);

   if (re instanceof RegExp) {
      if (re.global)
	  reg = re;
      else
	  reg = new RegExp(re.source, "g");
   } else {
       reg = new RegExp(sc_string2jsstring(re), "g");
   }

   return jss1.replace(reg, jss2);
}

/*** META ((export #t)) */
function sc_pregexpSplit(re, s) {
   var reg = ((re instanceof RegExp) ?
	      re :
	      new RegExp(sc_string2jsstring(re)));
   var jss = sc_string2jsstring(s);
   var tmp = jss.split(reg);

   if (tmp == null) return false;

   return sc_vector2list(tmp);
}

/* =========================================================================== */
/* Other library stuff */
/* =========================================================================== */

/*** META ((export #t)
           (peephole (hole 1 "Math.floor(Math.random()*" 'n ")")))
*/
function sc_random(n) {
    return Math.floor(Math.random()*n);
}

/*** META ((export current-date)
           (peephole (hole 0 "new Date()")))
*/
function sc_currentDate() {
   return new Date();
}

function sc_Hashtable() {
}
sc_Hashtable.prototype.toString = function() {
    return "#{%hashtable}";
};
// sc_toWriteString == sc_toDisplayString == toString

function sc_HashtableElement(key, val) {
    this.key = key;
    this.val = val;
}

/*** META ((export #t)
           (peephole (hole 0 "new sc_Hashtable()")))
*/
function sc_makeHashtable() {
    return new sc_Hashtable();
}

/*** META ((export #t)) */
function sc_hashtablePutBang(ht, key, val) {
    var hash = sc_hash(key);
    ht[hash] = new sc_HashtableElement(key, val);
}

/*** META ((export #t)) */
function sc_hashtableGet(ht, key) {
    var hash = sc_hash(key);
    if (hash in ht)
	return ht[hash].val;
    else
	return false;
}

/*** META ((export #t)) */
function sc_hashtableForEach(ht, f) {
    for (var v in ht) {
	if (ht[v] instanceof sc_HashtableElement)
	    f(ht[v].key, ht[v].val);
    }
}

/*** META ((export hashtable-contains?)
           (peephole (hole 2 "sc_hash(" 1 ") in " 0)))
*/
function sc_hashtableContains(


                 | **تعلم:** كيفية إعداد بيئة التطوير الخاصة بك                                               | فيديو قريباً                                                                 | [تعلم المزيد](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 01  | [مقدمة عن الذكاء الاصطناعي التوليدي ونماذج اللغة الكبيرة (LLMs)](./01-introduction-to-genai/README.md?WT.mc_id=academic-105485-koreyst)       | **تعلم:** فهم ماهية الذكاء الاصطناعي التوليدي وكيف تعمل نماذج اللغة الكبيرة                | [فيديو](https://aka.ms/gen-ai-lesson-1-gh?WT.mc_id=academic-105485-koreyst)  | [تعلم المزيد](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 02  | [استكشاف ومقارنة نماذج LLMs المختلفة](./02-exploring-and-comparing-different-llms/README.md?WT.mc_id=academic-105485-koreyst)                 | **تعلم:** كيفية اختيار النموذج الأنسب لحالتك                                               | [فيديو](https://aka.ms/gen-ai-lesson2-gh?WT.mc_id=academic-105485-koreyst)   | [تعلم المزيد](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 03  | [استخدام الذكاء الاصطناعي التوليدي بمسؤولية](./03-using-generative-ai-responsibly/README.md?WT.mc_id=academic-105485-koreyst)                 | **تعلم:** كيفية بناء تطبيقات ذكاء اصطناعي توليدي بمسؤولية                                   | [فيديو](https://aka.ms/gen-ai-lesson3-gh?WT.mc_id=academic-105485-koreyst)   | [تعلم المزيد](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 04  | [فهم أساسيات هندسة التوجيه (Prompt Engineering)](./04-prompt-engineering-fundamentals/README.md?WT.mc_id=academic-105485-koreyst)             | **تعلم:** أفضل الممارسات العملية لهندسة التوجيه                                             | [فيديو](https://aka.ms/gen-ai-lesson4-gh?WT.mc_id=academic-105485-koreyst)   | [تعلم المزيد](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 05  | [إنشاء توجيهات متقدمة](./05-advanced-prompts/README.md?WT.mc_id=academic-105485-koreyst)                                                     | **تعلم:** كيفية تطبيق تقنيات هندسة التوجيه لتحسين نتائج التوجيهات                           | [فيديو


urce.setInputStream(new ByteArrayInputStream(schema.getBytes()));
        List types = ((SDOXSDHelper)xsdHelper).define(source, new DefaultSchemaResolver());
        assertEquals(1, types.size());

    }

    public void testDOMSourceWithNodeDefine() {
        String schema = "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
        "<xsd:complexType name=\"employee-type\">" +
        "<xsd:sequence>" +
        "<xsd:element name=\"name\" type=\"xsd:string\"/>" +
        "</xsd:sequence>" +
        "</xsd:complexType>" +
        "<xsd:element name=\"employee\" type=\"employee-type\"/>" +
        "</xsd:schema>";

        XMLParser parser = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLParser();
        Node node = parser.parse(new StringReader(schema));
        DOMSource source = new DOMSource(node, "some-id");
        List types = ((SDOXSDHelper)xsdHelper).define(source, new DefaultSchemaResolver());
        assertEquals(1, types.size());

    }

    public static class MySchemaResolver implements SchemaResolver {

        @Override
        public Source resolveSchema(Source sourceXSD, String namespace, String schemaLocation) {
            return null;
        }

        @Override
        public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
            String schema = "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
            "<xsd:complexType name=\"employee-type\">" +
            "<xsd:sequence>" +
            "<xsd:element name=\"name\" type=\"xsd:string\"/>" +
            "</xsd:sequence>" +
            "</xsd:complexType>" +
            "<xsd:element name=\"employee\" type=\"employee-type\"/>" +
            "</xsd:schema>";

            return new InputSource(new StringReader(schema));
        }

    }

    private static class MySource implements Source {

        private String systemId;

        @Override
        public String getSystemId() {
            return systemId;
        }

        @Override
        public void setSystemId(String systemId) {
            this.systemId = systemId;
        }

    }

    @Override
    public List getControlTypes()
    {
      return new ArrayList();
    }
}
/*
 * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0, which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the
 * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
 * version 2 with the GNU Classpath Exception, which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 */

package com.sun.jts.pi;

import com.sun.jts.CosTransactions.MinorCode;

import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.LocalObject;
import org.omg.CORBA.TSIdentification;
import org.omg.CosTransactions.INVOCATION_POLICY_TYPE;
import org.omg.CosTransactions.OTS_POLICY_TYPE;
import org.omg.IOP.Codec;
import org.omg.IOP.CodecFactory;
import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
import org.omg.IOP.ENCODING_CDR_ENCAPS;
import org.omg.IOP.Encoding;
import org.omg.


ht: 0;
  line-height: 0;
  visibility: hidden;
}
.clearfix {
  zoom: 1;
}
.datawrap {
  word-wrap: break-word;
}
.word_break {
  display: inline-block;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aero {
  opacity: 0.5;
}
.column {
  float: left;
}
.center {
  margin-left: auto;
  margin-right: auto;
}
#facebook .hidden_elem {
  display: none !important;
}
#facebook .invisible_elem {
  visibility: hidden;
}
#facebook .accessible_elem {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
#facebook .accessible_elem_offset {
  margin: -1px;
}
.direction_ltr {
  direction: ltr;
}
.direction_rtl {
  direction: rtl;
}
.text_align_ltr {
  text-align: left;
}
.text_align_rtl {
  text-align: right;
}
#facebook ._-kb.mac {
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: subpixel-antialiased;
}
#facebook ._-kb.sf {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular",
    sans-serif;
}
@font-face {
  font-family: "Segoe UI Historic";
  src: local("Arial");
  unicode-range: U+530-5f4, U+10a0-10ff;
}
@font-face {
  font-family: "Segoe UI Historic";
  font-weight: 700;
  src: local("Arial Bold"), local("Arial");
  unicode-range: U+530-5f4, U+10a0-10ff;
}
#facebook ._-kb.segoe {
  font-family: Segoe UI Historic, Segoe UI, Helvetica, Arial, sans-serif;
}
#facebook ._-kb.roboto {
  font-family: Roboto, Helvetica, Arial, sans-serif;
}
#facebook ._-kb div {
  font-family: inherit;
}
#facebook ._-kb span {
  font-family: inherit;
}
#facebook ._-kb a {
  font-family: inherit;
}
#facebook ._-kb h1,
#facebook ._-kb h2,
#facebook ._-kb h3,
#facebook ._-kb h4,
#facebook ._-kb h5,
#facebook ._-kb h6,
#facebook ._-kb p {
  font-family: inherit;
}
#facebook ._-kb button,
#facebook ._-kb input,
#facebook ._-kb label,
#facebook ._-kb select,
#facebook ._-kb td,
#facebook ._-kb textarea {
  font-family: inherit;
}
#facebook ._-kb code,
#facebook ._-kb pre {
  font-family: Menlo, Consolas, Monaco, monospace;
}
#facebook ._-kb .fixemoji {
  font-weight: 600;
}
@font-face {
  font-family: "Fix for Mac Chrome 80";
  font-weight: 500;
  src: local("Lucida Grande");
  unicode-range: U+530-5f4, U+10a0-10ff;
}
#facebook ._-kb._93bn.sf {


 n
}

// Test that quota reclamation works for a simple case where the user
// does a few updates, then lets quota reclamation run, and we make
// sure that all historical blocks have been deleted.
func testQuotaReclamation(t *testing.T, ctx context.Context, config Config,
	userName kbname.NormalizedUsername) {
	clock, now := newTestClockAndTimeNow()
	config.SetClock(clock)

	rootNode := GetRootNodeOrBust(
		ctx, t, config, userName.String(), tlf.Private)
	kbfsOps := config.KBFSOps()
	_, _, err := kbfsOps.CreateDir(ctx, rootNode, "a")
	if err != nil {
		t.Fatalf("Couldn't create dir: %+v", err)
	}
	err = kbfsOps.SyncAll(ctx, rootNode.GetFolderBranch())
	if err != nil {
		t.Fatalf("Couldn't sync all: %v", err)
	}
	err = kbfsOps.RemoveDir(ctx, rootNode, "a")
	if err != nil {
		t.Fatalf("Couldn't remove dir: %+v", err)
	}
	err = kbfsOps.SyncAll(ctx, rootNode.GetFolderBranch())
	if err != nil {
		t.Fatalf("Couldn't sync all: %v", err)
	}

	// Wait for outstanding archives
	err = kbfsOps.SyncFromServer(ctx,
		rootNode.GetFolderBranch(), nil)
	if err != nil {
		t.Fatalf("Couldn't sync from server: %+v", err)
	}

	// Make sure no blocks are deleted before there's a new-enough update.
	bserverLocal, ok := config.BlockServer().(blockServerLocal)
	if !ok {
		t.Fatalf("Bad block server")
	}
	preQR1Blocks, err := bserverLocal.getAllRefsForTest(
		ctx, rootNode.GetFolderBranch().Tlf)
	if err != nil {
		t.Fatalf("Couldn't get blocks: %+v", err)
	}

	ops := kbfsOps.(*KBFSOpsStandard).getOpsByNode(ctx, rootNode)
	ops.fbm.forceQuotaReclamation()
	err = ops.fbm.waitForQuotaReclamations(ctx)
	if err != nil {
		t.Fatalf("Couldn't wait for QR: %+v", err)
	}

	postQR1Blocks, err := bserverLocal.getAllRefsForTest(
		ctx, rootNode.GetFolderBranch().Tlf)
	if err != nil {
		t.Fatalf("Couldn't get blocks: %+v", err)
	}

	if !reflect.DeepEqual(preQR1Blocks, postQR1Blocks) {
		t.Fatalf("Blocks deleted too early (%v vs %v)!",
			preQR1Blocks, postQR1Blocks)
	}

	// Increase the time and make a new revision, but don't run quota
	// reclamation yet.
	clock.Set(now.Add(2 * config.Mode().QuotaReclamationMinUnrefAge()))
	_, _, err = kbfsOps.CreateDir(ctx, rootNode, "b")
	if err != nil {
		t.Fatalf("Couldn't create dir: %+v", err)
	}
	err = kbfsOps.SyncAll(ctx, rootNode.GetFolderBranch())
	if err != nil {
		t.Fatalf("Couldn't sync all: %v", err)
	}

	preQR2Blocks, err := bserverLocal.getAllRefsForTest(
		ctx, rootNode.GetFolderBranch().Tlf)
	if err != nil {
		t.Fatalf("Couldn't get blocks: %+v", err)
	}

	ops.fbm.forceQuotaReclamation()
	err = ops.fbm.waitForQuotaReclamations(ctx)
	if err != nil {
		t.Fatalf("Couldn't wait for QR: %+v", err)
	}

	postQR2Blocks, err := bserverLocal.getAllRefs


 type ModelShapeConfig = typeof ModelShapeType[keyof typeof ModelShapeType];
export type ClassShapeConfig = typeof ClassShapeType[keyof typeof ClassShapeType];

export interface OptionItemShapeConfig {
    size: PartSizeConfig;
    textAlign?: string;
    splitBySign?: boolean;
    content: string;
    port: {
        positive: boolean;
        negative: boolean;
    }
}

export interface OptionListShapeConfig {
    visible: boolean;
    items: OptionItemShapeConfig[]
}

export interface ShapeConfig {
    /**
     * Тип используемой фигуры.
     * По нему определяем модель и прорисовку фигуры на странице.
     * @example
     * // Фигура в виде прямоугольника
     * type:'rectangle'
     * @example
     * // Фигура в виде круга
     * type:'circle'
     */
    type: ModelShapeConfig;
    menu_item_id: string;
    menuTitle: string,
    name: string;
    /** Подкласс фигуры: слушатель, условие, действие  */
    class: ClassShapeConfig;

    /** Размерность фигуры */
    dimension: ShapeDimensionConfig

    /**
     * Объект настроек портов всей фигуры.
     */
    ports: PortListShapeConfig;

    /** Каналы с которыми работает фигура */
    channel: ChannelConfig;

    /**
     * Иконка в верхней части фигуры
     */
    icon: IconShapeConfig;

    /**
     * Шапка фигуры.
     */
    [PartType.HEADER]: HeaderShapeConfig;
    [PartType.BODY]: BodyShapeConfig;
    [PartType.OPTIONS]: OptionListShapeConfig;
    [PartType.FOOTER]: FooterShapeConfig;

    initialize?: (assemblyData: any[any]) => void;
}

export interface MenuShapeConfig {
    name: any;
    type: string;
    icon: string;
    text: string;
    shape: ShapeConfig;
}

export type TMenuCategory = {
    icon: string;
    text: string;
    items: MenuShapeConfig[]
}

export type TMenuResponse = TMenuCategory[];import { getRepository } from "typeorm";
import { ArticleEntity } from "../entities/Article";
import { CommentEntity } from "../entities/Comment";
import { UserEntity } from "../entities/User";
import { is_valid_comment } from "../tools/validators/comment";

export const get_article_comments = async (articleId: string | Number): Promise<CommentEntity[]> => {
  const user = await getRepository(ArticleEntity).findOne({
    where: { id: Number(articleId) },
    relations: ["comments"]
  });

  return user?.comments || [];
};

export const add_new_comment = async (user: UserEntity, article: ArticleEntity, message: string) => {
  const { error, value } = is_valid_comment(message);
  if (error) throw error;

  return await getRepository(CommentEntity).save({
    article: article,
    user: user,
    message: value
  });
};
import { DamageEvent } from '../DamageEngine/DamageEvent';
import { DamageEngineGlobals } from '../DamageEngine/DamageEngineGlobals';
import { GameGlobals } from '../Game/GameGlobals';
import { RandomNumberGenerator } from '../Utility/RandomNumberGenerator';
import * as settings from '../Game/GameSettings';

export class SpellBlockEvent implements DamageEvent {
    private readonly gameGlobals: GameGlobals;
    private readonly randomNumberGenerator: RandomNumberGenerator;

    constructor(gameGlobals: GameGlobals, randomNumberGenerator: RandomNumberGenerator) {
        this.gameGlobals = gameGlobals;
        this.randomNumberGenerator = randomNumberGenerator;
    }

    public event(globals: DamageEngineGlobals): void {
        if (!globals.IsDamageS


>,
      )
    >();
late final _sel_setCurrentDevice_ = objc.registerName("setCurrentDevice:");
final _objc_msgSend_xtuoz7 = objc.msgSendPointer
    .cast<
      ffi.NativeFunction<
        ffi.Void Function(
          ffi.Pointer<objc.ObjCObject>,
          ffi.Pointer<objc.ObjCSelector>,
          ffi.Pointer<objc.ObjCObject>,
        )
      >
    >()
    .asFunction<
      void Function(
        ffi.Pointer<objc.ObjCObject>,
        ffi.Pointer<objc.ObjCSelector>,
        ffi.Pointer<objc.ObjCObject>,
      )
    >();
late final _sel_currentTime = objc.registerName("currentTime");
final _objc_msgSend_1ukqyt8 = objc.msgSendPointer
    .cast<
      ffi.NativeFunction<
        ffi.Double Function(
          ffi.Pointer<objc.ObjCObject>,
          ffi.Pointer<objc.ObjCSelector>,
        )
      >
    >()
    .asFunction<
      double Function(
        ffi.Pointer<objc.ObjCObject>,
        ffi.Pointer<objc.ObjCSelector>,
      )
    >();
final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer
    .cast<
      ffi.NativeFunction<
        ffi.Double Function(
          ffi.Pointer<objc.ObjCObject>,
          ffi.Pointer<objc.ObjCSelector>,
        )
      >
    >()
    .asFunction<
      double Function(
        ffi.Pointer<objc.ObjCObject>,
        ffi.Pointer<objc.ObjCSelector>,
      )
    >();
late final _sel_setCurrentTime_ = objc.registerName("setCurrentTime:");
final _objc_msgSend_hwm8nu = objc.msgSendPointer
    .cast<
      ffi.NativeFunction<
        ffi.Void Function(
          ffi.Pointer<objc.ObjCObject>,
          ffi.Pointer<objc.ObjCSelector>,
          ffi.Double,
        )
      >
    >()
    .asFunction<
      void Function(
        ffi.Pointer<objc.ObjCObject>,
        ffi.Pointer<objc.ObjCSelector>,
        double,
      )
    >();
late final _sel_data = objc.registerName("data");
late final _sel_deviceCurrentTime = objc.registerName("deviceCurrentTime");
late final _sel_duration = objc.registerName("duration");
late final _sel_enableRate = objc.registerName("enableRate");
final _objc_msgSend_91o635 = objc.msgSendPointer
    .cast<
      ffi.NativeFunction<
        ffi.Bool Function(
          ffi.Pointer<objc.ObjCObject>,
          ffi.Pointer<objc.ObjCSelector>,
        )
      >
    >()
    .asFunction<
      bool Function(
        ffi.Pointer<objc.ObjCObject>,
        ffi.Pointer<objc.ObjCSelector>,
      )
    >();
late final _sel_setEnableRate_ = objc.registerName("setEnableRate:");
final _objc_msgSend_1s56lr9 = objc.msgSendPointer
    .cast<
      ffi.NativeFunction<
        ffi.Void Function(
          ffi.Pointer<objc.ObjCObject>,
          ffi.Pointer<objc.ObjCSelector>,
          ffi.Bool,
        )
      >
    >()
    .asFunction<
      void Function(
        ffi.Pointer<objc.ObjCObject>,
        ffi.Pointer<objc.ObjCSelector>,
        bool,
      )
    >();
late final _sel_format = objc.registerName("format");
late final _sel_isMeteringEnabled = objc.regist


OURCEPORT + " INTEGER NOT NULL DEFAULT 8080, "
					+ FIELD_PORTFORWARD_DESTADDR + " TEXT, "
					+ FIELD_PORTFORWARD_DESTPORT + " INTEGER)");
			// fall through
		case 12:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_WANTSESSION + " TEXT DEFAULT '" + true + "'");
			// fall through
		case 13:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_COMPRESSION + " TEXT DEFAULT '" + false + "'");
			// fall through
		case 14:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_ENCODING + " TEXT DEFAULT '" + ENCODING_DEFAULT + "'");
			// fall through
		case 15:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_PROTOCOL + " TEXT DEFAULT 'ssh'");
			// fall through
		case 16:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_DELKEY + " TEXT DEFAULT '" + DELKEY_DEL + "'");
			// fall through
		case 17:
			db.execSQL("CREATE INDEX " + TABLE_PORTFORWARDS + FIELD_PORTFORWARD_HOSTID + "index ON "
					+ TABLE_PORTFORWARDS + " (" + FIELD_PORTFORWARD_HOSTID + ");");

			// Add colors
			db.execSQL("CREATE TABLE " + TABLE_COLORS
					+ " (_id INTEGER PRIMARY KEY, "
					+ FIELD_COLOR_NUMBER + " INTEGER, "
					+ FIELD_COLOR_VALUE + " INTEGER, "
					+ FIELD_COLOR_SCHEME + " INTEGER)");
			db.execSQL("CREATE INDEX " + TABLE_COLORS + FIELD_COLOR_SCHEME + "index ON "
					+ TABLE_COLORS + " (" + FIELD_COLOR_SCHEME + ");");
			// fall through
		case 18:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_USEAUTHAGENT + " TEXT DEFAULT '" + AUTHAGENT_NO + "'");
			// fall through
		case 19:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_STAYCONNECTED + " TEXT");
			// fall through
		case 20:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_FONTSIZE + " INTEGER");
			// fall through
		case 21:
			db.execSQL("DROP TABLE IF EXISTS " + TABLE_COLOR_DEFAULTS);
			db.execSQL(CREATE_TABLE_COLOR_DEFAULTS);
			db.execSQL(CREATE_TABLE_COLOR_DEFAULTS_INDEX);
			// fall through
		case 22:
			db.execSQL("ALTER TABLE " + TABLE_HOSTS
					+ " ADD COLUMN " + FIELD_HOST_QUICKDISCONNECT + " TEXT DEFAULT '" + false + "'");
			// fall through
		case 23:
			db.execSQL("UPDATE " + TABLE_HOSTS
					+ " SET " + FIELD_HOST_FONTSIZE + " = " + FIELD_HOST_FONTSIZE + " / " + displayDensity);
			// fall through
		case 24:
			// Move all the existing known hostkeys into their own table.
			db.execSQL("DROP TABLE IF EXISTS " + TABLE_KNOWNHOSTS);
			db.execSQL("CREATE TABLE " + TABLE_KNOWNHOSTS
					+ " (_id INTEGER PRIMARY KEY, "
					+ FIELD_KNOWNHOSTS_HOSTID + " INTEGER, "
					+ FIELD_KNOWNHOSTS_HOSTKEYALGO + " TEXT, "
					+ FIELD_KNOWNHOSTS_HOSTKEY + " BLOB)");
			db.execSQL("INSERT INTO " + TABLE_KNOWN


n: Animation<TextureRegion?>? = null
    var superBombAnimation: Animation<TextureRegion?>? = null

    @JvmField
    var bulletLevel1: AtlasRegion? = null

    @JvmField
    var bulletLevel2: AtlasRegion? = null

    @JvmField
    var bulletLevel3: AtlasRegion? = null

    @JvmField
    var bulletLevel4: AtlasRegion? = null

    @JvmField
    var boost1: AtlasRegion? = null

    @JvmField
    var boost2: AtlasRegion? = null

    @JvmField
    var boost3: AtlasRegion? = null

    @JvmField
    var upgLife: AtlasRegion? = null

    @JvmField
    var explosionAnimation: Animation<TextureRegion?>? = null

    @JvmField
    var shieldAnimation: Animation<TextureRegion?>? = null

    @JvmField
    var normalEnemyBullet: AtlasRegion? = null

    @JvmField
    var alien1: AtlasRegion? = null

    @JvmField
    var alien2: AtlasRegion? = null

    @JvmField
    var alien3: AtlasRegion? = null

    @JvmField
    var alien4: AtlasRegion? = null

    // Sounds
    @JvmField
    var music: Music? = null

    @JvmField
    var coinSound: Sound? = null

    @JvmField
    var clickSound: Sound? = null

    @JvmField
    var explosionSound: Sound? = null

    @JvmField
    var missileFiringSound: Sound? = null

    // Styles
    @JvmField
    var styleTextButtonMenu: TextButtonStyle? = null

    @JvmField
    var styleTextButtonFacebook: TextButtonStyle? = null

    @JvmField
    var styleTextButtonBack: TextButtonStyle? = null

    @JvmField
    var styleTextButton: TextButtonStyle? = null

    @JvmField
    var styleDialogPause: WindowStyle? = null

    @JvmField
    var styleLabel: LabelStyle? = null

    @JvmField
    var styleLabelDialog: LabelStyle? = null

    @JvmField
    var styleSlider: SliderStyle? = null

    @JvmField
    var styleImageButtonPause: ImageButtonStyle? = null

    @JvmField
    var styleImageButtonStyleCheckBox: ImageButtonStyle? = null

    private fun loadFont(atlas: TextureAtlas) {
        font60 = BitmapFont(Gdx.files.internal("data/font35.fnt"), atlas.findRegion("font35"), false)
        font45 = BitmapFont(Gdx.files.internal("data/font35.fnt"), atlas.findRegion("font35"), false)
        font15 = BitmapFont(Gdx.files.internal("data/font15.fnt"), atlas.findRegion("font15"), false)
        font10 = BitmapFont(Gdx.files.internal("data/font15.fnt"), atlas.findRegion("font15"), false)

        font60!!.color = Color.GREEN
        font45!!.color = Color.GREEN
        font15!!.color = Color.GREEN
        font10!!.color = Color.GREEN
    }

    private fun loadSceneStyles(atlas: TextureAtlas) {
        // Dialog

        val loginDialogDrawable = NinePatchDrawable(atlas.createPatch("recuadroLogIn"))
        val dialogDim = atlas.findRegion("fondoNegro")
        styleDialogPause = WindowStyle(font45, Color.GREEN, loginDialogDrawable)
        styleDialogPause!!.stageBackground = NinePatchDrawable(NinePatch(dialogDim))
        styleLabelDialog = LabelStyle(font15, Color.GREEN)

        val defaultRoundDown = NinePatchDrawable(atlas.createPatch("botonDown"))
        val defaultRound = NinePatchDrawable(atlas.createPatch("boton"))
        styleTextButton


": F1046,
  "fruit-watermelon": F1047,
  "fuel": F07CA,
  "fuel-cell": F18B5,
  "fullscreen": F0293,
  "fullscreen-exit": F0294,
  "function": F0295,
  "function-variant": F0871,
  "furigana-horizontal": F1081,
  "furigana-vertical": F1082,
  "fuse": F0C85,
  "fuse-alert": F142D,
  "fuse-blade": F0C86,
  "fuse-off": F142C,
  "gamepad": F0296,
  "gamepad-circle": F0E33,
  "gamepad-circle-down": F0E34,
  "gamepad-circle-left": F0E35,
  "gamepad-circle-outline": F0E36,
  "gamepad-circle-right": F0E37,
  "gamepad-circle-up": F0E38,
  "gamepad-down": F0E39,
  "gamepad-left": F0E3A,
  "gamepad-outline": F1919,
  "gamepad-right": F0E3B,
  "gamepad-round": F0E3C,
  "gamepad-round-down": F0E3D,
  "gamepad-round-left": F0E3E,
  "gamepad-round-outline": F0E3F,
  "gamepad-round-right": F0E40,
  "gamepad-round-up": F0E41,
  "gamepad-square": F0EB5,
  "gamepad-square-outline": F0EB6,
  "gamepad-up": F0E42,
  "gamepad-variant": F0297,
  "gamepad-variant-outline": F0EB7,
  "gamma": F10EE,
  "gantry-crane": F0DD1,
  "garage": F06D9,
  "garage-alert": F0872,
  "garage-alert-variant": F12D5,
  "garage-lock": F17FB,
  "garage-open": F06DA,
  "garage-open-variant": F12D4,
  "garage-variant": F12D3,
  "garage-variant-lock": F17FC,
  "gas-cylinder": F0647,
  "gas-station": F0298,
  "gas-station-off": F1409,
  "gas-station-off-outline": F140A,
  "gas-station-outline": F0EB8,
  "gate": F0299,
  "gate-alert": F17F8,
  "gate-and": F08E1,
  "gate-arrow-left": F17F7,
  "gate-arrow-right": F1169,
  "gate-nand": F08E2,
  "gate-nor": F08E3,
  "gate-not": F08E4,
  "gate-open": F116A,
  "gate-or": F08E5,
  "gate-xnor": F08E6,
  "gate-xor": F08E7,
  "gatsby": F0E43,
  "gauge": F029A,
  "gauge-empty": F0873,
  "gauge-full": F0874,
  "gauge-low": F0875,
  "gavel": F029B,
  "gender-female": F029C,
  "gender-male": F029D,
  "gender-male-female": F029E,
  "gender-male-female-variant": F113F,
  "gender-non-binary": F1140,
  "gender-transgender": F029F,
  "gentoo": F08E8,
  "gesture": F07CB,
  "gesture-double-tap": F073C,
  "


using System;
using System.Linq;

// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedType.Global
namespace
#if BUILD_PEANUTBUTTER_INTERNAL
    Imported.PeanutButter.Utils;
#else
    PeanutButter.Utils;
#endif

/// <summary>
/// Provides convenience extensions for sliding windows
/// </summary>
#if BUILD_PEANUTBUTTER_INTERNAL
internal
#else
public
#endif
    static class SlidingWindowRateExtensions
{
    // This would be a lot simpler if INumeric<T> was in netstandard...
    /// <summary>
    /// The rate of items per minute, where each integer value
    /// N represents N items, relative to the current time.
    /// </summary>
    /// <param name="window"></param>
    /// <returns></returns>
    public static decimal CurrentRate(this ISlidingWindow<int> window)
    {
        return window.CurrentRate(TimeSpan.FromSeconds(1));
    }

    /// <summary>
    /// The rate of items per provided period size, where each
    /// integer value N represents N items, relative to the current time
    /// </summary>
    /// <param name="window"></param>
    /// <param name="periodSize"></param>
    /// <returns></returns>
    public static decimal CurrentRate(
        this ISlidingWindow<int> window,
        TimeSpan periodSize
    )
    {
        window.Trim();
        if (window.Count < 2)
        {
            return 0;
        }

        var sum = window.Sum();
        var totalTime = window.MaxLifeSpan;
        var periods = CalculatePeriodCount(totalTime, periodSize);
        return sum / periods;
    }

    /// <summary>
    /// The rate of items per minute, where each long value
    /// N represents N items, relative to the current time.
    /// </summary>
    /// <param name="window"></param>
    /// <returns></returns>
    public static decimal CurrentRate(this ISlidingWindow<long> window)
    {
        return window.CurrentRate(TimeSpan.FromSeconds(1));
    }

    /// <summary>
    /// The rate of items per provided period size, where each
    /// long value N represents N items, relative to the current time
    /// </summary>
    /// <param name="window"></param>
    /// <param name="periodSize"></param>
    /// <returns></returns>
    public static decimal CurrentRate(
        this ISlidingWindow<long> window,
        TimeSpan periodSize
    )
    {
        window.Trim();
        if (window.Count < 2)
        {
            return 0;
        }

        var sum = window.Sum();
        var to


 override string ToString()
        {
            var appendix = AffectedItem != null
                ? $"Pos: {AffectedItem.Position + 1}"
                : null;

            if (AffectedField.HasValue())
                appendix = appendix.Grow("Field: " + AffectedField, ", ");

            if (appendix != null)
                return $"{Message.NaIfEmpty()} [{appendix}]";

            return Message.NaIfEmpty();
        }
    }

    public record ImportRowInfo(int Position, string EntityName);

    public enum ImportMessageType
    {
        Info = 0,
        Warning = 5,
        Error = 10
    }

    public enum ImportMessageReason
    {
        None = 0,
        DownloadFailed,
        EqualFile,
        EqualFileInAlbum
    }
}


            if pred.patch.is_some() {
                pred.patch = Some(version.patch);
            }
            Ok(pred)
        }
        semver::Op::Exact => Ok(assign_partial_req(version, pred)),
        semver::Op::Greater | semver::Op::GreaterEq | semver::Op::Less | semver::Op::LessEq => {
            let user_pred = pred.to_string();
            Err(ErrorKind::UnsupportedVersionReq(user_pred).into())
        }
        semver::Op::Tilde => Ok(assign_partial_req(version, pred)),
        semver::Op::Caret => Ok(assign_partial_req(version, pred)),
        _ => {
            let user_pred = pred.to_string();
            Err(ErrorKind::UnsupportedVersionReq(user_pred).into())
        }
    }
}

fn assign_partial_req(
    version: &semver::Version,
    mut pred: semver::Comparator,
) -> semver::Comparator {
    pred.major = version.major;
    if pred.minor.is_some() {
        pred.minor = Some(version.minor);
    }
    if pred.patch.is_some() {
        pred.patch = Some(version.patch);
    }
    pred.pre = version.pre.clone();
    pred
}

#[cfg(test)]
mod test {
    use super::*;

    mod increment {
        use super::*;

        #[test]
        fn alpha() {
            let mut v = semver::Version::parse("1.0.0").unwrap();
            v.increment_alpha().unwrap();
            assert_eq!(v, semver::Version::parse("1.0.1-alpha.1").unwrap());

            let mut v2 = semver::Version::parse("1.0.1-dev").unwrap();
            v2.increment_alpha().unwrap();
            assert_eq!(v2, semver::Version::parse("1.0.1-alpha.1").unwrap());

            let mut v3 = semver::Version::parse("1.0.1-alpha.1").unwrap();
            v3.increment_alpha().unwrap();
            assert_eq!(v3, semver::Version::parse("1.0.1-alpha.2").unwrap());

            let mut v4 = semver::Version::parse("1.0.1-beta.1").unwrap();
            assert!(v4.increment_alpha().is_err());
        }

        #[test]
        fn beta() {
            let mut v = semver::Version::parse("1.0.0").unwrap();
            v.increment_beta().unwrap();
            assert_eq!(v, semver::Version::parse("1.0.1-beta.1").unwrap());

            let mut v2 = semver::Version::parse("1.0.1-dev").unwrap();
            v2.increment_beta().unwrap();
            assert_eq!(v2, semver::Version::parse("1.0.1-beta.1").unwrap());

            let mut v2 = semver::Version::parse("1.0.1-alpha.1").unwrap();
            v2.increment_beta().unwrap();
            assert_eq!(v2, semver::Version::parse("1.0.1-beta.1").unwrap());

            let mut v3 = semver::Version::parse("1.0.1-beta.1").unwrap();
            v3.increment_beta().unwrap();
            assert_eq!(v3, semver::Version::parse("1.0.1-beta.2").unwrap());

            let mut v4 = semver::Version::parse("1.0.1-rc.1").unwrap();
            assert!(v4.increment_beta().is_err());


junulo observis longtempe enpense la aeron post li kaj pos-

te per pezaj paŝoj foriris en la prezentitan al li ĉambron.

**II. **

Estis malserena, pluva mateno.

La kelnero, kiun la vojaĝanto sendis kun vizitkarto, reve-

nis kun la komuniko, ke la sinjoro sekreta konsilisto estas iom malsaneta kaj ke li ne akceptas. Tuj kiam pasos la misfarto, li akceptos volonte. La ĝentila kaj ĉiam akurata fremdulo ne

kapablis ĉi foje sekretigi la ĉagrenon, kiun al li kaŭzis la atendado.

ĉE˘A KAJ SLOVAKA ANTOLOGIO

Li ekmurmuris ion apenaŭ aŭdeblan. La kelnero riveren-

cis embarase kaj malaperis.

La soliĝinto alpaŝis al la fenestro.

Tio do estis la urbo, kiu tiun tempon estis Mekka por Ger-

manujo kaj eĉ por eksterlando; malgranda urbeto, fama en la

mondo. La restadejo de malgranda princo, unu el tiom mul-

taj germanaj, fariĝis celo de turistoj el proksime kaj malproksime, ĝi altiradis spiriton kaj scivolemon: estis loĝloko de

Wolfgang Goethe.

Sed tio ne estis nervema malpacienco ekvidi la grandan

viron; ne estis la nekutima timemo, kiu atakis la spritulon

Heine antaŭ la vizaĝo de la Weimara maljunulo: ne estis sen-

toj, kiuj plorigis la nesocieman, maldolĉan Grillparzer, kiam

al li Goethe prezentis la brakon vidante lin iri al tagmanĝo.

Kio estis Goethe por ĉi tiu viro, viro kun mieno severa kaj

tamen malgaja, kio estis la paganisma poeto por oficisto kon-

anta sole sian devon?

La verko de Goethe kuŝis preter la sfero de Karl von Rä-

dern. Goethe estis por li aŭtoro de ”La suferoj de Werther.”

Io alia, malproksima de literaturo cent mejlojn, gvidis liajn

paŝojn kaj ardigis liajn pensojn. Venadis rememoroj kaj ĉiu

havis sian doloron … malbonan, silenteman, maljunulan do-

loron. Tiu pri kiu li rememoris observante la stratojn kun mi-

eno de malamikeco, estis lia filo, tiom simila al la knabo el la omnibuso. La fino de ĉi tiu filo vekis malamon kontraŭ la poeto en la koro de la patro. Ho, li estis bela knabo, blondhara, gracia knabo kun bluaj, revaj okuloj. En la karesemon al la

stranga kaj malmulte komprenata infano kunfluis ĉiu ambe-

zono de la severa soldata prokuroro. Rememoro pri la mor-

tinto venigis lin al Weimar. Kaj nun, kiam li rememoris pri la 264

ĉE˘A KAJ SLOVAKA ANTOLOGIO

knabo ripozanta en nefama kampara tombejo, pri la lasta el

siaj infanoj, peza malsereno kovris lian frunton. La Ekscelen-


atileMemoryExpress
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum ParallelControllerProgrammingInterfaceByte {
    // Prog IF 0x00
    StandardParallelPort,
    // Prog IF 0x01
    BidirectionalParallelPort,
    // Prog IF 0x02
    EnhancedCompatibilityPort1XCompilantParallelPort,
    // Prog IF 0x03
    InstituteOfElectricalAndElectronicsEngineers1284Controller,
    // Prog IF 0xFE
    InstituteOfElectricalAndElectronicsEngineers1284TargetDevice
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum PeripheralControllerInterconnectBridgeProgrammingInterfaceByte {
    // Prog IF 0x00
    NormalDecode,
    // Prog IF 0x01
    SubtractiveDecode
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum PeripheralInterfaceControllerProgrammingInterfaceByte {
    // Prog IF 0x00
    Generic8259Compatible,
    // Prog IF 0x01
    IndustryStandardArchitectureCompatible,
    // Prog IF 0x02
    ExtendedIndustryStandardArchitectureCompatible,
    // Prog IF 0x03
    IoAdvancedProgrammableInterfaceControllerInterruptController,
    // Prog IF 0x04
    IoXAdvancedProgrammableInterfaceControllerInterruptController
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum RACEwayBridgeProgrammingInterfaceByte {
    // Prog IF 0x00
    TransparentMode,
    // Prog IF 0x01
    EndpointMode
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum RemoteTimeClockProgrammingInterfaceByte {
    // Prog IF 0x00
    GenericRemoteTimeClock,
    // Prog IF 0x01
    IndustryStandardArchitectureCompatible
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum SerialAdvancedTechnologyAttachmentProgrammingInterfaceByte {
    // Prog IF 0x00
    VendorSpecificInterface,
    // Prog IF 0x01
    AdvancedHostControllerInterfaceVersion1_0,
    // Prog IF 0x02
    SerialStorageBus
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum SerialControllerProgrammingInterfaceByte {
    // Prog IF 0x00
    UniversalAsynchronousReceiverTransmitter8250Compatible,
    // Prog IF 0x01
    UniversalAsynchronousReceiverTransmitter16450Compatible,
    // Prog IF 0x02
    UniversalAsynchronousReceiverTransmitter16550Compatible,
    // Prog IF 0x03
    UniversalAsynchronousReceiverTransmitter16650Compatible,
    // Prog IF 0x04
    UniversalAsynchronousReceiverTransmitter16750Compatible,
    // Prog IF 0x05
    UniversalAsynchronousReceiverTransmitter16850Compatible,
    // Prog IF 0x06
    UniversalAsynchronousReceiverTransmitter16950Compatible,
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum SemitransparentPeriperalControllerInterfaceToPeripheralControllerInterfaceBridgeProgrammingInterfaceByte {
    // Prog IF 0x40
    PrimaryBusTowardsHostProcessor,
    // Prog IF 0x80
    SecondaryBusTowardsHostProcessor
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum SerialAttachedSmallComputerSystemInterfaceProgrammingInterfaceByte {
    // Prog IF 0x00
    SerialAttachedSmallComputerSystemInterface,
    // Prog IF 0x01
    SerialStorageBus
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum TimerPro


				0
			},
			{
				1,
				3,
				true,
				0
			},
			{
				1,
				2,
				true,
				0
			},
			{
				1,
				1,
				true,
				0
			},
			{
				1,
				0,
				true,
				0
			},
			{
				0,
				12,
				true,
				0
			},
			{
				0,
				11,
				true,
				0
			},
			{
				0,
				10,
				true,
				0
			},
			{
				0,
				9,
				true,
				0
			},
			{
				0,
				8,
				true,
				0
			},
			{
				0,
				7,
				true,
				0
			},
			{
				0,
				6,
				true,
				0
			},
			{
				0,
				5,
				true,
				0
			},
			{
				0,
				4,
				true,
				0
			},
			{
				0,
				3,
				true,
				0
			},
			{
				0,
				2,
				true,
				0
			},
			{
				0,
				1,
				true,
				0
			},
			{
				0,
				0,
				true,
				0
			}
		},
		float_items = {
			{
				6,
				7,
				"dexiv3_1x1_1",
				0,
				7
			},
			{
				6,
				5,
				"dexiv3_1x1_1",
				0,
				7
			},
			{
				4,
				6,
				"dexiv3_1x2_2",
				0,
				-31
			},
			{
				3,
				10,
				"dexiv3_1x1_1",
				14,
				6
			},
			{
				3,
				8,
				"dexiv3_2x2_4",
				48,
				-11
			},
			{
				3,
				7,
				"dexiv3_1x2_2",
				0,
				-24
			},
			{
				3,
				6,
				"dexiv3_1x1_3",
				0,
				21
			},
			{
				3,
				5,
				"dexiv3_1x2_2",
				0,
				-24
			},
			{
				3,
				3,
				"dexiv3_2x2_3",
				61,
				-10
			},
			{
				3,
				2,
				"dexiv3_1x1_1",
				-9,
				10
			},
			{
				2,
				9,
				"dexiv3_3x1_2",
				107,
				26
			},
			{
				2,
				1,
				"dexiv3_3x1_1",
				98,
				26
			},
			{
				1,
				5,
				"dexiv3_2x2_3",
				60,
				-13
			}
		},
		ambush_event_ratio = {},
		ambush_ratio_extra = {},
		theme = {
			"sea_bisimai",
			45,
			20,
			-129,
			235,
			100,
			100,
			4,
			4,
			""
		},
		box_list = {},
		random_box_list = {
			9,
			23,
			103,
			1004,
			5001
		},
		box_refresh = {
			0
		},
		story_refresh = {},
		defeat_story = {},
		defeat_story_count = {},
		npc_data = {},
		activity_random_box = {},
		risk_levels = {},
		land_based = {
			{
				7,
				10


     }

            return message.channel.send(reply);
        }
        try{
            commandToRun.execute(message, args);
        } catch (error) {
            console.error(error); //change this to logging once implemented
            message.reply('there was an error trying to execute that command!');
        }
    };

    private getCommand(message: Message, commands: Collection<string, Command>): Array<any> {
        const args = message.content.slice(config.prefix.length).split(/ +/);
        const commandName = args.shift().toLowerCase();

        return [commands.get(commandName)
            || commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)), args];
    };
};module nn {

    export class Slider extends Widget implements IProgress {
        constructor() {
            super();
            this.clipsToBounds = true;

            this.signals.connect(SignalTouchBegin, this.__sld_touchchanged, this);
            this.signals.connect(SignalTouchEnd, this.__sld_touchchanged, this);
            this.signals.connect(SignalTouchMove, this.__sld_touchchanged, this);
        }

        dispose() {
            this._progressValue = undefined;
            super.dispose();
        }

        _initSignals() {
            super._initSignals();
            this._signals.register(SignalChanged);
        }

        _identifierView: CComponent;
        set identifierView(s: CComponent) {
            if (this._identifierView == s)
                return;
            if (this._identifierView)
                this.removeChild(this._identifierView);
            this._identifierView = s;
            if (s)
                this.addChild(s)
        }

        get identifierView(): CComponent {
            return this._identifierView;
        }

        /** 水平模式 */
        horizonMode: boolean = true;

        _progressValue: Percentage = new Percentage(1, 0);
        get progressValue(): Percentage {
            return this._progressValue;
        }

        set progressValue(val: Percentage) {
            this._progressValue = val;
            this.updateLayout();
        }

        updateLayout() {
            super.updateLayout();
            if (this._identifierView == null)
                return;

            let rc = this.boundsForLayout();
            let trc = this._identifierView.frame;
            if (this.horizonMode) {
                trc.x = this._progressValue.safepercent * (rc.width - trc.width);
                trc.y = rc.y + (rc.height - trc.height) * 0.5;
            } else {
                trc.y = this._progressValue.safepercent * (rc.height - trc.height);
                trc.x = rc.x + (rc.width - trc.width) * 0.5;
            }
            this._identifierView.frame = trc;
        }

        private __sld_touchchanged(s: Slot) {
            let t: CTouch = s.data;
            if (this._identifierView) {
                let rc = this.boundsForLayout();
                let idrc = this._identifierView.frame;
                idrc.x += t.delta.x;

                let pt = idrc.center;
                if (pt.x > rc.width) {
                    pt = rc.rightCenter;
                    idrc.center = pt;
                }
                else if (pt.x < 0) {
                    pt = rc.leftCenter;
                    idrc.center = pt;
                }
                this._identifierView.frame = idrc;

                let p = pt.x / rc.width;
                if (p != this.progressValue.percent) {
                    this.progressValue.percent = p;
                    this.sign


st angenommen habt werdet ihr in eine unabhängige Area teleportiert wo euch Shaitan gegenüber steht. Ihr müsst Shaitan töten und bekommt anschließend das Certificate of Demon Shaitan. Auch wenn ihr tot seit bekommt ihr das Zertifikat sobald Shaitan getötet wurde. Nur der Party Leader kann die Quest bei Shifle abgeben.

Belohnung: unbekannt ( man kann ja nicht alles wissen ;-P )

ca 200 SP …mehr gibts nicht für 20 minuten klopfen

		Antworten

				SieGER sagt:

			15. Juni 2008 um 12:39

Ich bezweifle, dass man strafrechtliche Schritte einleiten kann, allerdings kann man eine Abmahnung an denjenigen, der kopiert hat durch einen Anwalt zukommen lassen und die wird nicht unbedingt billig. Bei solch Abmahnungen kann man gleich von um die über 1000€ ausgehen. Wie auch immer gute Arbeit !

		Antworten

		<img alt="" src="https://web


 -> Result<u32, Error> {
    let mut count = 0;

    for input in input {
        let rule = PasswordRule::from_string(input)?;
        let found_letters: usize = rule.password_to_test.chars()
            .filter(|c| *c == rule.letter)
            .count();

        if rule.first_num <= found_letters && found_letters <= rule.second_num {
            count = count + 1;
        }
    }

    Ok(count)
}

pub fn second(input: &[String]) -> Result<u32, Error> {
    let mut count = 0;

    for input in input {
        let rule = PasswordRule::from_string(input)?;
        let mut iter = rule.password_to_test.chars();
        let is_rule_letter = |c: &char| *c == rule.letter;
        let found_first = iter.nth(rule.first_num - 1).filter(is_rule_letter);
        // second - first because the first call to `nth` consumed
        let found_second = iter.nth(rule.second_num - rule.first_num - 1).filter(is_rule_letter);

        if found_first.xor(found_second).is_some() {
            count = count + 1;
        }
    }

    Ok(count)
}

#[derive(PartialEq, Debug)]
pub struct PasswordRule {
    first_num: usize,
    second_num: usize,
    letter: char,
    password_to_test: String
}

impl PasswordRule {
    /// Take a string representation like so:
    /// "1-3 a: abcde"
    /// and parse it into this struct's fields.
    /// Examples:
    /// ```
    /// use advent_2020_day_2::PasswordRule;
    /// let input = String::from("1-3 a: abcde");
    /// let pw_rule = PasswordRule::from_string(&input).unwrap();
    /// ```
    ///
    pub fn from_string(input: &String) -> Result<PasswordRule, Error> {
        let mut first_num = 0;
        let mut second_num = 0;
        let mut letter = 'a';
        let mut password_to_test = String::from("");

        let mut found = false;

        for (i, part) in input.split(' ').enumerate() {
            found = true;

            match i {
                0 => {
                    let parts: Vec<&str> = part.split('-').collect();
                    if parts.len() < 2 {
                        return Error::new("Couldn't parse, int part missing");
                    }

                    first_num = (&parts[0]).parse().or(Error::new("not an int"))?;
                    second_num = (&parts[1]).parse().or(Error::new("not an int"))?;
                }
                1 => {
                    letter = part.chars().nth(0).unwrap();
                }
                2 => {
                    password_to_test = String::from(part);
                }
                _ => return Error::new("couldn't parse, too many parts!?")
            }
        }

        if !found {
            Error::new("NYI")
        } else {
            Ok(PasswordRule{first_num, second_num, letter, password_to_test})
        }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    fn example() -> Vec<String> {
        let input: Vec<&str> = vec!("1-3 a: abcde", "1-3 b: cdefg", "2-9 c: ccccccccc");
        input.iter()
            .map(|s: &&str| { String::from(*s) })
            .collect()
    }

    #[test]
    fn test_first() {
        let input = example();
        let result = first(&input).unwrap();
        let expected = 2;