arts> {
	/// id is a 5-character string of reasonable uniqueness.
	/// The combination of base ID and resource id should be unique across the entire RMRK
	/// ecosystem which
	pub id: BoundedResource,

	/// If resource is sent to non-rootowned NFT, pending will be false and need to be accepted
	pub pending: bool,

	/// If resource removal request is sent by non-rootowned NFT, pending will be true and need to be accepted
	pub pending_removal: bool,

	/// If a resource is composed, it will have an array of parts that compose it
	pub parts: Option<BoundedParts>,

	/// A Base is uniquely identified by the combination of the word `base`, its minting block
	/// number, and user provided symbol during Base creation, glued by dashes `-`, e.g.
	/// base-4477293-kanaria_superbird.
	pub base: Option<BaseId>,
	/// If the resource is Media, the base property is absent. Media src should be a URI like an
	/// IPFS hash.
	pub src: Option<BoundedString>,
	pub metadata: Option<BoundedString>,
	/// If the resource has the slot property, it was designed to fit into a specific Base's slot.
	/// The baseslot will be composed of two dot-delimited values, like so:
	/// "base-4477293-kanaria_superbird.machine_gun_scope". This means: "This resource is
	/// compatible with the machine_gun_scope slot of base base-4477293-kanaria_superbird
	pub slot: Option<SlotId>,
	/// The license field, if present, should contain a link to a license (IPFS or static HTTP
	/// url), or an identifier, like RMRK_nocopy or ipfs://ipfs/someHashOfLicense.
	pub license: Option<BoundedString>,
	/// If the resource has the thumb property, this will be a URI to a thumbnail of the given
	/// resource. For example, if we have a composable NFT like a Kanaria bird, the resource is
	/// complex and too detailed to show in a search-results page or a list. Also, if a bird owns
	/// another bird, showing the full render of one bird inside the other's inventory might be a
	/// bit of a strain on the browser. For this reason, the thumb value can contain a URI to an
	/// image that is lighter and faster to load but representative of this resource.
	pub thumb: Option<BoundedString>,
}

/// Abstraction over a Resource system.
pub trait Resource<BoundedString, AccountId, BoundedResource, BoundedPart> {
	fn resource_add(
		sender: AccountId,
		collection_id: CollectionId,
		nft_id: NftId,
		resource_id: BoundedResource,
		base: Option<BaseId>,
		src: Option<BoundedString>,
		metadata: Option<BoundedString>,
		slot: Option<SlotId>,
		license: Option<BoundedString>,
		thumb: Option<BoundedString>,
		parts: Option<BoundedPart>,
	) -> DispatchResult;
	fn accept(
		sender: AccountId,
		collection_id: CollectionId,
		nft_id: NftId,
		resource_id: BoundedResource,
	) -> DispatchResult;
	fn resource_remove(
		sender: AccountId,
		collection_id: CollectionId,
		nft_id: NftId,
		resource_id: BoundedResource,
	) -> DispatchResult;
	fn accept_removal(
		sender: AccountId,
		collection_id: CollectionId,
		nft_id: NftId,
		resource_id: BoundedResource,
	) -> DispatchResult;
}
<reponame>linfeng-crypto/chain<filename>client-rpc/src/rpc/sync_rpc.rs
use jsonrpc_core::Result;
use jsonrpc_derive::rpc;

use crate::server::{to_rpc_error, WalletRequest};
use client_common::tendermint::Client;
use client_common::Storage;
use client_core::synchronizer::PollingSynchronizer;
use client_core::wallet::syncer::{ObfuscationSyncerConfig, WalletSyn


t(__const struct argp_option* __opt) __THROW;
    extern int __option_is_short(__const struct argp_option* __opt) __THROW;

    /* Returns true if the option OPT is in fact the last (unused) entry in an
       options array.  */
    extern int _option_is_end(__const struct argp_option* __opt) __THROW;
    extern int __option_is_end(__const struct argp_option* __opt) __THROW;

    /* Return the input field for ARGP in the parser corresponding to STATE; used
       by the help routines.  */
    extern void* _argp_input(__const struct argp* __restrict __argp,
                             __const struct argp_state* __restrict __state) __THROW;
    extern void* __argp_input(__const struct argp* __restrict __argp,
                              __const struct argp_state* __restrict __state) __THROW;

    /* Used for extracting the program name from argv[0] */
    extern char* _argp_basename(char* name) __THROW;
    extern char* __argp_basename(char* name) __THROW;

    /* Getting the program name given an argp state */
    extern char* _argp_short_program_name(const struct argp_state* state) __THROW;
    extern char* __argp_short_program_name(const struct argp_state* state) __THROW;

    // #ifdef __USE_EXTERN_INLINES
    // #if 1
    // #define __argp_usage argp_usage
    // #define __argp_state_help argp_state_help
    // #define __option_is_short _option_is_short
    // #define __option_is_end _option_is_end
    // #endif

    // #ifndef ARGP_EI
    // #define ARGP_EI extern __inline
    // #endif

    //     ARGP_EI void __THROW __argp_usage(__const struct argp_state* __state)
    //     {
    //         __argp_state_help(__state, stderr, ARGP_HELP_STD_USAGE);
    //     }

    //     ARGP_EI int __THROW __option_is_short(__const struct argp_option* __opt)
    //     {
    //         if (__opt->flags & OPTION_DOC)
    //             return 0;
    //         else
    //         {
    //             int __key = __opt->key;
    //             return __key > 0 && isprint(__key);
    //         }
    //     }

    //     ARGP_EI int __THROW __option_is_end(__const struct argp_option* __opt)
    //     {
    //         return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
    //     }

    // #if 1
    // #undef __argp_usage
    // #undef __argp_state_help
    // #undef __option_is_short
    // #undef __option_is_end
    // #endif
    // #endif /* Use extern inlines.  */

#ifdef __cplusplus
}
#endif

#endif /* argp.h */


ReciprocalDisplacement.z);

            float4 nearX = math.min(nearXt, farXt);
            float4 farX = math.max(nearXt, farXt);

            float4 nearY = math.min(nearYt, farYt);
            float4 farY = math.max(nearYt, farYt);

            float4 nearZ = math.min(nearZt, farZt);
            float4 farZ = math.


owl-dots .owl-dot.active span,
.owl-carousel .owl-dots .owl-dot:hover span {
	background-color: #0074ad;
}

.owl-carousel.show-nav-title .owl-nav button[class*="owl-"],
.owl-carousel.show-nav-title .owl-nav button[class*="owl-"]:hover,
.owl-carousel.show-nav-title .owl-nav button[class*="owl-"].hover {
	color: #0088CC;
}

.owl-carousel .owl-nav button[class*="owl-"] {
	background-color: #0088CC;
	border-color: #0088CC #0088CC #006699;
	color: #FFF;
}

.owl-carousel .owl-nav button[class*="owl-"]:hover,
.owl-carousel .owl-nav button[class*="owl-"].hover {
	background-color: #00a1f2;
	border-color: #00aaff #00aaff #0088CC;
}

.owl-carousel .owl-nav button[class*="owl-"]:active,
.owl-carousel .owl-nav button[class*="owl-"].active {
	background-color: #006ea6;
	background-image: none;
	border-color: #006699 #006699 #004466;
}

.owl-carousel.nav-with-transparency:not(.nav-style-1):not(.show-nav-title) .owl-nav button[class*="owl-"] {
	background-color: rgba(0, 136, 204, 0.4);
}

.owl-carousel.nav-style-1 .owl-nav .owl-next,
.owl-carousel.nav-style-1 .owl-nav .owl-prev {
	color: #0088CC !important;
}

.owl-carousel.nav-style-2 .owl-nav .owl-next:before,
.owl-carousel.nav-style-2 .owl-nav .owl-prev:before,
.owl-carousel.nav-style-2 .owl-nav .owl-next:after,
.owl-carousel.nav-style-2 .owl-nav .owl-prev:after {
	border-color: #0088CC;
}

html body .tabs .nav-tabs .nav-link,
html.dark body .tabs .nav-tabs .nav-link,
html body .tabs .nav-tabs .nav-link:hover,
html.dark body .tabs .nav-tabs .nav-link:hover,
html body .tabs .nav-tabs li.active .nav-link,
html.dark body .tabs .nav-tabs li.active .nav-link {
	color: #0088CC;
}

html body .tabs .nav-tabs .nav-link:hover,
html.dark body .tabs .nav-tabs .nav-link:hover,
html body .tabs .nav-tabs .nav-link:focus,
html.dark body .tabs .nav-tabs .nav-link:focus,
html body .tabs .nav-tabs li.active .nav-link,
html.dark body .tabs .nav-tabs li.active .nav-link,
html body .tabs .nav-tabs.nav-justified .nav-link:hover,
html.dark body .tabs .nav-tabs.nav-justified .nav-link:hover,
html body .tabs .nav-tabs.nav-justified .nav-link:focus,
html.dark body .tabs .nav-tabs.nav-justified .nav-link:focus {
	border-top-color: #0088CC;
}

html body .tabs.tabs-bottom .nav-tabs li .nav-link:hover,
html.dark body .tabs.tabs-bottom .nav-tabs li .nav-link:hover,
html body .tabs.tabs-bottom .nav-tabs li.active .nav-link,
html.dark body .tabs.tabs-bottom .nav-tabs li.active .nav-link,
html body .tabs.tabs-bottom .nav-tabs li.active .nav-link:hover,
html.dark body .tabs.tabs-bottom .nav-tabs li.active .nav-link:hover,
html body .tabs.tabs-bottom .nav-tabs li.active .na


hannel != null && (channel !is TextChannel || channel.canTalk()) && (channel is TextChannel || channel is PrivateChannel)) {
        val lang = getLanguage(Container.instance.daoManager, author?.idLong ?: -1, guild?.idLong ?: -1)

        val permError = this is InsufficientPermissionException
        val msg = if (permError) {
            "${this.message}, caseId: $caseId (consider using `>support` to join our support server)"

        } else i18n.getTranslation(lang, "message.exception")
            .withVariable("caseId", caseId)

        if (channel is TextChannel)
            sendMsg(channel, msg)
        else if (channel is PrivateChannel)
            sendMsg(channel, msg)
    }
}

object Base58 {

    private val ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".toCharArray()
    private val ENCODED_ZERO = ALPHABET[0]
    private val INDEXES = IntArray(128)

    init {
        Arrays.fill(INDEXES, -1)
        for (i in ALPHABET.indices) {
            INDEXES[ALPHABET[i].code] = i
        }
    }

    /**
     * Encodes the given bytes as a base58 string (no checksum is appended).
     *
     * @param input the bytes to encode
     * @return the base58-encoded string
     */
    fun encode(input: ByteArray): String {
        var barr = input
        if (barr.isEmpty()) {
            return ""
        }
        // Count leading zeros.
        var zeros = 0
        while (zeros < barr.size && barr[zeros] == 0.toByte()) {
            ++zeros
        }
        // Convert base-256 digits to base-58 digits (plus conversion to ASCII characters)
        barr = barr.copyOf(barr.size) // since we modify it in-place
        val encoded = CharArray(barr.size * 2) // upper bound
        var outputStart = encoded.size
        var inputStart = zeros
        while (inputStart < barr.size) {
            encoded[--outputStart] = ALPHABET[divmod(barr, inputStart, 256, 58).toInt()]
            if (barr[inputStart] == 0.toByte()) {
                ++inputStart // optimization - skip leading zeros
            }
        }
        // Preserve exactly as many leading encoded zeros in output as there were leading zeros in input.
        while (outputStart < encoded.size && encoded[outputStart] == ENCODED_ZERO) {
            ++outputStart
        }
        while (--zeros >= 0) {
            encoded[--outputStart] = ENCODED_ZERO
        }
        // Return encoded string (including encoded leading zeros).
        return String(encoded, outputStart, encoded.size - outputStart)
    }

