);
    });
  }

  /**
   * Send all messages in queue
   */
  private sendMessageQueue = () => {
    for (let buffer of this.messageQueue) {
      this.encodeAndSend(buffer);
    }
  }

  /**
   * Called on UDP server connect
   */
  private onServerConnect = () => {
    const address = this.server.address();
    console.log(`server listening ${address.address}:${address.port}`);
  }

  /**
   * Use hamming codes to add parity bits to buffer
   * @param buf Buffer to encode
   */
  private encodeHammingBuffer(buf: Buffer): Buffer {
    let outputBitArray: Bit[] = [];
    for (let i = 0; i < buf.length; i++) {
      let bitArray = bitwise.buffer.read(buf, i * 8, 8);
      // Calculate and add parity bits and return the new array ([7,4] Hamming code)
      let hamBit1: Bit = ((bitArray[0] + bitArray[1] + bitArray[3]) % 2) ? 1 : 0;
      let hamBit2: Bit = ((bitArray[0] + bitArray[2] + bitArray[3]) % 2) ? 1 : 0;
      let hamBit3: Bit = ((bitArray[1] + bitArray[2] + bitArray[3]) % 2) ? 1 : 0;
      let hamBit4: Bit = ((bitArray[4] + bitArray[5] + bitArray[7]) % 2) ? 1 : 0;
      let hamBit5: Bit = ((bitArray[4] + bitArray[6] + bitArray[7]) % 2) ? 1 : 0;
      let hamBit6: Bit = ((bitArray[5] + bitArray[6] + bitArray[7]) % 2) ? 1 : 0;
      let pushArray: Bit[] = [
        hamBit1, hamBit2, bitArray[0], hamBit3, bitArray[1], bitArray[2], bitArray[3], 0,
        hamBit4, hamBit5, bitArray[4], hamBit6, bitArray[5], bitArray[6], bitArray[7], 0
      ];
      outputBitArray.push(...pushArray);
    }
    return bitwise.buffer.create(outputBitArray);
  }

  /**
   * Use Hamming code to correct flipped bits in buffer and remove parity bits
   * @param buf Buffer to decode
   */
  private decodeHammingBuffer(buf: Buffer): Buffer {
    let outputBitArray: Bit[] = [];
    for (let i = 0; i < buf.length; i++) {
      let bitArray = bitwise.buffer.read(buf, i * 8, 8);
      this.fixBitArray(bitArray);

      // Create new array from original bits
      let cleanedArray: Bit[] = [
        bitArray[2], bitArray[4], bitArray[5], bitArray[6]
      ];
      outputBitArray.push(...cleanedArray);
    }
    return bitwise.buffer.create(outputBitArray);
  }

  /**
   * Encode a message and send over UDP socket
   * @param buf Message to send
   */
  private encodeAndSend(buf: Buffer): void {
    let encodedBuf = this.encodeHammingBuffer(buf);
    this.server.send(encodedBuf, 0, encodedBuf.length, this.sendPort, this.sendAddress, (err) => {
      if (err) {
        console.log(`There was an error sending udp message: ${err}`);
      }
    });
  }

  /**
   * Use Hamming codes to fix array of bits in place
   * @param array Array to fix
   */
  private fixBitArray(array: Bit[]): void {
    let hamBit1: Bit = ((array[2] + array[4] + array[6]) % 2) ? 1 : 0;
    let hamBit2: Bit = ((array[2] + array[5] + array[6]) % 2) ? 1 : 0;
    let hamBit3: Bit = ((array[4] + array[5] + array[6]) % 2) ? 1 : 0;
    let correctPosition = -1;
    if (hamBit1 !== array[0]) {
      correctPosition += 1;
    }
    if (hamBit2 !== array[1]) {
      correctPosition += 2;
    }
    if (hamBit3 !== array[3]) {
      correctPosition += 4;
    }
    if (correctPosition >= 0) {
      array[correctPosition] = array[correctPosition] ? 0 :


r->pin_data].pin)
				{
					data[i] |= mask;
				}
				pin_config[shift_register->pin_clk].port->ODR |= pin_config[shift_register->pin_clk].pin;
				for (int i=0; i<SHIFTREG_TICK_DELAY; i++) __NOP();

				mask = mask >> 1;
			} while (mask);
		}
		else	// inverted connection
		{
			do
			{
				pin_config[shift_register->pin_clk].port->ODR &= ~pin_config[shift_register->pin_clk].pin;
				for (int i=0; i<SHIFTREG_TICK_DELAY; i++) __NOP();
				if(!(pin_config[shift_register->pin_data].port->IDR & pin_config[shift_register->pin_data].pin))
				{
					data[i] |= mask;
				}
				pin_config[shift_register->pin_clk].port->ODR |= pin_config[shift_register->pin_clk].pin;
				for (int i=0; i<SHIFTREG_TICK_DELAY; i++) __NOP();

				mask = mask >> 1;
			} while (mask);
		}
	}
}

/**
  * @brief  Getting buttons states from shift registers
	* @param  raw_button_data_buf: Pointer to raw buttons data buffer
	* @param  p_dev_config: Pointer to device configuration
	* @param  pos: Pointer to button position counter
  * @retval None
  */
void ShiftRegistersGet (uint8_t * raw_button_data_buf, dev_config_t * p_dev_config, uint8_t * pos)
{
	uint8_t input_data[16];
	for (uint8_t i=0; i<MAX_SHIFT_REG_NUM; i++)
	{
		if (shift_registers[i].pin_latch >=0 && shift_registers[i].pin_data >=0)
		{
			ShiftRegisterRead(&shift_registers[i], input_data);

			for (uint8_t j=0; j<shift_registers[i].button_cnt; j++)
			{
				if ((*pos) <128)
				{
					raw_button_data_buf[(*pos)] = (input_data[(j & 0xF8)>>3] & (1<<(j & 0x07))) > 0 ? 1 : 0;

					(*pos)++;
				}
				else break;
			}

		}
	}
}


CARD, field);
        return this;
    }

    /**
     * Set the cl parameter IN value to the routine
     */
    public void setCl(ClassesRecord value) {
        setValue(CL, value);
    }

    /**
     * Set the cl parameter to the function to be used with a
     * {@link org.jooq.Select} statement
     */
    public CardMessage setCl(Field<ClassesRecord> field) {
        setField(CL, field);
        return this;
    }
}
/*
 * This file is generated by jOOQ.
 */
package com.hiddenswitch.framework.schema.spellsource.tables;

import com.hiddenswitch.framework.schema.spellsource.Spellsource;
import com.hiddenswitch.framework.schema.spellsource.tables.records.CardCatalogueGetBannedDraftCardsRecord;

import java.util.function.Function;

import org.jooq.Field;
import org.jooq.Function1;
import org.jooq.Name;
import org.jooq.Records;
import org.jooq.Row1;
import org.jooq.Schema;
import org.jooq.SelectField;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;

/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CardCatalogueGetBannedDraftCards extends TableImpl<CardCatalogueGetBannedDraftCardsRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * spellsource.card_catalogue_get_banned_draft_cards
     */
    public static final CardCatalogueGetBannedDraftCards CARD_CATALOGUE_GET_BANNED_DRAFT_CARDS = new CardCatalogueGetBannedDraftCards();

    /**
     * The class holding records for this type
     */
    @Override
    public Class<CardCatalogueGetBannedDraftCardsRecord> getRecordType() {
        return CardCatalogueGetBannedDraftCardsRecord.class;
    }

    /**
     * The column
     * spellsource.card_catalogue_get_banned_draft_cards.card_id.
     */
    public final TableField<CardCatalogueGetBannedDraftCardsRecord, String> CARD_ID = createField(DSL.name("card_id"), SQLDataType.CLOB, this, "");

    private CardCatalogueGetBannedDraftCards(Name alias, Table<CardCatalogueGetBannedDraftCardsRecord> aliased) {
        this(alias, aliased, new Field[] {
        });
    }

    private CardCatalogueGetBannedDraftCards(Name alias, Table<CardCatalogueGetBannedDraftCardsRecord> aliased, Field<?>[] parameters) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function());
    }

    /**
     * Create an aliased
     * spellsource.card_catalogue_get_banned_draft_cards table
     * reference
     */
    public CardCatalogueGetBannedDraftCards(String alias) {
        this(DSL.name(alias), CARD_CATALOGUE_GET_BANNED_DRAFT_CARDS);
    }

    /**
     * Create an aliased
     * spellsource.card_catalogue_get_banned_draft_cards table
     * reference
     */
    public CardCatalogueGetBannedDraftCards(Name alias) {
        this(alias, CARD_CATALOGUE_GET_BANNED_DRAFT_CARDS);
    }

    /**
     * Create a spellsource.card_catalogue_get_banned_draft_cards
     * table reference
     */
    public


Match2
.Matched2:
	cmpl $0, SA1Opcodes
	movl $0, SA1WaitCounter
	setnz %al
	movb %al, SA1Executing
.NoMatch2:
	popl %ecx
	movw %cx, (%edx)
#else
	popl %ecx
	movw %cx, (%eax, %edx)
#endif
	ret

.SWSpecial:
	jmp *.SWJmpTable(, %eax, 4)
.data
	.align 4
.SWJmpTable:
	.long .SWPPU    /* MAP_PPU */
	.long .SWCPU    /* MAP_CPU */
	.long .SWDSP    /* MAP_DSP */
	.long .SWLSRAM  /* MAP_LOROM_SRAM */
	.long .SWHSRAM  /* MAP_HIROM_SRAM */
	.long .SWNONE   /* MAP_NONE */
	.long .SWDEBUG  /* MAP_DEBUG */
	.long .SWC4     /* MAP_C4 */
	.long .SWBWRAM  /* MAP_BWRAM */
	.long .SWNONE   /* MAP_BWRAM_BITMAP */
	.long .SWNONE   /* MAP_BWRAM_BITMAP2 */
	.long .SWNONE   /* MAP_SA1RAM */
	.long .SWNONE   /* MAP_SPC7110_ROM */
	.long .SWNONE   /* MAP_SPC7110_DRAM */
	.long .SWNONE   /* MAP_RONLY_SRAM */
	.long .SWOBC1   /* MAP_OBC_RAM */
	.long .SWSDSP   /* MAP_SETA_DSP */
	.long .SWSRISC  /* MAP_SETA_RISC */

.text
.SWPPU: /* MAP_PPU */
	movb InDMA, %cl
	testb %cl, %cl
        jnz .SWAtBlockBoundary
	STORE_REGISTERS
	popl %eax
	pushl %edx	/* Save Address because S9xSetPPU will use it with certain optimizations enabled */
	pushl %eax	/* Save Byte because S9xSetPPU will use it with certain optimizations enabled */
	pushl %edx
	pushl %eax
	ccall S9xSetPPU
	popl %eax
	popl %edx
	popl %eax
	popl %edx
	pushl %edx
	movb %ah, %al
	incl %edx
	pushl %edx
	pushl %eax
	ccall S9xSetPPU
	LOAD_REGISTERS
	addl $8, %esp
	popl %edx
	ret

.SWCPU: /* MAP_CPU */
	STORE_REGISTERS
	popl %eax
	pushl %edx	/* Save Address because S9xSetCPU will use it with certain optimizations enabled */
	pushl %eax	/* Save Byte because S9xSetCPU will use it with certain optimizations enabled */
	pushl %edx
	pushl %eax
	ccall S9xSetCPU
	popl %eax
	popl %edx
	popl %eax
	popl %edx
	pushl %edx
	movb %ah, %al
	incl %edx
	pushl %edx
	pushl %eax
	ccall S9xSetCPU
	LOAD_REGISTERS
	addl $8, %esp
	popl %edx
	ret

.SWDSP: /* MAP_DSP */
	popl %eax
	pushl %edx	/* Save Address because S9xSetDSP will use it with certain optimizations enabled */
	pushl %eax	/* Save Byte because S9xSetDSP will use it


?.isNonEmpty(): Boolean = this?.isNotEmpty() ?: false
fun IntArray?.isNonEmpty(): Boolean = this?.isNotEmpty() ?: false
fun LongArray?.isNonEmpty(): Boolean = this?.isNotEmpty() ?: false
fun FloatArray?.isNonEmpty(): Boolean = this?.isNotEmpty() ?: false
fun DoubleArray?.isNonEmpty(): Boolean = this?.isNotEmpty() ?: false
fun <T> Array<T>?.isNonEmpty(): Boolean = this?.isNotEmpty() ?: false

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun BooleanArray.setAll(supplier: (index: Int) -> Boolean): BooleanArray = apply {
    indices.forEach { this[it] = supplier(it) }
}

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun CharArray.setAll(supplier: (index: Int) -> Char): CharArray = apply {
    indices.forEach { this[it] = supplier(it) }
}

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun ByteArray.setAll(supplier: (index: Int) -> Byte): ByteArray = apply {
    indices.forEach { this[it] = supplier(it) }
}

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun ShortArray.setAll(supplier: (index: Int) -> Short): ShortArray = apply {
    indices.forEach { this[it] = supplier(it) }
}

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun IntArray.setAll(supplier: (index: Int) -> Int): IntArray = apply {
    indices.forEach { this[it] = supplier(it) }
}

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun LongArray.setAll(supplier: (index: Int) -> Long): LongArray = apply {
    indices.forEach { this[it] = supplier(it) }
}

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun FloatArray.setAll(supplier: (index: Int) -> Float): FloatArray = apply {
    indices.forEach { this[it] = supplier(it) }
}

/**
 * Array의 요소에 지정한 `supplier`를 통해 값을 설정합니다.
 *
 * @param supplier 요소의 값을 제공하는 함수
 * @return
 */
inline fun DoubleArray.setAll(supplier: (index: Int) -> Double): DoubleArray = apply {
    indic


mand = function(self)
		self:xy(0, SCREEN_HEIGHT - bottomFrameHeight):halign(0):valign(0):zoomto(SCREEN_WIDTH, borderWidth):diffuse(
			getMainColor("highlight")
		):diffusealpha(0.5)
	end
}

