     Name[N..0]'表示N+1位变量，而'Name'本身表示1位变量。

     您可以使用“x”或“-”来指示要忽略哪些输入和输出位。

     您可以使用二进制表示法（例如“10100011xxxx”）或十六进制表示法（例如“C3x”）。 Logisim 将确定哪个是哪个。

    您可以将表导出到文件，修改它并重新导入。 这对于复杂的表格来说是一个有用的帮助。

     下一步：

     编辑真值表

    。

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

  <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
  <meta content="2018-10-23T06:18:10.521000000" name="created"/>
  <meta content="2023-12-12T09:31:21" name="changed" translator="gocpicnic"/>
  <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
  <meta content="zh" http-equiv="Content-Language"/>
  <title>

   初学者教程
  </title>
  <link href="../../style.css" rel="stylesheet" type="text/css"/>

    初学者教程

    欢迎来到

     Logisim-evolution

    Logisim-evolution 允许您设计和模拟数字电路。 它旨在作为一种教育工具，帮助您了解数字电路的工作原理。

    为了练习使用 Logisim-evolution，让我们构建一个 XOR 电路,即一个接受两个输入（我们将其称为
    <var>
     x
    </var>
    和
    <var>


, 36, 115, 5, 148, 99, 0, 86, 150, 160, 58, 222, 53, 196, 241, 97, 220, 93, 179, 52, 183, 61, 105, 141, 50, 116, 212, 161, 41, 98, 184, 10, 37, 230, 157, 42, 53, 56, 5, 184, 197, 77, 21, 211, 93, 97, 21, 147, 200, 65, 159, 183, 154, 63, 153, 189, 137, 199, 187, 167, 101, 184, 11, 233, 163, 250, 110, 247, 221, 225, 108, 224, 110, 143, 186, 71, 220, 13, 192, 227, 120, 100, 30, 96, 211, 173, 58, 61, 184, 48, 28, 58, 141, 209, 44, 137, 224, 29, 112, 143, 206, 166, 26, 140, 175, 166, 250, 5, 43, 6, 148, 229, 198, 166, 200, 215, 40, 72, 255, 31, 109, 186, 53, 174, 247, 131, 216, 130, 202, 107, 51, 231, 157, 71, 137, 10, 224, 32, 192, 116, 46, 248, 12, 82, 158, 35, 93, 156, 229, 40, 146, 224, 64, 88, 131, 226, 141, 138, 235, 150, 29, 204, 161, 58, 86, 119, 209, 57, 174, 136, 240, 182, 219, 67, 129, 228, 171, 65, 132, 217, 101, 92, 51, 83, 111, 204, 236, 113, 59, 180, 251, 194, 123, 13, 74, 247, 116, 156, 29, 28, 245, 206, 150, 14, 214, 65, 157, 81, 108, 169, 3, 9, 237, 0, 113, 162, 55, 91, 230, 17, 19, 213, 137, 222, 93, 175, 55, 183, 61, 109, 251, 90, 238, 11, 217, 130, 81, 242, 215, 108, 96, 15, 173, 53, 142, 15, 172, 56, 74, 29, 194, 115, 35, 10, 243, 204, 212, 145, 178, 254, 221, 57, 218, 94, 22, 0, 60, 154, 196, 93, 183, 219, 142, 38, 9, 34, 60, 99, 71, 219, 23, 226, 44, 120, 52, 41, 29, 146, 48, 197, 209, 34, 16, 232, 84, 222, 117, 16, 42, 78, 117, 162, 234, 227, 62, 157, 247, 123, 51, 14, 207, 104, 253, 139, 7, 184, 104, 150, 219, 127, 243, 18, 74, 164, 179, 211, 13, 57, 77, 99, 66, 236, 88, 129, 248, 61, 31, 169, 248, 235, 2, 44, 215, 27, 199, 81, 75, 231, 19, 53, 53, 237, 101, 167, 151, 183, 47, 195, 175, 233, 132, 197, 255, 0, 248, 74, 181, 104, 119, 115, 0, 0 }) { } }
    public class HatchingChick : Emoji { public HatchingChick() : base("HatchingChick", EmojiSize.Size32, EmojiGroup.Animals_Nature, EmojiSkintone.Default, EmojiStyle.Color, new byte [] { 31, 139, 8, 0, 0, 0, 0, 0, 0, 10, 237, 92, 91, 111, 219, 70, 22, 254, 43, 132, 250, 146, 60, 152, 153, 251, 5, 136, 3, 88, 23, 167, 11, 164, 40, 176, 221, 246, 97, 95, 12, 194, 162, 109, 33, 178, 36, 72, 114, 155, 254, 251, 253, 206, 12, 69, 82, 22, 105, 218, 86, 44, 187, 89, 53, 64, 162, 17, 231, 118, 62, 158, 251, 57, 234, 199, 69, 182, 190, 73, 198, 167, 189, 95, 108, 234, 125, 194, 109, 234, 244, 2


          _p: PhantomData,
            }
        }
    }

    impl<S, R, G> MakeService<S, R, G>
    where
        G: GetSpan<R> + Clone,
    {
        pub fn new<T>(inner: S, get_span: G) -> Self
        where
            S: tower_util::MakeService<T, R>,
        {
            Self {
                get_span,
                inner,
                _p: PhantomData,
            }
        }
    }

    impl<S, R, G> Clone for MakeService<S, R, G>
    where
        G: GetSpan<R> + Clone,
        S: Clone,
    {
        fn clone(&self) -> Self {
            Self {
                get_span: self.get_span.clone(),
                inner: self.inner.clone(),
                _p: PhantomData,
            }
        }
    }

    impl<S, R, G> Future for MakeService<S, R, Option<G>>
    where
        S: Future,
        S::Item: tower_service::Service<R>,
        G: GetSpan<R> + Clone,
    {
        type Item = Service<S::Item, R, G>;
        type Error = S::Error;

        fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
            let inner = futures::try_ready!(self.inner.poll());
            let get_span = self.get_span.take().expect("polled after ready");
            Ok(Async::Ready(Service {
                inner,
                get_span,
                _p: PhantomData,
            }))
        }
    }

}

// === impl Service ===

impl<S, R, G> tower_service::Service<R> for Service<S, R, G>
where
    S: tower_service::Service<R>,
    G: GetSpan<R> + Clone,
{
    type Response = S::Response;
    type Error = S::Error;
    type Future = tracing_futures::Instrumented<S::Future>;

    fn poll_ready(&mut self) -> Poll<(), Self::Error> {
        self.inner.poll_ready()
    }

    fn call(&mut self, request: R) -> Self::Future {
        let span = self.get_span.span_for(&request);
        let _enter = span.enter();
        self.inner.call(request).instrument(span.clone())
    }
}

impl<S, R, G> Clone for Service<S, R, G>
where
    S: tower_service::Service<R> + Clone,
    G: GetSpan<R> + Clone,
{
    fn clone(&self) -> Self {
        Service {
            get_span: self.get_span.clone(),
            inner: self.inner.clone(),
            _p: PhantomData,
        }
    }
}

impl<S, R, G> Service<S, R, G>
where
    S: tower_service::Service<R>,
    G: GetSpan<R> + Clone,
{
    pub fn new(inner: S, get_span: G) -> Self {
        Service {
            get_span,
            inner,
            _p: PhantomData,
        }
    }
}
extern crate chattium_oxide_lib as cho;  // Chang
extern crate rand;
extern crate time;

use time::Tm;
use rand::Rng;
use std::net::Ipv4Addr;

fn random_ip<Rand: Rng>(rng: &mut Rand) -> (Ipv4Addr, u16) {
	(Ipv4Addr::new(rng.gen(), rng.gen(), rng.gen(), rng.gen()), rng.gen())
}

fn random_name<Rand: Rng>(rng: &mut Rand) -> String {
	rng.gen_ascii_chars().take(10).collect()
}

fn random_text<Rand: Rng>(rng: &mut Rand) -> String {


: 14px;">

Cancellation & Reschedule

Allow Cancellation: When enabled, you can set an expiration time to your cancellation link. This link will expire at the set time before the appointment, preventing last-minute cancellations.

Allow Rescheduling: Similar to cancellation, enabling this lets you set an expiration time to the rescheduling link. It will expire as configured before the appointment time.

Auto Confirm New Appointments: New bookings will automatically be marked as confirmed by default. If disabled, appointments will be unconfirmed, allowing manual review before confirmation.

Additional Settings

Contact Assignment

Assign contacts to service staff members upon booking: When enabled, this updates the contact's assigned user to the staff member handling their appointment. For example, if Contact A's assigned user is User A, but Contact A books an appointment with User B, the contact's assigned user will switch to User B.

Skip assignment if the contact already has an assigned user: If enabled, this setting prevents reassignment of a contact who already has an assigned user. It will only update contacts that currently have no assigned user to the appointment's owner.

Facebook Pixel ID: Enter your Facebook Pixel ID here to track events triggered through the booking process.

Lock timezone on the booking page: This option locks the displayed timezone on the booking page, preventing users from changing it. It’s particularly useful for in-person services, ensuring slots are shown in your set timezone regardless of the booker’s location.

<!DOCTYPE html>

  <meta charset="UTF-8" />
  <title>Hide Third


rames into the input triple buffer
		{
		return storeVideoFrames;
		}
	void storeVideoFrame(const Images::BaseImage& frame); // Inserts a new video frame into the input triple buffer from a background thread
	void frame(void); // Synchronizes between background threads and foreground thread
	DataItem* getDataItem(GLContextData& contextData) const // Returns the viewer component's OpenGL state object for rendering operations
		{
		/* Retrieve and return the context data item: */
		return contextData.retrieveDataItem<DataItem>(this);
		}
	};

}

#endif


//
//     Generated by class-dump 3.5 (64 bit).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

#import "NSObject.h"

@class NSColor, NSImage, NSString;

__attribute__((visibility("hidden")))
@interface NSColoredPencil : NSObject
{
    NSString *_name;
    NSColor *_color;
    NSImage *_image;
}

@property(readonly, copy) NSColor *color; // @synthesize color=_color;
@property(readonly, copy) NSString *name; // @synthesize name=_name;
@property(readonly) NSImage *image; // @synthesize image=_image;
- (id)debugDescription;
- (void)dealloc;
- (id)initWithName:(id)arg1 color:(id)arg2 image:(id)arg3;
- (id)owningPencilView;
- (void)setOwningPencilView:(id)arg1;
- (void)accessibilityPerformAction:(id)arg1;
- (id)accessibilityActionDescription:(id)arg1;
- (id)accessibilityActionNames;
- (void)accessibilitySetValue:(id)arg1 forAttribute:(id)arg2;
- (BOOL)accessibilityIsAttributeSettable:(id)arg1;
- (id)accessibilityAttributeValue:(id)arg1;
- (BOOL)accessibilityIsValueAttributeSettable;
- (id)accessibilityValueAttribute;
- (BOOL)accessibilityIsSizeAttributeSettable;
- (id)accessibilitySizeAttribute;
- (BOOL)accessibilityIsPositionAttributeSettable;
- (id)accessibilityPositionAttribute;
- (BOOL)accessibilityIsTopLevelUIElementAttributeSettable;
- (id)accessibilityTopLevelUIElementAttribute;
- (BOOL)accessibilityIsWindowAttributeSettable;
- (id)accessibilityWindowAttribute;
- (BOOL)accessibilityIsDescriptionAttributeSettable;
- (id)accessibilityDescriptionAttribute;
- (BOOL)accessibilityIsParentAttributeSettable;
- (id)accessibilityParentAttribute;
- (BOOL)accessibilityIsRoleDescriptionAttributeSettable;
- (id)accessibilityRoleDescriptionAttribute;
- (BOOL)accessibilityIsRoleAttributeSettable;
- (id)accessibilityRoleAttribute;
- (id)accessibilityAttributeNames;
- (BOOL)accessibilityIsIgnored;

@end