    fun decode(input: String): ByteArray? {
        if (input.isEmpty()) {
            return ByteArray(0)
        }
        // Convert the base58-encoded ASCII chars to a base58 byte sequence (base58 digits).
        val input58 = ByteArray(input.length)
        for (i in input.indices) {
            val c = input[i]
            val digit = if (c.code < 128) INDEXES[c.code] else -1
            if (digit < 0) {
                return null
            }
            input58[i] = digit.toByte()
        }
        // Count leading zeros.
        var zeros = 0
        while (zeros < input58.size && input58[zeros] == 0.toByte()) {
            ++zeros
        }
        // Convert base-58 digits to base-256 digits.
        val decoded = ByteArray(input.length)
        var outputStart = decoded.size
        var inputStart = zeros
        while (inputStart < input58.


colspan=2 align=center>ASCII

HTML
HTML

Dec
Hex
Symbol
Number
Name
Description

144
145
146
147
148
149
150
151

152
153
154
155
156
157
158
159

90
91
92
93
94
95
96
97

98
99
9A
9B
9C
9D
9E
9F

(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)

(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)

(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)

(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)
(not defined in HTML 4 standard)

ASCII

HTML
HTML

Dec
Hex
Symbol
Number
Name
<b


'),
    HOT_TUB('\uf593'), HOTDOG('\uf80f'), HOTEL('\uf594'), HOURGLASS('\uf254'),
    HOURGLASS_END('\uf253'), HOURGLASS_HALF('\uf252'), HOURGLASS_START('\uf251'),
    HOUSE_DAMAGE('\uf6f1'), HRYVNIA('\uf6f2'), I_CURSOR('\uf246'), ICE_CREAM('\uf810'),
    ICICLES('\uf7ad'), ICONS('\uf86d'), ID_BADGE('\uf2c1'), ID_CARD('\uf2c2'),
    ID_CARD_ALT('\uf47f'), IGLOO('\uf7ae'), IMAGE('\uf03e'), IMAGES('\uf302'), INBOX('\uf01c'),
    INDENT('\uf03c'), INDUSTRY('\uf275'), INFINITY('\uf534'), INFO('\uf129'), INFO_CIRCLE('\uf05a'),
    ITALIC('\uf033'), JEDI('\uf669'), JOINT('\uf595'), JOURNAL_WHILLS('\uf66a'), KAABA('\uf66b'),
    KEY('\uf084'), KEYBOARD('\uf11c'), KHANDA('\uf66d'), KISS('\uf596'), KISS_BEAM('\uf597'),
    KISS_WINK_HEART('\uf598'), KIWI_BIRD('\uf535'), LANDMARK('\uf66f'), LANGUAGE('\uf1ab'),
    LAPTOP('\uf109'), LAPTOP_CODE('\uf5fc'), LAPTOP_MEDICAL('\uf812'), LAUGH('\uf599'),
    LAUGH_BEAM('\uf59a'), LAUGH_SQUINT('\uf59b'), LAUGH_WINK('\uf59c'), LAYER_GROUP('\uf5fd'),
    LEAF('\uf06c'), LEMON('\uf094'), LESS_THAN('\uf536'), LESS_THAN_EQUAL('\uf537'),
    LEVEL_DOWN_ALT('\uf3be'), LEVEL_UP_ALT('\uf3bf'), LIFE_RING('\uf1cd'), LIGHTBULB('\uf0eb'),
    LINK('\uf0c1'), LIRA_SIGN('\uf195'), LIST('\uf03a'), LIST_ALT('\uf022'), LIST_OL('\uf0cb'),
    LIST_UL('\uf0ca'), LOCATION_ARROW('\uf124'), LOCK('\uf023'), LOCK_OPEN('\uf3c1'),
    LONG_ARROW_ALT_DOWN('\uf309'), LONG_ARROW_ALT_LEFT('\uf30a'), LONG_ARROW_ALT_RIGHT('\uf30b'),
    LONG_ARROW_ALT_UP('\uf30c'), LOW_VISION('\uf2a8'), LUGGAGE_CART('\uf59d'), MAGIC('\uf0d0'),
    MAGNET('\uf076'), MAIL_BULK('\uf674'), MALE('\uf183'), MAP('\uf279'), MAP_MARKED('\uf59f'),
    MAP_MARKED_ALT('\uf5a0'), MAP_MARKER('\uf041'), MAP_MARKER_ALT('\uf3c5'), MAP_PIN('\uf276'),
    MAP_SIGNS('\uf277'), MARKER('\uf5a1'), MARS('\uf222'), MARS_DOUBLE('\uf227'),
    MARS_STROKE('\uf229'), MARS_STROKE_H('\uf22b'), MARS_STROKE_V('\uf22a'), MASK('\uf6fa'),
    MEDAL('\uf5a2'), MEDKIT('\uf0fa'), MEH('\uf11a'), MEH_BLANK('\uf5a4'),
    MEH_ROLLING_EYES('\uf5a5'), MEMORY('\uf538'), MENORAH('\uf676'), MERCURY('\uf22


="60%" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>'));content:light-dark(url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" opacity="60%" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>'),url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" opacity="60%" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>'))}.markdown table,table.dataframe{display:block;max-width:100%;overflow:auto}.markdown table thead,table.dataframe thead{vertical-align:bottom;--tw-border-opacity:1;border-color:color-mix(in srgb,var(--input),transparent calc((1 - var(--tw-border-opacity))*100%))}.markdown table tbody tr:nth-child(odd),table.dataframe tbody tr:nth-child(odd){background:var(--lime-2)}.markdown table tbody tr:nth-child(2n),table.dataframe tbody tr:nth-child(2n){--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--card),transparent calc((1 - var(--tw-bg-opacity))*100%))}.markdown table tbody tr:hover,table.dataframe tbody tr:hover{background:var(--yellow-4)}.markdown table td,.markdown table th,.markdown table tr,table.dataframe td,table.dataframe th,table.dataframe tr{border:none;line-height:normal;padding-left:.5rem;padding-right:.5rem;text-align:right;vertical-align:middle}.dark\:prose-invert:is(.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--


.getArgument<String>("itemId")!!
                        val amount = context.getArgument<Int?>("amount")!!
                        Bukkit.getOnlinePlayers().forEach { player ->
                            giveCommand(
                                sender, player, itemId, amount, tip
                            )
                        }
                    }
                }
            }
        }
    }

    private fun giveCommand(
        sender: CommandSender,
        player: Player,
        itemId: String,
        amount: Int,
        tip: Boolean
    ) {
        val itemStack = mythicMobsHooker!!.getItemStack(itemId) ?: let {
            sender.sendLang("Messages.unknownItem", mapOf(Pair("{itemID}", itemId)))
            return
        }
        sync {
            player.giveItems(itemStack, amount.coerceAtLeast(1))
        }
        if (tip) {
            val name = itemStack.getParsedName()
            sender.sendLang(
                "Messages.successInfo", mapOf(
                    Pair("{player}", player.name),
                    Pair("{amount}", amount.toString()),
                    Pair("{name}", name)
                )
            )
            player.sendLang(
                "Messages.givenInfo", mapOf(
                    Pair("{amount}", amount.toString()),
                    Pair("{name}", name)
                )
            )
        }
    }
}package pers.neige.neigeitems.item.action

import org.bukkit.configuration.ConfigurationSection
import pers.neige.neigeitems.action.ActionContext
import java.util.*

/**
 * 物品动作信息
 *
 * @property id 物品ID
 * @property config 物品动作配置
 * @constructor 根据ID及配置加载对应物品的物品动作信息
 */
class ItemAction(val id: String, val config: ConfigurationSection) {
    /**
     * 获取所有动作触发器
     */
    val triggers = HashMap<String, ActionTrigger?>()

    /**
     * 该物品是否有左键触发的物品动作
     */
    var hasLeftAction = false

    /**
     * 该物品是否有右键触发的物品动作
     */
    var hasRightAction = false

    /**
     * 该物品是否有左键触发的物品动作
     */
    var hasShiftLeftAction = false

    /**
     * 该物品是否有右键触发的物品动作
     */
    var hasShiftRightAction = false

    init {
        // 加载动作触发器
        config.getKeys(false).forEach { trigger ->
            config.getConfigurationSection(trigger)?.let {
                triggers[trigger.lowercase(Locale.getDefault())] = ActionTrigger(id, trigger, it)
            }
        }
        if (triggers.contains("left") || triggers.contains("all")) {
            hasLeftAction = true
        }
        if (triggers.contains("right") || triggers.contains("all")) {
            hasRightAction = true
        }
        if (triggers.contains("shift_left") || triggers.contains("shift_all")) {
            hasShiftLeftAction = true
        }
        if (triggers.contains("shift_right") || triggers.contains("shift_all")) {
            hasShiftRightAction = true
        }
    }

    /**
     * 运行某个动作
     *
     * @param trigger 触发器
     * @param context 动作上下文
     */
    fun run(
        trigger: ActionTrigger?,
        context: ActionContext
    ) {
        trigger?.run(context)
    }

    /**
     * 运行某个动作
     *
     * @param trigger 触发器
     * @param context 动作上下文
     */
    fun run(
        trigger: String?,
        context: ActionContext
    ) {
        triggers[trigger?.lowercase()]?.run(context)
    }
}package pers.neige.


g_pc_d(0,expr(@VA(.MAIN.T0_hwint_237), 16, 16)) -> intp(0, 0, 18)
	.word 0xb044c000  ! 1780: ADDC_R	addc 	%r19, %r0, %r24
T0_hwint_238:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_238), 16, 16)) -> intp(0, 0, 28)
T0_hwint_239:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_239), 16, 16)) -> intp(0, 0, 32)
T0_hwint_240:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_240), 16, 16)) -> intp(0, 0, 31)
	.word 0xb6a520b9  ! 1786: SUBcc_I	subcc 	%r20, 0x00b9, %r27
	.word 0xf82c4000  ! 1788: STB_R	stb	%r28, [%r17 + %r0]
	.word 0xb33dd000  ! 1789: SRAX_R	srax	%r23, %r0, %r25
	.word 0xfbb560ca  ! 1790: STQFA_I	-	%f29, [0x00ca, %r21]
	.word 0xff158000  ! 1791: LDQF_R	-	[%r22, %r0], %f31
	.word 0xfbbde006  ! 1793: STDFA_I	stda	%f29, [0x0006, %r23]
T0_hwint_241:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_241), 16, 16)) -> intp(0, 0, 37)
	.word 0xfeb4d940  ! 1795: STHA_R	stha	%r31, [%r19 + %r0] 0xca
T0_hwint_242:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_242), 16, 16)) -> intp(0, 0, 24)
	sta	%f2, [%r22 + %g0] 0xf0
T0_hwint_243:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_243), 16, 16)) -> intp(0, 0, c)
	.word 0xf51560ad  ! 1799: LDQF_I	-	[%r21, 0x00ad], %f26
T0_hwint_244:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_244), 16, 16)) -> intp(0, 0, 2d)
T0_dtlb_err_83:
!$EV error (0,expr(@VA(.MAIN.T0_dtlb_err_83),16,16),1,DTLB_DATA,19)
	.word 0xfced9040  ! 1807: LDSTUBA_R	ldstuba	%r30, [%r22 + %r0] 0x82
T0_itlb_err_7:
!$EV error (0,expr(@VA(.MAIN.T0_itlb_err_7),16,16),1,ITLB_DATA,31)
	.word 0xfa25c000  ! 1808: STW_R	stw	%r29, [%r23 + %r0]
	.word 0xf45d219c  ! 1810: LDX_I	ldx	[%r20 + 0x019c], %r26
	.word 0xbe854000  ! 1813: ADDcc_R	addcc 	%r21, %r0, %r31
	.word 0xb4848000  ! 1815: ADDcc_R	addcc


  }
}

class NeoGeoLogoPainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    DimensionConvert dim = DimensionConvert(size: size);

    Color yellow = const Color(0xffFFC011);
    final yellowPaint = Paint()..color = yellow;

    Color blue = const Color(0xff00A2E7);
    final bluePaint = Paint()..color = blue;

    _drawN(canvas, dim, yellowPaint);
    _drawYE(canvas, dim, yellowPaint);
    _drawYO(canvas, dim, yellowPaint);
    _drawG(canvas, dim, bluePaint);
    _drawBE(canvas, dim, bluePaint);
    _drawBO(canvas, dim, bluePaint);
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) => false;
}

void _drawN(Canvas canvas, DimensionConvert dim, Paint yellowPaint) {
  final List<List<double>> nPoints = [
    [09.01, 53.78], [09.73, 25.38], [13.04, 22.26], [26.13, 31.97], //
    [28.62, 11.88], [29.50, 17.32], [31.15, 14.89], [31.62, 17.29],
    [33.42, 14.42], [34.42, 49.17], [16.08, 35.07], [09.01, 53.78],
  ];

  final n = Path()..addPolygon(genOffsetList(nPoints, dim), true);
  canvas.drawPath(n, yellowPaint);
}

void _drawYE(Canvas canvas, DimensionConvert dim, Paint yellowPaint) {
  final List<List<double>> eYellowPoints = [
    [38.21, 52.71], [36.87, 12.37], [59.76, 05.38], [55.17, 08.31], //
    [58.19, 08.37], [53.55, 11.73], [58.73, 11.55], [43.20, 21.66],
    [60.38, 20.68], [43.28, 33.38], [43.71, 37.49], [56.42, 35.08],
    [52.40, 37.79], [55.94, 37.21], [53.47, 38.86], [56.92, 38.53],
    [38.21, 52.71],
  ];
  final eY = Path()..addPolygon(genOffsetList(eYellowPoints, dim), true);
  canvas.drawPath(eY, yellowPaint);
}

void _drawYO(Canvas canvas, DimensionConvert dim, Paint yellowPaint) {
  final List<List<double>> oYellowPoints = [
    [81.49, 55.26], [73.23, 52.32], [63.31, 39.24], [58.10, 27.33], //
    [65.57, 15.63], [79.05, 19.00], [88.88, 32.36], [90.99, 42.96],
    [81.49, 55.26],
  ];

  final eLOYellowPoints = [
    [67.61, 33.46], [66.20, 32.75], [66.28, 31.43], [67.14, 30.73], //
    [68.78, 31.11], [69.09, 32.27], [67.61, 33.46],
  ];

  final eROYellowPoints = [
    [76.29, 29.86], [74.18, 29.82], [73.01, 27.64], [74.29, 25.64], //
    [75.84, 25.64], [77.37, 27.75], [76.29, 29.86],
  ];

  final mOYellowPoints = [
    [72.81, 44.36], [75.01, 45.01], [79.06, 44.93], [80.79, 43.74], //
    [82.57, 41.46], [84.17, 36.34], [84.68, 40.10], [84.18, 43.13],
    [82.17, 45.38], [79.88, 46.83], [75.84, 46.66], [72.81, 44.36


copyWith(color: Colors.black45),
              style: Theme.of(context).textTheme.bodyText1.copyWith(color: Colors.black87),
              decoration: BoxDecoration(),
            ),
          ),
        ],
      ),
    );
  }
}
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';

class PolygonPathDrawer {
  final Path path;
  final Size size;
  final PolygonPathSpecs specs;

  PolygonPathDrawer({
    @required this.size,
    @required this.specs,
  }) : path = Path();

  Path draw() {
    final anglePerSide = 360 / specs.sides;
    final radius = (size.width - specs.borderRadiusAngle) / 2;
    final arcLength = (radius * _angleToRadian(specs.borderRadiusAngle)) + (specs.sides * 2);

    Path path = Path();
    for (var i = 0; i <= specs.sides; i++) {
      double currentAngle = anglePerSide * i;
      bool isFirst = i == 0;
      _drawLineAndArc(path, currentAngle, radius, arcLength, isFirst);
    }
    return path;
  }

  _drawLineAndArc(Path path, double currentAngle, double radius, double arcLength, bool isFirst) {
    double prevAngle = currentAngle - specs.halfBorderRadiusAngle;
    double nextAngle = currentAngle + specs.halfBorderRadiusAngle;

    Offset previous = _getOffset(prevAngle, radius);
    Offset next = _getOffset(nextAngle, radius);

    if (isFirst) {
      path.moveTo(next.dx, next.dy);
    } else {
      path.lineTo(previous.dx, previous.dy);
      path.arcToPoint(next, radius: Radius.circular(arcLength));
    }
  }

