Exception("Unexpected end of stream")
        reader.seek<XmlToken.EndElement>()
        reader.nextToken() ?: throw DeserializationException("Unexpected end of stream")

        return null
    }

    override fun deserializeByteArray(): ByteArray = deserializeString().decodeBase64Bytes()

    override fun deserializeInstant(format: TimestampFormat): Instant = when (format) {
        TimestampFormat.EPOCH_SECONDS -> deserializeString().let { Instant.fromEpochSeconds(it) }
        TimestampFormat.ISO_8601 -> deserializeString().let { Instant.fromIso8601(it) }
        TimestampFormat.RFC_5322 -> deserializeString().let { Instant.fromRfc5322(it) }
        else -> throw DeserializationException("unknown timestamp format: $format")
    }
}
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */
package aws.smithy.kotlin.runtime.serde.xml.deserialization

import aws.smithy.kotlin.runtime.InternalApi
import aws.smithy.kotlin.runtime.serde.DeserializationException
import aws.smithy.kotlin.runtime.serde.xml.XmlStreamReader
import aws.smithy.kotlin.runtime.serde.xml.XmlToken
import aws.smithy.kotlin.runtime.serde.xml.terminates

/**
 * An [XmlStreamReader] that provides [XmlToken] elements from an [XmlLexer]. This class internally maintains a peek
 * state, [lastToken], etc., but delegates all parsing operations to the scanner.
 * @param source The [XmlLexer] to use for XML parsing.
 */
@InternalApi
public class LexingXmlStreamReader(private val source: XmlLexer) : XmlStreamReader {
    private val peekQueue = ArrayDeque<XmlToken>()

    /**
     * Throws a [DeserializationException] with the given message and location string.
     * @param msg The error message to include with the exception.
     */
    @Suppress("NOTHING_TO_INLINE")
    internal inline fun error(msg: String): Nothing = source.error(msg)

    override var lastToken: XmlToken? = null
        private set

    override fun nextToken(): XmlToken? =
        (peekQueue.removeFirstOrNull() ?: source.parseNext()).also { lastToken = it }

    override fun peek(index: Int): XmlToken? {
        while (index > peekQueue.size && !source.endOfDocument) {
            peekQueue.addLast(source.parseNext()!!)
        }
        return peekQueue.getOrNull(index - 1)
    }

    override fun skipNext() {
        val peekToken = peek(1) ?: return
        val startDepth = peekToken.depth
        scanUntilDepth(startDepth, nextToken())
    }

    private tailrec fun scanUntilDepth(startDepth: Int, from: XmlToken?) {
        when {
            from == null || from is XmlToken.EndDocument -> return // End of document
            from is XmlToken.EndElement && from.depth == startDepth -> return // Returned to original start depth
            else -> scanUntilDepth(startDepth, nextToken()) // Keep scannin'!
        }
    }

    override fun subTreeReader(subtreeStartDepth: XmlStreamReader.SubtreeStartDepth): XmlStreamReader =
        if (peek(1).terminates(lastToken)) {
            // Special case—return an empty subtree _and_ advance the token.
            nextToken()
            EmptyXmlStreamReader(this)
        } else {
            ChildXmlStreamReader(this, subtreeStartDepth)
        }
}

/**
 * A child (i.e., subtree) XML stream reader that terminates after returning to the depth at which it started.
 * @param parent The [LexingXmlStreamReader] upon which this child reader is based.
 * @param subtreeStartDepth The depth termination method.
 */
private class ChildXmlStreamReader(
    private val parent: LexingXmlStreamReader,
    private val subtreeStartDepth: XmlStreamReader.SubtreeSta


  }

    /**
     * 读取Piece数据
     *
     * @param index  Piece索引
     * @param begin  Piece偏移
     * @param length 数据长度
     *
     * @return Piece数据
     *
     * @throws NetException 网络异常
     *
     * @see TorrentStreamGroup#read(int, int, int)
     */
    public byte[] read(int index, int begin, int length) throws NetException {
        return this.torrentStreamGroup.read(index, begin, length);
    }

    /**
     * 保存Piece
     *
     * @param piece Piece数据
     *
     * @return 是否保存成功
     *
     * @see TorrentStreamGroup#write(TorrentPiece)
     */
    public boolean write(TorrentPiece piece) {
        return this.torrentStreamGroup.write(piece);
    }

    /**
     * 判断Piece是否已经下载
     *
     * @param index Piece索引
     *
     * @return 是否已经下载
     *
     * @see TorrentStreamGroup#hasPiece(int)
     */
    public boolean hasPiece(int index) {
        return this.torrentStreamGroup.hasPiece(index);
    }

    /**
     * 设置下载失败Piece
     *
     * @param piece Piece
     *
     * @see TorrentStreamGroup#undone(TorrentPiece)
     */
    public void undone(TorrentPiece piece) {
        this.torrentStreamGroup.undone(piece);
    }

    /**
     * 设置完整Piece位图
     *
     * @param pieces Piece位图
     *
     * @see TorrentStreamGroup#fullPieces(BitSet)
     */
    public void fullPieces(BitSet pieces) {
        this.torrentStreamGroup.fullPieces(pieces);
    }

    /**
     * 设置完整Piece位图
     *
     * @see TorrentStreamGroup#fullPieces()
     */
    public void fullPieces() {
        this.torrentStreamGroup.fullPieces();
    }

    /**
     * 获取健康度
     *
     * @return 健康度
     *
     * @see TorrentStreamGroup#health()
     */
    public int health() {
        return this.torrentStreamGroup.health();
    }

    /**
     * 校验文件
     *
     * @return 是否校验成功
     *
     * @see TorrentStreamGroup#verify()
     */
    public boolean verify() {
        try {
            return this.torrentStreamGroup.verify();
        } catch (IOException e) {
            LOGGER.error("文件校验异常", e);
        }
        return false;
    }

    /**
     * 获取已经下载Piece位图
     *
     * @return 已经下载Piece位图
     *
     * @see TorrentStreamGroup#pieces()
     */
    public BitSet pieces() {
        return this.torrentStreamGroup.pieces();
    }

    /**
     * 获取选择下载Piece位图
     *
     * @return 选择下载Piece位图
     *
     * @see TorrentStreamGroup#selectPieces()
     */
    public BitSet selectPieces() {
        return this.torrentStreamGroup.selectPieces();
    }

    /**
     * 所有Piece位图
     *
     * @return 所有Piece位图
     *
     * @see TorrentStreamGroup#allPieces()
     */
    public BitSet allPieces() {


/**
 * Description: maintains info about every pair of consecutive elements in a set.
 	* In code below, \texttt{difs} is a multiset of all consecutive differences.
 * Time: O(\log N)
 * Source: own
 * Verification: https://cses.fi/problemset/task/1188/
 */

 template<class T> struct ConsecutivePairs {
	set<T> S;
	multiset<int> difs;
	void ins_pair(T l, T r) {
		difs.ins(r-l);
	}
	void erase_pair(T l, T r) {
		auto it = difs.find(r-l); assert(it != end(difs));
		difs.erase(it);
	}
	void ins(T t) {
		auto [it,inserted] = S.ins(t); assert(inserted);
		bool is_bg = it == bg(S), is_en = next(it) == end(S);
		if (!is_bg && !is_en) erase_pair(*prev(it),*next(it));
		if (!is_bg) ins_pair(*prev(it),*it);
		if (!is_en) ins_pair(*it,*next(it));
	}
	void erase(T t) {
		auto it = S.find(t); assert(it != end(S));
		bool is_bg = it == bg(S), is_en = next(it) == end(S);
		if (!is_bg) erase_pair(*prev(it),*it);
		if (!is_en) erase_pair(*it,*next(it));
		if (!is_bg && !is_en) ins_pair(*prev(it),*next(it));
		S.erase(it);
	}
	void toggle(T t) {
		if (S.count(t)) erase(t);
		else ins(t);
	}
};


t year to ensure sunset on Dec 31 is caught

    df, events = build_dataframe(elevation_m, lat, lon, dusk_minutes, t0, t1)
    # df = df.loc['20400101':'20401231']

    # break big dataframe apart by time of day (sunrise/set, morning/evening) as well as
    # groupings of bodys (all, just planets, just visible planets and the moon, just visible planets)
    df_filter_planets = {}
    df_moon = {}
    df_visible = {}
    df_telescopic = {}

    df_final = None
    for event in events:
        df_just_altitude_columns = df[
            [s for s in df.columns if event in s and s != f"{event}_dt"]].copy()  # retain only altitude columns

        columns = [f'{s}_{event}_alt' "" for s in visible_planet_list_short]
        df_visible[event] = df_just_altitude_columns[columns]

        columns = [f'{s}_{event}_alt' "" for s in telescopic_planet_list_short]
        df_telescopic[event] = df_just_altitude_columns[columns]

        df_moon[event] = pd.DataFrame(df_just_altitude_columns[f'Moon_{event}_alt'])

        for d, name in zip([df_visible, df_telescopic, df_moon], ['visible', 'telescopic', 'Moon']):
            for attr_short, alt in zip(['above_horizon', 'above_treeline'], [0, treeline_degrees]):
                attr = f"{name}_{event}_{attr_short}"
                df_this_event = d[event]
                df_this_event[attr] = (df_this_event > alt).sum(axis=1)
                if df_final is None:
                    df_final = pd.DataFrame(df_this_event[attr])
                else:
                    df_final[attr] = df_this_event[attr]
    return df_final

if __name__ == '__main__':
    filename='planetary_parade.pickle'
    try:
        with open(filename, 'rb') as f:
            df = pickle.load(f)
    except Exception as e:
        df = main()
        with open(filename, 'wb') as f:
            pickle.dump(df, f)
    print(df.shape)


(self, value) return "" end,
	},
}

function Drawing.initialize()
	Drawing.allowCachedImages = true
	if Main.IsOnBizhawk() then
		client.SetGameExtraPadding(0, Constants.SCREEN.UP_GAP, Constants.SCREEN.RIGHT_GAP, Constants.SCREEN.DOWN_GAP)
		gui.defaultTextBackground(0)
	end
end

function Drawing.clearGUI()
	gui.drawRectangle(Constants.SCREEN.WIDTH, 0, Constants.SCREEN.WIDTH + Constants.SCREEN.RIGHT_GAP, Constants.SCREEN.HEIGHT, Drawing.Colors.BLACK, Drawing.Colors.BLACK)
end

---@param waitFramesBeforeClearing number? [Optional] Will wait N frames before clearing the cache, useful for allowing any final image draws
---@param scaleWithSpeedup boolean? [Optional] If true, will sync the counter to real time instead of the client's frame rate, ignoring speedup
function Drawing.clearImageCache(waitFramesBeforeClearing, scaleWithSpeedup)
	if not Main.IsOnBizhawk() then return end
	local function clearCacheAndForceDraw()
		gui.clearImageCache()
		gui.drawPixel(Constants.SCREEN.WIDTH + Constants.SCREEN.RIGHT_GAP + 1, 1, 0x01000000)
	end
	if type(waitFramesBeforeClearing) == "number" and waitFramesBeforeClearing > 0 then
		Program.addFrameCounter("ClearImageCache", waitFramesBeforeClearing, clearCacheAndForceDraw, 1, scaleWithSpeedup)
	else
		clearCacheAndForceDraw()
	end
end

function Drawing.drawBackgroundAndMargins(x, y, width, height, bgcolor)
	x = x or Constants.SCREEN.WIDTH
	y = y or 0
	width = width or Constants.SCREEN.WIDTH + Constants.SCREEN.RIGHT_GAP
	height = height or Constants.SCREEN.HEIGHT
	bgcolor = bgcolor or Theme.COLORS["Main background"]
	gui.drawRectangle(x, y, width, height, bgcolor, bgcolor)
end

---@param filepath string The absolute filepath to the image file; see FileManager.buildImagePath()
---@param x number The x-coordinate on the game screen canvas to draw the image
---@param y number The y-coordinate on the game screen canvas to draw the image
---@param width number? [Optional] If specified and the image is larger, will resize accordingly
---@param height number? [Optional] If specified and the image is larger, will resize accordingly
function Drawing.drawImage(filepath, x, y, width, height)
	if not Drawing.allowCachedImages or Utils.isNilOrEmpty(filepath) then return end
	if width ~= nil and height ~= nil then
		gui.drawImage(filepath, x, y, width, height)
	else
		gui.drawImage(filepath, x, y)
	end
end

---Draws part of the image file (source parameters) to a destination location on screen (desttination parameters)
---@param filepath string The absolute filepath to the image file; see FileManager.buildImagePath()
---@param sourceX number The x-coordinate from the source image file
---@param sourceY number The y-coordinate from the source image file
---@param sourceW number The width to draw from the source image file
---@param sourceH number The height to draw from the source image file
---@param destX number The x-coordinate on the game screen canvas to draw the image
---@param destY number The y-coordinate on the game screen canvas to draw the image
---@param destW number? [Optional] If specified and the image is larger, will resize accordingly
---@param destH number? [Optional] If specified and the image is larger, will resize accordingly
function Drawing.drawImageRegion(filepath,


actionsTotalRows()).isEqualTo(1)
  }
}
package linea.staterecovery

import build.linea.clients.StateManagerClientV1
import io.vertx.core.Vertx
import linea.EthLogsSearcher
import linea.contract.l1.LineaRollupSmartContractClientReadOnly
import linea.domain.BlockParameter
import linea.domain.BlockParameter.Companion.toBlockParameter
import net.consensys.linea.async.AsyncRetryer
import net.consensys.linea.blob.BlobDecompressorVersion
import net.consensys.linea.blob.GoNativeBlobDecompressorFactory
import net.consensys.zkevm.LongRunningService
import org.apache.logging.log4j.LogManager
import tech.pegasys.teku.infrastructure.async.SafeFuture
import java.util.concurrent.CompletableFuture
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds

class StateRecoveryApp(
  private val vertx: Vertx,
  // Driving Ports
  private val lineaContractClient: LineaRollupSmartContractClientReadOnly,
  private val ethLogsSearcher: EthLogsSearcher,
  // Driven Ports
  private val blobFetcher: BlobFetcher,
  private val elClient: ExecutionLayerClient,
  private val stateManagerClient: StateManagerClientV1,
  private val transactionDetailsClient: TransactionDetailsClient,
  private val blockHeaderStaticFields: BlockHeaderStaticFields,
  // configs
  private val config: Config,
) : LongRunningService {
  data class Config(
    val smartContractAddress: String,
    val l1EarliestSearchBlock: BlockParameter = BlockParameter.Tag.EARLIEST,
    val l1LatestSearchBlock: BlockParameter = BlockParameter.Tag.FINALIZED,
    val l1PollingInterval: Duration = 12.seconds,
    val l1getLogsChunkSize: UInt,
    val executionClientPollingInterval: Duration = 1.seconds,
    val blobDecompressorVersion: BlobDecompressorVersion = BlobDecompressorVersion.V1_2_0,
    /**
     * The block number at which the recovery mode will start overriding the recovery start block number
     * this is meant for testing purposes, not production
     */
    val overridingRecoveryStartBlockNumber: ULong? = null,
    val debugForceSyncStopBlockNumber: ULong? = null,
  ) {
    companion object {
      val lineaMainnet = Config(
        smartContractAddress = "0xd19d4b5d358258f05d7b411e21a1460d11b0876f",
        // TODO: set block of V6 Upgrade
        l1EarliestSearchBlock = 1UL.toBlockParameter(),
        l1LatestSearchBlock = BlockParameter.Tag.FINALIZED,
        l1PollingInterval = 12.seconds,
        l1getLogsChunkSize = 10_000u,
        executionClientPollingInterval = 2.seconds,
      )
      val lineaSepolia = Config(
        smartContractAddress = "0xb218f8a4bc926cf1ca7b3423c154a0d627bdb7e5",
        l1EarliestSearchBlock = 7164537UL.toBlockParameter(),
        l1LatestSearchBlock = BlockParameter.Tag.FINALIZED,
        l1PollingInterval = 12.seconds,
        l1getLogsChunkSize = 10_000u,
        executionClientPollingInterval = 2.seconds,
      )
    }
  }

  init {
    require(config.smartContractAddress.lowercase() == lineaContractClient.getAddress().lowercase()) {
      "contract address mismatch: config=${config.smartContractAddress} client=${lineaContractClient.getAddress()}"
    }
  }

  private val l1EventsClient = LineaSubmissionEventsClientImpl(
    logsSearcher = ethLogsSearcher,
    smartContractAddress = config.smartContractAddress,
    l1LatestSearchBlock = config.l1LatestSearchBlock,
    logsBlockChunkSize = config.l1getLogsChunkSize.toInt(),
  )
  private val log = LogManager.getLogger(this::class.java)
  private val blockImporterAndStateVerifier = BlockImporterAndStateVerifierV1(
    vertx = vertx,
    elClient = elClient,


o yhtäkään askaretta sinä päivänä, sillä se onsovituspäivä, jolloin teille toimitetaan sovitus Herran, teidänJumalanne, edessä.</verse>
				<verse number="29">Sillä jokainen, joka ei sinä päivänä kurita itseänsä paastolla,hävitettäköön kansastansa.</verse>
				<verse number="30">Ja jokaisen, joka sinä päivänä toimittaa jotakin askaretta, minähävitän hänen kansastansa.</verse>
				<verse number="31">Älkää silloin yhtäkään askaretta toimittako. Se olkoon teilleikuinen säädös sukupolvesta sukupolveen, missä asuttekin.</verse>
				<verse number="32">Se on oleva teille levon päivä, kurittakaa itseänne paastolla.Kuukauden yhdeksäntenä päivänä illalla, illasta iltaan, pitäkää tämäsapatti."</verse>
				<verse number="33">Ja Herra puhui Moosekselle sanoen:</verse>
				<verse number="34">"Puhu israelilaisille ja sano: Tämän seitsemännen kuunviidentenätoista päivänä on lehtimajanjuhla Herran kunniaksi; se kestääseitsemän päivää.</verse>
				<verse number="35">Ensimmäisenä päivänä pidettäköön pyhä kokous; älkää silloin yhtäkäänarkiaskaretta toimittako.</verse>
				<verse number="36">Seitsemänä päivänä tuokaa uhri Herralle. Kahdeksantena päivänäolkoon teillä pyhä kokous, ja tuokaa uhri Herralle; se on juhlakokous,älkää silloin yhtäkään arkiaskaretta toimittako.</verse>
				<verse number="37">Nämä ovat Herran juhla-ajat, joiksi teidän on kuulutettava pyhätkokoukset, tuodaksenne Herralle uhreja: polttouhreja ja ruokauhreja,teurasuhreja ja juomauhreja, kunakin päivänä sen päivän uhrit;</verse>
				<verse number="38">ja sitäpaitsi Herran sapatit ja teidän muut lahjanne ja kaikkilupausuhrinne ja kaikki vapaaehtoiset uhrinne, joita te Herralleannatte.</verse>
				<verse number="39">Mutta seitsemännen kuukauden viidentenätoista päivänä, kun te olettekorjanneet maan sadon, viettäkää Herran juhlaa seitsemän päivää;ensimmäinen päivä on levon päivä, ja kahdeksas päivä on myös levonpäivä.</verse>
				<verse number="40">Ensimmäisenä päivänä ottakaa ihania hedelmiä puista, palmunoksia jatuuheiden puiden lehviä sekä pajuja purojen varsilta, ja pitäkää iloaseitsemän päivää Herran, Jumalanne edessä.</verse>
				<verse number="41">Ja viettäkää sitä juhlana Herran kunniaksi seitsemän päiväävuodessa. Se olkoon teille ikuinen säädös sukupolvesta sukupolveen;viettäkää se seitsemännessä kuussa.</verse>
				<verse number="42">Seitsemän päivää asukaa lehtimajoissa; kaikki Israelissa syntyneetasukoot lehtimajoissa,</verse>
				<verse number="43">että teidän jälkeläisenne t


ir 10 Times",
    isUnlocked("YoshiNair1"),
    "YoshiNair1"
  );
  let YoshiNair2 = new Achivement(
    "Super Armor Lol",
    "Hit Yoshis Nair 100 Times",
    isUnlocked("YoshiNair2"),
    "YoshiNair2"
  );
  let YoshiNair3 = new Achivement(
    "Wait, Wheres Baby Mario?",
    "Hit Yoshis Nair 1000 Times",
    isUnlocked("YoshiNair3"),
    "YoshiNair3"
  );
  let YoshiNairArray = [10, 100, 1000];
  let YoshiDownSmash1 = new Achivement(
    null,
    "Kill With Yoshi's Downsmash",
    isUnlocked("YoshiDownSmash1"),
    "YoshiDownSmash1"
  );
  let YoshiDownSmash2 = new Achivement(
    null,
    "Kill With Yoshi's Downsmash 10 Times",
    isUnlocked("YoshiDownSmash2"),
    "YoshiDownSmash2"
  );
  let YoshiDownSmash3 = new Achivement(
    null,
    "Kill WIth Yoshi's Downsmash 100 Times",
    isUnlocked("YoshiDownSmash3"),
    "YoshiDownSmash3"
  );
  let YoshiDownSmashArray = [1, 10, 100];
  //Jigglypuff
  let JigBackair1 = new Achivement(
    null,
    "Hit Backair",
    isUnlocked("JigBackair1"),
    "JigBackair1"
  );
  let JigBackair2 = new Achivement(
    null,
    "Hit 100 Backairs",
    isUnlocked("JigBackair2"),
    "JigBackair2"
  );
  let JigBackair3 = new Achivement(
    null,
    "Hit 10000 Backairs",
    isUnlocked("JigBackair3"),
    "JigBackair3"
  );
  let JigBackAirArray = [1, 100, 10000];
  let RestKill1 = new Achivement(
    "Sleepy Time",
    "Kill with Rest",
    isUnlocked("RestKill1"),
    "RestKill1"
  );
  let RestKill2 = new Achivement(
    null,
    "Kill with 10 Rests",
    isUnlocked("RestKill2"),
    "RestKill2"
  );
  let RestKill3 = new Achivement(
    "Well Rested",
    "Kill with 100 Rests",
    isUnlocked("RestKill3"),
    "RestKill3"
  );
  let RestKillArray = [1, 10, 100];
  //Mewtwo
  let MewtwoSB1 = new Achivement(
    null,
    "Shoot a Shadow Ball",
    isUnlocked("MewtwoSB1"),
    "MewtwoSB1"
  );
  let MewtwoSB2 = new Achivement(
    null,
    "Shoot 10 Shadow Balls",
    isUnlocked("MewtwoSB2"),
    "MewtwoSB2"
  );
  let MewtwoSB3 = new Achivement(
    null,
    "Shoot 100 Shadow Balls",
    isUnlocked("MewtwoSB3"),
    "MewtwoSB3"
  );
  let MewtwoArray = [1, 10, 100];
  let MewtwoFair1 = new Achivement(
    null,
    "Kill With Mewtwo Fair",
    isUnlocked("MewtwoFair1"),
    "MewtwoFair1"
  );
  let MewtwoFair2 = new Achivement(
    null,
    "Kill With Mewtwo Fair 10 Times",
    isUnlocked("MewtwoFair2"),
    "MewtwoFair2"
  );
  let MewtwoFair3 = new Achivement(
    null,
    "Kill With Mewtwo Fair 100 Times",
    isUnlocked("MewtwoFair3"),
    "M


] = -0.64586847728552887000;
y[21] = -0.57735026918962551000;
y[22] = -0.51267008667516678000;
y[23] = -0.45121718317830323000;
y[24] = -0.39247107881010240000;
y[25] = -0.33598213147817668000;
y[26] = -0.28135637451595324000;
y[27] = -0.22824347439014994000;
y[28] = -0.17632698070846500000;
y[29] = -0.12531625823730441000;
y[30] = -0.07493964001908703900;
y[31] = -0.02493844305504610100;
y[32] = 0.02493844305504610100;
y[33] = 0.07493964001908703900;
y[34] = 0.12531625823730441000;
y[35] = 0.17632698070846500000;
y[36] = 0.22824347439014994000;
y[37] = 0.28135637451595324000;
y[38] = 0.33598213147817668000;
y[39] = 0.39247107881010240000;
y[40] = 0.45121718317830301000;
y[41] = 0.51267008667516623000;
y[42] = 0.57735026918962618000;
y[43] = 0.64586847728552887000;
y[44] = 0.71895103828786022000;
y[45] = 0.79747338888240393000;
y[46] = 0.88250523616465459000;
y[47] = 0.97537247158200291000;
y[48] = 1.07774368351222670000;
y[49] = 1.19175359259420950000;
y[50] = 1.32018331365488510000;
y[51] = 1.46673061342097320000;
y[52] = 1.63642745273401610000;
y[53] = 1.83630792973623190000;
y[54] = 2.07652139657233640000;
y[55] = 2.37228029184788890000;
y[56] = 2.74747741945462160000;
y[57] = 3.24192037576928450000;
y[58] = 3.92724714760272690000;
y[59] = 4.94671494494940060000;
y[60] = 6.63456649978930190000;
y[61] = 9.99349498241742220000;
y[62] = 20.03689788997819200000;
y[63] = 10381.32741756979;

var val;
for (i = 0; i < vnum; i++)
{
	val = Math.tan(x[i]);
	if (!isEqual(val, y[i]))
	{
		$ERROR("\nx = " + x[i] + "\nlibc.tan(x) = " + y[i] + "\nMath.tan(x) = " + Math.tan(x[i]) + "\nMath.abs(libc.tan(x) - Math.tan(x)) > " + prec + "\n\n");
	}
}

// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * All of the arguments are optional, any arguments supplied are
 * accepted but are completely ignored. A string is created and returned as
 * if by the expression (new Date()).toString()
 *
 * @path ch15/15.9/15.9.2/S15.9.2.1_A2.js
 * @description Use various number arguments and various types of ones
 */

function dateIsEqual(d1, d2) {
  if (d1 === d2) {
    return true;
  } else if (Math.abs(Date.parse(d1) - Date.parse(d2)) <= 1000) {
    return true;
  } else {
    return false;
  }
}

//CHECK#1
if( !dateIsEqual(Date(), (new Date()).toString()) ) {
  $ERR


cker().pickImage(source: ImageSource.gallery, imageQuality: 70, maxHeight: 512, maxWidth: 512);
      if(image != null){
        imageUploading.value = true;
        // Upload Images
        final imageUrl = await userRepository.uploadImage('Users/Images/Profile/', image);

        // Update User Images Record
        Map<String, dynamic> json = {'ProfilePicture': imageUrl};
        await userRepository.updateSingleField(json);

        user.value.profilePicture = imageUrl;
        user.refresh();

        TLoaders.successSnackBar(title: 'Congratulation', message: 'Your Profile Image has been updated');
      }
    }catch(e){
      TLoaders.errorSnackBar(title: 'Oh Snap', message: 'Something went wrong: $e');
    } finally{
      imageUploading.value = false;
    }

  }

}import 'package:fluom/common/widgets/custom_shape/containers/roundedConatiner.dart';
import 'package:fluom/utils/constants/colors.dart';
import 'package:fluom/utils/helpers/helper_function.dart';
import 'package:flutter/material.dart';
import 'package:iconsax/iconsax.dart';