hb60702sr.vag|36492EFE|FE1E|fm
|voice/fm/event/hb60703cl.vag|BF8AC94B|F9D0|fm
|voice/fm/event/hb60704sf.vag|325DCEA0|1EB0|fm
|voice/fm/event/hb60705cl.vag|18B8A49A|8521|fm
|voice/fm/event/hb60706sf.vag|ACF31E82|C500|fm
|voice/fm/event/hb60707cl.vag|861674B8|5E91|fm
|voice/fm/event/hb60708sr.vag|DBDE853A|7B0D|fm
|voice/fm/event/hb60709do.vag|C8D2E870|0ED6|fm
|voice/fm/event/hb60710Acl.vag|6A37D07C|4320|fm
|voice/fm/event/hb60710Acl_1.vag|6FAECBA9|6D03|fm
|voice/fm/event/hb60710Acl_2.vag|B4B9633E|52A9|fm
|voice/fm/event/hb60710Acl_3.vag|FDB404B3|47CF|fm
|voice/fm/event/hb60710Acl_4.vag|06572FA7|2DFD|fm
|voice/fm/event/hb60710Bcl.vag|BBCE684F|EC3D|fm
|voice/fm/event/hb60710Bcl_1.vag|7D6E28B4|C21E|fm
|voice/fm/event/hb60710Bcl_2.vag|A6798023|FDB4|fm
|voice/fm/event/hb60710Bcl_3.vag|EF74E7AE|E8D2|fm
|voice/fm/event/hb60710Bcl_4.vag|1497CCBA|82E0|fm
|voice/fm/event/hb60710sf_1.vag|6CD340C3|2B11|fm
|voice/fm/event/hb60710sf_2.vag|B7C4E854|CF93|fm
|voice/fm/event/hb60710sf_3.vag|FEC98FD9|63F2|fm
|voice/fm/event/hb60711cl.vag|7A85C5A3|F796|fm
|voice/fm/event/hb60712tf.vag|8F165DD3|9CA7|fm
|voice/fm/event/hb60713cl.vag|E42B1581|2C26|fm
|voice/fm/event/hb60714tf.vag|28243002|E056|fm
|voice/fm/event/hb60715sf.vag|26AB7A7B|A69E|fm
|voice/fm/event/hb60716tf_1.vag|CFF68D38|7CF0|fm
|voice/fm/event/hb60716tf_2.vag|14E125AF|9872|fm
|voice/fm/event/hb60717sf.vag|B805AA59|7D2E|fm
|voice/fm/event/hb60718sf.vag|2359D47F|32A4|fm
|voice/fm/event/hb60719Atf.vag|C170F1CB|338B|fm
|voice/fm/event/hb60719cl.vag|09BCBE45|A935|fm
|voice/fm/event/hb60720Atf.vag|5C9D1322|6ECB|fm
|voice/fm/event/hb60720Atf_1.vag|A77159E2|40E8|fm
|voice/fm/event/hb60720Atf_2.vag|7C66F175|7F42|fm
|voice/fm/event/hb60720Atf_3.vag|356B96F8|6A24|fm
|voice/fm/even


>? VpcEndpointName { get; set; }

        /// <summary>
        /// The ID of the VPC to which the endpoint belongs.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        /// <summary>
        /// The number of private IP addresses that are assigned to an elastic network interface (ENI) in each zone. Only 1 is returned.
        /// </summary>
        [Input("zonePrivateIpAddressCount")]
        public Input<int>? ZonePrivateIpAddressCount { get; set; }

        public VpcEndpointArgs()
        {
        }
        public static new VpcEndpointArgs Empty => new VpcEndpointArgs();
    }

    public sealed class VpcEndpointState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The IP address version. Valid values:
        /// - `IPv4` (default): IPv4.
        /// - `DualStack`: dual-stack.
        /// </summary>
        [Input("addressIpVersion")]
        public Input<string>? AddressIpVersion { get; set; }

        /// <summary>
        /// The bandwidth of the endpoint connection.  1024 to 10240. Unit: Mbit/s.
        /// </summary>
        [Input("bandwidth")]
        public Input<int>? Bandwidth { get; set; }

        /// <summary>
        /// The state of the endpoint connection.
        /// </summary>
        [Input("connectionStatus")]
        public Input<string>? ConnectionStatus { get; set; }

        /// <summary>
        /// The time when the endpoint was created.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// Specifies whether to perform only a dry run, without performing the actual request. Valid values:
        /// </summary>
        [Input("dryRun")]
        public Input<bool>? DryRun { get; set; }

        /// <summary>
        /// The service state of the endpoint.
        /// </summary>
        [Input("endpointBusinessStatus")]
        public Input<string>? EndpointBusinessStatus { get; set; }

        /// <summary>
        /// The description of the endpoint.
        /// </summary>
        [Input("endpointDescription")]
        public Input<string>? EndpointDescription { get; set; }

        /// <summary>
        /// The domain name of the endpoint.
        /// </summary>
        [Input("endpointDomain")]
        public Input<string>? EndpointDomain { get; set; }

        /// <summary>
        /// The endpoint type.
        ///
        /// Only the value: Interface, indicating the Interface endpoint. You can add the service resource types of Application Load Balancer (ALB), Classic Load Balancer (CLB), and Network Load Balancer (NLB).
        /// </summary>
        [Input("endpointType")]
        public Input<string>? EndpointType { get; set; }

        /// <summary>
        /// RAM access policies. For more information about policy definitions, see Alibaba Cloud-access control (RAM) official guidance.
        /// </summary>
        [Input("policy


amount
                    itemStack.amount = amount
                    syncLater(1) {
                        player.giveItem(itemClone)
                    }
                }
                // NBT物品
                val nbtItemStack: NbtItemStack
                // NI物品数据
                val neigeItems: NbtCompound
                // NI物品id
                val id: String
                // NI节点数据
                val data: HashMap<String, String>
                when (val itemInfo = itemStack.isNiItem(true)) {
                    null -> return@addBasicItemEditor true
                    else -> {
                        nbtItemStack = itemInfo.nbtItemStack
                        neigeItems = itemInfo.neigeItems
                        id = itemInfo.id
                        data = itemInfo.data
                    }
                }
                sections.forEach { data.remove(it) }
                ItemManager.getItemStack(id, player, data)?.let { newItemStack ->
                    // 获取新物品的NBT
                    newItemStack.getNbt().also { newItemTag ->
                        // 把NeigeItems的特殊NBT掏出来
                        newItemTag.getCompound("NeigeItems")?.also { newNeigeItems ->
                            // 还原物品使用次数
                            if (neigeItems.containsKey("charge")) {
                                newNeigeItems.putInt("charge", neigeItems.getInt("charge"))
                            }
                            // 还原物品自定义耐久
                            if (neigeItems.containsKey("durability")) {
                                newNeigeItems.putInt("durability", neigeItems.getInt("durability"))
                            }
                            // 将新物品的NBT覆盖至原物品
                            nbtItemStack.setTag(newItemTag)
                        }
                    }
                    // 还原物品类型
                    itemStack.type = newItemStack.type
                    // 还原损伤值(1.12.2需要)
                    if (CbVersion.current() == CbVersion.v1_12_R1) {
                        itemStack.setDamage(newItemStack.getDamage())
                    }
                }
                return@addBasicItemEditor true
            }
            return@addBasicItemEditor false
        }
        // 物品重构
        addBasicItemEditor("rebuildAmount") { player, itemStack, content ->
            // 判断是不是空气
            if (itemStack.type != Material.AIR) {
                val info = content.split(" ", limit = 2)
                // 刷新数量
                val amount = info[0].toIntOrNull()?.coerceAtLeast(1) ?: 1
                // 获取待刷新节点信息
                val sections = (info.getOrNull(1) ?: "").parseObject<HashMap<String, String?>>()
                if (amount < itemStack.amount) {
                    val itemClone: ItemStack = itemStack.copy()
                    itemClone.amount -= amount
                    itemStack.amount = amount
                    syncLater(1) {
                        player.giveItem(itemClone)
                    }
                }
                // NBT物品
                val nbtItemStack: NbtItemStack
                // NI物品数据
                val neigeItems: NbtCompound
                // NI物品id
                val id: String
                // NI节点数据
                val data: HashMap<String, String>
                when (val itemInfo = itemStack.isNiItem(true)) {
                    null -> return@addBasicItemEditor true
                    else -> {
                        nbtItemStack = itemInfo.nbtItemStack
                        neigeItems = itemInfo.neigeItems
                        id = itemInfo.id
                        data = itemInfo.data
                    }
                }
                sections.forEach { (key, value) ->


//
//  AIReactorControl.h
//  SMG_NothingIsAll
//
//  Created by 贾  on 2017/12/7.
//  Copyright © 2017年 XiaoGang. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *  MARK:--------------------反应控制器 (中脑)--------------------
 *  1. 主要负责信息向算法皮层传递;
 *  2. 及对信息的反射做出处理;
 */
@class ImvAlgsModelBase;
@interface AIReactorControl : NSObject

/**
 *  MARK:--------------------先天mindValue工厂--------------------
 */
+(ImvAlgsModelBase*) createMindValue:(MVType)type value:(NSInteger)value;

/**
 *  MARK:--------------------反射情绪--------------------
 */
+(void) createReactor:(AIMoodType)moodType;

+(void) commitInput:(id)input;
+(void) commitCustom:(CustomInputType)type value:(NSInteger)value;
+(void) commitView:(UIView*)selfView targetView:(UIView*)targetView rect:(CGRect)rect;

/**
 *  MARK:--------------------提交反射反应--------------------
 *  1. 由外围神经提交一个反射信号;
 *  2. ReactorControl在收到信号后,响应反射;
 *  3. 并把反射执行的outLog构建到网络中;
 *
 *  目的: 是让he学会自主使用某外围功能;
 *  备注: 目前支持1个nsnumber参数; (也可以暂不支持参数)
 *
 *  @param identify : 反射标识
 *  @param datas    : 要反射执行的参数 (吸吮力度或哭的表情)
 *
 */
+(void) commitReactor:(NSString*)identify datas:(NSArray*)datas;
+(void) commitReactor:(NSString*)identify;

@end


          extract_filter(filter_map, &field.related_model()).map(|filter| vec![field.to_one_related(filter)])
                })
        }

        x => Err(QueryGraphBuilderError::InputError(format!(
            "Invalid relation filter input: {:?}",
            x
        ))),
    }
}

fn parse_query_mode(input: ParsedInputValue) -> QueryGraphBuilderResult<QueryMode> {
    let value: PrismaValue = input.try_into()?;
    let s = match value {
        PrismaValue::Enum(s) => s,
        PrismaValue::String(s) => s,
        _ => unreachable!(),
    };

    Ok(match s.as_str() {
        "default" => QueryMode::Default,
        "insensitive" => QueryMode::Insensitive,
        _ => unreachable!(),
    })
}
// Citadel: Bitcoin, LN & RGB wallet runtime
// Written in 2021 by
//     Dr. <NAME> <<EMAIL>>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain worldwide. This software is distributed without
// any warranty.
//
// You should have received a copy of the AGPL License
// along with this software.
// If not, see <https://www.gnu.org/licenses/agpl-3.0-standalone.html>.

use std::thread;

use internet2::ZmqSocketAddr;
use microservices::node::TryService;
use microservices::FileFormat;

use crate::client::{self, Client};
use crate::runtime;
use crate::Error;

pub fn run_embedded(mut config: runtime::Config) -> Result<Client, Error> {
    trace!("Citadel runtime configuration: {:#?}", &config);
    config.process();
    trace!("Processed configuration: {:#?}", &config);

    debug!("Starting Citadel runtime in background");
    let data_dir = config.data_dir.clone();
    let data_dir_str = data_dir.to_string_lossy().to_string();
    let network = config.chain.clone();
    let verbose = config.verbose;
    let electrum_server = config.electrum_server.clone();
    let rgb20_endpoint = config.rgb20_endpoint.clone();
    let stash_endpoint = ZmqSocketAddr::Inproc(s!("stash.rpc"));
    let stash = format!("{data_dir}/stash/", data_dir = data_dir_str);
    let cache = format!("{data_dir}/", data_dir = data_dir_str);
    let index = format!("{data_dir}/index/", data_dir = data_dir_str);

    debug!("Launching RGB node embedded runtime...");
    let stashd = rgb_node::stashd::Runtime::init(rgb_node::stashd::Config {
        verbose,
        data_dir: data_dir.clone(),
        stash: stash.clone(),
        index: index.clone(),
        rpc_endpoint: stash_endpoint.clone(),
        network: network.clone(),
        electrum_server: electrum_server.clone(),
        ..default!()
    })
    .expect("Error launching RGB node stashd thread");

    let rgb20d =
        rgb_node::fungibled::Runtime::init(rgb_node::fungibled::Config {
            verbose,
            data_dir,
            cache,
            format: FileFormat::Yaml,
            rpc_endpoint: rgb20_endpoint,
            stash_rpc: stash_endpoint,
            network,
        })
        .expect("Error launching RGB node fungibled thread");

    thread::spawn(move || {
        stashd.run_or_panic("stashd");
    });

    thread::spawn(move || {
        rgb20d.run_or_panic("fungibled");
    });
    debug!("RGB node embedded runtime has successfully started");

    let rpc_endpoint = config.rpc_endpoint.clone();
    thread::spawn(move || {
        runtime::run(config).expect("Error in Citadel runtime")
    });

    Client::with(client::Config {
        rpc_endpoint,
        verbose,
    })
}
<gh_stars>1-10
use our_package::encryptor::{rot13, Encryptable};
use std::io;