  double _angleToRadian(double angle) {
    return angle * (pi / 180);
  }

  Offset _getOffset(double angle, double radius) {
    final rotationAwareAngle = angle;

    final radian = _angleToRadian(rotationAwareAngle);
    final x = cos(radian) * radius + radius + specs.halfBorderRadiusAngle;
    final y = sin(radian) * radius + radius + specs.halfBorderRadiusAngle;

    return Offset(x, y);
  }
}

class PolygonPathSpecs {
  final int sides;
  final double borderRadiusAngle;
  final double halfBorderRadiusAngle;

  PolygonPathSpecs({
    @required this.sides,
    @required this.borderRadiusAngle,
  }) : halfBorderRadiusAngle = borderRadiusAngle / 2;
}
import 'package:flutter/material.dart';
import 'package:flutter_samples/apps/radio_app/bloc/radio_bloc.dart';
import 'package:flutter_samples/apps/radio_app/models/station.dart';
import 'package:provider/provider.dart';

class FrequencyName extends StatelessWidget {
  const FrequencyName({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final radioApp = Provider.of<RadioBLoC>(context, listen: false);
    return Positioned(
      left: MediaQuery.of(context).size.width / 2.75,
      child: ValueListenableBuilder<Station>(
        valueListenable: radioApp.station,
        builder: (_, station, __) => Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text(
              station.frequency.toString(),
              style: Theme.of(context).textTheme.headline3.copyWith(color: Colors.white, fontWeight: FontWeight.bold),
            ),
            Text(
              'Radio ${station.name}',
              style: Theme.of(context).textTheme.subtitle1.copyWith(fontWeight: FontWeight.w700, color: Colors.white),
            ),
          ],
        ),
      ),


0;  //added for filament width sensor
  #endif

  if(pwm_count == 0){
    soft_pwm_0 = soft_pwm[0];
    if(soft_pwm_0 > 0) {
      WRITE(HEATER_0_PIN,1);
      #ifdef HEATERS_PARALLEL
      WRITE(HEATER_1_PIN,1);
      #endif
    } else WRITE(HEATER_0_PIN,0);

    #if EXTRUDERS > 1
    soft_pwm_1 = soft_pwm[1];
    if(soft_pwm_1 > 0) WRITE(HEATER_1_PIN,1); else WRITE(HEATER_1_PIN,0);
    #endif
    #if EXTRUDERS > 2
    soft_pwm_2 = soft_pwm[2];
    if(soft_pwm_2 > 0) WRITE(HEATER_2_PIN,1); else WRITE(HEATER_2_PIN,0);
    #endif
    #if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
    soft_pwm_b = soft_pwm_bed;
    if(soft_pwm_b > 0) WRITE(HEATER_BED_PIN,1); else WRITE(HEATER_BED_PIN,0);
    #endif
    #ifdef FAN_SOFT_PWM
    soft_pwm_fan = fanSpeedSoftPwm / 2;
    if(soft_pwm_fan > 0) WRITE(FAN_PIN,1); else WRITE(FAN_PIN,0);
    #endif
  }
  if(soft_pwm_0 < pwm_count) {
      WRITE(HEATER_0_PIN,0);
      #ifdef HEATERS_PARALLEL
      WRITE(HEATER_1_PIN,0);
      #endif
    }
  #if EXTRUDERS > 1
  if(soft_pwm_1 < pwm_count) WRITE(HEATER_1_PIN,0);
  #endif
  #if EXTRUDERS > 2
  if(soft_pwm_2 < pwm_count) WRITE(HEATER_2_PIN,0);
  #endif
  #if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
  if(soft_pwm_b < pwm_count) WRITE(HEATER_BED_PIN,0);
  #endif
  #ifdef FAN_SOFT_PWM
  if(soft_pwm_fan < pwm_count) WRITE(FAN_PIN,0);
  #endif

  pwm_count += (1 << SOFT_PWM_SCALE);
  pwm_count &= 0x7f;

  switch(temp_state) {
    case 0: // Prepare TEMP_0
      #if defined(TEMP_0_PIN) && (TEMP_0_PIN > -1)
        #if TEMP_0_PIN > 7
          ADCSRB = 1<<MUX5;
        #else
          ADCSRB = 0;
        #endif
        ADMUX = ((1 << REFS0) | (TEMP_0_PIN & 0x07));
        ADCSRA |= 1<<ADSC; // Start conversion
      #endif
      lcd_buttons_update();
      temp_state = 1;
      break;
    case 1: // Measure TEMP_0
      #if defined(TEMP_0_PIN) && (TEMP_0_PIN > -1)
        raw_temp_0_value += ADC;
      #endif
      #ifdef HEATER_0_USES_MAX6675 // TODO remove the blocking
        raw_temp_0_value = read_max6675();
      #endif
      temp_state = 2;
      break;
    case 2: // Prepare TEMP_BED
      #if defined(TEMP_BED_PIN) && (TEMP_BED_PIN > -1)
        #if TEMP_BED_PIN > 7
          ADCSRB = 1<<MUX5;
        #else
          ADCSRB = 0;
        #endif
        ADMUX = ((1 << REFS0) | (TEMP_BED


 bootCount;
	}

	public long getBootCause() {
		return bootCause;
	}

	public void setBootCause(long bootCause) {
		this.bootCause = bootCause;
	}

	public long getTxBytes() {
		return txBytes;
	}

	public void setTxBytes(long txBytes) {
		this.txBytes = txBytes;
	}

	public long getRxBytes() {
		return rxBytes;
	}

	public void setRxBytes(long rxBytes) {
		this.rxBytes = rxBytes;
	}

	public int getConfig() {
		return config;
	}

	public void setConfig(int config) {
		this.config = config;
	}

	public long getTxCount() {
		return txCount;
	}

	public void setTxCount(long txCount) {
		this.txCount = txCount;
	}

	public long getRxCount() {
		return rxCount;
	}

	public void setRxCount(long rxCount) {
		this.rxCount = rxCount;
	}

}
package ru.r2cloud.jradio.ccsds;

import java.io.IOException;

import ru.r2cloud.jradio.util.BitInputStream;

// as defined in CCSDS 301.0-B-4
public class TimeCode {

	private Integer day;
	private Long millisecondsOfTheDay;
	private Long subMillisecond;

	private Long time;
	private Long fractionalTime;

	public TimeCode() {
		// do nothing
	}

	public TimeCode(BitInputStream bis, PField pfield) throws IOException {
		switch (pfield.getType()) {
		case CDS:
			if (pfield.getLengthOfDaySegment() == 0) {
				day = bis.readUnsignedInt(16);
			} else {
				day = bis.readUnsignedInt(24);
			}
			millisecondsOfTheDay = bis.readUnsignedLong(32);
			if (pfield.getLengthOfSubmillisecondSegment() == 0b01) {
				subMillisecond = bis.readUnsignedLong(16);
			} else if (pfield.getLengthOfSubmillisecondSegment() == 0b10) {
				subMillisecond = bis.readUnsignedLong(32);
			}
			break;
		case CUC:
			time = bis.readUnsignedLong(pfield.getBasicTimeUnitOctets() * 8);
			if (pfield.getFractionalTimeUnitOctets() > 0) {
				fractionalTime = bis.readUnsignedLong(pfield.getFractionalTimeUnitOctets() * 8);
			}
			break;
		default:
			break;
		}
	}

	public Integer getDay() {
		return day;
	}

	public void setDay(Integer day) {
		this.day = day;
	}

	public Long getMillisecondsOfTheDay() {
		return millisecondsOfTheDay;
	}

	public void setMillisecondsOfTheDay(Long millisecondsOfTheDay) {
		this.millisecondsOfTheDay = millisecondsOfTheDay;
	}

	public Long getSubMillisecond() {
		return subMillisecond;
	}

	public void setSubMillisecond(Long subMillisecond) {
		this.subMillisecond = subMillisecond;
	}

	public Long getTime() {
		return time;
	}

	public void setTime(Long time) {
		this.time = time;
	}

	public Long getFractionalTime() {
		return fractionalTime;
	}

	public void setFractionalTime(Long fractionalTime) {
		this.fractionalTime = fractionalTime;
	}

}
package ru.r2cloud.jradio.ccsds;

//as defined at CCSDS 301.0-B-4 Section 3.2.2
public class PField {

	private TimeCodeType type;
	private int epochType;
	private int lengthOfDaySegment;
	private int lengthOfSubmillisecondSegment;

	private int basicTimeUnitOctets;
	private int fractionalTimeUnitOctets;

	public PField() {
		// do nothing
	}

	public PField(int basicTimeUnitOctets, int fractionalTimeUnitOctets) {
		this.type =


    expect(color("some `backtick quote text`")).toEqual(`some ${chalk.gray("backtick quote text")}`);
  });

  it("color [] wrapped text", () => {
    expect(color("some [arg] with [option]")).toEqual(
      `some ${chalk.yellow.bold("[arg]")} with ${chalk.yellow.bold("[option]")}`,
    );
  });

  it("color [] wrapped text with bold elements", () => {
    expect(color("**some** [arg] with [option]")).toEqual(
      `${chalk.bold("some")} ${chalk.yellow.bold("[arg]")} with ${chalk.yellow.bold("[option]")}`,
    );
  });
});
import assign from '../../src/utils/assign';

describe('assign()', () => {
  it('should merge 2 objects', () => {
    expect.assertions(1);
    expect(assign({ a: 'A' }, { b: 'B' })).toStrictEqual({ a: 'A', b: 'B' });
  });

  it('should merge 3 or more objects', () => {
    expect.assertions(1);
    expect(assign({ a: 'A' }, { b: 'B' }, { c: 'C' }, { d: 'D' })).toStrictEqual({
      a: 'A', b: 'B', c: 'C', d: 'D',
    });
  });
});
import { fillWithBucket } from "../../core/drawing";
import { store } from "../../redux/store";
import { getMousePositionRelativeToCanvas } from "./utils";
import { AvailableTools, MouseButton } from "../../types";
import { pickColor } from "../../core/drawing/pick-color";
import { getCanvasContext } from "../../core/drawing/utils/get-canvas-context";
import { setColor1, setColor2 } from "../../redux/colors-slice";

export const canvasAreaEventHandlers = {
	click: {
		pickColorIfNeeded(
			canvasRef: React.RefObject<HTMLCanvasElement>,
			mouseEvent: React.MouseEvent,
			mouseButton: MouseButton
		) {
			const storeState = store.getState();
			const canvasContext = getCanvasContext(canvasRef);

			if (!canvasRef.current || !canvasContext) {
				return;
			}

			if (storeState.selectedTool === AvailableTools.ColorPicker) {
				const mousePosition = getMousePositionRelativeToCanvas(
					canvasRef.current,
					mouseEvent
				);
				const pickedColor = pickColor({
					canvasContext,
					mousePosition,
					imageSize: {
						width: storeState.imageSettings.widthInPx,
						height: storeState.imageSettings.heightInPx,
					},
				});

				const opaqueColor = {
					...pickedColor,
					alpha: 255,
				};

				if (mouseButton === MouseButton.Primary) {
					store.dispatch(setColor1(opaqueColor));
				} else {
					store.dispatch(setColor2(opaqueColor));
				}
			}
		},
	},
	mouseDown: {
		fillWithBucketIfNeeded(
			canvasRef: React.RefObject<HTMLCanvasElement>,
			clickEvent: React.MouseEvent
		) {
			const storeState = store.getState();
			const context = getCanvasContext(canvasRef);

			if (!canvasRef.current || !context) return;

			const currentMousePosition = getMousePositionRelativeToCanvas(
				canvasRef.current,
				clickEvent
			);

			if (storeState.selectedTool === AvailableTools.Fill) {
				const fillColor =
					storeState.mouseButtonPressedOnCanvas === MouseButton.Primary
						? storeState.colors.color1
						: storeState.colors.color2;

				fillWithBucket({
					context,
					mousePositionRelativeToCanvas: currentMousePosition,
					fillColor,
					canvasSize: {
						width: storeState.imageSettings.widthInPx,
						height: storeState.imageSettings.heightInPx,
					},
				});
			}


if( !d->m_bSuccess ) return NULL;
	HLValue ret;
	ret.Set("lobby",d->m_ulSteamIDLobby);
	if( d->m_ulSteamIDMember != d->m_ulSteamIDLobby ) ret.Set("user",d->m_ulSteamIDMember);
	return ret.value;
}

vdynamic *CallbackHandler::EncodeLobbyChatUpdate( LobbyChatUpdate_t *d ) {
	HLValue ret;
	ret.Set("lobby",d->m_ulSteamIDLobby);
	ret.Set("user",d->m_ulSteamIDUserChanged);
	ret.Set("origin", d->m_ulSteamIDMakingChange);
	ret.Set("flags", d->m_rgfChatMemberStateChange);
	return ret.value;
}

vdynamic *CallbackHandler::EncodeLobbyChatMsg( LobbyChatMsg_t *d ) {
	HLValue ret;
	ret.Set("lobby",d->m_ulSteamIDLobby);
	ret.Set("user",d->m_ulSteamIDUser);
	ret.Set("type",d->m_eChatEntryType);
	ret.Set("cid", d->m_iChatID);
	return ret.value;
}

vdynamic *CallbackHandler::EncodeLobbyJoinRequest( GameLobbyJoinRequested_t *d ) {
	HLValue ret;
	ret.Set("lobby", d->m_steamIDLobby);
	ret.Set("user", d->m_steamIDFriend);
	return ret.value;
}

// --------- Lobby Search --------------------------

static void on_lobby_list( vclosure *c, LobbyMatchList_t *result, bool error ) {
	vdynamic d;
	d.t = &hlt_i32;
	d.v.i = error ? -1 : result->m_nLobbiesMatching;
	dyn_call_result(c,&d,error);
}

HL_PRIM CClosureCallResult<LobbyMatchList_t>* HL_NAME(request_lobby_list)( vclosure *closure ) {
	if( !CheckInit() ) return NULL;
	ASYNC_CALL(SteamMatchmaking()->RequestLobbyList(), LobbyMatchList_t, on_lobby_list);
	return m_call;
}

HL_PRIM vuid HL_NAME(get_lobby_by_index)( int index ) {
	return hl_of_uid(SteamMatchmaking()->GetLobbyByIndex(index));
}

HL_PRIM void HL_NAME(request_filter_string)( vbyte *key, vbyte *value, int type ) {
	SteamMatchmaking()->AddRequestLobbyListStringFilter((char*)key,(char*)value,(ELobbyComparison)type);
}

HL_PRIM void HL_NAME(request_filter_numerical)( vbyte *key, int value, int type ) {
	SteamMatchmaking()->AddRequestLobbyListNumericalFilter((char*)key,value,(ELobbyComparison)type);
}

HL_PRIM void HL_NAME(request_filter_near_value)( vbyte *key, int value ) {
	SteamMatchmaking()->AddRequestLobbyListNearValueFilter((char*)key,value);
}

HL_PRIM void HL_NAME(request_filter_slots_available)( int slots ) {
	SteamMatchmaking()->AddRequestLobbyListFilterSlotsAvailable(slots);
}

HL_PRIM void HL_NAME(request_filter_distance)( int distance ) {
	SteamMatchmaking()->AddRequestLobbyListDistanceFilter((ELobbyDistanceFilter)distance);
}

HL_PRIM void HL_NAME(request_result_count)( int max ) {
	SteamMatchmaking()->AddRequestLobbyListResultCountFilter(max);
}

DEFINE_PRIM(_CRESULT, request_lobby_list, _CALLB(_I32));
DEFINE_PRIM(_UID, g


 "quantity_change_increase",
			params: ProrationParams{
				Action:             types.ProrationActionQuantityChange,
				OldPriceID:         "price_same",
				NewPriceID:         "price_same",
				OldQuantity:        decimal.NewFromInt(5),
				NewQuantity:        decimal.NewFromInt(10),
				OldPricePerUnit:    decimal.NewFromInt(10),
				NewPricePerUnit:    decimal.NewFromInt(10),
				ProrationDate:      time.Date(2024, 3, 15, 0, 0, 0, 0, time.UTC),
				CurrentPeriodStart: time.Date(2024, 3, 1, 0, 0, 0, 0, time.UTC),
				CurrentPeriodEnd:   time.Date(2024, 3, 31, 0, 0, 0, 0, time.UTC),
				CustomerTimezone:   "UTC",
				ProrationBehavior:  types.ProrationBehaviorCreateProrations,
				ProrationStrategy:  types.StrategyDayBased,
				PlanPayInAdvance:   true,
				Currency:           "USD",
			},
			expected: &ProrationResult{
				NetAmount:     decimal.NewFromFloat(27.42), // (10-5) * 10 * 17/31 = 5 * 10 * 0.5484 = 27.42
				Action:        types.ProrationActionQuantityChange,
				ProrationDate: time.Date(2024, 3, 15, 0, 0, 0, 0, time.UTC),
				Currency:      "USD",
				IsPreview:     false,
				CreditItems: []ProrationLineItem{
					{
						Description: "Credit for unused time on previous quantity",
						Amount:      decimal.NewFromFloat(-27.42), // -(5 * 10 * 17/31)
						StartDate:   time.Date(2024, 3, 15, 0, 0, 0, 0, time.UTC),
						EndDate:     time.Date(2024, 3, 31, 0, 0, 0, 0, time.UTC),
						Quantity:    decimal.NewFromInt(5),
						PriceID:     "price_same",
						IsCredit:    true,
					},
				},
				ChargeItems: []ProrationLineItem{
					{
						Description: "Prorated charge for quantity change",
						Amount:      decimal.NewFromFloat(54.84), // (10 * 10 * 17/31)
						StartDate:   time.Date(2024, 3, 15, 0, 0, 0, 0, time.UTC),
						EndDate:     time.Date(2024, 3, 31, 0, 0, 0, 0, time.UTC),
						Quantity:    decimal.NewFromInt(10),
						PriceID:     "price_same",
						IsCredit:    false,
					},
				},
				CurrentPeriodStart: time.Date(2024, 3, 1, 0, 0, 0, 0, time.UTC),
				CurrentPeriodEnd:   time.Date(2024, 3, 31, 0, 0, 0, 0, time.UTC),
			},
		},
		{
			name: "add_item_no_credit",
			params: ProrationParams{
				Action:             types.ProrationActionAddItem,
				NewPriceID:         "price_new",
				NewQuantity:        decimal.NewFromInt(1),
				NewPricePerUnit:    decimal.NewFromInt(25),
				ProrationDate:      time.Date(2024, 3, 15, 0, 0, 0, 0, time.UTC),
				CurrentPeriodStart: time.Date(2024, 3, 1, 0, 0, 0, 0, time.UTC),
				CurrentPeriodEnd:   time.Date(2024, 3, 31, 0, 0, 0, 0, time.UTC),
				CustomerTimezone:   "UTC",
				ProrationBehavior:  types.ProrationBehaviorCreateProrations,
				ProrationStrategy:  types.StrategyDayBased,
				PlanPayInAdvance:   true,
				Currency:           "USD",
			},
			expected: &ProrationResult{
				Ne


 file.
/// Returns true if successful, false otherwise.
/// Sets the rust error.
#[no_mangle]
pub extern "C" fn Vfs_addSlf(vfs: *mut Vfs, order: i32, path: *const c_char) -> bool {
    forget_rust_error();
    let vfs = unsafe_mut(vfs);
    let path = path_buf_from_c_str_or_panic(unsafe_c_str(path));
    if let Err(err) = vfs.add_slf(order, &path) {
        remember_rust_error(format!("Vfs_addSlf {:?} {:?}: {}", order, path, err));
    }
    no_rust_error()
}

/// Opens a virtual file for reading.
/// Returns the file on success, null otherwise.
/// Sets the rust error.
/// coverity[+alloc]
#[no_mangle]
pub extern "C" fn VfsFile_open(vfs: *mut Vfs, path: *const c_char) -> *mut VfsFile {
    forget_rust_error();
    let vfs = unsafe_mut(vfs);
    let path = str_from_c_str_or_panic(unsafe_c_str(path));
    match vfs.open(&Nfc::caseless_path(&path)) {
        Err(err) => {
            remember_rust_error(format!("VfsFile_open {:?}: {}", path, err));
            std::ptr::null_mut()
        }
        Ok(file) => into_ptr(file),
    }
}

/// Closes the virtual file.
/// coverity[+free : arg-0]
#[no_mangle]
pub extern "C" fn VfsFile_close(file: *mut VfsFile) {
    let _drop_me = from_ptr(file);
}

/// Gets the size of the virtual file.
/// Returns true if successful, false otherwise.
/// Sets the rust error.
#[no_mangle]
pub extern "C" fn VfsFile_len(file: *mut VfsFile, len: *mut u64) -> bool {
    forget_rust_error();
    let file = unsafe_mut(file);
    let len = unsafe_mut(len);
    match file.len() {
        Err(err) => {
            remember_rust_error(format!("VfsFile_len: {}", err));
            *len = 0;
        }
        Ok(n) => *len = n,
    }
    no_rust_error()
}

/// Reads data from the virtual file.
/// Returns true if successful, false otherwise.
/// Sets the rust error.
#[no_mangle]
pub extern "C" fn VfsFile_readExact(file: *mut VfsFile, buffer: *mut u8, length: usize) -> bool {
    forget_rust_error();
    let file = unsafe_mut(file);
    let buffer = unsafe_slice_mut(buffer, length);
    if let Err(err) = file.read_exact(buffer) {
        remember_rust_error(format!("VfsFile_readExact {} {}: {}", file, length, err));
    }
    no_rust_error()
}

/// Seeks to an offset relative to the start of the virtual file.
/// Returns true if successful, false otherwise.
/// Sets the rust error.
/// `out_position` is optional.
#[no_mangle]
pub extern "C" fn VfsFile_seekFromStart(
    file: *mut VfsFile,
    offset: u64,
    out_position: *mut u64,
) -> bool {
    forget_rust_error();
    let file = unsafe_mut(file);
    let out_position = unsafe_mut_option(out_position);
    match file.seek(SeekFrom::Start(offset)) {
        Err(err) => {
            remember_rust_error(format!("VfsFile_seekFromStart {}: {}", offset, err));
        }
        Ok(position) => {
            if let Some(out) = out_position {
                *out = position;
            }
        }


push(seat?);
            }

            height += 1;
        }

        let data2 = data1.clone();

        Ok(SeatingPlan {
            width,
            height,
            state: false,
            data1,
            data2,
        })
    }
}

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

    const EXAMPLES_PART1: [&str; 6] = [
        r"L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL",
        r"#.##.##.##
#######.##
#.#.#..#..
####.##.##
#.##.##.##
#.#####.##
..#.#.....
##########
#.######.#
#.#####.##",
        r"#.LL.L#.##
#LLLLLL.L#
L.L.L..L..
#LLL.LL.L#
#.LL.LL.LL
#.LLLL#.##
..L.L.....
#LLLLLLLL#
#.LLLLLL.L
#.#LLLL.##",
        r"#.##.L#.##
#L###LL.L#
L.#.#..#..
#L##.##.L#
#.##.LL.LL
#.###L#.##
..#.#.....
#L######L#
#.LL###L.L
#.#L###.##",
        r"#.#L.L#.##
#LLL#LL.L#
L.L.L..#..
#LLL.##.L#
#.LL.LL.LL
#.LL#L#.##
..L.L.....
#L#LLLL#L#
#.LLLLLL.L
#.#L#L#.##",
        r"#.#L.L#.##
#LLL#LL.L#
L.#.L..#..
#L##.##.L#
#.#L.LL.LL
#.#L#L#.##
..L.L.....
#L#L##L#L#
#.LLLLLL.L
#.#L#L#.##",
    ];

    const EXAMPLES_PART2: [&str; 7] = [
        r"L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL",
        r"#.##.##.##
#######.##
#.#.#..#..
####.##.##
#.##.##.##
#.#####.##
..#.#.....
##########
#.######.#
#.#####.##",
        r"#.LL.LL.L#
#LLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLL#
#.LLLLLL.L
#.LLLLL.L#",
        r"#.L#.##.L#
#L#####.LL
L.#.#..#..
##L#.##.##
#.##.#L.##
#.#####.#L
..#.#.....
LLL####LL#
#.L#####.L
#.L####.L#",
        r"#.L#.L#.L#
#LLLLLL.LL
L.L.L..#..
##LL.LL.L#
L.LL.LL.L#
#.LLLLL.LL
..L.L.....
LLLLLLLLL#
#.LLLLL#.L
#.L#LL#.L#",
        r"#.L#.L#.L#
#LLLLLL.LL
L.L.L..#..
##L#.#L.L#
L.L#.#L.L#
#.L####.LL
..#.#.....
LLL###LLL#
#.LLLLL#.L
#.L#LL#.L#",
        r"#.L#.L#.L#
#LLLLLL.LL
L.L.L..#..
##L#.#L.L#
L.L#.LL.L#
#.LLLL#.LL
..#.L.....
LLL###LLL#
#.LLLLL#.L
#.L#LL#.L#",
    ];

    #[test]
    fn test_string_roundtrip() {
        for &layout in &EXAMPLES_PART1 {
            let plan = layout.parse::<SeatingPlan>().unwrap();
            let result = plan.to_string();
            assert_eq!(result, layout);
        }
    }

    #[test]
    fn test_update() {
        let mut plan = EXAMPLES_PART1[0].parse::<SeatingPlan>().unwrap();
        for &expected in


/*
 * Copyright 2012 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

 #ifndef SkTwoPointRadialGradient_DEFINED
 #define SkTwoPointRadialGradient_DEFINED

 #include "SkGradientShaderPriv.h"

class SkTwoPointRadialGradient : public SkGradientShaderBase {
public:
    SkTwoPointRadialGradient(const SkPoint& start, SkScalar startRadius,
                              const SkPoint& end, SkScalar endRadius,
                              const Descriptor&, const SkMatrix* localMatrix);

    virtual BitmapType asABitmap(SkBitmap* bitmap,
                                 SkMatrix* matrix,
                                 TileMode* xy) const SK_OVERRIDE;
    virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
    virtual bool asNewEffect(GrContext* context, const SkPaint&, const SkMatrix*, GrColor*,
                             GrEffect**)  const SK_OVERRIDE;

    virtual size_t contextSize() const SK_OVERRIDE;

    class TwoPointRadialGradientContext : public SkGradientShaderBase::GradientShaderBaseContext {
    public:
        TwoPointRadialGradientContext(const SkTwoPointRadialGradient&, const ContextRec&);

        virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE;

    private:
        typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED;
    };

    SkScalar getCenterX1() const { return fDiff.length(); }
    SkScalar getStartRadius() const { return fStartRadius; }
    SkScalar getDiffRadius() const { return fDiffRadius; }

    SK_TO_STRING_OVERRIDE()
    SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTwoPointRadialGradient)

protected:
    SkTwoPointRadialGradient(SkReadBuffer& buffer);
    virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
    virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE;

private:
    const SkPoint fCenter1;
    const SkPoint fCenter2;
    const SkScalar fRadius1;
    const SkScalar fRadius2;
    SkPoint fDiff;
    SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA;

    void init();

    typedef SkGradientShaderBase INHERITED;
};

#endif


= null && p.Owner != null && p.Owner.Race == ObjectType.Player && p.Owner != Master)
	  {
	      if (Envir.Time > Master.BrownTime && Master.PKPoints < 200)
	          p.Owner.BrownTime = Envir.Time + Settings.Minute;
	  }

	*/

	if !ignoreDefence && (p.PType == PoisonTypeGreen) {
		armour := m.GetDefencePower(int(m.MinMAC), int(m.MaxMAC))

		if p.Value < armour {

			p.PType = PoisonTypeNone
		} else {
			p.Value -= armour
		}
	}

	if p.PType == PoisonTypeNone {
		return
	}
	// TODO
	/*
	  for (int i = 0; i < PoisonList.Count; i++)
	  {
	      if (PoisonList[i].PType != p.PType) continue;
	      if ((PoisonList[i].PType == PoisonType.Green) && (PoisonList[i].Value > p.Value)) return;//cant cast weak poison to cancel out strong poison
	      if ((PoisonList[i].PType != PoisonType.Green) && ((PoisonList[i].Duration - PoisonList[i].Time) > p.Duration)) return;//cant cast 1 second poison to make a 1minute poison go away!
	      if (p.PType == PoisonType.DelayedExplosion) return;
	      if ((PoisonList[i].PType == PoisonType.Frozen) || (PoisonList[i].PType == PoisonType.Slow) || (PoisonList[i].PType == PoisonType.Paralysis) || (PoisonList[i].PType == PoisonType.LRParalysis)) return;//prevents mobs from being perma frozen/slowed
	      PoisonList[i] = p;
	      return;
	  }

	  if (p.PType == PoisonType.DelayedExplosion)
	  {
	      ExplosionInflictedTime = Envir.Time + 4000;
	      Broadcast(new S.ObjectEffect { ObjectID = ObjectID, Effect = SpellEffect.DelayedExplosion });
	  }
	*/
	m.PoisonList.List.PushBack(p)
}

func (m *Monster) Broadcast(msg interface{}) {
	m.Map.BroadcastP(m.CurrentLocation, msg, nil)
}

// Spawn 怪物生成
func (m *Monster) Spawn() {
	msg, ok := m.Map.AddObject(m)
	if !ok {
		log.Warnln(msg)
		return
	}
	// RefreshAll();
	// SetHP(MaxHP);
	m.Broadcast(ServerMessage{}.Object(m))
}

func (m *Monster) BroadcastDamageIndicator(typ DamageType, dmg int) {
	m.Broadcast(ServerMessage{}.DamageIndicator(int32(dmg), typ, m.GetID()))
}

func (m *Monster) IsDead() bool {
	return m.Dead
}

func (m *Monster) IsUndead() bool {
	return false
}

func (m *Monster) IsBlocking() bool {
	return !m.IsDead()
}

func (m *Monster) IsSkeleton() bool {
	return false
}

func (m *Monster) IsHidden() bool {
	return false
}

func (m *Monster) IsAttackTargetMonster(attacker *Monster) bool {
	if attacker == m {
		return false
	}

	if m.AI == 6 || m.AI == 58 {
		return false
	}

	if attacker.AI == 6 {
		if m.AI != 1 && m.AI != 2 && m.AI != 3 { //


#locals_pat,)* #context: #name::Context) {
                use rtfm::Mutex as _;

                #(#stmts)*
            }
        ));
    }

    (const_app, root, user_tasks)
}
<filename>src/test/ui/error-codes/E0512.rs<gh_stars>1000+
fn takes_u8(_: u8) {}

fn main() {
    unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512
}
use std::convert::TryInto;
use std::mem::size_of;

use crate::error::FaucetError;
use solana_program::program_error::ProgramError;

#[repr(C)]
#[derive(Clone, Debug, PartialEq)]
pub enum FaucetInstruction {
    /// Initializes a faucet
    ///
    /// 0. `[]` Token Mint Account, mint authority must equal Program Derived Address
    /// 1. `[writable]` Faucet Account
    /// 2. `[]` Rent Sysvar
    /// 3. `[optional]` Admin Account
    InitFaucet {
        /// all other accounts may only mint this amount per ix
        amount: u64,
    },
    /// Mints Tokens
    ///
    /// 0. `[]` The mint authority - Program Derived Address
    /// 1. `[writable]` Token Mint Account
    /// 2. `[writable]` Destination Account
    /// 3. `[]` The SPL Token Program
    /// 4. `[]` The Faucet Account
    /// 5. `[optional/signer]` Admin Account
    MintTokens { amount: u64 },
    /// Closes the faucet, can only be done if the faucet has an admin key, transfers mint authority back to admin
    ///
    /// 0. `[signer]` Admin account
    /// 1. `[writable]` Faucet account
    /// 2. `[writable]` Destination account for rent
    /// 3. `[writable]` Mint account
    /// 4. `[]` The SPL Token Program
    /// 5. `[]` The PDA
    CloseFaucet,
}

impl FaucetInstruction {
    /// Unpacks a byte buffer into a [FaucetInstruction](enum.FaucetInstruction.html).
    pub fn unpack(input: &[u8]) -> Result<Self, ProgramError> {
        let (&tag, rest) = input.split_first().ok_or(FaucetError::InvalidInstruction)?;
        Ok(match tag {
            0 => {
                let amount = rest
                    .get(..8)
                    .and_then(|slice| slice.try_into().ok())
                    .map(u64::from_le_bytes)
                    .ok_or(FaucetError::InvalidInstruction)?;
                Self::InitFaucet { amount }
            }
            1 => {
                let amount = rest
                    .get(..8)
                    .and_then(|slice| slice.try_into().ok())
                    .map(u64::from_le_bytes)
                    .ok_or(FaucetError::InvalidInstruction)?;
                Self::MintTokens { amount }
            }
            2 => Self::CloseFaucet,
            _ => return Err(FaucetError::InvalidInstruction.into()),
        })
    }