import '../../../../../utils/constants/sizes.dart';

class SingleAddress extends StatelessWidget {
  const SingleAddress({
    super.key,
    required this.selectedAddress
  });

  final bool selectedAddress;

  @override
  Widget build(BuildContext context) {
    final dark = THelperFunction.isDarkMode(context);
    return RoundedContainer(
      width: double.infinity,
      showBorder: true,
      padding: const EdgeInsets.all(TSizes.md),
      backgroundColor: selectedAddress ? TColors.primary.withOpacity(0.5) : Colors.transparent,
      borderColor: selectedAddress
          ? Colors.transparent
          : dark
               ? TColors.darkerGrey
                : TColors.grey,
      margin: const EdgeInsets.only(bottom: TSizes.spaceBtwItems),
      child: Stack(
        children: [
          Positioned(
            top: 0,
            right: 5,
            child: Icon(
              selectedAddress ? Iconsax.tick_circle5 : null,
              color: selectedAddress
              ? dark
              ? TColors.light
              : TColors.dark.withOpacity(0.6)
              : null,
            ),
          ),
          Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                'Ankit Dhattarwal',
                maxLines: 1,
                overflow: TextOverflow.ellipsis,
                style: Theme.of(context).textTheme.titleLarge,
              ),
              const SizedBox(height: TSizes.sm / 2,),
              const Text('(+91) 70152-16280', maxLines: 1, overflow: TextOverflow.ellipsis,),
              const SizedBox(height: TSizes.sm / 2,),
              const Text('420 HC, Near Baba Ramdev Mandir, Hisar, Haryana, India', softWrap: true,),
            ],
          ),
        ],
      ),
    );
  }
}
import 'package:get_storage/get_storage.dart';

class TLocalStorage {
  static final TLocalStorage _instance = TLocalStorage._internal();

  factory TLocalStorage(){
    return _instance;
  }

  TLocalStorage._internal();

  final _storage = GetStorage();

  // Generic method to save data
   Future<void> saveData<T>(String key, T value) async{
     await _storage.write(key, value);
   }

  // Generic method to read data
  T? readData<T>(String key){
     return _storage.read<T>(key);
  }

  // Generic method to remove data
  Future<void> removeData<T>(String key) async{
    await _storage.remove(key);
  }

  // Clear All Data in Storage
  Future<void> clearAll() async{
    await _storage.erase();
  }
}
/// LIST OF Enums
///  They cannot be created inside a class

enum TextS


 width - Area width
   * @param height - Area height
   * @param out - Color buffer
   */
  getPixelBuffer(
    face: TextureCubeFace | null,
    x: number,
    y: number,
    width: number,
    height: number,
    out: ArrayBufferView
  ): void;
}
import * as Mustache from "mustache";
import * as path from "path";
import { readFileSync } from "fs";
import {
  transformToCodeWithMustache,
  Templates,
  DEFAULT_TEMPLATE_PATH
} from "./transformToCodeWithMustache";
import { ViewData } from "../getViewForSwagger2";

describe("transformToCodeWithMustache", (): void => {
  let viewData: ViewData;
  let templates: Templates;

  beforeAll(() => {
    jest.spyOn(Mustache, "render");

    templates = {
      class: readFileSync(
        path.join(DEFAULT_TEMPLATE_PATH, "class.mustache"),
        "utf-8"
      ),
      map: readFileSync(
        path.join(DEFAULT_TEMPLATE_PATH, "map.mustache"),
        "utf-8"
      ),
      method: readFileSync(
        path.join(DEFAULT_TEMPLATE_PATH, "method.mustache"),
        "utf-8"
      ),
      type: readFileSync(
        path.join(DEFAULT_TEMPLATE_PATH, "type.mustache"),
        "utf-8"
      )
    };
  });

  beforeEach(() => {
    viewData = {
      isES6: false,
      description: "",
      isSecure: false,
      isSecureToken: false,
      isSecureApiKey: false,
      isSecureBasic: false,
      moduleName: "",
      className: "",
      imports: [],
      domain: "",
      methods: [],
      definitions: []
    };

    (Mustache.render as jest.Mock).mockReset();
  });

  it("calls Mustache.render with the default templates for the typescript target", () => {
    transformToCodeWithMustache(viewData, {});

    expect(Mustache.render).toBeCalledWith(
      templates.class,
      viewData,
      templates
    );
  });

  it("calls Mustache.render with the partially specified class template when it is provided", () => {
    const expectedTemplates = {
      class: "This is my custom template",
      method: templates.method,
      type: templates.type
    };

    transformToCodeWithMustache(viewData, {
      class: "This is my custom template"
    });

    expect(Mustache.render).toBeCalledWith(
      expectedTemplates.class,
      viewData,
      expectedTemplates
    );
  });

  it("calls Mustache.render with the partially specified method template when it is provided", () => {
    const expectedTemplates = {
      class: templates.class,
      method: "function <methodName>() {}",
      type: templates.type
    };

    transformToCodeWithMustache(viewData, {
      method: "function <methodName>() {}"
    });

    expect(Mustache.render).toBeCalledWith(
      templates.class,
      viewData,
      expectedTemplates
    );
  });

  it("calls Mustache.render with the partially specified type template when it is provided", () => {
    const expectedTemplates = {
      class: templates.class,
      method: templates.method,
      type: "type <typeName>"
    };

    transformToCodeWithMustache(viewData, { type: "type <typeName>" });

    expect(Mustache.render).toBeCalledWith(
      templates.class,
      viewData,
      expectedTemplates
    );
  });

  it("uses the provided templates for the custom target", () => {
    con


lptr) {
				if (!findTask->isCompleted() && findTask->isArakydTask())
					return true;
			}
		}
	}

	return false;
}

bool BountyMissionObjectiveImplementation::playerHasMissionOfCorrectLevel(int action) {
	Locker locker(&syncMutex);

	ManagedReference<MissionObject* > mission = this->mission.get();
	if(mission == nullptr)
		return false;

	int levelNeeded = 2;
	if (action == BountyHunterDroid::FINDANDTRACKTARGET) {
		levelNeeded = 3;
	}

	return mission->getMissionLevel() >= levelNeeded;
}

Vector3 BountyMissionObjectiveImplementation::getTargetPosition() {
	Locker locker(&syncMutex);

	Vector3 empty;

	ManagedReference<MissionObject* > mission = this->mission.get();

	if(mission == nullptr)
		return empty;

	if (isPlayerTarget()) {
		uint64 targetId = mission->getTargetObjectId();

		ZoneServer* zoneServer = getPlayerOwner()->getZoneServer();
		if (zoneServer != nullptr) {
			ManagedReference<CreatureObject*> creature = zoneServer->getObject(targetId).castTo<CreatureObject*>();

			if (creature != nullptr) {
				Vector3 targetPos = creature->getWorldPosition();
				targetPos.setZ(0);
				return targetPos;
			}
		}
	} else {
		if (targetTask != nullptr) {
			return targetTask->getTargetPosition();
		}
	}

	return empty;
}

void BountyMissionObjectiveImplementation::cancelAllTasks() {
	Locker locker(&syncMutex);

	if (targetTask != nullptr && targetTask->isScheduled()) {
		targetTask->cancel();
		targetTask = nullptr;
	}

	/*for (int i = 0; i < droidTasks.size(); i++) {
		Reference<Task*> droidTask = droidTasks.get(i);

		if (droidTask != nullptr && droidTask->isScheduled()) {
			droidTask->cancel();
		}
	}*/

	droidTasks.removeAll();
}

void BountyMissionObjectiveImplementation::cancelCallArakydTask() {
	Locker locker(&syncMutex);

	for (int i = 0; i < droidTasks.size(); i++) {
		Reference<Task*> task = droidTasks.get(i);

		if (task != nullptr) {
			Reference<CallArakydTask*> callTask = task.castTo<CallArakydTask*>();

			if (callTask != nullptr && callTask->isScheduled()) {
				callTask->cancel();
			}
		}
	}
}

String BountyMissionObjectiveImplementation::getTargetZoneName() {
	Locker locker(&syncMutex);

	ManagedReference<MissionObject* > mission = this->mission.get();
	if(mission == nullptr)
		return "dungeon1";

	if (isPlayerTarget()) {
		uint64 targetId = mission->getTargetObjectId();

		ZoneServer* zoneServer = getPlayerOwner()->getZoneServer();
		if (zoneServer != nullptr) {
			ManagedReference<CreatureObject*> creature = zoneServer->getObject(targetId).castTo<CreatureObject*>();

			if (creature != nullptr && creature->getZone() != nullptr) {
				return creature->getZone()->getZoneName();
			}
		}
	} else {
		if (targetTask != nullptr) {
			return targetTask->getTargetZoneName();
		}
	}

	//No target task, return dungeon1 which is not able to find.
	return "dungeon1";
}