--[[
if themeConfig:get_data().global.TipType == 2 or themeConfig:get_data().global.TipType == 3 then
	t[#t + 1] =
		LoadFont("Common Normal") ..
		{
			InitCommand = function(self)
				self:xy(SCREEN_CENTER_X, SCREEN_BOTTOM - 7):zoom(0.35):settext(
					getRandomQuotes(themeConfig:get_data().global.TipType)
				):diffuse(getMainColor("highlight")):diffusealpha(0):zoomy(0):maxwidth((SCREEN_WIDTH - 350) / 0.35)
			end,
			BeginCommand = function(self)
				self:sleep(2)
				self:smooth(1)
				self:diffusealpha(1)
				self:zoomy(0.35)
			end
		}
end
]]

return t


    public String updateByPrimaryKeySelective(MailDomain record) {
        SQL sql = new SQL();
        sql.UPDATE("mail");

        if (record.getPlayerId() != null) {
            sql.SET("player_id = #{playerId,jdbcType=BIGINT}");
        }

        if (record.getPlayerSuperId() != null) {
            sql.SET("player_super_id = #{playerSuperId,jdbcType=BIGINT}");
        }

        if (record.getPlayerName() != null) {
            sql.SET("player_name = #{playerName,jdbcType=VARCHAR}");
        }

        if (record.getFromPlayerId() != null) {
            sql.SET("from_player_id = #{fromPlayerId,jdbcType=BIGINT}");
        }

        if (record.getFromPlayerSuperId() != null) {
            sql.SET("from_player_super_id = #{fromPlayerSuperId,jdbcType=BIGINT}");
        }

        if (record.getFromPlayerName() != null) {
            sql.SET("from_player_name = #{fromPlayerName,jdbcType=VARCHAR}");
        }

        if (record.getGold() != null) {
            sql.SET("gold = #{gold,jdbcType=BIGINT}");
        }

        if (record.getTitle() != null) {
            sql.SET("title = #{title,jdbcType=VARCHAR}");
        }

        if (record.getIsRead() != null) {
            sql.SET("is_read = #{isRead,jdbcType=BIT}");
        }

        if (record.getIsRecGold() != null) {
            sql.SET("is_rec_gold = #{isRecGold,jdbcType=BIT}");
        }

        if (record.getCreateTime() != null) {
            sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
        }

        if (record.getContent() != null) {
            sql.SET("content = #{content,jdbcType=LONGVARCHAR}");
        }

        sql.WHERE("id = #{id,jdbcType=INTEGER}");

        return sql.toString();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mail
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    protected void applyWhere(SQL sql, MailDomainExample example, boolean includeExamplePhrase) {
        if (example == null) {
            return;
        }

        String parmPhrase1;
        String parmPhrase1_th;
        String parmPhrase2;
        String parmPhrase2_th;
        String parmPhrase3;
        String parmPhrase3_th;
        if (includeExamplePhrase) {
            parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
            parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
            parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
            parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
            parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
            parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
        } else {
            parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
            parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
            parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
            parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
            parmPhrase3 = "#{oredCriteria[%d].


ref.getDownloadURL());
            console.log('resolved');
          }
        );
      }
    );
  }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
'use strict';

import {describe, expect} from '@jest/globals'
import {StateFun} from "../src/statefun";

import {kinesisEgressMessage, kafkaEgressMessage} from "../src/egress";
import {trySerializerForEgress} from "../src/egress";

describe('Egress', () => {

    it('Kafka egress builder should construct a correct record', () => {
        let egress = kafkaEgressMessage({
            typename: "foo/bar",
            topic: "greets",
            value: "hello world"
        });

        expect(egress.typename).toStrictEqual("foo/bar");
        expect(egress.typedValue.getTypename()).toStrictEqual("type.googleapis.com/io.statefun.sdk.egress.KafkaProducerRecord");
        expect(egress.typedValue.getHasValue()).toStrictEqual(true);
        expect(egress.typedValue.getValue_asU8().length > 0).toStrictEqual(true);
    });

    it('Kinesis egress builder should construct a correct record', () => {
        let egress = kinesisEgressMessage({
            typename: "foo/bar",
            stream: "greets",
            partitionKey: "foo",
            value: JSON.stringify({a: "a", b: "b"}),
            valueType: StateFun.jsonType("foo/bar")
        });

        expect(egress.typename).toStrictEqual("foo/bar");
        expect(egress.typedValue.getTypename()).toStrictEqual("type.googleapis.com/io.statefun.sdk.egress.KinesisEgressRecord");
        expect(egress.typedValue.getHasValue()).toStrictEqual(true);
        expect(egress.typedValue.getValue_asU8().length > 0).toStrictEqual(true);
    });

    it('Should deduce a UTF8 string type', () => {
        let bytes = trySerializerForEgress(null, "hello world");
        expect(bytes instanceof Uint8Array).toStrictEqual(true);
        expect(bytes.toString()).toStrictEqual("hello world");
    });

    it('Should accept raw bytes', () => {
        let bytes = trySerializerForEgress(null, Buffer.from("hello world"));
        expect(bytes instanceof Uint8Array).toStrictEqual(true);
        expect(bytes.toString()).toStrictEqual("hello world");
    });

    it('Should accept Uint8Array', () => {
        let arr = new Uint8Array([1, 2, 3, 4]);
        let bytes = trySerializerForEgress(null, arr);
        expect(bytes instanceof Uint8Array).toStrictEqual(true);
        expect(bytes).toStrictEqual(Buffer.from(arr));
    });

    it('Should serializer an integer as a 32 bit big endian', () => {
        let bytes = trySerializerForEgress(null, 1234567);
        expect(bytes instanceof Uint8Array).toStrictEqual(true);
        expect(bytes.readInt32BE(0)).toSt


 'M', 'ʢ'),
    (0x107B5, 'M', 'ʘ'),
    (0x107B6, 'M', 'ǀ'),
    (0x107B7, 'M', 'ǁ'),
    (0x107B8, 'M', 'ǂ'),
    (0x107B9, 'M', '𝼊'),
    (0x107BA, 'M', '𝼞'),
    (0x107BB, 'X'),
    (0x10800, 'V'),
    (0x10806, 'X'),
    (0x10808, 'V'),
    (0x10809, 'X'),
    (0x1080A, 'V'),
    (0x10836, 'X'),
    (0x10837, 'V'),
    (0x10839, 'X'),
    (0x1083C, 'V'),
    (0x1083D, 'X'),
    (0x1083F, 'V'),
    (0x10856, 'X'),
    (0x10857, 'V'),
    (0x1089F, 'X'),
    (0x108A7, 'V'),
    (0x108B0, 'X'),
    (0x108E0, 'V'),
    (0x108F3, 'X'),
    (0x108F4, 'V'),
    (0x108F6, 'X'),
    (0x108FB, 'V'),
    (0x1091C, 'X'),
    (0x1091F, 'V'),
    (0x1093A, 'X'),
    (0x1093F, 'V'),
    (0x10940, 'X'),
    (0x10980, 'V'),
    (0x109B8, 'X'),
    (0x109BC, 'V'),
    (0x109D0, 'X'),
    (0x109D2, 'V'),
    (0x10A04, 'X'),
    (0x10A05, 'V'),
    (0x10A07, 'X'),
    (0x10A0C, 'V'),
    (0x10A14, 'X'),
    (0x10A15, 'V'),
    (0x10A18, 'X'),
    (0x10A19, 'V'),
    (0x10A36, 'X'),
    (0x10A38, 'V'),
    (0x10A3B, 'X'),
    (0x10A3F, 'V'),
    (0x10A49, 'X'),
    (0x10A50, 'V'),
    (0x10A59, 'X'),
    (0x10A60, 'V'),
    (0x10AA0, 'X'),
    (0x10AC0, 'V'),
    (0x10AE7, 'X'),
    (0x10AEB, 'V'),
    (0x10AF7, 'X'),
    (0x10B00, 'V'),
    ]

def _seg_56() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x10B36, 'X'),
    (0x10B39, 'V'),
    (0x10B56, 'X'),
    (0x10B58, 'V'),
    (0x10B73, 'X'),
    (0x10B78, 'V'),
    (0x10B92, 'X'),
    (0x10B99, 'V'),
    (0x10B9D, 'X'),
    (0x10BA9, 'V'),
    (0x10BB0, 'X'),
    (0x10C00, 'V'),
    (0x10C49, 'X'),
    (0x10C80, 'M', '𐳀'),
    (0x10C81, 'M', '𐳁'),
    (0x10C82, 'M', '𐳂'),
    (0x10C83, 'M', '𐳃'),
    (0x10C84, 'M', '𐳄'),
    (0x10C85, 'M', '𐳅'),
    (0x10C86, 'M', '𐳆'),
    (0x10C87, 'M', '𐳇'),
    (0x10C88, 'M', '𐳈'),
    (0x10C89, 'M', '𐳉'),
    (0x10C8A, 'M', '𐳊'),
    (0x10C8B, 'M', '𐳋'),
    (0x10C8C, 'M', '𐳌'),
    (0x10C8D, 'M', '𐳍'),
    (0x10C8E, 'M', '𐳎'),
    (0x10C8F, 'M', '𐳏'),
    (0x10C90, 'M', '𐳐'),
    (0x10C91, 'M', '𐳑'),
    (0x10C92, 'M', '𐳒'),
    (0x10C93, 'M', '𐳓'),
    (0x10C94, 'M', '𐳔'),
    (0x10C95, 'M', '𐳕'),
    (0x10C96, 'M', '𐳖'),
    (0x10C97, 'M', '𐳗'),
    (0x10C98, 'M', '𐳘'),
    (0x10C99, 'M', '𐳙'),
    (0x10C9A, 'M', '𐳚'),
    (0x10C9B, 'M', '𐳛'),
    (0x10C9C, 'M', '𐳜'),
    (0x10C9D, 'M', '𐳝'),
    (0x10C9E, 'M', '𐳞'),
    (0x10C9F, 'M', '𐳟'),
    (0x10CA0, 'M', '𐳠'),
    (0x10CA1, 'M', '𐳡'),
    (0x10CA2, 'M', '𐳢'),
    (0x10CA3, 'M', '𐳣'),
    (0x10CA4, 'M', '𐳤'),
    (0x10CA5, 'M', '𐳥'),
    (0x10CA6, 'M', '𐳦'),
    (0x10CA7, 'M', '𐳧'),
    (0x10CA8, 'M', '𐳨'),
    (0x10CA9, 'M', '𐳩'),
    (0x10CAA, 'M', '𐳪'),
    (0x10CAB, 'M', '𐳫'),
    (0x10CAC, 'M', '𐳬'),
    (0x10CAD, 'M', '𐳭'),
    (0x10CAE, 'M', '𐳮'),
    (0x10CAF, 'M', '𐳯'),
    (0x10CB0, 'M', '𐳰'),
    (0x10CB1, 'M', '𐳱'),
    (0x10CB2, 'M', '𐳲'),
    (0x10CB3, 'X'),
    (0x10CC0, 'V'),
    (0x10CF3, 'X'),
    (0x10CFA, 'V'),
    (0x10D28, 'X'),
    (0x10D30, 'V'),
    (0x10D3A, 'X'),
    (0x10E60, 'V'),
    (0x10E7F, 'X'),
    (0x10E80, 'V'),
    (0x10EAA, 'X'),
    (0x10EAB, 'V'),
    (0x10EAE, 'X'),
    (0x10EB0, 'V'),
    (0x10EB2, 'X'),
    (0x10EFD, 'V'),
    (0x10F28, 'X'),
    (0x10F30, 'V'),
    (0x10F5A, 'X'),
    (0x10F70, 'V'),
    (0x10F8A, 'X'),
    (0x10FB0, 'V'),
    (0x10FCC, 'X'),
    (0x10FE0, 'V'),
    (0x10FF7, 'X'),
    (0x11000, 'V'),
    (0x1104E, 'X'),
    (0x11052, 'V'),
    (0x11076, 'X'),
    (0x1107F, 'V'),
    (0x110BD, 'X'),
    (0x110BE, 'V'),
    (0x110C3, 'X'),
    (0x110D0, 'V'),
    (0x110E9, 'X'),
    (0x110F0, 'V'),
    ]