    pub fn pack(&self) -> Vec<u8> {
        let mut buf = Vec::with_capacity(size_of::<Self>());
        match self {
            Self::InitFaucet { amount } => {
                buf.push(0);
                buf.extend_from_slice(&amount.to_le_bytes());
            }
            Self::MintTokens { amount } => {
                buf.push(1);
                buf.extend_from_slice(&amount.to_le_bytes());
            }
            Self::CloseFaucet => {
                buf.push(2);
            }
        }

        buf
    }
}

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

    #[test]
    fn test_instruction_unpacking() {
        // 1 tag, 1 admin, 8 amount
        let check = FaucetInstruction


from PyQt5.QtWidgets import QDialog, QVBoxLayout, QLineEdit, QPushButton, QMessageBox, QHBoxLayout

class SpeedDialog(QDialog):
    """Dialog for selecting a playback speed multiplier.

    Attributes:
        speed_options (list[str]): Preset speed options (e.g., "x2", "x3", "x0.5").
        selected_speed (float): Chosen speed multiplier as a float.
        custom_speed_input (QLineEdit): Input field for custom speed multiplier.
    """

    def __init__(self, parent=None) -> None:
        """Initialize the dialog with preset and custom speed options."""
        super().__init__(parent)
        self.setWindowTitle("Select Speed Multiplier")

        self.speed_options = ["x2", "x3", "x4", "x5", "x10"]
        self.selected_speed = None

        layout = QVBoxLayout(self)

        for speed_option in self.speed_options:
            button = QPushButton(speed_option, self)
            button.clicked.connect(lambda checked, opt=speed_option: self.select_speed(opt))
            layout.addWidget(button)

        custom_speed_layout = QHBoxLayout()
        self.custom_speed_input = QLineEdit(self)
        self.custom_speed_input.setPlaceholderText("x?")
        custom_speed_button = QPushButton("Set Custom Speed", self)
        custom_speed_button.clicked.connect(self.set_custom_speed)

        custom_speed_layout.addWidget(self.custom_speed_input)
        custom_speed_layout.addWidget(custom_speed_button)
        layout.addLayout(custom_speed_layout)
        self.custom_speed_input.returnPressed.connect(self.set_custom_speed)

    def select_speed(self, speed_option: str) -> None:
        """Set selected_speed from a preset option and close the dialog."""
        self.selected_speed = float(speed_option[1:])
        self.accept()

    def set_custom_speed(self) -> None:
        """Validate and set selected_speed from the custom input."""
        try:
            custom_speed = float(self.custom_speed_input.text())
            if custom_speed <= 0:
                raise ValueError("Multiplier must be greater than 0.")
            self.selected_speed = custom_speed
            self.accept()
        except ValueError as e:
            QMessageBox.warning(self, "Invalid Input", f"Please enter a valid positive number.\n\nError: {e}")


#if MIR_JAVA
  { kSkipVirtual, 0, "", "skipvirtual", kBuildTypeAll, kArgCheckPolicyNone, "  --skipvirtual" },
#endif
  { 0, 0, nullptr, nullptr, kBuildTypeAll, kArgCheckPolicyNone, nullptr }
};

bool Options::ParseOptions(int argc, char **argv, std::string &fileName) const {
  bool result = true;
  OptionParser optionParser(kUsage);
  int ret = optionParser.Parse(argc, argv);
  CHECK_FATAL(ret == ErrorCode::kErrorNoError, "option parser error");
  for (auto opt : optionParser.GetOptions()) {
    switch (opt.Index()) {
      case kHelp: {
        if (opt.Args().empty()) {
          optionParser.PrintUsage();
          result = false;
        }
        break;
      }
      case kDumpBefore:
        Options::dumpBefore = true;
        break;
      case kDumpAfter:
        Options::dumpAfter = true;
        break;
      case kDumpFunc:
        Options::dumpFunc = opt.Args();
        break;
      case kDumpPhase:
        Options::dumpPhase = opt.Args();
        break;
      case kSkipPhase:
        Options::skipPhase = opt.Args();
        break;
      case kSkipFrom:
        Options::skipFrom = opt.Args();
        break;
      case kSkipAfter:
        Options::skipAfter = opt.Args();
        break;
      case kQuiet:
        Options::quiet = true;
        break;
      case kRegNativeDynamicOnly:
        Options::regNativeDynamicOnly = true;
        break;
      case kRegNativeStaticBindingList:
        Options::staticBindingList = opt.Args();
        break;
      case kStubJniFunc:
        Options::regNativeFunc = true;
        break;
      case kNativeWrapper:
        Options::nativeWrapper = opt.Type();
        break;
      case kMapleLinker:
        Options::mapleLinker = true;
        Options::dumpMuidFile = false;
        break;
      case kMplnkDumpMuid:
        Options::dumpMuidFile = true;
        break;
      case kEmitVtableImpl:
        Options::emitVtableImpl = true;
        break;
#if MIR_JAVA
      case kSkipVirtual:
        Options::skipVirtualMethod = true;
        break;
#endif
      default:
        result = false;
        ASSERT(false, "unhandled case in Options");
    }
  }

  if (result) {
    if (optionParser.GetNonOptionsCount() != 1) {
      LogInfo::MapleLogger(kLlErr) << "expecting one .mpl file as last argument, found: ";
      for (const auto &optionArg : optionParser.GetNonOptions()) {
        LogInfo::MapleLogger(kLlErr) << optionArg << " ";
      }
      LogInfo::MapleLogger(kLlErr) << std::endl;
      result = false;
    }

    if (result) {
      fileName = optionParser.GetNonOptions().front();
    }
  }
  return result;
}

void Options::DumpOptions() const {
  LogInfo::MapleLogger() << "phase sequence : \t";
  if (phaseSeq.empty()) {
    LogInfo::MapleLogger() << "default phase sequence\n";
  } else {
    for (size_t i = 0; i < phaseSeq.size(); ++i) {
      LogInfo::MapleLogger() << " " << phaseSeq[i].c_str();
    }
  }
  LogInfo::Map


# Singleton Class (has only one instance per class)
class StockInformationConfigurator:
    _instance = None

    def __new__(cls, *args, **kwargs):
        if not cls._instance:
            cls._instance = super(StockInformationConfigurator, cls).__new__(cls)
        return cls._instance

    def __init__(self, period=None, companies_day=None, companies_month=None, companies_year=None,
                 last_update_time=None):
        if companies_day is None:
            companies_day = [("Test", 0, 0, 0)]
        if companies_month is None:
            companies_month = [("Test", 0, 0, 0)]
        if companies_year is None:
            companies_year = [("Test", 0, 0, 0)]
        if not hasattr(self, '_initialized'):
            self._period = period
            self._companies_day = companies_day
            self._companies_month = companies_month
            self._companies_year = companies_year
            self._last_update_time = last_update_time
            self._initialized = True

    @property
    def period(self):
        return self._period

    @period.setter  # czemu error
    def period(self, value):
        self._period = value

    @property
    def companies_day(self):
        return self._companies_day

    @companies_day.setter
    def companies_day(self, value):
        self._companies_day = value

    @property
    def companies_month(self):
        return self._companies_month

    @companies_month.setter
    def companies_month(self, value):
        self._companies_month = value

    @property
    def companies_year(self):
        return self._companies_year

    @companies_year.setter
    def companies_year(self, value):
        self._companies_year = value

    @property
    def last_update_time(self):
        return self._last_update_time

    @last_update_time.setter
    def last_update_time(self, value):
        self._last_update_time = value


(0, "$$bla", metadata: new StreamMetadata(maxCount: 3)),
				Rec.Commit(0, "$$bla"),
				Rec.Prepare(1, "bla"),
				Rec.Commit(1, "bla"),
				Rec.Prepare(2, "bla"),
				Rec.Prepare(2, "bla"),
				Rec.Prepare(2, "bla"),
				Rec.Prepare(2, "bla"),
				Rec.Prepare(2, "bla"),
				Rec.Commit(2, "bla"),
				Rec.Prepare(3, "bla"),
				Rec.Prepare(3, "bla"),
				Rec.Prepare(3, "bla"),
				Rec.Prepare(3, "bla"),
				Rec.Commit(3, "bla"))
			.CompleteLastChunk()
			.CreateDb(token: token);
	}

	protected override ILogRecord[][] KeptRecords(DbResult dbResult) {
		var keep = LogFormatHelper<TLogFormat, TStreamId>.IsV2
			? new int[] { 0, 1, 11, 12, 13, 14 }
			: new int[] { 0, 1, 2, 12, 13, 14, 15 };

		return new[] {
			dbResult.Recs[0].Where((x, i) => keep.Contains(i)).ToArray(),
		};
	}

	[Test]
	public async Task expired_prepares_are_scavenged() {
		await CheckRecords();
	}
}