e.VolatilityImmutable,
		},
	),
	"st_rotate": makeBuiltin(
		defProps(),
		tree.Overload{
			Types: tree.ArgTypes{
				{"g", types.Geometry},
				{"angle_radians", types.Float},
			},
			ReturnType: tree.FixedReturnType(types.Geometry),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				g := tree.MustBeDGeometry(args[0])
				rotRadians := float64(tree.MustBeDFloat(args[1]))

				ret, err := geomfn.Rotate(g.Geometry, rotRadians)
				if err != nil {
					return nil, err
				}

				return tree.NewDGeometry(ret), nil
			},
			Info: infoBuilder{
				info: `Returns a modified Geometry whose coordinates are rotated around the origin by a rotation angle.`,
			}.String(),
			Volatility: tree.VolatilityImmutable,
		},
		tree.Overload{
			Types: tree.ArgTypes{
				{"g", types.Geometry},
				{"angle_radians", types.Float},
				{"origin_x", types.Float},
				{"origin_y", types.Float},
			},
			ReturnType: tree.FixedReturnType(types.Geometry),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				g := tree.MustBeDGeometry(args[0])
				rotRadians := float64(tree.MustBeDFloat(args[1]))
				x := float64(tree.MustBeDFloat(args[2]))
				y := float64(tree.MustBeDFloat(args[3]))
				geometry, err := geomfn.RotateWithXY(g.Geometry, rotRadians, x, y)
				if err != nil {
					return nil, err
				}
				return tree.NewDGeometry(geometry), nil
			},
			Info: infoBuilder{
				info: `Returns a modified Geometry whose coordinates are rotated around the provided origin by a rotation angle.`,
			}.String(),
			Volatility: tree.VolatilityImmutable,
		},
		tree.Overload{
			Types: tree.ArgTypes{
				{"g", types.Geometry},
				{"angle_radians", types.Float},
				{"origin_point", types.Geometry},
			},
			ReturnType: tree.FixedReturnType(types.Geometry),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				g := tree.MustBeDGeometry(args[0])
				rotRadians := float64(tree.MustBeDFloat(args[1]))
				originPoint := tree.MustBeDGeometry(args[2])

				ret, err := geomfn.RotateWithPointOrigin(g.Geometry, rotRadians, originPoint.Geometry)
				if errors.Is(err, geomfn.ErrPointOriginEmpty) {
					return tree.DNull, nil
				}

				if err != nil {
					return nil, err
				}
				return tree.NewDGeometry(ret), nil
			},
			Info: infoBuilder{
				info: `Returns a modified Geometry whose coordinates are rotated around the provided origin by a rotation angle.`,
			}.String(),
			Volatility: tree.VolatilityImmutable,
		},
	),
	"st_rotatex": makeBuiltin(
		defProps(),
		tree.Overload{
			Types: tree.ArgTypes{
				{"g", types.Geometry},
				{"angle_radians", types.Float},
			},
			ReturnType: tree.FixedReturnType(types.Geometry),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				g := tree.MustBeDGeometry(args[0])
				rotRadians := float64(tree.MustBeDFloat(args[1]))

				ret, err := geomfn.RotateX(g.Geometry, rotRadians)
				if err != nil {
					return nil, err
				}

				return tree.NewDGeometry(ret), nil
			},


ownloadsEnabled;
        set => SetField(ref _isStartDownloadsEnabled, value);
    }

    public bool IsStopDownloadsEnabled
    {
        get => _isStopDownloadsEnabled;
        set => SetField(ref _isStopDownloadsEnabled, value);
    }

    public bool IsPauseDownloadsEnabled
    {
        get => _isPauseDownloadsEnabled;
        set => SetField(ref _isPauseDownloadsEnabled, value);
    }

    public bool IsResumeDownloadsEnabled
    {
        get => _isResumeDownloadsEnabled;
        set => SetField(ref _isResumeDownloadsEnabled, value);
    }

    public bool IsRedownloadEnabled
    {
        get => _isRedownloadEnabled;
        set => SetField(ref _isRedownloadEnabled, value);
    }

    public bool IsDeleteDownloadsEnabled
    {
        get => _isDeleteDownloadsEnabled;
        set => SetField(ref _isDeleteDownloadsEnabled, value);
    }

    public bool IsDeleteAllCompletedEnabled
    {
        get => _isDeleteAllCompletedEnabled;
        set => SetField(ref _isDeleteAllCompletedEnabled, value);
    }

    #endregion

    public MainMenuItemsEnabledState()
    {
        IsStartAllDownloadsEnabled = true;
        IsStopAllDownloadsEnabled = true;
        IsPauseAllDownloadsEnabled = true;
        IsStartDownloadsEnabled = true;
        IsStopDownloadsEnabled = true;
        IsPauseDownloadsEnabled = true;
        IsRedownloadEnabled = true;
        IsDeleteDownloadsEnabled = true;
        IsDeleteAllCompletedEnabled = true;
    }
}


ato = 46797,
		/// <summary>
		/// Robe
		/// Level: 1
		/// Class: Armor
		/// </summary>
		PilgrimsAttire = 46800,
		/// <summary>
		/// Level: 20
		/// Class: Miscellaneous
		/// </summary>
		HeavyMurlocEgg = 46802,
		/// <summary>
		/// Level: 1
		/// Class: Recipe
		/// </summary>
		BountifulCookbook = 46809,
		/// <summary>
		/// Level: 70
		/// Class: Miscellaneous
		/// </summary>
		SilverCovenantHippogryph = 46813,
		/// <summary>
		/// Level: 70
		/// Class: Miscellaneous
		/// </summary>
		SunreaverDragonhawk = 46814,
		/// <summary>
		/// Level: 40
		/// Class: Miscellaneous
		/// </summary>
		QuelDoreiSteed = 46815,
		/// <summary>
		/// Level: 40
		/// Class: Miscellaneous
		/// </summary>
		SunreaverHawkstrider = 46816,
		/// <summary>
		/// Tabard
		/// Level: 1
		/// Class: Armor
		/// </summary>
		SilverCovenantTabard = 46817,
		/// <summary>
		/// Tabard
		/// Level: 1
		/// Class: Armor
		/// </summary>
		SunreaverTabard = 46818,
		/// <summary>
		/// Level: 1
		/// Class: Miscellaneous
		/// </summary>
		ShimmeringWyrmling = 46820,
		/// <summary>
		/// Level: 1
		/// Class: Miscellaneous
		/// </summary>
		ShimmeringWyrmling_2 = 46821,
		/// <summary>
		/// Robe
		/// Level: 1
		/// Class: Armor
		/// </summary>
		PilgrimsRobe = 46824,
		/// <summary>
		/// Level: 1
		/// Class: Miscellaneous
		/// </summary>
		SaveTheOrphansActionAlert = 46830,
		/// <summary>
		/// Level: 1
		/// Class: Miscellaneous
		/// </summary>
		MacabreMarionette = 46831,
		/// <summary>
		/// Level: 1
		/// Class: Consumable
		/// </summary>
		ArgentCrusadersBanner = 46843,
		/// <summary>
		/// Level: 70
		/// Class: Consumable
		/// </summary>
		SeaforiumBombs = 46847,
		/// <summary>
		/// Level: 80
		/// Class: TradeGoods
		/// </summary>
		TitaniumPowder = 46849,
		/// <summary>
		/// Level: 1
		/// Class: Quest
		/// </summary>
		StolenTallstriderLeg = 46859,
		/// <summary>
		/// Head
		/// Level: 1
		/// Class: Armor
		/// </summary>
		WhimsicalSkullMask = 46860,
		/// <summary>
		/// Holdable
		/// Level: 30
		/// Class: Armor
		/// </summary>
		BouquetOfOrangeMarigolds = 46861,
		/// <summary>
		/// Level: 1
		/// Class: Quest
		/// </summary>
		ConfessorsPrayerBook = 46870,
		/// <summary>
		/// Tabard
		/// Level: 1
		/// Class: Armor
		/// </summary>
		ArgentCrusadersTabard = 46874,
		/// <summary>
		/// Level: 1
		/// Class: Quest
		/// </summary>
		RidingTrainingPamphlet = 46875,
		/// <summary>
		/// Level: 1
		/// Class: Quest
		/// </summary>
		RidingTrainingPamphlet_2 = 46876,
		/// <summary>
		/// Level: 1
		/// Class: Quest
		/// </summary>
		RidingTrainingPamphlet_3 = 46877,
		/// <summ


//! ## Flushing
//!
//! In some cases, you may want to flush the underlying FIFOs:
//!
//! ```no_run
//! use libtegra::uart::Uart;
//!
//! // Clears the data from both, TX FIFO and RX FIFO.
//! Uart::A.flush();
//! ```
//!
//! [`Uart`]: struct.Uart.html

use core::{
    cell::Cell,
    fmt::{Error, Write},
    marker::Sync,
};

use crate::{car::Clock, timer::usleep};

pub use registers::*;

mod registers;

/// Representation of a UART.
///
/// NOTE: Instances of this struct should never be created manually.
/// Refer to the public constants the struct holds, which represent
/// the UARTs A through E.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Uart {
    /// The baud rate this [`Uart`] is configured with.
    ///
    /// NOTE: This value will be overridden by [`Uart::init`],
    /// so it is safe to initialize instances of this struct
    /// with a dummy value, such as `Cell::new(0)`.
    ///
    /// [`Uart`]: struct.Uart.html
    /// [`Uart::init`]: struct.Uart.html#method.init
    baud: Cell<u32>,
    /// A reference to the device clock that corresponds to the UART.
    clock: &'static Clock,
    /// A pointer to the [`Registers`] of the UART.
    ///
    /// [`Registers`]: struct.Registers.html
    registers: *const Registers,
}

// Definitions of known UARTs.

impl Uart {
    /// Representation of UART A.
    pub const A: Self = Uart {
        baud: Cell::new(0),
        clock: &Clock::UART_A,
        registers: UART_A_REGISTERS,
    };

    /// Representation of UART B.
    pub const B: Self = Uart {
        baud: Cell::new(0),
        clock: &Clock::UART_B,
        registers: UART_B_REGISTERS,
    };

    /// Representation of UART C.
    pub const C: Self = Uart {
        baud: Cell::new(0),
        clock: &Clock::UART_C,
        registers: UART_C_REGISTERS,
    };

    /// Representation of UART D.
    pub const D: Self = Uart {
        baud: Cell::new(0),
        clock: &Clock::UART_D,
        registers: UART_D_REGISTERS,
    };

    /// Representation of UART E.
    pub const E: Self = Uart {
        baud: Cell::new(0),
        clock: &Clock::UART_APE,
        registers: UART_E_REGISTERS,
    };
}

impl Uart {
    /// Waits for a given amount of baud cycles.
    #[inline(always)]
    fn wait_cycles(&self, amount: u32) {
        let baud_rate = self.baud.get();
        usleep((amount * 1_000_000 + 16 * baud_rate - 1) / (16 * baud_rate));
    }

    /// Waits for a given amount of baud cycles.
    #[inline(always)]
    fn wait_symbols(&self, amount: u32) {
        let baud_rate = self.baud.get();
        usleep((amount * 1_000_000 + baud_rate - 1) / baud_rate);
    }

    /// Computes the baud value that should be written to the MMIOs.
    fn get_baud_rate(&self) -> u32 {
        let baud_rate = self.baud.get();

        (8 * baud_rate + 408_000_000) / (16 * baud_rate)
    }