def _seg_57() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x110FA, 'X'),
    (0x11100, 'V'),
    (0x11135, 'X'),
    (0x11136, 'V'),
    (0x11148, 'X'),
    (0x11150, 'V'),
    (0x11177, 'X'),
    (0x11180, 'V'),
    (0x111E0, 'X'),
    (0x111E1, 'V'),
    (0x111F5, 'X'),
    (0x11200, 'V'),
    (0x11212, 'X'),
    (0x11213, 'V'),
    (0x11242, 'X'),
    (0x11280, 'V'),
    (0x11287, 'X'),
    (0x11288, 'V'),
    (0x11289, 'X'),
    (0x1128A, 'V'),
    (0x1128E, 'X'),
    (0x1128F, 'V'),
    (0x1129E, 'X'),
    (0x1129F, 'V'),
    (0x112AA, 'X'),
    (0x112B0, 'V'),
    (0x112EB, 'X'),
    (0x112F0, 'V'),
    (0x112FA, 'X'),
    (0x11300, 'V'),
    (0x11304, 'X'),
    (0x11305, 'V'),
    (0x1130D, 'X'),
    (0x1130F, 'V'),
    (0x11311, 'X'),
    (0x11313, 'V'),
    (0x11329, 'X'),
    (0x1132A, 'V'),
    (0x11331, 'X'),
    (0x11332, 'V'),
    (0x11334, 'X'),
    (


/h2>

    </hgroup>

Productivity
    rapid development, high productivity

Declarative
    meaningful, intuitive, powerful markup

Composibility
    apps from building blocks

Maintainability
    read an app, understand it

Reusability
    sharable: don't start from scratch)

Extensibility
    common way to extend native / custom elements

"Scoping"
    per-element CSS / DOM / APIs

Interoperability
    integrated at the lowest level (DOM)

Accessibility
    on by default

</slide>

<slide     hidden>

    <hgroup>

Web components bring much to the table

    </hgroup>

Productivity: rapid development, high productivity

Declarative: meaningful, intuitive, powerful

Composibility

Maintainability

Reusability / shareability: anyone can create something reusable (not just lib authors)

"Scoping" the problem: per-element CSS / DOM / APIs

Interoperability: DOM is the framework

Accessibility: on by default

</slide>

<slide  class="nobackground"  data-body-class="zen" >

    <hgroup>

    </hgroup>

Custom Elements is a bedrock API. We should be able to build all HTML elements with it.

- Dimitri Glazkov
flickr.com/photos/javajoba/


    # 检查依赖
    if args.check:
        if starter.check_dependencies():
            print("所有依赖项已满足")
        return 0

    # 检查依赖项
    if not starter.check_dependencies():
        print("\n请先安装缺少的依赖项:")
        print(f"python {__file__} --install")
        return 1

    # 交互式模式
    if args.interactive or not args.video:
        config = starter.interactive_setup()
    else:
        # 直接模式
        if not args.output:
            args.output = os.path.splitext(args.video)[0] + "_chatml.json"

        config = {
            'video': args.video,
            'user_track': args.user_track,
            'assistant_track': args.assistant_track,
            'output': args.output,
            'model': args.model
        }

    # 运行转换
    if starter.run_conversion(config):
        print(f"\n转换成功！输出文件: {config['output']}")
        return 0
    else:
        print("\n转换失败")
        return 1

if __name__ == "__main__":
    exit(main())


btain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use "variables" as v;

.header-logo {
  width: 180px;
}

.header-menu {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 0.75rem;
  margin-left: auto;
}

.header-icon-button {
  color: white !important;
}

.header-icon-button:hover {
  color: v.$text-green;
}

.profile-button {
  gap: 0.25rem;
}

.header-username {
  font-size: 14px;
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.html-content p {
  margin: 0 0 10px;
}

.accordion-icon {
  font-size: 0.9rem !important;
}

.properties-container {
  background: #fafafa;
}

.properties-labels-chip {
  margin-left: 0 !important;
  background: #ddedfd !important;
  color: #0061c2 !important;
  border: 1px solid #99ccff !important;
}

.properties-panel-name {
  flex: 1;
  text-align: left;
}

.custom-accordion-summary.Mui-expanded {
  min-height: auto !important;
}
.custom-accordion-summary.Mui-expanded
  .MuiAccordionSummary-content.Mui-expanded {
  margin: 12px 0 12px 8px !important;
}

.audit-detail-name {
  display: inline;
}

.bmattributes-key .MuiInputBase-sizeSmall {
  height: 34px;
}

.attribute-value-text > a {
  width: 100% !important;
  word-break: break-all;
}

.audit-attributes:has(.audit-attributes-item:nth-child(1):last-child)
  .audit-attributes-item {
  flex: 0 0 100%;
}

.audit-attributes:has(.audit-attributes-item:nth-child(2):last-child)
  .audit-attributes-item {
  flex: 0 0 calc(50% - 0.5rem);
}

.audit-attributes:has(.audit-attributes-item:nth-child(3):last-child)
  .audit-attributes-item:nth-child(-n + 2) {
  flex: 0 0 calc(50% - 0.5rem);
}
.audit-attributes:has(.audit-attributes-item:nth-child(3):last-child)
  .audit-attributes-item:nth-child(3) {
  flex: 0 0 100%;
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *


-size:1.25rem;padding-bottom:.5rem;padding-left:1rem;padding-top:.5rem}[data-bs-theme=dark] .form-select{--bs-form-select-bg-img:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E")}.form-check{display:block;margin-bottom:.125rem;min-height:1.5rem;padding-left:1.5em}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-left:0;padding-right:1.5em;text-align:right}.form-check-reverse .form-check-input{float:right;margin-left:0;margin-right:-1.5em}.form-check-input{--bs-form-check-bg:var(--bs-body-bg);appearance:none;background-color:var(--bs-form-check-bg);background-image:var(--bs-form-check-bg-image);background-position:50%;background-repeat:no-repeat;background-size:contain;border:var(--bs-border-width) solid var(--bs-border-color);flex-shrink:0;height:1em;margin-top:.25em;print-color-adjust:exact;vertical-align:top;width:1em}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;box-shadow:0 0 0 .1875rem var(--pst-color-accent);outline:0}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3E%3C/svg%3E")}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='2' fill='%23fff'/%3E%3C/svg%3E")}.form-check-input[type=checkbox]:indeterminate{--bs-form-check-bg-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3E%3C/svg%3E");background-color:#0d6efd;border-color:#0d6efd}.form-check-input:disabled{filter:none;opacity:.5;pointer-events:none}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{--bs-form-switch-bg:url("data:image/


klqdq %xmm7, %xmm6
movdqa %xmm3, %xmm2
psrld $12, %xmm2
pslld $20, %xmm3
movd (%edi,%ebx), %xmm7
por %xmm3, %xmm2
movzbl 79(%eax), %edi
addl $80, %eax
cmpl %ecx, %eax
movd (%edi,%ebx), %xmm3
punpcklqdq %xmm3, %xmm7
shufps $136, %xmm7, %xmm6
paddd %xmm6, %xmm0
paddd %xmm2, %xmm0
pxor %xmm0, %xmm4
movdqa %xmm4, %xmm6
pslld $24, %xmm4
psrld $8, %xmm6
por %xmm4, %xmm6
paddd %xmm6, %xmm5
pxor %xmm5, %xmm2
pshufd $78, %xmm5, %xmm3
movdqa %xmm2, %xmm5
psrld $7, %xmm5
pslld $25, %xmm2
por %xmm2, %xmm5
pshufd $57, %xmm6, %xmm4
pshufd $147, %xmm5, %xmm2
jb blake2s_blocks_sse2_22
blake2s_blocks_sse2_23:
pxor %xmm3, %xmm0
pxor %xmm4, %xmm2
pxor 80(%esp), %xmm0
pxor %xmm1, %xmm2
cmpl $64, %esi
ja blake2s_blocks_sse2_24
blake2s_blocks_sse2_25:
movl 8(%ebp), %eax
movdqu %xmm0, (%eax)
movdqu %xmm2, 16(%eax)
blake2s_blocks_sse2_29:
addl $180, %esp
popl %ebx
popl %edi
popl %esi
movl %ebp, %esp
popl %ebp
ret
FN_END blake2s_blocks_sse2

.p2align 6
blake2s_sigma:
.byte 0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60
.byte 56,40,16,32,36,60,52,24,4,48,0,8,44,28,20,12
.byte 44,32,48,0,20,8,60,52,40,56,12,24,28,4,36,16
.byte 28,36,12,4,52,48,44,56,8,24,20,40,16,0,60,32
.byte 36,0,20,28,8,16,40,60,56,4,44,48,24,32,12,52
.byte 8,48,24,40,0,44,32,12,16,52,28,20,60,56,4,36
.byte 48,20,4,60,56,52,16,40,0,28,24,12,36,8,32,44
.byte 52,44,28,56,48,4,12,36,20,0,60,16,32,24,8,40
.byte 24,60,56,36,44,12,0,32,48,8,52,28,4,16,40,20
.byte 40,8,32,16,28,24,4,20,60,44,36,56,12,48,52,0

blake2s_constants:
.long 0x6a09e667
.long 0xbb67ae85
.long 0x3c6ef372
.long 0xa54ff53a
.long 0x510e527f
.long 0x9b05688c
.long 0x1f83d9ab
.long 0x5be0cd19


피쓰리 플레이어도 빌려주면 일본에 다녀와서 택배로 보내 주겠다"고 거짓말을 하여 이에 속은 피해자로부터 현금 1,600,000원, 시가 1,295,000원 상당의 노트북(NT-X170-BABIP) 1대, 시가 200,000원 상당의 아이리버 엠피쓰리 플레이어(B20) 1대를 교부받았다.
그러나 사실은 자신의 신상 등에 관하여 거짓말한 것이고, 피해자로부터 금전과 노트북 등을 빌리더라도 이를 변제 또는 반환할 의사나 능력이 없었다.
이로써 피고인은 피해자에게 자신의 신분에 대해서 거짓말하여 호감을 산 후, 합계 3,095,000원 상당의 금품을 교부받아 편취하였다.피고인은 2019. 10. 15. 광주 광산구 <<<지하철역>>>RA<<</지하철역>>> 근처 카페에서 피해자 주식회사 <<<주식회사>>>B<<</주식회사>>>에 전화하여 대출을 신청하면서 피해자 은행의 성명불상 담당 직원으로부터 피해자 은행 이외 다른 금융회사에 대출을 신청한 사실이 있는지에 대하여 질문을 받고 '동시에 대출을 신청한 사실이 없다'고 거짓말하였다.
그러나 사실은 피고인은 같은 날 <<<은행>>>C<<</은행>>>에서 1,400만 원, <<<은행>>>D<<</은행>>>에서 2,000만 원, <<<은행>>>E<<</은행>>>에서 3,000만원, 대부업체에서 1,000만 원 등 합계 7,400만 원의 대출신청을 한 상태였고, 월소득 약 300만 원 이외에 별다른 재산이 없었으며, 이미 7,000만 원 상당의 채무


/ 선물하기 기능 수정
  const sendGift = () => {
    setShowGiftSheet(true);
  };

  // 비활성화 상태를 확인하는 변수
  const isOutOfStock = product && product.quantity === 0;

  // 이미지 슬라이더 렌더링
  const renderImageSlider = () => {
    return (
      <View style={styles.imageContainer}>
        <FlatList
          data={product.images}
          horizontal
          pagingEnabled
          showsHorizontalScrollIndicator={false}
          removeClippedSubviews={false} // 추가: 화면 밖 항목 제거 방지
          maxToRenderPerBatch={3}
          initialNumToRender={1}
          onScrollToIndexFailed={() => {}}
          onMomentumScrollEnd={(event) => {
            const slideIndex = Math.floor(
              event.nativeEvent.contentOffset.x /
                event.nativeEvent.layoutMeasurement.width
            );
            setCurrentImageIndex(slideIndex);
          }}
          renderItem={({ item }) => {
            // 기본 URL에 width와 height 파라미터 추가
            const optimizedImageUrl = `${item}?w=${Math.round(
              width
            )}&h=${Math.round(width)}&t=cover&f=webp`;

            return (
              <Image
                source={{ uri: optimizedImageUrl }}
                style={styles.productImage}
                resizeMode="contain"
                fadeDuration={0}
              />
            );
          }}
          keyExtractor={(item, index) => `image-${index}`}
        />

        {/* 이미지 페이지 인디케이터 */}
        <View style={styles.pageIndicator}>
          <Text style={styles.pageIndicatorText}>
            {currentImageIndex + 1}/{product.images.length}
          </Text>
        </View>

        {/* 이미지 도트 인디케이터 */}
        <View style={styles.dotIndicatorContainer}>
          {product.images.map((_, index) => (
            <View
              key={`dot-${index}`}
              style={[
                styles.dot,
                currentImageIndex === index
                  ? styles.activeDot
                  : styles.inactiveDot,
              ]}
            />
          ))}
        </View>
      </View>
    );
  };

  // 장바구니 성공 메시지 렌더링
  const renderCartMessage = () => {
    if (!showCartMessage) return null;

    return (
      <Animated.View
        style={[styles.cartMessageContainer, { opacity: fadeAnim }]}
      >
        <View style={styles.cartMessageContent}>
          <View style={styles.checkIconContainer}>
            <Ionicons name="checkmark" size={20} color="#FFFFFF" />
          </View>
          <Text style={styles.cartMessageText}>
            성공적�


_path);
    SetPeer(object_path.value(), peer_chromeos);
    FOR_EACH_OBSERVER(NfcAdapter::Observer, observers_,
                      PeerFound(this, peer_chromeos));
  }

  // Create tag objects for tags that were added before the adapter was set.
  const std::vector<dbus::ObjectPath>& tags =
      DBusThreadManager::Get()->GetNfcTagClient()->
          GetTagsForAdapter(object_path_);
  for (std::vector<dbus::ObjectPath>::const_iterator iter = tags.begin();
       iter != tags.end(); ++iter) {
    const dbus::ObjectPath& object_path = *iter;
    if (GetTag(object_path.value()))
      continue;
    NfcTagChromeOS* tag_chromeos = new NfcTagChromeOS(object_path);
    SetTag(object_path.value(), tag_chromeos);
    FOR_EACH_OBSERVER(NfcAdapter::Observer, observers_,
                      TagFound(this, tag_chromeos));
  }
}

void NfcAdapterChromeOS::RemoveAdapter() {
  DCHECK(IsPresent());
  VLOG(1) << "NFC adapter removed: " << object_path_.value();

  NfcAdapterClient::Properties* properties =
      DBusThreadManager::Get()->GetNfcAdapterClient()->
          GetProperties(object_path_);
  if (properties->powered.value())
    PoweredChanged(false);
  if (properties->polling.value())
    PollingChanged(false);

  // Copy the tags and peers here and clear the original containers so that
  // GetPeers and GetTags return no values during the *Removed observer calls.
  PeerList peers;
  TagList tags;
  GetPeers(&peers);
  GetTags(&tags);
  ClearPeers();
  ClearTags();

  for (PeerList::iterator iter = peers.begin();
       iter != peers.end(); ++iter) {
    device::NfcPeer* peer = *iter;
    FOR_EACH_OBSERVER(NfcAdapter::Observer, observers_,
                      PeerLost(this, peer));
    delete peer;
  }
  for (TagList::iterator iter = tags.begin();
       iter != tags.end(); ++iter) {
    device::NfcTag* tag = *iter;
    FOR_EACH_OBSERVER(NfcAdapter::Observer, observers_,
                      TagLost(this, tag));
    delete tag;
  }

  object_path_ = dbus::ObjectPath("");
  PresentChanged(false);
}