jector,
  Input
} from '@angular/core';
import { HtmlExtractionService } from "./html-extraction.service";
import { MyStoreService } from "./my-store.service";

@Component({
  selector: 'my-cmp',
  template: `

here is the {{title}}

        Namn
        Längd

        {{ d }}
        {{ !!d && d.length || 0 }}

  `,
  styleUrls: ['./app.component.css']
})
export class MyComponent {
  @Input() title: string;

  constructor(private readonly myService: MyStoreService) {

  }

  get data(): Array<String> {
    return this.myService.data;
  }

}

@Component({
  selector: 'app-root',
  template: `
    <input #inp>
    <button (click)="create(inp.value)">Create</button>

    Link to PDF document for {{title}}
  `,
})
export class AppComponent {
  title: string;
  href: string;

  constructor(private readonly componentFactoryResolver: ComponentFactoryResolver,
              private readonly appRef: ApplicationRef,
              private readonly injector: Injector,
              private readonly http: HttpClient,
              private readonly htmlService: HtmlExtractionService) {
  }

  create(title: string) {
    this.title = title;
    const html = this.htmlService.extractHtml(MyComponent, {title: 'offline view for '+title});
    this.http.post(`/convert-html-to-pdf`, html, {observe: 'response',  responseType: 'text'})
      .subscribe(r => {
        console.log(`filename: ${r.body}`);
        this.href = `/pdf-document/${r.body}`;
      });
  }
}
import { Game } from "@/models/game";
import { TrickStack } from "@/models/trickStack";
import { Trick } from "@/models/trick";