void BountyMissionObjectiveImplementation::removePlayerTargetObservers() {
	Locker locker(&syncMutex);

	ManagedReference<MissionObject* > mission = this->mission.get();
	ManagedReference<CreatureObject*> owner = getPlayerOwner();

	if(owner == nullptr || mission == nullptr)
		return;

	removeObserver(1, ObserverEventType::PLAYERKILLED,


PCB_ONFAULT, r8	/* Clear pcb_onfault */
Lfuwexit:
#ifdef DDB
	UNLINK_FRAME(0)
	ptabs/l	r18, tr0
#endif
	or	r5, r63, r2		/* Copy result */
	blink	tr0, r63

/******************************************************************************
 *
 * int suswintr(void *base, short c)
 * int fuswintr(void *base)
 *
 * Interrupt-safe versions of the above.
 */
ENTRY(fuswintr)
ALTENTRY(suswintr)
	ptabs/l	r18, tr0
	movi	EFAULT, r2
	blink	tr0, r63

/******************************************************************************
 *
 * void pmap_asm_zero_page(vaddr_t kva)
 *
 * Fast, cache-friendly zero page function.
 */
ENTRY(pmap_asm_zero_page)
	ptabs/u	r18, tr0
	pta/l	1f, tr1
#ifndef _LP64
	add.l	r2, r63, r2		/* Ensure kva is sign-extended */
#endif
	movi	NBPG-128, r0
	add	r2, r0, r0		/* End of page (minus 4 cache-lines) */
	blink	tr1, r63

	/* Cache-align the loop */
	.balign	32
1:	st.q	r2, 0, r63
	st.q	r2, 8, r63
	st.q	r2, 16, r63
	st.q	r2, 24, r63
	alloco	r2, 128

	st.q	r2, 32, r63
	st.q	r2, 40, r63
	st.q	r2, 48, r63
	st.q	r2, 56, r63
	alloco	r2, 160

	st.q	r2, 64, r63
	st.q	r2, 72, r63
	st.q	r2, 80, r63
	st.q	r2, 88, r63
	alloco	r2, 192

	st.q	r2, 96, r63
	st.q	r2, 104, r63
	st.q	r2, 112, r63
	st.q	r2, 120, r63
	alloco	r2, 224

	addi	r2, 128, r2		/* Next block */
	bne/l	r2, r0, tr1		/* Back for the next one, until done */

	/* Finish the remaining block */
	st.q	r2, 0, r63
	st.q	r2, 8, r63
	st.q	r2, 16, r63
	st.q	r2, 24, r63
	st.q	r2, 32, r63
	st.q	r2, 40, r63
	st.q	r2, 48, r63
	st.q	r2, 56, r63
	st.q	r2, 64, r63
	st.q	r2, 72, r63
	st.q	r2, 80, r63
	st.q	r2, 88, r63
	st.q	r2, 96, r63
	st.q	r2, 104, r63
	st.q	r2, 112, r63
	st.q	r2, 120, r63
	blink	tr0, r63

/******************************************************************************
 *
 * void pmap_asm_copy_page(vaddr_t dst, vaddr_t src)
 *
 * Fast, cache-friendly copy page function.
 */
EN


250Sbanswer8722Sb9(Object appName) {
    return 'Έχουμε δύο διαφορετικούς τύπους συναλλαγών στο $appName, τοπικές συναλλαγές και διαδικτυακές συναλλαγές. Οι διαδικτυακές συναλλαγές πραγματοποιούνται αποκλειστικά μέσω της πλατφόρμας συναλλαγών μας χωρίς να συναντήσετε ποτέ τον εμπορικό σας συνεργάτη. Η προστασία των ομολόγων διαιτησίας ενεργοποιείται αυτόματα και χρηματοδοτείται για διαδικτυακές συναλλαγές, πράγμα που σημαίνει ότι ως αγοραστής προστατεύεστε αυτόματα από το σύστημα προστασίας των ομολόγων διαιτησίας. Οι περισσότερες συναλλαγές στο $appName είναι διαδικτυακές συναλλαγές. Οι τοπικές συναλλαγές προορίζονται να πραγματοποιούνται πρόσωπο με πρόσωπο και η προστασία των ομολόγων διαιτησίας δεν ενεργοποιείται αυτόματα. Εξαιτίας αυτού, δεν είναι ασφαλές να πληρώσετε τον πωλητή χρησιμοποιώντας μια διαδικτυακή μέθοδο πληρωμής σε ένα τοπικό εμπόριο. Οι διαδικτυακοί τρόποι πληρωμής είναι, για παράδειγμα, τραπεζικές μεταφορές. PayPal? Κωδικοί δωροκάρτας κλπ.';
  }

  @override
  String faq250Sbmorph8722Sbdeposit250Sbcontent(Object appName) {
    return 'Εάν επιθυμείτε να καταθέσετε νομίσματα στο πορτοφόλι $appName από ένα πορτοφόλι διαφορετικού κρυπτονομίσματος, πρέπει να επιλέξετε το πλαίσιο \"Θέλω να καταθέσω άλλο νόμισμα\" στην καρτέλα Receive της σελίδας του πορτοφολιού. Στην ενότητα που εμφανίζεται επιλέξτε το επιθυμητό νόμισμα κατάθεσης, το ποσό κατάθεσης (προσέξτε τα όρια που εμφανίζονται) και εισάγετε την αντίστοιχη διεύθυνση επιστροφής χρημάτων που θα χρησιμοποιηθεί αν κάτι πάει στραβά με τη συναλλαγή. Αφού το κάνετε αυτό, κάντε κλικ στο κουμπί \'Εμφάνιση της διεύθυνσης κατάθεσης!\', το οποίο θα ανοίξει ένα παράθυρο όπου θα δείτε τη διεύθυνση κατάθεσης. Στείλτε τα νομίσματα από το πορτοφόλι σας στην παρεχόμενη διεύθυνση κατάθεσης ChangeNow. Σε αυτό το σημείο, το ChangeNow θα μετατρέψει τα νομίσματά σας και θα τα μεταφέρει στο πορτοφόλι σας $appName.';
  }

  @override
  String faq250Sbmorph8722Sbdeposit250Sbcont


nil {
        return nil, err
    }

    plaintext := make([]byte, len(ciphertext))

    mode := cipher.NewCFBDecrypter(block, iv)
    mode.XORKeyStream(plaintext, ciphertext)

    return plaintext, nil
}
package pkcs1

import (
    "io"
    "errors"
    "crypto/cipher"
)

// OFB 模式加密
type CipherOFB struct {
    // 对称加密
    cipherFunc     func(key []byte) (cipher.Block, error)
    // 密钥生成
    derivedKeyFunc func(password []byte, salt []byte, keySize int) []byte
    // salt 长度
    saltSize       int
    // 与 key 长度相关
    keySize        int
    // 与 iv 长度相关
    blockSize      int
    // name
    name           string
}

// 块大小
func (this CipherOFB) BlockSize() int {
    return this.blockSize
}

// 名称
func (this CipherOFB) Name() string {
    return this.name
}

// 加密
func (this CipherOFB) Encrypt(rand io.Reader, password, plaintext []byte) ([]byte, []byte, error) {
    iv := make([]byte, this.blockSize)
    if _, err := io.ReadFull(rand, iv); err != nil {
        return nil, nil, errors.New("go-cryptobin/pkcs1: cannot generate IV: " + err.Error())
    }

    salt := iv[:this.saltSize]
    key := this.derivedKeyFunc(password, salt, this.keySize)

    block, err := this.cipherFunc(key)
    if err != nil {
        return nil, nil, errors.New("go-cryptobin/pkcs1: failed to create cipher: " + err.Error())
    }

    // 需要保存的加密数据
    encrypted := make([]byte, len(plaintext))

    enc := cipher.NewOFB(block, iv)
    enc.XORKeyStream(encrypted, plaintext)

    return encrypted, iv, nil
}

// 解密
func (this CipherOFB) Decrypt(password, iv, ciphertext []byte) ([]byte, error) {
    if len(iv) < this.saltSize {
        return nil, errors.New("go-cryptobin/pkcs1: iv length is too short")
    }

    salt := iv[:this.saltSize]
    key := this.derivedKeyFunc(password, salt, this.keySize)

    block, err := this.cipherFunc(key)
    if err != nil {
        return nil, err
    }

    plaintext := make([]byte, len(ciphertext))

    mode := cipher.NewOFB(block, iv)
    mode.XORKeyStream(plaintext, ciphertext)

    return plaintext, nil
}
package ecdh

import (
    "io"
    "errors"

    "github.com/deatil/go-cryptobin/pubkey/x448"
)

var (
    x448PublicKeySize    = 56
    x448PrivateKeySize   = 56
    x448SharedSecretSize = 56
)

// Multiple invocations of this function will return the same value, so it can
// be used for equality checks and switch statements.
func X448() Curve {
    return defaultX448
}

var defaultX448 = &x448Curve{}

type x448Curve struct{}

func (c *x448Curve) String() string {
    return "X448"
}

func (c *x448Curve) GenerateKey(rand io.Reader) (*PrivateKey, error) {
    _, key, err := x448.GenerateKey(rand)
    if err != nil {
        return nil, err
    }

    return c.NewPrivateKey(key.Seed())
}

func (c *x448Curve) NewPrivateKey(key []byte) (*Private


end

------------------------------------------------
function conditionTypePropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray)
	r2.requestSetNode(instance.InstanceId, "Type", "")
	r2.requestSetNode(instance.InstanceId, "Value", r2.RefId(""))
end
------------------------------------------------
function conditionTypePropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArr


--================================================================
--
-- 配置
--
--================================================================

-- 怪物
monsters = {
	{ config_id = 91001, monster_id = 25050201, pos = { x = -121.3, y = 0.8, z = -136.9 }, rot = { x = 0.0, y = 53.9, z = 0.0 }, level = 1, affix = { 1024 }, isElite = true, pose_id = 0 },
	{ config_id = 91002, monster_id = 25050101, pos = { x = -112.8, y = 0.8, z = -133.9 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, disableWander = true, affix = { 1007, 1008, 1019 }, isElite = true, pose_id = 0 },
	{ config_id = 91003, monster_id = 25050101, pos = { x = -117.5, y = 0.8, z = -138.4 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, disableWander = true, affix = { 1007, 1008, 1019 }, isElite = true, pose_id = 0 },
	{ config_id = 91004, monster_id = 25050101, pos = { x = -125.5, y = 0.8, z = -133.3 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, disableWander = true, affix = { 1007, 1008, 1019 }, isElite = true, pose_id = 0 },
	{ config_id = 91005, monster_id = 25050101, pos = { x = -117.9, y = 0.8, z = -132.3 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 1, disableWander = true, affix = { 1007, 1008, 1019 }, isElite = true, pose_id = 0 },


class_frame_lib___d_s_p.html#abe84c66d723767ef803c58f9ada7a7de", null ],
    [ "getBlockEndTime", "class_frame_lib___d_s_p.html#a8cd169b635307807b29f1d02ea23635e", null ],
    [ "getBlockStartTime", "class_frame_lib___d_s_p.html#a9c34c56420ff9da196150e8a5307e812", null ],
    [ "getCurrentTime", "class_frame_lib___d_s_p.html#a5734f973e603be4a85764d5f77fa4004", null ],
    [ "getFixedInput", "class_frame_lib___d_s_p.html#aabcf3bae08ab571f455f08bd7cf5e625", null ],
    [ "getFrameTime", "class_frame_lib___d_s_p.html#a2eedff2474f665b5bf7d2f2fa7a1cdc4", null ],
    [ "getInput", "class_frame_lib___d_s_p.html#aea9dee37e1093a12f7764b12ab430a19", null ],
    [ "getInput", "class_frame_lib___d_s_p.html#ae2d4474b0545fcc2cbb5ffcfcf75fc94", null ],
    [ "getInputCurrentType", "class_frame_lib___d_s_p.html#aba80b7c3546f6e65ab0378628dd2be62", null ],
    [ "getInputFrameTime", "class_frame_lib___d_s_p.html#a705ddc874bc5643f81a0f71894f1ae0c", null ],
    [ "getInputTime", "class_frame_lib___d_s_p.html#afd7cae225f75c8cd4bd773bf188961b2", null ],
    [ "getInputValidTime", "class_frame_lib___d_s_p.html#a699dda68553ddebd5ca8c70326fb40a5", null ],
    [ "getOutput", "class_frame_lib___d_s_p.html#a5d72363b6d5ee02e0c52e499fd28205d", null ],
    [ "getOutput", "class_frame_lib___d_s_p.html#a18dc23246a8c9d67a0cc468e782fd5c3", null ],
    [ "getOutputCurrentType", "class_frame_lib___d_s_p.html#ad870d652a2ce82ca2dee8eba91ad8dd8", null ],
    [ "getParameters", "class_frame_lib___d_s_p.html#ab1b692f7fe4340b7837319ceed334f02", null ],
    [ "getValidTime", "class_frame_lib___d_s_p.html#afa420e10b7ea7a300bf106631167cac0", null ],
    [ "hzToSamples", "class_frame_lib___d_s_p.html#a057aba18ccdae856a2d3db37caab496c", null ],
    [ "hzToSamples", "class_frame_lib___d_s_p.html#a56400e47d4d4b9fb579734af888245c7", null ],
    [ "inputType", "class_frame_lib___d_s_p.html#abbe65d74de56ab71e7fba34380bd19dc", null ],
    [ "isTrigger", "class_frame_lib___d_s_p.html#a13e269a66e0b9fb40ead089530e49eaa", null ],
    [ "msToSamples", "class_frame_lib___d_s_p.html#a00480b59f602bac240106d31f89cd293", null ],
    [ "msToSamples", "class_frame_lib___d_s_p.html#a353058bf6287b8677324


(new byte[] {0x9}, false));
    assertEquals("1010101001010101",
        JBBPUtils.bin2str(new byte[] {0x55, (byte) 0xAA}, JBBPBitOrder.MSB0, false));
    assertEquals("0101010110101010", JBBPUtils.bin2str(new byte[] {0x55, (byte) 0xAA}));
  }

  @Test
  public void testStr2Bin_Default() {
    assertEquals(0, JBBPUtils.str2bin(null).length);

    assertArrayEquals(new byte[] {(byte) 0x80}, JBBPUtils.str2bin("10000000"));
    assertArrayEquals(new byte[] {(byte) 0x01}, JBBPUtils.str2bin("1"));
    assertArrayEquals(new byte[] {(byte) 0x80, 0x01}, JBBPUtils.str2bin("10000000X00x0Zz1"));
    assertArrayEquals(new byte[] {(byte) 0x80, 0x01, 0x07},
        JBBPUtils.str2bin("10000000000000010111"));
    assertArrayEquals(new byte[] {(byte) 0x80, 0x01, 0x07},
        JBBPUtils.str2bin("10000000_00000001_0111"));

    try {
      JBBPUtils.str2bin("10001021");
      fail("Must throw IAE");
    } catch (IllegalArgumentException ex) {

    }
  }

  @Test
  public void testStr2Bin_LSB0() {
    assertEquals(0, JBBPUtils.str2bin(null, JBBPBitOrder.LSB0).length);

    assertArrayEquals(new byte[] {(byte) 0x80}, JBBPUtils.str2bin("10000000", JBBPBitOrder.LSB0));
    assertArrayEquals(new byte[] {(byte) 0x01}, JBBPUtils.str2bin("1", JBBPBitOrder.LSB0));
    assertArrayEquals(new byte[] {(byte) 0x01}, JBBPUtils.str2bin("00000001", JBBPBitOrder.LSB0));
    assertArrayEquals(new byte[] {(byte) 0x80, (byte) 0x01},
        JBBPUtils.str2bin("10000000X00x0Zz1", JBBPBitOrder.LSB0));
    assertArrayEquals(new byte[] {(byte) 0x80, (byte) 0x01, (byte) 0x07},
        JBBPUtils.str2bin("10000000000000010111", JBBPBitOrder.LSB0));
    assertArrayEquals(new byte[] {(byte) 0x80, (byte) 0x01, (byte) 0x07},
        JBBPUtils.str2bin("10000000_00000001_0111", JBBPBitOrder.LSB0));

    try {
      JBBPUtils.str2bin("10001021", JBBPBitOrder.MSB0);
      fail("Must throw IAE");
    } catch (IllegalArgumentException ex) {

    }
  }

  @Test
  public void testStr2Bin_LSB0_1bitShift() {
    final byte[] array =
        JBBPUtils.str2bin("0 11111111 01010101 00011000 00000001", JBBPBitOrder.LSB0);

    assertArrayEquals(new byte[] {(byte) 0x7F, (byte) 0xAA, (byte) 0x8C, (byte) 0x0, (byte) 0x01},
        array);

  }

  @Test
  public void testStr2Bin_MSB() {
    assertEquals(0, JBBPUtils.str2bin(null, JBBPBitOrder.MSB0).length);

    assertArrayEquals(new byte[] {(byte) 0x01}, JBBPUtils.str2bin("1", JBBPBitOrder.MSB0));
    assertArrayEquals(new byte[] {(byte) 0x80}, JBBPUtils.str2bin("00000001", JBBPBitOrder.MSB0));
    assertArrayEquals(new byte[] {(byte) 0x01}, JBBPUtils.str2bin("10000000", JBBPBitOrder.MSB0));
    assertArrayEquals(new byte[] {(byte) 0xA9}, JBBPUtils.str2bin("10010101", JBBPBitOrder.MSB


: TransactionMetadataTextSerializationConfig(
            encoding: cbor.lengthEncoding));
  }
  factory TransactionMetadataText.fromJson(Map<String, dynamic> json) {
    return TransactionMetadataText(
        value: json[TransactionMetadataType.metadataText.name],
        serializationConfig:
            TransactionMetadataTextSerializationConfig.fromJson(
                json["serialization_config"] ?? {}));
  }
  TransactionMetadataText copyWith({String? value}) {
    return TransactionMetadataText(value: value ?? this.value);
  }

  /// Returns the type of the metadata.
  @override
  TransactionMetadataType get type => TransactionMetadataType.metadataText;

  /// Converts the metadata to JSON.
  @override
  Map<String, dynamic> toJson() {
    return {
      type.name: value,
      'serialization_config': serializationConfig.toJson()
    };
  }

  @override
  Object toJsonSchema(
      {MetadataSchemaConfig config = const MetadataSchemaConfig(
          jsonSchema: MetadataJsonSchema.noConversions)}) {
    if (config.jsonSchema == MetadataJsonSchema.detailedSchema) {
      return {'string': value};
    }
    return value;
  }

  /// Converts the metadata to CBOR.
  @override
  CborObject toCbor({bool sort = false}) {
    return CborStringValue(value, lengthEncoding: serializationConfig.encoding);
  }

  /// Compares this metadata text with another metadata text.
  @override
  int compareTo(TransactionMetadata other) {
    if (other is! TransactionMetadata<String>) {
      return super.compareTo(other);
    }
    return value.compareTo(other.value);
  }
}
import 'package:blockchain_utils/blockchain_utils.dart';
import 'package:on_chain/ada/src/models/credential/models/credentials.dart';
import 'package:on_chain/ada/src/models/credential/models/credential.dart';
import 'package:on_chain/ada/src/models/governance/models/governance_action_id.dart';
import 'package:on_chain/ada/src/models/governance/models/proposals/action.dart';
import 'package:on_chain/ada/src/models/governance/models/proposals/governance_action_type.dart';
import 'package:on_chain/ada/src/models/protocol/models/unit_interval.dart';
import 'package:on_chain/ada/src/serialization/cbor_serialization.dart';

class UpdateCommitteeAction extends GovernanceAction {
  final GovernanceActionId? govActionId;
  final Credentials membersToRemove;
  final Map<Credential, int> members;
  final UnitInterval quorumQhreshold;
  const UpdateCommitteeAction(
      {this.govActionId,
      required this.members,
      required this.membersToRemove,
      required this.quorumQhreshold})
      : super(type: GovernanceActionType.updateCommitteeAction);
  factory UpdateCommitteeAction.deserialize(CborListValue cbor) {
    return UpdateCommitteeAction(
        govActionId: cbor
            .elementAt<CborListValue?>(1)
            ?.convertTo<GovernanceActionId, CborListValue>(
                (e) => GovernanceActionId.deserialize(e)),
        membersToRemove: Credentials.deserialize(cbor.elementAt<CborObject>(2)),
        members: {
          for (final i in cbor
              .elementAt<CborMapValue>(3)
              .valueAsMap<CborListValue, CborIntValue>()
              .entries)
            Credential.deserialize(i.key): i.value.toInt()
        },
        quorumQhreshold:
            UnitInterval.deserialize(cbor.elementAt<CborTagValue>(4)));


izeRequest_ProcessingStrategy.valueOf,
        enumValues: BatchRecognizeRequest_ProcessingStrategy.values)
    ..hasRequiredFields = false;

  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
      'Will be removed in next major version')
  BatchRecognizeRequest clone() =>
      BatchRecognizeRequest()..mergeFromMessage(this);
  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
      'Will be removed in next major version')
  BatchRecognizeRequest copyWith(
          void Function(BatchRecognizeRequest) updates) =>
      super.copyWith((message) => updates(message as BatchRecognizeRequest))
          as BatchRecognizeRequest;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static BatchRecognizeRequest create() => BatchRecognizeRequest._();
  BatchRecognizeRequest createEmptyInstance() => create();
  static $pb.PbList<BatchRecognizeRequest> createRepeated() =>
      $pb.PbList<BatchRecognizeRequest>();
  @$core.pragma('dart2js:noInline')
  static BatchRecognizeRequest getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<BatchRecognizeRequest>(create);
  static BatchRecognizeRequest? _defaultInstance;

  /// Required. The name of the Recognizer to use during recognition. The
  /// expected format is
  /// `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
  /// {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
  @$pb.TagNumber(1)
  $core.String get recognizer => $_getSZ(0);
  @$pb.TagNumber(1)
  set recognizer($core.String v) {
    $_setString(0, v);
  }

  @$pb.TagNumber(1)
  $core.bool hasRecognizer() => $_has(0);
  @$pb.TagNumber(1)
  void clearRecognizer() => clearField(1);

  /// Audio files with file metadata for ASR.
  /// The maximum number of files allowed to be specified is 5.
  @$pb.TagNumber(3)
  $core.List<BatchRecognizeFileMetadata> get files => $_getList(1);

  /// Features and audio metadata to use for the Automatic Speech Recognition.
  /// This field in combination with the
  /// [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask]
  /// field can be used to override parts of the
  /// [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
  /// of the Recognizer resource.
  @$pb.TagNumber(4)
  RecognitionConfig get config => $_getN(2);
  @$pb.TagNumber(4)
  set config(RecognitionConfig v) {
    setField(4, v);
  }

  @$pb.TagNumber(4)
  $core.bool hasConfig() => $_has(2);
  @$pb.TagNumber(4)
  void clearConfig() => clearField(4);
  @$pb.TagNumber(4)
  RecognitionConfig ensureConfig() => $_ensure(2);

  /// The list of fields in
  /// [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override
  /// the values in the
  /// [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
  /// of the recognizer during this recognition request. If no mask is provided,
  /// all given fields in
  /// [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the
  /// values in the recognizer for this recognition request. If a mask is


 ByteStream::Read2Bytes(p);
        p += 2;

        reserved3_ = ByteStream::Read2Bytes(p);
        p += 2;

        for(size_t i = 0; i < sizeof(transform_matrix_)/sizeof(uint32_t); i++) {
            transform_matrix_[i] = ByteStream::Read4Bytes(p);
            p += 4;
        }

        width_ = ByteStream::Read4Bytes(p);
        mov.traks_info_[index].width_ = width_ >> 16;
        p += 4;

        height_ = ByteStream::Read4Bytes(p);
        mov.traks_info_[index].height_ = height_ >> 16;
        p += 4;

        assert(p == start + box_size_);
        return start + box_size_;
    }

    uint8_t* Serialize(size_t& len) {
        const size_t default_len = 1024;
        serialize_data_.resize(default_len);
        uint8_t* data = &serialize_data_[0];
        uint8_t* p = data;

        memset(data, 0, default_len);

        ByteStream::Write4Bytes(p, 0); //placeholder for size
        p += 4;
        ByteStream::Write4Bytes(p, MAKE_TAG(type_[0], type_[1], type_[2], type_[3]));
        p += 4;

        ByteStream::Write4Bytes(p, version_flag_);
        p += 4;

        uint8_t ver = (uint8_t)(version_flag_ >> 24);
        if (ver != 0) {
            ByteStream::Write8Bytes(p, creation_time_);
            p += 8;
            ByteStream::Write8Bytes(p, modification_time_);
            p += 8;
            ByteStream::Write4Bytes(p, track_id_);
            p += 4;
            ByteStream::Write4Bytes(p, 0);//reserved
            p += 4;
            ByteStream::Write8Bytes(p, duration_);
            p += 8;
        } else {
            ByteStream::Write4Bytes(p, (uint32_t)creation_time_);
            p += 4;
            ByteStream::Write4Bytes(p, (uint32_t)modification_time_);
            p += 4;
            ByteStream::Write4Bytes(p, track_id_);
            p += 4;
            ByteStream::Write4Bytes(p, 0);//reserved
            p += 4;
            ByteStream::Write4Bytes(p, (uint32_t)duration_);
            p += 4;
        }
        ByteStream::Write4Bytes(p, 0);//reserved
        p += 4;
        ByteStream::Write4Bytes(p, 0);//reserved
        p += 4;
        ByteStream::Write2Bytes(p, layer_);
        p += 2;
        ByteStream::Write2Bytes(p, alternate_group_);
        p += 2;
        ByteStream::Write2Bytes(p, volume_);
        p += 2;
        ByteStream::Write2Bytes(p, 0);//reserved
        p += 2;

        for(size_t i = 0; i < sizeof(transform_matrix_)/sizeof(uint32_t); i++) {
            ByteStream::Write4Bytes(p, transform_matrix_[i]);
            p += 4;
        }

        ByteStream::Write4Bytes(p, width_);
        p += 4;
        ByteStream::Write4Bytes(p, height_);
        p += 4;

        len = p - data;
        box_size_ = len;
        ByteStream::Write4Bytes(data, (uint32_t)len);
        return data;
    }

    std::string Dump() {
        std::stringstream ss;

        ss << "{";
        ss << "\"type\":\"" << type_ << "\",";
        ss << "\"size\":" << box_size_ << ",";
        ss << "\"version\":" << (version_flag_ >> 24) << ",";
        ss << "\"flag\":" << (version_flag


+1
 end
 if k == '[]' then
	 local _
	 _, _, ref = strfind(d,'(&)')
  d = gsub(d,'&','')
 elseif k=='&[]' then
  l.n = l.n+1
  l[l.n] = Declaration(d,'var')
  l[l.n].name = 'tolua_value'
 end
 local f = Declaration(d,'func')
 if k == '[]' and (l[1]==nil or isbasic(l[1].type)~='number') then
  error('operator[] can only


mespace hf3fs::net {
namespace {

constexpr uint32_t kInvalidatedFlag = 1u << 0u;     // Bit 0
constexpr uint32_t kReadAvailableFlag = 1u << 1u;   // Bit 1
constexpr uint32_t kReadNewWakedFlag = 1u << 2u;    // Bit 2
constexpr uint32_t kWriteAvailableFlag = 1u << 3u;  // Bit 3
constexpr uint32_t kWriteNewWakedFlag = 1u << 4u;   // Bit 4
constexpr uint32_t kWriteHasMsgFlag = 1u << 5u;     // Bit 5
constexpr uint32_t kWriteNewMsgFlag = 1u << 6u;     // Bit 6
constexpr uint32_t kLastReadFinished = 1u << 7u;    // Bit 7
constexpr uint32_t kLastWriteFinished = 1u << 8u;   // Bit 8

monitor::CountRecorder readCPUTime{"common_net_read_cpu_time"};
monitor::CountRecorder doWriteCPUTime{"common_net_do_write_cpu_time"};
monitor::CountRecorder writeAllCPUTime{"common_net_write_all_cpu_time"};
monitor::CountRecorder readBytes{"common_net_read_bytes"};
monitor::CountRecorder writeBytes{"common_net_write_bytes"};
monitor::DistributionRecorder batchReadSize{"common_net_batch_read_size"};
monitor::DistributionRecorder batchWriteSize{"common_net_batch_write_size"};

}  // namespace

Transport::Transport(std::unique_ptr<Socket> socket, IOWorker &io_worker, Address serverAddr)
    : socket_(std::move(socket)),
      ioWorker_(io_worker),
      connExecutor_(io_worker.connExecutorWeak()),
      serverAddr_(serverAddr) {}

Transport::~Transport() {
  if (auto eventLoop = eventLoop_.lock()) {
    eventLoop->remove(this);
  }
  if (isRDMA()) {
    IBManager::close(IBSocket::Ptr(dynamic_cast<IBSocket *>(socket_.release())));
    auto exec = connExecutor_.lock();
  } else {
    dynamic_cast<TcpSocket *>(socket_.get())->close();
  }
}

TransportPtr Transport::create(std::unique_ptr<Socket> socket, IOWorker &io_worker, Address::Type addrType) {
  return enable_shared_from_this::create(std::move(socket), io_worker, Address{0, 0, addrType});
}

std::shared_ptr<Transport> Transport::create(Address addr, IOWorker &io_worker) {
  if (addr.isTCP()) {
    return enable_shared_from_this::create(std::make_unique<TcpSocket>(), io_worker, addr);
  } else if (addr.isRDMA()) {
    return enable_shared_from_this::create(std::make_unique<IBSocket>(io_worker.config_.ibsocket()), io_worker, addr);
  }
  return nullptr;
}

CoTryTask<void> Transport::connect(Address addr, Duration timeout) {
  if (addr.isRDMA()) {
    auto tcpAddr = Address(addr.ip, addr.port, Address::TCP);
    static const folly::atomic_shared_ptr<const CoreRequestOptions> connectOptions{
        std::make_shared<CoreRequestOptions>()};
    auto tcpCtx = serde::ClientContext(ioWorker_, tcpAddr, connectOptions);
    auto ibSocket = dynamic_cast<IBSocket *>(socket_.get());
    co_return co_await ibSocket->connect(tcpCtx, timeout);
  } else if (addr.isTCP()) {
    auto tcpSocket = dynamic_cast<TcpSocket *>(socket_.get());
    co_return co_await tcpSocket->connect(addr, timeout);
  } else {
    co_return makeError(StatusCode::kNotImplemented);
  }
}

std::optional<WriteList> Transport::send(WriteList list) {
  list.setTransport(shared_from_this());
  if (list.empty()) {
    return std::nullopt;
  }


                    "blurCoordinates[i] = vTextureCoord.xy + blurStep;\n" +
                "}\n" +
            "}";

    private static final String FRAGMENT_SHADER =
            "#extension GL_OES_EGL_image_external : require\n" +

            "precision mediump float;\n" +

            "const lowp int GAUSSIAN_SAMPLES = 9;\n" +

            "varying highp vec2 blurCoordinates[GAUSSIAN_SAMPLES];\n" +
            "uniform samplerExternalOES sTexture;\n" +

            "void main()\n" +
            "{\n" +
                "lowp vec4 sum = vec4(0.0);\n" +

                "sum += texture2D(sTexture, blurCoordinates[0]) * 0.05;\n" +
                "sum += texture2D(sTexture, blurCoordinates[1]) * 0.09;\n" +
                "sum += texture2D(sTexture, blurCoordinates[2]) * 0.12;\n" +
                "sum += texture2D(sTexture, blurCoordinates[3]) * 0.15;\n" +
                "sum += texture2D(sTexture, blurCoordinates[4]) * 0.18;\n" +
                "sum += texture2D(sTexture, blurCoordinates[5]) * 0.15;\n" +
                "sum += texture2D(sTexture, blurCoordinates[6]) * 0.12;\n" +
                "sum += texture2D(sTexture, blurCoordinates[7]) * 0.09;\n" +
                "sum += texture2D(sTexture, blurCoordinates[8]) * 0.05;\n" +

                "gl_FragColor = sum;\n" +
            "}";

    /**
     * Create frame render filter
     * @param texelWidthOffset blur texel width offset
     * @param texelHeightOffset blur texel height offset
     * @param blurSize blur size
     */
    public GaussianBlurFilter(float texelWidthOffset, float texelHeightOffset, float blurSize) {
        this(texelWidthOffset, texelHeightOffset, blurSize, null);
    }

    /**
     * Create frame render filter with source video frame, then scale, then position and then rotate the bitmap around its center as specified.
     * @param texelWidthOffset blur texel width offset
     * @param texelHeightOffset blur texel height offset
     * @param blurSize blur size
     * @param transform {@link Transform} that defines positioning of source video frame within target video frame
     */
    public GaussianBlurFilter(float texelWidthOffset, float texelHeightOffset, float blurSize, @Nullable Transform transform) {
        super(VERTEX_SHADER,
                FRAGMENT_SHADER,
                new ShaderParameter[] {
                        new Uniform1f("texelWidthOffset", texelWidthOffset),
                        new Uniform1f("texelHeightOffset", texelHeightOffset),
                        new Uniform1f("blurSize", blurSize)
                },
                transform);
    }

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

import androidx.annotation.Nullable;

import com.link


class Solution(object):
    def numSubarrayProductLessThanK(self, nums, k):
        """
        :type nums: List[int]
        :type k: int
        :rtype: int
        """
        if k<=1:
            return 0
        count = 0
        product = 1
        start= 0
        end=0
        n=len(nums)
        while(end<n):
            product*=nums[end]
            while(product>=k):
                product/=nums[start]
                start+=1
            count=count+(end-start)+1
            end+=1
        return count

# class Solution(object):
#     def numSubarrayProductLessThanK(self, nums, k):
#         """
#         :type nums: List[int]
#         :type k: int
#         :rtype: int
#         """
#         if not nums:
#             return 0
#         count=0
#         for val in nums:
#             if val<k:
#                 count+=1
#         n=len(nums)
#         for i in range(n):
#             summ=nums[i]
#             m=1
#             for j in range(i+m,n):
#                 if summ*nums[j]<k:
#                     print(summ,nums[j])
#                     count+=1
#                     summ=summ*nums[j]
#                     m=m+1
#                 else:
#                     break
#         return count


n headers */
.md-nav__item--section > .md-nav__link {
  font-size: 0.8rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Change color of tip admonitions to TerraTorch color */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: rgb(238, 75, 43);
}
.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(238, 75, 43, 0.1);
}
.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: rgb(238, 75, 43);
}

/* Change color of tip admonitions to TerraTorch color */
.md-typeset .admonition.faq,
.md-typeset details.faq {
  border-color: rgb(200, 200, 200);
}
.md-typeset .faq > .admonition-title,
.md-typeset .faq > summary {
  background-color: rgba(200, 200, 200, 0.1);
}
.md-typeset .faq > .admonition-title::before,
.md-typeset .faq > summary::before {
  background-color: rgb(200, 200, 200);
  -webkit-mask-image: var(--md-admonition-icon--question);
          mask-image: var(--md-admonition-icon--question);
}@use "@carbon/styles/scss/reset";
@use "@carbon/styles/scss/theme" as *;
@use "@carbon/styles/scss/themes";
@use "@carbon/styles/scss/spacing" as *; /* near top of file */
@use "@carbon/styles/scss/type" as *; /* place at top of file */
@use "@carbon/styles/scss/grid";
@use "@carbon/styles/scss/breakpoint" as *;

:root {
  @include theme(themes.$g10);

  @media (prefers-color-scheme: dark) {
    @include theme(themes.$g100);
  }
}

.g10 {
  @include theme(themes.$g10);
}

.g100 {
  @include theme(themes.$g100);
}

:root .compliment {
  @include theme(themes.$g100);

  @media (prefers-color-scheme: dark) {
    @include theme(themes.$g10);
  }
}

.g10 .compliment {
  @include theme(themes.$g100);
}

.g100 .compliment {
  @include theme(themes.$g10);
}

.app {
  display: grid;
  grid-template-rows: $spacing-09 1fr;
  height: 100dvh;
  overflow: hidden;
}

.main {
  height: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.action-icon {
  width: 1.25rem;
  height: 1.25rem;
  background-color: $text-primary;
}

.notification .action-icon {
  mask: url("/notification.svg") no-repeat center


using Util.Ui.Angular.Configs;
using Util.Ui.NgZorro.Components.Tables.Configs;

namespace Util.Ui.NgZorro.Components.Tables.Helpers;

/// <summary>
/// 表格服务
/// </summary>
public class TableService {
    /// <summary>
    /// 配置
    /// </summary>
    private readonly Config _config;
    /// <summary>
    /// 表格共享配置
    /// </summary>
    private TableShareConfig _shareConfig;

    /// <summary>
    /// 初始化表格服务
    /// </summary>
    /// <param name="config">配置</param>
    public TableService( Config config ) {
        _config = config;
    }

    /// <summary>
    /// 获取共享配置
    /// </summary>
    public TableShareConfig GetShareConfig() {
        return _shareConfig;
    }

    /// <summary>
    /// 初始化树形表格标识
    /// </summary>
    public void InitTreeTable() {
        _shareConfig.IsTreeTable = true;
    }

    /// <summary>
    /// 初始化
    /// </summary>
    public void Init() {
        CreateShareConfig();
        SetTableSettings();
        SetScroll();
        SetIsShowCheckbox();
        SetIsShowRadio();
        SetIsCheckLeafOnly();
        SetIsShowLineNumber();
        SetOnClickRow();
        EnableExtend();
    }

    /// <summary>
    /// 创建共享配置
    /// </summary>
    private void CreateShareConfig() {
        _shareConfig = new TableShareConfig( GetTableId() );
        _config.SetValueToItems( _shareConfig );
    }

    /// <summary>
    /// 获取表格标识
    /// </summary>
    private string GetTableId() {
        return _config.GetValue( UiConst.Id );
    }

    /// <summary>
    /// 设置表格设置参数
    /// </summary>
    private void SetTableSettings() {
        _shareConfig.Key = GetKey();
        if ( _config.GetValue<bool>( UiConst.EnableTableSettings ) ) {
            _shareConfig.IsEnableCustomColumn = true;
            _shareConfig.IsEnableResizable = true;
            _shareConfig.IsEnableFixedColumn = true;
            return;
        }
        _shareConfig.IsEnableCustomColumn = _config.GetValue<bool>( UiConst.EnableCustomColumn );
        _shareConfig.IsEnableResizable = _config.GetValue<bool>( UiConst.EnableResizable );
        _shareConfig.IsEnableFixedColumn = _config.GetValue<bool>( UiConst.EnableFixedColumn );
    }

    /// <summary>
    /// 获取表格参数存储标识
    /// </summary>
    private string GetKey() {
        var result = _config.GetValue( UiConst.Key );
        return result.IsEmpty() ? _config.GetValue( UiConst.Id ) : result;
    }

    /// <summary>
    /// 设置表格滚动参数
    /// </summary>
    private void SetScroll() {
        _shareConfig.ScrollWidth = _config.GetValue( UiConst.ScrollWidth );
        _shareConfig.ScrollHeight = _config.GetValue( UiConst.ScrollHeight );
    }

    /// <summary>
    /// 设置是否显示复选框
    /// </summary>
    private void SetIsShowCheckbox() {
        _shareConfig.IsShowCheckbox = _config.GetValue<bool>( UiConst.ShowCheckbox );
        _shareConfig.IsCheckboxLeft = _config.GetValue( UiConst.CheckboxLeft );
    }

    /// <summary>
    /// 设置是否显示单选框
    /// </summary>
    private void SetIsShowRadio() {
        _shareConfig.IsShowRadio = _


Reprendre une partie sauvegardée là où vous l'avez laissée",
	CONNECTION_LOCAL_NETWORK_GAME = "Partie en réseau local",
	CONNECTION_LOCAL_NETWORK_GAME_TOOLTIP = "Cette partie n'apparaîtra pas dans la liste des parties en ligne",
	CONNECTION_NEW_GAME_TOOLTIP = "Commencer une nouvelle campagne depuis le début",
	CONNECTION_NEW_OR_SAVED_GAME_TITLE = "Nouvelle partie ou partie sauvegardée",
	CONNECTION_NO_FULL_GAMES_TOOLTIP = "Cache toute les parties pleines",
	CONNECTION_NO_PASSWORDS_TOOLTIP = "Cache toutes les parties protégées par un mot de passe",
	CONNECTION_NOT_FULL_LABEL = "Non remplie",
	CONNECTION_NOT_PASSWORD_PROTECTED_LABEL = "Non protégée par un mot de passe",
	CONNECTION_PASSWORD_PROTECTED = "Protégée par un mot de passe",
	CONNECTION_PASSWORD_PROTECTED_TOOLTIP = "Un mot de passe est nécessaire pour entrer",
	CONNECTION_REFRESH_TOOLTIP = "Actualise la liste des parties disponibles",
	CONNECTION_SELECT_GAME_TYPE_LABEL = "Sélectionnez le type de partie à créer",
	CONNECTION_WAITING_FOR_SERVER = "EN ATTENTE D'INFORMATIONS DU SERVEUR",
	CONSTITUTION_LABEL = "Constitution",
	CONTAINER_TITLE = "Contenant",
	CONTINGENCY_BUTTON = "CONTINGENCE",
	CONTINGENCY_TITLE = "Contingence",
	CONTINUE_BUTTON = "CONTINUER",
	COST_LABEL = "Coût",
	CREATE_BUTTON = "CRÉER",
	CREATE_CHAR_BUTTON = "CRÉER UN PERSONNAGE",
	CREATEGAME_BUTTON = "CRÉER UNE PARTIE",
	CREATEGAME_TITLE = "Créer une partie",
	CREATE_PARTY_BUTTON = "CRÉER UN GROUPE",
	CREATE_PARTY_TITLE = "Créer un groupe",
	CREDITS_BUTTON = "CRÉDITS",
	CREDITS_MOVIE_BUTTON = "Crédits d'origine",
	CREDITS_TITLE = "Crédits",
	CURRENT_LABEL = "Actuel",
	CURRENT_PLAYERS_LABEL = "Joueurs actuels",
	CURRENT_SCRIPT_LABEL = "Script actuel",
	CUSTOM_BUTTON = "PERSONNALISÉ",
	CUSTOMIZE_BUTTON = "PERSONNALISER",
	CUSTOMIZE_TITLE = "Personnaliser le personnage",
	DAMAGE_LABEL = "Dégâts",
	DELETE_BUTTON = "SUPPRIMER",
	DESCRIPTION_LABEL = "Description",
	DEXTERITY_LABEL = "Dextérité",
	DIFFICULTY_DESCRIPTION = "Ce curseur contrôle le niveau de difficulté du jeu.\n  TRÈS DIFFICILE (tout à fait à droite) : tous les ennemis infligent deux fois plus de dégâts.\n  DIFFICILE (milieu droit) : les ennemis infligent 50 % de dégâts supplémentaires.\n  RÈGLES DE BASE (milieu) : stricte application des règles d'AD&D Deuxième Édition ; les jets de points de vie sont aléatoires, les personnages peuvent mourir définitivement, l'apprentissage des sorts a des chances d'échouer et les ennemis infligent l'intégralité des dégâts.\n  NORMAL (milieu gauche) : tous les jets de points de vie sont effectués au maximum, les personnages ne peuvent pas mourir définitivement, les sorts sont automatiquement appris et les ennemis infligent 3/4 des dégâts.\n  FACILE (tout à fait à gauche) : tous les jets de points de vie sont effectués au maximum, les personnages ne peuvent pas mourir définitivement et ga


num_features_);

  block_start_.resize(num_machines_);
  block_len_.resize(num_machines_);

  if (this->config_->use_quantized_grad) {
    block_start_int16_.resize(num_machines_);
    block_len_int16_.resize(num_machines_);
  }

  buffer_write_start_pos_.resize(this->num_features_);
  buffer_read_start_pos_.resize(this->num_features_);

  if (this->config_->use_quantized_grad) {
    buffer_write_start_pos_int16_.resize(this->num_features_);
    buffer_read_start_pos_int16_.resize(this->num_features_);
  }

  global_data_count_in_leaf_.resize(this->config_->num_leaves);
}

template <typename TREELEARNER_T>
void DataParallelTreeLearner<TREELEARNER_T>::ResetConfig(const Config* config) {
  TREELEARNER_T::ResetConfig(config);
  global_data_count_in_leaf_.resize(this->config_->num_leaves);
}

template <typename TREELEARNER_T>
void DataParallelTreeLearner<TREELEARNER_T>::PrepareBufferPos(
  const std::vector<std::vector<int>>& feature_distribution,
  std::vector<comm_size_t>* block_start,
  std::vector<comm_size_t>* block_len,
  std::vector<comm_size_t>* buffer_write_start_pos,
  std::vector<comm_size_t>* buffer_read_start_pos,
  comm_size_t* reduce_scatter_size,
  size_t hist_entry_size) {
  // get block start and block len for reduce scatter
  *reduce_scatter_size = 0;
  for (int i = 0; i < num_machines_; ++i) {
    (*block_len)[i] = 0;
    for (auto fid : feature_distribution[i]) {
      auto num_bin = this->train_data_->FeatureNumBin(fid);
      if (this->train_data_->FeatureBinMapper(fid)->GetMostFreqBin() == 0) {
        num_bin -= 1;
      }
      (*block_len)[i] += num_bin * hist_entry_size;
    }
    *reduce_scatter_size += (*block_len)[i];
  }

  (*block_start)[0] = 0;
  for (int i = 1; i < num_machines_; ++i) {
    (*block_start)[i] = (*block_start)[i - 1] + (*block_len)[i - 1];
  }

  // get buffer_write_start_pos
  int bin_size = 0;
  for (int i = 0; i < num_machines_; ++i) {
    for (auto fid : feature_distribution[i]) {
      (*buffer_write_start_pos)[fid] = bin_size;
      auto num_bin = this->train_data_->FeatureNumBin(fid);
      if (this->train_data_->FeatureBinMapper(fid)->GetMostFreqBin() == 0) {
        num_bin -= 1;
      }
      bin_size += num_bin * hist_entry_size;
    }
  }

  // get buffer_read_start_pos
  bin_size = 0;
  for (auto fid : feature_distribution[rank_]) {
    (*buffer_read_start_pos)[fid] = bin_size;
    auto num_bin = this->train_data_->FeatureNumBin(fid);
    if (this->train_data_->FeatureBinMapper(fid)->GetMostFreqBin() == 0) {
      num_bin -= 1;
    }
    bin_size += num_bin * hist_entry_size;
  }
}

template <typename TREELEARNER_T>
void DataParallelTreeLearner<TREELEARNER_T>::BeforeTrain() {
  TREELEARNER_T::BeforeTrain();
  // generate feature partition for current tree
  std::vector<std::vector<int>> feature_distribution(num_machines_, std::vector<in


(
          type.toElementTypedVector(),
          buffer,
          buffer.indirect(end, parentWidth),
          byteWidth,
        )
      else -> emptyVector()
    }
  }

  /**
   * Returns element as a [Blob]
   *
   * @return element as [Blob] or empty [Blob] if fail
   */
  public fun toBlob(): Blob {
    return when (type) {
      T_BLOB,
      T_STRING -> Blob(buffer, buffer.indirect(end, parentWidth), byteWidth)
      else -> emptyBlob()
    }
  }

  /**
   * Returns element as a [Map].
   *
   * @return element as [Map] or empty [Map] if fail
   */
  public fun toMap(): Map =
    when (type) {
      T_MAP -> Map(buffer, buffer.indirect(end, parentWidth), byteWidth)
      else -> emptyMap()
    }

  private inline fun <T> resolve(crossinline block: (pos: Int, width: ByteWidth) -> T): T {
    return if (type.isIndirectScalar()) {
      block(buffer.indirect(end, byteWidth), byteWidth)
    } else {
      block(end, parentWidth)
    }
  }

  override fun equals(other: Any?): Boolean {
    if (this === other) return true
    if (other == null || this::class != other::class) return false
    other as Reference
    if (
      buffer != other.buffer ||
        end != other.end ||
        parentWidth != other.parentWidth ||
        byteWidth != other.byteWidth ||
        type != other.type
    )
      return false
    return true
  }

  override fun hashCode(): Int {
    var result = buffer.hashCode()
    result = 31 * result + end
    result = 31 * result + parentWidth.value
    result = 31 * result + byteWidth.value
    result = 31 * result + type.hashCode()
    return result
  }
}

/**
 * Represents any element that has a size property to it, like: [Map], [Vector] and [TypedVector].
 */
public open class Sized
internal constructor(
  public val buffer: ReadBuffer,
  public val end: Int,
  public val byteWidth: ByteWidth,
) {
  public open val size: Int = buffer.readSize(end, byteWidth)
}

/** Represent an array of bytes in the buffer. */
public open class Blob internal constructor(buffer: ReadBuffer, end: Int, byteWidth: ByteWidth) :
  Sized(buffer, end, byteWidth) {
  /**
   * Return [Blob] as [ReadBuffer]
   *
   * @return blob as [ReadBuffer]
   */
  public fun data(): ReadBuffer = buffer.slice(end, size)

  /**
   * Copy [Blob] into a [ByteArray]
   *
   * @return A [ByteArray] containing the blob data.
   */
  public fun toByteArray(): ByteArray {
    val result = ByteArray(size)
    for (i in 0 until size) {
      result[i] = buffer[end + i]
    }
    return result
  }

  /**
   * Return individual byte at a given position
   *
   * @param pos position of the byte to be read
   */
  public operator fun get(pos: Int): Byte {
    if (pos !in 0..size) error("$pos index out of bounds. Should be in range 0..$size")
    return buffer[end + pos]
  }

  override fun toString(): String = buffer.getString(end, size)
}

/** [Vector] represents an array of elements in the buffer. The element can be of any type. */
public open class Vector internal constructor(buffer: ReadBuffer, end: Int, byteWidth: ByteWidth) :
  Collection<Reference>, Sized(buffer, end, byteWidth) {

  /**
   * Returns a [Reference] from the [Vector] at position [index]. Returns a null reference
   *
   * @param index position in the vector.
   * @return [Reference] for a key or a null [Reference] if not found.
   */
  public open operato


s"; }
			`,
			"/file-1.css": `
				.foo { zoom: 1; }
				.bar { zoom: 2; }
			`,
			"/file-2.css": `
				.foo { zoom: 2; }
			`,
		},
		entryPaths: []string{"/entry.js"},
		options: config.Options{
			Mode:         config.ModeBundle,
			AbsOutputDir: "/out",
			ExtensionToLoader: map[string]config.Loader{
				".js":  config.LoaderJS,
				".css": config.LoaderLocalCSS,
			},
		},
		expectedCompileLog: `undefined/case1.css: WARNING: The value of "zoom" in the "foo" class is undefined
file-1.css: NOTE: The first definition of "zoom" is here:
undefined/case1.css: NOTE: The second definition of "zoom" is here:
` + note + `
undefined/case2.css: WARNING: The value of "zoom" in the "foo" class is undefined
file-1.css: NOTE: The first definition of "zoom" is here:
file-2.css: NOTE: The second definition of "zoom" is here:
` + note + `
undefined/case3.css: WARNING: The value of "zoom" in the "foo" class is undefined
undefined/case3.css: NOTE: The first definition of "zoom" is here:
file-2.css: NOTE: The second definition of "zoom" is here:
` + note + `
undefined/case4.css: WARNING: The value of "zoom" in the "foo" class is undefined
file-1.css: NOTE: The first definition of "zoom" is here:
undefined/case4.css: NOTE: The second definition of "zoom" is here:
` + note + `
undefined/case5.css: WARNING: The value of "zoom" in the "foo" class is undefined
file-1.css: NOTE: The first definition of "zoom" is here:
file-2.css: NOTE: The second definition of "zoom" is here:
` + note + `
`,
	})
}

func TestImportCSSFromJSWriteToStdout(t *testing.T) {
	css_suite.expectBundled(t, bundled{
		files: map[string]string{
			"/entry.js": `
				import "./entry.css"
			`,
			"/entry.css": `
				.entry { color: red }
			`,
		},
		entryPaths: []string{"/entry.js"},
		options: config.Options{
			Mode:          config.ModeBundle,
			WriteToStdout: true,
		},
		expectedScanLog: `entry.js: ERROR: Cannot import "entry.css" into a JavaScript file without an output path configured
`,
	})
}

func TestImportJSFromCSS(t *testing.T) {
	css_suite.expectBundled(t, bundled{
		files: map[string]string{
			"/entry.js": `
				export default 123
			`,
			"/entry.css": `
				@import "./entry.js";
			`,
		},
		entryPaths: []string{"/entry.css"},
		options: config.Options{
			Mode:         config.ModeBundle,
			AbsOutputDir: "/out",
		},
		expectedScanLog: `entry.css: ERROR: Cannot import "entry.js" into a CSS file
NOTE: An "@import" rule can only be used to import another CSS file and "entry.js" is not a CSS file (it was loaded with the "js" loader).
`,
	})
}

func TestImportJSONFromCSS(t *testing.T) {
	css_suite.expectBundled(t, bundled{
		files: map[string]string{
			"/entry.json": `
				{}
			`,
			"/entry.css": `
				@import "./entry.json";
			`,
		},
		entryPaths: []string{"/entry.css"},
		options: config.Options{
			Mode:         config.ModeBundle,
			AbsOutput


6C 003F966C  48 00 00 6C */	b lbl_803FC8D8
lbl_803FC870:
/* 803FC870 003F9670  7F 2C CB 78 */	mr r12, r25
/* 803FC874 003F9674  7E E4 BB 78 */	mr r4, r23
/* 803FC878 003F9678  80 BB 00 00 */	lwz r5, 0(r27)
/* 803FC87C 003F967C  7D 89 03 A6 */	mtctr r12
/* 803FC880 003F9680  4E 80 04 21 */	bctrl
/* 803FC884 003F9684  48 00 00 54 */	b lbl_803FC8D8
lbl_803FC888:
/* 803FC888 003F9688  7F 2C CB 78 */	mr r12, r25
/* 803FC88C 003F968C  7E E4 BB 78 */	mr r4, r23
/* 803FC890 003F9690  C0 3B 00 00 */	lfs f1, 0(r27)
/* 803FC894 003F9694  38 A0 00 0B */	li r5, 0xb
/* 803FC898 003F9698  7D 89 03 A6 */	mtctr r12
/* 803FC89C 003F969C  4E 80 04 21 */	bctrl
/* 803FC8A0 003F96A0  48 00 00 38 */	b lbl_803FC8D8
lbl_803FC8A4:
/* 803FC8A4 003F96A4  7F 2C CB 78 */	mr r12, r25
/* 803FC8A8 003F96A8  7E E4 BB 78 */	mr r4, r23
/* 803FC8AC 003F96AC  80 DB 00 00 */	lwz r6, 0(r27)
/* 803FC8B0 003F96B0  38 A0 00 0B */	li r5, 0xb
/* 803FC8B4 003F96B4  7D 89 03 A6 */	mtctr r12
/* 803FC8B8 003F96B8  4E 80 04 21 */	bctrl
/* 803FC8BC 003F96BC  48 00 00 1C */	b lbl_803FC8D8
lbl_803FC8C0:
/* 803FC8C0 003F96C0  7F 2C CB 78 */	mr r12, r25
/* 803FC8C4 003F96C4  7E E4 BB 78 */	mr r4, r23
/* 803FC8C8 003F96C8  80 DB 00 00 */	lwz r6, 0(r27)
/* 803FC8CC 003F96CC  38 A0 00 0B */	li r5, 0xb
/* 803FC8D0 003F96D0  7D 89 03 A6 */	mtctr r12
/* 803FC8D4 003F96D4  4E 80 04 21 */	bctrl
lbl_803FC8D8:
/* 803FC8D8 003F96D8  82 F7 00 08 */	lwz r23, 8(r23)
lbl_803FC8DC:
/* 803FC8DC 003F96DC  28 17 00 00 */	cmplwi r23, 0
/* 803FC8E0 003F96E0  40 82 FE B4 */	bne lbl_803FC794
lbl_803FC8E4:
/* 803FC8E4 003F96E4  82 F8 00 0C */	lwz r23, 0xc(r24)
/* 803FC8E8 003F96E8  48 00 01 4C */	b lbl_803FCA34
lbl_803FC8EC:
/* 803FC8EC 003F96EC  2C 1C 00 00 */	cmpwi r28, 0
/* 803FC8F0 003F96F0  41 82 01 40 */	beq l


Types{{"val", types.INet}},
			ReturnType: tree.FixedReturnType(types.String),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				dIPAddr := tree.MustBeDIPAddr(args[0])
				s := dIPAddr.IPAddr.String()
				// Ensure the string has a "/mask" suffix.
				if strings.IndexByte(s, '/') == -1 {
					s += "/" + strconv.Itoa(int(dIPAddr.Mask))
				}
				return tree.NewDString(s), nil
			},
			Info: "Converts the IP address and prefix length to text.",
		},
	),

	"inet_same_family": makeBuiltin(defProps(),
		tree.Overload{
			Types: tree.ArgTypes{
				{"val", types.INet},
				{"val", types.INet},
			},
			ReturnType: tree.FixedReturnType(types.Bool),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				first := tree.MustBeDIPAddr(args[0])
				other := tree.MustBeDIPAddr(args[1])
				return tree.MakeDBool(tree.DBool(first.Family == other.Family)), nil
			},
			Info: "Checks if two IP addresses are of the same IP family.",
		},
	),

	"inet_contained_by_or_equals": makeBuiltin(defProps(),
		tree.Overload{
			Types: tree.ArgTypes{
				{"val", types.INet},
				{"container", types.INet},
			},
			ReturnType: tree.FixedReturnType(types.Bool),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				ipAddr := tree.MustBeDIPAddr(args[0]).IPAddr
				other := tree.MustBeDIPAddr(args[1]).IPAddr
				return tree.MakeDBool(tree.DBool(ipAddr.ContainedByOrEquals(&other))), nil
			},
			Info: "Test for subnet inclusion or equality, using only the network parts of the addresses. " +
				"The host part of the addresses is ignored.",
		},
	),

	"inet_contains_or_equals": makeBuiltin(defProps(),
		tree.Overload{
			Types: tree.ArgTypes{
				{"container", types.INet},
				{"val", types.INet},
			},
			ReturnType: tree.FixedReturnType(types.Bool),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				ipAddr := tree.MustBeDIPAddr(args[0]).IPAddr
				other := tree.MustBeDIPAddr(args[1]).IPAddr
				return tree.MakeDBool(tree.DBool(ipAddr.ContainsOrEquals(&other))), nil
			},
			Info: "Test for subnet inclusion or equality, using only the network parts of the addresses. " +
				"The host part of the addresses is ignored.",
		},
	),

	"from_ip": makeBuiltin(defProps(),
		tree.Overload{
			Types:      tree.ArgTypes{{"val", types.Bytes}},
			ReturnType: tree.FixedReturnType(types.String),
			Fn: func(_ *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				ipstr := args[0].(*tree.DBytes)
				nboip := net.IP(*ipstr)
				sv := nboip.String()
				// if nboip has a length of 0, sv will be "<nil>"
				if sv == "<nil>" {
					return nil, errZeroIP
				}
				return tree.NewDString(sv), nil
			},
			Info: "Converts the byte string representation of an IP to its character string " +
				"representation.",
		},
	),

	"to_ip": makeBuiltin(defProps(),
		tree.Overload{
			Types:      tree.ArgTypes{{"val", types.String}}


#region Disclaimer/License Info

/* *********************************************** */

// sBlog.Net

// sBlog.Net is a minimalistic blog engine software.

// Homepage: http://sblogproject.net
// Github: http://github.com/karthik25/sBlog.Net

// This project is licensed under the BSD license.
// See the License.txt file for more information.

/* *********************************************** */

#endregion

using System;
using System.Net;
using System.Net.Mail;
using sBlog.Net.Domain.Interfaces;
using sBlog.Net.DependencyManagement;
using sBlog.Net.Domain.Utilities;

namespace sBlog.Net.Infrastructure
{
    public static class Emailer
    {
        public static bool SendMessage(string subjectMsg, string emailMessage)
        {
            return SendMessage(SiteFromAddress, SiteFromAddress, subjectMsg, emailMessage);
        }

        public static bool SendMessage(string toAddress, string subjectMsg, string emailMessage)
        {
            return SendMessage(SiteFromAddress, toAddress, subjectMsg, emailMessage);
        }

        public static bool SendMessage(string fromAddress, string toAddress, string subjectMsg, string emailMessage)
        {
            try
            {
                var message = new MailMessage {From = new MailAddress(fromAddress)};
                message.To.Add(new MailAddress(toAddress));
                message.Subject = subjectMsg;
                message.IsBodyHtml = true;
                message.Body = emailMessage;


0", 2, "FLOAT" },
	}
	ctx.tvb = bgfx.transient_buffer "fffdff"
	ctx.state = bgfx.make_state {
		WRITE_MASK = "RGBA",
		MSAA = false,
	}
	ctx.mesh_state = bgfx.make_state {
		WRITE_MASK = "RGBAZ",
		DEPTH_TEST = "LESS",
		CULL = "CCW",
		MSAA = true,
	}

	ctx.m_uffizi = util.textureLoad("textures/uffizi.dds", 0, "ucvcwc")	-- BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_W_CLAMP
	ctx.m_skyProgram     = util.programLoad("vs_hdr_skybox",  "fs_hdr_skybox")
	ctx.m_lumProgram     = util.programLoad("vs_hdr_lum",     "fs_hdr_lum")
	ctx.m_lumAvgProgram  = util.programLoad("vs_hdr_lumavg",  "fs_hdr_lumavg")
	ctx.m_blurProgram    = util.programLoad("vs_hdr_blur",    "fs_hdr_blur")
	ctx.m_brightProgram  = util.programLoad("vs_hdr_bright",  "fs_hdr_bright")
	ctx.m_meshProgram    = util.programLoad("vs_hdr_mesh",    "fs_hdr_mesh")
	ctx.m_tonemapProgram = util.programLoad("vs_hdr_tonemap", "fs_hdr_tonemap")

	ctx.s_texCube   = bgfx.create_uniform("s_texCube",  "s")
	ctx.s_texColor  = bgfx.create_uniform("s_texColor", "s")
	ctx.s_texLum    = bgfx.create_uniform("s_texLum",   "s")
	ctx.s_texBlur   = bgfx.create_uniform("s_texBlur",  "s")
	ctx.u_mtx       = bgfx.create_uniform("u_mtx",      "m4")
	ctx.u_tonemap   = bgfx.create_uniform("u_tonemap",  "v4")
	ctx.u_offset    = bgfx.create_uniform("u_offset",   "v4", 16)

	ctx.m_mesh = util.meshLoad "meshes/bunny.bin"
	ctx.m_fbh = nil -- frame buffer

	ctx.s_texelHalf = util.caps.rendererType == "DIRECT3D9" and 0.5 or 0

	ctx.m_lum = {
		bgfx.create


,
    "2/26/20": 0,
    "2/27/20": 0,
    "2/28/20": 0,
    "2/29/20": 0,
    "3/1/20": 0,
    "3/2/20": 0,
    "3/3/20": 0,
    "3/4/20": 0,
    "3/5/20": 0,
    "3/6/20": 0,
    "3/7/20": 0,
    "3/8/20": 0,
    "3/9/20": 0,
    "3/10/20": 0,
    "3/11/20": 0,
    "3/12/20": 0,
    "3/13/20": 0,
    "3/14/20": 0,
    "3/15/20": 0,
    "3/16/20": 0
  },
  {
    "Province/State": "Maricopa County, AZ",
    "Country/Region": "US",
    "Lat": 33.2918,
    "Long": -112.4291,
    "1/22/20": 0,
    "1/23/20": 0,
    "1/24/20": 0,
    "1/25/20": 0,
    "1/26/20": 0,
    "1/27/20": 0,
    "1/28/20": 0,
    "1/29/20": 0,
    "1/30/20": 0,
    "1/31/20": 0,
    "2/1/20": 0,
    "2/2/20": 0,
    "2/3/20": 0,
    "2/4/20": 0,
    "2/5/20": 0,
    "2/6/20": 0,
    "2/7/20": 0,
    "2/8/20": 0,
    "2/9/20": 0,
    "2/10/20": 0,
    "2/11/20": 0,
    "2/12/20": 0,
    "2/13/20": 0,
    "2/14/20": 0,
    "2/15/20": 0,
    "2/16/20": 0,
    "2/17/20": 0,
    "2/18/20": 0,
    "2/19/20": 0,
    "2/20/20": 0,
    "2/21/20": 0,
    "2/22/20": 0,
    "2/23/20": 0,
    "2/24/20": 0,
    "2/25/20": 1,
    "2/26/20": 1,
    "2/27/20": 1,
    "2/28/20": 1,
    "2/29/20": 1,
    "3/1/20": 1,
    "3/2/20": 1,
    "3/3/20": 1,
    "3/4/20": 1,
    "3/5/20": 1,
    "3/6/20": 1,
    "3/7/20": 1,
    "3/8/20": 1,
    "3/9/20": 1,
    "3/10/20": 0,
    "3/11/20": 0,
    "3/12/20": 0,
    "3/13/20": 0,
    "3/14/20": 0,
    "3/15/20": 0,
    "3/16/20": 0
  },
  {
    "Province/State": "Wake County, NC",
    "Country/Region": "US",
    "Lat": 35.8032,
    "Long": -78.5661,
    "1/22/20": 0,
    "1/23/20": 0,
    "1/24/20": 0,
    "1/25/20": 0,
    "1/26/20": 0,
    "1/27/


import matplotlib.pyplot as plt

def plt_settings(rcparams=None, backend='Agg'):
    """
    Decorator or context manager to temporarily set rc parameters and the backend for a plotting function.

    Example:
        decorator: @plt_settings({"font.size": 12})
        context manager: with plt_settings({"font.size": 12}):

    Args:
        rcparams (dict): Dictionary of rc parameters to set.
        backend (str, optional): Name of the backend to use. Defaults to 'Agg'.

    Returns:
        (Callable): Decorated function with temporarily set rc parameters and backend. This decorator can be
            applied to any function that needs to have specific matplotlib rc parameters and backend for its execution.
    """

    if rcparams is None:
        rcparams = {'font.size': 11}

    def decorator(func):
        """Decorator to apply temporary rc parameters and backend to a function."""

        def wrapper(*args, **kwargs):
            """Sets rc parameters and backend, calls the original function, and restores the settings."""
            original_backend = plt.get_backend()
            if backend != original_backend:
                plt.close('all')  # auto-close()ing of figures upon backend switching is deprecated since 3.8
                plt.switch_backend(backend)

            with plt.rc_context(rcparams):
                result = func(*args, **kwargs)

            if backend != original_backend:
                plt.close('all')
                plt.switch_backend(original_backend)
            return result

        return wrapper

    return decorator


80
IGluYXVndXJhbA== 80581
J109PQ== 80582
INec15TXqQ== 80583
5ram 80584
U01T 80585
IMOpc3Rl 80586
56uf 80587
INmF2LTYp9mH 80588
dXRlbmFudA== 80589
IEFtZXJpY2Fz 80590
INee15zXkA== 80591
YXNzaW4= 80592
IOao 80593
INC10LQ= 80594
INGB0LjQu9GM0L3Qvg== 80595
dWxhbmc= 80596
INC+0LHRitGP0YE= 80597
0LLQsNGC0Lg= 80598
IGthc3Y= 80599
0LzQsNGC0YDQuA== 80600
IGh1cmQ= 80601
0LDQsA== 80602
aHR1Yg== 80603
INin2YTYqNmE2KfYrw== 80604
INij2YrYp9mF 80605
YWF0aWc= 80606
IHJlY2ViZXU= 80607
IHRlbGV2aXNpw7Nu 80608
4Ki/4Ki5 80609
YWPEsQ== 80610
4oCdPw== 80611
4KWA4KS4 80612
INi62Yg= 80613
ZW5jaWFpcw== 80614
X21vbg== 80615
KScpCg== 80616
IOadsQ== 80617
IFJleA== 80618
IOCkquCkv+Ckm+CksuClhw== 80619
IHZlcnRyb3V3ZW4= 80620
a29ub20= 80621
IEZhaWw= 80622
w6Nlcw== 80623
IGxlZ2VuZHM= 80624
INmF2K3ZhA== 80625
XScpLg== 80626
IExvcmVu 80627
IFVG 80628
44CC5LuW 80629
Q2Fycw== 80630
dG9j 80631
IGJlaMO2dmVy 80632
5Ye65p2l 80633
4YOY4YOa4YOY4YOQ 80634
IGJvdXRvbg== 80635
z4HPhQ== 80636
TUlTU0lPTg== 80637
X09WRVI= 80638
IFF1YWxpZmllZA== 80639
INC20LXQvdGJ0LjQvdGL 80640
Yml0b3M= 80641
IGRleA== 80642
4LGN4LCs 80643
INGA0LDQt9C90L4= 80644
IOGDqeGDkOGDmw== 80645
IGluYWRlcXVhdGU= 80646
LyI7Cg== 80647
aW5hbmQ= 80648
6LSt5b2p5bmz5Y+w 80649
bGVldGNvZGU= 80650
U3o= 80651
ZW55YQ== 80652
cXVlYw== 80653
LkV4aXQ= 80654
LmNvc3Q= 80655
64WQ 80656
IGlnbm9yYW5jZQ== 80657
yZlsyZk= 80658
IGZsYW1lcw== 80659
KSkpKTsK 80660
IGTDqW1vbg== 80661
IGRvcnA= 80662
X0FDVElWSVRZ 80663
IHRvbmVs 80664
44Oa44O844K4 80665
INCy0LfQsNC40Lw= 80666
IHZvcmhhbmRlbg== 80667
IHJuZA== 80668
0q/QutGC 80669
IG1pbmlhdHVyZQ== 80670
YWjhu4th 80671


_o::get_presence(const uint32_t& id)
{
  switch (id) {
    case 0:
      return presence_e::mandatory;
    case 8:
      return presence_e::mandatory;
    case 66:
      return presence_e::optional;
    case 16:
      return presence_e::mandatory;
    default:
      asn1::log_error("The id=%d is not recognized", id);
  }
  return {};
}

// Value ::= OPEN TYPE
void erab_setup_request_ies_o::value_c::destroy_()
{
  switch (type_) {
    case types::ueaggregate_maximum_bitrate:
      c.destroy<ue_aggregate_maximum_bitrate_s>();
      break;
    case types::erab_to_be_setup_list_bearer_su_req:
      c.destroy<erab_to_be_setup_list_bearer_su_req_l>();
      break;
    default:
      break;
  }
}
void erab_setup_request_ies_o::value_c::set(types::options e)
{
  destroy_();
  type_ = e;
  switch (type_) {
    case types::mme_ue_s1ap_id:
      break;
    case types::enb_ue_s1ap_id:
      break;
    case types::ueaggregate_maximum_bitrate:
      c.init<ue_aggregate_maximum_bitrate_s>();
      break;
    case types::erab_to_be_setup_list_bearer_su_req:
      c.init<erab_to_be_setup_list_bearer_su_req_l>();
      break;
    case types::nulltype:
      break;
    default:
      log_invalid_choice_id(type_, "erab_setup_request_ies_o::value_c");
  }
}
erab_setup_request_ies_o::value_c::value_c(const erab_setup_request_ies_o::value_c& other)
{
  type_ = other.type();
  switch (type_) {
    case types::mme_ue_s1ap_id:
      c.init(other.c.get<uint64_t>());
      break;
    case types::enb_ue_s1ap_id:
      c.init(other.c.get<uint32_t>());
      break;
    case types::ueaggregate_maximum_bitrate:
      c.init(other.c.get<ue_aggregate_maximum_bitrate_s>());
      break;
    case types::erab_to_be_setup_list_bearer_su_req:
      c.init(other.c.get<erab_to_be_setup_list_bearer_su_req_l>());
      break;
    case types::nulltype:
      break;
    default:
      log_invalid_choice_id(type_, "erab_setup_request_ies_o::value_c");
  }
}
erab_setup_request_ies_o::value_c&
erab_setup_request_ies_o::value_c::operator=(const erab_setup_request_ies_o::value_c& other)
{
  if (this == &other) {
    return *this;
  }
  set(other.type());
  switch (type_) {
    case types::mme_ue_s1ap_id:
      c.set(other.c.get<uint64_t>());
      break;
    case types::enb_ue_s1ap_id:
      c.set(other.c.get<uint32_t>());
      break;
    case types::ueaggregate_maximum_bitrate:
      c.set(other.c.get<ue_aggregate_maximum_bitrate_s>());