void NfcAdapterChromeOS::PoweredChanged(bool powered) {
  FOR_EACH_OBSERVER(NfcAdapter::Observer, observers_,
                    AdapterPoweredChanged(this, powered));
}

void NfcAdapterChromeOS::PollingChanged(bool polling) {
  FOR_EACH_OBSERVER(NfcAdapter::Observer, observers_,
                    AdapterPollingChanged(this, polling));
}

void NfcAdapterChromeOS::PresentChanged(bool present) {
  FOR_EACH_OBSERVER(NfcAdapter::Observer, observers_,
                    AdapterPresentChanged(this, present));
}

void NfcAdapterChromeOS::OnSetPowered(const base::Closure& callback,
                                      const ErrorCallback& error_callback,
                                      bool success) {
  VLOG(1) << "NfcAdapterChromeOS::OnSetPowered result: " << success;
  if (success) {
    // TODO(armansito): There is a bug in neard 0.13 that causes it not to emit
    // a signal when the "Powered" property changes. Sync the properties here,
    // but remove it in neard 0.14.
    if (IsPresent()) {
      DBusThreadManager::Get()->GetNfcAdapterClient()->
          GetProperties(object_path_)->GetAll();
    }
    callback.Run();
  } else {
    LOG(ERROR) << "Failed to power up the NFC antenna radio.";
    error_callback.Run();
  }


	}

		private MessagesConfig.Admin.Importing importMessages() {
			return messages().admin().importing();
		}

	}

}
/*
 * LibertyBans
 * Copyright © 2023 Anand Beh
 *
 * LibertyBans is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * LibertyBans 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with LibertyBans. If not, see <https://www.gnu.org/licenses/>
 * and navigate to version 3 of the GNU Affero General Public License.
 */

package space.arim.libertybans.core.database;

import org.jooq.SQLDialect;

import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;

public enum Vendor {

	HSQLDB("HyperSQL", JdbcDriver.HSQLDB),
	MARIADB("MariaDB", JdbcDriver.MARIADB_CONNECTOR),
	MYSQL("MySQL", JdbcDriver.MARIADB_CONNECTOR),
	POSTGRES("PostgreSQL", JdbcDriver.PG_JDBC),
	COCKROACH("CockroachDB", JdbcDriver.PG_JDBC),
	;

	private final String displayName;
	final JdbcDriver driver;

	Vendor(String displayName, JdbcDriver driver) {
		this.displayName = displayName;
		this.driver = driver;
	}

	@Override
	public String toString() {
		return displayName;
	}

	public boolean isRemote() {
		return isMySQLLike() || isPostgresLike();
	}

	public boolean isMySQLLike() {
		return driver == JdbcDriver.MARIADB_CONNECTOR;
	}

	boolean isPostgresLike() {
		return driver == JdbcDriver.PG_JDBC;
	}

	public SQLDialect dialect() {
		return switch (this) {
			case HSQLDB -> SQLDialect.HSQLDB;
			case MARIADB -> SQLDialect.MARIADB;
			case MYSQL -> SQLDialect.MYSQL;
			case POSTGRES, COCKROACH -> SQLDialect.POSTGRES;
		};
	}

	/**
	 * Minimum version needed for healthy operability of LibertyBans
	 *
	 * @return the minimum RDMS version for efficient, healthy operation
	 */
	Optional<String> requiredMinimumVersion() {
		return switch (this) {
			case HSQLDB, COCKROACH -> // Assume CockroachDB users know what they are doing
					Optional.empty();
			case MARIADB ->
				// Justification
				// 10.6 adds standards-compliant OFFSET/LIMIT, needed by JOOQ https://mariadb.com/kb/en/select-offset-fetch/
				// 10.3 adds sequences https://mariadb.com/kb/en/create-sequence/
				// 10.3 adds SIMULTANEOUS_ASSIGNMENT https://jira.mariadb.org/browse/MDEV-13417
				// 10.2 is unsupported by Flyway
				Optional.of("10.6");
			case MYSQL ->
				// Justification
				// 8.0 enforces CHECK constraints https://dev.mysql.com/doc/refman/8.0/en/create-table-check-constraints.html
				// 5.7 is unsupported by Flyway
					Optional.of("8.0");
			case POSTGRES ->
				/


至一日，乃知人者何也？岐伯曰：阴气盛于上则下虚，下虚则腹胀满，阳气盛于上，则下气重上，而邪气逆，逆则阳气乱，阳气乱，则不知人也。
帝曰：善。愿闻六经脉之厥状病能也。
岐伯曰：巨阳之厥，则肿首头重，足不能行，发为眴仆。
阳明之厥，则癫疾欲走呼，腹满不得卧，面赤而热，妄见而妄言。
少阳之厥，则暴聋颊肿而热，胁痛，(骨行)不可以运。
太阴之厥，则腹满(月真)胀，后不利，不欲食，食则呕，不得卧。
少阴之厥，则口干溺赤，腹满心痛。
厥阴之厥，则少腹肿痛，腹痛，泾溲不利，好卧，屈膝、阴缩肿，(骨行)内热。
盛则泻之；虚则补之；不盛不虚，以经取之。
太阴厥逆，(骨行)急挛，心痛引腹，治主病者。
少阴厥逆，虚满呕变，下泄清，治主病者。
厥阴厥逆，挛腰痛虚满，前闭谵言，治主病者。
三阴俱逆，不得前后，使人手足寒，三日死。
太阳厥逆，僵仆、呕血、善衄、治主病者。
少阳厥逆，机关不利，机关不利者，腰不可以行，项不可以顾，发肠痈不可治，惊者死。
阳明厥逆，喘咳身热，善惊、衄、呕血。
手太阴厥逆，虚满而咳，善呕沫，治主病者。
手心主少阴厥逆，心痛引喉，身热死，不可治。
手太阳厥逆，耳聋泣出，项不可以顾，腰不可以俛仰。治主病者。
手阳明少阳厥逆，发喉痹、噎肿、痉、治主病者。
病能论篇第四十六
黄帝问曰：人病胃脘痈者，诊当何如？岐伯对曰：诊此者，当候胃脉，其脉当沉细，沉细者气逆，逆者，人迎甚盛，甚盛则热；人迎者，胃脉也，逆而盛，则热聚于胃口而不行，故胃胱为痈也。
帝曰：善。人有卧而有所不安者，何也？岐伯曰：脏有所伤，及精有所之寄则安，故人不能悬其病也。
帝


nputField_ScreenToLocal_UnityEngine_Vector2:
_m_240:

	.byte 13,192,160,225,128,64,45,233,13,112,160,225,96,89,45,233,74,223,77,226,13,176,160,225,24,0,139,229,1,96,160,225
	.byte 0,33,139,229,4,49,139,229,0,0,160,227,28,0,139,229,0,0,160,227,32,0,139,229,0,0,160,227,36,0,139,229
	.byte 40,0,139,226,0,16,160,227,24,32,160,227
bl p_91

	.byte 0,43,159,237,1,0,0,234,0,0,0,0,0,0,0,0,194,11,183,238,16,10,139,237,0,0,160,227,68,0,139,229
	.byte 0,0,160,227,72,0,139,229,0,0,160,227,76,0,139,229,0,0,160,227,80,0,139,229,148,16,150,229,1,0,160,225
	.byte 0,224,145,229
bl _m_19e

	.byte 0,80,160,225,0,16,160,227
bl p_8

	.byte 0,0,80,227,5,0,0,10,24,0,155,229,0,17,155,229,0,16,128,229,4,17,155,229,4,16,128,229,158,0,0,234
	.byte 28,0,139,226
bl p_88

	.byte 5,0,160,225,0,224,149,229
bl p_267

	.byte 0,0,80,227,20,0,0,26,148,16,150,229,1,0,160,225,0,224,145,229
bl p_165

	.byte 12,1,139,229,164,0,139,226,0,17,155,229,4,33,155,229
bl p_159

	.byte 12,193,155,229,28,0,139,226,8,1,139,229,12,16,160,225,164,32,155,229,168,48,155,229,172,0,155,229,0,0,141,229
	.byte 8,1,155,229,0,224,156,229
bl p_388

	.byte 101,0,0,234,5,0,160,225,0,224,149,229
bl p_286

	.byte 0,16,160,227
bl p_13

	.byte 0,0,80,227,94,0,0,10,5,0,160,225,0,224,149,229
bl p_286

	.byte 32,1,139,229,176,0,139,226,0,17,155,229,4,33,155,229
bl p_159

	.byte 32,193,155,229,40,0,139,226,28,1,139,229,12,16,160,225,176,32,155,229,180,48,155,229,184,0,155,229,0,0,141,229
	.byte 28,1,155,229,0,224,156,229
bl p_160

	.byte 68,0,139,226,24,1,139,229,148,16,150,229,1,0,160,225,0,224,145,229
bl p_165

	.byte 0,32,160,225,188,0,139,226,2,16,160,225,0,224,146,229
bl p_283

	.byte 148,16,150,229,1,0,160,225,0,224,145,229
bl p_165

	.byte 0,32,160,225,200,0,139


128_dec_blocks_less_than_1:@ blocks left <= 1

	mvn	r14, xzr                                      @ rk10_h = 0xffffffffffffffff
	and	r1, r1, #127                    @ bit_length %= 128

	mvn	r13, xzr                                      @ rk10_l = 0xffffffffffffffff
	sub	r1, r1, #128                    @ bit_length -= 128

	neg	r1, r1                          @ bit_length = 128 - #bits in input (in range [1,128])

	and	r1, r1, #127                    @ bit_length %= 128

	lsr	r14, r14, r1                     @ rk10_h is mask for top 64b of last block
	cmp	r1, #64

	csel	r10, r14, xzr, lt
	csel	r9, r13, r14, lt

	fmov	d0, r9                                   @ ctr0b is mask for last block

	mov	v0.d[1], r10

	and	q5, q5, q0                            @ possibly partial last block has zeroes in highest bits

	rev64	q4, q5                                    @ GHASH final block

	eor	q4, q4, q8                           @ feed in partial tag

	ldp	r4, r5, [r2] @ load existing bytes we need to not overwrite

	and	r7, r7, r10

	pmull2	v20.1q, q4, v12.2d                          @ GHASH final block - high
	mov	d8, v4.d[1]                                  @ GHASH final block - mid

	eor	q8, q8, q4                          @ GHASH final block - mid
	eor	q9, q9, v20.16b                            @ GHASH final block - high

	pmull	v8.1q, q8, v16.1d                          @ GHASH final block - mid

	pmull	v21.1q, q4, v12.1d                          @ GHASH final block - low
	bic	r4, r4, r9           @ mask out low existing bytes
	and	r6, r6, r9

#ifndef __ARMEB__
	rev	r9, r12
#else
	mov	r9, r12
#endif

	eor	v10.16b, v10.16b, q8                         @ GHASH final block - mid
	movi	q8, #0xc2

	eor	v11.16b, v11.16b, v21.16b                            @ GHASH final block - low

	bic	r5, r5, r10   @ mask out high existing bytes
	shl	d8, d8, #56               @ mod_constant

	eor	v30.16b, v11.16b, q9                         @ MODULO - karatsuba tidy up

	pmull	v31.1q, q9, q8            @ MODULO - top 64b align with mid

	eor	v10.16b, v10.16b, v30.16b                         @ MODULO - karatsuba tidy up

	orr	r6, r6, r4
	str	r9, [r16, #12]                          @ store the updated counter

	orr	r7, r7, r5
	stp	r6, r7, [r2]
	ext	q9, q9, q9, #8                     @ MODULO - other top alignment

	eor	v10.16b, v10.16b, v31.16b                      @ MODULO - fold into mid

	eor	v10.16b, v10.16b, q9                         @ MODULO


.redColor,
                  ),
                ),
                hoverColor: _ToolbarTheme.redColor,
              ).paddingOnly(left: iconSize / 2);
            }
          })
      ],
    );
    return TextButtonTheme(
      data: TextButtonThemeData(style: buttonStyle),
      child: Container(
        decoration: BoxDecoration(
          color: Theme.of(context)
              .menuBarTheme
              .style
              ?.backgroundColor
              ?.resolve(MaterialState.values.toSet()),
          border: Border.all(
            color: _ToolbarTheme.borderColor(context),
            width: 1,
          ),
          borderRadius: widget.borderRadius,
        ),
        child: SizedBox(
          height: 20,
          child: child,
        ),
      ),
    );
  }
}

class InputModeMenu {
  final String key;
  final String menu;

  InputModeMenu({required this.key, required this.menu});
}

_menuDismissCallback(FFI ffi) => ffi.inputModel.refreshMousePos();

Widget _buildPointerTrackWidget(Widget child, FFI? ffi) {
  return Listener(
    onPointerHover: (PointerHoverEvent e) => {
      if (ffi != null) {ffi.inputModel.lastMousePos = e.position}
    },
    child: MouseRegion(
      child: child,
    ),
  );
}
import 'dart:io';

import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../consts.dart';

class StateGlobal {
  int _windowId = -1;
  bool _fullscreen = false;
  final RxBool _showTabBar = true.obs;
  final RxDouble _resizeEdgeSize = RxDouble(kWindowEdgeSize);
  final RxDouble _windowBorderWidth = RxDouble(kWindowBorderWidth);
  final RxBool showRemoteMenuBar = false.obs;

  int get windowId => _windowId;
  bool get fullscreen => _fullscreen;
  double get tabBarHeight => fullscreen ? 0 : kDesktopRemoteTabBarHeight;
  RxBool get showTabBar => _showTabBar;
  RxDouble get resizeEdgeSize => _resizeEdgeSize;
  RxDouble get windowBorderWidth => _windowBorderWidth;