let game: Game;

beforeEach(() => {
  game = Game.singlePlayer();
});

test("game has 4 players", () => {
  expect(game.players[0].name).toBeDefined();
  expect(game.players[1].name).toBeDefined();
  expect(game.players[2].name).toBeDefined();
  expect(game.players[3].name).toBeDefined();
});

test("game has 1 human player", () => {
  expect(game.players[0].isHuman).toBe(true);
  expect(game.players[1].isHuman).toBe(false);
  expect(game.players[2].isHuman).toBe(false);
  expect(game.players[3].isHuman).toBe(false);
});

test("game has a deck", () => {
  expect(game.deck).toBeDefined();
});

test("game has a current round", () => {
  expect(game.currentRound).toBeDefined();
});

test("game deals cards to each player", () => {
  expect(game.players[0].hand.cards).toHaveLength(10);
  expect(game.players[1].hand.cards).toHaveLength(10);
  expect(game.players[2].hand.cards).toHaveLength(10);
  expect(game.players[3].hand.cards).toHaveLength(10);
});

test("game starts with an empty scorecard", () => {
  expect(game.scorecard).toBeDefined();
});

test("should start a new round", () => {
  const previousRound = game.currentRo


.0, UiCurrencyCode.SEK),
      monthlyNet = UiMoney(304.0, UiCurrencyCode.SEK),
    ),
    costBreakdown = listOf(
      "Home Insurance Max" to "300 kr/mo",
      "Travel Plus" to "80 kr/mo",
      "Bundle discount 20%" to "76 kr/mo",
    ),
  ),
  TierDeductibleQuote(
    id = "id3",
    deductible = Deductible(
      UiMoney(0.0, SEK),
      deductiblePercentage = 25,
      description = "Endast en rörlig del om 25% av skadekostnaden.",
    ),
    displayItems = listOf(),
    premium = UiMoney(230.0, SEK),
    tier = Tier(
      "STANDARD",
      tierLevel = 1,
      tierDescription = "Vårt mellanpaket med hög ersättning.",
      tierDisplayName = "Standard",
    ),
    productVariant = ProductVariant(
      displayName = "Test",
      contractGroup = ContractGroup.RENTAL,
      contractType = ContractType.SE_APARTMENT_RENT,
      partner = "test",
      perils = listOf(),
      insurableLimits = listOf(),
      documents = listOf(),
      displayTierName = "Standard",
      tierDescription = "Our most standard coverage",
      termsVersion = "SE_DOG_STANDARD-20230330-HEDVIG-null",
    ),
    addons = emptyList(),
    currentTotalCost = TotalCost(
      monthlyGross = UiMoney(175.0, UiCurrencyCode.SEK),
      monthlyNet = UiMoney(150.0, UiCurrencyCode.SEK),
    ),
    newTotalCost = TotalCost(
      monthlyGross = UiMoney(380.0, UiCurrencyCode.SEK),
      monthlyNet = UiMoney(304.0, UiCurrencyCode.SEK),
    ),
    costBreakdown = listOf(
      "Home Insurance Max" to "300 kr/mo",
      "Travel Plus" to "80 kr/mo",
      "Bundle discount 20%" to "76 kr/mo",
    ),
  ),
  TierDeductibleQuote(
    id = "id4",
    deductible = Deductible(
      UiMoney(3500.0, SEK),
      deductiblePercentage = 25,
      description = "En fast del och en rörlig del om 25% av skadekostnaden",
    ),
    displayItems = listOf(),
    premium = UiMoney(655.0, SEK),
    tier = Tier(
      "STANDARD",
      tierLevel = 1,
      tierDescription = "Vårt mellanpaket med hög ersättning.",
      tierDisplayName = "Standard",
    ),
    productVariant = ProductVariant(
      displayName = "Test",
      contractGroup = ContractGroup.RENTAL,
      contractType = ContractType.SE_APARTMENT_RENT,
      partner = "test",
      perils = listOf(),
      insurableLimits = listOf(),
      documents = listOf(),
      displayTierName = "Standard",
      tierDescription = "Our most standard coverage",
      termsVersion = "SE_DOG_STANDARD-20230330-HEDVIG-null",
    ),
    addons = emptyList(),
    currentTotalCost = TotalCost(
      monthlyGross = UiMoney(175.0, UiCurrencyCode.SEK),
      monthlyNet = UiMoney(150.0, UiCurrencyCode.SEK),
    ),
    newTotalCost = TotalCost(
      monthlyGross = UiMoney(380.0, UiCurrencyCode.SEK),
      monthlyNet = UiMoney(304.0, UiCurrencyCode.SEK),
    ),
    costBreakdown = listOf(
      "Home Insurance Max" to "300 kr/mo",
      "Travel Plus" to "80 kr/mo",


f, 1.0625f).spawnEgg(0x5A4536, 0x252323));

	//public static final DeferredHolder<EntityType<?>, EntityType<AirheadEntity>> AIRHEAD = registerMob("airhead", AirheadEntity::new, 1.0f, 1.6875f, 8506334, 6004943);
	//public static final DeferredHolder<EntityType<?>, EntityType<AlarmoEntity>> ALARMO = registerMob("alarmo", AlarmoEntity::new, 0.625f, 1.375f, 14555160, 6048330);
	//public static final DeferredHolder<EntityType<?>, EntityType<AmphibiorEntity>> AMPHIBIOR = registerMob("amphibior", AmphibiorEntity::new, 0.625f, 2.1875f, 6026738, 16757504);
	//public static final DeferredHolder<EntityType<?>, EntityType<AmphibiyteEntity>> AMPHIBIYTE = registerMob("amphibiyte", AmphibiyteEntity::new, 0.95f, 1.25f, 5140613, 16744695);

	//public static final DeferredHolder<EntityType<?>, EntityType<AnemiaEntity>> ANEMIA = registerMob("anemia", AnemiaEntity::new, 2.25f, 3f, 5179400, 16711680);
	//public static final DeferredHolder<EntityType<?>, EntityType<AnglerEntity>> ANGLER = registerMob("angler", AnglerEntity::new, 0.75f, 0.875f, 0x143A4D, 0x216279);
	//public static final DeferredHolder<EntityType<?>, EntityType<ApparitionEntity>> APPARITION = registerMob("apparition", ApparitionEntity::new, 0.5f, 1.5625f, 7040112, 526344);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArcFlowerEntity>> ARC_FLOWER = registerMob("arc_flower", ArcFlowerEntity::new, 0.6875f, 0.9375f, 5418751, 15073024);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArcWizardEntity>> ARC_WIZARD = registerMob("arc_wizard", ArcWizardEntity::new, 0.6f, 2.3f, 15269714, 4915148);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArcbeastEntity>> ARCBEAST = registerMob("arcbeast", ArcbeastEntity::new, 0.8125f, 1.3125f, 0xF88611, 0x0DA0D0);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArchvineEntity>> ARCHVINE = registerMob("archvine", ArchvineEntity::new, 1.5f, 1.4375f, 15616, 1835776);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArcwormEntity>> ARCWORM = registerMob("arcworm", ArcwormEntity::new, 0.7f, 1.0f, 16768256, 9109501);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArielEntity>> ARIEL = registerMob("ariel", ArielEntity::new, 0.7f, 2.375f, 6809323, 13959166);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArkbackEntity>> ARKBACK = registerMob("arkback", ArkbackEntity::new, 3.8f, 3f, 12099007, 8943244);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArkzyneEntity>> ARKZYNE = registerMob("arkzyne", ArkzyneEntity::new, 0.5625f, 2.6875f, 789516, 10690061);
	//public static final DeferredHolder<EntityType<?>, EntityType<ArocknidEntity>> AROCKNID = register


	p = soap_inULONG64(soap, tag, a, type, SOAP_TYPE_unsignedLONG64);
	return p;
}

SOAP_FMAC3 int SOAP_FMAC4 soap_put_unsignedLONG64(struct soap *soap, const ULONG64 *a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_unsignedLONG64);
	if (soap_out_unsignedLONG64(soap, tag?tag:"unsignedLong", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

SOAP_FMAC3 ULONG64 * SOAP_FMAC4 soap_get_unsignedLONG64(struct soap *soap, ULONG64 *p, const char *tag, const char *type)
{
	if ((p = soap_in_unsignedLONG64(soap, tag, p, type)))
		if (soap_getindependent(soap))
			return NULL;
	return p;
}

SOAP_FMAC3 void SOAP_FMAC4 soap_default_wsc__FaultCodeType(struct soap *soap, enum wsc__FaultCodeType *a)
{
	(void)soap; /* appease -Wall -Werror */
#ifdef SOAP_DEFAULT_wsc__FaultCodeType
	*a = SOAP_DEFAULT_wsc__FaultCodeType;
#else
	*a = (enum wsc__FaultCodeType)0;
#endif
}

static const struct soap_code_map soap_codes_wsc__FaultCodeType[] =
{	{ (long)wsc__BadContextToken, "wsc:BadContextToken" },
	{ (long)wsc__UnsupportedContextToken, "wsc:UnsupportedContextToken" },
	{ (long)wsc__UnknownDerivationSource, "wsc:UnknownDerivationSource" },
	{ (long)wsc__RenewNeeded, "wsc:RenewNeeded" },
	{ (long)wsc__UnableToRenew, "wsc:UnableToRenew" },
	{ 0, NULL }
};

SOAP_FMAC3S const char* SOAP_FMAC4S soap_wsc__FaultCodeType2s(struct soap *soap, enum wsc__FaultCodeType n)
{	const char *s = soap_code_str(soap_codes_wsc__FaultCodeType, (long)n);
	if (s)
		return s;
	return soap_long2s(soap, (long)n);
}

SOAP_FMAC3 int SOAP_FMAC4 soap_out_wsc__FaultCodeType(struct soap *soap, const char *tag, int id, const enum wsc__FaultCodeType *a, const char *type)
{	if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_wsc__FaultCodeType), type) || soap_send(soap, soap_wsc__FaultCodeType2s(soap, *a)))
		return soap->error;
	return soap_element_end_out(soap, tag);
}

SOAP_FMAC3S int SOAP_FMAC4S soap_s2wsc__FaultCodeType(struct soap *soap, const char *s, enum wsc__FaultCodeType *a)
{
	const struct soap_code_map *map;
	char *t;
	if (!s)
		return soap->error;
	soap_s2QName(soap, s, &t, 0, -1);
	map = soap_code(soap_codes_wsc__FaultCodeType, t);
	if (map)
		*a = (enum wsc__FaultCodeType)map->code;
	else
	{	long n;
		if (soap_s2long(soap, s, &n) || ((soap->mode & SOAP_XML_STRICT) && (n < 0 || n > 4)))
			return soap->error = SOAP_TYPE;
		*a = (enum wsc__FaultCodeType)n;
	}
	return SOAP_OK;
}


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

#import "CCTransition.h"

@interface CCTransitionProgress : CCTransitionScene
{
	float to_, from_;
	CCScene *sceneToBeModified_;
}
@end

/** CCTransitionRadialCCW transition.
 A counter colock-wise radial transition to the next scene
 */
@interface CCTransitionProgressRadialCCW : CCTransitionProgress
@end

/** CCTransitionRadialCW transition.
 A counter colock-wise radial transition to the next scene
*/
@interface CCTransitionProgressRadialCW : CCTransitionProgress
@end

/** CCTransitionProgressHorizontal transition.
 A  colock-wise radial transition to the next scene
 */
@interface CCTransitionProgressHorizontal : CCTransitionProgress
@end

@interface CCTransitionProgressVertical : CCTransitionProgress
@end

@interface CCTransitionProgressInOut : CCTransitionProgress
@end

@interface CCTransitionProgressOutIn : CCTransitionProgress
@end


