{
					-0.361,
					0.936,
					0
				}
			},
			vicegun = {
				{
					-0.444,
					0.966,
					0
				}
			},
			torpedo = {
				{
					0.299,
					0.047,
					0
				}
			}
		},
		smoke = {
			{
				50,
				{
					{
						"smoke",
						{
							-0.6,
							2.31,
							0
						}
					}
				}
			}
		}
	},
	[101401] = {
		name = "Sunday Aquarium Visit",
		ship_group = 10140,
		group_index = 1,
		illustrator2 = -1,
		desc = "So this is an aquarium... What a novel experience! Oh, also, I won't be your guide today as it's your turn to escort me around, Commander. Please don't get us lost, okay? Ehehe~",
		bullet_skin_secondary = "",
		bullet_skin_main = "",
		painting = "aierwen_2",
		no_showing = "0",
		air_bullet_skin = "",
		bg_sp = "1102",
		shop_type_id = 9,
		l2d_ignore_drag = 0,
		lip_smoothing = 0,
		l2d_animations = "",
		hand_id = 5,
		bgm = "",
		bg = "",
		spine_offset = "",
		special_effects = "",
		skin_type = 0,
		id = 101401,
		voice_actor_2 = -1,
		air_torpedo_skin = "",
		prefab = "aierwen_2",
		l2d_se = "",
		aircraft_skin = "",
		main_UI_FX = "",
		shop_id = 70208,
		voice_actor = 198,
		air_bomb_skin = "",
		illustrator = -1,
		rarity_bg = "",
		time = "",
		l2d_para_range = "",
		lip_sync_gain = 0,
		show_skin = "stand",
		l2d_voice_calibrate = "",
		tag = {},
		live2d_offset = {
			0,
			0,
			0
		},
		fx_container = {
			{
				0,
				1.99185,
				1.15
			},
			{
				0,
				0,
				0
			},
			{
				0,
				0.75,
				-1.299
			},
			{
				0,
				0,
				0
			}
		},
		bound_bone = {
			cannon = {
				{
					0.915,
					1.034,
					0
				}
			},
			vicegun = {
				{
					0.9,
					1.021,
					0
				}
			},
			torpedo = {
				{
					0.149,
					0.047,
					0
				}
			}
		},
		smoke = {
			{
				50,
				{
					{
						"smoke",
						{
							-0.6,
							2.31,
							0
						}
					}
				}
			}
		}
	},
	[101410] = {
		name = "Stanly",
		ship_group = 10141,
		group_index = 0,
		illustrator2 = -1,
		desc = "Fletcher-class destroyer - Stanly , Hull Number DD-478.",
		bullet_skin_secondary = "",
		bullet_skin_main = "",
		painting = "sitanli",
		no_showing = "0",
		air_bullet_skin = "",
		bg_sp = "",
		shop_type_id = 0,
		l2d_ignore_drag = 0,
		lip_sm


 depth ` + string(order) + `, id`
	return executeHierarchyQueryAndParse(ctx, client, query, args)
}

func getHierarchyOus(ctx context.Context, client *ent.Client, order sqlSortOrder, tenantID *string, ouIDs []int) (
	[]*treeNode,
	error,
) {
	var args []interface{}
	offset := 0
	// Optional tenantID matching clause. Needs to be optional because this function is used also in case of filters and lists.
	tenantIDAndClause := ""
	whereTenantIDClause := ""
	if tenantID != nil {
		// The first arg is always tenantID.
		offset = 1
		args = append(args, *tenantID)
		tenantIDAndClause = tenantIDAnd
		whereTenantIDClause = whereTenantID
	}
	// TODO: how much expensive is this clause? If we have to plot all trees, it would be more efficient maybe to traverse
	//  trees root to leaves.
	// By default start from any of the leaf OUs (a leaf OU is a OU that has no parent that links to it).
	whereClause := "WHERE " + tenantIDAndClause + " ID NOT IN (" +
		"SELECT DISTINCT ou_resource_parent_ou FROM ou_resources " +
		"WHERE " + tenantIDAndClause + "ou_resource_parent_ou IS NOT NULL)"
	if len(ouIDs) > 0 {
		otherArgs, placeholders := getSQLPlaceholdersAndArgs(ouIDs, offset)
		args = append(args, otherArgs...)
		whereClause = "WHERE " + tenantIDAndClause + " ID IN (" + placeholders + ")"
	}
	// The query starts from the target leaf edges (the given OU IDs) or from any leaf OUs.
	// From there it builds the whole hierarchy recursively increasing the depth one level by one level.
	// We also collect metadata while traversing the trees.
	// Duplicates (if any) are removed, and the result is ordered by depth.
	// The output of the query is driven by the requirement of the executeHierarchyQueryAndParse function
	// and will contain one per line, root to leaf (ordered desc by depth) all the nodes of the required subtrees.
	query := `
	WITH RECURSIVE ou_hierarchy AS (
		SELECT ID AS id, ou_resource_parent_ou AS parent_id, 0 AS depth, metadata AS meta
		FROM ou_resources
		` + whereClause + `
		UNION ALL
		SELECT o.ID AS id, o.ou_resource_parent_ou AS parent_id, oh.depth+1 AS depth, o.metadata AS meta
		FROM ou_resources AS o JOIN ou_hierarchy AS oh ON oh.parent_id=o.ID
		` + whereTenantIDClause + `
	)
	SELECT DISTINCT id, NULL AS name, NULL AS reg_parent_id, parent_id AS ou_parent_id, NULL AS site_parent_id, meta, depth, ` +
		`'` + string(util.ResourcePrefixOu) + `' AS type
	FROM ou_hierarchy
	ORDER BY depth ` + string(order) + `, id`
	return executeHierarchyQueryAndParse(ctx, client, query, args)
}

func getHierarchySites(ctx context.Context, client *ent.Client, order sqlSortOrder, tenantID *string, siteIDs []int) (
	[]*treeNode,
	error,
) {
	var args []interface{}
	offset := 0
	// Optional tenantID matching clause. Needs to be optional because this function is used also in case of filters and lists.
	tenantIDAndClause := ""
	whereTenantIDClause := ""
	if tenantID != nil {
		// The first arg is always tenantID.
		offset = 1
		args = append(args, *tenantID)
		tenantIDAndClause = tenantIDAnd
		whereTenantIDClause = whereTenantID
	}
	// TODO: how much expensive is this clause? We maybe be returning the whole tree!
	// By default start from any


	UMINUS // x UMINUS -x
	TILDE  // x TILDE ~x

	NONE      // - NONE None
	TRUE      // - TRUE True
	FALSE     // - FALSE False
	MANDATORY // - MANDATORY Mandatory	     [sentinel value for required kwonly args]

	ITERPUSH     //       iterable ITERPUSH     -  [pushes the iterator stack]
	ITERPOP      //              - ITERPOP      -    [pops the iterator stack]
	NOT          //          value NOT          bool
	RETURN       //          value RETURN       -
	SETINDEX     //        a i new SETINDEX     -
	INDEX        //            a i INDEX        elem
	SETDICT      // dict key value SETDICT      -
	SETDICTUNIQ  // dict key value SETDICTUNIQ  -
	APPEND       //      list elem APPEND       -
	SLICE        //   x lo hi step SLICE        slice
	INPLACE_ADD  //            x y INPLACE_ADD  z      where z is x+y or x.extend(y)
	INPLACE_PIPE //            x y INPLACE_PIPE z      where z is x|y
	MAKEDICT     //              - MAKEDICT     dict

	// --- opcodes with an argument must go below this line ---

	// control flow
	JMP     //            - JMP<addr>     -
	CJMP    //         cond CJMP<addr>    -
	ITERJMP //            - ITERJMP<addr> elem   (and fall through) [acts on topmost iterator]
	//       or:          - ITERJMP<addr> -      (and jump)

	CONSTANT     //                 - CONSTANT<constant>  value
	MAKETUPLE    //         x1 ... xn MAKETUPLE<n>        tuple
	MAKELIST     //         x1 ... xn MAKELIST<n>         list
	MAKEFUNC     // defaults+freevars MAKEFUNC<func>      fn
	LOAD         //   from1 ... fromN module LOAD<n>      v1 ... vN
	SETLOCAL     //             value SETLOCAL<local>     -
	SETGLOBAL    //             value SETGLOBAL<global>   -
	LOCAL        //                 - LOCAL<local>        value
	FREE         //                 - FREE<freevar>       cell
	FREECELL     //                 - FREECELL<freevar>   value       (content of FREE cell)
	LOCALCELL    //                 - LOCALCELL<local>    value       (content of LOCAL cell)
	SETLOCALCELL //             value SETLOCALCELL<local> -           (set content of LOCAL cell)
	GLOBAL       //                 - GLOBAL<global>      value
	PREDECLARED  //                 - PREDECLARED<name>   value
	UNIVERSAL    //                 - UNIVERSAL<name>     value
	ATTR         //                 x ATTR<name>          y           y = x.name
	SETFIELD     //               x y SETFIELD<name>      -           x.name = y
	UNPACK       //          iterable UNPACK<n>           vn ... v1

	// n>>8 is #positional args and n&0xff is #named args (pairs).
	CALL        // fn positional named                CALL<n>        result
	CALL_VAR    // fn positional named *args          CALL_VAR<n>    result
	CALL_KW     // fn positional named       **kwargs CALL_KW<n>     result
	CALL_VAR_KW // fn positional named *args **kwargs CALL


cloop:
    ;decrement quotient mantissa byte
    lda     #0
    sbc     _digit
    ldx     _index
downloop:
    adc     fr2+8,x
    sta     fr2+8,x
    lda     #$99
    dex
    bcc     downloop

    ;add mantissas
    clc
    .rept 6
        lda     fr0+(5-#)
        adc     fr1+(5-#)
        sta     fr0+(5-#)
    .endr

    ;keep going until we overflow
    bcc     incloop

nextdigit:
    ;shift dividend (make sure to save carry state)
    php
    ldx     #4
bitloop:
    asl     fr0+5
    rol     fr0+4
    rol     fr0+3
    rol     fr0+2
    rol     fr0+1
    rol     fr0
    dex
    bne     bitloop
    plp

    ;next digit
    lda     _digit
    eor     #$09
    sta     _digit
    beq     digitloop

    ;next quo byte
    inc     _index
    bne     digitloop

    ;move back to fr0
    jsr     fp_fdiv_complete
    cld
ok:
    clc
    rts
err:
    sec
    rts
.endp

;==========================================================================
; SKPSPC [DBA1] Increment CIX while INBUFF[CIX] is a space
        fixadr  $dba1
skpspc:
    lda     #' '
    ldy     cix
fp_skipchar:
skpspc_loop:
    cmp     (inbuff),y
    bne     skpspc_xit
    iny
    bne     skpspc_loop
skpspc_xit:
    sty     cix
    rts

;==========================================================================
; ISDIGT [DBAF] Check if INBUFF[CIX] is a digit (UNDOCUMENTED)
        fixadr  $dbaf
isdigt = _isdigt
.proc _isdigt
    ldy     cix
.def :fp_isdigit_y = *
    lda     (inbuff),y
    sec
    sbc     #'0'
    cmp     #10
    rts
.endp

;==========================================================================
.proc fp_fdiv_decloop
decloop:
    ;increment quotient mantissa byte
    lda     fdiv._digit
    ldx     fdiv._index
uploop:
    adc     fr2+8,x
    sta     fr2+8,x
    lda     #0
    dex
    bcs     uploop

    ;subtract mantissas
    sec
    .rept 5
        lda     fr0+(5-#)
        sbc     fr1+(5-#)
        sta     fr0+(5-#)
    .endr
    lda     fr0
    sbc     #0
    sta     fr0

    ;keep going until we underflow
    bcs     decloop
    rts
.endp

;==========================================================================
.proc fp_swap           ;$0E bytes
    ldx     #5
swaploop:
    lda     fr0,x
    ldy     fr1,x
    sta     fr1,x
    sty     fr0,x
    dex
    bpl     swaploop
    rts
.endp

;==========================================================================
; NORMALIZE [DC00]  Normalize FR0 (UNDOCUMENTED)
        fixadr  $dc00-1
fp_normalize_cld:
    cld
    ckaddr  $dc00
fp_normalize:
.nowarn .proc normalize
    ldy     #5
normloop:
    lda     fr0
    and     #$7f
    beq     underflow2

    ldx     fr0+1
    beq     need_norm

    ;Okay, we're done normalizing... check if the exponent is in bounds.
    ;It needs to be within


,		/* PSE_GBE1_RGMII_TXCLK */
	PAD_CFG_NF(GPP_A16, NONE, DEEP, NF1),		/* PSE_GBE1_RGMII_TXCTL */
	PAD_CFG_NF(GPP_A17, NONE, DEEP, NF1),		/* PSE_GBE1_RGMII_RXCLK */
	PAD_CFG_NF(GPP_A18, NONE, DEEP, NF1),		/* PSE_GBE1_RGMII_RXCTL */
	PAD_CFG_NF(GPP_A19, NONE, DEEP, NF1),		/* PSE_GBE1_RGMII_RXD3 */
	PAD_CFG_NF(GPP_A20, NONE, DEEP, NF1),		/* PSE_GBE1_RGMII_RXD2 */
	PAD_CFG_NF(GPP_A21, NONE, DEEP, NF1),		/* PSE_GBE1_RGMII_RXD1 */
	PAD_CFG_NF(GPP_A22, NONE, DEEP, NF1),		/* PSE_GBE1_RGMII_RXD0 */
	PAD_CFG_NF(GPP_A23, NONE, DEEP, NF1),		/* PSE_GBE0_RGMII_RXCTL */

	/* Community 4 - GpioGroup GPP_C */
	PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1),		/* PSE_GBE0_MDC */
	PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1),		/* PSE_GBE0_MDIO */
	PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1),		/* PSE_GBE1_MDC */
	PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1),		/* PSE_GBE1_MDIO */
	PAD_NC(GPP_C8, NONE),				/* Not connected */
	PAD_CFG_NF(GPP_C12, NONE, DEEP, NF4),		/* SIO_UART1_RXD */
	PAD_CFG_NF(GPP_C13, NONE, DEEP, NF4),		/* SIO_UART1_TXD */
	PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1),		/* GBE_MDIO */
	PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1),		/* GBE_MDC */

	/* Community 4 - GpioGroup GPP_F */
	PAD_NC(GPP_F1, NONE),				/* Not connected */
	PAD_NC(GPP_F3, NONE),				/* Not connected */
	PAD_NC(GPP_F8, NONE),				/* Not connected */
	PAD_NC(GPP_F11, NONE),				/* Not connected */
	PAD_NC(GPP_F12, NONE),				/* Not connected */
	PAD_NC(GPP_F13, NONE),				/* Not connected */
	PAD_NC(GPP_F14, NONE),				/* Not connected */
	PAD_NC(GPP_F15, NONE),				/* Not connected */
	PAD_NC(GPP_F16, NONE),				/* Not connected */
	PAD_NC(GPP_F17, NONE),				/* Not connected */
	PAD_CFG_GPO(GPP_F20, 0, DEEP),			/* LED_BIOS_DONE */

	/* Community 4 - GpioGroup GPP_E */
	PAD_CFG_NF(GPP_E0, NONE, DEEP, NF1),		/* SATA_LED_N */
	PAD_CFG_NF(GPP_E8, NONE, DEEP, NF2),		/* M.2_SSD_SATA_DEVSLP_1 */
	PAD_NC(GPP_E15, NONE),				/* Not connected */
	PAD_NC(GPP_E16, NONE),				/* Not connected */
	PAD_NC(GPP_E18, NONE),				/* Not connected */
	PAD_NC(GPP_E19, NONE),				/* Not connected */
	PAD_NC(GPP_E23, NONE),				/* Not connected */

	/* Community 5 - GpioGroup GPP_R */
	PAD_NC(GPP_R1, NONE),				/* Not connected */
	PAD_NC(GPP_R3, NONE),				/* Not connected */
};

/* Early pad configuration in bootblock */
static const struct pad_config early_gpio_table[] = {
};

const struct pad_config *variant_gpio_table(size_t *num)
{
	*num = ARRAY_SIZE(gpio_table);
	return gpio_table;
}

const struct pad_config *variant_early_gpio_table(size_t *num)
{
	*num = ARRAY_SIZE(early_gpio_table);
	return early_gpio_table;
}


/* 248790 80228080 A1D90021 */  sb    $t9, 0x21($t6)
.L80228084_ovl19:
/* 248794 80228084 3C018023 */  lui   $at, %hi(D_8022F944) # $at, 0x8023
/* 248798 80228088 C420F944 */  lwc1  $f0, %lo(D_8022F944)($at)
/* 24879C 8022808C 3C018023 */  lui   $at, %hi(D_8022F948) # $at, 0x8023
/* 2487A0 80228090 C42CF948 */  lwc1  $f12, %lo(D_8022F948)($at)
/* 2487A4 80228094 3C018013 */  lui   $at, %hi(D_8012E7D7) # $at, 0x8013
/* 2487A8 80228098 24180001 */  li    $t8, 1
/* 2487AC 8022809C A038E7D7 */  sb    $t8, %lo(D_8012E7D7)($at)
/* 2487B0 802280A0 8E230000 */  lw    $v1, ($s1)
/* 2487B4 802280A4 44801000 */  mtc1  $zero, $f2
/* 2487B8 802280A8 3C02800E */  lui   $v0, %hi(D_800E6690) # $v0, 0x800e
/* 2487BC 802280AC 8C6D0000 */  lw    $t5, ($v1)
/* 2487C0 802280B0 24426690 */  addiu $v0, %lo(D_800E6690) # addiu $v0, $v0, 0x6690
/* 2487C4 802280B4 3C01800E */ lui $at, %hi(D_800E64D0)
/* 2487C8 802280B8 000D7880 */  sll   $t7, $t5, 2
/* 2487CC 802280BC 004FC821 */  addu  $t9, $v0, $t7
/* 2487D0 802280C0 E7220000 */  swc1  $f2, ($t9)
/* 2487D4 802280C4 8C670000 */  lw    $a3, ($v1)
/* 2487D8 802280C8 3C09800E */  lui   $t1, %hi(D_800E3750) # $t1, 0x800e
/* 2487DC 802280CC 25293750 */  addiu $t1, %lo(D_800E3750) # addiu $t1, $t1, 0x3750
/* 2487E0 802280D0 00073880 */  sll   $a3, $a3, 2
/* 2487E4 802280D4 00477021 */  addu  $t6, $v0, $a3
/* 2487E8 802280D8 C5D00000 */  lwc1  $f16, ($t6)
/* 2487EC 802280DC 00270821 */  addu  $at, $at, $a3
/* 2487F0 802280E0 3C040002 */  lui   $a0, (0x00020064 >> 16) # lui $a0, 2
/* 2487F4 802280E4 E43064D0 */ swc1 $f16, %lo(D_800E64D0)($at)
/* 2487F8 802280E8 8C780000 */  lw    $t8, ($v1)
/* 2487FC 802280EC 3C01800E */ lui $at, %hi(D_800E6850)
/* 248800 802280F0 34840064 */  ori   $a0, (0x00020064 & 0xFFFF) # ori $a0, $a0, 0x64
/* 248804 802280F4 00186880 */  sll   $t5, $t8, 2
/* 248808 802280F8 002D0821 */  addu  $at


edistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package ru.inforion.lab403.elfloader2

import ru.inforion.lab403.common.extensions.*
import ru.inforion.lab403.common.logging.logger
import ru.inforion.lab403.common.logging.WARNING
import ru.inforion.lab403.elfloader2.enums.SectionHeaderNumber.*
import ru.inforion.lab403.elfloader2.enums.ElfSymbolTableBind.*
import ru.inforion.lab403.elfloader2.enums.ElfSymbolTableBind.Companion.elfSymbolTableBind
import ru.inforion.lab403.elfloader2.enums.ElfSymbolTableType.*
import ru.inforion.lab403.elfloader2.enums.ElfSymbolTableType.Companion.elfSymbolTableType
import ru.inforion.lab403.elfloader2.enums.SectionHeaderNumber.Companion.sectionHeaderNumber
import ru.inforion.lab403.elfloader2.exceptions.EBadSymbol

class ElfSymbol(
        val elfFile: ElfFile,
        val ind: Int,
        val stringTable: ElfStringTable,
        val st_name: UInt,
        var st_value: ULong,
        val st_size: ULong,
        val st_info: UByte,
        val st_other: UByte,
        val st_shndx_value: UShort
) {
    companion object {
        val log = logger(WARNING)

        fun IElfDataTypes.elfSymbol(
            elfFile: ElfFile,
            stringTable: ElfStringTable,
            ind: Int,
            offset: ULong,
            entrySize: ULong
        ): ElfSymbol {
            val pos = offset + ind.uint * entrySize
            position = pos.requireInt
            return when (this) {
                is ElfDataTypes32 -> ElfSymbol(
                    elfFile,
                    ind,
                    stringTable,
                    st_name = word,
                    st_value = addr,
                    st_size = wordpref,
                    st_info = byte,
                    st_other = byte,
                    st_shndx_value = half
                )
                is ElfDataTypes64 -> ElfSymbol(
                    elfFile,
                    ind,
                    stringTable,
                    st_name = word,
                    st_info = byte,
                    st_other = byte,
                    st_shndx_value = half,
                    st_value = addr,
                    st_size = wordpref
                )
                else -> throw NotImplementedError("Unknown ElfDataType: $this")
            }
        }
    }

    fun copy(elfFile: ElfFile = this.elfFile,
             ind: Int = this.ind,
             stringTable: ElfStringTable = this.stringTable,
             st_name: UInt = this.st_name,
             st_value: ULong = this.st_value,
             st_size: ULong = this.st_size,
             st_info: UByte = this.st_info,
             st_other: UByte = this.st_other,
             st_shndx_value: UShort = this.st_shndx_


 pasted content, nothing
			// should be modified as it most probably comes from Aloha and does
			// not need to be cleaned up.
			if ($content.find('.aloha-block').length) {
				return;
			}

			if (this.enabled) {
				removeFormatting($content, this.strippedElements);
			}

			return $content.html();
		}
	});

	return FormatlessPasteHandler;
});

define('formatlesspaste/nls/i18n',{
	"root":  {
		"button.formatlessPaste.tooltip": "Toggle Formatless Pasting"
	},
		"ca": true,
		"de": true,
		"mk": true,
		"pt-br": true,
		"ru": true,
		"uk": true,
		"zh-hans": true
});

/* formatlesspaste-plugin.js is part of Aloha Editor project http://aloha-editor.org
 *
 * Aloha Editor is a WYSIWYG HTML5 inline editing library and editor.
 * Copyright (c) 2010-2012 Gentics Software GmbH, Vienna, Austria.
 * Contributors http://aloha-editor.org/contribution.php
 *
 * Aloha Editor is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * Aloha Editor is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * As an additional permission to the GNU GPL version 2, you may distribute
 * non-source (e.g., minimized or compacted) forms of the Aloha-Editor
 * source code without the copy of the GNU GPL normally required,
 * provided you include this license notice and a URL through which
 * recipients can access the Corresponding Source.
 */
define('formatlesspaste/formatlesspaste-plugin',[
	'aloha/core',
	'aloha/plugin',
	'jquery',
	'ui/ui',
	'ui/toggleButton',
	'formatlesspaste/formatlesshandler',
	'aloha/contenthandlermanager',
	'i18n!formatlesspaste/nls/i18n'
], function (
	Aloha,
	Plugin,
	$,
	Ui,
	ToggleButton,
	FormatlessPasteHandler,
	ContentHandlerManager,
	i18n
) {

	/**
	 * Normalizes the given string value to either boolean true or false.
	 *
	 * @param {*} value The value which is to be normalized.
	 * @return {boolean} True if the value if truthy and not the string "false"
	 *                   or "0".
	 */
	function normalizeToBoolean(value) {
		if (!value) {
			return false;
		}
		if (typeof value === 'string') {
			return '0' !== value && 'false' !== value.toLowerCase();
		}
		return true;
	}

	function parseConfiguration(config) {
		var parsed = {};
		if (typeof config.formatlessPasteOption !== 'undefined') {
			parsed.formatlessPasteOption =
					normalizeToBoolean(config.formatlessPasteOption);
		}
		if (typeof config.strippedElements !== 'undefined') {
			parsed.strippedElements = config.strippedElements;
		}
		if (typeof config.button !== 'undefined') {
			parsed.button = normalizeToBoolean(config.button);
		}
		return parsed;
	}

	function applyConfiguration(obj, config) {
		$.extend(obj, config);
	}

	function registerFormatlessPasteHandler(plugin) {
		ContentHandlerManager.register('formatless', FormatlessPasteHandler);
		FormatlessPasteHandler.strippedElements = plugin.strippedElements;

		plugin._toggleFormatlessPasteButton =
			Ui.adopt('toggleFormatlessPaste', ToggleButton


def setEvalQuesType(self, quesId, quesType, acc):
    if quesType not in self.evalQuesType:
        self.evalQuesType[quesType] = {}
    self.evalQuesType[quesType][quesId] = round(100 * acc, self.n)


;
        int height = pPlane->GetHeight();
        int pitch = pPlane->GetHPitch();

        AMFByteArray andBits;
        AMFByteArray xorBits;

        andBits.SetSize(width / 8 * height);
        xorBits.SetSize(width / 8 * height);

        // For monochrome cursors, the xor masks is 1 bit per pixel
        for (int y = 0; y < height; ++y)
        {
            for (int x = 0; x < width; ++x)
            {
                amf_uint8* pixel = (amf_uint8*)pPlane->GetNative() + (y * pitch + x * 4);

                //amf_uint8 b = *pixel;
                //amf_uint8 g = *(pixel + 1);
                //amf_uint8 r = *(pixel + 2);
                amf_uint8 a = *(pixel + 3);

                if (a == 0)
                {
                    andBits[(x + y * width) / 8] |= 1 << (7 - x % 8);
                    xorBits[(x + y * width) / 8] |= 0 << (7 - x % 8);
                }
                else
                {
                    andBits[(x + y * width) / 8] |= 1 << (7 - x % 8);
                    xorBits[(x + y * width) / 8] |= 1 << (7 - x % 8);
                }
            }
        }

        HICON hic = CreateIcon(NULL, width, height, 1, 1, andBits.GetData(), xorBits.GetData());

        return hic;
    }

} // namespace ssdk::ctls

#endif // _WIN32
//
// Notice Regarding Standards.  AMD does not provide a license or sublicense to
// any Intellectual Property Rights relating to any standards, including but not
// limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4;
// AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3
// (collectively, the "Media Technologies"). For clarity, you will pay any
// royalties due for such third party technologies, which may include the Media
// Technologies that are owed as a result of AMD providing the Software to you.
//
// MIT license
//
//
// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
//
// 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.
//

#include "UVDDecoderHEVC.h"
#include "amf/public/include/components/VideoDecoderUVD.h"
#include "amf/public/common/TraceAdapter.h"

static constexpr const wchar_t* const AMF_FACILITY = L"ssdk::video::UVDDecoderHEVC";

namespace ssdk::video
{
    UVDDecoderHEVC::UVDDecoderHEVC(amf::AMFContext* context, size_t instance) :
        UVDDecoder(context, instance)
    {
    }
    AMF_RESULT UVDDecoderHEVC::Init(amf::AMF_SURFACE_FORMAT format, const AMFSize& resolution, float frameRate


class Solution:
  def backspaceCompare(self, s: str, t: str) -> bool:
    i = len(s) - 1  # s's index
    j = len(t) - 1  # t's index

    while True:
      # Delete chars of s if needed.
      backspace = 0
      while i >= 0 and (s[i] == '#' or backspace > 0):
        backspace += 1 if s[i] == '#' else -1
        i -= 1
      # Delete chars of t if needed.
      backspace = 0
      while j >= 0 and (t[j] == '#' or backspace > 0):
        backspace += 1 if t[j] == '#' else -1
        j -= 1
      if i >= 0 and j >= 0 and s[i] == t[j]:
        i -= 1
        j -= 1
      else:
        break

    return i == -1 and j == -1


#pragma once
/* power.h
 * routines for controlling the battery and charge data
 * RebbleOS
 *
 * Author: Barry Carter <barry.carter@gmail.com>
 */

#include "FreeRTOS.h"

/**
 * @brief Charging modes. Values 2 -> 6 are "charging"
 */
#define POWER_CHG_MODE_OFF              0
#define POWER_CHG_MODE_OVER_TEMP        1
#define POWER_CHG_MODE_PRE_CHG          2
#define POWER_CHG_MODE_FAST_CHG_CC      3
#define POWER_CHG_MODE_FAST_CHG_CV      4
#define POWER_CHG_MODE_MAINT_CHG        5
#define POWER_CHG_MODE_MAINT_CHG_DONE   6
#define POWER_CHG_FAULT                 7

/**
 * @brief Initiailise the battery PMIC module
 */
void power_init(void);

/**
 * @brief De-Initiailise the battery PMIC module
 */
void power_off(void);

/**
 * @brief Get the value of the current charging mode
 * @return value of the current charge mode
 */
uint8_t power_get_charge_mode(void);

/**
 * @brief Get the current voltage
 * @return Voltage in mV
 */
uint16_t power_get_battery_voltage(void);

/**
 * @brief Get the battery level 0 - 100.
 * Minor filtering done
 * @return unrounded battery voltage
 */
uint8_t power_get_battery_level(void);

/**
 * @brief Update the charge mode of the power unit
 * Will interrogate any PMIC for value and update registers
 */
void power_update_charge_mode(void);

/**
 * @brief Get the value of the battery
 */
void power_update_battery(void);


#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution.  The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php.
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
#   EnablePaging64.S
#
# Abstract:
#
#   InternalX86EnablePaging64 function
#
# Notes:
#
#------------------------------------------------------------------------------

ASM_GLOBAL ASM_PFX(InternalX86EnablePaging64)

#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalX86EnablePaging64 (
#   IN      UINT16                    CodeSelector,
#   IN      UINT64                    EntryPoint,
#   IN      UINT64                    Context1,    OPTIONAL
#   IN      UINT64                    Context2,    OPTIONAL
#   IN      UINT64                    NewStack
#   );
#---------------------


(61, d.inSeconds);
  Expect.equals(61000, d.inMilliseconds);
  Expect.equals(61000000, d.inMicroseconds);
  d = new Duration(milliseconds: 1001);
  Expect.equals(0, d.inDays);
  Expect.equals(0, d.inHours);
  Expect.equals(0, d.inMinutes);
  Expect.equals(1, d.inSeconds);
  Expect.equals(1001, d.inMilliseconds);
  Expect.equals(1001000, d.inMicroseconds);
  d = new Duration(microseconds: 1001);
  Expect.equals(0, d.inDays);
  Expect.equals(0, d.inHours);
  Expect.equals(0, d.inMinutes);
  Expect.equals(0, d.inSeconds);
  Expect.equals(1, d.inMilliseconds);
  Expect.equals(1001, d.inMicroseconds);

  var d1 = const Duration(milliseconds: 1000);
  var d2 = const Duration(seconds: 1);
  Expect.identical(d1, d2);

  d1 = const Duration(microseconds: 1000);
  d2 = const Duration(milliseconds: 1);
  Expect.identical(d1, d2);

  d1 = new Duration(hours: 1);
  d2 = new Duration(hours: -1);
  d = d1 + d2;
  Expect.equals(0, d.inMicroseconds);
  d = d1 - d2;
  Expect.equals(3600000000 * 2, d.inMicroseconds);

  d2 = new Duration(hours: 1);
  d = d1 + d2;
  Expect.equals(3600000000 * 2, d.inMicroseconds);
  d = d1 - d2;
  Expect.equals(0, d.inMicroseconds);

  d = d1 * 2;
  Expect.equals(3600000000 * 2, d.inMicroseconds);
  d = d1 * -1;
  Expect.equals(-3600000000, d.inMicroseconds);
  d = d1 * 0;
  Expect.equals(0, d.inMicroseconds);

  d = d1 ~/ 2;
  Expect.equals(1800000000, d.inMicroseconds);
  d = d1 ~/ 3600000001;
  Expect.equals(0, d.inMicroseconds);
  d = d1 ~/ -3600000001;
  Expect.equals(0, d.inMicroseconds);
  d = d1 ~/ 3599999999;
  Expect.equals(1, d.inMicroseconds);
  d = d1 ~/ -3599999999;
  Expect.equals(-1, d.inMicroseconds);
  d = d1 ~/ -1;
  Expect.equals(-3600000000, d.inMicroseconds);
  d = d1 * 0;
  Expect.equals(0, d.inMicroseconds);
  Expect.throws(() => d1 ~/ 0, (e) => e is UnsupportedError);

  d = new Duration(microseconds: 0);
  Expect.isTrue(d < new Duration(microseconds: 1));
  Expect.isTrue(d <= new Duration(microseconds: 1));
  Expect.isTrue(d <= d);
  Expect.isTrue(d > new Duration(microseconds: -1));
  Expect.isTrue(d >= new Duration(microseconds: -1));
  Expect.isTrue(d >= d);

  d = const Duration(
    days: 1,
    hours: 3,
    minutes: 17,
    seconds: 42,
    milliseconds: 823,
    microseconds: 127,
  );
  Expect.equals("27:17:42.823127", d.toString());

  d = const Duration(hours: 1999, minutes: 17, seconds: 42);
  Expect.equals("1999:17:42.000000", d.toString());

  d = const Duration(
    days: -1,
    hours: -3,
    minutes: -17,
    seconds: -42,
    milliseconds: -823,
    microseconds: -127,
  );
  Expect.equals("-27:17:42.823127", d.toString());

  d = const Duration(hours: -1999, minutes: -17, seconds: -42);
  Expect.equals("-1999:17:42.000000", d.toStrin


glabel func_809C75C8
/* 00668 809C75C8 27BDFFE8 */  addiu   $sp, $sp, 0xFFE8           ## $sp = FFFFFFE8
/* 0066C 809C75CC AFBF0014 */  sw      $ra, 0x0014($sp)
/* 00670 809C75D0 AFA40018 */  sw      $a0, 0x0018($sp)
/* 00674 809C75D4 0C00BD68 */  jal     func_8002F5A0
/* 00678 809C75D8 AFA5001C */  sw      $a1, 0x001C($sp)
/* 0067C 809C75DC 1040000A */  beq     $v0, $zero, .L809C7608
/* 00680 809C75E0 8FAE0018 */  lw      $t6, 0x0018($sp)
/* 00684 809C75E4 3C05809C */  lui     $a1, %hi(func_809C74AC)    ## $a1 = 809C0000
/* 00688 809C75E8 24A574AC */  addiu   $a1, $a1, %lo(func_809C74AC) ## $a1 = 809C74AC
/* 0068C 809C75EC 0C271BD8 */  jal     func_809C6F60
/* 00690 809C75F0 8FA40018 */  lw      $a0, 0x0018($sp)


// Copyright 2020 New Relic, Inc. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

using System;
using NewRelic.Agent.Api;
using NewRelic.Agent.Extensions.Parsing;
using NewRelic.Reflection;

namespace NewRelic.Providers.Wrapper.Memcached
{
    public class MemcachedHelpers
    {
        private static bool _hasGetServerFailed = false;
        private const string AssemblyName = "EnyimMemcachedCore";
        private static Func<object, object> _transformerGetter;
        private static Func<object, string, string> _transformMethod;
        private static Func<object, object> _poolGetter;
        private static Func<object, string, object> _locateMethod;
        private static Func<object, object> _endpointGetter;
        private static Func<object, object> _addressGetter;
        private static Func<object, int> _portGetter;

        // To get the ConnectionInfo we need to call the same Transform method that the library calls to get the node.
        // This is deterministic based reviewing the code at different versions.
        public static ConnectionInfo GetConnectionInfo(string key, object target, IAgent agent)
        {
            if (_hasGetServerFailed)
            {
                return new ConnectionInfo(null, -1, null);
            }

            try
            {
                var targetType = target.GetType();
                _transformerGetter ??= VisibilityBypasser.Instance.GeneratePropertyAccessor<object>(targetType, "KeyTransformer");
                var transformer = _transformerGetter(target);

                _transformMethod ??= VisibilityBypasser.Instance.GenerateOneParameterMethodCaller<string, string>(AssemblyName, transformer.GetType().FullName, "Transform");
                var hashedKey = _transformMethod(transformer, key);

                _poolGetter ??= VisibilityBypasser.Instance.GeneratePropertyAccessor<object


                return $"[@id='{elementId}']";
        }

        return $"[ancestor::label[{TermResolver.CreateXPathCondition(parameter, termOptions)}]]";
    }

    protected override string GetParameterAsString(IWebElement element)
    {
        string? elementId = element.GetAttribute("id");

        if (elementId?.Length > 0)
        {
            ISearchContext scopeContext = _component.ScopeSource.GetScopeContext(_component, SearchOptions.SafelyAtOnce());

            IWebElement? label = scopeContext.GetWithLogging(
                _component.Log,
                By.XPath($".//label[@for='{elementId}']").SafelyAtOnce());

            if (label is not null)
                return label.Text;
        }

        return element.GetWithLogging(
            _component.Log,
            By.XPath("ancestor::label").AtOnce())!
            .Text;
    }
}


  // Selected index
  final int selectedIndex;

  // The color of the dots.
  final Color color;

    // The color of the dots.
  final Color selectedColor;

  // The base size of the dots
  final double dotSize;

  // The distance between the center of each dot
  final double dotSpacing;

  Widget _buildDot(int index) {
    return new Container(
      width: dotSpacing,
      child: new Center(
        child: new Material(
          color: index == selectedIndex ? selectedColor : color,
          type: MaterialType.circle,
          child: new Container(
            width: dotSize,
            height: dotSize,
          ),
        ),
      ),
    );
  }

  Widget build(BuildContext context) {
    return new Row(
      mainAxisAlignment: MainAxisAlignment.center,
      children: new List<Widget>.generate(itemCount, _buildDot),
    );
  }
}/// 群组事件通知类型
enum GroupTipsTypeEnum {
  /// 非法
  Invalid,

  /// 主动入群（memberList 加入群组，非 Work 群有效）
  Join,

  /// 被邀请入群（opMember 邀请 memberList 入群，Work 群有效）
  Invite,

  /// 退出群组
  Quit,

  /// 踢出群 (opMember 把 memberList 踢出群组)
  Kicked,

  /// 设置管理员 (opMember 把 memberList 设置为管理员)
  Admin,

  /// 取消管理员 (opMember 取消 memberList 管理员身份)
  CancelAdmin,

  /// 群资料变更 (opMember 修改群资料：groupName & introduction & notification & faceUrl & owner & custom)
  GroupInfoChange,

  /// 群成员资料变更 (opMember 修改群成员资料：muteTime)
  MemberInfoChange,
}

/// 枚举工具
class GroupTipsTypeTool {
  /// 根据Int类型值获得枚举
  /// [index] Int常量
  /// [Return] 枚举对象
  static GroupTipsTypeEnum getByInt(int index) =>
      GroupTipsTypeEnum.values[index];

  /// 将枚举转换为整型
  static int toInt(GroupTipsTypeEnum data) => data.index;
}
/// 群系统提示类型
enum GroupSystemType {
  INVALID,
  ADD_GROUP_REQUEST_TYPE,
  ADD_GROUP_ACCEPT_TYPE,
  ADD_GROUP_REFUSE_TYPE,
  KICK_OFF_FROM_GROUP_TYPE,
  DELETE_GROUP_TYPE,
  CREATE_GROUP_TYPE,
  INVITED_TO_GROUP_TYPE,
  QUIT_GROUP_TYPE,
  GRANT_ADMIN_TYPE,
  CANCEL_ADMIN_TYPE,
  REVOKE_GROUP_TYPE,
  INVITE_TO_GROUP_REQUEST_TYPE,
  INVITATION_ACCEPTED_TYPE,
  INVITATION_REFUSED_TYPE,
  CUSTOM_INFO,
}

class GroupSystemTypeTool {
  /// 根据int值获得枚举类型
  static GroupSystemType? intToGroupSystemType(int value) {
    switch (value) {
      case 0:
        return GroupSystemType.INVALID;
      case 1:
        return GroupSystemType.ADD_GROUP_REQUEST_TYPE;
      case 2:
        return GroupSystemType.ADD_GROUP_ACCEPT_TYPE;
      case 3:
        return GroupSystemType.ADD_GROUP_REFUSE_TYPE;
      case 4:
        return GroupSystemType.KICK_OFF_FROM_GROUP_TYPE;
      case 5:
        return GroupSystemType.DELETE_GROUP_TYPE;
      case 6:
        return GroupSystemType.CREATE_GROUP_TYPE;
      case 7:
        return GroupSystemType.INVITED_TO_GROUP_TYPE;
      case 8:
        return GroupSystemType.QUIT_GROUP_TYPE;
      case 9:
        return GroupSystemType.GRANT_ADMIN_TYPE;
      case 10:
        return GroupSystemType.CANCEL_ADMIN_TYPE;
      case 11:
        return GroupSystemType.REVOKE_GROUP_TYPE;
      case 12:
        return GroupSystemType.INVITE_TO_GROUP_REQUEST_TYPE;
      case 13:
        return GroupSystemType.INVITATION_ACCEPTED_TYPE;
      case 14:
        return Group


    pub uhsofc: crate::Reg<uhsofc::UHSOFC_SPEC>,
    _reserved75: [u8; 0xd8],
    #[doc = "0x500 - Pipe Configuration Register"]
    pub upcfg0: crate::Reg<upcfg0::UPCFG0_SPEC>,
    #[doc = "0x504 - Pipe Configuration Register"]
    pub upcfg1: crate::Reg<upcfg1::UPCFG1_SPEC>,
    #[doc = "0x508 - Pipe Configuration Register"]
    pub upcfg2: crate::Reg<upcfg2::UPCFG2_SPEC>,
    #[doc = "0x50c - Pipe Configuration Register"]
    pub upcfg3: crate::Reg<upcfg3::UPCFG3_SPEC>,
    #[doc = "0x510 - Pipe Configuration Register"]
    pub upcfg4: crate::Reg<upcfg4::UPCFG4_SPEC>,
    #[doc = "0x514 - Pipe Configuration Register"]
    pub upcfg5: crate::Reg<upcfg5::UPCFG5_SPEC>,
    #[doc = "0x518 - Pipe Configuration Register"]
    pub upcfg6: crate::Reg<upcfg6::UPCFG6_SPEC>,
    #[doc = "0x51c - Pipe Configuration Register"]
    pub upcfg7: crate::Reg<upcfg7::UPCFG7_SPEC>,
    _reserved83: [u8; 0x10],
    #[doc = "0x530 - Pipe Status Register"]
    pub upsta0: crate::Reg<upsta0::UPSTA0_SPEC>,
    #[doc = "0x534 - Pipe Status Register"]
    pub upsta1: crate::Reg<upsta1::UPSTA1_SPEC>,
    #[doc = "0x538 - Pipe Status Register"]
    pub upsta2: crate::Reg<upsta2::UPSTA2_SPEC>,
    #[doc = "0x53c - Pipe Status Register"]
    pub upsta3: crate::Reg<upsta3::UPSTA3_SPEC>,
    #[doc = "0x540 - Pipe Status Register"]
    pub upsta4: crate::Reg<upsta4::UPSTA4_SPEC>,
    #[doc = "0x544 - Pipe Status Register"]
    pub upsta5: crate::Reg<upsta5::UPSTA5_SPEC>,
    #[doc = "0x548 - Pipe Status Register"]
    pub upsta6: crate::Reg<upsta6::UPSTA6_SPEC>,
    #[doc = "0x54c - Pipe Status Register"]
    pub upsta7: crate::Reg<upsta7::UPSTA7_SPEC>,
    _reserved91: [u8; 0x10],
    #[doc = "0x560 - Pipe Status Clear Register"]
    pub upsta0clr: crate::Reg<upsta0clr::UPSTA0CLR_SPEC>,
    #[doc = "0x564 - Pipe Status Clear Register"]
    pub upsta1clr: crate::Reg<upsta1clr::UPSTA1CLR_SPEC>,
    #[doc = "0x568 - Pipe Status Clear Register"]
    pub upsta2clr: crate::Reg<upsta2clr::UPSTA2CLR_SPEC>,
    #[doc = "0x56c - Pipe Status Clear Register"]
    pub upsta3clr: crate::Reg<upsta3clr::UPSTA3CLR_SPEC>,
    #[doc = "0x570 - Pipe Status Clear Register"]
    pub upsta4clr: crate::Reg<upsta4clr::UPSTA4CLR_SPEC>,
    #[doc = "0x574 - Pipe Status Clear Register"]
    pub upsta5clr: crate::Reg<upsta5clr::UPSTA5CLR_SPEC>,
    #[doc = "0x578 - Pipe Status Clear Register"]
    pub upsta6clr: crate::Reg<upsta6clr::UPSTA6CLR_SPEC>,
    #[doc = "0x57c - Pipe Status


加舒服。*

### 实例代码

```java
// 此方法可能会阻塞主线程，建议使用异步方法
Palette palette = Palette.generate(bitmap);
// 异步提取Bitmap颜色
Palette.generateAsync(bitmap, new Palette.PaletteAsyncListener() {
    @Override
    public void onGenerated(Palette palette) {
        // 提取完毕
        // 有活力的颜色
        Palette.Swatch vibrant = palette.getVibrantSwatch();
        // 有活力的暗色
        Palette.Swatch darkVibrant = palette.getDarkVibrantSwatch();
        // 有活力的亮色
        Palette.Swatch lightVibrant = palette.getLightVibrantSwatch();
        // 柔和的颜色
        Palette.Swatch muted = palette.getMutedSwatch();
        // 柔和的暗色
        Palette.Swatch darkMuted = palette.getDarkMutedSwatch();
        // 柔和的亮色
        Palette.Swatch lightMuted = palette.getLightMutedSwatch();

        // 使用颜色
        // 修改Actionbar背景颜色
        getActionBar().setBackgroundDrawable(new ColorDrawable(vibrant.getRgb()));
        // 修改文字的颜色
        mTextView.setTextColor(vibrant.getTitleTextColor());
        ...
        // 根据需求选择不同效果的颜色应用
    });
```

### 效果

![pic](https://raw.githubusercontent.com/baoboy/baoboy.github.io/master/images/screenshots/palette_3.png)

### 代码下载

[https://github.com/baoyongzhang/android-lollipop-samples](https://github.com/baoyongzhang/android-lollipop-samples)中的[palette-sample](https://github.com/baoyongzhang/android-lollipop-samples/tree/master/palette-sample)
MyGreenDAO
==========

MyGreenDAO 是我在学习使用 ORM 框架 greenDAO 时在官方提供的 Example Project 上精简出来的 Demo，为此添加了详细的注释说明，旨在帮助大家能快速了解、上手使用并扩展 greenDAO。我会持续跟新 MyGreenDAO，不断优化与添加新的功能，欢迎大家 Fork 与 Star 。

**Demo is still in development so more features will be added soon**

  - [Usage](#usage)
  - [Download](#download)
  - [Documentation](#documentation)
  - [Thanks to](#thanks-to)
  - [Contact Me](#contact-me)
  - [License](#license)

# Usage

### Dependency - 依赖
  - Java


.Denom); err != nil {
		return nil, err
	}

	takerFeeShareAgreement := types.TakerFeeShareAgreement{
		Denom:       msg.Denom,
		SkimPercent: msg.SkimPercent,
		SkimAddress: msg.SkimAddress,
	}

	err := server.keeper.SetTakerFeeShareAgreementForDenom(ctx, takerFeeShareAgreement)
	if err != nil {
		return nil, err
	}

	// Emit event
	ctx.EventManager().EmitEvents(sdk.Events{
		sdk.NewEvent(
			types.TypeMsgSetTakerFeeShareAgreementForDenomPair,
			sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
			sdk.NewAttribute(types.AttributeKeyTakerFeeShareDenom, takerFeeShareAgreement.Denom),
			sdk.NewAttribute(types.AttributeKeyTakerFeeShareSkimPercent, takerFeeShareAgreement.SkimPercent.String()),
			sdk.NewAttribute(types.AttributeKeyTakerFeeShareSkimAddress, takerFeeShareAgreement.SkimAddress),
		),
	})

	return &types.MsgSetTakerFeeShareAgreementForDenomResponse{}, nil
}

func (server msgServer) SetRegisteredAlloyedPool(goCtx context.Context, msg *types.MsgSetRegisteredAlloyedPool) (*types.MsgSetRegisteredAlloyedPoolResponse, error) {
	ctx := sdk.UnwrapSDKContext(goCtx)

	govAddr := server.keeper.accountKeeper.GetModuleAccount(ctx, govtypes.ModuleName)
	if msg.Sender != govAddr.GetAddress().String() {
		return nil, types.ErrUnauthorizedGov
	}

	err := server.keeper.setRegisteredAlloyedPool(ctx, msg.PoolId)
	if err != nil {
		return nil, err
	}

	// Emit event
	ctx.EventManager().EmitEvents(sdk.Events{
		sdk.NewEvent(
			types.TypeMsgSetRegisteredAlloyedPool,
			sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
			sdk.NewAttribute(types.AttributeKeyPoolId, strconv.FormatUint(msg.PoolId, 10)),
		),
	})

	return &types.MsgSetRegisteredAlloyedPoolResponse{}, nil
}
package concentrated_liquidity

import (
	"strconv"

	sdk "github.com/cosmos/cosmos-sdk/types"

	"github.com/osmosis-labs/osmosis/osmomath"
	"github.com/osmosis-labs/osmosis/osmoutils"
	"github.com/osmosis-labs/osmosis/osmoutils/accum"
	"github.com/osmosis-labs/osmosis/v30/x/concentrated-liquidity/math"
	"github.com/osmosis-labs/osmosis/v30/x/concentrated-liquidity/model"
	"github.com/osmosis-labs/osmosis/v30/x/concentrated-liquidity/types"
	"github.com/osmosis-labs/osmosis/v30/x/concentrated-liquidity/types/genesis"
)

// initOrUpdateTick retrieves the tickInfo from the specified tickIndex and updates both the liquidityNet and LiquidityGross.
// The given currentTick value is used to determine the strategy for updating the spread factor accumulator.
// We update the tick's spread reward growth opposite direction of last traversal accumulator to the spread reward growth global when tick index is <= current tick.
// Otherwise, it is set to zero. If the liquidityDelta causes the tick to be empty, a boolean flags that the tick is empty for the withdrawPosition method to handle later (removes the tick from state).
// Note that liquidityDelta can be either positive or negative depending on whether we are adding or removing liquidity.
// if we are initializing or updating an upper tick, we subtract the liquidityIn from the LiquidityNet
// if we are initializing or updating a lower tick, we add the liquidityIn from the LiquidityNet
// WARNING: this method may mutate the pool, make sure to refetch the pool after calling this method.
func (k Keeper) i


{ 300, 2 },
			index = "Redacted",
			life = 18,
			name = "P-51D-25-NA",
			positioning = "BYNORMAL",
			username = "P-51D",
			vis = 3
		}, {
			classname = "lLandPlane",
			file = "p51-oblomoki",
			fire = { 240, 2 },
			name = "p51-oblomoki",
			positioning = "BYNORMAL"
		} },
	stores_number = 11,
	swapped_names = true,
	tand_gear_max = 0.577,
	thrust_sum_ab = 8224,
	thrust_sum_max = 8224,
	type = "P-51D",
	undercarriage_transmission = "Hydraulic",
	wing_area = 22,
	wing_span = 9.12,
	wing_tip_pos = { -2.1, 0, 5.6 },
	wing_type = 0
}


  r3, r11
  bl   ASM_PFX(__udivdi3)
  ldmfd  sp!, {r10, r11}
  ldmfd  sp!, {r4, r5, r6, r7, pc}

  .align 2
  GCC_ASM_EXPORT(InternalMathDivRemS64x64)

ASM_PFX(InternalMathDivRemS64x64):
  stmfd  sp!, {r4, r5, r6, r7, lr}
  add  r7, sp, #12
  stmfd  sp!, {r10, r11}
  ldr  r6, [sp, #28]
  mov  r4, r0
  cmp  r6, #0
  mov  r5, r1
  mov  r10, r2
  mov  r11, r3
  beq  L30
  bl   ASM_PFX(__moddi3)
  stmia  r6, {r0-r1}
L30:
  mov  r0, r4
  mov  r1, r5
  mov  r2, r10
  mov  r3, r11
  bl   ASM_PFX(__divdi3)
  ldmfd  sp!, {r10, r11}
  ldmfd  sp!, {r4, r5, r6, r7, pc}

  .align 2
  GCC_ASM_EXPORT(InternalMathSwapBytes64)

ASM_PFX(InternalMathSwapBytes64):
  stmfd  sp!, {r4, r5, r7, lr}
  mov  r5, r1
  bl  ASM_PFX(SwapBytes32)
  mov  r4, r0
  mov  r0, r5
  bl  ASM_PFX(SwapBytes32)
  mov  r1, r4
  ldmfd  sp!, {r4, r5, r7, pc}

ASM_FUNCTION_REMOVE_IF_UNREFERENCED


_READY"
---|"AUCTION_MULTISELL_FAILURE"
---|"AUCTION_MULTISELL_START" # `numRepetitions`
---|"AUCTION_MULTISELL_UPDATE" # `createdCount, totalToCreate`
---|"AUTOFOLLOW_BEGIN" # `name`
---|"AUTOFOLLOW_END"
---|"AVATAR_LIST_UPDATED" # `clubType`
---|"AVOIDANCE_UPDATE"
---|"AZERITE_EMPOWERED_ITEM_EQUIPPED_STATUS_CHANGED" # `isHeartEquipped`
---|"AZERITE_EMPOWERED_ITEM_LOOTED" # `itemLink`
---|"AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED" # `azeriteEmpoweredItemLocation`
---|"AZERITE_ESSENCE_ACTIVATED" # `slot, essenceID`
---|"AZERITE_ESSENCE_ACTIVATION_FAILED" # `slot, essenceID`
---|"AZERITE_ESSENCE_CHANGED" # `essenceID, newRank`
---|"AZERITE_ESSENCE_FORGE_CLOSE"
---|"AZERITE_ESSENCE_FORGE_OPEN"
---|"AZERITE_ESSENCE_MILESTONE_UNLOCKED" # `milestoneID`
---|"AZERITE_ESSENCE_UPDATE"
---|"AZERITE_ITEM_ENABLED_STATE_CHANGED" # `enabled`
---|"AZERITE_ITEM_EXPERIENCE_CHANGED" # `azeriteItemLocation, oldExperienceAmount, newExperienceAmount`
---|"AZERITE_ITEM_POWER_LEVEL_CHANGED" # `azeriteItemLocation, oldPowerLevel, newPowerLevel, unlockedEmpoweredItemsInfo, azeriteItemID`
---|"BAG_CLOSED" # `bagID`
---|"BAG_CONTAINER_UPDATE"
---|"BAG_NEW_ITEMS_UPDATED"
---|"BAG_OPEN" # `bagID`
---|"BAG_OVERFLOW_WITH_FULL_INVENTORY"
---|"BAG_SLOT_FLAGS_UPDATED" # `slot`
---|"BAG_UPDATE" # `bagID`
---|"BAG_UPDATE_COOLDOWN"
---|"BAG_UPDATE_DELAYED"
---|"BANKFRAME_CLOSED"
---|"BANKFRAME_OPENED"
---|"BANK_BAG_SLOT_FLAGS_UPDATED" # `slot`
---|"BANK_TABS_CHANGED" # `bankType`
---|"BANK_TAB_SETTINGS_UPDATED" # `bankType`
---|"BARBER_SHOP_APPEARANCE_APPLIED"
---|"BARBER_SHOP_CAMERA_VALUES_UPDATED"
---|"BARBER_SHOP_CLOSE"
---|"BARBER_SHOP_COST_UPDATE"
---|"BARBER_SHOP_FORCE_CUSTOMIZATIONS_UPDATE"
---|"BARBER_SHOP_OPEN"
---|"BARBER_SHOP_RESULT" # `success`
---|"BATTLEFIELDS_CLOSED"
---|"BATTLEFIELDS_SHOW" # `isArena, battleMasterListID`
---|"BATTLEFIELD_AUTO_QUEUE"
---|"BATTLEFIELD_AUTO_QUEUE_EJECT"
---|"BATTLEFIELD_QUEUE_TIMEOUT"
---|"BATTLEGROUND_OBJECTIVES_UPDATE"
---|"BATTLEGROUND_POINTS_UPDATE"
---|"BATTLEPET_FORCE_NAME_DECLENSION" # `name, battlePetGUID`
---|"BATTLETAG_INVITE_SHOW" # `name`
---|"BATTLE_PET_CURSOR_CLEAR"
---|"BEHAVIORAL_NOTIFICATION" # `notificationType, dbId`
---|"BIDS_UPDATED"
---|"BID_ADDED" # `bidID`
---|"BIND_ENCHANT"
---|"BLACK_MARKET_BID_RESULT" # `marketID, resultCode`
---|"BLACK_MARKET_CLOSE"
---|"BLACK_MARKET_I


+72fc, U+730e, U+731b, U+739b, U+73bb, U+7483, U+74dc, U+74f6, U+7586, U+7626, U+775b, U+77ff, U+788e, U+78b0, U+7956, U+7965, U+79e6, U+7af9, U+7bee, U+7c97, U+7eb1, U+7eb7, U+7ed1, U+7ed5, U+7f6a, U+7f72, U+7fbd, U+8017, U+808c, U+80a9, U+80c6, U+80ce, U+8150, U+8170, U+819c, U+820d, U+8230, U+8239, U+827e, U+8377, U+8389, U+83b2, U+8428, U+8463, U+867e, U+88c2, U+88d9, U+8986, U+8bca, U+8bde, U+8c13, U+8c8c, U+8d21, U+8d24, U+8d56, U+8d60, U+8d8b, U+8db4, U+8e2a, U+8f68, U+8f89, U+8f9b, U+8fa8, U+8fbd, U+9003, U+90ce, U+90ed, U+9189, U+94bb, U+9505, U+95f9, U+963b, U+9655, U+966a, U+9677, U+96fe, U+9896, U+99a8, U+9a71, U+9a82, U+9a91, U+9b45, U+9ece, U+9f20, U+feff, U+ff0d;
}
/* [111] */
@font-face {
    font-family: 'ZCOOL XiaoWei';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('ZCOOL XiaoWei Regular'), local('ZCOOLXiaoWei-Regular'), url(../fonts/gstatic/s/zcoolxiaowei/v5/i7dMIFFrTRywPpUVX9_RJyM1YFeQGQyULWqNeaO2wdeeLndSssJBUqlpCLNQMZe1xLAW-ZS4pgw.111.woff2) format('woff2');
    unicode-range: U+4e4c, U+4e88, U+4ea1, U+4ea6, U+4ed3-4ed4, U+4eff, U+4f30, U+4fa7, U+4fc4, U+4fd7, U+500d, U+504f, U+5076-5077, U+517d, U+5192, U+51c9, U+51ef, U+5238, U+5251, U+526a, U+52c7, U+52df, U+52ff, U+53a6, U+53a8, U+53ec, U+5410, U+559d, U+55b7, U+5634, U+573e, U+5783, U+585e, U+586b, U+58a8, U+5999, U+59d3, U+5a1c, U+5a46, U+5b54-5b55, U+5b85, U+5b8b, U+5b8f, U+5bbf, U+5bd2, U+5c16, U+5c24, U+5e05, U+5e45, U+5e7c, U+5e84, U+5f03, U+5f1f, U+5f31, U+5f84, U+5f90, U+5fbd, U+5fc6,


    default:
        throw UnsupportedError('$type content type is not supported');
    }
  }

  static String? tvMaze(int? id) {
    if (id == null) return null;
    const base = 'https://www.tvmaze.com';

    return '$base/shows/$id';
  }

  static String? theTVDB(int? id, LinkedContentType type) {
    if (id == null) return null;
    const base = 'https://thetvdb.com';

    switch (type) {
      case LinkedContentType.MOVIE:
        return '$base/dereferrer/movie/$id';
      case LinkedContentType.SERIES:
        return '$base/dereferrer/series/$id';
      case LinkedContentType.PERSON:
        return '$base/people/$id';
      default:
        throw UnsupportedError('$type content type is not supported');
    }
  }

  static String? youtube(String? id) {
    if (id == null) return null;
    const base = 'https://www.youtube.com';

    return '$base/watch?v=$id';
  }
}
import 'package:lunasea/database/table.dart';
import 'package:lunasea/modules/dashboard/core/adapters/calendar_starting_day.dart';
import 'package:lunasea/modules/dashboard/core/adapters/calendar_starting_size.dart';
import 'package:lunasea/modules/dashboard/core/adapters/calendar_starting_type.dart';
import 'package:lunasea/vendor.dart';

enum DashboardDatabase<T> with LunaTableMixin<T> {
  NAVIGATION_INDEX<int>(0),
  CALENDAR_STARTING_DAY<CalendarStartingDay>(CalendarStartingDay.MONDAY),
  CALENDAR_STARTING_SIZE<CalendarStartingSize>(CalendarStartingSize.ONE_WEEK),
  CALENDAR_STARTING_TYPE<CalendarStartingType>(CalendarStartingType.CALENDAR),
  CALENDAR_ENABLE_LIDARR<bool>(true),
  CALENDAR_ENABLE_RADARR<bool>(true),
  CALENDAR_ENABLE_SONARR<bool>(true),
  CALENDAR_DAYS_PAST<int>(14),
  CALENDAR_DAYS_FUTURE<int>(14);

  @override
  LunaTable get table => LunaTable.dashboard;

  @override
  final T fallback;

  const DashboardDatabase(this.fallback);

  @override
  void register() {
    Hive.registerAdapter(CalendarStartingDayAdapter());
    Hive.registerAdapter(CalendarStartingSizeAdapter());
    Hive.registerAdapter(CalendarStartingTypeAdapter());
  }

  @override
  dynamic export() {
    DashboardDatabase db = this;
    switch (db) {
      case DashboardDatabase.CALENDAR_STARTING_DAY:
        return DashboardDatabase.CALENDAR_STARTING_DAY.read().key;
      case DashboardDatabase.CALENDAR_STARTING_SIZE:
        return DashboardDatabase.CALENDAR_STARTING_SIZE.read().key;
      case DashboardDatabase.CALENDAR_STARTING_TYPE:
        return DashboardDatabase.CALENDAR_STARTING_TYPE.read().key;
      default:
        return super.export();
    }
  }

  @override
  void import(dynamic value) {
    DashboardDatabase db = this;
    dynamic result;

    switch (db) {
      case DashboardDatabase.CALENDAR_STARTING_DAY:
        result = CalendarStartingDay.MONDAY.fromKey(value.toString());
        break;
      case DashboardDatabase.CALENDAR_STARTING_SIZE:
        result = CalendarStartingSize.ONE_WEEK.fromKey(value.toString());
        break;
      case DashboardDatabase.CALENDAR_STARTING_TYPE:
        result = CalendarStartingType.CALENDAR.fromKey(value.toString());
        break;


using System.Collections.Generic;
using System.IO;

using UnityEditor.VersionControl;

using PlasticGui.WorkspaceWindow.Items;
using Unity.PlasticSCM.Editor.AssetsOverlays;
using Unity.PlasticSCM.Editor.AssetsOverlays.Cache;
using Unity.PlasticSCM.Editor.AssetUtils;

namespace Unity.PlasticSCM.Editor.AssetMenu
{
    internal static class AssetsSelection
    {
        internal static Asset GetSelectedAsset(
            string wkPath,
            AssetList assetList)
        {
            if (assetList.Count == 0)
                return null;

            foreach (Asset asset in assetList)
            {
                if (AssetsPath.GetFullPathUnderWorkspace.
                        ForAsset(wkPath, asset.path) == null)
                    continue;

                return asset;
            }

            return null;
        }

        internal static string GetSelectedPath(
            string wkPath,
            AssetList assetList)
        {
            Asset result = GetSelectedAsset(wkPath, assetList);

            if (result == null)
                return null;

            return Path.GetFullPath(result.path);
        }

        internal static List<string> GetSelectedPaths(
            string wkPath,
            AssetList assetList)
        {
            List<string> result = new List<string>();

            foreach (Asset asset in assetList)
            {
                string fullPath = AssetsPath.GetFullPathUnderWorkspace.
                    ForAsset(wkPath, asset.path);

                if (fullPath == null)
                    continue;

                result.Add(fullPath);
            }

            return result;
        }

        internal static SelectedPathsGroupInfo GetSelectedPathsGroupInfo(
            string wkPath,
            AssetList assetList,
            IAssetStatusCache statusCache)
        {
            SelectedPathsGroupInfo result = new SelectedPathsGroupInfo();

            if (assetList.Count == 0)
                return result;

            result.IsRootSelected = false;
            result.IsCheckedoutEverySelected = true;
            result.IsDirectoryEverySelected = true;
            result.IsCheckedinEverySelected = true;
            result.IsChangedEverySelected = true;

            foreach (Asset asset in assetList)
            {
                string fullPath


t_i64 vcc, 0, v[2:3]
// CHECK: [0x80,0x04,0x42,0x7d]

v_cmp_lt_i64 vcc, -1, v[2:3]
// CHECK: [0xc1,0x04,0x42,0x7d]

v_cmp_lt_i64 vcc, 0.5, v[2:3]
// CHECK: [0xf0,0x04,0x42,0x7d]

v_cmp_lt_i64 vcc, -4.0, v[2:3]
// CHECK: [0xf7,0x04,0x42,0x7d]

v_cmp_lt_i64 vcc, 0xaf123456, v[2:3]
// CHECK: [0xff,0x04,0x42,0x7d,0x56,0x34,0x12,0xaf]

v_cmp_lt_i64 vcc, 0x3f717273, v[2:3]
// CHECK: [0xff,0x04,0x42,0x7d,0x73,0x72,0x71,0x3f]

v_cmp_lt_i64 vcc, v[1:2], v[254:255]
// CHECK: [0x01,0xfd,0x43,0x7d]

v_cmp_lt_i64_e64 s[10:11], v[1:2], v[2:3]
// CHECK: [0x0a,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 s[12:13], v[1:2], v[2:3]
// CHECK: [0x0c,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 s[102:103], v[1:2], v[2:3]
// CHECK: [0x66,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 flat_scratch, v[1:2], v[2:3]
// CHECK: [0x68,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 vcc, v[1:2], v[2:3]
// CHECK: [0x6a,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 tba, v[1:2], v[2:3]
// CHECK: [0x6c,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 tma, v[1:2], v[2:3]
// CHECK: [0x6e,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 ttmp[10:11], v[1:2], v[2:3]
// CHECK: [0x7a,0x00,0x42,0xd1,0x01,0x05,0x02,0x00]

v_cmp_lt_i64_e64 s[10:11], v[254:255], v[2:3]
// CHECK: [0x0a,0x00,0x42,0xd1,0xfe,0x05,0x02,0x00]

v_cmp_lt_i64_e64 s[10:11], s[2:3], v[2:3]
// CHECK: [0x0a,0x00,0x42


-48 | Lindsay Coleman]]. See the[http://www.wikitree.com/index.php?title=Special:NetworkFeed&who=Hoehn-6 Changes page] for the details of edits by Lindsay and others. * Source: <span id='S-1864320709'>S-1864320709</span> Repository: [[#R-1864321417]] Title:  Ancestry Family Trees Publication:  Online publication - Provo, UT, USA: Ancestry.com.  Original data:  Family Tree files submitted by Ancestry members. Note:  This information comes from1 or more individual Ancestry Family Tree files. This source citationpoints you to a current version of those files.  Note:  The owners ofthese tree files may have removed or changed information since this source citation was created.   Page:  Ancestry Family Trees Note:   Data:   Text:  http://trees.ancestry.com/pt/AMTCitationRedir.aspx?tid=15024057&pid=4284 * Repository: <span id='R-1864321417'>R-1864321417</span> Name:  Ancestry.com Address:  http://www.Ancestry.com Note: * WikiTree profile Hoehn-1 created through the import of FISCUS Family Tree.ged on Jun  6, 2011 by [[Fairbanks-92 | Liisa Small]]. See the [http://www.wikitree.com/index.php?title=Special:NetworkFeed&who=Hoehn-1 Changes page] for the details of edits by Liisa and others.
4. == Biography == ''This biography is a rough draft. It was auto-generated by a GEDCOM import and needs to be edited.'' == Sources == * WikiTree profile Simon-437 created through the import of Stough Family Tree.ged on Nov  2, 2011 by [[Stough-48 | Lindsay Coleman]]. See the [http://www.wikitree.com/index.php?title=Special:NetworkFeed&who=Simon-437 Changes page] for the details of edits by Lindsay and others. * Source: <span id='S-1864320709'>S-1864320709</span> Repository: [[#R-1864321417]] Title:  Ancestry Family Trees Publication:  Online publication - Provo, UT, USA: Ancestry.com.  Original data:  Family Tree files submitted by Ancestry members. Note:  This information comes from1 or more individual Ancestry Family Tree files. This source citationpoints you to a current version of those files.  Note:  The owners ofthese tree files may have removed or changed information since this source citation was created.   Page:  Ancestry Family Trees Note:   Data:   Text:  http://trees.ancestry.com/pt/AMTCitationRedir.aspx?tid=15024057&pid=4520* Repository: <span id='R-1864321417'>R-1864321417</span> Name:  Ancestry.com Address:  http://www.Ancestry.com Note: <references /> <!-- Please edit, add, or delete anything in this text, including this note. Be bold and experiment! If you make a mistake you can always see the previous version of the text on the Changes page. -->
5. == Biography == ''This biography is a rough draft. It was auto-generated by a GEDCOM import and needs to be edited.'' == Sources == * WikiTree profile Simon-436 created through the import of Stough Family Tree.ged on Nov  2, 2011 by [[Stough-48


class Solution:
    def canweplace(self,stalls,mid,k):
        n=len(stalls)
        cntcows = 1
        last= stalls[0]
        for i in range(1,n):
            if last - stalls[i]>=mid:
                cntcows+=1
                last - stalls[i]
            if cntcows>=k:
                return True
        return False

    def aggressiveCows(self,stalls,k):
        n=len(stalls)
        stalls.sort()
        low = 1
        high = stalls[n-1] - stalls[0]
        while(low<=high):
            mid=(low+high)//2
            if self.canweplace(stalls,mid,k):
                low = mid+1
            else:
                high = mid-1
        return high

solution = Solution()
stalls = [0,3,4,7,10,9]
k = 6
print(solution.aggressiveCows(stalls,k))


e,
        entity: {}
      };
    case ACTION_TYPES.RESET:
      return {
        ...initialState
      };
    default:
      return state;
  }
};

const apiUrl = 'api/projekats';

// Actions

export const getEntities: ICrudGetAllAction<IProjekat> = (page, size, sort) => ({
  type: ACTION_TYPES.FETCH_PROJEKAT_LIST,
  payload: axios.get<IProjekat>(`${apiUrl}?cacheBuster=${new Date().getTime()}`)
});

export const getEntity: ICrudGetAction<IProjekat> = id => {
  const requestUrl = `${apiUrl}/${id}`;
  return {
    type: ACTION_TYPES.FETCH_PROJEKAT,
    payload: axios.get<IProjekat>(requestUrl)
  };
};

export const createEntity: ICrudPutAction<IProjekat> = entity => async dispatch => {
  const result = await dispatch({
    type: ACTION_TYPES.CREATE_PROJEKAT,
    payload: axios.post(apiUrl, cleanEntity(entity))
  });
  dispatch(getEntities());
  return result;
};

export const updateEntity: ICrudPutAction<IProjekat> = entity => async dispatch => {
  const result = await dispatch({
    type: ACTION_TYPES.UPDATE_PROJEKAT,
    payload: axios.put(apiUrl, cleanEntity(entity))
  });
  dispatch(getEntities());
  return result;
};

export const deleteEntity: ICrudDeleteAction<IProjekat> = id => async dispatch => {
  const requestUrl = `${apiUrl}/${id}`;
  const result = await dispatch({
    type: ACTION_TYPES.DELETE_PROJEKAT,
    payload: axios.delete(requestUrl)
  });
  dispatch(getEntities());
  return result;
};

export const reset = () => ({
  type: ACTION_TYPES.RESET
});
export default class Vector3Util{

	public static readonly zero=new Laya.Vector3(0,0,0);
	public static readonly forward=new Laya.Vector3(0,0,-1);
	public static readonly up=new Laya.Vector3(0,1,0);
	public static readonly right=new Laya.Vector3(1,0,0);

	public static get newZero():Laya.Vector3{
		return new Laya.Vector3(0,0,0);
	}

	public static get newForward():Laya.Vector3{
		return new Laya.Vector3(0,0,-1);
	}

	public static get newUp():Laya.Vector3{
		return new Laya.Vector3(0,1,0);
	}

	public static get newRight():Laya.Vector3{
		return new Laya.Vector3(1,0,0);
	}

	public static min(lhs:Laya.Vector3,rhs:Laya.Vector3,o:Laya.Vector3):void{
		o.x=Math.min(lhs.x,rhs.x);
		o.y=Math.min(lhs.y,rhs.y);
		o.z=Math.min(lhs.z,rhs.z);
	}

	public static max(lhs:Laya.Vector3,rhs:Laya.Vector3,o:Laya.Vector3):void{
		o.x=Math.max(lhs.x,rhs.x);
		o.y=Math.max(lhs.y,rhs.y);
		o.z=Math.max(lhs.z,rhs.z);
	}
}import { Message } from 'discord.js';
import Command from '../Interfaces/Command';
import { roles, channels } from '../../config.json';
import NotifyMeParams from '../Types/NotifyMeParams';
import NotifyMeParamsParser from '../Parsers/NotifyMeParamsParser';

class NotifyMe implements Command<NotifyMeParams> {
	public identifier: string;
	public parser: (src: Message, identifier: string) => NotifyMeParams;
	public


#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#

import sys

from airbyte_cdk.entrypoint import launch
from source_tyntec_sms import SourceTyntecSms

def run():
    source = SourceTyntecSms()
    launch(source, sys.argv[1:])


  if(enableCors) {
    response->addHeader(F("Access-Control-Allow-Origin"), F("*"));
    response->addHeader(F("Access-Control-Allow-Headers"), F("*"));
    response->addHeader(F("Access-Control-Allow-Methods"), F("*"));
  }

  response->addHeader(F("Cache-Control"), F("no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0"));

  return true;
}

// -------------------------------------------------------------------
// Helper function to detect positive string
// -------------------------------------------------------------------
bool isPositive(const String &str) {
  return str == "1" || str == "true";
}

bool isPositive(MongooseHttpServerRequest *request, const char *param) {
  char paramValue[8];
  int paramFound = request->getParam(param, paramValue, sizeof(paramValue));
  return paramFound >= 0 && (0 == paramFound || isPositive(String(paramValue)));
}

//---------------------------------------------------------------------
// Build status data
// --------------------------------------------------------------------

void buildStatus(DynamicJsonDocument &doc) {

  // Get the current time
  struct timeval local_time;
  gettimeofday(&local_time, NULL);

  struct tm * timeinfo = gmtime(&local_time.tv_sec);

  char time[64];
  char offset[8];
  strftime(time, sizeof(time), "%FT%TZ", timeinfo);
  strftime(offset, sizeof(offset), "%z", timeinfo);

  if (net.isWiredConnected()) {
    doc["mode"] = "Wired";
  } else if (net.isWifiModeStaOnly()) {
    doc["mode"] = "STA";
  } else if (net.isWifiModeApOnly()) {
    doc["mode"] = "AP";
  } else if (net.isWifiModeAp() && net.isWifiModeSta()) {
    doc["mode"] = "STA+AP";
  }

  doc["wifi_client_connected"] = (int)net.isWifiClientConnected();
  doc["eth_connected"] = (int)net.isWiredConnected();
  doc["net_connected"] = (int)net.isWifiClientConnected();
  doc["ipaddress"] = net.getIp();
  doc["macaddress"] = net.getMac();

  doc["emoncms_connected"] = (int)emoncms_connected;
  doc["packets_sent"] = packets_sent;
  doc["packets_success"] = packets_success;

  doc["mqtt_connected"] = (int)mqtt.isConnected();

  doc["ocpp_connected"] = (int)OcppTask::isConnected();

#if defined(ENABLE_PN532) || defined(ENABLE_RFID)
  doc["rfid_failure"] = (int) rfid.communicationFails();
#endif

  doc["ohm_hour"] = ohm_hour;

  doc["free_heap"] = ESPAL.getFreeHeap();

  doc["comm_sent"] = rapiSender.getSent();
  doc["comm_success"] = rapiSender.getSuccess();
  doc["rapi_connected"] = (int)rapiSender.isConnected();
  doc["evse_connected"] = (int)evse.isConnected();

  create_rapi_json(doc);

  doc["gfcicount"] = evse.getFaultCountGFCI();
  doc["nogndcount"] = evse.getFaultCountNoGround();
  doc["stuckcount"] = evse.getFaultCountStuckRelay();

  doc["solar"] = solar;
  doc["grid_ie"] = grid_ie;
  doc["charge_rate"] = divert.getChargeRate();
  doc["divert_update"] = (millis() - divert.getLastUpdate()) / 1000;
  doc["divert_active"] = divert.isActive();
  doc["shaper"] = shaper.getState()?1:0;
  doc["shaper_live_pwr"] = shaper.getLivePwr();
  // doc[


ptions,
 * expressed as comma-separated strings in the same order as statHashes.
 */
function byStatMix(item: DimItem): string[] {
  const stats = item.stats;

  if (!stats || stats.length < 3) {
    return emptyStats;
  }

  const mixes: number[][] = generateMixesFromPerks(item);

  if (mixes.length === 1) {
    return mixes.map((m) => m.toString());
  }
  return _.uniq(mixes.map((m) => m.toString()));
}

/**
 * This is the awkward helper used by both byStatMix (to generate the list of stat mixes) and
 * GeneratedSetItem#identifyAltPerkChoicesForChosenStats, which figures out which perks need
 * to be selected to get that stat mix. It has two modes depending on whether an "onMix" callback
 * is provided - if it is, it assumes we're looking for perks, not mixes, and keeps track of
 * what perks are necessary to fulfill a stat-mix, and lets the callback stop the function early.
 * If not, it just returns all the mixes. This is like this so we can share this complicated
 * bit of logic and not get it out of sync.
 */
export function generateMixesFromPerks(
  item: DimItem,
  /** Callback when a new mix is found. */
  onMix?: (mix: number[], plug: DimPlug[] | null) => boolean
) {
  const stats = item.stats;

  if (!stats || stats.length < 3) {
    return [];
  }

  const statsByHash = _.keyBy(stats, (stat) => stat.statHash);
  const mixes: number[][] = [statValues.map((statHash) => statsByHash[statHash].value)];

  const altPerks: (DimPlug[] | null)[] = [null];

  if (stats && item.isDestiny2() && item.sockets) {
    for (const socket of item.sockets.sockets) {
      if (socket.plugOptions.length > 1) {
        for (const plug of socket.plugOptions) {
          if (plug !== socket.plug && plug.stats) {
            // Stats without the currently selected plug, with the optional plug
            const mixNum = mixes.length;
            for (let mixIndex = 0; mixIndex < mixNum; mixIndex++) {
              const existingMix = mixes[mixIndex];
              const optionStat = statValues.map((statHash, index) => {
                const currentPlugValue =
                  (socket.plug && socket.plug.stats && socket.plug.stats[statHash]) || 0;
                const optionPlugValue = (plug.stats && plug.stats[statHash]) || 0;
                return existingMix[index] - currentPlugValue + optionPlugValue;
              });

              if (onMix) {
                const existingMixAlts = altPerks[mixIndex];
                const plugs = existingMixAlts ? [...existingMixAlts, plug] : [plug];
                altPerks.push(plugs);
                if (!onMix(optionStat, plugs)) {
                  return [];
                }
              }
              mixes.push(optionStat);
            }
          }
        }
      }
    }
  }

  return mixes;
}

/**
 * Get the loadout permutation for this stat mix that has the highest power, assuming the
 * items in each slot are already sorted by power. This respects the rule that two exotics
 * cannot be equipped at once.
 */
function getFirstValidSet(armors: readonly DimItem[][]) {
  let exoticIndices: number[] = [];
  let index = 0;
  for (const armor of armors) {
    if (armor[0].equippingLabel) {
      exoticIndices.push(index);
    }
    index++;
  }

  if (exoticIndices.length > 1) {
    exoticIndices = _.sortBy(exoticIndices, (i) => armors[i][0].basePower);
    for (let numExotics = exoticIndices.length; numExotics > 0; numExotics--) {
      // Start by trying to substitute the least powerful


.Visible = false; cClearCriButton.Visible = false; cShowCriButton.Visible = (bool)Session[KEY_bShCriVisible];
			DataTable dt = (new AdminSystem()).GetRptDt(54,"GetAdmRptUsage",base.LImpr,base.LCurr,UpdCriteria(false),GetRptCriteria(),LcAppConnString,LcAppPw,false,false,false,CommandTimeOut);
			CovertRptUTC(dt);
			if (dt.Rows.Count > 0) {if (dt.Columns.Contains("ReportName")) {reportName = dt.Rows[0]["ReportName"].ToString();}}
			else {PreMsgPopup("For your information, no data is currently available as per your reporting criteria.");}
			if (Config.DeployType == "DEV" && Config.AppNameSpace == "RO")
			{
				DataSet ds = new DataSet();
				ds.Tables.Add(dt);
				ds.DataSetName = "DsAdmRptUsage";
				ds.Tables[0].TableName = "DtAdmRptUsage";
				string xsdPath = Server.MapPath("~/reports/AdmRptUsageReport.xsd");
				using (System.IO.StreamWriter writer = new System.IO.StreamWriter(xsdPath))
				{
					ds.WriteXmlSchema(writer);
					writer.Close();
				}
			}
			reportName = reportName + "_" + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString();
			DataView dvItem = GetReportItem(); DataView dvSct = GetReportSct();
			foreach (DataRowView drv in dvSct) {SetReportSct(dvItem, drv["ReportSctName"].ToString());}
			rp.Refresh();
			if (sendToPrinter)
			{
				rp.PrintOptions.PrinterName = cPrinter.SelectedItem.Value;
				rp.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
			}
			rp.SetDataSource(dt);
			cViewer.ReportSource = rp;
			if (cViewerWidth.Value != string.Empty) { cViewer.Width = Unit.Pixel(int.Parse(cViewerWidth.Value)); }
			cViewer.Visible = true;
#pragma warning disable 0612 // Type or member is obsolete
			cViewer.DisplayGroupTree = false;
#pragma warning restore 0612 // Type or member is obsolete
			if (sendToPrinter) { rp.PrintToPrinter(1,false,0,0); }
			if (eExport == exportTo.TXT)
			{
				StringBuilder sb = new StringBuilder();
				if (dt.Columns.Contains("a.UsageDt")) {sb.Append("a.UsageDt" + (char)9);}
				if (dt.Columns.Contains("a.UsageDt")) {sb.Append("a.UsageDt" + (char)9);}
				if (dt.Columns.Contains("Summary")) {sb.Append("Summary" + (char)9);}
				if (dt.Columns.Contains("SystemName")) {sb.Append("System Name" + (char)9);}
				if (dt.Columns.Contains("UsrTypeGrp")) {sb.Append("Type Group" + (char)9);}
				if (dt.Columns.Contains("UsrTypeName")) {sb.Append("Type Name" + (char)9);}
				if (dt.Columns.Contains("EntityTitle")) {sb.Append("Entity Title" + (char)9);}
				if (dt.Columns.Contains("UsrGroupName")) {sb.Append("UsrGroupName" + (char)9);}
				if (dt.Columns.Contains("UsrName")) {sb.Append("UsrName" + (char)9);}
				if (dt.Columns.Contains("UsageDt")) {sb.Append("UsageDt" + (char)9);}
				if (dt.Columns.Contains("UsageNote")) {sb.Append("Usage Note" + (char)9);}
				if (dt.Columns.Contains("NumTimes")) {sb.Append("# of Times" + (char)9);}
				if (dt.Columns.Contains("


class="literal">G_FILE_ATTRIBUTE_TYPE_UINT32.

G_FILE_ATTRIBUTE_TIME_ACCESS

#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access"               /* uint64 */

A key in the "time" namespace for getting the time the file was last
accessed. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the
file was last accessed, in seconds since the UNIX epoch.

G_FILE_ATTRIBUTE_TIME_ACCESS_USEC

#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec"     /* uint32 */

A key in the "time" namespace for getting the microseconds of the time
the file was last accessed. This should be used in conjunction with
G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TYPE_UINT32.

G_FILE_ATTRIBUTE_TIME_CHANGED

#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed"             /* uint64 */

A key in the "time" namespace for getting the time the file was last
changed. Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64,
and contains the time since the file was last changed, in seconds since the
UNIX epoch.

This corresponds to the traditional UNIX ctime.

G_FILE_ATTRIBUTE_TIME_CHANGED_USEC

#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec"   /* uint32 */

A key in the "time" namespace for getting the microseconds of the time
the file was last changed. This should be used in conjunction with
<a class="link


eart", ["5.10.9"] = "{{Heart}} Scared Heart", ["5.10.10"] = "{{BlendedHeart}} Blended Heart", ["5.10.11"] = "{{EmptyBoneHeart}} Bone Heart", ["5.10.12"] = "{{RottenHeart}} Rotten Heart",

	["5.20"] = "{{Coin}} Coin",
	["5.20.1"] = "{{Crafting8}} Penny", ["5.20.2"] = "{{Crafting9}} Nickel", ["5.20.3"] = "{{Crafting10}} Dime", ["5.20.4"] = "{{Crafting8}} Double Penny", ["5.20.5"] = "{{Crafting11}} Lucky Penny", ["5.20.6"] = "{{Crafting9}} Sticky Nickel", ["5.20.7"] = "{{Crafting26}} Golden Penny",

	["5.30"] = "{{Key}} Key",
	["5.30.1"] = "{{Crafting12}} Key", ["5.30.2"] = "{{Crafting13}} Golden Key", ["5.30.3"] = "{{Crafting12}} Key Ring", ["5.30.4"] = "{{Crafting14}} Charged Key",

	["5.40"] = "{{Bomb}} Bomb",
	["5.40.1"] = "{{Crafting15}} Bomb", ["5.40.2"] = "{{Crafting15}} Double Bomb", ["5.40.3"] = "{{Crafting15}} Troll Bomb", ["5.40.4"] = "{{Crafting16}} Golden Bomb", ["5.40.5"] = "{{Crafting15}} Mega Troll Bomb", ["5.40.7"] = "{{Crafting17}} Giga Bomb",

	["5.42"] = "{{Crafting29}} Poop Nugget", ["5.42.1"] = "{{Crafting29}} Big Poop Nugget",

	["5.90"] = "{{Battery}} Battery",
	["5.90.0"] = "{{Crafting19}} Lil' Battery", --AB+ didn't have subtypes for batteries
	["5.90.1"] = "{{Crafting19}} Lil' Battery", ["5.90.2"] = "{{Crafting18}} Micro Battery", ["5.90.3"] = "{{Crafting20}} Mega Battery", ["5.90.4"] = "{{Crafting28}} Golden Battery",

	["5.50"] = "{{Chest}} Chest", ["5.51"] = "{{BombChest}} Bomb Chest", ["5.52"] = "{{SpikedChest}} Spiked Chest", ["5.53"] = "{{EternalChest}} Eternal Chest", ["5.54"] = "{{MimicChest}} Mimic Chest", ["5.55"] = "{{OldChest}} Old Chest", ["5.56"] = "{{WoodenChest}} Wooden Chest", ["5.57"] = "{{MegaChest}} Mega Chest", ["5.58"] = "{{HauntedChest}} Haunted Chest", ["5.60"] = "{{GoldenChest}} Golden Chest", ["5.360"] = "{{RedChest}} Red Chest",

	["5.69"] = "{{GrabBag}} Grab Bag", ["5.69.1"] = "{{GrabBag}} Grab Bag", ["5.69.2"] = "{{BlackSack}} Black Sack",

	["5.70"] = "{{Pill}} Pill",
	["5.300"] = "{{Card}} Card",
	["5.301"] = "{{Rune}} Rune", -- not a real id
	["5.350"] = "{{Trinket}} Trinket",

}

-- Conditional descriptions - DO NOT TRANSLATE THE FIRST PART IN ["BRACKETS"]
-- Strings will be appended to the original description
-- Tables with one entry will completely replace the original description
-- Tables with two or more entries are find-replace pairs (if there's an odd number of entries, the last entry is appended)
-- For collectible/player conditionals, lines will automatically have their bulletpoint, and {1} is replaced with their name
EID.descriptions[languageCode].ConditionalDescs = {
	------ GENERAL STRINGS ------
	["Overridden"] = "Overridden by {1}",
	["Overrides"] = "Overrides {1}",
	["Almost No Effect"] = "Little to no effect for {1}",
	["No Effect"] = "No effect for {1}",
	["No


- RaidDeathKnight_I - Blue",
[68180] = "Art Template Plate Hand - RaidDeathKnight_I - Blue",
[68181] = "Art Template Plate Head - RaidDeathKnight_I - Blue",
[68182] = "Art Template Plate Legs - RaidDeathKnight_I - Blue",
[68183] = "Art Template Plate Shoulder - RaidDeathKnight_I - Blue",
[68184] = "Art Template Plate Wrist - RaidDeathKnight_I - Blue",
[68185] = "Art Template Plate Belt - RaidDeathKnight_I - Green",
[68186] = "Art Template Plate Boot - RaidDeathKnight_I - Green",
[68187] = "Art Template Plate Chest - RaidDeathKnight_I - Green",
[68188] = "Art Template Plate Hand - RaidDeathKnight_I - Green",
[68189] = "Art Template Plate Head - RaidDeathKnight_I - Green",
[68190] = "Art Template Plate Legs - RaidDeathKnight_I - Green",
[68191] = "Art Template Plate Shoulder - RaidDeathKnight_I - Green",
[68192] = "Art Template Plate Wrist - RaidDeathKnight_I - Green",
[68193] = "Patrón: armadura para pierna de dragontina",
[68194] = "Inspiradora de Ogglesílex",
[68195] = "Hoja de Bazzalan",
[68196] = "Remache de bronce corroído",
[68197] = "Pedazos de animales extraviados",
[68198] = "Retales de seda de ascuas estropeados",
[68199] = "Patrón: vestido de seda de ascuas negro",
[68200] = "Art Template Leather Belt - RaidDruid_I - Brown",
[68201] = "Art Template Leather Boot - RaidDruid_I - Brown",
[68202] = "Art Template Leather Chest - RaidDruid_I - Brown",
[68203] = "Art Template Leather Hand - RaidDruid_I - Brown",
[68204] = "Art Template Leather Head - RaidDruid_I - Brown",
[68205] = "Art Template Leather Legs - RaidDruid_I - Brown",
[68206] = "Art Template Leather Robe - RaidDruid_I - Brown",
[68207] = "Art Template Leather Shoulder - RaidDruid_I - Brown",
[68208] = "Art Template Leather Wrist - RaidDruid_I - Brown",
[68209] = "Art Template Leather Wrist - RaidDruid_I - White",
[68210] = "Art Template Leather Shoulder - RaidDruid_I - White",
[68211] = "Art Template Leather Robe - RaidDruid_I - White",
[68212] = "Art Template Leather Legs - RaidDruid_I - White",
[68213] = "Art Template Leather Head - RaidDruid_I - White",
[68214] = "Art Template Leather Hand - RaidDruid_I - White",
[68215] = "Art Template Leather Chest - RaidDruid_I - White",
[68216] = "Art Template Leather Boot - RaidDruid_I - White",
[68217] = "Art Template Leather Belt - RaidDruid_I - White",
[68218] = "Art Template Mail Belt - Mail_RaidHunter_I_01 - Green",
[68219] = "Art Template Mail Boot - Mail_RaidHunter_I_01 - Green",
[68220] = "Art Template Mail Chest - Mail_RaidHunter_I_01 - Green",
[68221] = "Art Template Mail Hand - Mail_RaidHunter_I_01 - Green",
[68222] = "Art Template Mail Head - Mail_RaidHunter_I_01 - Green",
[68223] = "Art Tem


	}

	db.events.Trigger(batchExpiry)
	return nil
}

func (db *DB) ReserveGet(ctx context.Context, addr swarm.Address, batchID []byte, stampHash []byte) (ch swarm.Chunk, err error) {
	dur := captureDuration(time.Now())
	defer func() {
		db.metrics.MethodCallsDuration.WithLabelValues("reserve", "ReserveGet").Observe(dur())
		if err == nil || errors.Is(err, storage.ErrNotFound) {
			db.metrics.MethodCalls.WithLabelValues("reserve", "ReserveGet", "success").Inc()
		} else {
			db.metrics.MethodCalls.WithLabelValues("reserve", "ReserveGet", "failure").Inc()
			db.logger.Debug("reserve get error", "error", err)
		}
	}()

	return db.reserve.Get(ctx, addr, batchID, stampHash)
}

func (db *DB) ReserveHas(addr swarm.Address, batchID []byte, stampHash []byte) (has bool, err error) {
	dur := captureDuration(time.Now())
	defer func() {
		db.metrics.MethodCallsDuration.WithLabelValues("reserve", "ReserveHas").Observe(dur())
		if err == nil {
			db.metrics.MethodCalls.WithLabelValues("reserve", "ReserveHas", "success").Inc()
		} else {
			db.metrics.MethodCalls.WithLabelValues("reserve", "ReserveHas", "failure").Inc()
			db.logger.Debug("reserve has error", "error", err)
		}
	}()

	return db.reserve.Has(addr, batchID, stampHash)
}

// ReservePutter returns a Putter for inserting chunks into the reserve.
func (db *DB) ReservePutter() storage.Putter {
	return putterWithMetrics{
		storage.PutterFunc(
			func(ctx context.Context, chunk swarm.Chunk) error {
				err := db.reserve.Put(ctx, chunk)
				if err != nil {
					db.logger.Debug("reserve put error", "error", err)
					return fmt.Errorf("reserve putter.Put: %w", err)
				}
				db.reserveBinEvents.Trigger(string(db.po(chunk.Address())))
				if !db.reserve.IsWithinCapacity() {
					db.events.Trigger(reserveOverCapacity)
				}
				db.metrics.ReserveSize.Set(float64(db.reserve.Size()))
				return nil
			},
		),
		db.metrics,
		"reserve",
	}
}

func (db *DB) unreserve(ctx context.Context) (err error) {
	dur := captureDuration(time.Now())
	defer func() {
		db.metrics.MethodCallsDuration.WithLabelValues("reserve", "unreserve").Observe(dur())
		if err == nil {
			db.metrics.MethodCalls.WithLabelValues("reserve", "unreserve", "success").Inc()
		} else {
			db.metrics.MethodCalls.WithLabelValues("reserve", "unreserve", "failure").Inc()
		}
	}()

	radius := db.reserve.Radius()
	defer db.events.Trigger(reserveUnreserved)

	target := db.reserve.EvictionTarget()
	if target <= 0 {
		return nil
	}

	db.logger.Info("unreserve start", "target", target, "radius", radius)

	batchExpiry, unsub := db.events.Subscribe(batchExpiry)
	defer unsub()

	totalEvicted := 0

	var batches [][]byte
	err = db.batchstore.Iterate(func(b *postage.Batch) (bool, error) {
		batches = append(batches, b.ID)
		return false, nil
	})
	if err != nil {
		return err
	}

	for radius < swarm.MaxBins {

		for _, b := range batches


StringToBuffer(macbuffer, encryptionAlgorithm);
  _addStringToBuffer(macbuffer, comment);
  macbuffer.putInt32(pubbuffer.length());
  macbuffer.putBuffer(pubbuffer);
  macbuffer.putInt32(privbuffer.length());
  macbuffer.putBuffer(privbuffer);

  var hmac = forge.hmac.create();
  hmac.start('sha1', mackey);
  hmac.update(macbuffer.bytes());

  ppk += '\r\nPrivate-MAC: ' + hmac.digest().toHex() + '\r\n';

  return ppk;
};

/**
 * Encodes a public RSA key as an OpenSSH file.
 *
 * @param key the key.
 * @param comment a comment.
 *
 * @return the public key in OpenSSH format.
 */
ssh.publicKeyToOpenSSH = function(key, comment) {
  var type = 'ssh-rsa';
  comment = comment || '';

  var buffer = forge.util.createBuffer();
  _addStringToBuffer(buffer, type);
  _addBigIntegerToBuffer(buffer, key.e);
  _addBigIntegerToBuffer(buffer, key.n);

  return type + ' ' + forge.util.encode64(buffer.bytes()) + ' ' + comment;
};

/**
 * Encodes a private RSA key as an OpenSSH file.
 *
 * @param key the key.
 * @param passphrase a passphrase to protect the key (falsy for no encryption).
 *
 * @return the public key in OpenSSH format.
 */
ssh.privateKeyToOpenSSH = function(privateKey, passphrase) {
  if(!passphrase) {
    return forge.pki.privateKeyToPem(privateKey);
  }
  // OpenSSH private key is just a legacy format, it seems
  return forge.pki.encryptRsaPrivateKey(privateKey, passphrase,
    {legacy: true, algorithm: 'aes128'});
};

/**
 * Gets the SSH fingerprint for the given public key.
 *
 * @param options the options to use.
 *          [md] the message digest object to use (defaults to forge.md.md5).
 *          [encoding] an alternative output encoding, such as 'hex'
 *            (defaults to none, outputs a byte buffer).
 *          [delimiter] the delimiter to use between bytes for 'hex' encoded
 *            output, eg: ':' (defaults to none).
 *
 * @return the fingerprint as a byte buffer or other encoding based on options.
 */
ssh.getPublicKeyFingerprint = function(key, options) {
  options = options || {};
  var md = options.md || forge.md.md5.create();

  var type = 'ssh-rsa';
  var buffer = forge.util.createBuffer();
  _addStringToBuffer(buffer, type);
  _addBigIntegerToBuffer(buffer, key.e);
  _addBigIntegerToBuffer(buffer, key.n);

  // hash public key bytes
  md.start();
  md.update(buffer.getBytes());
  var digest = md.digest();
  if(options.encoding === 'hex') {
    var hex = digest.toHex();
    if(options.delimiter) {
      return hex.match(/.{2}/g).join(options.delimiter);
    }
    return hex;
  } else if(options.encoding === 'binary') {
    return digest.getBytes();
  } else if(options.encoding) {
    throw new Error('Unknown encoding "' + options.encoding + '".');
  }
  return digest;
};

/**
 * Adds len(val) then val to a buffer.
 *
 * @param buffer the buffer to add to.
 * @param val a big integer.
 */
function _addBigIntegerToBuffer(buffer, val) {
  var hexVal = val.toString(16);
  // ensure 2s complement +ve
  if(hexVal[0] >= '8') {
    hexVal = '00' + hexVal;
  }
  var bytes = for


en El Bosque de Jade en busca de pistas sobre sus pasajeros y recupera el diario del Capitán codificado."}},
[29556] = {"Los hozen no son tu amigos. Los hozen son tus enemigos", nil, {"Mata a 10 hozen en los Restos de la Vanguardia."}},
[29557] = {"La misión continúa", nil, {"Habla con Nodd en el Cabo del Zafiro, en El Bosque de Jade."}},
[29558] = {"La senda de la guerra", nil, {"Mata a 12 saltarramas Colafusta o lodomantes Colafusta."}},
[29559] = {"Liberar a nuestros hermanos", nil, {"Libera a 6 prisioneros Jinyu o de la Alianza."}},
[29560] = {"Poder antiguo", nil, {"Consigue 8 calaveras hozen antiguas."}},
[29561] = {"Contra todo pronóstico", nil, {"Encuentra a los agentes del IV:7."}},
[29562] = {"Fuga", nil, {"Mata a 10 destripapeces Colafusta."}},
[29563] = {"Desaparecidos en combate", nil, {"Averigua lo que le ha sucedido al naturalista Mordisco y al desherbador Pulgaverde. Después, vuelve con la vigía Jhang."}},
[29564] = {"Traición fraternal", nil, {"Mata a Mennu el Traidor y después, vuelve con Nahuud."}},
[29565] = {"El corazón de la cuestión", nil, {"Lleva la garra del invasor y el ojo del maestro de esclavos a la vigía Jhang."}},
[29566] = {"Investigar", nil, {"Habla con la vigía Jhang en el Recinto de los Esclavos."}},
[29567] = {"La Acechadora acechada", nil, {"Tráele el cerebro de la Acechadora Negra a T'shu."}},
[29568] = {"Un mal necesario", nil, {"Mata a Panthambre y después, vuelve para informar al naturalista Mordisco."}},
[29570] = {"Rescatar la expedición", nil, {"Descubre qué le ocurrió al vinculador terrestre Rayge y al clamavientos Zarpa. Luego, vuelve con la vigía Jhang."}},
[29571] = {"Defender lo salvaje", nil, {"Habla con la vigía Jhang en La Sotiénaga."}},
[29573] = {"La seguridad es prioritaria", nil, {"Mata a 10 asaltantes de tumbas etéreos, a 5 brujas etéreas, a 5 acechadores de El Nexo y a 5 vinculahechizos etéreos. Luego vuelve con el artificiero Morphalius."}},
[29574] = {"Especímenes interesantes", nil, {"Lleva la esencia de Pandemonius y el corazón de Tavarok a Mamdy el \"Todólogo\"."}},
[29575] = {"Eliminar a la competencia", nil, {"Lleva las vendas de Shaffar al artificiero Morphalius."}},
[29576] = {"La preocupación está en el aire", nil, {"Habla con Shao el Desafiante en el Huerto Brisa Dulce."}},
[29577] = {"La visión de Ashyo", nil, {"Habla con Ashyo en las Pozas de la Pureza y observa su ritual."}},
[29578] = {"Resistencia", nil, {"Mata a 8 asaltantes Gormali y a 8 incineradores Gormali en el Huerto Brisa Dulce."}},
[29579] = {"Reunir a los supervivientes", nil, {"Habla con 5 granjeros de Brisa Dulce en los alrededores del Huerto Brisa Dulce y envíalos al refugio."}},
[29580] = {"Herramientas de huerto", nil, {"Consigue 6 herramientas de huerto del Huerto Bris


 client.response.emit(
                    msg.channel,
                    `Task completed in ${(new Date().getTime() - startTime) / 1000} seconds.`,
                    "success"
                );
            }

            case "runnow": {
                if (args.length != 2) return this.sendInvalidUsage(msg, client);

                const id = args[1];
                const task = client.scheduler.getTask(id);

                if (task == undefined) {
                    return client.response.emit(msg.channel, `A task with ID '${id}' could not be found!`, "invalid");
                }

                const runMsg = await msg.channel.send("Your task is running...");

                const startTime = new Date().getTime();
                task.delayed = undefined;
                await client.scheduler.runTask(task);

                // replace the task with a delayed property set
                client.scheduler.deleteTask(task.id!);
                task.delayed = task.id + "_runnow";
                client.scheduler.createTask(task);

                runMsg.delete();
                return client.response.emit(
                    msg.channel,
                    `Task completed in ${(new Date().getTime() - startTime) / 1000} seconds.`,
                    "success"
                );
            }

            case "info": {
                if (args.length != 2) return this.sendInvalidUsage(msg, client);

                const id = args[1];
                const task = client.scheduler.getTask(id);

                if (task == undefined) {
                    return client.response.emit(msg.channel, `A task with ID '${id}' could not be found!`, "invalid");
                }

                return msg.channel.send("```json\n" + JSON.stringify(task, null, 2) + "```");
            }

            default:
                return this.sendInvalidUsage(msg, client);
        }
    }
}
import { PipeTransform, Pipe } from '@angular/core';
import { IProduct } from './product'

@Pipe({
    name: 'productFilter'
})
export class ProductFilterPipe implements PipeTransform {

    transform(value: IProduct[], searchTerm: string): IProduct[] {

        searchTerm = searchTerm ? searchTerm.toLowerCase() : null;

        return searchTerm ? value.filter((product: IProduct) =>
            product.productName.toLowerCase().indexOf(searchTerm) !== -1) : value;

    }
}const Command = require("../structures/Command");
import { CommandOptions } from "../types/Command";
import { BrittaEmbed } from "../util/embed";
import { getGuildPrefix, setNewGuildPrefix } from "../util/prefix";
const {
  commands: { categories },
  client,
} = require("../config");

module.exports = class Prefix extends Command {
  constructor(client: any) {
    super(<CommandOptions>{
      client: client,
      name: "prefix",
      description: "Shows or edits the current bot prefix of this server",
      aliases: ["setprefix"],
      usages: ["", "new_prefix", "reset"],
      examples: ["", "+"],
      categories: [categories.config],
      cooldown: 5,
      voteLocked: false,
    });
  }

  async execute(message, args) {
    const oldPrefix = await getGuildPrefix(message.guild.id);
    if (!args.length) {
      return message.channel.send(
        new BrittaEmbed(message, {
          author: { name: "💬 The current prefix is:" },
          description: "`" + oldPrefix + "`",
          timestamp: new Date(),
        })
      );
    } else {
      let newPrefix;

      if (args[0] === "


1, 1) 0s;
  transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 2px 0 rgba(0, 0, 0, 0.05);
}
.deep-2 {
  box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 2px 0 rgba(0, 0, 0, 0.05);
}
.deep-2.deep_hover:hover {
  -webkit-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  -moz-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  -o-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  box-shadow: 0 13px 25px 0 rgba(0, 0, 0, 0.1), 0 11px 7px 0 rgba(0, 0, 0, 0.09);
}
.deep-3 {
  box-shadow: 0 13px 25px 0 rgba(0, 0, 0, 0.1), 0 11px 7px 0 rgba(0, 0, 0, 0.09);
}
.deep-3.deep_hover:hover {
  -webkit-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  -moz-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  -o-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.1), 0 14px 12px 0 rgba(0, 0, 0, 0.07);
}
.deep-4 {
  box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.1), 0 14px 12px 0 rgba(0, 0, 0, 0.07);
}
.deep-4.deep_hover:hover {
  -webkit-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  -moz-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  -o-transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  transition: box-shadow 0.3s cubic-bezier(0.55, 0, 0.1, 1) 0s;
  box-shadow: 0 27px 55px 0 rgba(0, 0, 0, 0.1), 0 17px 17px 0 rgba(0, 0, 0, 0.05);
}
.deep-5 {
  box-shadow: 0 27px 55px 0 rgba(0, 0, 0, 0.1), 0 17px 17px 0 rgba(0, 0, 0, 0.05);
}
.modal-open #wrapwrap > main {
  z-index: auto;
}
.modal-open #wrapwrap > footer {
  z-index: -1 !important;
}
.odoo_primary {
  background-color: #a24689;
  color: white;
}
.odoo_primary * {
  color: inherit;
}

.loempia_link{color:#21b799}.loempia_link:hover{color:#198c75}.rating_star_active{color:#a24689}.rating_star_inactive{color:#dcddde}.loempia_tags{font-size:12px;line-height:1.42857143}.loempia_tags .fa{margin-left:10px;color:#a24689}.loempia_tags .label{padding:.3em .8em;background-color:#a24689;font-size:10px}input:focus::-webkit-input-placeholder,textarea:focus::-webkit-input-placeholder{color:#fff}input:focus::-moz-placeholder,textarea


Type(OTHER);
			ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
		}
		// overwrite previous ADPU type as soon as possible
		setPreviousApduType(OTHER);

		// it is impossible to generate basic signatures with this command
		if (getSignatureType() == BASIC)
			ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
		// check if cardholder PIN was entered correctly
		if (!cardholderPin.isValidated())
			ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);

		////@ close valid(); // auto
		JCSystem.commitTransaction();
		////@ open [1/2]valid(); // auto
		switch (signatureAlgorithm) {
		case ALG_MD5_PKCS1:
			////@ close [1/2]valid(); // auto
			generatePkcs1Md5Signature(apdu, buffer);
			////@ open [1/2]valid(); // auto
			break;
		case ALG_SHA1_PKCS1:
			////@ close [1/2]valid(); // auto
			generatePkcs1Sha1Signature(apdu, buffer);
			////@ open [1/2]valid(); // auto
			break;
		case ALG_PKCS1:
			////@ close [1/2]valid(); // auto
			generatePkcs1Signature(apdu, buffer);
			////@ open [1/2]valid(); // auto
			break;
		}
		////@ close [1/2]valid(); // auto
		// if T=1, store signature in sigBuffer so that it can latter be sent
		if (APDU.getProtocol() == APDU.PROTOCOL_T1) {
			JCSystem.beginTransaction();
			//@ open valid(); // todo (???)
			Util.arrayCopy(buffer, (short) 0, responseBuffer, (short) 0, (short) 128);
			////@ close valid(); // auto
			JCSystem.commitTransaction();

			// in case T=0 protocol, send the signature immediately in a
			// response APDU
		} else {
			// send first 128 bytes (= 1024 bit) of buffer
			apdu.setOutgoingAndSend((short) 0, (short) 128);
		}
	}
	/**
	 * generate PKCS#1 MD5 signature
	 */
	private void generatePkcs1Md5Signature(APDU apdu, byte[] buffer)
  	    //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);
      	    //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);
	{
		// receive the data that needs to be signed
		short byteRead = apdu.setIncomingAndReceive();
		// check Lc
		short lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);
		if ((lc != 16) || (byteRead != 16))
			ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
		// use the correct key
		////@ open [1/2]valid(); // auto

		if (getSignatureType() == NON_REPUDIATION) {
			cipher.init((RSAPrivateCrtKey)nonRepKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);
		}
		if (getSignatureType() == AUTHENTICATION) {
			cipher.init((RSAPrivateCrtKey)authKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);
		}
		////@ close [1/2]valid(); // auto
		JCSystem.beginTransaction();

		////@ open valid(); // todo

		//@ transient_byte_arrays_mem(messageBuffer);
		//@ assert transient_byte_arrays(?as);
		//@ foreachp_remove(messageBuffer, as);
		////@ open transient_byte_array(messageBuffer); //