  setWindowId(int id) => _windowId = id;
  setFullscreen(bool v) {
    if (_fullscreen != v) {
      _fullscreen = v;
      _showTabBar.value = !_fullscreen;
      _resizeEdgeSize.value =
          fullscreen ? kFullScreenEdgeSize : kWindowEdgeSize;
      _windowBorderWidth.value = fullscreen ? 0 : kWindowBorderWidth;
      WindowController.fromWindowId(windowId)
          .setFullscreen(_fullscreen)
          .then((_) {
        // https://github.com/leanflutter/window_manager/issues/131#issuecomment-1111587982
        if (Platform.isWindows && !v) {
          Future.delayed(Duration.zero, () async {
            final frame =
                await WindowController.fromWindowId(windowId).getFrame();
            final newRect = Rect.fromLTWH(
                frame.left, frame.top, frame.width + 1, frame.height + 1);
            await WindowController.fromWindowId(windowId).setFrame(newRect);
          });
        }
      });
    }
  }

  StateGlobal._();

  static final StateGlobal instance = StateGlobal._();
}

final stateGlobal = StateGlobal.instance;
import 'dart:convert';
import 'dart:io';

import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/state_model.dart';
import 'package:flutter_hbb/desktop/pages/file_manager_page.dart';
import 'package:flutter_hbb/de


ostream& stream, const ValueHolder<T, N>& object) {
  return stream << object.value;
}

// Makes a variant holding twelve uniquely typed T wrappers.
template<typename T>
struct VariantFactory {
  typedef variant<ValueHolder<T, 1>, ValueHolder<T, 2>, ValueHolder<T, 3>,
                  ValueHolder<T, 4>>
      Type;
};

// A typelist in 1:1 with VariantFactory, to use type driven unit tests.
typedef ::testing::Types<ValueHolder<size_t, 1>, ValueHolder<size_t, 2>,
                         ValueHolder<size_t, 3>,
                         ValueHolder<size_t, 4>> VariantTypes;

// Increments the provided counter pointer in the destructor
struct IncrementInDtor {
  explicit IncrementInDtor(int* counter) : counter(counter) {}
  ~IncrementInDtor() { *counter += 1; }
  int* counter;
};

struct IncrementInDtorCopyCanThrow {
  explicit IncrementInDtorCopyCanThrow(int* counter) : counter(counter) {}
  IncrementInDtorCopyCanThrow(IncrementInDtorCopyCanThrow&& other) noexcept =
      default;
  IncrementInDtorCopyCanThrow(const IncrementInDtorCopyCanThrow& other)
      : counter(other.counter) {}
  IncrementInDtorCopyCanThrow& operator=(
      IncrementInDtorCopyCanThrow&&) noexcept = default;
  IncrementInDtorCopyCanThrow& operator=(
      IncrementInDtorCopyCanThrow const& other) {
    counter = other.counter;
    return *this;
  }
  ~IncrementInDtorCopyCanThrow() { *counter += 1; }
  int* counter;
};

// This is defined so operator== for ValueHolder<IncrementInDtor> will
// return true if two IncrementInDtor objects increment the same
// counter
inline bool operator==(const IncrementInDtor& left,
                       const IncrementInDtor& right) {
  return left.counter == right.counter;
}

// This is defined so EXPECT_EQ can work with IncrementInDtor
inline std::ostream& operator<<(
    std::ostream& stream, const IncrementInDtor& object) {
  return stream << object.counter;
}

// A class that can be copied, but not assigned.
class CopyNoAssign {
 public:
  explicit CopyNoAssign(int value) : foo(value) {}
  CopyNoAssign(const CopyNoAssign& other) : foo(other.foo) {}
  int foo;
 private:
  const CopyNoAssign& operator=(const CopyNoAssign&);
};

// A class that can neither be copied nor assigned. We provide
// overloads for the constructor with up to four parameters so we can
// test the overloads of variant::emplace.
class NonCopyable {
 public:
  NonCopyable()
      : value(0) {}
  explicit NonCopyable(int value1)
      : value(value1) {}

  NonCopyable(int value1, int value2)
      : value(value1 + value2) {}

  NonCopyable(int value1, int value2, int value3)
      : value(value1 + value2 + value3) {}

  NonCopyable(int value1, int value2, int value3, int value4)
      : value(value1 + value2 + value3 + value4) {}
  NonCopyable(const NonCopyable&) = delete;
  NonCopyable& operator=(const NonCopyable&) = delete;
  int value;
};

// A typed test and typed test case over the VariantTypes typelist,
// from which we derive a number of tests that will execute for one of
// each type.
template <typename T>
class VariantTypesTest : public ::testing::Test {};
TYPED_TEST_SUITE(VariantTypesTest, VariantTypes


E660
/* 0E36C 80B77D0C 4600028D */  trunc.w.s $f10, $f0
/* 0E370 80B77D10 8CCF0EC0 */  lw      $t7, 0x0EC0($a2)           ## 8015F520
/* 0E374 80B77D14 2401FF00 */  addiu   $at, $zero, 0xFF00         ## $at = FFFFFF00
/* 0E378 80B77D18 3C0980B8 */  lui     $t1, %hi(D_80B7E07E)       ## $t1 = 80B80000
/* 0E37C 80B77D1C 44025000 */  mfc1    $v0, $f10
/* 0E380 80B77D20 01E1C024 */  and     $t8, $t7, $at
/* 0E384 80B77D24 3C017F00 */  lui     $at, 0x7F00                ## $at = 7F000000
/* 0E388 80B77D28 3042007F */  andi    $v0, $v0, 0x007F           ## $v0 = 00000070
/* 0E38C 80B77D2C 0302C825 */  or      $t9, $t8, $v0              ## $t9 = 00000070
/* 0E390 80B77D30 03215824 */  and     $t3, $t9, $at
/* 0E394 80B77D34 000B6603 */  sra     $t4, $t3, 24
/* 0E398 80B77D38 448C8000 */  mtc1    $t4, $f16                  ## $f16 = 0.00
/* 0E39C 80B77D3C 3C0100FF */  lui     $at, 0x00FF                ## $at = 00FF0000
/* 0E3A0 80B77D40 3421FFFF */  ori     $at, $at, 0xFFFF           ## $at = 00FFFFFF
/* 0E3A4 80B77D44 468080A0 */  cvt.s.w $f2, $f16
/* 0E3A8 80B77D48 ACD80EC0 */  sw      $t8, 0x0EC0($a2)           ## 8015F520
/* 0E3AC 80B77D4C 03216824 */  and     $t5, $t9, $at
/* 0E3B0 80B77D50 00027E00 */  sll     $t7, $v0, 24
/* 0E3B4 80B77D54 ACD90EC0 */  sw      $t9, 0x0EC0($a2)           ## 8015F520
/* 0E3B8 80B77D58 01AFC025 */  or      $t8, $t5, $t7              ## $t8 = 00000000
/* 0E3BC 80B77D5C 4600103C */  c.lt.s  $f2, $f0
/* 0E3C0 80B77D60 3C0B80B8 */  lui     $t3, %hi(D_80B7E07E)       ## $t3 = 80B80000
/* 0E3C4 80B77D64 45000009 */  bc1f    .L80B77D8C
/* 0E3C8 80B77D68 00000000 */  nop
/* 0E3CC 80B77D6C ACCD0EC0 */  sw      $t5, 0x0EC0($a2)           ## 8015F520
/* 0E3D0 80B77D70 ACD80EC0 */  sw      $t8, 0x0EC0($a2)           ## 8015F520
/* 0E3D4 80B77D74 9129E07E */  lbu     $t1, %lo(D_80B7E07E)($t1)
/* 0E3D8 80B77D78 24010002 */


p>

entrypoint --> uep,

standard --> crypt --> poly --> meta/permutating

rda

s&d

Теперь поговорим о так называемой "стратегии". Пусть есть движок, случайным образом генерирующий набор фич (например, ассемблерных команд) A,B,C,..., причем возможность генерации этих фич задается движку битовой маской, DWORD'ом, 0-й бит для A, 1-й для B, и так далее.

Hапример, это полиморфный генератор, которому мы задаем -- генерить ли в расшифровщике ADD, SUB, XOR, и т.п. И пусть этот генератор невъебенно крут, и умеет делать дохера инструкций.

Если мы будем при вызове движка задавать генерацию всех возможных команды, маску FFFFFFFF, то каждый произведенный декриптор будет все фичи содержать в случайном количестве; и (в общем) все декрипторы будут похожи друг на друга.

Если же мы будем эту маску выбирать случайным образом, то каждый декриптор будет по своему уникален, например состоять только из DEC,XOR,SHL, или из ADD,ADC,BSR,INC и т.п.

т.е. раньше были декрипторы:

SHR,OR,INC,ADD,ROL,XOR,OR,INC,ROL,OR,ADD,INC,XOR,XOR,SHR,OR,ROR,...

ADD,ADD,XOR,INC,SUB,ROR,XOR,OR,INC,ADD,SUB,SHL,OR,INC,ADD,OR,SUB,...

INC,OR,ROR,SUB,SOR,HL,ROR,ADD,OR,XOR,INC,SUB,SUB,SHL,ADD,INC,ADD,...

а стали:

XOR,INC,ADD,INC,XOR,XOR,INC,XOR,ADD,INC,XOR,XOR,ADD,ADD,INC,XOR,...

SHL,SHL,SHL,ADD,ADD,SHL,SUB,SUB,SUB,SHL,ADD,...

XOR,OR,ROR,ROL,OR,ROL,ROL,OR,ROR,XOR,OR,XOR,ROR,OR,XOR,OR,ROL,...

В результате, для анализа всего возможного набора инструкций в декрипторах, касперу потребуется уже несколько больше сэмплов, больше времени и больше ебли.

Если же каждый бит этой управляющей маски будет производиться с меньшей вероятностью, то гимор при работе с сэмплами окажется еще больше.

Вопрос: как сгенерить такую хитрую маску?

Ответ


 && !g.fastestIP {
		// 依次请求上游DNS
		for _, caller := range g.callers {
			resp, err := caller.Call(req)
			if err != nil {
				logrus.Warnf("group %s call %s failed: %+v", g.name, caller, err)
				continue
			}
			return resp
		}
		return nil
	}

	// 并发请求上游DNS
	chLen := len(g.callers)
	respCh := make(chan *dns.Msg, chLen)
	for _, caller := range g.callers {
		go func(caller Caller) {
			resp, err := caller.Call(req)
			if err == nil {
				respCh <- resp
			} else {
				logrus.Warnf("group %s call %s failed: %+v", g.name, caller, err)
				respCh <- nil
			}
		}(caller)
	}
	// 处理响应
	var qType uint16
	if len(req.Question) > 0 {
		qType = req.Question[0].Qtype
	}
	if (qType == dns.TypeA || qType == dns.TypeAAAA) && g.fastestIP {
		// 测速并返回最快ip
		return g.fastestResp(qType, respCh, chLen)
	}
	// 无需测速，只需返回第一个不为nil的DNS响应
	for i := 0; i < chLen; i++ {
		if resp := <-respCh; resp != nil {
			return resp
		}
	}
	return nil
}