�有颈部僵硬，这可能是哪种疾病？|
|文化类-艺术|请问，印象派画家中以青色系列著名的法国画家是谁？|
|科技类-计算机|请问，192.168.1.1这个IP地址通常被用作什么设备的默认管理IP地址？|
|教育类-高等教育|请问，在美国本科申请中，SAT和ACT有什么区别？是否有必要参加两个考试？|
|商业类-金融|请问，投资人在购买股票时应该看重哪些指标来衡量该公司的价值？|
|历史类-军事|请问，第二次世界大战期间，盟军最初的反击行动发生在哪个战役中？|
|社会类-心理学|请问，自卑情结对于一个人的成长和幸福感有何影响？如何帮助一个自卑的人走出困境？|
|运动类-足球|请问，2022年世界杯足球赛的主办国家是哪个？哪些城市将举办比赛？|
|环保类-气候变化|请问，全球变暖导致的海平面上升有哪些直接或间接的影响？|
|政治类-外交关系|请问，中国和美国之间的南海争端有哪些历史和现实原因？双方的立场和解决方案分别是什么？|
| 电影推荐 | 基于我喜欢的《美国往事》和《教父》这两部电影，你能否推荐一些具有相似风格和氛围的电影？ |
| 公司介绍 | 能否介绍一下目前在 AI 技术领域处于领先地位的公司有哪些？ |
| 人工智能应用 | 未来五年内，你认为人工智能将在哪些领域得到广泛应用？ |
| 餐厅推荐 | 我计划本周日请客户吃午饭，请问你能否推荐一些既有品质又不失价位合理的中餐厅？ |
| 疫苗接种 | 疫苗接种是当前最重要的公共卫生任务之一，请问接种疫苗会产生哪些不良反应？如何缓解这些反应？ |
| 旅游攻略 | 我打算去日本旅行，请问你能提供一些关于日本旅游的攻略和建议吗？ |
| 学术论文写作 | 我正在撰写一篇关于人工智能的学术论文，请问你有没有什么好的写作技巧或建议可以分享？ |
| 健身锻炼 | 我最近开始健身锻炼，请问你有哪些经验或贴士可以帮助我更好地进行锻炼？ |
| 金融投资 | 我想在股市上进行长期投资，请问你有哪些优秀的投资策略和建议可以推荐？ |
| 汽车保养 | 我的汽车已经行驶了五年，请问你有哪些常见的汽车保养技巧可以分享？ |
| 天气                                | 请描述一下今天的天气情况。                                                                                |
| 翻译                                | 能否将以下英文短语翻译成中文： "never give up"、"carpe diem"、"hakuna matata"？                                 |
| 食谱                                | 请分享一道以鸡肉为主材料的简单易做美食食谱。                                                                |
| 新闻                                | 最近有哪些国际新闻是值得关注


/*
 * This file is part of the FreeStreamer project,
 * (C)Copyright 2011-2018 Matias Muhonen <mmu@iki.fi> 穆马帝
 * See the file ''LICENSE'' for using the code.
 *
 * https://github.com/muhku/FreeStreamer
 */

#ifndef ASTREAMER_CACHING_STREAM_H
#define ASTREAMER_CACHING_STREAM_H

#include "input_stream.h"

namespace astreamer {

class File_Output;
class File_Stream;

class Caching_Stream : public Input_Stream, public Input_Stream_Delegate {
private:
    Input_Stream *m_target;
    File_Output *m_fileOutput;
    File_Stream *m_fileStream;
    bool m_cacheable;
    bool m_writable;
    bool m_useCache;
    bool m_cacheMetaDataWritten;
    CFStringRef m_cacheIdentifier;
    CFURLRef m_fileUrl;
    CFURLRef m_metaDataUrl;

private:
    CFURLRef createFileURLWithPath(CFStringRef path);

    void readMetaData();

public:
    Caching_Stream(Input_Stream *target);
    virtual ~Caching_Stream();

    Input_Stream_Position position();

    CFStringRef contentType();
    size_t contentLength();

    bool open();
    bool open(const Input_Stream_Position& position);
    void close();

    void setScheduledInRunLoop(bool scheduledInRunLoop);

    void setUrl(CFURLRef url);

    void setCacheIdentifier(CFStringRef cacheIdentifier);

    static bool canHandleUrl(CFURLRef url);

    /* ID3_Parser_Delegate */
    void id3metaDataAvailable(std::map<CFStringRef,CFStringRef> metaData);
    void id3tagSizeAvailable(UInt32 tagSize);

    void streamIsReadyRead();
    void streamHasBytesAvailable(UInt8 *data, UInt32 numBytes);
    void streamEndEncountered();
    void streamErrorOccurred(CFStringRef errorDesc);
    void streamMetaDataAvailable(std::map<CFStringRef,CFStringRef> metaData);
    void streamMetaDataByteSizeAvailable(UInt32 sizeInBytes);
};

} // namespace astreamer

#endif /* ASTREAMER_CACHING_STREAM_H */


 be within the project (${v})`);n+=`    - ${JSON.stringify(b)}