    /// Initializes the Uart with a given baud rate


� Creeping Anguish",
[2898] = "산악경비대 가슴보호구",
[2899] = "웬디고 목줄",
[2900] = "돌 버클러",
[2901] = "채광용 곡괭이",
[2902] = "신념의 망토",
[2903] = "다릴의 사냥용 활",
[2904] = "다릴의 사냥용 라이플",
[2905] = "염소 가죽 망토",
[2906] = "어둠골 쇠사슬 다리보호구",
[2907] = "드워프족 벌목용 도끼",
[2908] = "뾰족칼",
[2909] = "붉은 양모 복면",
[2910] = "민병대의 황금 장화",
[2911] = "켈러의 요대",
[2912] = "흑마술사의 발톱",
[2913] = "감의 비단 어깨덧옷",
[2915] = "타란 쇄빙기",
[2916] = "황금사자 방패",
[2917] = "평온의 반지",
[2918] = "Deprecated Coif of Inner Strength",
[2919] = "고대의 유물",
[2920] = "신성한 유물",
[2921] = "축복받은 유물",
[2922] = "정신의 유물",
[2923] = "고결의 유물",
[2924] = "악어 고기",
[2925] = "악어 껍질",
[2926] = "바질 스레드의 머리카락",
[2927] = "미사용 Creeping Torment",
[2928] = "부패의 가루",
[2929] = "썩은 무덤 가루",
[2930] = "고통의 정수",
[2931] = "여신의 고뇌",
[2932] = "고통의 덩굴",
[2933] = "린의 인장",
[2934] = "손상된 가죽 조각",
[2939] = "광포어 피",
[2940] = "피투성이 곰 앞발",
[2941] = "지하감옥 나이프",
[2942] = "철제 너클",
[2943] = "팔레스의 눈",
[2944] = "팔레스의 저주받은 눈",
[2945] = "미사용 (OLD)Medium Throwing Knife",
[2946] = "부서진 소형 투척용 단검",
[2947] =


-with-blue-cheese-and-bacon-4098.json)
 * [Quinoa Bacon And Blue Cheese Fritters With Horseradish Yogurt Sauce](../../index/q/quinoa-bacon-and-blue-cheese-fritters-with-horseradish-yogurt-sauce-51125000.json)
 * [Quinoa Salad With Beets Blue Cheese And Nutty Herb Vinaigrette](../../index/q/quinoa-salad-with-beets-blue-cheese-and-nutty-herb-vinaigrette-56389908.json)
 * [Radicchio Salad With Spanish Blue Cheese And Peppered Almonds](../../index/r/radicchio-salad-with-spanish-blue-cheese-and-peppered-almonds-103115.json)
 * [Red Cabbage Blue Cheese And Walnut Empanadas](../../index/r/red-cabbage-blue-cheese-and-walnut-empanadas-104136.json)
 * [Red Radishes Stuffed With Blue Cheese](../../index/r/red-radishes-stuffed-with-blue-cheese-101558.json)
 * [Red White And Blue Cheesecake With Chocolate Cookie Crust](../../index/r/red-white-and-blue-cheesecake-with-chocolate-cookie-crust-12282.json)
 * [Red White And Blue Ice Cream Cake](../../index/r/red-white-and-blue-ice-cream-cake-232354.json)
 * [Red White And Blue Ice Cream Cake](../../index/r/red-white-and-blue-ice-cream-cake-51108000.json)
 * [Red White And Blue Potato And Beet Chips](../../index/r/red-white-and-blue-potato-and-beet-chips-51170000.json)
 * [Rib Eye Steak With Blue Cheese Butter And Walla Walla Onion Rings](../../index/r/rib-eye-steak-with-blue-cheese-butter-and-walla-walla-onion-rings-360669.json)
 * [Rib Eye Steaks With Mushrooms Brandy And Blue Cheese](../../index/r/rib-eye-steaks-with-mushrooms-brandy-and-blue-cheese-103434.json)
 * [Rib Eye Steaks With Radicchio Pear And Blue Cheese Salad](../../index/r/rib-eye-steaks-with-radicchio-pear-and-blue-cheese-salad-240428.json)
 * [Roast Beef Saga Blue And Watercress With Horseradish Mayonnaise On French Bread](../../index/r/roast-beef-saga-blue-and-watercress-with-horseradish-mayonnaise-on-french-bread-10477.json)
 * [Roast Beef Sandwiches With Blue Cheese Dressing](../../index/r/roast-beef-sandwiches-with-blue-cheese-dressing-103783.json)
 * [Roast Beef Sandwiches With Sweet And Sour Red Onions And Blue Cheese](../../index/r/roast-beef-sandwiches-with-sweet-and-sour-red-onions-and-blue-cheese-106962.json)
 * [Roast Wild Turkey With Blue Cornbread Shrimp Stuffing](../../index/r/roast-wild-turkey-with-blue-cornbread-shrimp-stuffing-104162.json)
 * [Roasted Pepper And Onion Salad With Blue Cheese](../../index/r/roasted-pepper-and-onion-salad-with-blue-cheese-51117420.json)
 * [Roasted Sweet Onions With Cabrales Blue Cheese](../../index/r/roasted-sweet-onions-with-cabrales-blue-cheese-109062.json)
 * [Romaine Salad With Chives And Blue Cheese](../../index/r/romaine-salad-with-chives-and-blue-cheese-106303.json)
 * [Romaine Wedges With Tangy Blue Cheese Vinaigrette](../../index/r/romaine-wedges-with-


profilebegin(`Iris/Demo/Widgets/{name}`)
                    widgetDemos[name]()
                    debug.profileend()
                end
            end
            Iris.End()
            debug.profileend()

            debug.profilebegin("Iris/Demo/Tables")
            tablesDemo()
            debug.profileend()

            debug.profilebegin("Iris/Demo/Layout")
            layoutDemo()
            debug.profileend()

            Iris.CollapsingHeader({ "Background" })
            do
                Iris.Checkbox({ "Show background colour" }, { isChecked = showBackground })
                Iris.InputColor4({ "Background colour" }, { color = backgroundColour, t


        .expect("Failed to create Client")
}

pub async fn init_signed() -> Nash {
    dotenv().ok();

    let parameters = NashParameters {
        credentials: Some(NashCredentials {
            api_key:    std::env::var("NASH_API_KEY").expect("Couldn't get environment variable."),
            api_secret: std::env::var("NASH_API_SECRET").expect("Couldn't get environment variable."),
        }),
        environment: Environment::Sandbox,
        affiliate_code: None,
        client_id: 1,
        sign_states_loop_interval: None,
        timeout: Duration::new(10, 0)
    };

    OpenLimits::instantiate(parameters)
        .await
        .expect("Failed to create Client")
}<reponame>YJDoc2/Bytecode
use crate::util;
use proc_macro::TokenStream;
use proc_macro2::Ident;
use quote::quote;
use std::collections::BTreeMap;

// we use at max 2 bytes for instructions, and thus 1 bit is reserved to show length of instruction
// we might need to add more constants in future to indicate this, rather than hardcoding directly
const MAX_VARIANTS_ALLOWED: usize = 1 << 15;

pub fn derive_enum(name: &syn::Ident, input_enum: &syn::DataEnum) -> TokenStream {
    // maximum instructions possible for this enum
    // maybe change this name a bit
    let max_possible_instructions = input_enum.variants.len();

    // make sure possible instructions are less than allowed
    if max_possible_instructions > MAX_VARIANTS_ALLOWED {
        panic!(
            "Currently at max {} enum variants are supported, found {}",
            MAX_VARIANTS_ALLOWED,
            input_enum.variants.len()
        );
    }

    // this maps the variants into the code for the compile method
    // for each individual enum variant
    // we later iter over this to fill the body of compile method impl
    let compiled = input_enum
        .variants
        .iter()
        .enumerate()
        .map(|(i, v)| compile_enum_variant(name, i, v));

    // we extract this here, as multiple places need this name
    let parse_fn_param_name = Ident::new("__bytes", name.span());

    // this generates code for initial check for validity of the byte stream
    // in the parse method impl.
    // If this check fails, we can quickly exit the compile method
    // with appropriate error
    // <=, as max_possible_instruction is total number of enum variants, which start from 1
    let parse_check_logic = if max_possible_instructions <= 1 << 7 {
        // If the number of enum variants are less than 1<<7, all bytecodes generated
        // will be 1 byte length, so we have to only check the first byte
        let _max = max_possible_instructions as u8;
        // >= max, as counting starts at 0
        quote! {
            if #parse_fn_param_name[0] >= #_max{
                return std::result::Result::Err(bytecode::BytecodeError::InvalidInstruction);
            }
        }
    } else {
        // If the total variants are greater that 1<<7. we need to check first as well as second byte
        // If the 0th byte of bytestream is less than 1<<7, then it is definitely valid bytecode,
        // as 2-byte bytecode only begin after 1<<7 bytecode
        // if the 0th byte is greater than 1<<7, then there must be at least two bytes
        // and the u16 formed by both of them must be less than max possible instructions
        let _max = max_possible_instructions as u16;
        quote! {
            if #parse_fn_param_name[0] >= 1<< 7 && #parse_fn_param_name.len() < 2{
                return std::result::Result::Err(bytecode::BytecodeError::IncompleteInstruction);
            }
            if #parse_fn_param_name[0] >= 1<< 7{
                let higher_byte:u8 = #parse_fn_param_name[0] & (


commune by 31 March of each year whether its proportion of second homes exceeds 20 per cent or not.

3 ARE may verify ex officio the data supplied by the communes in accordance with Article 1 paragraph 1.

4 Every year it shall publish a list with the following details for each commune: total number of homes, number of principal homes, proportion of principal homes and a declaration as to whether the proportion of second homes exceeds 20 per cent or not.

Section 2 Construction of New Homes

Art. 3 Note in the land register

1 The condition of use that must be noted in the land register in respect of homes with restriction on use in accordance with Act is worded as follows:

a.

principal home or home deemed equivalent to a principal home in accordance with Article 7 paragraph 1 letter a of the Act;

b.

home managed as tourist accommodation in accordance with Article 7 paragraph 2 letter a of the Act; or

c.

home managed as tourist accommodation in accordance with Article 7 paragraph 2 letter b of the Act (home forming part of an organised accommodation complex).

2 The note in the land register further includes the building and dwelling identifier for the home concerned in accordance with Article 8 paragraphs 2 letter a and Article 3 letter a of the Ordinance of 9 June 20174 on the Federal Register of Buildings and Dwellings.5

3 The commune may record the restriction on use in the RBD.

4 SR 431.841

5 Amended by Annex 2 No II 4 of the O of 9 June 2017 on the Federal Register of  Buildings and Dwellings, in force since 1 July 2017 (<a target="_blank" routerlink="./" href="


vq %r10, 48(%rcx)
	movq %r11, 56(%rcx)
	popq %r15
	popq %r14
	popq %r13
	popq %r12
	popq %rbx
ret


(Attributes.MAX_HEALTH, 24.0F);
	}

	@Override
	public SpawnGroupData finalizeSpawn(
		ServerLevelAccessor level,
		DifficultyInstance difficulty,
		/*? >=1.21.3 {*/
		EntitySpawnReason spawnReason,
		/*?} else {*/
		/*MobSpawnType spawnReason,
		 *//*?}*/
		@Nullable SpawnGroupData entityData
	) {
		this.setItemSlot(EquipmentSlot.MAINHAND, new ItemStack(Items.BOW));
		return super.finalizeSpawn(level, difficulty, spawnReason, entityData);
	}

	@Override
	public void aiStep() {
		super.aiStep();

		if (this.level().isClientSide()) {
			return;
		}

		if (this.getTicksUntilCanCreateIllusions() > 0) {
			this.setTicksUntilCanCreateIllusions(this.getTicksUntilCanCreateIllusions() - 1);
		}

		if (
			this.wasAttacked()
			&& this.getTicksUntilCanCreateIllusions() == 0
		) {
			this.createIllusions();
		}

		if (
			this.wasAttacked()
			&& this.getTarget() == null
			&& this.getTicksUntilCanCreateIllusions() < ILLUSION_LIFETIME_TICKS / 3
		) {
			this.setWasAttacked(false);
			this.setTicksUntilCanCreateIllusions(0);
		}

		if (!this.isIllusion()) {
			return;
		}

		if (this.getTicksUntilDespawn() > 0) {
			this.setTicksUntilDespawn(this.getTicksUntilDespawn() - 1);
		}

		boolean isIllusionerNonExistingOrDead = this.getIllusioner() != null && !this.getIllusioner().isAlive();

		if (
			this.getTicksUntilDespawn() == 0
			|| isIllusionerNonExistingOrDead
		) {
			this.discardIllusion();
		}
	}

	@Override
	/*? >=1.21.3 {*/
	public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount)
	/*?} else {*/
	/*public boolean hurt(DamageSource damageSource, float amount)
	*//*?}*/
	{
		Entity attacker = damageSource.getEntity();
		EntityType<?> attackerType = null;

		if(attacker != null) {
			attackerType = attacker.getType();
		}

		if (
			(
				attackerType != null
				&& (
					attackerType.is(EntityTypeTags.ILLAGER_FRIENDS)
					|| attackerType.is(EntityTypeTags.RAIDERS)
				)
			)
			|| (
				this.isIllusion()
				&& !(attacker instanceof LivingEntity)
			)
		) {
			return false;
		}

		if (!this.level().isClientSide()) {
			if (attackerType != null && !attackerType.is(EntityTypeTags.ILLAGER_FRIENDS) && !attackerType.is(EntityTypeTags.RAIDERS)) {
				if (this.isIllusion()) {
					this.discardIllusion();
					return false;
				}

				if (
					this.getTicksUntilCanCreateIllusions() == 0
					&& (
						!attackerType.is(EntityTypeTags.ILLAGER_FRIENDS)
						&& !attackerType.is(EntityTypeTags.RAIDERS)
						&& !(damageSource.getEntity() instanceof Player player && player.getAbilities().instabuild)
					)
				) {
					this.createIllusions();
				}
			}
		}

		/*? >=1.21.3 {*/
		return super.hurtServer(level, damageSource,


или вас, - быть может, вы будете благодарны"
  },
  {
    "surah_number": 2,
    "verse_number": 53,
    "content":
        "Вот Мы даровали Мусе (Моисею) Писание и различение, - быть может, вы последуете прямым путем"
  },
  {
    "surah_number": 2,
    "verse_number": 54,
    "content":
        "Вот сказал Муса (Моисей) своему народу: «О мой народ! Вы были несправедливы к себе, когда стали поклоняться тельцу. Покайтесь перед своим Создателем и убейте сами себя (пусть невинные убьют беззаконников). Так будет лучше для вас перед вашим Создателем». Затем Он принял ваши покаяния. Воистину, Он - Принимающий покаяния, Милосердный"
  },
  {
    "surah_number": 2,
    "verse_number": 55,
    "content":
        "Вот вы сказали: «О Муса (Моисей)! Мы не поверим тебе, пока не увидим Аллаха открыто». Вас поразила молния (или постигла гибель), тогда как вы наблюдали за этим"
  },
  {
    "surah_number": 2,
    "verse_number": 56,
    "content":
        "Затем Мы воскресили вас после смерти, - быть может, вы будете благодарны"
  },
  {
    "surah_number": 2,
    "verse_number": 57,
    "content":
        "Мы осенили вас облаками и ниспослали манну и перепелов: «Вкушайте блага, которыми Мы наделили вас». Они не были несправедливы по отношению к Нам - они поступали несправедливо лишь по отношению к себе"
  },
  {
    "surah_number": 2,
    "verse_number": 58,
    "content":
        "Вот Мы сказали: «Войдите в этот город и ешьте вволю, где пожелаете. Войдите во врата, поклонившись, и скажите: «Прости нас!». Мы простим ваши прегрешения и приумножим награду творящим добро»"
  },
  {
    "surah_number": 2,
    "verse_number": 59,
    "content":
        "Беззаконники заменили сказанное им слово другим, и Мы ниспослали на беззаконников наказание с неба за то, что они поступали нечестиво"
  },
  {
    "surah_number": 2,
    "verse_number": 60,
    "content":
        "Вот Муса (Моисей) попросил питья для своего народа, и Мы сказали: «Ударь своим посохом по камню». Из него забили двенадцать ключей, и все люди узнали, где им надлежит пить. Ешьте и пейте


ers.adr.L)

    /**
     * Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object.
     *
     * @param size the size of the created sampler object names
     *
     * @see Reference Page
     */
    override fun createSamplers(size: Int): GlSamplers = GlSamplers(size).apply(::createSamplers)

    /**
     * Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object.
     *
     * @see Reference Page
     */
    override fun createSamplers(): GlSampler = GlSampler(readInt { GL45C.nglCreateSamplers(1, it) })

    // --- [ glCreateProgramPipelines ] ---

    /**
     * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object.
     *
     * @param pipelines the buffer in which to return the created program pipeline names
     *
     * @see Reference Page
     */
    override fun createProgramPipelines(pipelines: GlPipelines) = GL45C.nglCreateProgramPipelines(pipelines.rem, pipelines.adr.L)

    /**
     * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object.
     *
     * @param size the size of the created program pipeline names
     *
     * @see Reference Page
     */
    override fun createProgramPipelines(size: Int): GlPipelines = GlPipelines(size).apply(::createProgramPipelines)

    /**
     * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object.
     *
     * @see Reference Page
     */
    override fun createProgramPipelines(): GlPipeline = GlPipeline(readInt { GL45C.nglCreateProgramPipelines(1, it) })

    // --- [ glCreateQueries ] ---

    /**
     * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}.
     *
     * @param target the query target. One of:

{@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}	{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}	{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}	{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}

{@link GL33#GL_TIMESTAMP TIMESTAMP}	{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}	{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}

     * @param ids    the buffer in which to return the created query object names
     *
     * @see Reference Page
     */
    override fun createQueries(target: QueryTarget, ids: GlQueries) = GL45C.nglCreateQueries(target.i, ids.rem, ids.adr.L)

    /**
     * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}.
     *
     * @param target the query


:)"
					});
			}
			else
				setTimeout(() => {
					lastHasInternetState = false;
				}, 10000);
		});
	}
	lastHasInternetState = navigator.onLine;
}, 1000);
((storageObject.get(_storageKey) || []) as any[]).forEach(([date, anime]) => {
	(anime as any).sync = false;
	_ANIMES.set(Number(anime.malId), [new Date(date), new AnimeEntry(anime as any)]);
});

export { sync, get, size, ThumbnailManager, updateInMalWhenHasInternet };

import * as Yup from 'yup';

const occupationSchema = Yup.object().shape({
  id: Yup.string(),
  description: Yup.string().required("O campo 'Descrição' é obrigátorio"),
  situation: Yup.boolean().required("O campo 'Situação' é obrigátorio"),
});

export default occupationSchema;
/**
 * Routers
 *
 * Script for load routers from app config
 *
 * @package    kzarshenas/crazyphp
 * @author     kekefreedog <kevin.zarshenas@gmail.com>
 * @copyright  2022-2023 Kévin Zarshenas
 */

/**
 * Load
 *
 * Function for load routers from app config
 *
 * @return string[]
 */
let load = (yaml, fs) => {

    // Set result
    let result = {};

    // Get doc
    let doc = yaml.load(fs.readFileSync('./config/Router.yml', 'utf8'));

    // Check if router
    if(("Router" in doc))

        // Iteration of type
        for(let type of ["app"/* , "api", "asset" */])

            // Check router
            if((type in doc["Router"]) && doc["Router"][type].length)

                // Iteration of current router type
                for(let router of doc["Router"][type])

                    // Check name and if file exists
                    if(router !== null && ("name" in router) && router["name"] && fs.existsSync("./app/Environment/Page/"+router.name+"/index.ts")){

                        // Current collection
                        result["page/"+type+"/"+router.name] = "./app/Environment/Page/"+router.name+"/index.ts";

                    }

    // Return result
    return result;

}

// Export function
exports.load = load;export class Animal{
    isRpt:boolean
    food:string
    cont:string

    run(){
console.log(`Animal is running`)
    }
walk(){
console.log(`Animal is walking`)
}
eat(){
console.log(`Animal is eating`)
}
}import * as types from './types'
import { Token, TokenType } from './scanner'
import * as ast from './ast'
import { RuntimeError, errorReporter } from './error'

export class Interpreter implements ast.SyntaxVisitor<types.LoxObject, void> {
  globals = new Environment()
  private environment = this.globals
  private locals: Map<ast.Expr, number> = new Map()

  constructor() {
    // Native function 'clock'
    this.globals.define('clock', new types.LoxClockFunction())
  }

  interpret(statements: ast.Stmt[]): void
  interpret(expr: ast.Expr): void
  interpret(target: ast.Stmt[] | ast.Expr): void {
    if (target instanceof Array) {
      try {
        for (const stmt of target) {
          stmt && this.execute(stmt)
        }
      } catch (error) {
        errorReporter.report(error)
      }
    } else {
      const value = this.evaluate(target)
      console.log(this


mpiler
extern crate pest;
#[macro_use]
extern crate pest_derive;

use crate::pest::Parser;
use std::error::Error;

const PROGRAM: &'static str = "if true then 1 else 2";

#[derive(Parser)]
#[grammar = "grammar.pest"]
pub struct ImpParser {}

fn main() -> Result<(), &'static dyn Error> {
    println!("{:?}", ImpParser::parse(Rule::expr, PROGRAM));
    Ok(())
}
//! An SPSC channel with a buffer size of one.
//!
//! This channel should mostly be used if the sender only sends a single message.
//!
//! ### Example
//!
//! Consider the case of an event loop. To request information from the event loop,
//! another thread might send the event loop a message and the event loop will send the
//! answer over the channel that was sent together with the request.

use arc::{Arc, ArcTrait};
use self::imp::{Packet};
use select::{Selectable, _Selectable};
use {Error, Sendable};

mod imp;
pub mod stack;
#[cfg(test)] mod test;
#[cfg(test)] mod bench;

/// Creates a new SPSC one space channel.
pub fn new<'a, T: Sendable+'a>() -> (Producer<'a, T>, Consumer<'a, T>) {
    let packet = Arc::new(Packet::new());
    packet.set_id(packet.unique_id());
    (Producer { data: packet.clone() }, Consumer { data: packet })
}

/// The producing half of an SPSC one space channel.
pub struct Producer<'a, T: Sendable+'a> {
    data: Arc<imp::Packet<'a, T>>,
}

impl<'a, T: Sendable+'a> Producer<'a, T> {
    /// Sends a message over this channel. Doesn't block if the channel is full.
    ///
    /// ### Error
    ///
    /// - `Disconnected` - The receiver has disconnected.
    /// - `Full` - The channel is full.
    pub fn send(&self, val: T) -> Result<(), (T, Error)> {
        self.data.send(val)
    }
}

unsafe impl<'a, T: Sendable+'a> Send for Producer<'a, T> { }

impl<'a, T: Sendable+'a> Drop for Producer<'a, T> {
    fn drop(&mut self) {
        self.data.sender_disconnect();
    }
}

/// The consuming half of an SPSC one space channel.
pub struct Consumer<'a, T: Sendable+'a> {
    data: Arc<imp::Packet<'a, T>>,
}

impl<'a, T: Sendable+'a> Consumer<'a, T> {
    /// Receives a message from this channel. Doesn't block if the channel is empty.
    ///
    /// ### Error
    ///
    /// - `Disconnected` - The channel is empty and the sender has disconnected.
    /// - `Empty` - The channel is empty.
    pub fn recv_async(&self) -> Result<T, Error> {
        self.data.recv_async()
    }

    /// Receives a message over this channel. Blocks if the channel is empty.
    ///
    /// ### Error
    ///
    /// - `Disconnected` - The sender has disconnected.
    pub fn recv_sync(&self) -> Result<T, Error> {
        self.data.recv_sync()
    }

    /// Returns whether the channel is non-empty.
    pub fn can_recv(&self) -> bool {
        self.data.ready()
    }
}

unsafe impl<'a, T: Sendable+'a> Send for Consumer<'a, T> { }

impl<'a, T: Sendable+'a> Drop for Consumer<


 1);
    resethudmatrix();

    hudshader->set();
    gle::colorf(1, 1, 1);

    gle::defvertex(2);
    gle::deftexcoord0();

    float fh = 0.075f*min(w, h), fw = fh*10,
          fx = renderedframe ? w - fw - fh/4 : 0.5f*(w - fw),
          fy = renderedframe ? fh/4 : h - fh*1.5f,
          fu1 = 0/512.0f, fu2 = 511/512.0f,
          fv1 = 0/64.0f, fv2 = 52/64.0f;
    settexture("data/loading_frame.png", 3);
    bgquad(fx, fy, fw, fh, fu1, fv1, fu2-fu1, fv2-fv1);

    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    float bw = fw*(511 - 2*17)/511.0f, bh = fh*20/52.0f,
          bx = fx + fw*17/511.0f, by = fy + fh*16/52.0f,
          bv1 = 0/32.0f, bv2 = 20/32.0f,
          su1 = 0/32.0f, su2 = 7/32.0f, sw = fw*7/511.0f,
          eu1 = 23/32.0f, eu2 = 30/32.0f, ew = fw*7/511.0f,
          mw = bw - sw - ew,
          ex = bx+sw + max(mw*bar, fw*7/511.0f);
    if(bar > 0)
    {
        settexture("data/loading_bar.png", 3);
        gle::begin(GL_QUADS);
        gle::attribf(bx,    by);    gle::attribf(su1, bv1);
        gle::attribf(bx+sw, by);    gle::attribf(su2, bv1);
        gle::attribf(bx+sw, by+bh); gle::attribf(su2, bv2);
        gle::attribf(bx,    by+bh); gle::attribf(su1, bv2);

        gle::attribf(bx+sw, by);    gle::attribf(su2, bv1);
        gle::attribf(ex,    by);    gle::attribf(eu1, bv1);
        gle::attribf(ex,    by+bh); gle::attribf(eu1, bv2);
        gle::attribf(bx+sw, by+bh); gle::attribf(su2, bv2);

        gle::attribf(ex,    by);    gle::attribf(eu1, bv1);
        gle::attribf(ex+ew, by);    gle::attribf(eu2, bv1);
        gle::attribf(ex+ew, by+bh); gle::attribf(eu2, bv2);
        gle::attribf(ex,    by+bh); gle::attribf(eu1, bv2);
        gle::end();
    }

    if(text)
    {
        int tw = text_width(text);
        float tsz = bh*0.8f/FONTH;
        if(tw*tsz > mw) tsz = mw/tw;
        pushhudmatrix();
        hudmatrix.translate(bx+sw, by + (bh - FONTH*tsz)/2, 0);
        hudmatrix.scale(tsz, tsz, 1);
        flushhudmatrix();
        draw_text(text, 0, 0);
        pophudmatrix();
    }

    glDisable(GL_BLEND);

    if(tex)
    {
        glBindTexture(GL_TEXTURE_2D, tex);
        float sz = 0.35f*min(w, h), x = 0.5f*(w-sz), y = 0.5f*min(w, h) - sz/15;
        bgquad(x, y, sz, sz);

        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        settexture("data/mapshot_frame.png", 3);
        bgquad(x, y, sz, sz);
        glDisable(GL_BLEND);
    }

    swapbuffers(false);
}

int keyrepeatmask = 0, textinputmask = 0;


WEGIAN("norwegian", "no"),
    /** 旁遮普语 */
    PUNJABI("punjabi", "pa"),
    /** 葡萄牙语 */
    PORTUGUESE("portuguese", "pt"),
    /** 普什图语 */
    PASHTO("pashto", "ps"),
    /** 齐切瓦语 */
    CHICHEWA("chichewa", "ny"),
    /** 日语 */
    JAPANESE("japanese", "ja"),
    /** 瑞典语 */
    SWEDISH("swedish", "sv"),
    /** 萨摩亚语 */
    SAMOAN("samoan", "sm"),
    /** 塞尔维亚语 */
    SERBIAN("serbian", "sr"),
    /** 塞索托语 */
    SESOTHO("sesotho", "st"),
    /** 僧伽罗语 */
    SINHALA("sinhala", "si"),
    /** 世界语 */
    ESPERANTO("esperanto", "eo"),
    /** 斯洛伐克语 */
    SLOVAK("slovak", "sk"),
    /** 斯洛文尼亚语 */
    SLOVENIAN("slovenian", "sl"),
    /** 斯瓦希里语 */
    SWAHILI("swahili", "sw"),
    /** 苏格兰盖尔语 */
    SCOTS_GAELIC("scotsGaelic", "gd"),
    /** 宿务语 */
    CEBUANO("cebuano", "ceb"),
    /** 索马里语 */
    SOMALI("somali", "so"),
    /** 塔吉克语 */
    TAJIK("tajik", "tg"),
    /** 泰卢固语 */
    TELUGU("telugu", "te"),
    /** 泰米尔语 */
    TAMIL("tamil", "ta"),
    /** 泰语 */
    THAI("thai", "th"),
    /** 土耳其语 */
    TURKISH("turkish", "tr"),
    /** 威尔士语 */
    WELSH("welsh", "cy"),
    /** 乌尔都语 */
    URDU("urdu", "ur"),
    /** 乌克兰语 */
    UKRAINIAN("ukrainian", "uk"),
    /** 乌兹别克语 */
    UZBEK("uzbek", "uz"),
    /** 西班牙语 */
    SPANISH("spanish", "es"),
    /** 希伯来语 */
    HEBREW("hebrew", "iw"),
    /** 希腊语 */
    GREEK("greek", "el"),
    /** 夏威夷语 */
    HAWAIIAN("hawaiian", "haw"),
    /** 信德语 */
    SINDHI("sindhi", "sd"),
    /** 匈牙利语 */
    HUNGARIAN("hungarian", "hu"),
    /** 修纳语 */
    SHONA("shona", "sn"),
    /** 亚美尼亚语 */
    ARMENIAN("armenian", "hy"),
    /** 伊博语 */
    IGBO("igbo", "ig"),
    /** 意大利语 */
    ITALIAN("italian", "it"),
    /** 意第绪语 */
    YIDDISH("yiddish", "yi"),
    /** 印地语 */
    HINDI("hindi", "hi"),


k {
  position: relative;
}
.oxyy-login-register .nav.nav-separator .nav-item + .nav-item .nav-link:after {
  height: 14px;
  width: 1px;
  content: ' ';
  background-color: rgba(0, 0, 0, 0.2);
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  -webkit-transform: translateY(-7px);
  transform: translateY(-7px);
}
.oxyy-login-register .nav.nav-separator.nav-separator-light .nav-item + .nav-item .nav-link:after {
  background-color: rgba(250, 250, 250, 0.2);
}
.oxyy-login-register .nav.nav-sm .nav-item .nav-link {
  font-size: 14px;
}

/*=== 4.3 Tabs ===*/
.oxyy-login-register .nav-tabs {
  border-bottom: 1px solid #d7dee3;
}
.oxyy-login-register .nav-tabs .nav-item .nav-link {
  border: 0;
  background: transparent;
  position: relative;
  border-radius: 0;
  padding: 0.6rem 1rem;
  color: #7b8084;
  white-space: nowrap !important;
}
.oxyy-login-register .nav-tabs .nav-item .nav-link.active {
  color: #0c2f55;
}
.oxyy-login-register .nav-tabs .nav-item .nav-link.active:after {
  height: 2px;
  width: 100%;
  content: ' ';
  background-color: #007bff;
  display: block;
  position: absolute;
  bottom: -3px;
  left: 0;
  -webkit-transform: translateY(-3px);
  transform: translateY(-3px);
}
.oxyy-login-register .nav-tabs .nav-item .nav-link:not(.active):hover {
  color: #007bff;
}
.oxyy-login-register .nav-tabs.flex-column {
  border-right: 1px solid #d7dee3;
  border-bottom: 0px;
  padding: 1.5rem 0;
}
.oxyy-login-register .nav-tabs.flex-column .nav-item .nav-link {
  border: 1px solid #d7dee3;
  border-right: 0px;
  background-color: #f6f7f8;
  font-size: 14px;
  padding: 0.75rem 1rem;
  color: #535b61;
}
.oxyy-login-register .nav-tabs.flex-column .nav-item:first-of-type .nav-link {
  border-top-left-radius: 4px;
}
.oxyy-login-register .nav-tabs.flex-column .nav-item:last-of-type .nav-link {
  border-bottom-left-radius: 4px;
}
.oxyy-login-register .nav-tabs.flex-column .nav-item .nav-link.active {
  background-color: transparent;
  color: #007bff;
}
.oxyy-login-register .nav-tabs.flex-column .nav-item .nav-link.active:after {
  height: 100%;
  width: 2px;
  background: #fff;
  right: -1px;
  left: auto;
}
.oxyy-login-register .nav-tabs:not(.flex-column) {
  flex-wrap: nowrap;
  overflow: hidden;
  overflow-x: auto;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  -webkit-overflow-scrolling: touch;
}
.oxyy-login-register .nav-tabs:not(.flex-column) .nav-item {
  margin-bottom: 0px;
}
@media (max-width: 575.98px) {
  .oxyy-login-register .nav-tabs .nav-item .nav-link {
    padding-left: 0px;


mxms_posted = "Posted",
            mxms_black_seal = "Black Seal",
        },
        poker_hands = {
            ["mxms_6oak"] = "Six of a Kind",
            ["mxms_double_triple"] = "Double Triple",
            ["mxms_f_6oak"] = "Flush Six",
            ["mxms_f_double_triple"] = "Flush Double Triple",
            ["mxms_f_party"] = "Flush Party",
            ["mxms_f_three_pair"] = "Flush Three Pair",
            ["mxms_house_party"] = "House Party",
            ["mxms_s_flush"] = "Super Flush",
            ["mxms_s_straight_f"] = "Super Straight Flush",
            ["mxms_s_straight"] = "Super Straight",
            ["mxms_three_pair"] = "Three Pair",
            ["mxms_super_royal"] = 'Super Royal Flush'
        },
        poker_hand_descriptions = {
            ["mxms_6oak"] = {
                "6 cards with the same rank"
            },
            ["mxms_double_triple"] = {
                "Two 3 of a Kinds"
            },
            ["mxms_f_6oak"] = {
                "6 cards with the same rank with",
                "all cards sharing the same suit"
            },
            ["mxms_f_double_triple"] = {
                "Two 3 of a Kinds with",
                "all cards sharing the same suit"
            },
            ["mxms_f_party"] = {
                "A 4 of a kind and a Pair with",
                "all cards sharing the same suit"
            },
            ["mxms_f_three_pair"] = {
                "3 Pairs of cards with different ranks with",
                "all cards sharing the same suit"
            },
            ["mxms_house_party"] = {
                "A 4 of a kind and a Pair"
            },
            ["mxms_s_flush"] = {
                "6 cards that share the same suit"
            },
            ["mxms_s_straight_f"] = {
                "6 cards in a row (consecutive ranks) with",
                "all cards sharing the same suit"
            },
            ["mxms_s_straight"] = {
                "6 cards in a row (consecutive ranks)"
            },
            ["mxms_three_pair"] = {
                "3 Pairs of cards with different ranks"
            },
        },
        quips = {
            -- Loss Quips
            mxms_lq_4d = {
                "Maybe bring a",
                "watch next time..."
            },
            mxms_lq_bootleg = {
                "You're as much a",
                "fraud as me!"
            },
            mxms_lq_chef = {
                "That hand was raw!"
            },
            mxms_lq_cleaner = {
                "That run really",
                "burned to the ground..."
            },
            mxms_lq_clown_car = {
                "{E:1}*sad honk*"
            },
            mxms_lq_crowned = {
                "Pathetic."
            },
            mxms_lq_detective = {
                "How you lost is",
                "still a mystery to me..."
            },
            mxms_lq_employee = {
                "Get a real job!"
            },
            mxms_lq_first_aid_kit = {
                "We've gotta get",
                "you to the hospital!"
            },
            mxms_lq_fort


= self.Detection:GetDetectedItemByIndex( DetectedItemIndex )
    if DetectedItem then
      self:F( { Unlocked = DetectedItem } )
      self.Detection:UnlockDetectedItem( DetectedItem )
    end
  end

  --- Sets maximum zones to be engaged at one time by defenders.
  -- @param #AI_A2G_DISPATCHER self
  -- @param #number DefenseLimit The maximum amount of detected items to be engaged at the same time.
  function AI_A2G_DISPATCHER:SetDefenseLimit( DefenseLimit )
    self:F( { DefenseLimit = DefenseLimit } )

    self.DefenseLimit = DefenseLimit
  end

  --- Sets the method of the tactical approach of the defenses.
  -- @param #AI_A2G_DISPATCHER self
  -- @param #number DefenseApproach Use the structure AI_A2G_DISPATCHER.DefenseApproach to set the defense approach.
  -- The default defense approach is AI_A2G_DISPATCHER.DefenseApproach.Random.
  function AI_A2G_DISPATCHER:SetDefenseApproach( DefenseApproach )
    self:F( { DefenseApproach = DefenseApproach } )

    self._DefenseApproach = DefenseApproach
  end

  -- @param #AI_A2G_DISPATCHER self
  function AI_A2G_DISPATCHER:ResourcePark( DefenderSquadron )
    local TemplateID = math.random( 1, #DefenderSquadron.Spawn )
    local Spawn = DefenderSquadron.Spawn[ TemplateID ] -- Core.Spawn#SPAWN
    Spawn:InitGrouping( 1 )
    local SpawnGroup
    if self:IsSquadronVisible( DefenderSquadron.Name ) then
      SpawnGroup = Spawn:SpawnAtAirbase( DefenderSquadron.Airbase, SPAWN.Takeoff.Cold )
      local GroupName = SpawnGroup:GetName()
      DefenderSquadron.Resources = DefenderSquadron.Resources or {}
      DefenderSquadron.Resources[TemplateID] = DefenderSquadron.Resources[TemplateID] or {}
      DefenderSquadron.Resources[TemplateID][GroupName] = {}
      DefenderSquadron.Resources[TemplateID][GroupName] = SpawnGroup
    end
  end

  -- @param #AI_A2G_DISPATCHER self
  -- @param Core.Event#EVENTDATA EventData
  function AI_A2G_DISPATCHER:OnEventBaseCaptured( EventData )

    local AirbaseName = EventData.PlaceName -- The name of the airbase that was captured.

    self:T( "Captured " .. AirbaseName )

    -- Now search for all squadrons located at the airbase, and sanitize them.
    for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
      if Squadron.AirbaseName == AirbaseName then
        Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
        Squadron.Captured = true
        self:T( "Squadron " .. SquadronName .. " captured." )
      end
    end
  end

  -- @param #AI_A2G_DISPATCHER self
  -- @param Core.Event#EVENTDATA EventData
  function AI_A2G_DISPATCHER:OnEventCrashOrDead( EventData )
    self.Detection:ForgetDetectedUnit( EventData.IniUnitName )
  end

  -- @param #AI_A2G_DISPATCHER self
  -- @param Core.Event#EVENTDATA EventData
  function AI_A2G_DISPATCHER:OnEventLand( EventData )
    self:F( "Landed" )
    local DefenderUnit = EventData.IniUnit
    local Defender = EventData.IniGroup
    local Squadron = self:GetSquadronFromDefender( Defender )
    if Squadron then
      self:F( { SquadronName = Squadron.Name } )
      local LandingMethod = self:GetSquadronLanding( Squadron.Name )


(8)
        val TEMP = IntArray(8)

        // Let H = H0
        H0.copy(0,
            H, 0, H0.size)

        // Initialize all words
        val words = padMessage(message).toIntArray()

        // Enumerate all blocks (each containing 16 words)
        var i = 0
        val n = words.size / 16
        while (i < n) {

            // initialize W from the block's words
            words.copy(i * 16, W, 0, 16)
            for (t in 16 ..< W.size) {
                W[t] = (smallSig1(W[t - 2]) + W[t - 7] + smallSig0(
                    W[t - 15]
                ) + W[t - 16])
            }

            // Let TEMP = H
            H.copy(0,
                TEMP, 0, H.size)

            // Operate on TEMP
            for (t in W.indices) {
                val t1 = (TEMP[7] + bigSig1(TEMP[4]) + ch(
                    TEMP[4],
                    TEMP[5],
                    TEMP[6]
                ) + K[t] + W[t])
                val t2 = bigSig0(TEMP[0]) + maj(
                    TEMP[0],
                    TEMP[1],
                    TEMP[2]
                )
                TEMP.copy(0,
                    TEMP, 1, TEMP.size - 1)
                TEMP[4] += t1
                TEMP[0] = t1 + t2
            }

            // Add values in TEMP to values in H
            for (t in H.indices) {
                H[t] += TEMP[t]
            }

            ++i
        }

        return H.toByteArray()
    }

    /**
     * Internal method, no need to call. Pads the given message to have a length
     * that is a multiple of 512 bits (64 bytes), including the addition of a
     * 1-bit, k 0-bits, and the message length as a 64-bit integer.
     *
     * @param message The message to padMessage.
     * @return A new array with the padded message bytes.
     */
    internal fun padMessage(message: ByteArray): ByteArray {
        val blockBits = 512
        val blockBytes = blockBits / 8

        // new message length: original + 1-bit and padding + 8-byte length
        var newMessageLength = message.size + 1 + 8
        val padBytes = blockBytes - newMessageLength % blockBytes
        newMessageLength += padBytes

        // copy message to extended array
        val paddedMessage = ByteArray(newMessageLength)
        message.copy(0, paddedMessage, 0, message.size)

        // write 1-bit
        paddedMessage[message.size] = 128.toByte()

        // skip padBytes many bytes (they are already 0)

        // write 8-byte integer describing the original message length
        val lenPos = message.size + 1 + padBytes

        paddedMessage.putLong(lenPos, message.size * 8.toLong())

        return paddedMessage
    }

    private fun ch(x: Int, y: Int, z: Int): Int {
        return x and y or (x.inv() and z)
    }

    private fun maj(x: Int, y: Int, z: Int): Int {


ests_run if not NULL, set to whether tests were run
static inline void __attribute__((constructor(102))) run_tests(void) {
	bool should_run = false;
#ifdef USE_SYSCTL_FOR_ARGS
	int mib[] = {
		CTL_KERN,
#if defined(__NetBSD__) || defined(__OpenBSD__)
		KERN_PROC_ARGS,
		getpid(),
		KERN_PROC_ARGV,
#else
		KERN_PROC,
		KERN_PROC_ARGS,
		getpid(),
#endif
	};
	char *arg = NULL;
	size_t arglen;
	sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &arglen, NULL, 0);
	arg = malloc(arglen);
	sysctl(mib, sizeof(mib) / sizeof(mib[0]), arg, &arglen, NULL, 0);
#else
	FILE *cmdlinef = fopen("/proc/self/cmdline", "r");
	char *arg = NULL;
	int arglen;
	fscanf(cmdlinef, "%ms%n", &arg, &arglen);
	fclose(cmdlinef);
#endif
	for (char *pos = arg; pos < arg + arglen; pos += strlen(pos) + 1) {
		if (strcmp(pos, "--unittest") == 0) {
			should_run = true;
			break;
		}
	}
	free(arg);

	if (!should_run) {
		return;
	}

	if (&test_h_unittest_setup) {
		test_h_unittest_setup();
	}

	struct test_file_metadata *i = test_file_head;
	int failed = 0, success = 0;
	while (i) {
		fprintf(stderr, "Running tests from %s:\n", i->name);
		struct test_case_metadata *j = i->tests;
		while (j) {
			fprintf(stderr, "\t%s ... ", j->name);
			j->failure.present = false;
			j->fn(j, i);
			if (j->failure.present) {
				fprintf(stderr, "failed (%s at %s:%d)\n", j->failure.message,
				        j->failure.file, j->failure.line);
				failed++;
			} else {
				fprintf(stderr, "passed\n");
				success++;
			}
			j = j->next;
		}
		fprintf(stderr, "\n");
		i = i->next;
	}
	int total = failed + success;
	fprintf(stderr, "Test results: passed %d/%d, failed %d/%d\n", success, total,
	        failed, total);
	exit(failed == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

#else

#include <stdbool.h>

#define TEST_CASE(name) static void __attribute__((unused)) __test_h_##name(void)

#define TEST_EQUAL(a, b)                                                                 \
	(void)(a);                                                                       \
	(void)(b)
#define TEST_TRUE(a) (void)(a)
#define TEST_STREQUAL(a, b)                                                              \
	(void)(a);                                                                       \
	(void)(b)

#endif


ford]]\n** ''Litchfield County Times'' {{WS|countytimes.com}} of [[Litchfield, Connecticut|Litchfield]]\n\n* Minuteman Publications\n** ''[[Fairfield Minuteman]]'' {{WS|fairfieldminuteman.com}}of [[Fairfield, Connecticut|Fairfield]]\n** ''The Westport Minuteman'' {{WS|westportminuteman.com}} of [[Westport, Connecticut|Westport]]\n\n* Shoreline Newspapers \n** ''The Dolphin'' {{WS|dolphin-news.com}} of [[Naval Submarine Base New London]] in [[New London, Connecticut|New London]]\n** ''Shoreline Times'' {{WS|shorelinetimes.com}} of [[Guilford, Connecticut|Guilford]]\n\n* Foothills Media Group {{WS|foothillsmediagroup.com}}\n** ''Thomaston Express'' {{WS|thomastonexpress.com}} of [[Thomaston, Connecticut|Thomaston]]\n** ''Good News About Torrington'' {{WS|goodnewsabouttorrington.com}} of [[Torrington, Connecticut|Torrington]]\n** ''Granby News'' {{WS|foothillsmediagroup.com/granby}} of [[Granby, Connecticut|Granby]]\n** ''Canton News'' {{WS|foothillsmediagroup.com/canton}} of [[Canton, Connecticut|Canton]]\n** ''Avon News'' {{WS|foothillsmediagroup.com/avon}} of [[Avon, Connecticut|Avon]]\n** ''Simsbury News'' {{WS|foothillsmediagroup.com/simsbury}} of [[Simsbury, Connecticut|Simsbury]]\n** ''Litchfield News'' {{WS|foothillsmediagroup.com/litchfield}} of [[Litchfield, Connecticut|Litchfield]]\n** ''Foothills Trader'' {{WS|foothillstrader.com}} of Torrington, Bristol, Canton\n\n* Other weeklies\n** ''The Milford-Orange Bulletin'' {{WS|ctbulletin.com}} of [[Orange, Connecticut|Orange]]\n** ''The Post-Chronicle'' {{WS|ctpostchronicle.com}} of [[North Haven, Connecticut|North Haven]]\n** ''West Hartford News'' {{WS|westhartfordnews.com}} of [[West Hartford, Connecticut|West Hartford]]\n\n* Magazines\n** ''The Connecticut Bride'' {{WS|connecticutmag.com}}\n** ''Connecticut Magazine'' {{WS|theconnecticutbride.com}}\n** ''Passport Magazine'' {{WS|passport-mag.com}}\n\n== Michigan ==\nFour dailies, associated weeklies and [[pennysaver]]s in the state of [[Michigan]]; also [http://www.micentralhomes.com MIcentralhomes.com] and [http://www.micentralautos.com MIcentralautos.com]\n* ''[[Oakland Press]]'' {{WS|theoaklandpress.com}} of [[Oakland, Michigan|Oakland]]\n* ''Daily Tribune'' {{WS|dailytribune.com}} of [[Royal Oak, Michigan|Royal Oak]]\n* ''Macomb Daily'' {{WS|macombdaily.com}} of [[Mt. Clemens, Michigan|Mt. Clemens]]\n* ''[[Morning Sun]]'' {{WS|themorningsun.com}} of  [[Mount Pleasant, Michigan|Mount Pleasant]]\n\n* Heritage Newspapers {{WS|heritage.com}}\n** ''Belleville View'' {{WS|bellevilleview.com}}\n** ''Ile Camera'' {{WS|thenewsherald.com/ile_camera}}\n** ''Monroe Guardian''  {{WS|monreguardian.com}}\n** ''Ypsilanti Courier'' {{WS|ypsilanticourier.com}}\n** ''News-Herald'' {{WS|thenewsherald.com}}\n** ''Press & Guide'' {{WS|pressandguide.com}}\n** ''Chelsea Standard & Dexter Leader'' {{WS|chelseastandard.com}}\n** ''Manchester Enterprise'' {{WS|mancheste


>
<arc-tab label=arc>

arc

```arc
# this is going to be great!

@app
hello

@static
fingerprint true

@ws
action
connect
default
disconnect

@http
get /
get /likes
post /likes

@events
hit-counter

@scheduled
daily-affirmation rate(1 day)

@tables
likes
  likeID *String

@tables-streams
likes

@tables-indexes
likes
  date *String
```

</arc-tab>

<arc-tab label=json>

json

```json
{
  "app": "hello",
  "static": {
    "fingerprint": true
  },
  "ws": ["action", "connect", "default", "disconnect"],
  "http": [
    ["get", "/"],
    ["get", "/likes"],
    ["post", "/likes"]
  ],
  "events": ["hit-counter"],
  "scheduled": {
    "daily-affirmation": {
      "rate": [1, "day"]
    }
  },
  "tables": {
    "likes": {
      "likeID": "*String"
    }
  },
  "tables-streams": ["likes"],
  "tables-indexes": {
    "likes": {
      "date": "*String"
    }
  }
}
```

</arc-tab>

<arc-tab label=yaml>

yaml

```yaml
---
app: "hello"
static:
  fingerprint: true
ws:
  - action
  - connect
  - default
  - disconnect
http:
  - get: "/"
  - get: "/likes"
  - post: "/likes"
events:
  - hit-counter
scheduled:
  - daily-affirmation: "rate(1 day)"
tables:
  - likes: { likeID: "*String" }
tables-streams:
  - likes
tables-indexes:
  - likes: { date: "*String" }
```

</arc-tab>

</arc-viewer>

Running `arc init` in the same directory as the file above generates the following Lambda function code:

```bash
.
├── src
│   ├── events
│   │   └── hit-counter/index.js
│   │
│   ├── http
│   │   ├── get-index/index.js
│   │   ├── get-likes/index.js
│   │   └── post-likes/index.js
│   │
│   ├── scheduled
│   │   └── daily-affirmation/index.js
│   │
│   ├── tables-streams
│   │   └── likes/index.js
│   │
│   └── ws
│       ├── action/index.js
│       ├── connect/index.js
│       ├── default/index.js
│       └── disconnect/index.js
│
└── app.arc
```

The `app.arc` format is terse, easy to read, and quickly learnable to author. The expressions in an `app.arc` file unlock the formerly complex tasks of cloud infrastructure provisioning, deployment, and orchestration.
---
title: '@macros'
category: app.arc
description: Customize Architect-generated CloudFormation
---

> Notice: `@macros` is no longer the preferred way to extend CloudFormation in Architect, and have been superseded by [`@plugins` `deploy.start`](/docs/en/guides/plugins/deploy#deploy.start). Existing `@macros` extensions will continue to be supported, but are no longer actively improved.

Extend the functionality of your Architect app with standard CloudFormation. The `@macro` primitive allows developers to add any resources or modify existing ones extending Architect into the entire AWS ecosystem supported by CloudFormation. Macros also allow you to look for custom directives and add pre-deploy steps. You can find some examples in our [GitHub]


ователь |он )?выбирает (одинарным кликом|двойным кликом) в таблице \"([^\"]*)\" строку со значениями$")
    public void selectRow(ClickVariation clickVariation, String tableName, DataTable data) {
        List<String> row = data.asList(String.class);
        tableSteps.selectRow(clickVariation, tableName, row);
    }

    @Когда("^(?:пользователь |он )?выбирает (одинарным кликом|двойным кликом) в таблице \"([^\"]*)\" в группе \"([^\"]*)\" строку со значениями$")
    public void selectRow(ClickVariation clickVariation, String tableName, String groupName, DataTable data) {
        List<String> row = data.asList(String.class);
        tableSteps.selectRow(clickVariation, tableName, groupName, row);
    }

    @Когда("^(?:пользователь |он )?проверяет, что в таблице \"([^\"]*)\" в любой строке столбца \"([^\"]*)\" содержится текст \"([^\"]*)\"$")
    public void containsText(String tableName, String columnName, String cellText) {
        tableSteps.containsText(tableName, columnName, cellText);
    }

    @Когда("^(?:пользователь |он )?проверяет, что в таблице \"([^\"]*)\" в группе \"([^\"]*)\" в любой строке столбца \"([^\"]*)\" содержится текст \"([^\"]*)\"$")
    public void containsTextInGroup(String tableName, String groupName, String columnName, String cellText) {
        tableSteps.containsTextInGroup(tableName, groupName, columnName, cellText);
    }

    @Когда("^(?:пользователь |он )?проверяет, что в таблице \"([^\"]*)\" в любой строке столбца \"([^\"]*)\" есть текст строго равный \"([^\"]*)\"$")
    public void hasText(String tableName, String columnName, String cellText) {
        tableSteps.hasText(tableName, columnName, cellText);
    }

    @Когда("^(?:пользователь |он )?проверяет, что в таблице \"([^\"]*)\" в группе \"([^\"]*)\" в любой строке столбца \"([^\"]*)\" есть текст строго равный \"([^\"]*)\"$")
    public void hasTextInGroup(String tableName, String groupName, String columnName, String cellText) {
        tableSteps.hasTextInGroup(tableName, groupName, columnName, cellText);
    }

    @Когда("^(?:пользователь |он )?проверяет, что в таблице \"([^\"]*)\" в любой ячейке содержится текст \"([^\"]*)\"$")
    public void containsText(String tableName, String cellText) {
        tableSteps.containsText(tableName, cellText);
    }

    @Когда("^(?:пользователь |он )?проверяет, что в таблице \"([^\"]*)\" в группе \"([^\"]*)\" в любой ячейке содержится текст \"([^\"]*)\"$")
    public void containsTextInGroup(String tableName, String groupName, String cellText) {
        tableSteps.containsTextInGroup(tableName, groupName, cellText);
    }

    @Когда("^(?:пользователь |он )?проверяет, что


om_amap_api_maps_AMap()..refId = __result__;
      return __return__;
    }
  }

  Future<void> onCreate(android_os_Bundle var1, {bool viewChannel = true}) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.TextureMapView@$refId::onCreate([])');
    }

    // invoke native method
    final __result__ = await MethodChannel(viewChannel ? 'me.yohom/amap_map_fluttify/com_amap_api_maps_TextureMapView' : 'me.yohom/amap_map_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_map_fluttify'))).invokeMethod('com.amap.api.maps.TextureMapView::onCreate', {"var1": var1, "__this__": this});

    // handle native call

    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }

  Future<void> onResume({bool viewChannel = true}) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.TextureMapView@$refId::onResume([])');
    }

    // invoke native method
    final __result__ = await MethodChannel(viewChannel ? 'me.yohom/amap_map_fluttify/com_amap_api_maps_TextureMapView' : 'me.yohom/amap_map_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_map_fluttify'))).invokeMethod('com.amap.api.maps.TextureMapView::onResume', {"__this__": this});

    // handle native call

    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }

  Future<void> onPause({bool viewChannel = true}) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.TextureMapView@$refId::onPause([])');
    }

    // invoke native method
    final __result__ = await MethodChannel(viewChannel ? 'me.yohom/amap_map_fluttify/com_amap_api_maps_TextureMapView' : 'me.yohom/amap_map_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_map_fluttify'))).invokeMethod('com.amap.api.maps.TextureMapView::onPause', {"__this__": this});

    // handle native call

    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }

  Future<void> onDestroy({bool viewChannel = true}) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.TextureMapView@$refId::onDestroy([])');
    }

    // invoke native method
    final __result__ = await MethodChannel(viewChannel ? 'me.yohom/amap_map_fluttify/com_amap_api_maps_TextureMapView' : 'me.yohom/amap_map_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_map_fluttify'))).invokeMethod('com.amap.api.maps.TextureMapView::


// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

namespace System.Windows.Controls
{
    /// <summary>
    /// Numeric utility methods used by controls.  These methods are similar in
    /// scope to the WPF DoubleUtil class.
    /// </summary>
    internal static class NumericExtensions
    {
        /// <summary>
        /// NanUnion is a C++ style type union used for efficiently converting
        /// a double into an unsigned long, whose bits can be easily
        /// manipulated.
        /// </summary>
        [StructLayout(LayoutKind.Explicit)]
        private struct NanUnion
        {
            /// <summary>
            /// Floating point representation of the union.
            /// </summary>
            [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "It is accessed through the other member of the union")]
            [FieldOffset(0)]
            internal double FloatingValue;

            /// <summary>
            /// Integer representation of the union.
            /// </summary>
            [FieldOffset(0)]
            internal ulong IntegerValue;
        }

        /// <summary>
        /// Check if a number isn't really a number.
        /// </summary>
        /// <param name="value">The number to check.</param>
        /// <returns>
        /// True if the number is not a number, false if it is a number.
        /// </returns>
        public static bool IsNaN(this double value)
        {
            // Get the double as an unsigned l


st() -> pal: imPalette [in Lua 5] \endverbatim
 * \ingroup palette */
long* imPaletteHighContrast(void);

/** Creates a palette of an uniform range of colors from black to white.
 *  This is a 2^(2.6) bits per pixel palette.
 *
 * \verbatim im.PaletteUniform() -> pal: imPalette [in Lua 5] \endverbatim
 * \ingroup palette */
long* imPaletteUniform(void);

/** Returns the index of the correspondent RGB color of an uniform palette.
 *
 * \verbatim im.PaletteUniformIndex(color: lightuserdata) -> index: number [in Lua 5] \endverbatim
 * \ingroup palette */
int imPaletteUniformIndex(long color);

/** Returns the index of the correspondent RGB color of an uniform palette.
 * Uses an 8x8 ordered dither to lookup the index in a halftone matrix.
 * The spatial position used by the halftone method.
 *
 * \verbatim im.PaletteUniformIndexHalftoned(color: lightuserdata, x: number, y: number) -> index: number [in Lua 5] \endverbatim
 * \ingroup palette */
int imPaletteUniformIndexHalftoned(long color, int x, int y);

#if defined(__cplusplus)
}
#endif

#endif


:"id"`
	Timestamp         int64               `json:"timestamp"`
	Duration          int64               `json:"duration"`
	Debug             bool                `json:"debug,omitempty"`
	Annotations       []*annotation       `json:"annotations,omitempty"`
	BinaryAnnotations []*binaryAnnotation `json:"binaryAnnotations,omitempty"`
}

// endpoint structure used by jsonSpan.
type endpoint struct {
	ServiceName string `json:"serviceName"`
	IPv4        string `json:"ipv4"`
	IPv6        string `json:"ipv6"`
	Port        int32  `json:"port"`
}

// annotation struct used by jsonSpan.
type annotation struct {
	Timestamp int64     `json:"timestamp"`
	Value     string    `json:"value"`
	Endpoint  *endpoint `json:"endpoint"`
}

// binaryAnnotation used by jsonSpan.
type binaryAnnotation struct {
	Key      string    `json:"key"`
	Value    string    `json:"value"`
	Endpoint *endpoint `json:"endpoint"`
}

// jsonBatchToTraces converts a JSON blob with a list of Zipkin v1 spans to ptrace.Traces.
func jsonBatchToTraces(blob []byte, parseStringTags bool) (ptrace.Traces, error) {
	var zSpans []*jsonSpan
	if err := json.Unmarshal(blob, &zSpans); err != nil {
		return ptrace.Traces{}, fmt.Errorf("%s: %w", msgZipkinV1JSONUnmarshalError, err)
	}

	spanAndEndpoints := make([]spanAndEndpoint, 0, len(zSpans))
	for _, zSpan := range zSpans {
		sae, err := jsonToSpanAndEndpoint(zSpan, parseStringTags)
		if err != nil {
			// error from internal package function, it already wraps the error to give better context.
			return ptrace.Traces{}, err
		}
		spanAndEndpoints = append(spanAndEndpoints, sae)
	}

	return zipkinToTraces(spanAndEndpoints)
}

type spanAndEndpoint struct {
	span     ptrace.Span
	endpoint *endpoint
}

func zipkinToTraces(spanAndEndpoints []spanAndEndpoint) (ptrace.Traces, error) {
	td := ptrace.NewTraces()
	// Service to batch maps the service name to the trace request with the corresponding node.
	svcToTD := make(map[string]ptrace.SpanSlice)
	for _, curr := range spanAndEndpoints {
		ss := getOrCreateNodeRequest(svcToTD, td, curr.endpoint)
		curr.span.MoveTo(ss.AppendEmpty())
	}
	return td, nil
}

func jsonToSpanAndEndpoint(zSpan *jsonSpan, parseStringTags bool) (spanAndEndpoint, error) {
	traceID, err := hexToTraceID(zSpan.TraceID)
	if err != nil {
		return spanAndEndpoint{}, fmt.Errorf("%s: %w", msgZipkinV1TraceIDError, err)
	}
	spanID, err := hexToSpanID(zSpan.ID)
	if err != nil {
		return spanAndEndpoint{}, fmt.Errorf("%s: %w", msgZipkinV1SpanIDError, err)
	}
	var parentID [8]byte
	if zSpan.ParentID != "" {
		parentID, err = hexToSpanID(zSpan.ParentID)
		if err != nil {
			return spanAndEndpoint{}, fmt.Errorf("%s: %w", msgZipkinV1ParentIDError, err)
		}
	}

	span, edpt := jsonAnnotationsToSpanAndEndpoint(zSpan.Annotations)
	localComponent := jsonBinAnnotationsToSpanAttributes(span, zSpan.BinaryAnnotations, parseStringTags)
	if edpt.ServiceName == unknownServiceName && localComponent != "" {
		edpt.ServiceName = localComponent
	}
	if zSpan.Timestamp != 0 {
		span.SetStartTimestamp(epochMicrosecondsToTimestamp(zSpan.Timestamp))
		span.SetEndTimestamp(epochMicrosecondsToTimestamp(zSpan.Timestamp + zSpan.Duration))
	}

	span.SetName(zSpan.Name)
	span.SetTraceID(traceID)
	span.SetSpanID(spanID)
	span.SetParentSpanID(parentID)
	setTimestampsIfUnset(spa


/*
 * Translate HTML files.
 * */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using HtmlAgilityPack;

namespace TranslationAssistant.Business
{
    class HTMLTranslationManager
    {
        private static readonly int maxRequestSize = TranslationServices.Core.TranslationServiceFacade.Maxrequestsize;

        public static int DoTranslation(string htmlfilename, string fromlanguage, string tolanguage)
        {
            string htmldocument = File.ReadAllText(htmlfilename);
            string htmlout = string.Empty;

            HtmlDocument htmlDoc = new HtmlDocument();
            htmlDoc.LoadHtml(htmldocument);
            htmlDoc.DocumentNode.SetAttributeValue("lang", TranslationServices.Core.TranslationServiceFacade.LanguageNameToLanguageCode(tolanguage));
            var title = htmlDoc.DocumentNode.SelectSingleNode("//head//title");
            if (title != null) title.InnerHtml = TranslationServices.Core.TranslationServiceFacade.TranslateString(title.InnerHtml, fromlanguage, tolanguage, TranslationServices.Core.TranslationServiceFacade.ContentType.HTML);
            var body = htmlDoc.DocumentNode.SelectSingleNode("//body");
            if (body != null)
            {
                if (body.InnerHtml.Length < maxRequestSize)
                {
                    body.InnerHtml = TranslationServices.Core.TranslationServiceFacade.TranslateString(body.InnerHtml, fromlanguage, tolanguage, TranslationServices.Core.TranslationServiceFacade.ContentType.HTML);
                }
                else
                {
                    List<HtmlNode> nodes = new List<HtmlNode>();
                    AddNodes(body.FirstChild, ref nodes);


ode);
    }

    /**
     * 更新元信息
     *

     *     [异步更新]
     *
     *     将元信息更新到玩家所在的游戏对外服中
     *

     *
     * @param attachment 元信息
     */
    default void updateAttachmentAsync(UserAttachment attachment) {
        this.getVirtualExecutor().execute(() -> this.updateAttachment(attachment));
    }

    /**
     * 更新元信息
     *

     *     [同步更新]
     *
     *     将元信息更新到玩家所在的游戏对外服中
     *

     */
    default void updateAttachment() {
        UserAttachment attachment = this.getAttachment();
        this.updateAttachment(attachment);
    }

    /**
     * 更新元信息
     *

     *     [异步更新]
     *
     *     将元信息更新到玩家所在的游戏对外服中
     *

     */
    default void updateAttachmentAsync() {
        this.getVirtualExecutor().execute(this::updateAttachment);
    }

    /**
     * 得到元附加信息
     *

     *     一般是在游戏对外服中设置的一些附加信息
     *     这些信息会跟随请求来到游戏逻辑服中
     *

     *
     * @param clazz clazz
     * @param <T>   t
     * @return 元附加信息
     */
    default <T extends UserAttachment> T getAttachment(final Class<T> clazz) {
        HeadMetadata headMetadata = this.getHeadMetadata();
        byte[] attachmentData = headMetadata.getAttachmentData();
        return DataCodecKit.decode(attachmentData, clazz);
    }

    /**
     * 得到元附加信息
     *

     * example
     *
{@code
     *     // 自定义 FlowContext
     *     public class MyFlowContext extends FlowContext {
     *         MyAttachment attachment;
     *
     *         @Override
     *         @SuppressWarnings("unchecked")
     *         public MyAttachment getAttachment() {
     *
     *             if (Objects.isNull(attachment)) {
     *                 this.attachment = this.getAttachment(MyAttachment.class);
     *             }
     *
     *             return this.attachment;
     *         }
     *     }
     *
     *     // 自定义元信息类
     *     public class MyAttachment implements Attachment {
     *         @Getter
     *         long userId;
     *     }
     * }
     *

     *
     * @param <T> t
     * @return 元附加信息
     */
    default <T extends UserAttachment> T getAttachment() {
        throw new RuntimeException("需要子类实现");
    }
}

/**
 * 帮助 FlowContext 得到通信的能力
 *

 *     使用此接口通信的目的，更多的是为了得到 FlowContext 中 request HeadMetadata 对象，
 *     并复用 HeadMetadata 部分信息，从而减少一些冗余代码。
 *
 *     在与其他逻辑服通信时，些接口提供了同步、异步、异步回调风格的方法
 *
 *     方法命名规则
 *     同步: invoke_xxx；返回 ResponseMessage 对象
 *     异步: invoke_xxx_Future； 返回 CompletableFuture 对象
 *     异步回调： invoke_xxx_Async； 方法参数提供了回调方法
 *
 *

 *
 * @author 渔民小镇
 * @date 2023-12-21
 * @see FlowContext
 */


using System;
using System.Collections.Generic;
using CardanoSharp.Wallet.Enums;
using CardanoSharp.Wallet.Extensions;
using CardanoSharp.Wallet.Models;
using CardanoSharp.Wallet.Models.Transactions;
using CardanoSharp.Wallet.Models.Transactions.TransactionWitness.PlutusScripts;
using CardanoSharp.Wallet.TransactionBuilding;

namespace CardanoSharp.Wallet.TransactionBuilding
{
    public interface IRedeemerBuilder
    {
        IRedeemerBuilder SetTag(RedeemerTag redeemerTag);
        IRedeemerBuilder SetIndex(uint index);
        IRedeemerBuilder SetIndex(Transaction transaction, TransactionInput scriptTransactionInput);
        IRedeemerBuilder SetIndex(Transaction transaction, Utxo utxo);
        IRedeemerBuilder SetPlutusData(IPlutusData plutusData);
        IRedeemerBuilder SetExUnits(ExUnits exUnits);
    }

    public class RedeemerBuilder : ABuilder<Redeemer>, IRedeemerBuilder
    {
        private RedeemerBuilder()
        {
            _model = new Redeemer();
        }

        private RedeemerBuilder(Redeemer model)
        {
            _model = model;
        }

        public static RedeemerBuilder Create
        {
            get => new RedeemerBuilder();
        }

        public IRedeemerBuilder SetTag(RedeemerTag redeemerTag)
        {
            _model.Tag = redeemerTag;
            return this;
        }

        public IRedeemerBuilder SetIndex(uint index)
        {
            _model.Index = index;
            return this;
        }

        public IRedeemerBuilder SetIndex(Transaction transaction, TransactionInput scriptTransactionInput)
        {
            List<TransactionInput> transactionInputs = new List<TransactionInput>();
            transactionInputs.AddRange((List<TransactionInput>)transaction.TransactionBody.TransactionInputs);

            //https://github.c