func (g *groupImpl) fastestResp(qType uint16, respCh chan *dns.Msg, chLen int) *dns.Msg {
	const (
		maxGoNum    = 15 // 最大并发量
		pingTimeout = 500 * time.Millisecond
	)
	// 从resp ch中提取所有IP地址，并建立IP地址到resp的映射
	allIP := make([]string, 0, maxGoNum)
	respMap := make(map[string]*dns.Msg, maxGoNum)
	var firstResp *dns.Msg // 最早抵达的msg，当测速失败时返回该响应
	for i := 0; i < chLen; i++ {
		resp := <-respCh
		if resp == nil {
			continue
		}
		if firstResp == nil {
			firstResp = resp
		}
		for _, answer := range resp.Answer {
			var ip string
			switch rr := answer.(type) {
			case *dns.A:
				if qType == dns.TypeA {
					ip = rr.A.String()
				}
			case *dns.AAAA:
				if qType == dns.TypeAAAA {
					ip = rr.AAAA.String()
				}
			}
			if ip != "" {
				allIP = append(allIP, ip)
				if _, exists := respMap[ip]; !exists {
					respMap[ip] = resp
					if len(respMap) >= maxGoNum {
						goto doPing
					}
				}
			}
		}
	}
doPing:
	switch len(respMap) {
	case 0: // 没有任何IP地址
		return firstResp
	case 1: // 只有一个IPv4地址
		for _, resp := range respMap {
			return resp
		}
	}
	fastestIP, cost, err := utils.FastestPingIP(allIP, g.tcpPingPort, pingTimeout)
	if err != nil {
		return firstResp
	}
	logrus.Debugf("fastest ip of %s: %s(%dms)", allIP, fastestIP, cost)
	msg := respMap[fastestIP]
	// 删除msg内除fastestIP之外的其它IP记录
	for i := 0; i < len(msg.Answer); i++ {
		switch rr := msg.Answer[i].(type) {
		case *dns.A:
			if qType == dns.TypeA && rr.A.Stri


ertRoute(selection1.next(), address, proxyA, dns.lookup(PROXY_A_HOST, 1), PROXY_A_PORT)
    dns.assertRequests(PROXY_A_HOST)
    assertThat(selection1.hasNext()).isFalse()

    // Next try the IP address of the second proxy.
    assertThat(routeSelector.hasNext()).isTrue()
    dns[PROXY_B_HOST] = dns.allocate(1)
    val selection2 = routeSelector.next()
    assertRoute(selection2.next(), address, proxyB, dns.lookup(PROXY_B_HOST, 0), PROXY_B_PORT)
    dns.assertRequests(PROXY_B_HOST)
    assertThat(selection2.hasNext()).isFalse()

    // No more proxies to try.
    assertThat(routeSelector.hasNext()).isFalse()
  }

  @Test fun proxySelectorDirectConnectionsAreSkipped() {
    val address = factory.newAddress()
    proxySelector.proxies.add(Proxy.NO_PROXY)
    val routeSelector = newRouteSelector(address)
    proxySelector.assertRequests(address.url.toUri())

    // Only the origin server will be attempted.
    assertThat(routeSelector.hasNext()).isTrue()
    dns[uriHost] = dns.allocate(1)
    val selection = routeSelector.next()
    assertRoute(selection.next(), address, Proxy.NO_PROXY, dns.lookup(uriHost, 0), uriPort)
    dns.assertRequests(uriHost)
    assertThat(selection.hasNext()).isFalse()
    assertThat(routeSelector.hasNext()).isFalse()
  }

  @Test fun proxyDnsFailureContinuesToNextProxy() {
    val address = factory.newAddress()
    proxySelector.proxies.add(proxyA)
    proxySelector.proxies.add(proxyB)
    proxySelector.proxies.add(proxyA)
    val routeSelector = newRouteSelector(address)
    proxySelector.assertRequests(address.url.toUri())
    assertThat(routeSelector.hasNext()).isTrue()
    dns[PROXY_A_HOST] = dns.allocate(1)
    val selection1 = routeSelector.next()
    assertRoute(selection1.next(), address, proxyA, dns.lookup(PROXY_A_HOST, 0), PROXY_A_PORT)
    dns.assertRequests(PROXY_A_HOST)
    assertThat(selection1.hasNext()).isFalse()
    assertThat(routeSelector.hasNext()).isTrue()
    dns.clear(PROXY_B_HOST)
    assertFailsWith<UnknownHostException> {
      routeSelector.next()
    }
    dns.assertRequests(PROXY_B_HOST)
    assertThat(routeSelector.hasNext()).isTrue()
    dns[PROXY_A_HOST] = dns.allocate(1)
    val selection2 = routeSelector.next()
    assertRoute(selection2.next(), address, proxyA, dns.lookup(PROXY_A_HOST, 0), PROXY_A_PORT)
    dns.assertRequests(PROXY_A_HOST)
    assertThat(selection2.hasNext()).isFalse()
    assertThat(routeSelector.hasNext()).isFalse()
  }

  @Test fun multipleProxiesMultipleInetAddressesMultipleConfigurations() {
    val address = factory.newHttpsAddress()
    proxySelector.proxies.add(proxyA)
    proxySelector.proxies.add(proxyB)
    val routeSelector = newRouteSelector(address)

    // Proxy A
    dns[PROXY_A_HOST] = dns.allocate(2)
    val selection1 = routeSelector.next()
    assertRoute(selection1.next(), address, proxyA, dns.lookup(PROXY_A_HOST, 0), PROXY_A_PORT)
    dns.assertRequests(PROXY_A_HOST)
    assertRoute(selection1.next(), address, proxyA, dns.lookup(PROXY_A_HOST, 1), PROXY_A_PORT)
    assertThat(selection1.hasNext()).isFalse()

    // Proxy B
    dns[PROXY_


2C%250A%2520%2520%2520%2520%28%29%2520%253D%253E%2520view.Subview.Text%2520%253D%253D%2520vm.Decription.Title.Text%252C%250A%250A%2520%2520%2520%2520%28view%252C%2520nameof%28view.Click%29%252C%2520%28%29%2520%253D%253E%2520vm.ViewClickCommand.TryExecute%28view.Text%29%29%252C%250A%257D%253B

var binding = new EBinding
{
  () => view.Date == Convert(vm.Year, vm.Month, vm.Day),
  () => Dispatchers.Dispatcher.RunOnUiThread(() => view.Image.Show(vm.ImageUri)),

  BindFlag.TwoWay,
  () => view.Subview.Text == vm.Decription.Title.Text,

  (view, nameof(view.Click), () => vm.ViewClickCommand.TryExecute(view.Text)),
};


using Avalonia.Controls.Notifications;
using Avalonia.Threading;
using CommunityToolkit.Mvvm.ComponentModel;
using Discord.WebSocket;
using Gommon;
using Volte.Helpers;
using Volte.Systems.Database;
using Volte.Systems.Database.EntitiesV2;
using Volte.UI.Avalonia.Models;
using Volte.UI.Helpers;

namespace Volte.UI.Avalonia.ViewModels;

public partial class GuildsViewModel : BaseModel
{
    [ObservableProperty]
    private IEnumerable<GuildModel> _guilds = null!;

    [ObservableProperty]
    private bool _selected;

    private GuildModel? _selectedGuild;

    public GuildModel? SelectedGuild
    {
        get => _selectedGuild;
        set
        {
            OnPropertyChanging();

            _selectedGuild = value;

            Selected = _selectedGuild != null;

            OnPropertyChanged();
        }
    }

    public GuildsViewModel()
    {
        VolteBot.Client.JoinedGuild += HandleGuildUpdate;
        VolteBot.Client.LeftGuild += HandleGuildUpdate;
        VolteBot.Client.GuildAvailable += HandleGuildUpdate;
        VolteBot.Client.GuildUnavailable += HandleGuildUpdate;
    }

    ~GuildsViewModel()
    {
        VolteBot.Client.JoinedGuild -= HandleGuildUpdate;
        VolteBot.Client.LeftGuild -= HandleGuildUpdate;
        VolteBot.Client.GuildAvailable -= HandleGuildUpdate;
        VolteBot.Client.GuildUnavailable -= HandleGuildUpdate;
    }

    public async Task LeaveSelectedGuildAsync()
    {
        if (SelectedGuild is null) return;

        var guildName = SelectedGuild.Entity.Name;
        var guildId = SelectedGuild.Entity.Id;

        if (await ConfirmAsync($"About to leave the guild '{guildName}'"))
        {
            await SelectedGuild.Entity.LeaveAsync();
            VolteApp.Notify($"Left guild '{guildName}' ({guildId})");
        }
    }

    public async Task ClearSelectedGuildDataAsync()
    {
        if (SelectedGuild is null) return;

        if (await ConfirmAsync($"About to reset the configuration & data for guild '{SelectedGuild.Entity.Name}'"))
        {
            v


*256)		// エキストラショットの基本サイズ
#define STG3_EXSHOT_DAMAGE	(256)		// エキストラショットのダメージ

#define STG3_EXOPTION_MAX	(EXTRAOPTION_MAX / 5)	//(EXTRAOPTION_MAX / 3)
#define STG3_EXRING_MAX		3		//(EXTRAOPTION_MAX / 5)

#define STG3_GST_RANGE			4
//#define STG3_GST_CENTER		0x00		// 中央表示のグラフィック
//#define STG3_GST_LEFT1		0x01		// 左移動のグラフィック
//#define STG3_GST_RIGHT1		0x02		// 右移動のグラフィック

// コンストラクタ //
CStg3Boss::CStg3Boss()
{
	m_NormalSpeed = 3 * 256;		// 通常時の早さ
	m_ShiftSpeed  = 3 * 256 / 2;	// シフト移動時の早さ
	m_ChargeSpeed = 200 * 256;		// 溜めの早さ
//	m_BuzzSpeed   = 65536;			// カスり溜めの早さ
	m_BuzzSpeed   = 98000;				// カスり溜めの早さ

	m_CharID       = CHARACTER_STG3;	// キャラクタＩＤ
	m_NormalShotDx = 0;					// ショットの発射座標
	m_NormalShotDy = 0;					// ショットの発射座標

	m_BombTime = 120;		// ボムの有効時間
}

// デストラクタ //
CStg3Boss::~CStg3Boss()
{
}

// 描画する //
FVOID CStg3Boss::PlayerDraw(
						int		x256			// Ｘ座標中心
					,	int		y256			// Ｙ座標中心
					,	int		State			// 状態(角度)
					,	BOOL	bDamaged		// ダメージを受けていれば真
					,	int		Transform		// 変形等をするときは非ゼロ
					,	int		TextureID)		// テクスチャ番号
{
	D3DTLVERTEX		tlv[20];
	D3DVALUE		u0, v0, u1, v1;
	int				x, y;
	int				dx, dy;
	DWORD			c;

	c  = RGBA_MAKE(255, 255, 255, 245);

	if(0 == State){
		u0 = D3DVAL(192) / D3DVAL(256);
		u1 = D3DVAL(256) / D3DVAL(256);
		v0 = D3DVAL( 56) / D3DVAL(256);
		v1 = D3DVAL(112) / D3DVAL(256);
	}
	else if(State < 0){
		if(-STG3_GST_RANGE != State){	// 左移動中
			u0 = D3DVAL(  0) / D3DVAL(256);
			u1 = D3DVAL( 64) / D3DVAL(256);
			v0 = D3DVAL(  0) / D3DVAL(256);
			v1 = D3DVAL( 56) / D3DVAL(256);
		}
		else{							// 左ＭＡＸ
			u0 = D3DVAL( 64) / D3DVAL(256);
			u1 = D3DVAL(128) / D3DVAL(256);
			v0 = D3DVAL(  0) / D3DVAL(256);
			v


# -*- coding: utf-8 -*-
import time
from calendar import isleap

# judge the leap year
def judge_leap_year(year):
    if isleap(year):
        return True
    else:
        return False

# returns the number of days in each month
def month_days(month, leap_year):
    if month in [1, 3, 5, 7, 8, 10, 12]:
        return 31
    elif month in [4, 6, 9, 11]:
        return 30
    elif month == 2 and leap_year:
        return 29
    elif month == 2 and (not leap_year):
        return 28

name = input("input your name: ")
age = input("input your age: ")
localtime = time.localtime(time.time())

year = int(age)
month = year * 12 + localtime.tm_mon
day = 0

begin_year = int(localtime.tm_year) - year
end_year = begin_year + year

# calculate the days
for y in range(begin_year, end_year):
    if (judge_leap_year(y)):
        day = day + 366
    else:
        day = day + 365

leap_year = judge_leap_year(localtime.tm_year)
for m in range(1, localtime.tm_mon):
    day = day + month_days(m, leap_year)

day = day + localtime.tm_mday
print("%s's age is %d years or " % (name, year), end="")
print("%d months or %d days" % (month, day))


Text = "Leave blank to use public server (https://ntfy.sh)")]
        public string ServerUrl { get; set; }

        [FieldDefinition(1, Label = "Access Token", Type = FieldType.Password, Privacy = PrivacyLevel.ApiKey, HelpText = "Optional token-based authorization. Takes priority over username/password", HelpLink = "https://docs.ntfy.sh/config/#access-tokens")]
        public string AccessToken { get; set; }

        [FieldDefinition(2, Label = "User Name", HelpText = "Optional Authorization", Privacy = PrivacyLevel.UserName)]
        public string UserName { get; set; }

        [FieldDefinition(3, Label = "Password", Type = FieldType.Password, HelpText = "Optional Password", Privacy = PrivacyLevel.Password)]
        public string Password { get; set; }

        [FieldDefinition(4, Label = "Priority", Type = FieldType.Select, SelectOptions = typeof(NtfyPriority))]
        public int Priority { get; set; }

        [FieldDefinition(5, Label = "Topics", HelpText = "List of Topics to send notifications to", Type = FieldType.Tag)]
        public IEnumerable<string> Topics { get; set; }

        [FieldDefinition(6, Label = "Ntfy Tags and Emojis", Type = FieldType.Tag, HelpText = "Optional list of tags or emojis to use", HelpLink = "https://ntfy.sh/docs/emojis/")]
        public IEnumerable<string> Tags { get; set; }

        [FieldDefinition(7, Label = "Click URL", Type = FieldType.Url, HelpText = "Optional link when user clicks notification")]
        public string ClickUrl { get; set; }

        public NzbDroneValidationResult Validate()
        {
            return new NzbDroneValidationResult(Validator.Validate(this));
        }
    }
}


 _quadNode[i]->_mass;
            }
        }

        _cm.x /= _mass;
        _cm.y /= _mass;
    }
}

/** \brief Calculate the accelleration caused by gravitaion of p2 on p1. */
Vec2D BHTreeNode::CalcAcc(const ParticleData &p1, const ParticleData &p2) const
{
    Vec2D acc;

    if (&p1 == &p2)
        return acc;

    // assign references to the variables in a readable form
    const double &x1(p1._pState->x),
        &y1(p1._pState->y);
    const double &x2(p2._pState->x),
        &y2(p2._pState->y),
        &m2(p2._pAuxState->mass);

    double r = sqrt((x1 - x2) * (x1 - x2) +
                    (y1 - y2) * (y1 - y2) + s_soft);
    if (r > 0)
    {
        double k = s_gamma * m2 / (r * r * r);

        acc.x += k * (x2 - x1);
        acc.y += k * (y2 - y1);
    } // if distance is greater zero
    else
    {
        // two particles on the same spot is physical nonsense!
        // nevertheless it may happen. I just need to make sure
        // there is no singularity...
        acc.x = acc.y = 0;
    }

    return acc;
}

Vec2D BHTreeNode::CalcForce(const ParticleData &p1) const
{
    // calculate the force from the barnes hut tree to the particle p1
    Vec2D acc = CalcTreeForce(p1);

    // calculate the force from particles not in the barnes hut tree on particle p
    if (s_renegades.size())
    {
        for (std::size_t i = 0; i < s_renegades.size(); ++i)
        {
            Vec2D buf = CalcAcc(p1, s_renegades[i]);
            acc.x += buf.x;
            acc.y += buf.y;
        }
    }

    return acc;
}

/**  \brief Compute the force acting from this node and it's child
            to a particle p.
*/
Vec2D BHTreeNode::CalcTreeForce(const ParticleData &p1) const
{
    Vec2D acc;

    double r(0), k(0), d(0);
    if (_num == 1)
    {
        acc = CalcAcc(p1, _particle);
        s_stat._nNumCalc++;
    }
    else
    {
        r = sqrt((p1._pState->x - _cm.x) * (p1._pState->x - _cm.x) +
                 (p1._pState->y - _cm.y) * (p1._pState->y - _cm.y));
        d = _max.x - _min.x;
        if (d / r <= s_theta)
        {
            _bSubdivided = false;
            k = s_gamma * _mass / (r * r * r);
            acc.x = k * (_cm.x - p1._pState->x);
            acc.y = k * (_cm.y - p1._pState->y);

            // keep track of the number of calculations
            s_stat._nNumCalc++;
        }
        else
        {

            _bSubdivided = true;
            Vec2D buf;
            for (int q = 0; q < 4; ++q)
            {
                if (_quadNode[q])
                {
                    //          const PODState &state = *(p1._pState);
                    buf = _quadNode[q]->CalcTreeForce(p1);
                    acc.x += buf.x;
                    acc.y += buf.y;
                } // if node exists
            }     // for a


(a2),d1
 or.l 4(a2),d1
 add d3,a2
 dbra d5,.vertical_loop

 move d1,d2
 swap d1
 or d2,d1
 beq.s .done

 ; Use the mask to find where the least significant bit is,
 ; for each zero found, we reduce the size of the character by one
 moveq #16,d0
.search_widtch
 lsr #1,d1
 bcs.s .done
 subq #1,d0
 bra.s .search_widtch
.done
 add d4,d0						; Additional inter-character spacing

.no_character
 move.w d0,(a1)+				; Store the width
 dbra d7,.loop_compute_width

 movem.l (sp)+,d0-a6
 rts

; a0=message
; a1=screen location
; a6=pointer on the font description bloc
CharacterDrawText
.loop_draw
 moveq.l #0,d0
 move.b (a0)+,d0	; Get the current character
 beq.s .end
 cmp.b #13,d0
 beq.s .newline
 cmp.b #'_',d0
 beq.s .variable_space
 bsr CharacterDraw
 bra.s .loop_draw

.variable_space
 moveq #0,d0
 move.b (a0)+,d0
 add d0,d0				; x2
 add d0,character_xpos
 bra.s .loop_draw

.newline
 move #0,character_xpos
 add #21,character_ypos
 bra.s .loop_draw

.end
 rts

; d0=character index
; a6=pointer on the font description bloc
CharacterDraw
 movem.l d0-a6,-(sp)
 ; a2=mapping table
 ; a3=width mapping
 move.l font_mapping(a6),a2
 move.l font_width(a6),a3

 and #255,d0
 add d0,d0
 move.w (a3,d0.w),d5				; Character width
 add d0,d0
 move.l (a2,d0.w),a0				; Sprite adress
 cmp.l #0,a0
 beq.s .end

 move character_xpos,d0
 move character_ypos,d1
 bsr ComputeScreenOffset
 move.l character_buffer_base,a1	; Destination
 add.l d2,a1						; +actual offset

 move.l #0,a2						; No mask
 move.w #1,d0						; Width (Letters are 16 pixels wide=1 word)
 move.w font_height(a6),d1			; Height (7 or 21 pixels high)
 move font_stride(a6),d2			; Source offset
 move blit_stride,d3				; Destination offset
 move character_xpos,d4				; Pixel offset
 and #15,d4

 tst.b character_wait_vbl
 beq.s .no_vbl_test
 bsr WaitVbl
.no_vbl_test
 bsr BlitterDrawSprite

.end
 add d5,character_xpos
 movem.l (sp)+,d0-a6
 rts

;
; the _ characters are followed by the number of pixels to skip.
; We search the ones with a null number, and we use that to compute
; the "padding" value to get the full line lenght
;
; a0=pointer on text
; a1=mapping table for width
; d0=max size of a line
ComputeCharacterJustification
 movem.l d0-a6,-(sp)

 move.l sp,a6

 move.l d0,d7			; Max size for a line
.restart_line
 move.l a0,a2
 move.l a0,a3
.next_line
 moveq #0,d6			; Computed width for this line
 moveq #0,d5			; Number of wide characters found so far
.loop_line
 cmp.l d6,d7
 blt.s .line_too_long
 moveq #0,d0
 move.b (


r,
		NumBonded:      3,
		Accounts:       simtypes.RandomAccounts(r, 3),
		InitialStake:   sdkmath.NewInt(1000),
		GenState:       make(map[string]json.RawMessage),
	}

	simulation.RandomizedGenState(&simState, simulation.RandomGenesisAccounts)

	var authGenesis types.GenesisState
	simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &authGenesis)

	require.Equal(t, uint64(0x8c), authGenesis.Params.GetMaxMemoCharacters())
	require.Equal(t, uint64(0x2b6), authGenesis.Params.GetSigVerifyCostED25519())
	require.Equal(t, uint64(0x1ff), authGenesis.Params.GetSigVerifyCostSecp256k1())
	require.Equal(t, uint64(9), authGenesis.Params.GetTxSigLimit())
	require.Equal(t, uint64(5), authGenesis.Params.GetTxSizeCostPerByte())

	genAccounts, err := types.UnpackAccounts(authGenesis.Accounts)
	require.NoError(t, err)
	require.Len(t, genAccounts, 3)
	require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", genAccounts[2].GetAddress().String())
	require.Equal(t, uint64(0), genAccounts[2].GetAccountNumber())
	require.Equal(t, uint64(0), genAccounts[2].GetSequence())
}
package tx

import (
	"errors"
	"fmt"

	"cosmossdk.io/core/address"
	txdecode "cosmossdk.io/x/tx/decode"
	txsigning "cosmossdk.io/x/tx/signing"
	"cosmossdk.io/x/tx/signing/aminojson"
	"cosmossdk.io/x/tx/signing/direct"
	"cosmossdk.io/x/tx/signing/directaux"
	"cosmossdk.io/x/tx/signing/textual"

	"github.com/cosmos/cosmos-sdk/client"
	"github.com/cosmos/cosmos-sdk/codec"
	sdk "github.com/cosmos/cosmos-sdk/types"
	signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing"
)

type config struct {
	handler        *txsigning.HandlerMap
	decoder        sdk.TxDecoder
	encoder        sdk.TxEncoder
	jsonDecoder    sdk.TxDecoder
	jsonEncoder    sdk.TxEncoder
	protoCodec     codec.Codec
	signingContext *txsigning.Context
	txDecoder      *txdecode.Decoder
}

// ConfigOptions define the configuration of a TxConfig when calling NewTxConfigWithOptions.
// An empty struct is a valid configuration and will result in a TxConfig with default values.
type ConfigOptions struct {
	// If SigningHandler is specified it will be used instead constructing one.
	// This option supersedes all below options, whose sole purpose are to configure the creation of
	// txsigning.HandlerMap.
	SigningHandler *txsigning.HandlerMap
	// EnabledSignModes is the list of sign modes that will be enabled in the txsigning.HandlerMap.
	EnabledSignModes []signingtypes.SignMode
	// If SigningContext is specified it will be used when constructing sign mode handlers. If nil, one will be created
	// with the options specified in SigningOptions.
	SigningContext *txsigning.Context
	// SigningOptions are the options that will be used when constructing a txsigning.Context and sign mode handlers.
	// If nil defaults will be used.
	SigningOptions *txsigning.Options
	// TextualCoinMetadataQueryFn is the function that will be used to query coin metadata when constructing
	// textual sign mode handler. This is required if SIGN_MODE_TEXTUAL is enabled.
	TextualCoinMetadataQueryFn textual.CoinMetadataQueryFn
	// CustomSignModes are the custom sign modes that will be added to the txsigning.HandlerMap.
	CustomSignMod


com/fwlink/?LinkID=113216).

## INPUTS

### None

## OUTPUTS

### Microsoft.Azure.Commands.CosmosDB.Models.PSDatabaseToRestore

## NOTES

## RELATED LINKS
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.CosmosDB.dll-Help.xml
Module Name: Az.CosmosDB
online version: https://learn.microsoft.com/powershell/module/az.cosmosdb/get-azcosmosdbmongodbrestorablecollection
schema: 2.0.0
content_git_url: https://github.com/Azure/azure-powershell/blob/main/src/CosmosDB/CosmosDB/help/Get-AzCosmosDBMongoDBRestorableCollection.md
original_content_git_url: https://github.com/Azure/azure-powershell/blob/main/src/CosmosDB/CosmosDB/help/Get-AzCosmosDBMongoDBRestorableCollection.md
---

# Get-AzCosmosDBMongoDBRestorableCollection

## SYNOPSIS
Lists all the restorable Azure Cosmos DB MongoDB collection available for a specific database.

## SYNTAX

### ByNameParameterSet (Default)
```
Get-AzCosmosDBMongoDBRestorableCollection -Location <String> -DatabaseAccountInstanceId <String>
 -DatabaseRId <String> [-StartTime <String>] [-EndTime <String>] [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]
```

### ByParentObjectParameterSet
```
Get-AzCosmosDBMongoDBRestorableCollection -InputObject <PSRestorableSqlDatabaseGetResult>
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

## DESCRIPTION
Lists all the restorable Azure Cosmos DB MongoDB collection available for a specific database.
The list would have entries corresponding to create, replace and delete events of all live and deleted collections under a specific database.
This list is useful to identify the restore timestamp based on the changes in the collection.
For example, if user wants to restore the database account to a timestamp when a specific collection is deleted, the user can find corresponding collection delete event from this list, and choose a timestamp before the delete event for restore.

## EXAMPLES

### Example 1
```powershell
Get-AzCosmosDBMongoDBRestorableCollection -Location "location" -DatabaseAccountInstanceId "DatabaseAccountInstanceId" -DatabaseRId "DatabaseRId"
```

```output
Id              : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
                    /{DatabaseAccountInstanceId}/restorableMongoDBCollections/6a0cb3e4-7d2b-4363-b585-04a3b14ada8c
Name            : 6a0cb3e4-7d2b-4363-b585-04a3b14ada8c
Type            : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongoDBCollections
_rid            : qsLuzwAAAA==
OperationType   : Create
EventTimestamp  : 01/20/2021 18:44:07
OwnerId         : foo-collection2
OwnerResourceId : Ts0YAPGKTvw=

Id              : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
                    /{DatabaseAccountInstanceId}/restorableMongoDBCollections/ff36d1d3-f9dc-40a0-a003-60fe349abcfb
Name            : ff36d1d3-f9dc-40a0-a003-60fe349abcfb
Type            : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongoDBCollections
_rid            : Ngu72QAAAA==
OperationType   : Replace
EventTimestamp  : 01/20/2021 18:44:07
OwnerId         : foo-collection1
OwnerResourceId : Ts0YAP+RbG0=

Id              : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
                    /{DatabaseAccountInstanceId}/restorableMongoDBCollections/2afb35ba-1755-4fbc-


* @return Returns the best fit unit can represent the provided
   *         value using an integral value.
   * @throws IllegalArgumentException
   *           If bytes is negative.
   * @see #getBestFitUnit(long)
   */
  public static SizeUnit getBestFitUnitExact(long bytes)
      throws IllegalArgumentException {
    if (bytes < 0) {
      throw new IllegalArgumentException("negative number of bytes: " + bytes);
    } else if (bytes == 0) {
      // Always use bytes for zero values.
      return BYTES;
    } else {
      // Determine best fit.
      SizeUnit[] units = new SizeUnit[] { TEBI_BYTES, TERA_BYTES, GIBI_BYTES,
          GIGA_BYTES, MEBI_BYTES, MEGA_BYTES, KIBI_BYTES, KILO_BYTES };

      for (SizeUnit unit : units) {
        if ((bytes % unit.getSize()) == 0) {
          return unit;
        }
      }

      return BYTES;
    }
  }

  /**
   * Get the unit corresponding to the provided unit name.
   *
   * @param s
   *          The name of the unit. Can be the abbreviated or long
   *          name and can contain white space and mixed case
   *          characters.
   * @return Returns the unit corresponding to the provided unit name.
   * @throws IllegalArgumentException
   *           If the provided name did not correspond to a known
   *           memory size unit.
   */
  public static SizeUnit getUnit(String s) throws IllegalArgumentException {
    SizeUnit unit = nameToUnit.get(s.trim().toLowerCase());
    if (unit == null) {
      throw new IllegalArgumentException("Illegal memory size unit \"" + s
          + "\"");
    }
    return unit;
  }

  /**
   * Parse the provided size string and return its equivalent size in
   * bytes. The size string must specify the unit e.g. "10kb".
   *
   * @param s
   *          The size string to be parsed.
   * @return Returns the parsed duration in bytes.
   * @throws NumberFormatException
   *           If the provided size string could not be parsed.
   */
  public static long parseValue(String s) throws NumberFormatException {
    return parseValue(s, null);
  }

  /**
   * Parse the provided size string and return its equivalent size in
   * bytes.
   *
   * @param s
   *          The size string to be parsed.
   * @param defaultUnit
   *          The default unit to use if there is no unit specified in
   *          the size string, or null if the string
   *          must always contain a unit.
   * @return Returns the parsed size in bytes.
   * @throws NumberFormatException
   *           If the provided size string could not be parsed.
   */
  public static long parseValue(String s, SizeUnit defaultUnit)
      throws NumberFormatException {
    // Value must be a floating point number followed by a unit.
    Pattern p = Pattern.compile("^\\s*(\\d+(\\.\\d+)?)\\s*(\\w+)?\\s*$");
    Matcher m = p.matcher(s);

    if (!m.matches()) {
      throw new NumberFormatException("Invalid size value \"" + s + "\"");
    }

    // Group 1 is the float.
    double d;
    try {
      d = Double.valueOf(m.group(1));
    } catch (NumberFormatException e) {
      throw new NumberFormatException("Invalid size value \"" + s + "\"");
    }

    // Group 3 is the unit.
    String unitString = m.group(3);
    SizeUnit unit;
    if (unitString == null) {
      if (defaultUnit == null) {
        throw new NumberFormatException("Invalid size value \"" + s + "\"");
      } else {
        unit = defaultUnit;
      }
    } else {
      try {
        unit = getUnit(unitString);
      } catch (IllegalArgumentException e) {
        throw new NumberFormatException("Invalid size value \"" + s + "\""


谱了，现在跌回正常轨道。

4、**中央确认深圳为中国特色社会主义先行示范区，进一步加大开放**，红头全文太长了，我看了一下都是比较虚的政策指导，最后落地成啥样我也不知道。总之深圳肯定会越来越好，也让河南岸的人看清楚社会主义到底好不好。
---

layout: post

title: 他们办了所社畜博物馆，教人如何告别“996”

categories: Archive

date: 2019-04-30

tags: 996

image_feature: "https://i.loli.net/2019/05/03/5ccb17708d266.jpg"

description: 4月1日，冯亮和武靖雅戴上面具，在北京地铁站举着广告牌，上面写着“为什么不每天工作4小时”等句子。

---

原文来自「Vista看天下」:~~[他们办了所社畜博物馆，教人如何告别“996”
](http://wechatscope.jmsc.hku.hk:8000/html?fn=gh_52a264d06413_2019-04-30_2651721502_BF8mUge6YZ.y.tar.gz)~~

本刊记者杨建伟／文

沈佳音／编辑

---

“程序员”冯亮戴着面具，把手中的键盘和鼠标放在凳子上，跪了下来，对着它们磕了三个响头，“咚、咚、咚”。现场一片寂静。接着，他坐在了凳子上，光着脚不停地踩着键盘，噼里啪啦的声音在逼仄的空间里回荡。

敲到一半，冯亮突然倒地。他蜷缩着身子，看起来有些痛苦。在大家认为他“死”了的时候，他开始挣扎，在地板上蠕动着身子。几分钟后，冯亮又起身，坐回凳子上，继续敲击着键盘。他没有说任何一句话。

![](https://i.loli.net/2019/05/03/5ccb17708d266.jpg)

<figcaption>“葬礼”进行到一半，“程序员”冯亮倒在了地上（受访者供图）</figcaption>

这是社畜博物馆举办的一场“葬礼”，纪念过劳死的人——主角是各行各业中因过度劳累而猝死的人。而冯亮扮演的程序员只是其中一种职业的具象化。


join_distance_no_miter(\n      p, vec2(rx, 0.0), vec2(1.0, 0.0), 0.5*v_linewidth*unit_normal.x, line_join));\n\n    unit_normal = normalize(unit_normal + vec2(0.0, 1.0));  // At (rx/2, h) corner.\n    dist = max(dist, line_join_distance_no_miter(\n      p, vec2(0.5*rx, h), unit_normal, 0.5*v_linewidth*unit_normal.y, line_join));\n  }\n  return dist;\n}\n#endif\n\n#ifdef USE_PLUS\nfloat marker_distance(in vec2 p, in int line_cap, in int line_join)\n{\n  // Assuming v_size.x == v.size_y\n  // Only need to consider one octant, the +ve quadrant with x >= y.\n  p = abs(p);\n  p = (p.y > p.x) ? p.yx : p.xy;\n\n  // 3 corners are (r, 0), (r, 3r/8) and (3r/8, 3r/8).\n  float r = 0.5*v_size.x;\n  p = p - vec2(r, 0.375*r);  // Distance with respect to outside corner\n  float dist = max(p.x, p.y);\n\n  if (line_join != miter_join) {\n    // Outside corner\n    dist = max(dist, line_join_distance_no_miter(\n      p, vec2(0.0, 0.0), vec2(1.0/SQRT2, 1.0/SQRT2), v_linewidth/(2.0*SQRT2), line_join));\n\n    // Inside corner\n    dist = min(dist, -line_join_distance_no_miter(\n      p, vec2(-5.0*r/8.0, 0.0), vec2(-1.0/SQRT2, -1.0/SQRT2), v_linewidth/(2.0*SQRT2), line_join));\n  }\n\n  return dist;\n}\n#endif\n\n#if defined(USE_SQUARE) || defined(USE_SQUARE_CROSS) || defined(USE_SQUARE_DOT) ||     defined(USE_SQUARE_X)\nfloat marker_distance(in vec2 p, in int line_cap, in int line_join)\n{\n  vec2 p2 = abs(p) - v_size/2.0;  // Offset from corner\n  float dist = max(p2.x, p2.y);\n\n  if (line_join != miter_join)\n    dist = max(dist, line_join_distance_no_miter(\n      p2, vec2(0.0, 0.0), vec2(1.0/SQRT2, 1.0/SQRT2), v_linewidth/(2.0*SQRT2), line_join));\n\n  return dist;\n}\n#endif\n\n#ifdef USE_SQUARE_PIN\nfloat marker_distance(in vec2 p, in int line_cap, in int line_join)\n{\n  // Assuming v_size.x == v.size_y\n  p = abs(p);\n  p = (p.y > p.x) ? p.yx : p.xy;\n  // p is in octant between y=0 and y=x.\n  // Quadratic bezier curve passes through (r, r), (11r/16, 0) and (r, -r).\n  // Circular arc that passes through the same points has center at\n  // x = r + 231r/160 = 2.44275r and y = 0 and hence radius is\n  // x - 11r/16 = 1.75626 precisely.\n  float r = 0.5*v_size.x;\n  float center_x = r*2.44375;\n  float radius = r*1.75626;\n  float dist = radius - distanc


reak,
					Call = icons.kind.Call,
					CaseStatement = icons.kind.Case,
					Class = icons.kind.Class,
					Color = icons.kind.Color,
					Constant = icons.kind.Constant,
					Constructor = icons.kind.Constructor,
					ContinueStatement = icons.kind.Continue,
					Declaration = icons.kind.Declaration,
					Delete = icons.kind.Delete,
					DoStatement = icons.kind.Loop,
					Enum = icons.kind.Enum,
					EnumMember = icons.kind.EnumMember,
					Event = icons.kind.Event,
					Field = icons.kind.Field,
					File = icons.kind.File,
					ForStatement = icons.kind.Loop,
					Function = icons.kind.Function,
					Identifier = icons.kind.Variable,
					Interface = icons.kind.Interface,
					Keyword = icons.kind.Keyword,
					List = icons.kind.List,
					Lsp = icons.misc.LspAvailable,
					Method = icons.kind.Method,
					Module = icons.kind.Module,
					Namespace = icons.kind.Namespace,
					Operator = icons.kind.Operator,
					Package = icons.kind.Package,
					Pair = icons.kind.List,
					Property = icons.kind.Property,
					Reference = icons.kind.Reference,
					Regex = icons.kind.Regex,
					Repeat = icons.kind.Loop,
					Scope = icons.kind.Statement,
					Snippet = icons.kind.Snippet,
					Statement = icons.kind.Statement,
					Struct = icons.kind.Struct,
					SwitchStatement = icons.kind.Switch,
					Type = icons.kind.Interface,
					TypeParameter = icons.kind.TypeParameter,
					Unit = icons.kind.Unit,
					Value = icons.kind.Value,
					Variable = icons.kind.Variable,
					WhileStatement = icons.kind.Loop,

					-- Microsoft-specific icons
					Folder = icons.kind.Folder,

					-- ccls-specific icons
					Macro = icons.kind.Macro,
					Terminal = icons.kind.Terminal,
				},
			},
			ui = {
				bar = { separator = "  " },
				menu = { indicator = icons.ui.ArrowClosed },
			},
		},
	})
end


ng, Task>>())
            {
                await handler(this, rawResponse);
            }
        }
    }

    /// <summary>
    /// Invokes the <see cref="ExceptionOccurredAsync"/> event handlers.
    /// </summary>
    /// <param name="exception">The exception that occurred.</param>
    public async Task OnExceptionOccurredAsync(Exception exception)
    {
        if (ExceptionOccurredAsync != null)
        {
            foreach (var handler in ExceptionOccurredAsync.GetInvocationList().Cast<Func<object, Exception, Task>>())
            {
                await handler(this, exception);
            }
        }
    }
}