`}if(I.aliases.length>0){n+=`  aliases:
`;for(let v of I.aliases)n+=`    - ${JSON.stringify(v)}
`}if(E===A&&r.size>0){n+=`  bin:
`;for(let[v,b]of r){let C=K.contains(t.cwd,v);if(C===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=`    ${JSON.stringify(C)}:
`;for(let[T,L]of b){let U=K.relative(K.join(v,Pi),L);n+=`      ${JSON.stringify(T)}: ${JSON.stringify(U)}
`}}}}let p=t.cwd,h=K.join(p,Pi,d1e);a&&await oe.removePromise(h),await oe.changeFilePromise(h,n,{automaticNewlines:!0})}async function hq(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=K.join(r,Pi,d1e),a;try{a=await oe.statPromise(o)}catch{}if(!a)return null;let n=Vi(await oe.readFilePromise(o,"utf8"));if(n.__metadata.version>g1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let I=E.locations.map(b=>K.join(r,b)),v=E.bin;if(v)for(let[b,C]of Object.entries(v)){let T=K.join(r,ue.toPortablePath(b)),L=je.getMapWithDefault(p,T);for(let[U,J]of Object.entries(C))L.set(U,ue.toPortablePath([T,Pi,J].join(K.sep)))}if(A.set(h,{target:Bt.dot,linkType:"HARD",locations:I,aliases:E.aliases||[]}),e&&E.aliases)for(let b of E.aliases){let{scope:C,name:T}=W.parseLocator(h),L=W.makeLocator(W.makeIdent(C,T),b),U=W.stringifyLocator(L);A.set(U,{target:Bt.dot,linkType:"HARD",locations:I,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:m1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var YC=async(t,e)=>{if(t.split(K.sep).indexOf(Pi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let o=e.allowSymlink?await oe.statPromise(t):await oe.lstatPromise(t);if(e.allowSymlink&&!o.isDirectory()||!e.allowSymlink&&o.isSymbolicLink()){await oe.unlinkPromise(t);return}}let r=await oe.readdirPromise(t,{withFileTypes:!0});for(let o of r){let a=K.join(t,o.name);o.isDirectory()?(o.name!==Pi||e&&e.innerLoop)&&await YC(a,{innerLoop:!0,contentsOnly:!1}):await oe.unlinkPromise(a)}e.contentsOnly||await oe.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},A1e=4,PQ=(t,{skipPrefix:e})=>{let r=K.contains(e,t);if(r===n


chreiter Mod. A",
[13328] = "Schwarzer Widder",
[13329] = "Frostwidder",
[13330] = "Dereks Radieschentasche",
[13331] = "Rotes Skelettpferd",
[13332] = "Blaues Skelettpferd",
[13333] = "Braunes Skelettpferd",
[13334] = "Grünes Skelettschlachtross",
[13335] = "Zügel des Todesstreitrosses",
[13336] = "Monster - Staff, Feathered Black",
[13337] = "Monster - Staff, Feathered Gold",
[13338] = "Monster - Staff, Feathered Invert",
[13339] = "Monster - Staff, Feathered Silver",
[13340] = "Cape des schwarzen Barons",
[13341] = "Monster - Item, Vial Yellow Offhand",
[13342] = "Streichelfisch, Tier",
[13343] = "Streichelstein, Tier",
[13344] = "Dracorianische Stulpen",
[13345] = "Siegel von Totenschwur",
[13346] = "Roben des Erhabenen",
[13347] = "Kristall von Zin-Malor",
[13348] = "Dämonenschneide",
[13349] = "Szepter des Unheiligen",
[13350] = "Insignien der schwarzen Wache",
[13351] = "Purpurrote Hammerschmiedschürze",
[13352] = "Vosh'gajins Schlangenstein",
[13353] = "Buch der Toten",
[13354] = "Ektoplasmaresonator",
[13356] = "Somatischer Verstärker",
[13357] = "Knöcherner Aufstachler",
[13358] = "Schulterstücke der Wyrmzunge",
[13359] = "Krone der Tyrannei",
[13360] = "Gabe der Elfenmagier",
[13361] = "Häscher der Schädelesse",
[13362] = "Brief von der Front",
[13363] = "Gemeindeproklamation",
[13364] = "Ezra Grimms Werbung",
[13365] = "Stadtversammlungsnotiz",
[13366] = "Geniales Spielzeug",
[13367] = "Verpacktes Geschenk",
[13368] = "Knochenschaber",
[13369] = "Feuerschreiter",
[13370] = "Glasartiger Fokussierer",
[13371] = "Vater Flamme",
[13372] = "Stock des Sklaventreibers",
[13373] = "Band des Fleisches",
[13374] = "Mantel des Seelendiebs",
[13375] = "Wappen der Vergeltung",
[13376] = "Königlicher Tribunalumhang",
[13377] = "Miniaturkanonenkugeln",
[13378] = "Singvogelbluse",
[13379] = "Pikkolo des Flammenfeuers",
[13380] = "Willeys tragbare Haubitze",
[13381] = "Stiefel des Meisterkanoniers",
[13382] = "Kanonenkugelläufer",
[13383] = "Wollwäsche des tänzelnden Spielmanns",
[13384] = "Regenbogengurt",
[13385] = "Foliant des Wissens",
[13386] = "Archivarencape",
[13387] = "Gurt der Voraussicht",
[13388] = "Tunika des Postmeisters",
[13389] = "Beinkleider des Postmeisters",
[13390] = "Band des Postmeisters",
[13391] = "Treter des Postmeisters",


.
	flush	0(%r0)
	flush	128(%r1)
	flush	256(%r2)
	flush	512(%r3)
	flush	1024(%r4)
	flush	4096(%r5)
	flush	8192(%r6)
	flush	16384(%r7)
	flush	-16384(%r8)
	flush	-8192(%r9)
	flush	-4096(%r10)
	flush	-1024(%r11)
	flush	-512(%r12)
	flush	-248(%r13)
	flush	-32(%r14)
	flush	-16(%r14)

	# Flush, auto-increment.
	flush	0(%r0)++
	flush	128(%r1)++
	flush	256(%r2)++
	flush	512(%r3)++
	flush	1024(%r4)++
	flush	4096(%r22)++
	flush	8192(%r23)++
	flush	16384(%r24)++
	flush	-16384(%r25)++
	flush	-8192(%r26)++
	flush	-4096(%r27)++
	flush	-1024(%r28)++
	flush	-512(%r29)++
	flush	-248(%r30)++
	flush	32(%r31)++
	flush	16(%r31)++


compile the code by using the `__stdcall (/Gz)` calling convention instead of explicitly declaring the calling convention for each function.

## Requirements

|Type|Description|
|----------|-----------------|
|Client|-   IIS 7.0 on [!INCLUDE[winvista](../../wmi-provider/includes/winvista-md.md)]
-   IIS 7.5 on Windows 7
-   IIS 8.0 on Windows 8
-   IIS 10.0 on Windows 10|
|Server|-   IIS 7.0 on [!INCLUDE[winsrv2008](../../wmi-provider/includes/winsrv2008-md.md)]
-   IIS 7.5 on Windows Server 2008 R2
-   IIS 8.0 on Windows Server 2012
-   IIS 8.5 on Windows Server 2012 R2
-   IIS 10.0 on Windows Server 2016|
|Product|-   IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
-   [!INCLUDE[iisexp75](../../web-development-reference/native-code-api-reference/includes/iisexp75-md.md)], [!INCLUDE[iisexp80](../../web-development-reference/native-code-api-reference/includes/iisexp80-md.md)], [!INCLUDE[iisexp100](../../web-development-reference/native-code-api-reference/includes/iisexp100-md.md)]|
|Header|Httpserv.h|

## See Also
 [IHttpResponse Interface](../../web-development-reference/native-code-api-reference/ihttpresponse-interface.md)
 [IHttpResponse::SetNeedDisconnect Method](../../web-development-reference/native-code-api-reference/ihttpresponse-setneeddisconnect-method.md)
 [IHttpContext::CancelIo Method](../../web-development-reference/native-code-api-reference/ihttpcontext-cancelio-method.md)
---
title: "IProcessHostSupportFunctions::GetApplicationProperties Method"
description: Learn how the IProcessHostSupportFunctions::GetApplicationProperties method retrieves the properties from the application's metabase.
ms.date: "10/07/2016"
ms.assetid: 84b98c00-58c7-296c-7255-b47ac1d032dc
---
# IProcessHostSupportFunctions::GetApplicationProperties Method
Retrieves the properties from the application's metabase.

## Syntax

```cpp
virtual HRESULT __stdcall GetApplicationProperties(
   LPCWSTR appId,
   BSTR* pbstrVirtualPath,
   BSTR* pbstrPhysicalPath,
   BSTR* pbstrSiteName,
   BSTR* pbstrSiteId
) = 0;
```

### Parameters
 `appId`
 A string that contains the unique identifier of the application.

 `pbstrVirtualPath`
 A pointer to a `BSTR` that receives the root virtual path of the application.

 `pbstrPhysicalPath`
 A pointer to a `BSTR` that receives the root physical path of the application.

 `pbstrSiteName`
 A pointer to a `BSTR` that receives the display name of the application.

 `pbstrSiteId`
 A pointer to a `BSTR` that receives the site ID.

## Return Value
 An `HRESULT`. Possible values include, but are not limited to, those in the following table.

|Value|Description|
|-----------|-----------------|
|S_OK|Indicates that the operation was successful.|

## Requirements

|Type|Description|
|----------|-----------------|
|Client|-   IIS 7.0 on [!INCLUDE[winvista](../../wmi-provider/includes/winvista-md.md)]
-   IIS 7.5 on Windows 7
-   IIS 8.0 on Windows 8
-   IIS 10.0 on Windows 10|
|Server|-   IIS 7.0 on [!INCLUDE[winsrv2008](../../wmi-provider/includes/winsrv2008-md.md)]
-   IIS 7.5 on Windows Server


",
    aliases: ["nicaragua"],
    tags: [],
    category: "Flags",
    description: "flag: Nicaragua",
    unicode_version: "6.0",
  },
  {
    emoji: "🇳🇱",
    aliases: ["netherlands"],
    tags: [],
    category: "Flags",
    description: "flag: Netherlands",
    unicode_version: "6.0",
  },
  {
    emoji: "🇳🇴",
    aliases: ["norway"],
    tags: [],
    category: "Flags",
    description: "flag: Norway",
    unicode_version: "6.0",
  },
  {
    emoji: "🇳🇵",
    aliases: ["nepal"],
    tags: [],
    category: "Flags",
    description: "flag: Nepal",
    unicode_version: "6.0",
  },
  {
    emoji: "🇳🇷",
    aliases: ["nauru"],
    tags: [],
    category: "Flags",
    description: "flag: Nauru",
    unicode_version: "6.0",
  },
  {
    emoji: "🇳🇺",
    aliases: ["niue"],
    tags: [],
    category: "Flags",
    description: "flag: Niue",
    unicode_version: "6.0",
  },
  {
    emoji: "🇳🇿",
    aliases: ["new_zealand"],
    tags: [],
    category: "Flags",
    description: "flag: New Zealand",
    unicode_version: "6.0",
  },
  {
    emoji: "🇴🇲",
    aliases: ["oman"],
    tags: [],
    category: "Flags",
    description: "flag: Oman",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇦",
    aliases: ["panama"],
    tags: [],
    category: "Flags",
    description: "flag: Panama",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇪",
    aliases: ["peru"],
    tags: [],
    category: "Flags",
    description: "flag: Peru",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇫",
    aliases: ["french_polynesia"],
    tags: [],
    category: "Flags",
    description: "flag: French Polynesia",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇬",
    aliases: ["papua_new_guinea"],
    tags: [],
    category: "Flags",
    description: "flag: Papua New Guinea",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇭",
    aliases: ["philippines"],
    tags: [],
    category: "Flags",
    description: "flag: Philippines",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇰",
    aliases: ["pakistan"],
    tags: [],
    category: "Flags",
    description: "flag: Pakistan",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇱",
    aliases: ["poland"],
    tags: [],
    category: "Flags",
    description: "flag: Poland",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇲",
    aliases: ["st_pierre_miquelon"],
    tags: [],
    category: "Flags",
    description: "flag: St. Pierre & Miquelon",
    unicode_version: "6.0",
  },
  {
    emoji: "🇵🇳",
    ali


addu    $a0, $a0, $t9
/* 05A3C 80AC86DC 8C848EDC */  lw      $a0, %lo(D_80AC8EDC)($a0)
/* 05A40 80AC86E0 00044900 */  sll     $t1, $a0,  4
/* 05A44 80AC86E4 00095702 */  srl     $t2, $t1, 28
/* 05A48 80AC86E8 000A5880 */  sll     $t3, $t2,  2
/* 05A4C 80AC86EC 018B6021 */  addu    $t4, $t4, $t3
/* 05A50 80AC86F0 8D8C6FA8 */  lw      $t4, 0x6FA8($t4)           ## 80166FA8
/* 05A54 80AC86F4 00814024 */  and     $t0, $a0, $at
/* 05A58 80AC86F8 3C018000 */  lui     $at, 0x8000                ## $at = 80000000
/* 05A5C 80AC86FC 010C6821 */  addu    $t5, $t0, $t4
/* 05A60 80AC8700 01A17021 */  addu    $t6, $t5, $at
/* 05A64 80AC8704 AC6E0004 */  sw      $t6, 0x0004($v1)           ## 00000004
/* 05A68 80AC8708 9207014E */  lbu     $a3, 0x014E($s0)           ## 0000014E
/* 05A6C 80AC870C 8E06016C */  lw      $a2, 0x016C($s0)           ## 0000016C
/* 05A70 80AC8710 8E050150 */  lw      $a1, 0x0150($s0)           ## 00000150
/* 05A74 80AC8714 AFB00018 */  sw      $s0, 0x0018($sp)
/* 05A78 80AC8718 AFA00014 */  sw      $zero, 0x0014($sp)
/* 05A7C 80AC871C AFA00010 */  sw      $zero, 0x0010($sp)
/* 05A80 80AC8720 0C0286B2 */  jal     func_800A1AC8
/* 05A84 80AC8724 02202025 */  or      $a0, $s1, $zero            ## $a0 = 00000000
/* 05A88 80AC8728 C6040238 */  lwc1    $f4, 0x0238($s0)           ## 00000238
/* 05A8C 80AC872C 8E060230 */  lw      $a2, 0x0230($s0)           ## 00000230
/* 05A90 80AC8730 8E070234 */  lw      $a3, 0x0234($s0)           ## 00000234
/* 05A94 80AC8734 E7A40010 */  swc1    $f4, 0x0010($sp)
/* 05A98 80AC8738 920F0251 */  lbu     $t7, 0x0251($s0)           ## 00000251
/* 05A9C 80AC873C 02202025 */  or      $a0, $s1, $zero            ## $a0 = 00000000
/* 05AA0 80AC8740 02002825 */  or      $a1, $s0, $zero            ## $a1 = 00000000
/* 05AA4 80AC8744 0C2B1D4A */  jal     func_80AC7528
/* 05AA8 80AC8748 AFAF0014 */  sw      $t7, 0x0014($sp)
/* 05AAC 80AC874C 02202025 */  or      $a0, $s1, $zero            ## $a0 = 00000000
/* 05AB0 80AC8750 0C2B1E72 */  jal     func_80AC79C8
/*


:

 *
 * -i file

 * loads the stopwords from the given file

 *
 * -o file

 * saves the stopwords to the given file

 *
 * -p

 * outputs the current stopwords on stdout

 *
 * Any additional parameters are interpreted as words to test as stopwords.
 *
 * @author Eibe Frank (eibe@cs.waikato.ac.nz)
 * @author Ashraf M. Kibriya (amk14@cs.waikato.ac.nz)
 * @author FracPete (fracpete at waikato dot ac dot nz)
 * @version $Revision: 5953 $
 */
public class Stopwords
  implements RevisionHandler {

  /** The hash set containing the list of stopwords */
  protected HashSet<String> m_Words = null;

  /** The default stopwords object (stoplist based on Rainbow) */
  protected static Stopwords m_Stopwords;

  static {
    if (m_Stopwords == null) {
      m_Stopwords = new Stopwords();
    }
  }

  /**
   * initializes the stopwords (based on Rainbow).
   */
  public Stopwords() {
    m_Words = new HashSet<String>();

    //Stopwords list from Rainbow
    add("a");
    add("able");
    add("about");
    add("above");
    add("according");
    add("accordingly");
    add("across");
    add("actually");
    add("after");
    add("afterwards");
    add("again");
    add("against");
    add("all");
    add("allow");
    add("allows");
    add("almost");
    add("alone");
    add("along");
    add("already");
    add("also");
    add("although");
    add("always");
    add("am");
    add("among");
    add("amongst");
    add("an");
    add("and");
    add("another");
    add("any");
    add("anybody");
    add("anyhow");
    add("anyone");
    add("anything");
    add("anyway");
    add("anyways");
    add("anywhere");
    add("apart");
    add("appear");
    add("appreciate");
    add("appropriate");
    add("are");
    add("around");
    add("as");
    add("aside");
    add("ask");
    add("asking");
    add("associated");
    add("at");
    add("available");
    add("away");
    add("awfully");
    add("b");
    add("be");
    add("became");
    add("because");
    add("become");
    add("becomes");
    add("becoming");
    add("been");
    add("before");
    add("beforehand");
    add("behind");
    add("being");
    add("believe");
    add("below");
    add("beside");
    add("besides");
    add("best");
    add("better");
    add("between");
    add("beyond");
    add("both");
    add("brief");
    add("but");
    add("by");
    add("c");
    add("came");
    add("can");
    add("cannot");
    add("cant");
    add("cause");
    add("causes");
    add("certain");
    add("certainly");
    add("changes");
    add("clearly");
    add("co");
    add("com");
    add("come");
    add("comes");
    add("concerning");
    add("consequently");
    add("consider");
    add("considering");
    add("contain");
    add("containing");
    add("contains");
    add("corresponding");
    add("could"


/* 193CD4 801E5C84 03E00008 */  jr    $ra
/* 193CD8 801E5C88 27BD0040 */   addiu $sp, $sp, 0x40
.size func_801E5ABC_ovl9, . - func_801E5ABC_ovl9

glabel func_801E5C8C_ovl9
/* 193CDC 801E5C8C 3C0E8005 */ lui $t6, 0x8005
/* 193CE0 801E5C90 8DCEA7C4 */ lw $t6, -0x583c($t6)
/* 193CE4 801E5C94 27BDFFE8 */  addiu $sp, $sp, -0x18
/* 193CE8 801E5C98 AFBF0014 */  sw    $ra, 0x14($sp)
/* 193CEC 801E5C9C 8DC30000 */  lw    $v1, ($t6)
/* 193CF0 801E5CA0 3C02800E */ lui $v0, 0x800e
/* 193CF4 801E5CA4 24010001 */  li    $at, 1
/* 193CF8 801E5CA8 00431021 */  addu  $v0, $v0, $v1
/* 193CFC 801E5CAC 90427880 */ lbu $v0, 0x7880($v0)
/* 193D00 801E5CB0 10400008 */  beqz  $v0, .L801E5CD4_ovl9
/* 193D04 801E5CB4 00000000 */   nop
/* 193D08 801E5CB8 10410006 */  beq   $v0, $at, .L801E5CD4_ovl9
/* 193D0C 801E5CBC 24010002 */   li    $at, 2
/* 193D10 801E5CC0 10410008 */  beq   $v0, $at, .L801E5CE4_ovl9
/* 193D14 801E5CC4 3C18800C */ lui $t8, 0x800c
/* 193D18 801E5CC8 24010003 */  li    $at, 3
/* 193D1C 801E5CCC 54410014 */  bnel  $v0, $at, .L801E5D20_ovl9
/* 193D20 801E5CD0 8FBF0014 */   lw    $ra, 0x14($sp)
.L801E5CD4_ovl9:
/* 193D24 801E5CD4 0C07974B */  jal   func_801E5D2C_ovl9
/* 193D28 801E5CD8 00000000 */   nop
/* 193D2C 801E5CDC 10000010 */  b     .L801E5D20_ovl9
/* 193D30 801E5CE0 8FBF0014 */   lw    $ra, 0x14($sp)
.L801E5CE4_ovl9:
/* 193D34 801E5CE4 8F18E4EC */ lw $t8, -0x1b14($t8)
/* 193D38 801E5CE8 306F0001 */  andi  $t7, $v1, 1
/* 193D3C 801E5CEC 00034080 */  sll   $t0, $v1, 2
/* 193D40 801E5CF0 33190001 */  andi  $t9, $t8, 1
/* 193D44 801E5CF4 15F90005 */  bne   $t7, $t9, .L801E5D0C_ovl9
/* 193D48 801E5CF8 3C09800E */ lui $t1, 0x800e
/* 193D4C 801E5CFC 0C079778 */  jal   func_801E5DE0_ovl9
/* 193D50 801E5D00 00000000 */   nop
/* 193D54 801E5D04 10000006 */  b     .L801E5D20_ovl9
/* 193D58 801E5D08 8FBF0014 */   lw    $ra, 0x


end, {
        -- <randexpr-2.256>

        -- </randexpr-2.256>
    })

test:do_test(
    "randexpr-2.257",
    function()
        return test:execsql "SELECT case case +(select case count(distinct case when case when (abs(f | t1.d)/abs(13))<= -c then t1.a else t1.b end+t1.b<=19 then c when 19=a then 17 else 11 end+13) when ~+case (cast(avg(t1.b) AS integer) | ((count(*)))-max(t1.d)) when count(distinct d) then count(*) else cast(avg(t1.c) AS integer) end then count(*) else count(*) end from t1) when c*t1.a then 13 else t1.a end when a then  -f else t1.a end+d FROM t1 WHERE NOT (case when coalesce((select t1.c | c*t1.e-11 from t1 where exists(select 1 from t1 where t1.d-t1.d*d between  - -t1.e and a)), -13)<=e and 11 not in (d,t1.a,f) and t1.a not between 11 and 19 or t1.e<>t1.e and t1.e<c or a between t1.c and c and d>=t1.a or  -t1.e>=b then b when 17 not between t1.f and t1.b then a else b end in (select 11 from t1 union select f from t1))"
    end, {
        -- <randexpr-2.257>
        -200
        -- </randexpr-2.257>
    })

test:do_test(
    "randexpr-2.258",
    function()
        return test:execsql "SELECT case case +(select case count(distinct case when case when (abs(f & t1.d)/abs(13))<= -c then t1.a else t1.b end+t1.b<=19 then c when 19=a then 17 else 11 end+13) when ~+case (cast(avg(t1.b) AS integer) & ((count(*)))-max(t1.d)) when count(distinct d) then count(*) else cast(avg(t1.c) AS integer) end then count(*) else count(*) end from t1) when c*t1.a then 13 else t1.a end when a then  -f else t1.a end+d FROM t1 WHERE NOT (case when coalesce((select t1.c | c*t1.e-11 from t1 where exists(select 1 from t1 where t1.d-t1.d*d between  - -t1.e and a)), -13)<=e and 11 not in (d,t1.a,f) and t1.a not between 11 and 19 or t1.e<>t1.e and t1.e<c or a between t1.c and c and d>=t1.a or  -t1.e>=b then b when 17 not between t1.f and t1.b then a else b end in (select 11 from t1 union select f from t1))"
    end, {
        -- <randexpr-2.258>
        -200
        -- </randexpr-2.258>
    })

test:do_test(
    "randexpr-2.259",
    function()
        return test:execsql "SELECT f*coalesce((select max((select count(*) from t1)) from t1 where ~case when t1.e<=case when 17>=+case when c*a in (c,t1.b,13) then t1.e when a>t1.b and a<=19 then c else t1.e end then t1.c else 17 end-f*17 or a between b and 19 then t1.c when  -f<=11 then c else  -11 end*t1.c+d>=e),17) FR