  emitter: EventEmitter;
  sendResponse: null | SendResponseFn;

  constructor(fn: SendResponseFn) {
    this.queue = [];
    this.emitter = new EventEmitter();
    this.sendResponse = fn;
  }

  async send(statusCode: number, body: any, queueTimeout = 30 * 1000) {
    // Since there can be always only one task, create a queue
    const id = uuid4().toString();
    this.queue.push(id);
    if (this.queue[0] !== id) {
      console.debug(`Task queue length ${this.queue.length}, waiting...`);
      await new Promise<void>((resolve, reject) => {
        const on = () => {
          if (this.queue[0] === id) {
            this.emitter.removeListener("event", on);
            resolve();
          }
        };
        this.emitter.addListener("event", on);
        setTimeout(() => {
          this.emitter.removeListener("event", on);
          const i = this.queue.indexOf(id);
          if (i !== -1) this.queue.splice(i, 1);
          reject(new IgnoreCacheError("Waiting for task slot timed out"));
        }, queueTimeout);
      });
    }

    // Make sure we have a sendResponse handle
    const sendResponse = this.sendResponse;
    if (sendResponse === null) {
      // When `sendResponse` is not set, it means that either the queue function
      // has a bug, or the responder was used after it sent the final response
      console.warn("Send response is not set, client connection is broken");
    } else {
      this.sendResponse = null;

      // Send the response
      await sendResponse(statusCode, body);
    }

    // Return the queue id
    return id;
  }

  setSendResponse(id: string, fn: null | SendResponseFn) {
    if (this.queue[0] !== id) {
      throw new Error(`First queue element is not the current id`);
    }
    this.queue.shift();

    this.sendResponse = fn;
    this.emitter.emit("event");
  }
}

export const sendTask = async (
  testMode: boolean,
  responder: Responder,
  cache: CacheHandler,
  taskRequestData: TaskRequest["data"],
  timeout = 30 * 1000
): Promise<TaskResponse["data"]> => {
  if (testMode) {
    throw new Error(
      `Can not run client task "${taskRequestData.type}" in test mode`
    );
  }

  const task: TaskRequest = {
    kind: "taskRequest",
    id: uuid4().toString(),
    data: taskRequestData,
  };
  // getServerValidators().models.task.request(task);
  // console.debug(`Task ${task.id} is starting`);
  await cache.set(`task.wait-${task.id}`, "1", timeout * 2);
  const id = await responder.send(200, task);

  // Wait for the response
  let data: string;
  try {
    data = await cache.waitKey(`task.response-${task.id}`, timeout, true);
  } catch (error) {
    if (error.message === "Wait timed out") {
      console.warn(
        `Task ${task.id} timed out, destroying connection to client`
      );
      responder.setSendResponse(id, null);
      throw new SilentError("Task timed out");
    }
    throw error;
  }
  const { responseChannel, response } = JSON.parse(data);
  // getServerValidators().models.task.response(response);
  // console.debug(`Task ${task.id} resolved`);

  // Set new valid responder
  responder.setSendResponse(id, async (statusCode, body) => {
    const data = JSON.stringify({ statusCode, body });
    await cache.set(`task.response-${responseChannel}`, data, timeout);
  });

  // Check for errors
  if (response.type === "error")
    throw new Error(`Client error: ${response.error}`);

  // Return res


Q== 43237
Zm90bw== 43238
LnRvSnNvbg== 43239
5aSa 43240
IEtsZWlu 43241
IGxpYmM= 43242
IG1pbmVycw== 43243
5aI= 43244
LXByaW50 43245
IFByaWRl 43246
VG9kb3M= 43247
IG1hc2tlZA== 43248
IHNldERhdGE= 43249
IHRlbGVmb24= 43250
IHVuaGFwcHk= 43251
IFRhYmxlcw== 43252
Z2Vi 43253
KGRlYnVn 43254
X2FsbG93ZWQ= 43255
LWFjY2Vzcw== 43256
IGxvZ2lzdGljcw== 43257
IGdlbXM= 43258
IE1hdHVyZQ== 43259
IHJzcA== 43260
IEFsbGU= 43261
LmdldEJ5dGVz 43262
XHdlYg== 43263
eW5jaHJvbml6ZWQ= 43264
UGFyYWdyYXBo 43265
IHRocm90dGxl 43266
LnNxbGl0ZQ== 43267
Y29uc3VsdGE= 43268
IFNlYWg= 43269
Q2U= 43270
IHN1Ym1hcg== 43271
RVJF 43272
Vm91cw== 43273
IHJlZGRpdA== 43274
IHNxbGFsY2hlbXk= 43275
LW1pbGU= 43276
b2NpZGU= 43277
UG91cg== 43278
fX0iPgo= 43279
c3RlYWQ= 43280
IEAo 43281
IFtdKQ== 43282
IEFkcw== 43283
IG92ZXJsb2Fk 43284
cmlkZGVu 43285
IERlc2VydA== 43286
IFdyYXA= 43287
IFBvcnR1Z3Vlc2U= 43288
ZXR6 43289
CWZpcnN0 43290
IG1pbGVzdG9uZQ== 43291
5peg 43292
0YPRiQ== 43293
KHN1Y2Nlc3M= 43294
PFZlY3Rvcg== 43295
Y29vbA== 43296
IFtdKTsK 43297
ZXJ2YWxz 43298
IGludmVydA== 43299
Imlv 43300
Y3Vyc28= 43301
ZnJhZ21lbnQ= 43302
IGZlYXNpYmxl 43303
LnNldFBvc2l0aW9u 43304
IGVsbQ== 43305
IGltYWdpbg== 43306
QFNwcmluZw== 43307
IGJhdHM= 43308
cHXDqXM= 43309
Z2FsZW1lbnQ= 43310
bnNpYw== 43311
Z2llbmU= 43312
ZWxsYXRpb24= 43313
IEJhaWxleQ== 43314
U2hhcg== 43315
IFR1bA== 43316
IEhL 43317
IGZyZWV6aW5n 43318
Z2xt 43319
Y2VhbnM= 43320
LWN1dA== 43321
X2NpcmNsZQ== 43322
5ZGY 43323
bmVnYXRpdmU= 43324
IGluZGlhbg== 43325
c2FsdA== 43326
IHRpbmc= 43327
CW1vZA== 43328
IHNpbnQ= 43329
YWtpbg== 43330
dW1s 43331
IFRleHRJbnB1dA== 43332
IHBvcHBlZA== 43333
VE1Q 43334
IHBhcmtlZA== 43335
15nX 43336
IEZ1c2lvbg== 43337
IGhlYXRlcg== 43338


on the middle of the screen:

4. Refresh the browser and attempt again. If still unable to login, please contact Support: https://help.gohighlevel.com/support/solutions/articles/155000000969-live-24-7-highlevel-support-

How to remove Site Data on Safari:

1. For Safari, you must first enable Developer tools by accessing the browsers settings, by clicking Safari and then settings

2. Then you have to click on Advanced from the top menu and turn on the box for "show features for web developers"

3. Once the features for web developers are enabled, right-click on the page and inspect the page's elements.

4. From this window, you must first select Storage at the top of the menu, then find the site listed under the Local Storage, and then select the trash icon to clear the clear it out.

5. Refresh the browser and attempt again. If still unable to login, please contact Support: <a dir="ltr" h


();
    let inner_client = client.clone();

    let work = kv::set(&client, "/test/foo", "bar", None)
        .map_err(|errors| WatchError::Other(errors))
        .and_then(move |res| {
            let index = res.data.node.modified_index;

            kv::watch(
                &inner_client,
                "/test/foo",
                WatchOptions {
                    index: index,
                    ..Default::default()
                },
            )
            .and_then(move |res| {
                let node = res.data.node;

                assert_eq!(node.modified_index, index);
                assert_eq!(node.value.unwrap(), "bar");

                Ok(())
            })
        });

    client.run(work);
}

#[test]
fn watch_recursive() {
    let (tx, rx) = channel();

    let child = spawn(move || {
        let mut client = TestClient::no_destructor();
        let inner_client = client.clone();

        let work = rx.then(move |_| {
            let duration = Duration::from_millis(100);
            sleep(duration);
            kv::set(&inner_client, "/test/foo/bar", "baz", None)
        });

        client.run(work);
    });

    let mut client = TestClient::new();

    tx.send(()).unwrap();

    let work = kv::watch(
        &client,
        "/test",
        WatchOptions {
            recursive: true,
            timeout: Some(Duration::from_millis(1000)),
            ..Default::default()
        },
    )
    .and_then(|res| {
        let node = res.data.node;

        assert_eq!(node.key.unwrap(), "/test/foo/bar");
        assert_eq!(node.value.unwrap(), "baz");

        Ok(())
    });

    client.run(work);

    child.join().ok().unwrap();
}
*/
<filename>tests/test_dsig.rs<gh_stars>0
//!
//! Unit Tests for DSig Context
//!
use xmlsec::XmlSecKey;
use xmlsec::XmlSecKeyFormat;
use xmlsec::XmlSecSignatureContext;
use xmlsec::XmlSecDocumentExt;

use libxml::parser::Parser as XmlParser;

#[test]
fn test_dsig_context_creation()
{
    XmlSecSignatureContext::new().unwrap();
}

#[test]
fn test_dsig_key_setting()
{
    let mut ctx = XmlSecSignatureContext::new().unwrap();

    let key = XmlSecKey::from_file("tests/resources/key.pem", XmlSecKeyFormat::Pem, None)
        .expect("Failed to properly load key for test");

    let key_ptr = unsafe { key.as_ptr() };

    let oldkey = ctx.insert_key(key);

    assert!(oldkey.is_none(), "It should never have been set at this point");

    let newkey = ctx.release_key()
        .expect("Should have had a set key now being released");

    let newkey_ptr = unsafe { newkey.as_ptr() };

    assert_eq!(key_ptr, newkey_ptr, "Key should have remained to be exactly the same");
}

#[test]
fn test_signing_template()
{
    let ctx = common_setup_context_and_key();

    let doc = XmlParser::default()
        .parse_file("tests/resources/sign1-tmpl.xml")
        .expect("Failed to load signature template");

    if let Err(e) = ctx.sign_document(&doc) {
        panic!(e);
    }

    // compare signature results
    let reference = String::from_utf8(
        include_bytes!("./resources/sign1-res.xml").to_vec()
    ).unwrap();

    assert_eq!(doc.to_string(), reference);
}