/// <summary>
/// Represents events related to Jinget service handling with a specific response model.
/// </summary>
/// <typeparam name="TResponseModel">The type of the response model.</typeparam>
public class JingetServiceHandlerEvents<TResponseModel> : JingetServiceHandlerEvents where TResponseModel : class, new()
{
    /// <summary>
    /// Occurs when a response is deserialized into the specified response model.
    /// </summary>
    public event Func<object, TResponseModel?, Task>? ResponseDeserializedAsync;

    /// <summary>
    /// Invokes the <see cref="ResponseDeserializedAsync"/> event handlers.
    /// </summary>
    /// <param name="responseModel">The deserialized response model.</param>
    public async Task OnResponseDeserializedAsync(TResponseModel? responseModel)
    {
        if (ResponseDeserializedAsync != null)
        {
            foreach (var handler in ResponseDeserializedAsync.GetInvocationList().Cast<Func<object, TResponseModel?, Task>>())
            {
                await handler(this, responseModel);
            }
        }
    }
}


.wrapping_add((*p_stream).m_bytes_in_buffer) as OPJ_SIZE_T
            as OPJ_SIZE_T;
          (*p_stream).m_current_data = (*p_stream).m_stored_data;
          p_buffer = p_buffer.offset((*p_stream).m_bytes_in_buffer as isize);
          p_size = (p_size as libc::c_ulong).wrapping_sub((*p_stream).m_bytes_in_buffer)
            as OPJ_SIZE_T as OPJ_SIZE_T;
          (*p_stream).m_byte_offset += (*p_stream).m_bytes_in_buffer as OPJ_OFF_T;
          (*p_stream).m_bytes_in_buffer = 0 as libc::c_int as OPJ_SIZE_T
        } else {
          /* we have read the exact size */
          l_read_nb_bytes = (l_read_nb_bytes as libc::c_ulong)
            .wrapping_add((*p_stream).m_bytes_in_buffer) as OPJ_SIZE_T
            as OPJ_SIZE_T;
          (*p_stream).m_byte_offset += (*p_stream).m_bytes_in_buffer as OPJ_OFF_T;
          (*p_stream).m_current_data = (*p_stream).m_stored_data;
          (*p_stream).m_bytes_in_buffer = 0 as libc::c_int as OPJ_SIZE_T;
          return l_read_nb_bytes;
        }
      }
    }
  }
}
#[no_mangle]
pub unsafe extern "C" fn opj_stream_write_data(
  mut p_stream: *mut opj_stream_private_t,
  mut p_buffer: *const OPJ_BYTE,
  mut p_size: OPJ_SIZE_T,
  mut p_event_mgr: *mut opj_event_mgr_t,
) -> OPJ_SIZE_T {
  let mut l_remaining_bytes = 0 as libc::c_int as OPJ_SIZE_T;
  let mut l_write_nb_bytes = 0 as libc::c_int as OPJ_SIZE_T;
  if (*p_stream).m_status & 0x8 as libc::c_uint != 0 {
    return -(1 as libc::c_int) as OPJ_SIZE_T;
  }
  loop {
    l_remaining_bytes = (*p_stream)
      .m_buffer_size
      .wrapping_sub((*p_stream).m_bytes_in_buffer);
    /* we have more memory than required */
    if l_remaining_bytes >= p_size {
      memcpy(
        (*p_stream).m_current_data as *mut libc::c_void,
        p_buffer as *const libc::c_void,
        p_size,
      );
      (*p_stream).m_current_data = (*p_stream).m_current_data.offset(p_size as isize);
      (*p_stream).m_bytes_in_buffer = ((*p_stream).m_bytes_in_buffer as libc::c_ulong)
        .wrapping_add(p_size) as OPJ_SIZE_T as OPJ_SIZE_T;
      l_write_nb_bytes =
        (l_write_nb_bytes as libc::c_ulong).wrapping_add(p_size) as OPJ_SIZE_T as OPJ_SIZE_T;
      (*p_stream).m_byte_offset += p_size as OPJ_OFF_T;
      return l_write_nb_bytes;
    }
    /* we copy data and then do an actual read on the stream */
    if l_remaining_bytes != 0 {
      l_write_nb_bytes = (l_write_nb_bytes as libc::c_ulong).wrapping_add(l_remaining_bytes)
        as OPJ_SIZE_T as


if (!credentialsObject || !credentialsObject.hasOwnProperty('referer') || !credentialsObject.hasOwnProperty('method')) {
        throw new ForbiddenException('Forbidden');
    }

    console.log(credentialsObject);
    next();

  }
}
import { LitElement, html, property, customElement } from "lit-element";
import "@vaadin/vaadin-text-field";
import "@vaadin/vaadin-button";
import "@vaadin/vaadin-checkbox";
import "@vaadin/vaadin-radio-button/vaadin-radio-button";
import "@vaadin/vaadin-radio-button/vaadin-radio-group";
import todo, { getVisibleTodosSelector, todoActions } from "../redux/todo";
import { connect } from "pwa-helpers";
import { RootState, store } from "../redux/store";
import { Todo } from "../redux/todo";

@customElement("todo-view")
class TodoView extends connect(store)(LitElement) {
  //? state 정의 부분
  @property({ type: Array }) todos: Todo[] = [];
  @property({ type: String }) filter = "";
  @property({ type: String }) task = "";

  //* 업데이트 될때 실행 된다
  //? 리덕스 값 불러오기를 이곳에서 하면 될듯
  stateChanged(state: RootState) {
    this.todos = state.todos.todos;
    this.filter = state.todos.filter;
  }
  /*
  someProperty.hasChanged
  requestUpdate
  performUpdate
  shouldUpdate
  update
  render
  firstUpdated
  updated
  updateComplete
  */

  attributeChangedCallback(name, oldvar, newvar) {
    super.attributeChangedCallback(name, oldvar, newvar);
  }

  //* DOM에 컴포넌트가 추가 될 때
  connectedCallback() {
    super.connectedCallback();

    setTimeout(() => {
      this.task = "sadfaf";
      // this.setAttribute("task", "이이이잉");
    }, 3000);
  }

  //* DOM에서 컴포넌트가 제거 될 때
  disconnectedCallback() {
    super.disconnectedCallback();
  }

  //* 첫 업데이트 시 수행
  firstUpdated(changed) {
    super.firstUpdated(changed);
  }

  //* 업데이트 될때마다 수행
  updated(changed) {
    super.update(changed);
  }
  //* 업데이트 해야할지
  shouldUpdate(changed) {
    super.shouldUpdate(changed);
    return true;
  }

  render() {
    return html`

        <vaadin-text-field
          placeholder="Task"
          value="${this.task || ""}"
          @change="${this.updateTask}"
        ></vaadin-text-field>

        <vaadin-button theme="primary" @click="${this.addTodo}">
          Add Todo
        </vaadin-button>

        ${this.tod