#[test]
fn test_verify_template_signature()
{
    let ctx = common_setup_context_and_key();

    let doc = XmlParser::default()
        .


n pairs(dungeonList) do
		if ( select(LFG_RETURN_VALUES.groupID, GetLFGDungeonInfo(dungeonID)) == headerID ) then
			LFGDungeonList_SetDungeonEnabled(dungeonID, isEnabled);
		end
	end
	for _, dungeonID in pairs(hiddenByCollapseList) do
		if ( select(LFG_RETURN_VALUES.groupID, GetLFGDungeonInfo(dungeonID)) == headerID ) then
			LFGDungeonList_SetDungeonEnabled(dungeonID, isEnabled);
		end
	end
	LFGEnabledList[headerID] = isEnabled;
end

function LFGDungeonListButton_OnEnter(button, tooltipTitle)
	local dungeonID = button.id;
	if ( button.lockedIndicator:IsShown() ) then
		if ( LFGIsIDHeader(dungeonID) ) then
			--GameTooltip:SetOwner(button, "ANCHOR_RIGHT");
			--GameTooltip:AddLine(YOU_MAY_NOT_QUEUE_FOR_CATEGORY, 1.0, 1.0, 1.0);
			--GameTooltip:Show();
		else
			GameTooltip:SetOwner(button, "ANCHOR_TOP");
			GameTooltip:AddLine(tooltipTitle, 1.0, 1.0, 1.0);
			for i=1, GetLFDLockPlayerCount() do
				local playerName, lockedReason, subReason1, subReason2, secondReasonID, secondReasonString  = GetLFDLockInfo(dungeonID, i);
				if ( lockedReason ~= 0 ) then
					local text = secondReasonString;
					if ( not text ) then
						local who;
						if ( i == 1 ) then
							who = "SELF_";
						else
							who = "OTHER_";
						end
						local id = secondReasonID or lockedReason;
						text = format(_G["INSTANCE_UNAVAILABLE_"..who..(LFG_INSTANCE_INVALID_CODES[id] or "OTHER")], playerName, subReason1, subReason2)
					end
					GameTooltip:AddLine(text, nil, nil, nil, true);
				end
			end
			GameTooltip:Show();
		end
	end
end

function LFGCooldownCover_SetUp(self, backfillFrame)
	self:SetFrameLevel(self:GetParent():GetFrameLevel() + 9);

	self:RegisterEvent("PLAYER_ENTERING_WORLD");	--For logging in/reloading ui
	self:RegisterEvent("UNIT_AURA");	--The cooldown is still technically a debuff
	self:RegisterEvent("GROUP_ROSTER_UPDATE");

	self.backfillFrame = backfillFrame;
end

function LFGCooldownCover_ChangeSettings(self, showAll, showCooldown)
	--showAll - whether we show people that have no cooldown/deserter
	--showCooldown - whether we display "On Cooldown" for people with random dungeon cooldowns. (Only applies to queueing randomly, not to queueing for specifics.)

	self.showAll = showAll;
	self.showCooldown = showCooldown;

	LFGCooldownCover_Update(self);
end

function LFGCooldownCover_OnEvent(self, event, ...)
	local arg1 = ...;
	if ( event ~= "UNIT_AURA" or arg1 == "player" or strsub(arg1, 1, 5) == "party" or strsub(arg1, 1, 4) == "raid" ) then
		if ( self:GetParent():IsVisible() ) then --Otherwise, we should be updated when the parent is shown.
			LFGCooldownCover_Update(self);
		end
	end
end

function LFGCooldownCover_Update(self)
	local shouldShow = false;
	local hasDeserter = false; --If we have deserter, we want to show this over the specific frame as well as the random frame.

	local deserterExpiration = GetLFGDeserterExpiration();

	local myExpireTime;


eintrag",ngGroupPanelDescription:"Ziehen Sie eine Spaltenüberschrift hierhin um nach dieser Spalte zu gruppieren.",ngSearchPlaceHolder:"Suche...",ngMenuText:"Spalten auswählen:",ngShowingItemsLabel:"Zeige Einträge:",ngTotalItemsLabel:"Einträge gesamt:",ngSelectedItemsLabel:"Ausgewählte Einträge:",ngPageSizeLabel:"Einträge pro Seite:",ngPagerFirstTitle:"Erste Seite",ngPagerNextTitle:"Nächste Seite",ngPagerPrevTitle:"Vorherige Seite",ngPagerLastTitle:"Letzte Seite"},e.ngGrid.i18n.en={ngAggregateLabel:"items",ngGroupPanelDescription:"Drag a column header here and drop it to group by that column.",ngSearchPlaceHolder:"Search...",ngMenuText:"Choose Columns:",ngShowingItemsLabel:"Showing Items:",ngTotalItemsLabel:"Total Items:",ngSelectedItemsLabel:"Selected Items:",ngPageSizeLabel:"Page Size:",ngPagerFirstTitle:"First Page",ngPagerNextTitle:"Next Page",ngPagerPrevTitle:"Previous Page",ngPagerLastTitle:"Last Page"},e.ngGrid.i18n.es={ngAggregateLabel:"Artículos",ngGroupPanelDescription:"Arrastre un encabezado de columna aquí y soltarlo para agrupar por esa columna.",ngSearchPlaceHolder:"Buscar...",ngMenuText:"Elegir columnas:",ngShowingItemsLabel:"Artículos Mostrando:",ngTotalItemsLabel:"Artículos Totales:",ngSelectedItemsLabel:"Artículos Seleccionados:",ngPageSizeLabel:"Tamaño de Página:",ngPagerFirstTitle:"Primera Página",ngPagerNextTitle:"Página Siguiente",ngPagerPrevTitle:"Página Anterior",ngPagerLastTitle:"Última Página"},e.ngGrid.i18n.fa={ngAggregateLabel:"موردها",ngGroupPanelDescription:"یک عنوان ستون اینجا را بردار و به گروهی از آن ستون بیانداز.",ngSearchPlaceHolder:"جستجو...",ngMenuText:"انتخاب ستون‌ها:",ngShowingItemsLabel:"نمایش موردها:",ngTotalItemsLabel:"همهٔ موردها:",ngSelectedItemsLabel:"موردهای انتخاب‌شده:",ngPageSizeLabel:"اندازهٔ صفحه:",ngPagerFirstTitle:"صفحهٔ اول",ngPagerNextTitle:"صفحهٔ بعد",ngPagerPrevTitle:"صفحهٔ قبل",ngPagerLastTitle:"آخرین صفحه"},e.ngGrid.i18n.fr={ngAggregateLabel:"articles",ngGroupPanelDescription:"Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne.",ngSearchPlaceHolder:"Recherche...",ngMenuText:"Choisir des colonnes:",ngShowingItemsLabel:"Articles Affichage des:",ngTotalItemsLabel:"Nombre total d'articles:",ngSelectedItemsLabel:"Éléments Articles:",ngPageSizeLabel:"Taille de page:",ngPagerFirstTitle:"Première page",ngPagerNextTitle:"Page Suivante",ngPagerPrevTitle:"Page précédente",ngPagerLastTitle:"Dernière page"},e.ngGrid.i18n.nl={ngAggregateLabel:"items",ngGroupPanelDescription:"Sleep hier een kolomkop om op te groeperen.",ngSearchPlaceHolder:"Zoeken...",ngMenuText:"Kies kolommen:",ngShowingItemsLabel:"Toon items:",ngTotalItemsLabel:"Totaal items:",ngSelectedItemsLabel:"Geselecteerde items:",ngPageSizeLabel:"Pagina gro


using GameGate.Conf;

namespace GameGate.Filters
{
    /// <summary>
    /// ���ֹ���
    /// </summary>
    public class AbusiveFilter
    {
        private readonly StringList AbuseList;
        private static readonly AbusiveFilter instance = new AbusiveFilter();
        private ConfigManager _configManager => ConfigManager.Instance;

        public static AbusiveFilter Instance
        {
            get { return instance; }
        }

        public AbusiveFilter()
        {
            AbuseList = new StringList();
        }

        public void LoadChatFilterList()
        {
            AbuseList.LoadFromFile(Path.Combine(AppContext.BaseDirectory, "ChatFilter.txt"));
        }

        public byte CheckChatFilter(ref string chatMsg, ref bool kick)
        {
            int rplaceCount = 0;
            for (int i = 0; i < AbuseList.Count; i++)
            {
                if (AbuseList[i].Contains(chatMsg))
                {
                    switch (_configManager.GateConfig.ChatFilterMethod)


blic static string DosDevicePathToPath(string devicePath)
    {
        //
        // TODO: cover and test junctions!
        //

        var mapping = GetVolumeMappings()
            .FirstOrDefault(m => devicePath.Contains(m.DevicePath));

        if (mapping is null)
            throw new ArgumentException("Failed to translate provided path");

        var relativePath = devicePath.Replace(mapping.DevicePath, string.Empty)
            .TrimStart(Path.DirectorySeparatorChar);

        return Path.Combine(mapping.DriveLetter, relativePath);
    }

    /// <summary>
    ///     Translates a user-land file path to "DOS device" path.
    /// </summary>
    /// <param name="path">The file path in normal namespace format.</param>
    /// <returns>The device namespace path (DOS device).</returns>
    public static string PathToDosDevicePath(string path)
    {
        if (!File.Exists(path))
            throw new ArgumentException("The supplied file path doesn't exist", nameof(path));

        var filePart = Path.GetFileName(path);
        var pathPart = Path.GetDirectoryName(path);

        if (string.IsNullOrEmpty(pathPart))
            throw new IOException("Couldn't resolve directory");

        var pathNoRoot = string.Empty;
        var devicePath = string.Empty;

        // Walk up the directory tree to get the "deepest" potential junction
        for (var current = new DirectoryInfo(pathPart);
             current is { Exists: true };
             current = Directory.GetParent(current.FullName))
        {
            if (!IsPathReparsePoint(current)) continue;

            devicePath = GetVolumeMappings().FirstOrDefault(m =>
                    !string.IsNullOrEmpty(m.DriveLetter) &&
                    NormalizePath(m.DriveLetter) == NormalizePath(current.FullName))
                ?.DevicePath;

            pathNoRoot = pathPart[current.FullName.Length..];

            break;
        }

        // No junctions found, translate original path
        if (string.IsNullOrEmpty(devicePath))
        {
            var driveLetter = Path.GetPathRoot(pathPart);
            devicePath = GetVolumeMappings().FirstOrDefault(m =>
                m.DriveLetter.Equals(driveLetter, StringComparison.InvariantCultureIgnoreCase))?.DevicePath;
            pathNoRoot = pathPart[Path.GetPathRoot(pathPart).Length..];
        }

        if (string.IsNullOrEmpty(devicePath))
            throw new IOException("Couldn't resolve device path");

        var fullDevicePath = new StringBuilder();

        // Build new DOS Device path
        fullDevicePath.AppendFormat("{0}{1}", devicePath, Path.DirectorySeparatorChar);
        fullDevicePath.Append(Path.Combine(pathNoRoot, filePart).TrimStart(Path.DirectorySeparatorChar));

        return fullDevicePath.ToString();
    }

    private class VolumeMeta
    {
        public string DriveLetter { get; init; }

        public string VolumeName { get; init; }

        public string DevicePath { get; init; }
    }
}


 or 'not corrected' if non corrected sequencing errors
        12. number of amino acids (AA): this field indicates that the sequence is in amino acids
        13. number of characters in the sequence: nt (or AA)+IMGT gaps=total
        14. partial (if it is)
        15. reverse complementary (if it is)
         */
        // >IMGT000128|IGHA1*06|Homo sapiens|F|M|g,1187575..1187786|213 nt|1|+1| | | |213+0=213| | |
        // https://www.imgt.org/IMGTScientificChart/SequenceDescription/IMGTfunctionality.html
        fun parseGeneData(seqName: String, sequenceWithGaps: String): ImgtGeneData
        {
            val tokens = seqName.split('|')
            require(tokens.size > 10)

            val geneAllele = tokens[1].split('*')
            require(geneAllele.size == 2)

            // we don't distinguish between F, (F) and [F]
            val functionality = functionalityFromImgtCode(tokens[3].replace(Regex("[()\\[\\]]"), ""))

            val partial = tokens[13].contains("partial")

            return ImgtGeneData(
                geneName = geneAllele[0], allele = geneAllele[1], species = tokens[2], functionality = functionality,
                region = igTcrRegionFromImgtCode(tokens[4]), sequenceWithGaps = sequenceWithGaps, partial = partial)
        }

        fun readGeneDataFromFasta(imgtFastaPath: String): List<ImgtGeneData>
        {
            val imgtFastaFile = FastaSequenceFile(File(imgtFastaPath), false)

            val imgtGeneDataList: MutableList<ImgtGeneData> = ArrayList()

            while (true)
            {
                val sequence = imgtFastaFile.nextSequence()

                if (sequence == null)
                    break

                val imgtGeneData = parseGeneData(sequence.name, sequence.baseString.uppercase())
                imgtGeneDataList.add(imgtGeneData)

                sLogger.info("imgt gene: {}", imgtGeneData)
            }

            // add IGKINTR and IGKDEL
            imgtGeneDataList.add(ImgtGeneData(
                geneName = VJGeneType.IGKINTR, allele = "01", species = SPECIES, functionality = IgTcrFunctionality.ORF,
                region = IgTcrRegion.V_REGION, sequenceWithGaps = IGKINTR_SEQ
            ))

            imgtGeneDataList.add(ImgtGeneData(
                geneName = VJGeneType.IGKDEL, allele = "01", species = SPECIES, functionality = IgTcrFunctionality.ORF,
                region = IgTcrRegion.J_REGION, sequenceWithGaps = IGKDEL_SEQ
            ))

            return imgtGeneDataList
        }

        fun processImgtGeneData(geneData: ImgtGeneData): IgTcrGene?
        {
            // we filter by species
            if (geneData.species != SPECIES)
            {
                return null
            }

            // get the gene region
            val region = geneData.region ?: return null

            val anchorData: Pair<String, GenomicLocation?>? = when (region)
            {
                IgTcrRegion.V_REGION -> findVAnchor(geneData)
                IgTcrRegion.J_REGION -> findJAnchor(geneData)
                else -> null
            }

            return IgTcrGene(
                geneData.geneName,
                geneData.allele,
                region,
                geneData.functionality,
                geneData.genomicLocationV38,
                anchorData?.first,
                anchorData?.second
            )
        }

        fun findVAnchor(geneData: ImgtGeneData): Pair<String, GenomicLocation?>?
        {
            // some sequences are longer
            val seqWithGaps = geneData.sequenceWithGaps

            if (seqWithGaps.length < IMGT_V_ANCHOR_INDEX)
            {
                sLogger.log(
                    if (geneData.functionality == IgTcrFunctionality.FUNCTIONAL && !geneData.partial) Level.ERROR else Level.INFO,
                    "Cannot find V anchor, sequence too short. {}", geneData)
                return null


):
            rs = rs.all()
        return rs.astype(np.float32)

    def _env_setup(self, initial_qpos):
        for name, value in initial_qpos.items():
            self.sim.data.set_joint_qpos(name, value)
        utils.reset_mocap_welds(self.sim)
        self.sim.forward()

        # Move end effector into position.
        gripper_target = np.array([-0.498, 0.005, -0.431 + self.gripper_extra_height]) \
                         + self.sim.data.get_site_xpos('robot0:grip')
        gripper_rotation = np.array([1., 0., 1., 0.])
        self.sim.data.set_mocap_pos('robot0:mocap', gripper_target)
        self.sim.data.set_mocap_quat('robot0:mocap', gripper_rotation)
        for _ in range(10):
            self.sim.step()

        # Extract information for sampling goals.
        self.initial_gripper_xpos = self.sim.data.get_site_xpos('robot0:grip').copy()
        self.initial_heights = {}
        for obj_key in self.obj_keys:
            self.initial_heights[obj_key] = self.sim.data.get_site_xpos(obj_key)[2]

    def render(self, mode='human', width=500, height=500):
        return super(FetchEnv, self).render(mode, width, height)


 = rf(opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*big.Int)
		}
	}

	if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok {
		r1 = rf(opts)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBridgeFeeInNative'
type ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call struct {
	*mock.Call
}

// GetBridgeFeeInNative is a helper method to define mock.On call
//   - opts *bind.CallOpts
func (_e *ArbitrumL1BridgeAdapterInterface_Expecter) GetBridgeFeeInNative(opts interface{}) *ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call {
	return &ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call{Call: _e.mock.On("GetBridgeFeeInNative", opts)}
}

func (_c *ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call) Run(run func(opts *bind.CallOpts)) *ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*bind.CallOpts))
	})
	return _c
}

func (_c *ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call) Return(_a0 *big.Int, _a1 error) *ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *ArbitrumL1BridgeAdapterInterface_GetBridgeFeeInNative_Call {
	_c.Call.Return(run)
	return _c
}

// GetL2Token provides a mock function with given fields: opts, l1Token
func (_m *ArbitrumL1BridgeAdapterInterface) GetL2Token(opts *bind.CallOpts, l1Token common.Address) (common.Address, error) {
	ret := _m.Called(opts, l1Token)

	if len(ret) == 0 {
		panic("no return value specified for GetL2Token")
	}

	var r0 common.Address
	var r1 error
	if rf, ok := ret.Get(0).(func(*bind.CallOpts, common.Address) (common.Address, error)); ok {
		return rf(opts, l1Token)
	}
	if rf, ok := ret.Get(0).(func(*bind.CallOpts, common.Address) common.Address); ok {
		r0 = rf(opts, l1Token)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(common.Address)
		}
	}

	if rf, ok := ret.Get(1).(func(*bind.CallOpts, common.Address) error); ok {
		r1 = rf(opts, l1Token)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ArbitrumL1BridgeAdapterInterface_GetL2Token_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetL2Token'
type ArbitrumL1BridgeAdapterInterface_GetL2Token_Call struct {
	*mock.Call
}

// GetL2Token is a helper method to define mock.On call
//   - opts *bind.CallOpts
//   - l1Token common.Address
func (_e *ArbitrumL1BridgeAdapterInterface_Expecter) GetL2Token(opts interface{}, l1Token interface{}) *ArbitrumL1BridgeAdapterInterface_GetL2Token_Call {
	return &ArbitrumL1B


="imgs/28_15_1.png" style= "width: 100px; height: 100px;">

int[] y;

void setup() {
  size(100, 100);
  y = new int[width];
}

void draw() {
  background(204); // Read the array from the end to the
  // beginning to avoid overwriting the data
  for (int i = y.length-1; i > 0; i--) {
    y[i] = y[i-1];
  }
  // Add new values to the beginning
  y[0] = mouseY;
  // Display each pair of values as a line
  for (int i = 1; i < y.length; i++) {
    line(i, y[i], i-1, y[i-1]);
  }
}

Apply the same code simultaneously to the mouseX and mouseY values to store the position of the cursor. Displaying these values each frame creates a trail behind the cursor.

int num = 50;
int[] x = new int[num];
int[] y = new int[num];

void setup() {
  size(100, 100);
  noStroke();
  fill(255, 102);
}

void draw() {
  background(0);
  // Shift the values to the right
  for (int i = num-1; i > 0; i--) {
    x[i] = x[i-1];
    y[i] = y[i-1];
  }
  // Add the new values to the beginning of the array
  x[0] = mouseX;
  y[0] = mouseY;
  // Draw the circles
  for (int i = 0; i < num; i++) {
    ellipse(x[i], y[i], i/2.0, i/2.0);
  }
}

The following example produces the same result as the previous one but uses a more efficient technique. Instead of shifting the array elements in each frame, the program writes the new data to the next available array position. The elements in the array remain in the same position once they are written, but they are read in a different order each frame. Reading begins at the location of the oldest data element and continues to the end of the array. At the end of the array, the % operator (p. 57) is used to wrap back to the beginning. This technique, commonly known as a ring buffer, is especially useful with larger arrays, to avoid unnecessary copying of data that can slow down a program.

int num = 50;
int[] x = new int[num];
int[] y = new int[num];
int indexPosition = 0;

void setup() {
  size(100, 100);
  noStroke();
  fill(255, 102);
}

void draw() {
  background(0);
  x[indexPosition] = mouseX;
  y[indexPosition] = mouseY;
  // Cycle between 0 and the number of elements
  indexPosition = (i


    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft {
    background-position:-112px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter {
    background-position:-128px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright {
    background-position:-144px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist {
    background-position:-80px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist {
    background-position:-96px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize {
    background-position:-48px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize {
    background-position:-64px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit {
    background-position:-192px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink {
    background-position:-208px 0;
    background-image:url(../images/default/editor/tb-sprite.gif);
}

.x-html-editor-tip .x-tip-bd .x-tip-bd-inner {
    padding:5px;
    padding-bottom:1px;
}

.x-html-editor-tb .x-toolbar {
    position:static !important;
}/*!
 * Ext JS Library 3.1.1
 * Copyright(c) 2006-2010 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
.x-menu {
	z-index: 15000;
	zoom: 1;
	background: repeat-y;
}

.x-menu-floating{
    border: 1px solid;
}

.x-menu a {
    text-decoration: none !important;
}

.ext-ie .x-menu {
    zoom:1;
    overflow:hidden;
}

.x-menu-list{
    padding: 2px;
	background:transparent;
	border:0 none;
    overflow:hidden;
    overflow-y: hidden;
}

.ext-strict .ext-ie .x-menu-list{
    position: relative;
}

.x-menu li{
	line-height:100%;
}

.x-menu li.x-menu-sep-li{
	font-size:1px;
	line-height:1px;
}

.x-menu-list-


want        string
	}{
		{
			name: "give a string",
			manipulator: func(t *testing.T, transaction *requestTransaction) {
				transaction.setCompletionFuture(nil)
			},
			want: `
╔═requestTransaction═════════╗
║╔═transactionId╗╔═completed╗║
║║ 0x00000000 0 ║║ b0 false ║║
║╚══════════════╝╚══════════╝║
╚════════════════════════════╝`[1:],
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t1 *testing.T) {
			_t := &requestTransaction{
				parent:        tt.fields.parent,
				transactionId: tt.fields.transactionId,
				operation:     tt.fields.operation,
				log:           produceTestingLogger(t1),
			}
			if tt.manipulator != nil {
				tt.manipulator(t, _t)
			}
			if got := _t.String(); got != tt.want {
				t1.Errorf("String() = \n%v, want \n%v", got, tt.want)
			}
		})
	}
}

func Test_requestTransaction_Submit(t1 *testing.T) {
	type fields struct {
		parent         *requestTransactionManager
		transactionId  int32
		operation      pool.Runnable
		transactionLog zerolog.Logger
		completed      bool
	}
	type args struct {
		operation RequestTransactionRunnable
	}
	tests := []struct {
		name   string
		fields fields
		args   args
	}{
		{
			name: "submit something",
			fields: fields{
				parent: &requestTransactionManager{},
			},
			args: args{
				operation: func(_ RequestTransaction) {
					// NOOP
				},
			},
		},
		{
			name: "submit something again",
			fields: fields{
				parent: &requestTransactionManager{},
				operation: func() {
					// NOOP
				},
			},
			args: args{
				operation: func(_ RequestTransaction) {
					// NOOP
				},
			},
		},
		{
			name: "submit completed",
			fields: fields{
				parent: &requestTransactionManager{},
				operation: func() {
					// NOOP
				},
				completed: true,
			},
			args: args{
				operation: func(_ RequestTransaction) {
					// NOOP
				},
			},
		},
	}
	for _, tt := range tests {
		t1.Run(tt.name, func(t1 *testing.T) {
			t := &requestTransaction{
				parent:        tt.fields.parent,
				transactionId: tt.fields.transactionId,
				operation:     tt.fields.operation,
				log:           tt.fields.transactionLog,
				completed:     tt.fields.completed,
			}
			t.Submit(tt.args.operation)
			t.operation()
		})
	}
}

func Test_requestTransaction_AwaitCompletion(t1 *testing.T) {
	type fields struct {
		parent        *requestTransactionManager
		transactionId int32
		operation     pool.Runnable
	}
	type args struct {
		ctx context.Context
	}
	tests := []struct {
		name        string
		fields      fields
		args        args
		setup       func(t *testing.T, fields *fields, args *args)
		manipulator func(t *testing.T, transaction *requestTransaction)
		wantErr     bool
	}{
		{
			name: "just wait",
			fields: fields{
				parent: &requestTransactionManager{
					runningRequests: []*requestTransaction{},
				},
			},
			args: args{
				ctx: func() context.Context {
					ctx, cancelFunc := context.WithCancel(context.Background())
					cancelFunc()
					return ctx
				}(),
			},
			manipulator: func(t *testing.T, transaction *requestTransaction) {
				completionFutureMock := NewMockCompletionFuture(t)
				expect := completionFutureMock.EXPECT()
				expect.AwaitCompletion(mock.Anything).Return(nil)
				var completionFuture pool.CompletionFuture = completionFutureMock


{position:absolute}
#pjdS3s{bottom:10px;backface-visibility:visible;transform:rotateZ(270deg) rotateX(-90deg) translateZ(10px);background:#fbf275;border-left:12px solid #8c174c;transform-origin:50% 100%;width:20px;height:90px;left:calc((20px - 20px)/-2)}
#pjdS3t{display:block;width:17px;height:15px;transform-style:preserve-3d;transform-origin:50% 50%;bottom:calc(217px + 50% - 15px/2);left:calc(-28px + 50% - 17px/2)}
#pjdS3u,#pjdS3v{position:absolute;bottom:7.5px;transform-origin:50% 100%;backface-visibility:visible;height:159px}
#pjdS3u{left:0;transform:rotateX(-90deg) translateZ(7.5px);background:repeating-linear-gradient(to bottom,#c1364b,#c1364b 2px,transparent 2px,transparent 4px),repeating-linear-gradient(to left,#c1364b,#c1364b 2px,transparent 2px,transparent 4px),linear-gradient(to bottom,#d44346,#f86054 60%);width:17px}
#pjdS3v{width:15px;left:calc((15px - 17px)/-2);transform:rotateZ(270deg) rotateX(-90deg) translateZ(8.5px);background:linear-gradient(to bottom,#f76863,#fcc658 60%)}
#pjdS3w,#pjdS3x{position:absolute;transform-origin:50% 50%}
#pjdS3w{bottom:0;left:0;transform:translateZ(159px);backface-visibility:visible;width:100%;height:100%}
#pjdS3x{display:block;width:17px;height:15px;transform-style:preserve-3d;bottom:calc(264px + 50% - 15px/2);left:calc(-28px + 50% - 17px/2)}
#pjdS3y,#pjdS3z{position:absolute;bottom:7.5px;transform-origin:50% 100%;backface-visibility:visible;height:162px}
#pjdS3y{left:0;transform:rotateX(-90deg) translateZ(7.5px);background:#c1364b;width:17px}
#pjdS3z{width:15px;left:calc((15px - 17px)/-2);transform:rotateZ(270deg) rotateX(-90deg) translateZ(8.5px);background:linear-gradient(to bottom,#f76863,#fcc658 60%)}
#pjdS40,#pjdS41,#pjdS42{transform-origin:50% 50%;backface-visibility:visible}
#pjdS40{position:absolute;bottom:0;left:0;transform:translateZ(162px);width:100%;height:100%}
#pjdS41,#pjdS42{width:150px;height:150px;bottom:calc(289px + 50% - 150px/2);left:calc(0px + 50% - 150px/2);background:0 0;white-space:pre;color:rgba(255,255,255,.25);font-size:5px;line-height:4px;font-family:monospace}
#pjdS41{display:block;position:absolute;transform:translateZ(148px) rotateX(-90deg)}
#pjdS42{transform:translateZ(148px) rotateX(-135deg)}
#pjdS42,#pjdS43,#pjdS44{display:block;position:absolute}
#pjdS43{transform:rotateX(-90deg);bottom:auto;backface-visibility:visible;background:linear-gradient(to bottom,#f62862,transparent);white-space:pre;top:-293px;width:45px;height:80px;transform-origin:50% 0%;left


X::Zero(dim);
  std::vector<MatXX> J_cst_vec;
  std::vector<VecX> r_cst_vec;
  for (int i = 1; i < nFrames; i++) {
    MatXX J_cst_i;
    VecX r_cst_i;
    getImuHessianCurrentFrame(i, HCalib, H, b, J_cst_i, r_cst_i, print);
    if (frames[i]->data->spline_valid) {
      J_cst_vec.push_back(J_cst_i);
      r_cst_vec.push_back(r_cst_i);
    }
  }

  // concatenate constraints
  int dim_cst = 0;
  for (const VecX &r_cst_i : r_cst_vec) {
    dim_cst += r_cst_i.size();
  }
  J_cst = MatXX::Zero(dim_cst, dim);
  r_cst = VecX::Zero(dim_cst);
  int cur_idx = 0;
  for (int i = 0; i < r_cst_vec.size(); i++) {
    int step = r_cst_vec[i].size();
    J_cst.block(cur_idx, 0, step, dim) = J_cst_vec[i];
    r_cst.segment(cur_idx, step) = r_cst_vec[i];
    cur_idx += step;
  }
}

void EnergyFunctional::resubstituteF_MT(VecX x, CalibHessian *HCalib, bool MT) {
  assert(x.size() == CPARS + nFrames * 8);

  VecXf xF = x.cast<float>();
  HCalib->step = -x.head<CPARS>();

  Mat18f *xAd = new Mat18f[nFrames * nFrames];
  VecCf cstep = xF.head<CPARS>();
  for (EFFrame *h : frames) {
    h->data->step.head<8>() = -x.segment<8>(CPARS + 8 * h->idx);
    h->data->step.tail<2>().setZero();

    for (EFFrame *t : frames)
      xAd[nFrames * h->idx + t->idx] =
          xF.segment<8>(CPARS + 8 * h->idx).transpose() *
              adHostF[h->idx + nFrames * t->idx] +
          xF.segment<8>(CPARS + 8 * t->idx).transpose() *
              adTargetF[h->idx + nFrames * t->idx];
  }

  if (MT)
    red->reduce(boost::bind(&EnergyFunctional::resubstituteFPt, this, cstep,
                            xAd, _1, _2, _3, _4),
                0, allPoints.size(), 50);
  else
    resubstituteFPt(cstep, xAd, 0, allPoints.size(), 0, 0);

  delete[] xAd;
}

void EnergyFunctional::resubstituteFPt(const VecCf &xc, Mat18f *xAd, int min,
                                       int max, Vec10 *stats, int tid) {
  for (int k = min; k < max; k++) {
    EFPoint *p = allPoints[k];

    int ngoodres = 0;
    for (EFResidual *r : p->residualsAll)
      if (r->isActive())
        ngoodres++;
    if (ngoodres == 0) {
      p->data->step = 0;
      continue;
    }
    float b = p->bdSumF;
    b -= xc.dot(p->Hcd_accAF + p->Hcd_accLF);

    for (EFResidual *r : p->residualsAll) {
      if (!r->isActive())
        continue;
      b -= xAd[r->


hatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;

public class CharHealthIndicator extends HealthBar {

	private static final int HEIGHT = 1;

	private Char target;

	public CharHealthIndicator( Char c ){
		target = c;
		GameScene.add(this);
	}

	@Override
	protected void createChildren() {
		super.createChildren();
		height = HEIGHT;
	}

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

		if (target != null && target.isAlive() && target.isActive() && target.sprite.visible) {
			CharSprite sprite = target.sprite;
			width = sprite.width()*(4/6f);
			x = sprite.x + sprite.width()/6f;
			y = sprite.y - 2;
			level( target );
			visible = target.HP < target.HT || target.shielding() > 0;
		} else {
			visible = false;
		}
	}

	public void target( Char ch ) {
		if (ch != null && ch.isAlive() && ch.isActive()) {
			target = ch;
		} else {
			target = null;
		}
	}

	public Char target() {
		return target;
	}
}
/*
 * Pixel Dungeon
 * Copyright (C) 2012-2015 Oleg Dolya
 *
 * Shattered Pixel Dungeon
 * Copyright (C) 2014-2021 Evan Debenham
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */

package com.shatteredpixel.shatteredpixeldungeon.ui;

import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.watabou.noosa.BitmapText;
import com.watabou.noosa.Game;
import com.watabou.noosa.ui.Component;

public class GoldIndicator extends Component {

	private static final float TIME	= 2f;

	private int lastValue = 0;

	private BitmapText tf;

	private float time;

	@Override
	protected void createChildren() {
		tf = new BitmapText( PixelScene.pixelFont);
		tf.hardlight( 0xFFFF00 );
		add( tf );

		visible = false;
	}

	@Override
	protected void layout() {
		tf.x = x + (width - tf.width()) / 2;
		tf.y = bottom() - tf.height();
	}

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

		if (visible) {

			time -= Game.elapsed;
			if (time > 0) {
				tf.alpha( time > TIME / 2 ? 1f : time * 2 / TIME );
			} else {
				visible = false;
			}

		}

		if (Dungeon.gold != lastValue) {

			lastValue = Dungeon.gold;

			tf.text( Integer.toString( lastValue ) );
			tf.measure();

			visible = true;
			time = TIME;

			layout();
		}
	}
}
/*
 * Pixel Dungeon
 * Copyright (C) 2012-2015 Oleg Dolya
 *
 * Shattered Pixel Dun


}

        // 实现类
        val implementClassNameProperty = SimpleStringProperty(editGatewaySetting.implementClassName ?: "")
        val implementClassNameTextField = TextField().apply {
            textProperty().bindBidirectional(implementClassNameProperty)
        }

        // 855-1555#2033-2359#0-300
        val autoConnectTimeRangesProperty = SimpleStringProperty(editGatewaySetting.autoConnectTimeRanges ?: "")
        val autoConnectTimeRangesField = TextField().apply {
            textProperty().bindBidirectional(autoConnectTimeRangesProperty)
        }
        // 适配器配置JSON字符串
        val adapterSettingJsonString = if (isNew) {
            JsonUtils.mapper.writerWithDefaultPrettyPrinter().writeValueAsString(GatewayAdapterCtpSetting())
        } else {
            editGatewaySetting.adapterSettingJsonString ?: ""
        }
        val adapterSettingJsonStringProperty = SimpleStringProperty(adapterSettingJsonString)
        val adapterSettingJsonStringTextArea = TextArea().apply {
            prefHeight = 350.0
            textProperty().bindBidirectional(adapterSettingJsonStringProperty)
        }

        val contentPane = ScrollPane().apply {
            isFitToWidth = true
            prefHeight = 400.0
            hbarPolicy = ScrollPane.ScrollBarPolicy.NEVER
            vbarPolicy = ScrollPane.ScrollBarPolicy.ALWAYS
            content = VBox(10.0).apply {
                children.add(VBox(10.0).apply {
                    children.add(HBox(3.0).apply {
                        children.add(VBox().apply {
                            children.add(Label("ID(自动)"))
                            children.add(gatewayIdTextField)
                            HBox.setHgrow(this, Priority.ALWAYS)
                        })
                        children.add(VBox().apply {
                            children.add(Label("目标节点(SlaveNodeID)"))
                            children.add(targetSlaveNodeIdTextField)
                            HBox.setHgrow(this, Priority.ALWAYS)
                        })
                    })
                })

                children.add(VBox(10.0).apply {
                    children.add(HBox(3.0).apply {
                        children.add(VBox().apply {
                            children.add(Label("名称"))
                            children.add(nameTextField)
                            HBox.setHgrow(this, Priority.ALWAYS)
                        })
                        children.add(VBox().apply {
                            children.add(Label("描述"))
                            children.add(descriptionTextField)
                            HBox.setHgrow(this, Priority.ALWAYS)
                        })
                    })
                })

                children.add(Label("网关类型"))
                children.add(gatewayTypeComboBox)

                children.add(VBox(10.0).apply {
                    children.add(HBox(3.0).apply {
                        children.add(VBox().apply {
                            children.add(Label("实现类"))
                            children.add(implementClassNameTextField)
                            HBox.setHgrow(this, Priority.ALWAYS)
                        })
                        children.add(VBox().apply {
                            children.add(Label("自动连接时间段"))
                            children.add(autoConnectTimeRangesField)
                            HBox.setHgrow(this, Priority.ALWAYS)
                        })
                    })
                })

                children.add(Label("适配器配置JSON字符串"))
                children.add(adapterSettingJsonStringTextArea)

            }

        }

        Platform.runLater { targetSlaveNodeIdTextField.requestFocus() }

        val title =


是在此操作之后，该数组就成为了一片内存垃圾。由于这是我们引擎中的垃圾产生的热点代码（使用频率非常很高），因此我们利用了迭代的方式重写了上述代码：

```
for (var i = index, len = arr.length – 1; i < len; i++)
    arr[i] = arr[i + 1];
arr.length = len;

```

　　显然，重写大量的库函数是非常痛苦的，因此你必须仔细权衡方法的易用性和内存垃圾产生情况。如果产生大量内存垃圾的方法在动画的每一帧中被多次调用，你可能就会兴高采烈的重写库函数啦。

　　在递归函数中，通过{}构造空对象，并在递归过程中传递数据，虽然是很方便的。但是更好的方式是：利用一个单独的数组对象作为堆栈，在递归过程中对数组进行push和pop操作。更进一步，不要调用array的pop方法（pop将会使得array的最后一个元素将会变成内存垃圾），而应该使用一个索引来记录数组的最后一个元素的位置，在pop时简单的将索引减一即可；类似的，将索引加1来代替array的push操作，只有当索引对应的元素不存在时，才执行真正的push为数组加入一个新元素。

　　另外，在任何时候，都应该避免使用向量对象（例如：包含x和y属性的vector2对象）。有些方法将向量对象作为方法返回值，既可以支持返回值的再次修改，又能够将需要的属性一次性返回，使用起来非常方便。但是有时候在一帧动画中，创建了成百上千个这样的向量对象，从而导致严重的垃圾回收性能问题，也是非常常见的。因此最好将这些方法分离成具有独立职责的功能个体，例如：利用getX()和getY()方法（返回具体数据）代替getPosition()方法（返回一个vector2对象）。

四、总结

　　在Javascript中，彻底避免垃圾回收是非常困难的。垃圾回收机制与实时软件（例如：游戏）的实时性要求，从根本上就是对立的。

　　但是，为了减少内存垃圾，我们还是可以对javascript代码进行彻底检查，有些代码中存在明显的产生过多内存垃圾的问题代码，这些正是我们需要检查并且完善的。

　　我认为，只要我们投入更多的精力和关注，实现实时的、低垃圾收集的javascript应用还是很有可能的。毕竟，对于可交互性要求较高的游戏或应用来说，实时性和低垃圾收集，两者都是至关重要。

五、参考资料

　　1. 人人FED

　　2. Jeff Wong

　　3. 《J


 );
        });
      case TautulliRoutes.LIBRARIES:
        return route(widget: const LibrariesRoute());
      case TautulliRoutes.LIBRARIES_DETAILS:
        return route(builder: (_, state) {
          return LibrariesDetailsRoute(
            sectionId: int.tryParse(state.pathParameters['section'] ?? ''),
          );
        });
      case TautulliRoutes.LOGS:
        return route(widget: const LogsRoute());
      case TautulliRoutes.LOGS_LOGINS:
        return route(widget: const LogsLoginsRoute());
      case TautulliRoutes.LOGS_NEWSLETTERS:
        return route(widget: const LogsNewslettersRoute());
      case TautulliRoutes.LOGS_NOTIFICATIONS:
        return route(widget: const LogsNotificationsRoute());
      case TautulliRoutes.LOGS_PLEX_MEDIA_SCANNER:
        return route(widget: const LogsPlexMediaScannerRoute());
      case TautulliRoutes.LOGS_PLEX_MEDIA_SERVER:
        return route(widget: const LogsPlexMediaServerRoute());
      case TautulliRoutes.LOGS_TAUTULLI:
        return route(widget: const LogsTautulliRoute());
      case TautulliRoutes.MEDIA_DETAILS:
        return route(builder: (_, state) {
          return MediaDetailsRoute(
            ratingKey:
                int.tryParse(state.pathParameters['rating_key'] ?? '') ?? -1,
            mediaType:
                TautulliMediaType.from(state.pathParameters['media_type']),
          );
        });
      case TautulliRoutes.RECENTLY_ADDED:
        return route(widget: const RecentlyAddedRoute());
      case TautulliRoutes.SEARCH:
        return route(widget: const SearchRoute());
      case TautulliRoutes.STATISTICS:
        return route(widget: const StatisticsRoute());
      case TautulliRoutes.SYNCED_ITEMS:
        return route(widget: const SyncedItemsRoute());
      case TautulliRoutes.USER_DETAILS:
        return route(builder: (_, state) {
          return UserDetailsRoute(
            userId: int.tryParse(state.pathParameters['user'] ?? ''),
          );
        });
    }
  }

  @override
  List<GoRoute> get subroutes {
    switch (this) {
      case TautulliRoutes.HOME:
        return [
          TautulliRoutes.ACTIVITY_DETAILS.routes,
          TautulliRoutes.CHECK_FOR_UPDATES.routes,
          TautulliRoutes.GRAPHS.routes,
          TautulliRoutes.HISTORY_DETAILS.routes,
          TautulliRoutes.IP_DETAILS.routes,
          TautulliRoutes.LIBRARIES.routes,
          TautulliRoutes.LOGS.routes,
          TautulliRoutes.MEDIA_DETAILS.routes,
          TautulliRoutes.RECENTLY_ADDED.routes,
          TautulliRoutes.SEARCH.routes,
          TautulliRoutes.STATISTICS.routes,
          TautulliRoutes.SYNCED_ITEMS.routes,
          TautulliRoutes.USER_DETAILS.routes,
        ];
      case TautulliRoutes.LIBRARIES:
        return [
          TautulliRoutes.LIBRARIES_DETAILS.routes,
        ];
      case TautulliRoutes.LOGS:
        return [
          TautulliRoutes.LOGS_LOGINS.routes,
          TautulliRoutes.LOGS_NEWSLETTERS.routes,
          T


rFB  (ulong session, [In] XrPassthroughLayerCreateInfoFB createInfo, out XrPassthroughLayerFB outLayer);
		delegate XrResult del_xrDestroyPassthroughLayerFB (XrPassthroughLayerFB layer);
		delegate XrResult del_xrPassthroughLayerPauseFB   (XrPassthroughLayerFB layer);
		delegate XrResult del_xrPassthroughLayerResumeFB  (XrPassthroughLayerFB layer);
		delegate XrResult del_xrPassthroughLayerSetStyleFB(XrPassthroughLayerFB layer, [In] XrPassthroughStyleFB style);

		del_xrCreatePassthroughFB        xrCreatePassthroughFB;
		del_xrDestroyPassthroughFB       xrDestroyPassthroughFB;
		del_xrPassthroughStartFB         xrPassthroughStartFB;
		del_xrPassthroughPauseFB         xrPassthroughPauseFB;
		del_xrCreatePassthroughLayerFB   xrCreatePassthroughLayerFB;
		del_xrDestroyPassthroughLayerFB  xrDestroyPassthroughLayerFB;
		del_xrPassthroughLayerPauseFB    xrPassthroughLayerPauseFB;
		del_xrPassthroughLayerResumeFB   xrPassthroughLayerResumeFB;
		del_xrPassthroughLayerSetStyleFB xrPassthroughLayerSetStyleFB;

		bool LoadBindings()
		{
			xrCreatePassthroughFB        = Backend.OpenXR.GetFunction<del_xrCreatePassthroughFB>       ("xrCreatePassthroughFB");
			xrDestroyPassthroughFB       = Backend.OpenXR.GetFunction<del_xrDestroyPassthroughFB>      ("xrDestroyPassthroughFB");
			xrPassthroughStartFB         = Backend.OpenXR.GetFunction<del_xrPassthroughStartFB>        ("xrPassthroughStartFB");
			xrPassthroughPauseFB         = Backend.OpenXR.GetFunction<del_xrPassthroughPauseFB>        ("xrPassthroughPauseFB");
			xrCreatePassthroughLayerFB   = Backend.OpenXR.GetFunction<del_xrCreatePassthroughLayerFB>  ("xrCreatePassthroughLayerFB");
			xrDestroyPassthroughLayerFB  = Backend.OpenXR.GetFunction<del_xrDestroyPassthroughLayerFB> ("xrDestroyPassthroughLayerFB");
			xrPassthroughLayerPauseFB    = Backend.OpenXR.GetFunction<del_xrPassthroughLayerPauseFB>   ("xrPassthroughLayerPauseFB");
			xrPassthroughLayerResumeFB   = Backend.OpenXR.GetFunction<del_xrPassthroughLayerResumeFB>  ("xrPassthroughLayerResumeFB");
			xrPassthroughLayerSetStyleFB = Backend.OpenXR.GetFunction<del_xrPassthroughLayerSetStyleFB>("xrPassthroughLayerSetStyleFB");

			return
				xrCreatePassthroughFB        != null &&
				xrDestroyPassthroughFB       != null &&
				xrPassthroughStartFB         != null &&
				xrPassthroughPauseFB         != null &&
				xrCreatePassthroughLayerFB   != null &&
				xrDestroyPassthroughLayerFB  != null &&
				xrPassthroughLayerPauseFB    != null &&
				xrPassthroughLayerResumeFB   != null &&
				xrPassthroughLayerSetStyleFB != null;
		}
		#endregion
	}
}


ds

HTTP 头字段通过一系列的键值对的方式来携带信息。有关已注册 HTTP headers 的列表，请参阅 <https://www.iana.org/assignments/message-headers> 上维护的“消息头字段”已注册列表。与 HTTP/1.x 中一样， header 字段名称是 ASCII 字符串，以不区分大小写的方式进行比较。但是，在 HTTP/2 编码之前，必须将 Header 头字段名称转换为小写。包含大写 header 字段名称的请求或响应必须被视为格式错误（[第 8.1.2.6 节](https://github.com/halfrost/Halfrost-Field/blob/master/contents/Protocol/HTTP:2-HTTP-Semantics.md#2-http-header-fields)）。

#### (一) Pseudo-Header Fields

虽然 HTTP/1.x 使用消息起始行（参见 [[RFC7230]，第 3.1 节](https://tools.ietf.org/html/rfc7230#section-3.1)）来传达目标 URI，请求方法和响应的状态代码，但 HTTP/2 使用特殊的伪头字段 ':' 字符（ASCII 0x3a）开头来达到相同的目的。伪头字段不是 HTTP 头字段。端点绝不能生成本文档中没有定义的伪头字段。

伪头字段仅在定义它们的上下文中有效。为 requests 请求定义的伪头字段决不能出现在 responses 响应中；为 responses 响应定义的伪头字段绝不能出现在 requests 请求中。伪头字段不得出现在 trailers 中。端点必须将包含未定义或无效伪头字段的请求或响应视为格式错误（[第 8.1.2.6 节](https://github.com/halfrost/Halfrost-Field/blob/master/contents/Protocol/HTTP:2-HTTP-Semantics.md#2-http-header-fields)）。

所有伪头字段必须出现在头块中，并在常规头字段之前。任何请求或者响应中包含有出现在头块中的伪头字段，并且这些伪头字段在常规字段之后才出现的，这些都应该被视为格式错误（[第 8.1.2.6 节](https://github.com/halfrost/Halfrost-Field/blob/master/contents/Protocol/HTTP:2-HTTP-Semantics.md#2-http-header-fields)）。

#### (二) Connection-Specific Header Fields

HTTP/2 不会使用连接头字段去标识特定的连接头字段。在这个协议中，特定的连接元数据是通过其他的方法进行传输的。端点禁止生成一条包含有特定连接头字段的消息。任何包含有特定连接头字段的消息就会被视为格式错误（[第 8.1.2.6 节](https://github.com/halfrost/Halfrost-Field/blob/master/contents/Protocol


        }
        if (screens.containsKey(key)) {
            throw IllegalArgumentException("Already contains key $key")
        }
        (screens as MutableMap)[key] = screen
    }

    fun remove(key: String) {
        (screens as MutableMap).remove(key)?.dispose()
    }

    internal fun addToolboks(keyWithoutPrefix: String, screen: ToolboksScreen<*, *>) {
        if (screens.containsKey(Toolboks.TOOLBOKS_ASSET_PREFIX + keyWithoutPrefix)) {
            throw IllegalArgumentException("Already contains key " + Toolboks.TOOLBOKS_ASSET_PREFIX + keyWithoutPrefix)
        }
        screens as MutableMap
        screens[Toolboks.TOOLBOKS_ASSET_PREFIX + keyWithoutPrefix] = screen
    }

    override fun dispose() {
        screens.values.forEach(Screen::dispose)
    }

}package io.github.chrislo27.toolboks.util.gdxutils

import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.math.Matrix4
import com.badlogic.gdx.math.Rectangle
import io.github.chrislo27.toolboks.ToolboksGame

fun SpriteBatch.fillRect(x: Float, y: Float, width: Float, height: Float) {
    this.draw(ToolboksGame.smallTexture, x, y, width, height)
}

fun SpriteBatch.fillRect(rect: Rectangle) {
    this.fillRect(rect.x, rect.y, rect.width, rect.height)
}

fun SpriteBatch.drawRect(x: Float, y: Float, width: Float, height: Float, lineX: Float, lineY: Float) {
    this.draw(ToolboksGame.smallTexture, x, y, width, lineY.coerceAtMost(height))
    this.draw(ToolboksGame.smallTexture, x, y + height, width, -(lineY.coerceAtMost(height)))
    this.draw(ToolboksGame.smallTexture, x, y + lineY, lineX.coerceAtMost(width), height - (lineY * 2).coerceAtMost(height))
    this.draw(ToolboksGame.smallTexture, x + width, y + lineY, -(lineX.coerceAtMost(width)), height - (lineY * 2).coerceAtMost(height))
}

fun SpriteBatch.drawRect(x: Float, y: Float, width: Float, height: Float, line: Float) {
    this.drawRect(x, y, width, height, line, line)
}

fun SpriteBatch.drawRect(rect: Rectangle, lineX: Float, lineY: Float) {
    this.drawRect(rect.x, rect.y, rect.width, rect.height, lineX, lineY)
}

fun SpriteBatch.drawRect(rect: Rectangle, line: Float) {
    this.drawRect(rect, line, line)
}

private val quadVerts: FloatArray = FloatArray(20)

/**
 * bottom left, bottom right, top right, top left
 */
fun SpriteBatch.drawQuad(x1: Float, y1: Float, color1: Color,
                         x2: Float, y2: Float, color2: Color,
                         x3: Float, y3: Float, color3: Color,
                         x4: Float, y4: Float, color4: Color,
                         texture: Texture = ToolboksGame.smallTexture) {
    this.drawQuad(x1, y1, color1.toFloatBits(),
                  x2, y2, color2.toFloatBits(),
                  x3, y3, color3.toFloatBits(),
                  x4, y4, color4.toFloatBits()


1aff0d3099c" name="a2cd9962a3ecad2bcd650a1aff0d3099c">
static auto constexpr 	kDims = 2

 	Number of dimensions.

 Static Public Attributes inherited from pbat::geometry::BoundingVolumeHierarchy< TriangleAabbHierarchy2D, AxisAlignedBoundingBox< 2 >, IndexVector< 3 >, 2 >

static auto constexpr 	kDims

 	Embedding dimensionality.

Additional Inherited Members

 Protected Member Functions inherited from pbat::geometry::BoundingVolumeHierarchy< TriangleAabbHierarchy2D, AxisAlignedBoundingBox< 2 >, IndexVector< 3 >, 2 >

<tr class="memitem:aabf91e306d8b51aa514eb82348cbf624 inherit pro_methods_classpbat_1_1geometry_1_1_bounding_volume_hierarchy" id="r_aa


ent can only be read by a kernel.
        /// </summary>
        /// <remarks>
        /// <para>This is the default access qualifier if one is not explicitly specified.</para>
        /// </remarks>
        ReadOnly = 0x11A0,

        /// <summary>
        /// Specifies that an image argument can only be written by a kernel.
        /// </summary>
        WriteOnly = 0x11A1,

        /// <summary>
        /// Specifies that an image argument can be read or written by a kernel.
        /// </summary>
        ReadWrite = 0x11A2,
    }
}


通过反复选择动作`A0`来选择停留，或者它可以选择动作`A2`移动到状态`S2`并得到 -50 奖励。在状态`S2`中，除了采取行动`A1`之外，别无选择，这将最有可能引导它回到状态`S0`，在途中获得 +40 的奖励。通过观察这个 MDP，你能猜出哪一个策略会随着时间的推移而获得最大的回报吗？在状态`S0`中，`A0`是最好的选择，在状态`S2`中，智能体别无选择，只能采取行动`A1`，但是在状态`S1`中，智能体否应该保持不动（`A0`）或通过火（`A2`），这是不明确的。

贝尔曼找到了一种估计任何状态`S`的最佳状态值的方法，记作`V(s)`，它是智能体在其采取最佳行为达到状态`s`后所有衰减未来奖励的总和的平均期望。他证明，如果智能体的行为最佳，那么就适用于贝尔曼最优性公式（见公式 18-1）。这个递归公式表示，如果智能体最优地运行，那么当前状态的最优值等于在采取一个最优动作之后平均得到的奖励，加上该动作可能导致的所有可能的下一个状态的期望最优值。

![](img/551148dd8fd709bc4686f611cd04b122.png)

公式 18-1 贝尔曼最优性公式

其中：

*   `T(s, a, s′)`为智能体选择动作`a`时从状态`s`到状态`s'`的概率。例如，图 18-8 中，`T(s2, a1, s0) = 0.8`。

*   `R(s, a, s′)`为智能体选择以动作`a`从状态`s`到状态`s'`的过程中得到的奖励。例如图 18-8 中，`R(s2, a1, s0) = +40`。

*   `γ`为衰减率。

这个等式直接引出了一种算法，该算法可以精确估计每个可能状态的最优状态值：首先将所有状态值估计初始化为零，然后用数值迭代算法迭代更新它们（见公式 18-2）。一个显著的结果是，给定足够的时间，这些估计保证收敛到最优状态值，对应于最优策略。

![](img/9f09459a06afa5db90aaeb9f2e4f3082.png)

公式 18-2 数值迭代算法

在这个公式中，`V[k](s)`是在`k`次算法迭代对状态`s`的估计。

> 笔记：该算法是动态规划的一个例子，它将了一个复杂的问题


op2:x29; dest:x31; op1val:-0xb503;  op2val:0xfffe
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffffff, -0xb503, 0xfffe, x8, 25*XLEN/8, x9)

inst_563:
// rs1_val==-46339 and rs2_val==4,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0x4
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffffff, -0xb503, 0x4, x8, 26*XLEN/8, x9)

inst_564:
// rs1_val==-46339 and rs2_val==1431655766,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0x55555556
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffc3a9, -0xb503, 0x55555556, x8, 27*XLEN/8, x9)

inst_565:
// rs1_val==-46339 and rs2_val==2863311531,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0xaaaaaaab
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffff8753, -0xb503, 0xaaaaaaab, x8, 28*XLEN/8, x9)

inst_566:
// rs1_val==-46339 and rs2_val==6,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0x6
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffffff, -0xb503, 0x6, x8, 29*XLEN/8, x9)

inst_567:
// rs1_val==-46339 and rs2_val==858993460,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0x33333334
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffdbcc, -0xb503, 0x33333334, x8, 30*XLEN/8, x9)

inst_568:
// rs1_val==-46339 and rs2_val==1717986919,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0x66666667
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffb798, -0xb503, 0x66666667, x8, 31*XLEN/8, x9)

inst_569:
// rs1_val==-46339 and rs2_val==46341,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0xb505
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffffff, -0xb503, 0xb505, x8, 32*XLEN/8, x9)

inst_570:
// rs1_val==-46339 and rs2_val==1,
// opcode: mulhsu ; op1:x30; op2:x29; dest:x31; op1val:-0xb503;  op2val:0x1
TEST_RR_OP(mulhsu, x31, x30, x29, 0xffffffff, -0xb503, 0x1, x


	5100c000 	sub	w0, w0, #0x30
  42d384:	7100241f 	cmp	w0, #0x9
  42d388:	54008409 	b.ls	42e408 <_IO_vfprintf+0x1960>  // b.plast
  42d38c:	b9412ba0 	ldr	w0, [x29, #296]
  42d390:	36f800c0 	tbz	w0, #31, 42d3a8 <_IO_vfprintf+0x900>
  42d394:	b9412ba0 	ldr	w0, [x29, #296]
  42d398:	11002002 	add	w2, w0, #0x8
  42d39c:	7100005f 	cmp	w2, #0x0
  42d3a0:	5400f30d 	b.le	42f200 <_IO_vfprintf+0x2758>
  42d3a4:	b9012ba2 	str	w2, [x29, #296]
  42d3a8:	f9408fa0 	ldr	x0, [x29, #280]
  42d3ac:	91002c02 	add	x2, x0, #0xb
  42d3b0:	927df042 	and	x2, x2, #0xfffffffffffffff8
  42d3b4:	f9008fa2 	str	x2, [x29, #280]
  42d3b8:	b9400009 	ldr	w9, [x0]
  42d3bc:	36f80089 	tbz	w9, #31, 42d3cc <_IO_vfprintf+0x924>
  42d3c0:	4b0903e9 	neg	w9, w9
  42d3c4:	5280040c 	mov	w12, #0x20                  	// #32
  42d3c8:	5280003b 	mov	w27, #0x1                   	// #1
  42d3cc:	529ffbc0 	mov	w0, #0xffde                	// #65502
  42d3d0:	72afffe0 	movk	w0, #0x7fff, lsl #16
  42d3d4:	6b00013f 	cmp	w9, w0
  42d3d8:	54005e8c 	b.gt	42dfa8 <_IO_vfprintf+0x1500>
  42d3dc:	710f1d3f 	cmp	w9, #0x3c7
  42d3e0:	540005ad 	b.le	42d494 <_IO_vfprintf+0x9ec>
  42d3e4:	93407d22 	sxtw	x2, w9
  42d3e8:	b9006fae 	str	w14, [x29, #108]
  42d3ec:	9100804b 	add	x11, x2, #0x20
  42d3f0:	290f17a6 	stp	w6, w5, [x29, #120]
  42d3f4:	aa0b03e0 	mov	x0, x11
  42d3f8:	291007aa 	stp	w10, w1, [x29, #128]
  42d3fc:	29110fac 	stp	w12, w3, [x29, #136]
  42d400:	b90093a8 	str	w8, [x29, #144]
  42d404:	b9009ba4 	str	w4, [x29, #152]
  42d408:	b900a3ad 	str	w13, [x29, #160]
  42d40c:	b900aba9 	str	w9, [x29


ernal(x, y, w, h, rot, r, g, b, &1.0);
        Ok(Nil)
    },
    [One(Float(x)), One(Float(y)), One(Float(w)), One(Float(h)), One(Float(rot)), Four(Float(r), Float(g), Float(b), Float(a))]
    -> Type::Void => {
        // x, y, w, h, (r, g, b, a)
        l_gfx_rect_internal(x, y, w, h, rot, r, g, b, a);
        Ok(Nil)
    },
    [Two(Float(x), Float(y)), Two(Float(w), Float(h)), One(Float(rot)), Four(Float(r), Float(g), Float(b), Float(a))]
    -> Type::Void => {
        // (x, y), (w, h), (r, g, b, a)
        l_gfx_rect_internal(x, y, w, h, rot, r, g, b, a);
        Ok(Nil)
    },
);

#[rustfmt::skip]
fn l_gfx_sprite_internal(sprite: &i64, x: &f64, y: &f64, w: &f64, h: &f64, gx: &i64, gy: &i64, rot: &f64, r: &f64, g: &f64, b: &f64, a: &f64) -> Value {
    let sprite = GAME.with(|game| game.lock().unwrap().renderer.sprite_sheets[*sprite as usize].grid(*gx as usize, *gy as usize));
    let mut sprite = Sprite::new(sprite);
    sprite.at(*x as f32, *y as f32).scale(*w as f32, *h as f32);
    sprite.angle(*rot as f32);
    sprite.rgba(*r as f32, *g as f32, *b as f32, *a as f32);
    GAME.with(|game| game.lock().unwrap().renderer.push(sprite));
    Value::Nil
}

sylt_macro::extern_function!(
    "sylt_std::lingon"
    l_gfx_sprite
    "Draws a sprite on the screen, in many different ways.
     Note that the first argument is a sprite id from l_load_image"
    [Two(String(name), Int(sprite)), Two(Int(gx), Int(gy)), One(Float(x)), One(Float(y)), One(Float(w)), One(Float(h))] -> Type::Void => {
        // id, (gx, gy), (x), (y), (w), (h)
        if name.as_ref() != "image" {
            return error!("l_gfx_sprite", "Expected a sprite ID");
        }
        Ok(l_gfx_sprite_internal(sprite, x, y, w, h, gx, gy, &0.0, &1.0, &1.0, &1.0, &1.0))
    },
    [Two(String(name), Int(sprite)), Two(Int(gx), Int(gy)), Two(Float(x), Float(y)), Two(Float(w), Float(h))] -> Type::Void => {
        // id, (gx, gy), (x, y), (w, h)
        if name.as_ref() != "image" {
            return error!("l_gfx_sprite", "Expected a sprite ID");
        }
        Ok(l_gfx_sprite_internal(sprite, x, y, w, h, gx, gy, &0.0, &1.0, &1.0, &1.0, &1.0))
    },
    [Two(String(name),


.7 32 64 32l320 0zM320 256c0 6.7-2.8 13-7.7 17.6l-112 104c-7 6.5-17.2 8.2-25.9 4.4s-14.4-12.5-14.4-22l0-208c0-9.5 5.7-18.2 14.4-22s18.9-2.1 25.9 4.4l112 104c4.9 4.5 7.7 10.9 7.7 17.6z"],
    "square-minus": [448, 512, [61767, "minus-square"], "f146", "M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM152 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"],
    "compass": [512, 512, [129517], "f14e", "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],
    "square-caret-down": [448, 512, ["caret-square-down"], "f150", "M384 432c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0zm64-16c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"],
    "face-kiss-beam": [512, 512, [128537, "kiss-beam"], "f597", "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm304.7 41.7c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4c-2.7 1.5-5.


x3C, 0x80, 0x80, 0x5E # 803b8a30
.byte 0x38, 0x84, 0xFE, 0x68 # 803b8a34
.byte 0x90, 0x83, 0x00, 0x00 # 803b8a38
.byte 0x4E, 0x80, 0x00, 0x20 # 803b8a3c
__ct__Q229?2unnamed?2SaveDataHandler_cpp?237SaveDataHandlerSaveProcessingGameDataFv:
.byte 0x3C, 0x80, 0x80, 0x5E # 803b8a40
.byte 0x38, 0x84, 0xFE, 0x58 # 803b8a44
.byte 0x90, 0x83, 0x00, 0x00 # 803b8a48
.byte 0x4E, 0x80, 0x00, 0x20 # 803b8a4c
__ct__Q229?2unnamed?2SaveDataHandler_cpp?235SaveDataHandlerSaveProcessingBannerFv:
.byte 0x3C, 0x80, 0x80, 0x5E # 803b8a50
.byte 0x38, 0x84, 0xFE, 0x48 # 803b8a54
.byte 0x90, 0x83, 0x00, 0x00 # 803b8a58
.byte 0x4E, 0x80, 0x00, 0x20 # 803b8a5c
__ct__Q229?2unnamed?2SaveDataHandler_cpp?237SaveDataHandlerRemoveProcessingBannerFv:
.byte 0x3C, 0x80, 0x80, 0x5E # 803b8a60
.byte 0x38, 0x84, 0xFE, 0x38 # 803b8a64
.byte 0x90, 0x83, 0x00, 0x00 # 803b8a68
.byte 0x4E, 0x80, 0x00, 0x20 # 803b8a6c
__ct__Q229?2unnamed?2SaveDataHandler_cpp?239SaveDataHandlerRemoveProcessingGameDataFv:
.byte 0x3C, 0x80, 0x80, 0x5E # 803b8a70
.byte 0x38, 0x84, 0xFE, 0x28 # 803b8a74
.byte 0x90, 0x83, 0x00, 0x00 # 803b8a78
.byte 0x4E, 0x80, 0x00, 0x20 # 803b8a7c
execute__Q229?2unnamed?2SaveDataHandler_cpp?239SaveDataHandlerRemoveProcessingGameDataCFP5Spine:
.byte 0x94, 0x21, 0xFF, 0xE0 # 803b8a80
.byte 0x7C, 0x08, 0x02, 0xA6 # 803b8a84
.byte 0x90, 0x01, 0x00, 0x24 # 803b8a88
.byte 0x38, 0x00, 0x00, 0x00 # 803b8a8c
.byte 0x38, 0xA1, 0x00, 0x08 # 803b8a90
.byte 0x93, 0xE1, 0x00, 0x1C # 803b8a94
.byte 0x83, 0xE4, 0x00, 0x00 # 803b8a98
.byte 0x3C, 0x80, 0x80, 0x54 # 803b8a9c
.byte 0x38, 0x84, 0xD8, 0x90 # 803b8aa0
.byte 0x98, 0x01, 0x00, 0x08 # 803b8aa4
.byte 0x7F, 0xE3, 0xFB, 0x78 # 803b8aa8
.byte 0x4B, 0xFF, 0xFD,


tp(3, 0, 1e)
	ta	T_CHANGE_HPRIV
	.word 0xb2b5e1d0  ! 4989: ORNcc_I	orncc 	%r23, 0x01d0, %r25
iob_intr_3_419:
!$EV trig_pc_d(3,expr(@VA(.MAIN.iob_intr_3_419), 16, 16)) -> intp(3, 0, 17)
iob_intr_3_420:
!$EV trig_pc_d(3,expr(@VA(.MAIN.iob_intr_3_420), 16, 16)) -> intp(3, 0, 33)
iob_intr_3_421:
!$EV trig_pc_d(3,expr(@VA(.MAIN.iob_intr_3_421), 16, 16)) -> intp(3, 0, 22)
	.word 0xf0a4c020  ! 4998: STWA_R	stwa	%r24, [%r19 + %r0] 0x01
	setx	join_lbl_0_0, %g1, %g2
	jmp	%g2
	nop
fork_lbl_0_2:
	setx	data_start_0, %g1, %r16
	setx	data_start_1, %g1, %r17
	setx	data_start_2, %g1, %r18
	setx	data_start_3, %g1, %r19
	setx	data_start_4, %g1, %r20
	setx	data_start_5, %g1, %r21
	setx	data_start_6, %g1, %r22
	setx	data_start_7, %g1, %r23
	setx	data_start_4, %g1, %r17
	ta	T_CHANGE_HPRIV
	mov	0x38, %g1
	stxa	%r17, [%g1] 0x58
	.word 0x81982f02  ! 4: WRHPR_HPSTATE_I	wrhpr	%r0, 0x0f02, %hpstate
cpu_intr_2_0:
	setx	0x19031b, %g1, %o0
	ta	T_SEND_THRD_INTR
T2_asi_reg_rd_0:
	mov	0x3c5, %r14
	.word 0xf4db8e60  ! 10: LDXA_R	ldxa	[%r14, %r0] 0x73, %r26
cpu_intr_2_1:
	setx	0x1e0317, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xbc8d8000  ! 12: ANDcc_R	andcc 	%r22, %r0, %r30
	ta	T_CHANGE_HPRIV
T2_asi_reg_wr_0:
	mov	0x2e, %r14
	.word 0xfaf384a0  ! 14: STXA_R	stxa	%r29, [%r14 + %r0] 0x25
T2_asi_reg_wr_1:
	mov	0x17, %r14
	.word 0xf4f38e40  ! 15: STXA_R	stxa	%r26, [%r14 + %r0] 0x72
	.word 0xf694603c  ! 17: LDUHA_I	lduha	[%r17, + 0x003c] %asi, %r27
T2_asi_reg_rd_1:
	mov	0x29, %r14
	.word 0xf4db89e0  ! 18: LDXA_R	ldxa	[%r14, %r0] 0x4f, %r26
	.word 0xf20d61d6  ! 20: LDUB_I	ldub	[%r21 + 0x01d6], %r25
	.word 0xfc14c000


典是否键和值的类型都相同。

***

### 返回值

类型相同返回 `true`，否则返回 `false`。

# `bool is_same_typed_key(dictionary: Dictionary) const`

### 参数

* `dictionary`：另一个字典。

***

### 方法说明

判断当前字典与传入字典的键的类型是否相同。

***

### 返回值

键类型相同返回 `true`，否则返回 `false`。

# `bool is_same_typed_value(dictionary: Dictionary) const`

### 参数

* `dictionary`：另一个字典。

***

### 方法说明

判断当前字典与传入字典的值的类型是否相同。

***

### 返回值

值类型相同返回 `true`，否则返回 `false`。

***

# `bool is_typed() const`

### 方法说明

判断该字典是否为类型化字典（键和值类型受限制）。

***

### 返回值

是类型化字典返回 `true`，否则 `false`。

***

# `bool is_typed_key() const`

### 方法说明

判断该字典的键是否有类型限制。

***

### 返回值

键有类型限制返回 `true`，否则 `false`。

***

# `bool is_typed_value() const`

### 方法说明

判断该字典的值是否有类型限制。

***

### 返回值

值有类型限制返回 `true`，否则 `false`。

# `Array keys() const`

### 方法说明

返回该字典中所有键的 `Array`。

***

### 返回值

包含所有键的 `Array`。

# `void make_read_only()`

### 方法说明

将该字典设置为只读，禁止进一步修改。注意，对嵌套内容（如嵌套字典）无效。

# `void merge(dictionary: Dictionary, overwrite: bool = false)`

### 参数

* `dictionary`：要合并进当前字典的另一个字典。

* `overwrite`（可选）：是否覆盖已有键（默认为 false）。

***

### 方法说明

将另一个字典的内容合并到当前字典中。默认不会覆盖重复键，除非 `overwrite`为 `true`。该方法不进行递归合并。

***

### 示例

# `Dictionary merged(dictionary: Dictionary, overwrite: bool = false) const`

### 参数

* `dictionary`：用于合并的新字典。

* `overwrite`（可选）：是否在遇到重复键时覆盖（默认为 `false`）。

***

### 方法说明

返回一个新的字典，包含当前字典与传入字典合并后的内容。与 `merge()` 不同，**该方法不修改原始字典，而是返回合并结果的新副本。**

***

### 返回值

合并后的 `Dictionary`副本。

***

### 示例

# `bool recursive_equal(dictionary: Dictionary, recursion_count: int) const`

### 参数

* `dictionary`：要进行比较的另一个字典。

* `recursion_count`：最大递归深度。

***

### 方法说明

判断两个字典是否结构与内容都一致，包括内部嵌套的 `Dictionary`和 `Array`，会进行递归比较。

***

### 返回值

若所有键值都相等则返回 `true`，否则返回 `false`。

# `bool set(key: Variant, value: Varia


-dragger{display:none}.calendar.month .calendar-container{border-top:1px solid #e6e6e6;padding-top:0;height:calc(100% - 169px)}.calendar.month .calendar-container .view .tble{width:100%}.calendar.month .calendar-container .view .tble .thead .tcell .weekday{margin-left:10px}.calendar .calendar-header{height:43px;background-color:#fafafa;line-height:43px;padding-left:60px}.calendar .calendar-header>.drager{width:calc(100% - 141px);border-right:1px solid rgba(0,0,0,.33);line-height:35px}.calendar .calendar-header .years{width:auto;list-style:none;white-space:nowrap;margin-top:5px}.calendar .calendar-header .years .year{display:inline-block;width:69px;text-align:center;white-space:nowrap;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.calendar .calendar-header .years .year>a{color:rgba(0,0,0,.5);position:relative}.calendar .calendar-header .years .year>a.active{color:#000}.calendar .calendar-header .years .year>a.has-event:before{position:absolute;content:'\25CF';width:100%;font-size:8px;line-height:6px;text-align:center;color:rgba(0,0,0,.44)}.calendar .options{padding-left:60px;margin-top:15px}.calendar .options .months{width:auto;white-space:nowrap;height:43px;line-height:43px}.calendar .options .months .month{min-width:30px;max-width:100px;padding:0 10px;display:inline-block}.calendar .options .months .month>a{position:relative;color:rgba(0,0,0,.28)}.calendar .options .months .month>a:hover{color:rgba(0,0,0,.33)}.calendar .options .months .month>a.active{color:#000}.calendar .options .months .month>a.has-event:before{position:absolute;content:'\25CF';top:-6px;width:100%;font-size:8px;line-height:6px;text-align:center;color:rgba(0,0,0,.33)}.calendar .options .date{margin-bottom:20px}.calendar .week-dragger{border-bottom:1px solid #e6e6e6;margin-left:-20px}.calendar .weeks-wrapper{width:auto;white-space:nowrap;padding-left:10px;padding-bottom:12px;margin-bottom:5px;margin-left:20px}.calendar .weeks-wrapper .week{display:inline-block;position:relative;padding-left:30px;padding-right:30px}.calendar .weeks-wrapper .week:first-child{padding-left:4px}.calendar .weeks-wrapper .week:last-child{padding-left:0}.calendar .weeks-wrapper .week:before{content:'';position:absolute;right:-20px;bottom:6px;height:20px;width:20px;border-left:1px dotted rgba(0,0,0,.3)}.calendar .weeks-wrapper .week.active .day-wrapper .week-date .day>a{color:rgba(0,0,0,.6)}.calendar .weeks-wrapper .week .day-wrapper{display:inline-block}.calendar .weeks-wrapper .week .day-wrapper .week-date{text-align:center;width:21px;height:21px;margin:6px;border-radius:99px;-webkit-border-radius:99px;-moz-border-radius:99px}.calendar .weeks-wrapper .week .day-wrapper .week-date.current-date{background-color:#e6e6e6}.calendar .weeks-wrapper .week .day-wrapper .week-date.active{background-color:#10cfbd}.calendar .weeks-wrapper .w


              if(anIsNodeNum)
                for(TInt iConn = 0; iConn < aNbConn; iConn++)
                  aNodeIds[iConn] = aNodeInfo->GetElemNum(aConnSlice[iConn] - 1);
              else
                for(TInt iConn = 0; iConn < aNbConn; iConn++)
                  aNodeIds[iConn] = aConnSlice[iConn];
#else
              for(TInt iConn = 0; iConn < aNbConn; iConn++)
                aNodeIds[iConn] = aConnSlice[iConn];
#endif
              bool isRenum = false;
              SMDS_MeshElement* anElement = NULL;
              TInt aFamNum = aPolygoneInfo->GetFamNum(iElem);
#ifndef _DEXCEPT_
              try {
#endif
                if ( anIsElemNum ) {
                  TInt anElemId = aPolygoneInfo->GetElemNum( iElem );
                  anElement = (myMesh->*addPolyWithID)( aNodeIds, anElemId );
                }
                if ( !anElement ) {
                  aNodes.resize( aNbConn );
                  for ( TInt iConn = 0; iConn < aNbConn; iConn++ )
                    aNodes[iConn] = FindNode( myMesh, aNodeIds[iConn] );
                  anElement = (myMesh->*addPolygon)( aNodes );
                  isRenum = anIsElemNum;
                }
#ifndef _DEXCEPT_
              } catch(const std::exception& exc) {
                aResult = addMessage( exc.what(), /*isFatal=*/true );
              } catch (...) {
                aResult = addMessage( "Unknown exception", /*isFatal=*/true );
              }
#endif
              if ( !anElement ) {
                aResult = DRS_WARN_SKIP_ELEM;
              }
              else {
                if ( isRenum ) {
                  anIsElemNum = eFAUX;
                  takeNumbers = false;
                  if(aResult < DRS_WARN_RENUMBER)
                    aResult = DRS_WARN_RENUMBER;
                }
                if ( DriverMED::checkFamilyID ( aFamily, aFamNum, myFamilies ))
                {
                  // Save reference to this element from its family
                  aFamily->AddElement(anElement);
                  aFamily->SetType(anElement->GetType());
                }
              }
            }
            break;
          }
          case ePOLYEDRE: {
            PPolyedreInfo aPolyedreInfo = aMed->GetPPolyedreInfo(aMeshInfo,anEntity,aGeom);
            EBooleen anIsElemNum = takeNumbers ? aPolyedreInfo->IsElemNum() : eFAUX;

            TInt aNbElem = aPolyedreInfo->GetNbElem();
            for(TInt iElem = 0; iElem < aNbElem; iElem++){
              MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(iElem);
              TInt aNbFaces = aConnSliceArr.size();
              typedef MED::TVector<int> TQuantities;
              TQuantities aQuantities(aNbFaces);
              TInt aNbNodes = aPolyedreInfo->GetNbNodes(iElem);
              TNodeIds aNodeIds(aNbNodes);
              for(TInt iFace = 0, iNode = 0; iFace < aNbFaces; iFace++){
                MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
                TInt aNbConn = aConnSlice.size();
                aQuantities[iFace] = aNbConn;
#ifdef _EDF_NODE_IDS_
                if(anIsNodeNum)
                  for(TInt iConn = 0; iConn < aNbConn; iConn++)
                  {
                    aNodeIds[iNode] = aNodeInfo->GetElemNum(aConnSlice[iConn] - 1);
                    iNode++;
                  }
                else
                  for(TInt iConn = 0; iConn < a


 -> ARTIST.imageVector to ARTIST.description

        NavBarSection.ALBUMS -> ALBUM.imageVector to ALBUM.description

        NavBarSection.GENRES -> GENRES.imageVector to GENRES.description

        NavBarSection.PLAYLISTS -> PLAYLIST.imageVector to PLAYLIST.description

        else -> MUSIC.imageVector to MUSIC.description
    }
}

fun getRightIconAndDescription(media: MediaImpl): SatunesIcons {
    return when (media) {
        is Folder -> FOLDER
        is Artist -> ARTIST
        is Album -> ALBUM
        is Genre -> GENRES
        is Playlist -> PLAYLIST
        else -> MUSIC // In that case, mediaImpl is Music
    }
}

/**
 * Return the root folder name: 0 -> This device, else -> External Storage: name
 */
@Composable
fun getRootFolderName(title: String): String {
    return when (title) {
        "0" -> stringResource(id = R.string.this_device)

        else -> "${stringResource(id = R.string.external_storage)}: $title"
    }
}/*
 * This file is part of Satunes.
 *
 * Satunes is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 * Satunes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with Satunes.
 * If not, see <https://www.gnu.org/licenses/>.
 *
 * *** INFORMATION ABOUT THE AUTHOR *****
 * The author of this file is Antoine Pirlot, the owner of this project.
 * You find this original project on Codeberg.
 *
 * My Codeberg link is: https://codeberg.org/antoinepirlot
 * This current project's link is: https://codeberg.org/antoinepirlot/Satunes
 */

package io.github.antoinepirlot.satunes.ui.components.settings

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import io.github.antoinepirlot.jetpack_libs.components.texts.NormalText
import io.github.antoinepirlot.jetpack_libs.components.texts.Title

/**
 * @author Antoine Pirlot on 27/05/2024
 */

@Composable
internal fun SubSettings(
    modifier: Modifier = Modifier,
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    verticalArrangement: Arrangement.Vertical = Arrangement.Top,
    title: String? = null,
    content: @Composable () -> Unit,
) {
    Column(
        modifier = modifier,
        horizontalAlignment = horizontalAlignment,
        verticalArrangement = verticalArrangement,
    ) {
        if (!title.isNullOrBlank()) {
            Title(text = title, fontSize = 25.sp)
        }
        content()
    }
    Spacer(modifier = Modifier.size(16.dp))
}

@Preview
@Composable
private fun SubSettingPreview() {
    SubSettings(title = "Sub Setting") {
        NormalText(text = "Content")
    }
}/*
 * This file is part of Satunes.
 *
 * Satunes


S3_S3_($this,$__lo1,$__hi1,$__lo2,$__hi2) {
 $this = $this|0;
 $__lo1 = $__lo1|0;
 $__hi1 = $__hi1|0;
 $__lo2 = $__lo2|0;
 $__hi2 = $__hi2|0;
 var $$0 = 0, $$015 = 0, $$02$lcssa = 0, $$024 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
 sp = STACKTOP;
 $0 = ($__lo2|0)==($__hi2|0);
 L1: do {
  if ($0) {
   $$02$lcssa = $__lo1;
   label = 6;
  } else {
   $$015 = $__lo2;$$024 = $__lo1;
   while(1) {
    $1 = ($$024|0)==($__hi1|0);
    if ($1) {
     $$0 = -1;
     break L1;
    }
    $2 = HEAP8[$$024>>0]|0;
    $3 = HEAP8[$$015>>0]|0;
    $4 = ($2<<24>>24)<($3<<24>>24);
    if ($4) {
     $$0 = -1;
     break L1;
    }
    $5 = ($3<<24>>24)<($2<<24>>24);
    if ($5) {
     $$0 = 1;
     break L1;
    }
    $6 = (($$024) + 1|0);
    $7 = (($$015) + 1|0);
    $8 = ($7|0)==($__hi2|0);
    if ($8) {
     $$02$lcssa = $6;
     label = 6;
     break;
    } else {
     $$015 = $7;$$024 = $6;
    }
   }
  }
 } while(0);
 if ((label|0) == 6) {
  $9 = ($$02$lcssa|0)!=($__hi1|0);
  $10 = $9&1;
  $$0 = $10;
 }
 STACKTOP = sp;return ($$0|0);
}
function __ZNKSt3__17collateIcE12do_transformEPKcS3_($agg$result,$this,$__lo,$__hi) {
 $agg$result = $agg$result|0;
 $this = $this|0;
 $__lo = $__lo|0;
 $__hi = $__hi|0;
 var label = 0, sp = 0;
 sp = STACKTOP;
 __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initIPKcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueEvE4typeESA_SA_($agg$result,$__lo,$__hi);
 STACKTOP = sp;return;
}
function __ZNKSt3__17collateIcE7do_hashEPKcS3_($this,$__lo,$__hi) {
 $this = $this|0;
 $__lo = $__lo|0;
 $__hi = $__hi|0;
 var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $__h$0$lcssa = 0, $__h$02 = 0, $__p$01 = 0, label = 0, sp = 0;
 sp = STACKTOP;
 $0 = ($__lo|0)==($__hi|0);
 if ($0) {
  $__h


<TResult extends Object?>(TResult Function( _Reaction value)  $default,){
final _that = this;
switch (_that) {
case _Reaction():
return $default(_that);case _:
  throw StateError('Unexpected subclass');

}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case final Subclass value:
///     return ...;
///   case _:
///     return null;
/// }
/// ```

@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Reaction value)?  $default,){
final _that = this;
switch (_that) {
case _Reaction() when $default != null:
return $default(_that);case _:
  return null;

}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case Subclass(:final field):
///     return ...;
///   case _:
///     return orElse();
/// }
/// ```

@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@ReactionIdConverter()  ReactionId id, @MessageIdConverter()  MessageId messageId, @ContactIdConverter()  ContactId authorId,  ReactionKind kind,  String? customText,  DateTime createdAt,  DateTime? removedAt)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Reaction() when $default != null:
return $default(_that.id,_that.messageId,_that.authorId,_that.kind,_that.customText,_that.createdAt,_that.removedAt);case _:
  return orElse();

}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case Subclass(:final field):
///     return ...;
///   case Subclass2(:final field2):
///     return ...;
/// }
/// ```

@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@ReactionIdConverter()  ReactionId id, @MessageIdConverter()  MessageId messageId, @ContactIdConverter()  ContactId authorId,  ReactionKind kind,  String? customText,  DateTime createdAt,  DateTime? removedAt)  $default,) {final _that = this;
switch (_that) {
case _Reaction():
return $default(_that.id,_that.messageId,_that.authorId,_that.kind,_that.customText,_that.createdAt,_that.removedAt);case _:
  throw StateError('Unexpected subclass');

}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case Subclass(:final field):
///     return ...;
///   case _:
///     return null;
/// }
/// ```

@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@ReactionIdConverter()  ReactionId id, @MessageIdConverter()  MessageId messageId, @ContactIdConverter()  ContactId authorId,  ReactionKind kind,  String? customText,  DateTime createdAt,  DateTime? removedAt)?  $default,) {final _that = this;
switch (_that) {
case _Reaction() when $default != null:
return $default(_that.id,_that.messageId,_that.authorId,_that.kind,_that.customText,_that.createdAt,_that.removedAt);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _Reaction extends Reaction {
  const _Reaction({@ReactionIdConverter() required this.id, @MessageIdConverter() required this.message


-- Copyright 2012 by Malte Skambath
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information

--

local key           = require 'pgf.gd.doc'.key
local documentation = require 'pgf.gd.doc'.documentation
local summary       = require 'pgf.gd.doc'.summary
local example       = require 'pgf.gd.doc'.example

--------------------------------------------------------------------
key          "animated tree layout"

summary      "This layout uses the Reingold--Tilform method for drawing trees."

documentation
[[
A method to create layouts for evolving graphs as an SVG animation.The Reingold--Tilford method is a standard method for drawing
trees. It is described in:

The algorithm, which is based on the Reingold--Tilford algorithm and
its implementation in |graphdrawing.trees|, is introduced in my Masthesis:
%
\begin{itemize}
  \item
    M.\ Skambath,
    \newblock Algorithmic Drawing of Evolving Trees, Masterthesis, 2016
\end{itemize}

You can use the same known graph macros as for other graph drawing
algorithms in Ti\emph{k}Z. In addition all keys and features that
are available for the static tree algorithm can be used:
%
\begin{codeexample}[animation list={1,1.5,2,2.5,3,3.5,4}]
  \tikz \graph[animated binary tree layout,
          nodes={draw,circle}, auto supernode,
        ] {
            {[when=1] 15 -> {10 -> { ,11}, 20       }},
            {[when=2] 15 -> {10 -> {3,11}, 20       }},
            {[when=3] 15 -> {10 -> {3,  },


 by a
// BSD-style license that can be found in the LICENSE file.

import "dart:_internal"
    show patch, has63BitSmis, UnmodifiableListMixin, FixedLengthListMixin;
import 'dart:async';
import 'dart:collection';
import 'dart:isolate';
import 'dart:typed_data';

const Map<Type, int> _knownSizes = {
  Int8: 1,
  Uint8: 1,
  Int16: 2,
  Uint16: 2,
  Int32: 4,
  Uint32: 4,
  Int64: 8,
  Uint64: 8,
  Float: 4,
  Double: 8,
};

// Keep consistent with pkg/vm/lib/transformations/ffi/abi.dart.
@pragma("vm:prefer-inline")
@pragma("wasm:prefer-inline")
int get _intPtrSize => (const [
  4, // androidArm,
  8, // androidArm64,
  4, // androidIA32,
  8, // androidX64,
  8, // androidRiscv64,
  8, // fuchsiaArm64,
  8, // fuchsiaX64,
  8, // fuchsiaRiscv64,
  4, // iosArm,
  8, // iosArm64,
  8, // iosX64,
  4, // linuxArm,
  8, // linuxArm64,
  4, // linuxIA32,
  8, // linuxX64,
  4, // linuxRiscv32,
  8, // linuxRiscv64,
  8, // macosArm64,
  8, // macosX64,
  8, // windowsArm64,
  4, // windowsIA32,
  8, // windowsX64,
])[_abi()];

@pragma("vm:prefer-inline")
int get _smiMax {
  // See runtime/vm/globals.h for how smiMax is calculated.
  final smiBits = has63BitSmis ? 62 : 30;
  return (1 << smiBits) - 1;
}

@pragma("vm:prefer-inline")
void _checkExternalTypedDataLength(int length, int elementSize) {
  final maxElements = _smiMax ~/ elementSize;
  if (length < 0 || length > maxElements) {
    throw ArgumentError("length must be in the range [0, $maxElements].");
  }
}

@pragma("vm:prefer-inline")
void _checkPointerAlignment(int address, int elementSize) {
  if (address & (elementSize - 1) != 0) {
    throw ArgumentError(
      "Pointer address must be aligned to a multiple of "
      "the element size ($elementSize).",
    );
  }
}

@patch
int sizeOf<T extends SizedNativeType>() {
  // This case should have been rewritten in pre-processing.
  throw UnimplementedError("$T");
}

@pragma("vm:idempotent")
@pragma("vm:recognized", "other")
@pragma("vm:idempotent")
external Pointer<T> _fromAddress<T extends NativeType>(int ptr);

/// Argument for vm:ffi:call-closure pragma describing FFI call.
final class _FfiCall<NativeSignature> {
  // Implementation note: VM hardcodes the layout of this class (number and
  // order of its fields), so adding/removing/changing fields requires
  // updating the VM code (see Function::GetFfiCallClosurePragmaValue()).
  final bool isLeaf;
  const _FfiCall({this.isLeaf = false});
}

// Helper function to perform FFI call.
// Inserted by FFI kernel transformation into the FFI call closures.
// Implemented in BuildFfiCall
// in runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc.
@pragma("vm:recognized", "other")
external ReturnType _ffiCall<ReturnType>(Pointer<NativeFunction> target);

@pragma("vm:recognized", "other")
@pragma("vm:idempotent")
@pragma("vm:exact-result-type", "dart:typed_data#_ExternalInt8Array")
external Int8List _asExternalTypedDataInt8(Pointer<Int8> ptr, int length);

@pragma("vm:recognized", "other")
@pragma("vm:idempotent")
@pragma("vm:exact-result-type", "dart:typed_data#_ExternalInt16Array")
external Int16List _asExternalTypedData


2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm9-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0z"/>'),Fd=ll("CartCheck",'<path d="M11.354 6.354a.5.5 0 0 0-.708-.708L8 8.293 6.854 7.146a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"/><path d="M.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.408l1.5-8A.5.5 0 0 0 14.5 3H2.89l-.405-1.621A.5.5 0 0 0 2 1H.5zm3.915 10L3.102 4h10.796l-1.313 7h-8.17zM6 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm7 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>'),_d=ll("CartCheckFill",'<path d="M.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.408l1.5-8A.5.5 0 0 0 14.5 3H2.89l-.405-1.621A.5.5 0 0 0 2 1H.5zM6 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm7 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-1.646-7.646l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708z"/>'),Dd=ll("CartDash",'<path d="M6.5 7a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4z"/><path d="M.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.408l1.5-8A.5.5 0 0 0 14.5 3H2.89l-.405-1.621A.5.5 0 0 0 2 1H.5zm3.915 10L3.102 4h10.796l-1.313 7h-8.17zM6 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm7 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>'),Ed=ll("CartDashFill",'<path d="M.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.


ll   $t9, $s3, 2
.L8008254C:
/* AF96EC 8008254C 3C0E8016 */  lui   $t6, %hi(gGameInfo) # $t6, 0x8016
/* AF96F0 80082550 8DCEFA90 */  lw    $t6, %lo(gGameInfo)($t6)
/* AF96F4 80082554 10000019 */  b     .L800825BC
/* AF96F8 80082558 A5C60F28 */   sh    $a2, 0xf28($t6)
glabel L8008255C
/* AF96FC 8008255C 3C0F8016 */  lui   $t7, %hi(D_8015FFD0) # $t7, 0x8016
/* AF9700 80082560 8DEFFFD0 */  lw    $t7, %lo(D_8015FFD0)($t7)
/* AF9704 80082564 0002C840 */  sll   $t9, $v0, 1
/* AF9708 80082568 3C0A8016 */  lui   $t2, %hi(gGameInfo) # $t2, 0x8016
/* AF970C 8008256C 8DF80004 */  lw    $t8, 4($t7)
/* AF9710 80082570 8D4AFA90 */  lw    $t2, %lo(gGameInfo)($t2)
/* AF9714 80082574 3C038016 */  lui   $v1, %hi(gGameInfo) # $v1, 0x8016
/* AF9718 80082578 03194021 */  addu  $t0, $t8, $t9
/* AF971C 8008257C 8509FFDE */  lh    $t1, -0x22($t0)
/* AF9720 80082580 3C0B8016 */  lui   $t3, %hi(D_8015FFD0) # $t3, 0x8016
/* AF9724 80082584 A5490F50 */  sh    $t1, 0xf50($t2)
/* AF9728 80082588 8D6BFFD0 */  lw    $t3, %lo(D_8015FFD0)($t3)
/* AF972C 8008258C 8C63FA90 */  l


rne r2, [r1, #8]
	strne r1, [r0]
	bx lr
	arm_func_end sub_0208253C

	arm_func_start sub_02082550
sub_02082550: ; 0x02082550
	cmp r0, #0
	bxeq lr
	ldr r2, [r0]
	cmp r2, #0
	bne _02082574
	mov r2, #0
	str r2, [r1, #8]
	str r1, [r0]
	bx lr
_02082574:
	ldr r0, [r2, #8]
	cmp r0, #0
	beq _02082590
_02082580:
	mov r2, r0
	ldr r0, [r0, #8]
	cmp r0, #0
	bne _02082580
_02082590:
	str r0, [r1, #8]
	str r1, [r2, #8]
	bx lr
	arm_func_end sub_02082550

	arm_func_start sub_0208259C
sub_0208259C: ; 0x0208259C
	cmp r0, #0
	ldrne r2, [r0]
	movne r3, r2
	cmpne r2, #0
	bxeq lr
_020825B0:
	cmp r2, r1
	bne _020825D0
	cmp r2, r3
	ldreq r1, [r2, #8]
	streq r1, [r0]
	ldrne r0, [r2, #8]
	strne r0, [r3, #8]
	bx lr
_020825D0:
	mov r3, r2
	ldr r2, [r2, #8]
	cmp r2, #0
	bne _020825B0
	bx lr
	arm_func_end sub_0208259C

	arm_func_start sub_020825E4
sub_020825E4: ; 0x020825E4
	stmdb sp!, {r4, lr}
	movs r4, r0
	ldmeqia sp!, {r4, pc}
_020825F0:
	ldr r0, [r4, #4]
	ldr r1, [r4]
	blx r1
	ldr r4, [r4, #8]
	cmp r4, #0
	bne _020825F0
	ldmia sp!, {r4, pc}
	arm_func_end sub_020825E4

	arm_func_start sub_0208260C
sub_0208260C: ; 0x0208260C
	ldr ip, _0208261C ; =sub_0208253C
	mov r1, r0
	ldr r0, _02082620 ; =_022BB6B8
	bx ip
	.align 2, 0
_0208261C: .word sub_0208253C
_02082620: .word _022BB6B8
	arm_func_end sub_0208260C

	arm_func_start sub_02082624
sub_02082624: ; 0x02082624
	ldr ip, _02082634 ; =sub_02082550
	mov r1, r0
	ldr r0, _02082638 ; =_022BB6C4
	bx ip
	.align 2, 0
_02082634: .word sub_02082550
_02082638: .word _022BB6C4
	arm_func_end sub_02082624

	arm_func_start sub_0208263C
sub_0208263C: ; 0x0208263C
	ldr ip, _0208264C ; =sub_0208259C
	mov r1, r0
	ldr r0, _02082650 ; =_022BB6B8
	bx ip
	.align 2, 0
_0208264C:


GE_DESCRIPTION_ROAD_SUSPENSION_STEEL),

	MBR(1930, 3,      7, 224, 160, 0xA23, PAL_NONE,
	   STR_BRIDGE_NAME_CANTILEVER_STEEL,     STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL,    STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),

	MBR(1930, 3,      8, 232, 208, 0xA23, PALETTE_TO_STRUCT_BROWN,
	   STR_BRIDGE_NAME_CANTILEVER_STEEL,     STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL,    STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),

	MBR(1930, 3,      9, 248, 240, 0xA23, PALETTE_TO_STRUCT_RED,
	   STR_BRIDGE_NAME_CANTILEVER_STEEL,     STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL,    STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),

	MBR(1930, 0,      2, 240, 256, 0xA27, PAL_NONE,
	   STR_BRIDGE_NAME_GIRDER_STEEL,         STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL,        STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL),

	MBR(1995, 2, 0xFFFF, 255, 320, 0xA28, PAL_NONE,
	   STR_BRIDGE_NAME_TUBULAR_STEEL,        STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL,       STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL),

	MBR(2005, 2, 0xFFFF, 380, 512, 0xA28, PALETTE_TO_STRUCT_YELLOW,
	   STR_BRIDGE_NAME_TUBULAR_STEEL,        STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL,       STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL),

	MBR(2010, 2, 0xFFFF, 510, 608, 0xA28, PALETTE_TO_STRUCT_CONCRETE,
	   STR_BRIDGE_TUBULAR_SILICON,           STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL,       STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL)
};

#undef MBR
#undef MN
#undef MR
#undef MW
#undef MC


.asm.tree">AnnotationNode (implements org.deuce.objectweb.asm.AnnotationVisitor)

org.deuce.objectweb.asm.tree.InnerClassNode
org.deuce.objectweb.asm.tree.InsnList
org.deuce.objectweb.asm.tree.LocalVariableNode
org.deuce.objectweb.asm.tree.MemberNode

org.deuce.objectweb.asm.tree.ClassNode (implements org.deuce.objectweb.asm.ClassVisitor)

org.deuce.objectweb.asm.tree.FieldNode (implements org.deuce.objectweb.asm.FieldVisitor)

org.deuce.objectweb.asm.tree.MethodNode (implements org.deuce.objectweb.asm.MethodVisitor)

org.deuce.objectweb.asm.tree.TryCatchBlockNode

      Overview