: CameraImageCaptured {
      val decoder = MavDataDecoder(bytes)

      val timeUtc = decoder.safeDecodeUInt64()
      val timeBootMs = decoder.safeDecodeUInt32()
      val lat = decoder.safeDecodeInt32()
      val lon = decoder.safeDecodeInt32()
      val alt = decoder.safeDecodeInt32()
      val relativeAlt = decoder.safeDecodeInt32()
      val q = decoder.safeDecodeFloatArray(16)
      val imageIndex = decoder.safeDecodeInt32()
      val cameraId = decoder.safeDecodeUInt8()
      val captureResult = decoder.safeDecodeInt8()
      val fileUrl = decoder.safeDecodeString(205)

      return CameraImageCaptured(
        timeBootMs = timeBootMs,
        timeUtc = timeUtc,
        cameraId = cameraId,
        lat = lat,
        lon = lon,
        alt = alt,
        relativeAlt = relativeAlt,
        q = q,
        imageIndex = imageIndex,
        captureResult = captureResult,
        fileUrl = fileUrl,
      )
    }

    public operator fun invoke(builderAction: Builder.() -> Unit): CameraImageCaptured =
        Builder().apply(builderAction).build()
  }

  public class Builder {
    public var timeBootMs: UInt = 0u

    public var timeUtc: ULong = 0uL

    public var cameraId: UByte = 0u

    public var lat: Int = 0

    public var lon: Int = 0

    public var alt: Int = 0

    public var relativeAlt: Int = 0

    public var q: List<Float> = emptyList()

    public var imageIndex: Int = 0

    public var captureResult: Byte = 0

    public var fileUrl: String = ""

    public fun build(): CameraImageCaptured = CameraImageCaptured(
      timeBootMs = timeBootMs,
      timeUtc = timeUtc,
      cameraId = cameraId,
      lat = lat,
      lon = lon,
      alt = alt,
      relativeAlt = relativeAlt,
      q = q,
      imageIndex = imageIndex,
      captureResult = captureResult,
      fileUrl = fileUrl,
    )
  }
}
package com.divpundir.mavlink.definitions.common

import com.divpundir.mavlink.api.GeneratedMavEnum
import com.divpundir.mavlink.api.GeneratedMavEnumEntry
import com.divpundir.mavlink.api.MavBitmask
import kotlin.UInt
import kotlin.collections.List

/**
 * Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that
 * FAULTS are conditions that cause the generator to fail. Warnings are conditions that require
 * attention before the next use (they indicate the system is not operating properly).
 */
@GeneratedMavEnum(bitmask = true)
public enum class MavGeneratorStatusFlag(
  override val `value`: UInt,
) : MavBitmask {
  /**
   * Generator is off.
   */
  @GeneratedMavEnumEntry
  OFF(1u),
  /**
   * Generator is ready to start generating power.
   */
  @GeneratedMavEnumEntry
  READY(2u),
  /**
   * Generator is generating power.
   */
  @GeneratedMavEnumEntry
  GENERATING(4u),
  /**
   * Generator is charging the batteries (generating enough power to charge and provide the load).
   */
  @GeneratedMavEnumEntry
  CHARGING(8u),
  /**
   * Generator is operating at a reduced maximum power.
   */
  @GeneratedMavEnumEntry
  REDUCED_POWER(16u),
  /**
   * Generator is providing the maximum output.
   */
  @GeneratedMavEnumEntry
  MAXPOWER(32u),
  /**
   * Generator is


move.l	WORKECR,a0
	add	d4,a0
	movem.l	CLR,d0/a1-a6/d3-d7

	move.w	CX1,d6			;x debut
 	move.w 	CX2,d7			;x fin
	move.w	CY1,d3			;y debut
	move.w	CY2,d4			;y fin
;verifie si x1=x2 ou y1=y2
	cmp.w	d3,d4
	beq	HORIZ_LINE
	cmp.w	d6,d7
	beq	VERT_LINE
;verifie les distances: si dx>dy ou dy>dx
	sub.w	d3,d4
	bpl.s	NO_SUB1
	neg	d4
NO_SUB1
	sub.w	d6,d7
	bpl.s	NO_SUB2
	neg	d7
NO_SUB2
	cmp.w	d7,d4
	bhi	LIGNEY
***********************CAS DX>DY************************************************
LIGNEX
	clr.b	IND
	move.w	CX1,d6			;x debut
 	move.w 	CX2,d7			;x fin
	move.w	CY1,d3			;y debut
	move.w	CY2,d4			;y fin
	move.w	d3,d0
;verifie si xb>xa ou yb>ya
	cmp.w	d6,d7
	bhi.s	NO_SWAPX
	exg	d6,d7
	move.w	d6,CX1
	exg	d3,d4
	move.w	d3,d0
NO_SWAPX
	cmp.w	d3,d4
	bhi.s	NO_SWAPY
	exg	d3,d4
	move.b	#1,IND			;indicateur pour type de pente
NO_SWAPY
;calcul de pente
	lsl	#8,d3			;multiplie par 512
	lsl.l	#1,d3			;pour enlever le reste
	lsl	#8,d4			;de la division
	lsl.l	#1,d4
	sub.w	d6,d7
	sub.l	d3,d4
	divu	d7,d4
	andi.l	#$ffff,d4		;multiplie par 128(512*128=65536)
	lsl.l	#7,d4		;valeur de pente en d4
	cmpi.l	#$10000,d4		;au cas ou dx=dy
	bne.s	NO_PRB
	subq.l	#1,d4
NO_PRB
;calcul de la position du point x de depart
	move.w	CX1,d6
	move.w	d6,d5
	andi.l	#$fff0,d6
	andi.w	#$f,d5
	lea	FORME,a1
	move.w	(a1,d5.w*2),d2
;calcul de la position du point x+y de depart
	lea	Y_TABLE,a1
	add.l	(a1,d0.w*4),d6
	add.l	d6,a0
 	moveq.w 	#0,d1			;Compteur de pente
	MOVE	#$3111,D5
	MOVEC	D5,CACR
	cmpi.b	#1,IND
	beq.s	LINE_XB
**********TRACE LIGNE/XA*******
LINE_XA
 	or.w 	d2,(a0)			;Affiche point
 	ror.w 	d2			;Point suivant
	bcc.s 	NO_INCA			;si 16 pix passe a word suivant


\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407782","tags":"App Other"},
{"title":"defichain-app","text":"# DEFICHAIN-APP\n \n DefiChain Wallet AppImage\n \n SITE: https://defichain.com/explore/wallets\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407590","tags":"App Finance"},
{"title":"delta","text":"# DELTA\n\n A syntax-highlighting pager for git, diff, grep, and blame output\n\n SITE: https://github.com/dandavison/delta\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407783","tags":"App Other"},
{"title":"deltachat-desktop","text":"# DELTACHAT-DESKTOP\n \n Desktop Application for delta.chat\n \n SITE: https://github.com/deltachat/deltachat-desktop\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407679","tags":"App Communication Internet"},
{"title":"demonizer","text":"# DEMONIZER\n \n Demonic corruption fantasy shmup\n \n SITE: https://github.com/IoriBranford/demonizer\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407783","tags":"App Other"},
{"title":"densify","text":"# DENSIFY\n\n A GTK+ GUI Application written in Python that simplifies compressing PDF files with Ghostscript.\n\n SITE: https://github.com/hkdb/Densify\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407692","tags":"App Office"},
{"title":"deployer","text":"# DEPLOYER\n\n Cross-platform application to deploy your applications through Jenkins.\n \n SITE: https://github.com/ziishaned/deployer\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407783","tags":"App Other"},
{"title":"deskreen","text":"# DESKREEN\n\n Turns any device with a web browser into a secondary screen for \n your computer.\n\n SITE: https://deskreen.com/\n\n | [Applications](https://portable-linux-apps.github.io/apps.html) | [Home](https://portable-linux-apps.github.io)\n | --- | --- |\n","type":"text/x-markdown","modified":"20250925104407746","tags":"App Internet Web-App Web-Browser"},
{"title":"deskthing","text":"# DESKTHING\n\n Desk Thing: The Discord Thing, Trello Thing, The Weathe


pcStatus(o[1]);
}

core.int buildCounterGoogleCloudAiplatformV1BatchPredictionJob = 0;
api.GoogleCloudAiplatformV1BatchPredictionJob
buildGoogleCloudAiplatformV1BatchPredictionJob() {
  final o = api.GoogleCloudAiplatformV1BatchPredictionJob();
  buildCounterGoogleCloudAiplatformV1BatchPredictionJob++;
  if (buildCounterGoogleCloudAiplatformV1BatchPredictionJob < 3) {
    o.completionStats = buildGoogleCloudAiplatformV1CompletionStats();
    o.createTime = 'foo';
    o.dedicatedResources =
        buildGoogleCloudAiplatformV1BatchDedicatedResources();
    o.disableContainerLogging = true;
    o.displayName = 'foo';
    o.encryptionSpec = buildGoogleCloudAiplatformV1EncryptionSpec();
    o.endTime = 'foo';
    o.error = buildGoogleRpcStatus();
    o.explanationSpec = buildGoogleCloudAiplatformV1ExplanationSpec();
    o.generateExplanation = true;
    o.inputConfig = buildGoogleCloudAiplatformV1BatchPredictionJobInputConfig();
    o.instanceConfig =
        buildGoogleCloudAiplatformV1BatchPredictionJobInstanceConfig();
    o.labels = buildUnnamed22();
    o.manualBatchTuningParameters =
        buildGoogleCloudAiplatformV1ManualBatchTuningParameters();
    o.model = 'foo';
    o.modelParameters = {
      'list': [1, 2, 3],
      'bool': true,
      'string': 'foo',
    };
    o.modelVersionId = 'foo';
    o.name = 'foo';
    o.outputConfig =
        buildGoogleCloudAiplatformV1BatchPredictionJobOutputConfig();
    o.outputInfo = buildGoogleCloudAiplatformV1BatchPredictionJobOutputInfo();
    o.partialFailures = buildUnnamed23();
    o.resourcesConsumed = buildGoogleCloudAiplatformV1ResourcesConsumed();
    o.satisfiesPzi = true;
    o.satisfiesPzs = true;
    o.serviceAccount = 'foo';
    o.startTime = 'foo';
    o.state = 'foo';
    o.unmanagedContainerModel =
        buildGoogleCloudAiplatformV1UnmanagedContainerModel();
    o.updateTime = 'foo';
  }
  buildCounterGoogleCloudAiplatformV1BatchPredictionJob--;
  return o;
}

void checkGoogleCloudAiplatformV1BatchPredictionJob(
  api.GoogleCloudAiplatformV1BatchPredictionJob o,
) {
  buildCounterGoogleCloudAiplatformV1BatchPredictionJob++;
  if (buildCounterGoogleCloudAiplatformV1BatchPredictionJob < 3) {
    checkGoogleCloudAiplatformV1CompletionStats(o.completionStats!);
    unittest.expect(o.createTime!, unittest.equals('foo'));
    checkGoogleCloudAiplatformV1BatchDedicatedResources(o.dedicatedResources!);
    unittest.expect(o.disableContainerLogging!, unittest.isTrue);
    unittest.expect(o.displayName!, unittest.equals('foo'));
    checkGoogleCloudAiplatformV1EncryptionSpec(o.encryptionSpec!);
    unittest.expect(o.endTime!, unittest.equals('foo'));
    checkGoogleRpcStatus(o.error!);
    checkGoogleCloudAiplatformV1ExplanationSpec(o.explanationSpec!);
    unittest.expect(o.generateExplanation!, unittest.isTrue);
    checkGoogleCloudAiplatformV1BatchPredictionJobInputConfig(o.inputConfig!);
    checkGoogleCloudAiplatformV1BatchPredictionJobInstanceConfig(
      o.instanceConfig!,
    );
    checkUnnamed22(o.labels!);
    checkGoogleCloudAiplatformV1ManualBatchTuningParameters(
      o.manualBatchTuningParameters!,
    );
    unittest.expect(o.model!, unittest.equals('foo'));


### Code
* Clarify `.oo-ui-force-gpu-composite-layer()` mixin comment (Volker E.)
* Fix blurry text on PanelLayout promoted to GPU in Safari (Volker E.)
* Fix popup direction changing when the "anchor" is partially offscreen (Bartosz Dziewoński)
* MenuTagMultiselectWidget: Don't use overlay for `$autoCloseIgnore` (Moriel Schottlender)
* MultilineTextInputWidget: Correct documentation for `config.maxRows` (Roan Kattouw)
* PHP TextInputWidget: Remove remaining type 'search' specific code (Volker E.)
* Use findItem(s)FromData instead of getItem(s)FromData (Prateek Saxena)
* demos: Override OO.ui.getViewportSpacing in infused PHP demo too (Bartosz Dziewoński)
* demos: Promote icons page IndicatorWidget to GPU layer (Volker E.)
* docs: Bump copyright year (James D. Forrester)
* docs: TagMultiselectWidget: Remove wrong link to MediaWiki documentation (Prateek Saxena)
* build: Update .gitattributes for .phpcs.xml file move (Kunal Mehta)
* build: Add rake to Gemfile (Antoine Musso)
* build: Don't include Gemfile* in composer zipballs (Kunal Mehta)
* build: Update RuboCop Ruby gem (Željko Filipin)
* build: Updating mediawiki/mediawiki-codesniffer to 15.0.0 (libraryupgrader)
* build: Use SVGO option of 'grunt-image' for distribution (Volker E.)

## v0.24.4 / 2017-12-20 special release
### Deprecations
* [DEPRECATING CHANGE] icons: Flag unused 'bellOn' icon as to be removed (Volker E.)
* [DEPRECATING CHANGE] icons: Flag unused 'quotesAdd' & 'redirect' as to be removed (Volker E.)

### Features
* Introduce `OO.ui.getDefaultOverlay` (Bartosz Dziewoński)
* Put menus/popups of infused PHP widgets into the default overlay (Bartosz Dziewoński)

### Styles
* icons: Add 'lightbulb' icon (Prateek Saxena)
* icons: Add 'stop' icon to Apex theme (Volker E.)

### Code
* ClippableElement: Fix JS error when Floatable is mixed in but disabled (Roan Kattouw)
* DropdownWidget: Remove stray use of `this.$()` (Bartosz Dziewoński)

## v0.24.3 / 2017-11-28
### Features
* Allow adding virtual viewport spacing (Bartosz Dziewoński)
* ClippableElement: Allow clipping with top or left edge (Bartosz Dziewoński)
* DropdownInputWidget: Generate a hidden `<select>` in JS (Bartosz Dziewoński)
* FieldsetLayout: Hide header when there is no icon or label (Bartosz Dziewoński)
* MenuSelectWidget, PopupWidget: Automatically change popup direction if there is no space (Bartosz Dziewoński)
* PopupToolGroup: Set clipping edges to fix clipping edge (heh) cases (Bartosz Dziewoński)
* TextInputWidget: support spellcheck attribute (David Lynch)

### Styles
* themes: Fix PHP ComboboxInputWidget indicator position (Volker E.)
* WikimediaUI theme: Restore `:hover:focus` border color on TextInputWidgets (Volker E.)
* oo-ui-background-image: Drop `-o-linear-gradient` fallback (James D. Forrester)
* oo-ui-background-image: Drop `-webkit-linear-gradient` fallback (James D. Forrester)

### Code
* PHP DropdownInputWidget: Workaround for Firefox 57 ignoring attr selector with whitespace (Volker E.)
* DraggableGroupElement: Don't try to access non-existent property (Bartosz Dziewoński)
* DropdownInputWidget: Remove duplicate TitledElement mixin (Bartosz Dziewoński


)this.Owner).NavigateToIndex((int)obj.Object.Object.ObjectId);
            }
        }

        private void TracerContextMenuItem_View_Click(object sender, RoutedEventArgs e)
        {
            UITraceObject item = TracerDataGrid.SelectedItem as UITraceObject;
            if (item != null)
            {
                PathViewer viewer = new(item.Path);
                viewer.Show();
            }
        }

        private void CommandBindingStart_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            Start();
        }

        private void Start()
        {
            if (_worker != null && _worker.IsBusy)
                return;
            if (_ready)
                TracerDataGrid.DataContext = null;

            _ready = false;

            _worker = new BackgroundWorker();
            _worker.DoWork += backgroundWorker_Trace;
            _worker.WorkerReportsProgress = true;
            _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
                (sender, e) =>
                {
                    TracerProgressBar.Visibility = Visibility.Hidden;
                    Trace = _object.Trace;
                    if (Trace == null || Trace.Count == 0)
                    {
                        TracerDataGrid.DataContext = null;
                        _ready = true;
                        _worker = null;
                        _tracer.Close();
                        //this.Close();
                    }
                    else
                    {
                        TracerDataGrid.DataContext = _object.Trace;
                        _ready = true;
                        _worker = null;
                        _tracer.Close();
                    }
                });

            _args = new TracerArguments
            {
                Object = _object,
                Database = _dbPath,
                Snapshot = _snapshot,
                IsCanceled = false,
                IsStopped = false,
                TraceDepth = Int32.Parse(DeptTeaxtBox.Text == "" ? "7" : DeptTeaxtBox.Text),
                Done = _tracerClosing
            };
            _worker.RunWorkerAsync(argument: _args);

            System.Timers.Timer timer = new System.Timers.Timer();
            timer.Elapsed += new ElapsedEventHandler(backgroundWorker_Timer);
            timer.Interval = Int32.Parse(TimeTextBox.Text == "" ? "10" : TimeTextBox.Text);
            timer.Interval *= 1000;
            timer.AutoReset = false;
            timer.Enabled = true;

            TracerProgressBar.Visibility = Visibility.Visible;
        }

        private void StopButton_Click(object sender, RoutedEventArgs e)
        {
            if (_ready == true)
                return;
            if (_worker != null && _worker.IsBusy)
                _args.IsStopped = true;
        }

        private void CommandBindingClose_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            if (_worker != null && _worker.IsBusy)
            {
                StopTracer();
            }
            this.Close();
        }
    }
}


, name = "Crossdressing"),
    Tag(id = 34, name = "Cunnilingus"),
    Tag(id = 35, name = "Dark Skin"),
    Tag(id = 36, name = "Defloration"),
    Tag(id = 38, name = "Demon Girl"),
    Tag(id = 51, name = "Dickgirl"),
    Tag(id = 112, name = "Doll Joints"),
    Tag(id = 41, name = "Elf"),
    Tag(id = 106, name = "Exhibitionism"),
    Tag(id = 107, name = "Family"),
    Tag(id = 44, name = "Femdom"),
    Tag(id = 46, name = "Footjob"),
    Tag(id = 49, name = "Full Color"),
    Tag(id = 50, name = "Furry"),
    Tag(id = 53, name = "Gender Bender"),
    Tag(id = 54, name = "Group"),
    Tag(id = 55, name = "Gyaru"),
    Tag(id = 56, name = "Gym Uniform"),
    Tag(id = 114, name = "Kemonomimi"),
    Tag(id = 61, name = "Lactation"),
    Tag(id = 9, name = "Maid Uniform"),
    Tag(id = 65, name = "Mind Control"),
    Tag(id = 108, name = "Mindbreak"),
    Tag(id = 109, name = "Monster Girl"),
    Tag(id = 69, name = "Muscle"),
    Tag(id = 71, name = "Netorare"),
    Tag(id = 73, name = "Ninja Outfit"),
    Tag(id = 74, name = "Non-H"),
    Tag(id = 75, name = "Nun Outfit"),
    Tag(id = 76, name = "Nurse Outfit"),
    Tag(id = 78, name = "Old Man"),
    Tag(id = 82, name = "Pay To Play"),
    Tag(id = 80, name = "Petite"),
    Tag(id = 81, name = "Pregnant"),
    Tag(id = 83, name = "Rimjob"),
    Tag(id = 84, name = "School Uniform"),
    Tag(id = 110, name = "Small Breasts"),
    Tag(id = 63, name = "Solo Action"),
    Tag(id = 90, name = "Swimsuit"),
    Tag(id = 91, name = "Tanlines"),
    Tag(id = 92, name = "Tentacles"),
    Tag(id = 93, name = "Titjob"),
    Tag(id = 94, name = "Toys"),
    Tag(id = 95, name = "Urination"),
    Tag(id = 99, name = "Yaoi"),
)

fun parseDate(dateStr: String): Long {
    return try {
        dateFormat.parse(dateStr)!!.time
    } catch (_: ParseException) {
        0L
    }
}

private val dateFormat by lazy {
    SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH)
}

fun getIdFromUrl(url: String) = url.split("/").last()

fun getIdsFromUrl(url: String) = "${url.split("/")[1]}/${url.split("/").last()}"
package eu.kanade.tachiyomi.extension.en.vizshonenjump

import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import okhttp3.CacheControl
import okhttp3.Headers
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.Interceptor


from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _

PAGES = [
    {
        "seperator": False,
        "items": [
            {
                "title": _("Home page"),
                "icon": "home",
                "link": reverse_lazy("admin:index"),
            }
        ],
    },
    {
        "title": _("Auth"),
        "separator": True,  # Top border
        "items": [
            {
                "title": _("Users"),
                "icon": "group",
                "link": reverse_lazy("admin:http_user_changelist"),
            },
            {
                "title": _("Group"),
                "icon": "group",
                "link": reverse_lazy("admin:auth_group_changelist"),
            },
        ],
    },
]


alltype.setNumberByteBasic(new Byte("-1"));
        alltype.setEnableBasic(true);
        long l = easyEntityQuery.insertable(alltype).executeRows();
        Assert.assertEquals(1, l);
        ALLTYPE alltype1 = easyEntityQuery.queryable(ALLTYPE.class)
                .whereById("123456").firstOrNull();
        Assert.assertNotNull(alltype1);
        Assert.assertEquals(alltype1.getId(), alltype.getId());
        Assert.assertEquals(alltype1.getNumberDecimal(), alltype.getNumberDecimal());
        Assert.assertEquals(alltype1.getNumberFloat(), alltype.getNumberFloat());
        Assert.assertEquals(alltype1.getNumberDouble(), alltype.getNumberDouble());
        Assert.assertEquals(alltype1.getNumberShort(), alltype.getNumberShort());
        Assert.assertEquals(alltype1.getNumberInteger(), alltype.getNumberInteger());
        Assert.assertEquals(alltype1.getNumberLong(), alltype.getNumberLong());
        Assert.assertEquals(alltype1.getNumberByte(), alltype.getNumberByte());
        Assert.assertEquals(alltype1.getTimeLocalDateTime(), alltype.getTimeLocalDateTime());
        Assert.assertEquals(alltype1.getTimeLocalDate(), alltype.getTimeLocalDate());
        Assert.assertEquals(alltype1.getTimeLocalTime(), alltype.getTimeLocalTime());
        Assert.assertEquals(alltype1.getEnable(), alltype.getEnable());
        Assert.assertEquals(alltype1.getValue(), alltype.getValue());
        Assert.assertEquals(alltype1.getUid(), alltype.getUid());
        Assert.assertEquals(alltype1.getSqlDate(), alltype.getSqlDate());
        Assert.assertEquals(alltype1.getOnlyDate(), alltype.getOnlyDate());
        Assert.assertEquals(alltype1.getOnlyTime(), alltype.getOnlyTime());
        Assert.assertTrue(alltype1.getNumberFloatBasic() == alltype.getNumberFloatBasic());
        Assert.assertTrue(alltype1.getNumberDoubleBasic() == alltype.getNumberDoubleBasic());
        Assert.assertEquals(alltype1.getNumberShortBasic(), alltype.getNumberShortBasic());
        Assert.assertEquals(alltype1.getNumberIntegerBasic(), alltype.getNumberIntegerBasic());
        Assert.assertEquals(alltype1.getNumberLongBasic(), alltype.getNumberLongBasic());
        Assert.assertEquals(alltype1.getNumberByteBasic(), alltype.getNumberByteBasic());
        Assert.assertEquals(alltype1.isEnableBasic(), alltype.isEnableBasic());
    }

    @Test
    public void testAllType1(){

        ALLTYPE alltype = new ALLTYPE();
        alltype.setId("123456123123");

        alltype.setNumberDecimal(new BigDecimal("12.33"));
        alltype.setNumberFloat(12.3f);
        alltype.setNumberDouble(22.1d);
        alltype.setNumberShort(new Short("12"));
        alltype.setNumberInteger(33);
        alltype.setNumberLong(12345678911L);
        alltype.setNumberByte(new Byte("-1"));
        alltype.setEnable(true);
        alltype.setTimeLocalDateTime(LocalDateTime.of(2021, 1, 1, 0, 0));
        alltype.setTimeLocalDate(LocalDate.of(2121, 1, 2));
        alltype.setTimeLocalTime(LocalTime.of(21, 1, 9));
        alltype.setOnlyDate(new Date());
        long epochMilli = LocalDateTime.now().toLocalDate().atStartOfDay()
                .toInstant(ZoneOffset.ofHours(8)).toEpochMilli();
        java.sql.Date date = new java.sql.Date(epochMilli);
        alltype.setSqlDate(date);
        alltype.setOnlyTime(Time.valueOf("12:09:10"));
        alltype.setValue("3322");


n: BOTTOMRIGHT"] = "图标：底部右侧"
L["Icon: LEFT"] = "图标：左侧"
L["Icon: RIGHT"] = "图标：右侧"
L["Icon: TOP"] = "图标：顶部"
L["Icon: TOPLEFT"] = "图标：顶部左侧"
L["Icon: TOPRIGHT"] = "图标：顶部右侧"
L["Icons and Text (Short)"] = "图标和文字（短）"
L["Icons and Text"] = "图标和文字"
L["If enabled then it checks if auras are missing instead of being present on the unit."] = "启用后将会检查光环是否缺失而不是光环是否存在."
L["If enabled then it will require all auras to activate the filter. Otherwise it will only require any one of the auras to activate it."] = "启用后要求满足所有光环. 否则只要求任一光环存在即可激活."
L["If enabled then it will require all cooldowns to activate the filter. Otherwise it will only require any one of the cooldowns to activate it."] = "启用后要求满足所有冷却. 否则只要求任一冷却存在即可激活."
L["If enabled then the filter will activate if the unit is casting anything."] = "启用后过滤器在单位施放任何技能的时候激活."
L["If enabled then the filter will activate if the unit is channeling anything."] = "启用后过滤器在单位引导任何技能的时候激活."
L["If enabled then the filter will activate if the unit is not casting anything."] = "启用后过滤器在单位未施放任何技能的时候激活."
L["If enabled then the filter will activate if the unit is not channeling anything."] = "启用后过滤器在单位未引导任何技能的时候激活."
L["If enabled then the filter will only activate if the level of the unit is equal to or higher than this value."] = "启用后过滤器仅在单位等级大于等于该值的时候激活."
L["If enabled then the filter will only activate if the level of the unit is equal to or lower than this value."] = "启用后过滤器仅在单位等级小于等于该值的时候激活."
L["If enabled then the filter will only activate if the level of the unit matches this value."] = "启用后过滤器仅在单位等级符合该值的时候激活."
L["If enabled then the filter will only activate if the level of the unit matches your own."] = "启用后过滤器仅在单位等级符合你的等级的时候激活."
L["If enabled then the filter will only activate if the unit is casting interruptible spells."] = "启用后过滤器仅在单位施放可打断技能的时候激活."
L["If enabled then the filter will only activate if the unit is casting not interruptible spells."] = "启用后过滤器仅在单位施放不可打断技能的时候激活."


="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703

    File: /custom_nodes/comfyui_controlnet_aux/src/controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/mask_cond_unet.py

    Line number: 45

    More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html

41	        num_pos_feats = num_feats // 2
42	        # mask = tensor_list.mask
43	        mask = torch.zeros(x.shape[0], x.shape[1], x.shape[2], device=x.device).to(torch.bool)
44	        batch = mask.shape[0]
45	        assert mask is not None
46	        not_mask = ~mask
47	        y_embed = not_mask.cumsum(1, dtype=torch.float32)
48	        x_embed = not_mask.cumsum(2, dtype=torch.float32)

    assert_used:  Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

    Test ID: B101

    Severity: LOW

    Confidence: HIGH

    CWE: CWE-703

    File: /custom_nodes/comfyui_controlnet_aux/src/controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/mask_cond_unet.py

    Line number: 418

    More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html

414	    """ https://github.com/crowsonkb/v-diffusion-jax/blob/master/diffusion/models/danbooru_128.py#L8 """
415
416	    def __init__(self, dim, is_random = False):
417	        super().__init__()
418	        assert (dim % 2) == 0
419	        half_dim = dim // 2
420	        self.weights = nn.Parameter(torch.randn(half_dim), requires_grad = not is_random)
421

    assert_used:  Use of assert detected. The


s ...int) func() int { return func() int { return sum(args...) } }

func sumA(args []int) int {
	s := 0
	for _, v := range args {
		s += v
	}
	return s
}

func sumB(args []int) int { return sum(args...) }

func sum2(args ...int) int { return 2 * sum(args...) }

func sum3(args ...int) int { return 3 * sumA(args) }

func sum4(args ...int) int { return 4 * sumB(args) }

func intersum(args ...interface{}) int {
	s := 0
	for _, v := range args {
		s += v.(int)
	}
	return s
}

type T []T

func ln(args ...T) int { return len(args) }

func ln2(args ...T) int { return 2 * ln(args...) }

func (*T) Sum(args ...int) int { return sum(args...) }

type U struct {
	*T
}

type I interface {
	Sum(...int) int
}

func main() {
	if x := sum(1, 2, 3); x != 6 {
		println("sum 6", x)
		panic("fail")
	}
	if x := sum(); x != 0 {
		println("sum 0", x)
		panic("fail")
	}
	if x := sum(10); x != 10 {
		println("sum 10", x)
		panic("fail")
	}
	if x := sum(1, 8); x != 9 {
		println("sum 9", x)
		panic("fail")
	}
	if x := sumC(4, 5, 6); x != 15 {
		println("sumC 15", x)
		panic("fail")
	}
	if x := sumD(4, 5, 7); x != 16 {
		println("sumD 16", x)
		panic("fail")
	}
	if x := sumE(4, 5, 8); x != 17 {
		println("sumE 17", x)
		panic("fail")
	}
	if x := sumF(4, 5, 9)(); x != 18 {
		println("sumF 18", x)
		panic("fail")
	}
	if x := sum2(1, 2, 3); x != 2*6 {
		println("sum 6", x)
		panic("fail")
	}
	if x := sum2(); x != 2*0 {
		println("sum 0", x)
		panic("fail")
	}
	if x := sum2(10); x != 2*10 {
		println("sum 10", x)
		panic("fail")
	}
	if x := sum2(1, 8); x != 2*9 {
		println("sum 9", x)
		panic("fail")
	}
	if x := sum3(1, 2, 3); x != 3*6 {
		println("sum 6", x)
		panic("fail")
	}
	if x := sum3(); x != 3*0 {
		println("sum 0", x)
		panic("fail")
	}
	if x := sum3(10); x != 3*10 {
		println("sum 10", x)
		panic("fail")
	}
	if x := sum3(1, 8); x != 3*9 {
		println("sum 9", x)
		panic("fail")
	}
	if x := sum4(1, 2, 3); x != 4*6 {
		println("sum 6", x)
		panic("fail")
	}
	if x := sum4(); x != 4*0 {
		println("sum 0", x)
		panic("fail")
	}
	if x := sum4(10); x != 4*10 {
		println("sum 10", x)
		panic("fail")
	}
	if x := sum4(1, 8); x != 4*9 {
		println("sum 9", x)
		panic("fail")
	}
	if x := intersum(1, 2, 3); x != 6 {
		println("inters


es()),
      new GroupShapeProperties(new TransformGroup()),
      new P.Shape(
      new P.NonVisualShapeProperties(
        new P.NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "" },
        new P.NonVisualShapeDrawingProperties(new ShapeLocks() { NoGrouping = true }),
        new ApplicationNonVisualDrawingProperties(new PlaceholderShape())),
      new P.ShapeProperties(),
      new P.TextBody(
        new BodyProperties(),
        new ListStyle(),
        new Paragraph(new EndParagraphRunProperties()))))),
    new ColorMapOverride(new MasterColorMapping()));
    slideLayoutPart1.SlideLayout = slideLayout;
    return slideLayoutPart1;
}


	if(extra_info)
		for(var i in extra_info)
			o[i] = extra_info[i];

	if(!this.inputs)
		this.inputs = [];
	this.inputs.push(o);
	this.size = this.computeSize();
	if(this.onInputAdded)
		this.onInputAdded(o);
	this.setDirtyCanvas(true,true);
	return o;
}

/**
* add several new input slots in this node
* @method addInputs
* @param {Array} array of triplets like [[name,type,extra_info],[...]]
*/
LGraphNode.prototype.addInputs = function(array)
{
	for(var i = 0; i < array.length; ++i)
	{
		var info = array[i];
		var o = {name:info[0], type:info[1], link:null};
		if(array[2])
			for(var j in info[2])
				o[j] = info[2][j];

		if(!this.inputs)
			this.inputs = [];
		this.inputs.push(o);
		if(this.onInputAdded)
			this.onInputAdded(o);
	}

	this.size = this.computeSize();
	this.setDirtyCanvas(true,true);
}

/**
* remove an existing input slot
* @method removeInput
* @param {number} slot
*/
LGraphNode.prototype.removeInput = function(slot)
{
	this.disconnectInput(slot);
	this.inputs.splice(slot,1);
	for(var i = slot; i < this.inputs.length; ++i)
	{
		if(!this.inputs[i])
			continue;
		var link = this.graph.links[ this.inputs[i].link ];
		if(!link)
			continue;
		link.target_slot -= 1;
	}
	this.size = this.computeSize();
	if(this.onInputRemoved)
		this.onInputRemoved(slot);
	this.setDirtyCanvas(true,true);
}

/**
* add an special connection to this node (used for special kinds of graphs)
* @method addConnection
* @param {string} name
* @param {string} type string defining the input type ("vec3","number",...)
* @param {[x,y]} pos position of the connection inside the node
* @param {string} direction if is input or output
*/
LGraphNode.prototype.addConnection = function(name,type,pos,direction)
{
	var o = {
		name: name,
		type: type,
		pos: pos,
		direction: direction,
		links: null
	};
	this.connections.push( o );
	return o;
}

/**
* computes the size of a node according to its inputs and output slots
* @method computeSize
* @param {number} minHeight
* @return {number} the total size
*/
LGraphNode.prototype.computeSize = function( minHeight, out )
{
	if( this.constructor.size )
		return this.constructor.size.concat();

	var rows = Math.max( this.inputs ? this.inputs.length : 1, this.outputs ? this.outputs.length : 1);
	var size = out || new Float32Array([0,0]);
	rows = Math.max(rows, 1);
	var font_size = LiteGraph.NODE_TEXT_SIZE; //although it should be graphcanvas.inner_text_font size
	size[1] = (this.constructor.slot_start_y || 0) + rows * LiteGraph.NODE_SLOT_HEIGHT;
	if( this.widgets && this.widgets.length )
		size[1] += this.widgets.length * (LiteGraph.NODE_WIDGET_HEIGHT + 4) + 8;

	var font_size = font_size;
	var title_width = compute_text_size( this.title );
	var input_width = 0;
	var output_


rNode: (node: IssueNode<T>) => void,
    leaveNode: (node: IssueNode<T>) => void = () => { /* no-op */ }
): void {
  let currentIterator: Iterator<IssueNode<T>> = rootNodes[Symbol.iterator]();
  const stack: [IssueNode<T>, Iterator<IssueNode<T>>][] = [];
  while (true) {
    const iteratorResult = currentIterator.next();
    if (iteratorResult.done) {
      if (stack.length === 0) {
        break;
      }
      let node: IssueNode<T>;
      [node, currentIterator] = stack.pop()!;
      leaveNode(node);
    } else {
      const node: IssueNode<T> = iteratorResult.value;
      enterNode(node);
      if (node.children.length > 0) {
        stack.push([node, currentIterator]);
        currentIterator = node.children[Symbol.iterator]();
      } else {
        leaveNode(node);
      }
    }
  }
}
export class CalculModel{
    public _calculPropose:string;
    public _reponse:number;
    public _points:number;

    constructor(){}
    /*constructor(calculPropose:string, reponse:number, points:number){
        this._calculPropose=calculPropose;
        this._reponse=reponse;
        this._points = points;
    } */

}import { launch as launchPuppeteer } from 'puppeteer';

type ScrapeParameters = { url: string, selector: string }
type ScrappingResult = {
    content: string;
}

export async function scrape({ url, selector }: ScrapeParameters): Promise<ScrappingResult> {
    const browser = await launchPuppeteer({args: ['--no-sandbox', '--disable-setuid-sandbox']});
    const page = await browser.newPage();
    await page.goto(url);
    await page.waitForSelector(selector);
    const content = await page.$$eval(selector, contents => contents[0].outerHTML);

    return {
        content: content.toString()
    };
}import { Command, flags } from '@oclif/command'
import { LocalStorage } from 'node-localstorage'

// let index: number = 0
export default class Link extends Command {
  private storage: LocalStorage = new LocalStorage('~/.config/faststore.confg')

  public static description = 'The link command facilitates the wml link'

  public static examples = [`$ cli link`]

  public static flags = {
    help: flags.help({ char: 'h' }),
    // flag with a value (-n, --name=VALUE)
    // name: flags.string({ char: 'n', description: 'name to print' }),
    // // flag with no value (-f, --force)
    // force: flags.boolean({ char: 'f' }),
    verbose: flags.boolean({ char: 'v' }),
  }

  public static args = [{ name: 'file' }]
  public static source: string
  private index = 0

  public async run() {
    this.index += 1

    console.log({ index: this.index })

    const { args } = this.parse(Link)

    if (!args.file) {
      Link.source = process.cwd()
      this.log(`added ${Link.source} as the source`)
      this.storage.setItem('source', Link.source)
    } else {
      this.log(`source: ${this.storage.getItem('source')}`)
    }
    // const name = flags.name ?? 'world'
    // this.log(`hello ${name} from ./src/commands/hello.ts`)
    // if (args.file && flags.force) {
    //     this.log(`you input --force and --file: ${args.file}`)
    // }
    // const { exec } = require("child_process")

    // let my_var: string = "help";

    // exec(`wml --${my_var}`, (error: { message: any }, stdout: any, stderr: any) => {
    //     if (error) {
    //         console.log(`error: ${error.message}`)
    //         return
    //     }
    //     if (stderr) {
    //         console.log(`stderr


nEffects, ICreationResult templateCreationResult, string outputBasePath)
        {
            Reporter.Output.WriteLine(LocalizableStrings.PostActionDescription, actionConfig.Description);
            Reporter.Output.WriteLine(LocalizableStrings.PostActionInstructions, actionConfig.ManualInstructions);

            if (actionConfig.Args != null && actionConfig.Args.TryGetValue("executable", out string? executable))
            {
                actionConfig.Args.TryGetValue("args", out string? commandArgs);
                Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostActionCommand, $"{executable} {commandArgs}").Bold().Red());
            }

            return true;
        }
    }
}


] = {
			[1] = 0,
			[2] = 0,
			[3] = 0,
			[4] = 0,
			["inf1"] = "",
			["inf2"] = "",
			["icon"] = 3,
		},
	},
	["Cleft Scorpid"] = {
		[311] = {
			[1] = 0,
			[2] = 0,
			[3] = 0,
			[4] = 0,
			["inf1"] = "Beast Warrior",
			["inf2"] = "Level 36",
			["icon"] = 3,
		},
	},
	["Grawn Thromwyn"] = {
		[12] = {
			[1] = 5211,
			[2] = 4528,
			[3] = 5211,
			[4] = 4528,
			["inf1"] = "Weaponsmith",
			["inf2"] = "",
			["icon"] = 3,
		},
	},
	["Revelosh"] = {
		[311] = {
			[1] = 0,
			[2] = 0,
			[3] = 0,
			[4] = 0,
			["inf1"] = "elite Humanoid Paladin",
			["inf2"] = "Level 40",
			["icon"] = 3,
		},
	},
	["\"Plucky\" Johnson"] = {
		[38] = {
			[1] = 7565,
			[2] = 7956,
			[3] = 7579,
			[4] = 7943,
			["inf1"] = "",
			["inf2"] = "",
			["icon"] = 3,
		},
	},
	["Webwood Spider"] = {
		[35] = {
			[1] = 2473,
			[2] = 5896,
			[3] = 3423,
			[4] = 5560,
			["inf1"] = "",
			["inf2"] = "",
			["icon"] = 3,
		},
	},
	["Hydrospawn"] = {
		[322] = {
			[1] = 0,
			[2] = 0,
			[3] = 0,
			[4] = 0,
			["inf1"] = "",
			["inf2"] = "",
			["icon"] = 3,
		},
	},
	["Burning Blade Augur"] = {
		[11] = {
			[1] = 3281,
			[2] = 5507,
			[3] = 3291,
			[4] = 5499,
			["inf1"] = "",
			["inf2"] = "",
			["icon"] = 3,
		},
	},
	["Argos Nightwhisper"] = {
		[31] = {
			[1] = 5528,
			[2] = 2204,
			[3] = 5571,
			[4] = 2159,
			["inf1"] = "",
			["inf2"] = "",
			["icon"] = 3,
		},
	},
	["Hans Weston"] = {
		[15] = {
			[1] = 4993,
			[2] = 6469,
			[3] = 5041,
			[4] = 6460,
			["inf1"] = "Armorer & Shieldsmith",
			["inf2"] = "Level 37",
			["icon"] = 3,
		},
	},
	["Witherbark Shadowcaster"] = {
		[2] = {
			[1] = 4134,
			[2] = 3734,
			[3] = 4946,
			[4] = 3204,
			["inf1"] = "Humanoid Mage",
			["inf2"] = "Level 31",
			["icon"] = 3,
		},
	},
	["Tognus Flintfire"] = {
		[12] = {
			[1] = 5184,
			[2] = 4531,
			[3] = 5197,
			[4] = 4525,
			["inf1"] = "Journeyman


#!/usr/bin/python3
# This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details

# Given the output of --compile=codegenverbose in stdin, this script outputs statistics about bytecode/IR

import sys
import re
from collections import defaultdict

count_bc = defaultdict(int)
count_ir = defaultdict(int)
count_asm = defaultdict(int)
count_irasm = defaultdict(int)

# GETTABLEKS R10 R1 K18 ['s']
# L1: DIV R14 R13 R3
re_bc = re.compile(r'^(?:L\d+: )?([A-Z_]+) ')
# #   CHECK_SLOT_MATCH %178, K3, bb_fallback_37
# #   %175 = LOAD_TAG R15
re_ir = re.compile(r'^#   (?:%\d+ = )?([A-Z_]+) ')
#  cmp         w14,#5
re_asm = re.compile(r'^ ([a-z.]+) ')

current_ir = None

for line in sys.stdin.buffer.readlines():
    line = line.decode('utf-8', errors='ignore').rstrip()

    if m := re_asm.match(line):
        count_asm[m[1]] += 1
        if current_ir:
            count_irasm[current_ir] += 1
    elif m := re_ir.match(line):
        count_ir[m[1]] += 1
        current_ir = m[1]
    elif m := re_bc.match(line):
        count_bc[m[1]] += 1

def display(name, counts, limit=None, extra=None):
    items = sorted(counts.items(), key=lambda p: p[1], reverse=True)
    total = 0
    for k,v in items:
        total += v
    shown = 0
    print(name)
    for i, (k,v) in enumerate(items):
        if i == limit:
            if shown < total:
                print(f'  {"Others":25}: {total-shown} ({(total-shown)/total*100:.1f}%)')
            break
        print(f'  {k:25}: {v} ({v/total*100:.1f}%){"; "+extra(k) if extra else ""}')
        shown += v
    print()

display("Bytecode", count_bc, limit=20)
display("IR", count_ir, limit=20)
display("Assembly", count_asm, limit=10)
display("IR->Assembly", count_irasm, limit=30, extra=lambda op: f'{count_irasm[op] / count_ir[op]:.1f} insn/op')


uteStateChanged) - Monitor for Mute state changes
- [SceneItemEnableStateChanged](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#SceneItemEnableStateChanged) - Monitor for Visibility state changes
## What is this example

This example covers a way to make a Twitch Chat client in nodeJS

It's basically identical to the [pubsub client](https://github.com/BarryCarlyon/twitch_misc/tree/master/pubsub) as it uses the same Connectivity logic, and both PubSub and this Chat example connect over Websockets (as apposed to the Twitch IRC ports, and IRC logic)

The Regex'es and some of the message parsing was inspired form [Modch.at](https://github.com/CBenni/mt2), (and theres only so many ways to write a IRC parser)

This example will connect to the channel Twitch, and will be in the "readonly"/justinfan/anon user configuration. As if you were on the Twitch.tv/twitch channel and you were logged on in the browser.

## Reference Documentation

- [Chat Guide](https://dev.twitch.tv/docs/irc/guide)

## Notes

If you were to use this script and use a "real" user with the right scopes.
In order to send a chat message you would do something like

    socket.send('PRIVMSG #targetchnanel :Your message here');

Which matches the IRC Protocol formatting for sending a message to a channel.

## Running the example

In a console/terminal, run these commands:

- `npm install`
- `node chat.js`

Send messages in `#barrycarlyon` and see what happens

## A note

It's just a simple/bad example on how to connect to Twitch Chat and maintain a Ping Pong.

It uses the oft used but undocumented justinfan connection method, so the "bot" is readonly

## Another Notes

Technically the Host Parsing regex, is suspecitable to [ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) but there is a level of trust attached to the input text to a script connected to Twitch Chat.

So if a given `host` in a Twitch Chat message can trigger a ReDoS there are bigger issues afoot than killing some chat bots connected to chat.
# Changelog

## v3.6.0 - 2025-07-18

### What's Changed

* fix: Change AsArrayObject cast to be Laravel's ArrayObject by @wsamoht in https://github.com/barryvdh/laravel-ide-helper/pull/1675
* Add extends declaration for Macroable classes to fix missing inherited methods by @KentarouTakeda in https://github.com/barryvdh/laravel-ide-helper/pull/1674
* fix(meta): ignore aliases in the autoloader (Fixes #1671) by @pataar in https://github.com/barryvdh/laravel-ide-helper/pull/1686
* feat(ModelsCommand): add support for the new Scope attribute by @pataar in https://github.com/barryvdh/laravel-ide-helper/pull/1694
* fix type change for scope default float parameter by @nivseb in https://github.com/barryvdh/laravel-ide-helper/pull/1697
* Revert #1629 - *Allow adding custom Macroable classes* by @erikn69 in https://github.com/barryvdh/laravel-ide-helper/pull/1707
* Configurable macro return type defaults by @erikn69 in https://github.com/barryvdh/laravel-ide-helper/pull/1711
* docs(readme): add Laravel 12 support information by @SantosVilanculos in https://github.com/barryvdh/laravel-ide-helper/pull/1717
* Add multi-level directory support for translation files by @RosiersRobin in https://github.com/barryvdh/laravel-ide-helper/pull/


-- Example: state-persistence.lua
-- Author: LLMSpell Examples
-- Purpose: Demonstrate state persistence capabilities with scoped namespaces
-- Config: Requires state-enabled configuration (see configs/state-enabled.toml)
-- Learning: How to persist data across script executions

print("=== LLMSpell: State Persistence ===")
print("This example demonstrates how to use the State API with scoped namespaces!")
print()

-- Check if State is available
if not State then
    print("❌ State API not available!")
    print("   Run with: ./llmspell -c configs/state-enabled.toml run features/state-persistence.lua")
    return
end

print("✅ State API is available!")
print()

-- 1. Basic save and load with global scope
print("1. Basic operations with 'global' scope...")
State.save("global", "app_version", "1.0.0")
State.save("global", "last_run", os.date())
print("   Saved app_version and last_run")

local version = State.load("global", "app_version")
local last_run = State.load("global", "last_run")
print("   Loaded: version=" .. tostring(version) .. ", last_run=" .. tostring(last_run))

-- 2. Using custom scope for user data
print("\n2. Using 'custom' scope for user preferences...")
State.save("custom", "theme", "dark")
State.save("custom", "language", "en")
State.save("custom", "font_size", "14")

local theme = State.load("custom", "theme")
print("   Current theme: " .. tostring(theme))

-- 3. Listing keys in a scope
print("\n3. Listing all keys in scopes...")
local global_keys = State.list_keys("global")
print("   Global scope keys: " .. #global_keys)
for i, key in ipairs(global_keys) do
    local value = State.load("global", key)
    print("     - " .. key .. " = " .. tostring(value))
end

local custom_keys = State.list_keys("custom")
print("   Custom scope keys: " .. #custom_keys)
for i, key in ipairs(custom_keys) do
    local value = State.load("custom", key)
    print("     - " .. key .. " = " .. tostring(value))
end

-- 4. Working with structured data (as strings)
print("\n4. Storing structured data...")
-- For complex data, st


�았는데, 우르의 흑마법 논문이라는 강력한 마법서를 가져가 버렸어.$B$B우리 스톰윈드의 마법사들은 그 책을 되찾길 원하네. 일갈라의 탑으로 들어가서 그의 서재에서 책을 찾아 내게 가져오게.",
    ["O"] = "스톰윈드에 있는 고위마술사 안드로매스에게 우르의 흑마법 논문을 가져가야 합니다.",
    ["T"] = "우르의 흑마법 논문",
  },
  [1939] = {
    ["D"] = "고위마술사 안드로매스님께서 당신과 얘기를 나누고 싶어하세요. 그분은 스톰윈드 마법사 지구에 있는 마법사의 성소 최상층에 계시답니다.$B$B그분과 얘기를 나누는 게 좋을 거예요. 안드로매스님께서는 달라란에 붙잡혀있지 않는 마법사 중 가장 강한 분이시거든요. 그분과의 대화는 말 그대로 고위 회담이랍니다.",
    ["O"] = "고위마술사 안드로매스와 대화해야 합니다.",
    ["T"] = "고위마술사 안드로매스",
  },
  [1940] = {
    ["D"] = "Your service has been unwavering, $N.  I think, perhaps, it is time you had a finer garment, one more suiting your station as an adept mage.  If you gather the needed materials, then we will arrange the robe made.$B$BYou must enter Duskwood and hunt carrion recluse spiders.  Extract their silk, but only the finest, most pristine silk will do.  When you have enough, take it to Wynne Larson, here in the mage district at the Larson Clothiers.  She will craft your robe.",
    ["O"] = "스톰윈드에 있는 위니 라슨에게 온전한 거미줄 8개를 가져가야 합니다.",
    ["T"] = "온전한 거미줄",
  },
  [1941] = {
    ["D"] = "",
    ["O"] = "",
    ["T"] = "마나매듭 로브",
  },
  [1942] = {
    ["D"] = "",
    ["O"] = "",
    ["T"] = "별매듭 로브",
  },
  [1943] = {
    ["D"] = "트롤 마법사 다이노가 당신


/*
 *
 * (c) Copyright Ascensio System Limited 2010-2023
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/

using System;

using ASC.Core;
using ASC.CRM.Core.Entities;
using ASC.ElasticSearch;

namespace ASC.Web.CRM.Core.Search
{


tion()
        locMap = parseLocMap(c)
        // Expected workspace items in grid A
        // _ _ _ _ _
        // 9 _ _ _ 5
        // _ _ 6 _ 7
        // _ _ 8 _ _
        // _ _ _ _ _
        assertThat(locMap.size.toLong()).isEqualTo(5)
        // Verify items that existed in grid A remains in same position
        assertThat(locMap[testPackage5]).isEqualTo(Triple(0, 4, 1))
        assertThat(locMap[testPackage6]).isEqualTo(Triple(0, 2, 2))
        assertThat(locMap[testPackage7]).isEqualTo(Triple(0, 4, 2))
        assertThat(locMap[testPackage8]).isEqualTo(Triple(0, 2, 3))
        // Verify items that didn't exist in grid A are added in new screen
        assertThat(locMap[testPackage9]).isEqualTo(Triple(0, 0, 1))

        // remove item from B
        db.delete(TMP_TABLE, "$_ID=7", null)

        // migrate from A -> B
        migrateGrid(
            dbHelper,
            readerGridA,
            readerGridB,
            5,
            idp.numDatabaseHotseatIcons,
            idp.numColumns,
            idp.numRows,
        )

        // Check hotseat items in grid B
        c =
            db.query(
                TABLE_NAME,
                arrayOf(SCREEN, INTENT),
                "container=$CONTAINER_HOTSEAT",
                null,
                SCREEN,
                null,
                null,
            ) ?: throw IllegalStateException()
        // Expected hotseat items in grid B
        // 2 1 3 4
        verifyHotseat(
            c,
            mutableListOf(testPackage2, testPackage1, testPackage3, testPackage4).toList(),
            4,
        )

        // Check workspace items in grid B
        c =
            db.query(
                TABLE_NAME,
                arrayOf(SCREEN, CELLX, CELLY, INTENT),
                "container=$CONTAINER_DESKTOP",
                null,
                null,
                null,
                null,
            ) ?: throw IllegalStateException()
        locMap = parseLocMap(c)
        // Expected workspace items in grid B
        // _ _ _ _
        // 5 6 _ 8
        // 9 _ _ _
        // _ _ _ _
        assertThat(locMap.size.toLong()).isEqualTo(4)
        assertThat(locMap[testPackage5]).isEqualTo(Triple(0, 0, 1))
        assertThat(locMap[testPackage6]).isEqualTo(Triple(0, 1, 1))
        assertThat(locMap[testPackage8]).isEqualTo(Triple(0, 3, 1))
        assertThat(locMap[testPackage9]).isEqualTo(Triple(0, 0, 2))
    }

    @Test
    @Throws(Exception::class)
    @EnableFlags(Flags.FLAG_GRID_MIGRATION_REFACTOR)
    fun testHotseatMigrationToSmallerGridBackAndForthFlagOn() {
        testHotseatMigrationToSmallerGridBackAndForth()
    }

    @Test
    @Throws(Exception::class)
    @DisableFlags(Flags.FLAG_GRID_MIGRATION_REFACTOR)
    fun testHotseatMigrationToSmallerGridBackAndForthFlagOff() {
        testHotseatMigrationToSmallerGridBackAndForth()
    }

    /** Old migration logic, should be modified once is not needed anymore */
    @Throws(Exception::class)
    fun testHotseatMigrationToSmallerGridBackAndForth() {
        // Hotseat items in grid A
        // 1 2 3 4 5
        addItem(ITEM_TYPE_APPLICATION, 0, CONTAINER_HOTSEAT, 0, 0, testPackage1, 1, TMP_TABLE)
        addItem(ITEM_TYPE_DEEP_SHORTCUT, 1, CONTAINER_HOTSEAT, 0, 0, testPackage2, 2, TMP_TABLE)
        addItem(ITEM_TYPE_DEEP_SH


'';
            input = result
        } else {
            result['contentType'] = 'video/x-flv';
            input = result
        }
    `,
    double:false,
    推荐:'*',
    一级:'json:data.list;title;system_cover;uname;roomid',
    // 二级:'*',
    二级:"js:let aid=input.match(/\\/(\\d+)/)[1];log(aid);let html=request('https://api.live.bilibili.com/room/v1/Room/get_info?room_id='+aid);let jo=JSON.parse(html).data;let title=jo['title'];let pic=jo['keyframe'];let desc=jo['description'];let dire=jo['uid'];let typeName=jo['area_name'];let remark='在线人数:'+jo['online'];let vod={vod_id:aid,vod_name:title,vod_pic:pic,type_name:typeName,vod_area:'bililivedanmu',vod_remarks:remark,vod_actor:'直播间id-'+aid,vod_director:dire,vod_content:desc};vod['vod_play_from']='B站';vod['vod_play_url']='flv线路原画$platform=web&quality=4_'+aid+'#flv线路高清$platform=web&quality=3_'+aid+'#h5线路原画$platform=h5&quality=4_'+aid+'#h5线路高清$platform=h5&quality=3_'+aid;VOD=vod;",
    // 搜索:'json:data.result.live_room;title;cover;uname;roomid',
    搜索:'js:let html=request(input);let msg=JSON.parse(html).message;if(msg!=="0"){VODS=[{vod_name:KEY+"➢"+msg,vod_id:"no_data",vod_remarks:"别点,缺少bili_cookie",vod_pic:"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg"}]}else{let videos=[];let vodList=JSON.parse(html).data.result.live_room;vodList.forEach(function(vod){let aid=vod["roomid"];let title="直播间："+vod["title"].replace(\'\',"").replace("","");let img="https:"+vod["user_cover"];let remark=vod["watched_show"]["text_small"]+"  "+vod["uname"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});VODS=videos}',
    // 预处理:'if(rule_fetch_params.headers.Cookie.startsWith("http")){rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie);setItem(RULE_CK,cookie)};log(rule_fetch_params.headers.Cookie)',
}IhQ4qYXbEH8CuG28d+KFO70Q6aksObURFEDZrfbNfOmolDSbB9g4/KTYLbt8V0dd7Qx9qnJ3iOkB4lnD2nQTSYoDFmtTnmlpLT/977sKvYSRf7vzqWbhpx/TJNP7wohrFPmZixTZM5b9tPP+oS8BTogKBnRMA7DfpGFYQ0R7rdVWb9OnVYtCisaih+GHfgk8uaZPninKBl1aP6v8Cv7Pk//N1H4bYygkqkmFP4AaPCgpEoyVnLdAfH9V2ACAXquoKjv5or31amzbneypWPWQO1/m8CVHnS0lHfgZgPoiCLO4/5fp0Tx+ajJqeYDpHHaEkC1yiDFh7Xe9v22RRfDQs0O/ODRsiVwixuTud5jpGzPO1dRvrFmSIljmlJMthYuqNKEK6cBsWzzZL


15, $1e, $0e
	.byte $17, $17, $19, $1c, $21, $00, $85, $4f, $02, $a4
@song3ref502:
	.byte $1e, $85, $49, .lobyte(@env34), .hibyte(@env34), $83, $49, .lobyte(@env0), .hibyte(@env0), $4a, $a4, $21, $20, $1e
	.byte $81, $45, $19, $81, $45, $1c, $81, $1e, $85, $49, .lobyte(@env34), .hibyte(@env34), $83, $49, .lobyte(@env0), .hibyte(@env0)
	.byte $4a, $a4, $1e, $1c, $21, $81, $45, $20, $83, $43, $50, $2c, $2c, $20, $45
@song3ref547:
	.byte $21, $81, $20, $21, $00, $81, $23, $00, $25, $81, $43, $50, $41, $31, $25, $43, $50, $a6, $25, $39, $43, $2d, $45, $2c
	.byte $81, $2d, $2c, $2a, $2c, $2a, $28, $2a, $28, $48, $04, $25, $48, $04, $28, $48, $04, $25, $48, $04, $23, $48, $04, $25
	.byte $48, $04, $23, $48, $04, $21, $48, $04, $20, $4f, $02
	.byte $41, $0e
	.word @song3ref502
	.byte $81, $21, $81, $23, $81, $25, $81, $2f, $81, $28, $50, $fb, $2e, $2f, $43, $23, $81, $43, $50, $25, $2f, $23, $81
	.byte $41, $0b
	.word @song3ref547
	.byte $43, $50, $ae, $25, $36, $43, $2a, $45, $2c, $81, $23, $25, $28, $25, $28, $2f, $28, $2f, $4f, $00, $00, $8d
	.byte $41, $3d
	.word @song3ref42
	.byte $41, $2f
	.word @song3ref44
	.byte $41, $1d
	.word @song3ref142
	.byte $78, $98, $25, $73, $9a, $25, $8b, $8f, $77, $98, $25, $72, $9a, $25, $81, $76, $98, $28, $72, $9a, $28, $81, $76, $98
	.byte $1c, $72, $9a, $1c, $46, $06, $75, $4f, $03, $98, $1e, $72, $9a, $1e, $8b, $74, $98, $25, $71, $9a, $25, $8b, $8f, $00
	.byte $8d, $44, $00
@song3ch1:
	.byte $87, $9f, $9f, $9f, $9b, $79, $a6, $1c, $81, $1e, $85, $00, $81, $48, $04, $21, $48, $04, $1e, $00, $48, $04, $21, $48
	.byte $04, $1e, $48, $04,


1', atime: '1387589077', ctime: '1387588646', path: 'høllø.txt' },
            type: 'file',
            linkname: undefined,
            uname: 'maf',
            gname: 'staff',
            devmajor: 0,
            devminor: 0
          })

          const data = await toBuffer(entry.body)
          noEntries = true
          expect(uint8ArrayToString(data)).to.equal('hej\n')
        }
      }
    )

    expect(noEntries).to.be.true()
  })

  it('unicode', async () => {
    let noEntries = false

    await pipe(
      Fs.createReadStream(Fixtures.UNICODE_TAR),
      Tar.extract(),
      async source => {
        for await (const entry of source) {
          expect(entry.header).to.deep.equal({
            name: 'høstål.txt',
            mode: parseInt('644', 8),
            uid: 501,
            gid: 20,
            size: 8,
            mtime: new Date(1387580181000),
            pax: { path: 'høstål.txt' },
            type: 'file',
            linkname: undefined,
            uname: 'maf',
            gname: 'staff',
            devmajor: 0,
            devminor: 0
          })

          const data = await toBuffer(entry.body)
          noEntries = true
          expect(uint8ArrayToString(data)).to.equal('høllø\n')
        }
      }
    )

    expect(noEntries).to.be.true()
  })

  it('name-is-100', async () => {
    let noEntries = false

    await pipe(
      Fs.createReadStream(Fixtures.NAME_IS_100_TAR),
      Tar.extract(),
      async source => {
        for await (const entry of source) {
          expect(entry.header.name.length).to.equal(100)

          const data = await toBuffer(entry.body)
          noEntries = true
          expect(uint8ArrayToString(data)).to.equal('hello\n')
        }
      }
    )

    expect(noEntries).to.be.true()
  })

  it('invalid-file', async () => {
    try {
      await pipe(
        Fs.createReadStream(Fixtures.INVALID_TGZ),
        Tar.extract(),
        async source => {
          for await (const _ of source) { // eslint-disable-line no-unused-vars,@typescript-eslint/no-unused-vars
            expect.fail()
          }
        }
      )
    } catch (err) {
      return expect(err).to.be.ok()
    }

    expect.fail()
  })

  it('space prefixed', async () => {
    await pipe(
      Fs.createReadStream(Fixtures.SPACE_TAR_GZ),
      Tar.extract(),
      async source => {
        for await (const _ of source) { // eslint-disable-line no-unused-vars,@typescript-eslint/no-unused-vars
          expect(true).to.be.ok()
        }
      }
    )

    expect(true).to.be.ok()
  })

  it('gnu long path', async () => {
    await pipe(
      Fs.createReadStream(Fixtures.GNU_LONG_PATH),
      Tar.extract(),
      async source => {
        for await (const entry of source) {
          expect(entry.header.name.length).to.be.greaterThan(100)
        }
      }
    )

    expect(true).to.be.ok()
  })

  it('base 256 uid and gid', async () => {
    await pipe(
      Fs.createReadStream(Fixtures.BASE_256_UID_GID),
      Tar.extract(),
      async source => {
        for await (const entry of source) {
          expect(entry.header.uid).to.equal(116435139)
          expect(entry.header.gid).to.equal(1876110778)
        }
      }
    )


148
.L2152:
	ldrh	w1, [x3]
	cmp	w1, w10
	beq	.L2151
	umull	x6, w20, w26
	ldr	x4, [x19, 2520]
	orr	w1, w21, w1, lsl 10
	add	x4, x4, x6
	str	w1, [x4, 4]
	mul	w1, w20, w8
	ldr	x2, [x19, 2520]
	ldr	x4, [x19, 2600]
	sdiv	w1, w1, w5
	add	x2, x2, x6
	add	x1, x4, w1, sxtw 2
	str	x1, [x2, 8]
	mul	w1, w20, w9
	ldr	x4, [x19, 2656]
	add	w20, w20, 1
	and	w20, w20, 65535
	sdiv	w1, w1, w5
	add	x1, x4, w1, sxtw 2
	str	x1, [x2, 16]
.L2151:
	add	w0, w0, 1
	add	x3, x3, 2
	and	w0, w0, 65535
	b	.L2150
.L2154:
	ldr	x8, [x19, 2520]
	ldrh	w1, [x29, 96]
	add	x2, x8, x25
	ldp	x3, x0, [x2, 8]
	ldr	w4, [x3, 4]
	str	w4, [sp, 8]
	ldr	w3, [x3]
	str	w3, [sp]
	ldp	w4, w5, [x0]
	ldp	w6, w7, [x0, 8]
	mov	x0, x27
	ldr	w3, [x2, 4]
	ldr	w2, [x8, x25]
	add	x25, x25, 56
	bl	printk
	b	.L2153
	.size	FtlDumpBlockInfo, .-FtlDumpBlockInfo
	.align	2
	.global	FtlScanAllBlock
	.type	FtlScanAllBlock, %function
FtlScanAllBlock:
	sub	sp, sp, #144
	adrp	x1, .LANCHOR3
	add	x1, x1, :lo12:.LANCHOR3
	adrp	x0, .LC49
	add	x1, x1, 192
	add	x0, x0, :lo12:.LC49
	stp	x29, x30, [sp, 16]
	add	x29, sp, 16
	stp	x19, x20, [sp, 32]
	mov	w20, 0
	stp	x21, x22, [sp, 48]
	stp	x23, x24, [sp, 64]
	adrp	x23, .LANCHOR2
	str	x25, [sp, 80]
	add	x21, x23, :lo12:.LANCHOR2
	bl	printk
.L2161:
	add	x19, x23, :lo12:.LANCHOR2
	ldrh	w0, [x19, 2286]
	cmp	w0, w20
	bhi	.L2169
	ldp	x19, x20, [sp, 32]
	mov	w0, 0
	ldp	x21, x22, [sp, 48]
	ldp	x23, x24, [sp, 64]
	ldp	x29, x30, [sp, 16]
	ldr	x25, [sp, 80]
	add	sp, sp, 144
	ret
.L2169:
	strh	w20, [x29, 80]
	mov	w0, w20
	bl	ftl_get_


ecast
                (
                    DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
                    Random.Shared.Next(-20, 55),
                    summaries[Random.Shared.Next(summaries.Length)]
                ))
                .ToArray();
            return forecast;
        });

        return app;
    }

    private record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
    {
        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
    }
}


        companion object {
            val entries: Collection<MAC> by lazy {
                listOf(
                    HS256,
                    HS256_64,
                    HS384,
                    HS512,
                    UNOFFICIAL_HS1,
                )
            }
        }
    }

    companion object {
        val entries: Collection<CoseAlgorithm> by lazy { DataIntegrity.entries + SymmetricEncryption.entries }
    }

}

object CoseAlgorithmSerializer : KSerializer<CoseAlgorithm> {

    override val descriptor: SerialDescriptor =
        PrimitiveSerialDescriptor("CoseAlgorithmSerializer", PrimitiveKind.INT)

    override fun serialize(encoder: Encoder, value: CoseAlgorithm) {
        value.let { encoder.encodeInt(it.coseValue) }
    }

    override fun deserialize(decoder: Decoder): CoseAlgorithm {
        val decoded = decoder.decodeInt()
        return CoseAlgorithm.entries.first { it.coseValue == decoded }
    }

}

/** Tries to find a matching COSE algorithm. Note that COSE imposes curve restrictions on ECDSA based on the digest. */
fun SignatureAlgorithm.toCoseAlgorithm(): KmmResult<CoseAlgorithm.Signature> = catching {
    when (this) {
        is SignatureAlgorithm.ECDSA -> when (this.digest) {
            Digest.SHA256 -> CoseAlgorithm.Signature.ES256
            Digest.SHA384 -> CoseAlgorithm.Signature.ES384
            Digest.SHA512 -> CoseAlgorithm.Signature.ES512
            else -> throw UnsupportedCryptoException("ECDSA with ${this.digest} is unsupported by COSE")
        }

        is SignatureAlgorithm.RSA -> when (this.padding) {
            RSAPadding.PKCS1 -> when (this.digest) {
                Digest.SHA1 -> CoseAlgorithm.Signature.RS1
                Digest.SHA256 -> CoseAlgorithm.Signature.RS256
                Digest.SHA384 -> CoseAlgorithm.Signature.RS384
                Digest.SHA512 -> CoseAlgorithm.Signature.RS512
            }

            RSAPadding.PSS -> when (this.digest) {
                Digest.SHA256 -> CoseAlgorithm.Signature.PS256
                Digest.SHA384 -> CoseAlgorithm.Signature.PS384
                Digest.SHA512 -> CoseAlgorithm.Signature.PS512
                else -> throw UnsupportedCryptoException("RSA-PSS with ${this.digest} is unsupported by COSE")
            }
        }
    }
}

fun DataIntegrityAlgorithm.toCoseAlgorithm(): KmmResult<CoseAlgorithm.DataIntegrity> =
     when (this) {
        is SignatureAlgorithm -> toCoseAlgorithm()
        is MessageAuthenticationCode -> toCoseAlgorithm()
    }

/** Tries to find a matching COSE algorithm. Note that [CoseAlgorithm.MAC.HS256_64] cannot be mapped automatically. */
fun MessageAuthenticationCode.toCoseAlgorithm(): KmmResult<CoseAlgorithm.MAC> = catching {
    when (this) {
        HMAC.SHA1 -> CoseAlgorithm.MAC.UNOFFICIAL_HS1
        HMAC.SHA256 -> CoseAlgorithm.MAC.HS256
        HMAC.SHA384 -> CoseAlgorithm.MAC.HS384
        HMAC.SHA512 -> CoseAlgorithm.MAC.HS512
        is MessageAuthenticationCode.Truncated -> when {
            (inner == HMAC.SHA256) && (outputLength == 64.bit) -> CoseAlgorithm.MAC.HS256_64
            else -> throw UnsupportedCryptoException("$this has no COSE equivalent")
        }
    }
}

/** Tries to find a matching COSE algorithm. Note that only AES-GCM and ChaCha/Poly are supported. */
fun SymmetricEncryptionAlgorithm<*, *, *>.toCoseAlgorithm(): KmmResult<CoseAlgorithm.SymmetricEncryption> = catching {
    when (this) {
        SymmetricEncryptionAlgorithm.ChaCha20Poly1305 -> CoseAlgorithm.SymmetricEncryption.ChaCha20Poly1305
        SymmetricEncryptionAlgorithm.AES_128.GCM -> CoseAlgorithm.SymmetricEncryption.A128GCM
        SymmetricEncryptionAlgori


 ("dot rgt . up %f\n", dot (rgt, up));
                //  printf ("dot fwd . rgt\n %f", dot (fwd, rgt));

                cam_pos = cam_pos + math::vec3(fwd) * -move_to.v[2];
                cam_pos = cam_pos + math::vec3(up)  *  move_to.v[1];
                cam_pos = cam_pos + math::vec3(rgt) *  move_to.v[0];
                mat_trans = Mat4::translate(&Mat4::identity(), &math::vec3(cam_pos));

                view_mat = mat_rot.inverse() * mat_trans.inverse();
                gl::UniformMatrix4fv(view_mat_location, 1, gl::FALSE, view_mat.as_ptr());
            }

            match g_window.get_key(Key::Escape) {
                Action::Press | Action::Repeat => {
                    g_window.set_should_close(true);
                }
                _ => {}
            }

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

use super::resource::ResourceType;
use super::unit::{Unit, read_unit};
use crate::error::Result;

use identifier::{SoundGroupId, CivilizationId, AgeId, UnitId, ResearchId};
use chariot_io_tools::{ReadArrayExt, ReadExt};
use std::collections::{BTreeMap, HashMap};

use std::io::prelude::{Seek, Read};

#[derive(Default, Debug)]
pub struct CivilizationStartingValues {
    /// Starting resource values (for random map)
    resources: BTreeMap<ResourceType, f32>,

    /// Multiplier for trade
    trade_productivity: f32,

    /// Amount of food a farm provides; can increase with research
    farm_food_capacity: f32,

    /// Amount of a tribute that is removed as a penalty; can decrease with research
    tribute_penalty: f32,

    /// Multiplier for gold mined; increases with research
    gold_mine_productivity: f32,

    /// Used to initialize unit attributes for the civ
    age_id: Option<AgeId>,

    /// If not starting in the default age, grant the given tech based on what the starting age is
    tool_age_research_id: ResearchId,
    bronze_age_research_id: ResearchId,
    iron_age_research_id: ResearchId,

    attack_warning_sound_id: SoundGroupId,
}

#[derive(Default, Debug)]
pub struct Civilization {
    id: CivilizationId,
    enabled:


M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""))}else i.call(this,e)}}}));// Arabic (Algeria) [ar-dz]
import dayjs from '../index';
var locale = {
  name: 'ar-dz',
  weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  weekdaysMin: 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
  ordinal: function ordinal(n) {
    return n;
  },
  formats: {
    LT: 'HH:mm',
    LTS: 'HH:mm:ss',
    L: 'DD/MM/YYYY',
    LL: 'D MMMM YYYY',
    LLL: 'D MMMM YYYY HH:mm',
    LLLL: 'dddd D MMMM YYYY HH:mm'
  },
  meridiem: function meridiem(hour) {
    return hour > 12 ? 'م' : 'ص';
  },
  relativeTime: {
    future: 'في %s',
    past: 'منذ %s',
    s: 'ثوان',
    m: 'دقيقة',
    mm: '%d دقائق',
    h: 'ساعة',
    hh: '%d ساعات',
    d: 'يوم',
    dd: '%d أيام',
    M: 'شهر',
    MM: '%d أشهر',
    y: 'سنة',
    yy: '%d سنوات'
  }
};
dayjs.locale(locale, null, true);
export default locale;// Ukrainian [uk]
import dayjs from '../index';
var monthFormat = 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_');
var monthStandalone = 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_');
var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;

function plural(word, num) {
  var forms = word.split('_');
  return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 1


-distancia-con-arduino-y-el-sensor-gp2y0e03/
>
> Todo el contenido distribuido bajo licencia CCC, salvo indicación expresa

## Ejemplos de código
```cpp
const int sensorPin = A0;
void setup()
{
  Serial.begin(9600);
  pinMode(sensorPin, INPUT);
}

void loop()
{
  auto raw = analogRead(sensorPin);
  Serial.println(raw);

  delay(100);
}
```

```cpp
#include <Wire.h>

 // 7 highest bits

#define ADDRESS         (0x80 >> 1)

#define SHIFT_ADDR      0x35

#define DISTANCE_ADDR   0x5E

#define RIGHT_EDGE_ADDR 0xF8 // C

#define LEFT_EDGE_ADDR  0xF9 // A

#define PEAK_EDGE_ADDR  0xFA // B

uint8_t distance_raw[2] = { 0 };
uint8_t shift = 0;
uint8_t distance_cm = 0;
char buf[100];

void setup()
{
  Wire.begin();
  Serial.begin(9600);

  delay(2000);

  Serial.println("Initializing");

  Wire.beginTransmission(ADDRESS);
  Wire.write(byte(SHIFT_ADDR));
  Wire.endTransmission();

  Wire.requestFrom(ADDRESS, 1);
  if (1 <= Wire.available())
  {
    shift = Wire.read();
  }

  Serial.print("Read shift bit: ");
  Serial.println(shift, HEX);
}

void loop()
{
  // Read basic measurement
  Wire.beginTransmission(ADDRESS);
  Wire.write(byte(DISTANCE_ADDR));
  Wire.endTransmission();

  Wire.requestFrom(ADDRESS, 2);

  if (2 <= Wire.available())
  {
    distance_raw[0] = Wire.read();
    distance_raw[1] = Wire.read();

    // Print distance in cm
    distance_cm = (distance_raw[0] * 16 + distance_raw[1]) / 16 / (int)pow(2, shift);
    sprintf(buf, "Distance %u cm", distance_cm);
    Serial.println(buf);
  }
  else
  {
    Serial.println("Read error");
  }
  delay(1000);
}
```

> Códigos de ejemplo de los tutoriales de www.luisllamas.es
>
> Enlace entrada: https://www.luisllamas.es/como-usar-extensor-i2c-tca9548a-y-arduino/
>
> Todo el contenido distribuido bajo licencia CCC, salvo indicación expresa

## Escaner I2C
```csharp
#include "Wire.h"

void scanI2CBus(byte from_addr, byte to_addr, void(*callback)(byte address, byte result) )
{
  byte rc;
  byte data = 0;
  for( byte addr = from_addr; addr <= to_addr; addr++ ) {
    rc = twi_writeTo(addr, &data, 0, 1, 0);
    callback( addr, rc );
  }
}

void scanFunc( byte addr, byte result ) {
  Serial.print("addr: ");
  Serial.print(addr,DEC);
  Serial.print( (result==0) ? " Encontrado!":"       ");
  Serial.print( (addr%4) ? "\t":"\n");
}

const byte start_address = 8;
const byte end_address = 119;

void setup()
{
    Wire.begin();

    Serial.begin(9600);
    Serial.print("Escaneando bus I2C...");
    scanI2CBus( start_address, end_address, scanFunc );
    Serial.println("\nTerminado");
}

void loop(


    }
    return $result;
  }
  Deployment._() : super();
  factory Deployment.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory Deployment.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'Deployment',
      package:
          const $pb.PackageName(_omitMessageNames ? '' : 'google.appengine.v1'),
      createEmptyInstance: create)
    ..m<$core.String, FileInfo>(1, _omitFieldNames ? '' : 'files',
        entryClassName: 'Deployment.FilesEntry',
        keyFieldType: $pb.PbFieldType.OS,
        valueFieldType: $pb.PbFieldType.OM,
        valueCreator: FileInfo.create,
        valueDefaultOrMaker: FileInfo.getDefault,
        packageName: const $pb.PackageName('google.appengine.v1'))
    ..aOM<ContainerInfo>(2, _omitFieldNames ? '' : 'container',
        subBuilder: ContainerInfo.create)
    ..aOM<ZipInfo>(3, _omitFieldNames ? '' : 'zip', subBuilder: ZipInfo.create)
    ..aOM<CloudBuildOptions>(6, _omitFieldNames ? '' : 'cloudBuildOptions',
        subBuilder: CloudBuildOptions.create)
    ..hasRequiredFields = false;

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

  $pb.BuilderInfo get info_ => _i;

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

  /// Manifest of the files stored in Google Cloud Storage that are included
  /// as part of this version. All files must be readable using the
  /// credentials supplied with this call.
  @$pb.TagNumber(1)
  $core.Map<$core.String, FileInfo> get files => $_getMap(0);

  /// The Docker image for the container that runs the version.
  /// Only applicable for instances running in the App Engine flexible environment.
  @$pb.TagNumber(2)
  ContainerInfo get container => $_getN(1);
  @$pb.TagNumber(2)
  set container(ContainerInfo v) {
    setField(2, v);
  }

  @$pb.TagNumber(2)
  $core.bool hasContainer() => $_has(1);
  @$pb.TagNumber(2)
  void clearContainer() => clearField(2);
  @$pb.TagNumber(2)
  ContainerInfo ensureContainer() => $_ensure(1);

  /// The zip file for this deployment, if this is a zip deployment.
  @$pb.TagNumber(3)
  ZipInfo get zip => $_getN(2);
  @$pb.TagNumber(3)
  set


list(ki) if ki else list(range(256)) for ki in key]
print(key)
print()

for k16 in tqdm(itertools.product(*key), total=prod([len(ki) for ki in key])):
    k = bytes(k16)
    aes = AES.new(k, AES.MODE_ECB)
    p = aes.decrypt(c)
    try:
        p = unpad(p, 16)
    except:
        continue
    if b'flag' in p:
        print(k.hex())
        print(p)
        print()

''' 66%|████████████████████████████▏              | 43992636/67108864 [18:25<09:26, 40781.32it/s]97ca6080f575e646e557f755bf15685eb'flag{uniform54349juliet:GL2aGs7ys8ygcW0kFBPLbwEdjLbwNltiPdX_ANqtOFbUpEh_ciY8tWZd4y2VblkUhOl-PxXJdJYK86pIHmmwcw0}''''

```

# Windows 上构建 Magisk 踩坑

你以为 magisk 的构建只要简单的 `python build.py all` 吗？

## ONDK

一上来就报错：NDK 找不到。我以为 Magisk 用的 Android NDK ，自己的 NDK 已经下了十甚至九个版本怎么会找不到，仔细一看，发现用的是自己造的轮子 `ONDK`

[topjohnwu/ondk: Oxidized NDK - NDK repackaged with Rust toolchain](https://github.com/topjohnwu/ondk)

考虑到用 `build.py ndk` 下载可能会很慢，因此自己找对版本下载了，然后解压到 `$ANDROID_SDK_ROOT/ndk/magisk` 即可。

## jlink

构建 stub 的时候报错 jlink 找不到，原来自己系统用的 LibericaJRE-16 竟然没这个玩意。

干脆用 AS 的 JDK:

```bat
:: magiskenv.bat
@echo off
set _PATH=%PATH%
set PATH=C:\Program Files\Android\Android Studio\jre\bin;%_PATH%
set ANDROID_SDK_ROOT=C:\Users\mspri\AppData\Local\Android\Sdk
set JAVA_HOME=C:\Program Files\Android\Android Studio\jre

cmd /c%*

set PATH=%_PATH%
```

## cxx、 git symbolic link 与 Windows

stub 构建顺利通过，接下来是 native ，然而很快又出了个问题：

```
Caused by:
  process didn't exit successfully: `D:\codes\magisk_source\master\Magisk\native\src\external\cxx-rs\target\release\build\cxxbridge-cmd-983ad08e8f052e4a\build-script-build` (exit code: 1)
  --- stderr

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  When building `cxx` from a git clone, git's symlink support needs
  to be enabled on platforms that have it off by default (Windows).
  Either use:

     $ git config --global core.symlinks true

  prior to cloning, or else use:

     $ git clone -c core.symlinks=true https://github.com/dtolnay/cxx

  for the clone.

  Symlinks are only required when compiling locally from a clone of
  t


end > .footer {
  color: var(--app-navigation-color);
  font-family: var(--app-font-family-advanced);
  background: var(--app-foot-background);
  border-top: 1px solid var(--app-edge-color);
  text-align: center;
  height: 48px;
  font-size: 14px;
  flex-shrink: 0;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

}

/*--------------------------------------------------------------------------

TypeBox

The MIT License (MIT)

Copyright (c) 2017-2025 Haydn Paterson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---------------------------------------------------------------------------*/

.backend {
  position: fixed;
  width: 100%;
  height: 100%;
}
.things-list {
 margin: 8px;
}

.things-list md-grid-tile {
 transition: all 400ms ease-out 50ms;
}

.things-list .avatar-icon {
  width: 50%;
  height: 50%; }

.things-list .avatar-icon svg {
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%; }

.things-list .s64 {
  font-size: 64px; }

.things-list .s32 {
  font-size: 48px; }

.things-list .avatar-icon.fa {
  display: block;
  padding-left: 0; }

.things-list .avatar-icon.s32 span {
  padding-left: 8px; }

.things-list md-grid-list {
  margin: 8px; }

.things-list .gray {
  background: #f5f5f5; }

.things-list .green {
  background: #b9f6ca; }

.things-list .yellow {
  background: #ffff8d; }

.things-list .blue {
  background: #84ffff; }

.things-list .darkBlue {
  background: #80d8ff; }

.things-list .deepBlue {
  background: #448aff; }

.things-list .purple {
  background: #b388ff; }

.things-list .lightPurple {
  background: #8c9eff; }

.things-list .red {
  background: #ff8a80; }

.things-list .pink {
  background: #ff80ab; }

.things-list md-grid-tile .avatar-icon {
  padding-bottom: 32px; }

.things-list md-grid-tile md-gr


力タイプを使用する (Use Non-Caching Input Types for Sensitive Fields)](best-practices/MASTG-BEST-0019.md)
  - [MASTG-BEST-0020 GMS セキュリティプロバイダを更新する (Update the GMS Security Provider)](best-practices/MASTG-BEST-0020.md)
  - [MASTG-BEST-0021 適切なエラーおよび例外処理を確保する (Ensure Proper Error and Exception Handling)](best-practices/MASTG-BEST-0021.md)

### ナレッジ

- [ナレッジ一覧](knowledge.md)
  - Android
    - MASVS-STORAGE: ストレージ

    - MASVS-CRYPTO: 暗号
      - [MASTG-KNOW-0011 セキュリティプロバイダ (Security Provider)](knowledge/android/MASVS-CRYPTO/MASTG-KNOW-0011.md)
      - [MASTG-KNOW-0012 鍵生成 (Key Generation)](knowledge/android/MASVS-CRYPTO/MASTG-KNOW-0012.md)
      - [MASTG-KNOW-0013 乱数生成 (Random number generation)](knowledge/android/MASVS-CRYPTO/MASTG-KNOW-0013.md)

    - MASVS-AUTH: 認証と認可
      - [MASTG-KNOW-0001 生体認証 (Biometric Authentication)](knowledge/android/MASVS-AUTH/MASTG-KNOW-0001.md)
      - [MASTG-KNOW-0002 FingerprintManager](knowledge/android/MASVS-AUTH/MASTG-KNOW-0002.md)

    - MASVS-NETWORK: ネットワーク通信
      - [MASTG-KNOW-0014 Android Network Security Configuration](knowledge/android/MASVS-NETWORK/MASTG-KNOW-0014.md)
      - [MASTG-KNOW-0015 証明書ピン留め (Certificate Pinning)](knowledge/android/MASVS-NETWORK/MASTG-KNOW-0015.md)
      - [MASTG-KNOW-0016 TBD](knowledge/android/MASVS-NETWORK/MASTG-KNOW-0016.md)

    - MASVS-PLATFORM: プラットフォーム連携

    - MASVS-CODE: コード品質
      - [MASTG-KNOW-0003 アプリ署名 (App Signing)](knowledge/android/MASVS-CODE/MASTG-KNOW-0003.md)
      - [MASTG-KNOW-0004 サードパーティーライブラリ (Third-Party Libraries)](knowledge/android/MASVS-CODE/MASTG-KNOW-0004.md)
      - [MASTG-KNOW-0005 メモリ破損バグ (Memory Corruption Bugs)](knowledge/android/MASVS-CODE/MASTG-KNOW-0005.md)
      - [MASTG-KNOW-0006 バイナリ保護メカニズム (Binary Protection Mechanisms)](knowledge/android/MASVS-CODE/MASTG-KNOW-0006.md)
      - [MASTG-KNOW-0007 デバッグ可能アプリ (Debuggable Apps)](knowledge/android/MASVS-CODE/MASTG-KNOW-0007.md)
      - [MASTG-KNOW-0008 デバッグ情報とデバッグシンボル (Debugging Information and Debug Symbols)](knowledge/android/MASVS-CODE/MASTG-KNOW-0008.md)
      - [MASTG-KNOW-0009 StrictMode](knowledge/android/MASVS-CODE/MASTG-KNOW-0009.md)
      - [MASTG-KNOW-


 epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
      |    "comment": "...",       (string) If a comment is associated with the transaction.
      |    "label" : "label"       (string) A comment for the address/transaction, if any
      |    "to": "...",            (string) If a comment to is associated with the transaction.
      |  ],
      |  "lastblock": "lastblockhash"     (string) The hash of the last block
      |}
      |
      |Examples:
      |> bitcoin-cli listsinceblock
      |> bitcoin-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
      |> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listsinceblock", "params": ["000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
    """.trimMargin()
}

package io.scalechain.blockchain.proto.codec.messages

import io.kotlintest.KTestJUnitRunner
import io.netty.buffer.Unpooled
import io.scalechain.blockchain.proto.*
import io.scalechain.blockchain.proto.codec.*
import io.scalechain.util.HexUtil.bytes
import org.junit.runner.RunWith

/**
<Bitcoin Core Packets Captured>
  <NET> SocketSendData
  <Header> Magic:ù¾´Ù, Command:getaddr, Size:0, Checksum:-488573347
  dumping data len : 24
  00000000  f9 be b4 d9 67 65 74 61  64 64 72 00 00 00 00 00  ù¾´Ùgetaddr.....
  00000010  00 00 00 00 5d f6 e0 e2                           ....>öàâ

  */

@RunWith(KTestJUnitRunner::class)
class GetAddrSpec : EnvelopeTestSuite<GetAddr>()  {

  override val codec = GetAddrCodec

  override val envelopeHeader = bytes(
    """
      f9 be b4 d9 67 65 74 61  64 64 72 00 00 00 00 00
      00 00 00 00 5d f6 e0 e2
    """)

  override val payload = bytes("")

  override val envelope = BitcoinMessageEnvelope(
    Magic.MAIN,
    "getaddr",
    payload.size,
    Checksum.fromHex("5d f6 e0 e2"),
    Unpooled.wrappedBuffer(payload)
  )

  override val message = GetAddr()

}
package io.scalechain.blockchain.proto.codec.messages

import io.kotlintest.KTestJUnitRunner
import io.netty.buffer.Unpooled
import io.scalechain.blockchain.proto.*
import io.scalechain.blockchain.proto.codec.*
import io.scalechain.util.HexUtil.bytes
import org.junit.runner.RunWith

/**
<Bitcoin Core Packets Captured>
  <NET> recv; header:
  <Header> Magic:ù¾´Ù, Command:verack, Size:0, Checksum:-488573347
  dumping data len : 24
  00000000  f9 be b4 d9 76 65 72 61  63 6b 00 00 00 00 00 00  ù¾´Ùverack......
  00000010  00 00 00 00 5d f6 e0 e2                           ....>öàâ
  */

@RunWith(KTestJUnitRunner::class)
class VerackSpec : EnvelopeTestSuite<Verack>()  {

  override val codec = VerackCodec

  override val envelopeHeader = bytes(
    """
      f9 be b4 d9 76 65 72 61  63 6b 00 00 00 00 00 00
      00 00 00 00 5d f6 e0 e2
    """)

  override val payload = bytes("")

  override val envelope = BitcoinMessageEnvelope(
    Magic.MAIN,
    "verack",
    payload.size,
    Checksum.fromHex("5d f6 e0 e2"),
    Unpooled.wrappedBuffer(payload)
  )

  override val message = Verack()

}
package io.scalechain.blockchain.proto.codec

import io.netty.buffer.ByteBuf
import io.scalech


   }

        //TODO: Terrible Hack
        public void Crashed()
        {
            SDL2.SDL_Quit();
        }

        const int FPS_MAXSAMPLES = 50;
        int tickindex = 0;
        double ticksum = 0;
        double[] ticklist = new double[FPS_MAXSAMPLES];

        double CalcAverageTick(double newtick)
        {
            ticksum -= ticklist[tickindex];
            ticksum += newtick;
            ticklist[tickindex] = newtick;
            if (++tickindex == FPS_MAXSAMPLES)
                tickindex = 0;
            return ((double)ticksum / FPS_MAXSAMPLES);
        }

        int timeindex = 0;
        double timesum = 0;
        double[] timelist = new double[FPS_MAXSAMPLES];

        double CalcAverageTime(double newtick)
        {
            timesum -= timelist[timeindex];
            timesum += newtick;
            timelist[timeindex] = newtick;
            if (++timeindex == FPS_MAXSAMPLES)
                timeindex = 0;
            return ((double)timesum / FPS_MAXSAMPLES);
        }

        //Convert from SDL2 button to saner button
        MouseButtons GetMouseButton(byte b)
        {
            if (b == SDL2.SDL_BUTTON_LEFT)
                return MouseButtons.Left;
            if (b == SDL2.SDL_BUTTON_MIDDLE)
                return MouseButtons.Middle;
            if (b == SDL2.SDL_BUTTON_RIGHT)
                return MouseButtons.Right;
            if (b == SDL2.SDL_BUTTON_X1)
                return MouseButtons.X1;
            if (b == SDL2.SDL_BUTTON_X2)
                return MouseButtons.X2;
            throw new Exception("SDL2 gave undefined mouse button"); //should never happen
        }

        unsafe string GetEventText(ref SDL2.SDL_Event e)
        {
            byte[] rawBytes = new byte[SDL2.SDL_TEXTINPUTEVENT_TEXT_SIZE];
            fixed (byte* txtPtr = e.text.text)
            {
                Marshal.Copy((IntPtr)txtPtr, rawBytes, 0, SDL2.SDL_TEXTINPUTEVENT_TEXT_SIZE);
            }
            int nullIndex = Array.IndexOf(rawBytes, (byte)0);
            string text = Encoding.UTF8.GetString(rawBytes, 0, nullIndex);
            return text;
        }
        bool textInputEnabled = false;
        public void EnableTextInput()
        {
            if (!textInputEnabled)
            {
                SDL2.SDL_StartTextInput();
                textInputEnabled = true;
            }
        }
        public void DisableTextInput()
        {
            if (textInputEnabled)
            {
                SDL2.SDL_StopTextInput();
                textInputEnabled = false;
            }
        }

        public unsafe void SetTextInputRect(Rectangle? rect)
        {
            if (rect == null)
                SDL2.SDL_SetTextInputRect(null);
            else
            {
                var sr = new SDL2.SDL_Rect()
                {
                    x = rect.Value.X,
                    y = rect.Value.Y,
                    w = rect.Value.Width,
                    h = rect.Value.Height
                };
                SDL2.SDL_SetTextInputRect(&sr);
            }
        }

        public void Exit()
        {
            running = false;
        }
    }
}


                       // CHECK-NEXT: File 0, [[@LINE+1]]:3 -> [[@LINE+2]]:4 = #6
  e: f: ;                    // CHECK-NEXT: File 0, [[@LINE]]:6 -> [[@LINE+1]]:4 = #7
  }
  func();                    // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+3]]:2 = ((#0 + #7) - #1)
  test1(0);
  test2(2);
}
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s | FileCheck %s

#define START_SCOPE {
#define END_SCOPE }

// CHECK: {{_Z2f0v|\?f0@@YAXXZ}}:
// CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:20 = 0
inline void f0() {}

// CHECK: {{_Z2f1v|\?f1@@YAXXZ}}:
// CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:31 = 0
inline void f1() START_SCOPE }

// CHECK: {{_Z2f2v|\?f2@@YAXXZ}}:
// CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:29 = 0
inline void f2() { END_SCOPE

// CHECK: {{_Z2f3v|\?f3@@YAXXZ}}:
// CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:39 = 0
inline void f3() START_SCOPE END_SCOPE

// CHECK: {{_Z2f4v|\?f4@@YAXXZ}}:
// CHECK-NEXT: File 0, [[@LINE+2]]:10 -> [[@LINE+3]]:2 = 0
inline void f4()
#include "Inputs/starts_a_scope_only"
}

// CHECK: {{_Z2f5v|\?f5@@YAXXZ}}:
// CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+2]]:36 = 0
inline void f5() {
#include "Inputs/ends_a_scope_only"

// CHECK: {{_Z2f6v|\?f6@@YAXXZ}}:
// CHECK-NEXT: File 0, [[@LINE+2]]:10 -> [[@LINE+3]]:36 = 0
inline void f6()
#include "Inputs/starts_a_scope_only"
#include "Inputs/ends_a_scope_only"
// REQUIRES: x86-registered-target
// RUN: %clang -target i386-apple-darwin -std=c++11 -fblocks -Wframe-larger-than=70 -Wno-stdlibcxx-not-found -Xclang -verify -o /dev/null -c %s
// RUN: %clang -target i386-apple-darwin -std=c++11 -fblocks -Wframe-larger-than=70 -Wno-stdlibcxx-not-found -Xclang -verify -o /dev/null -c %s -DIS_SYSHEADER

// Test that:
//  * The driver passes the option through to the backend.
//  * The frontend diagnostic handler 'demangles' and resolves the correct function definition.

// Test that link invocations don't emit an "argument unused during compilation" diagnostic.
// RUN: touch %t.o
// RUN: %clang -Werror -Wno-msvc-not-found -Wno-liblto -Wframe-larger-than=0 %t.o -###  2>&1 | not grep ' error: '

// TODO: Support rich backend diagnostics for Objective-C methods.

// Backend diagnostics aren't suppressed in system headers because such results
// are significant and actionable.
#ifdef IS_HEADER

#ifdef IS_SYSHEADER
#pragma clang system_header
#endif

extern void doIt(char *);

void frameSizeWarning(int, int) {}

void frameSizeWarning();

void frameSizeWarning


the file system or acquire any file system resources.

To define a *FreeCallback* callback function that is named *MyFreeFunction*, you must first provide a function declaration that the [Static Driver Verifier](../devtest/static-driver-verifier.md) (SDV) and other verification tools require, as follows:

```cpp
FREE_FUNCTION MyFreeFunction;
```

And then implement your callback function as follows:

```cpp
VOID
 MyFreeFunction (
 __in PVOID Buffer
    )
  {...}
```

## Requirements

| Requirement type | Requirement |
| ---------------- | ----------- |
| Minimum supported client | Windows Vista |
| Header                   | *Wdm.h* (include *Wdm.h* or *Ntddk.h*) |
| IRQL                     | <= APC_LEVEL |

## See also

[**FsRtlTeardownPerFileContexts**](/windows-hardware/drivers/ddi/ntifs/nf-ntifs-fsrtlteardownperfilecontexts)

[**FsRtlTeardownPerStreamContexts**](/windows-hardware/drivers/ddi/ntifs/nf-ntifs-fsrtlteardownperstreamcontexts)

[**FSRTL_PER_FILE_CONTEXT**](/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_fsrtl_per_file_context)

[**FSRTL_PER_STREAM_CONTEXT**](/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_fsrtl_per_stream_context)

[Tracking Per-File Context in a Legacy File System Filter Driver](tracking-per-file-context-in-a-legacy-file-system-filter-driver.md)

[Tracking Per-Stream Context in a Legacy File System Filter Driver](file-streams--stream-contexts--and-per-stream-contexts.md)
---
title: GetVirtualDesktopState method of the Win32_RDMSVirtualDesktop class
description: Retrieves the state of the virtual desktop.
ms.assetid: 176096ba-2b5f-428c-9216-02e3e97be64e
ms.tgt_platform: multiple
keywords:
- GetVirtualDesktopState method Remote Desktop Services
- GetVirtualDesktopState method Remote Desktop Services , Win32_RDMSVirtualDesktop class
- Win32_RDMSVirtualDesktop class Remote Desktop Services , GetVirtualDesktopState method
topic_type:
- apiref
api_name:
- Win32_RDMSVirtualDesktop.GetVirtualDesktopState
api_location:
- RDMS.dll
api_type:
- COM
ms.topic: reference
ms.date: 05/31/2018
---

# GetVirtualDesktopState method of the Win32\_RDMSVirtualDesktop class

Retrieves the state of the virtual desktop.

## Syntax

```mof
uint32 GetVirtualDesktopState(
  [out] uint32 VMState
);
```

## Parameters

*VMState* \[out\]

Receives a value that indicates the state of the virtual machine.

This parameter can bet set to one of the following values:

**Unknown** (0 (Default))

The state of the virtual machine could not be determined.

**Enabled** (2)

The virtual machine is running.

**Disable


gImm；4.如果输入是 Expr 的元组/列表，则返回 Relax.Tuple。

**注意**

1. tvm.tir.StringImm 因歧义而不被允许，它可以是 Relax.StringImm 或 Relax.PrimValue。

## **tvm.relax.build(*mod:***[IRModule](https://tvm.apache.org/docs/reference/api/python/ir.html#tvm.ir.IRModule)**,*target:***[Target](https://tvm.apache.org/docs/reference/api/python/target.html#tvm.target.Target)***|***[str](https://docs.python.org/3/library/stdtypes.html#str)***|***[None](https://docs.python.org/3/library/constants.html#None)***= None*,*params:***[Dict](https://docs.python.org/3/library/typing.html#typing.Dict)***[***[str](https://docs.python.org/3/library/stdtypes.html#str)***,***[list](https://docs.python.org/3/library/stdtypes.html#list)***] |***[None](https://docs.python.org/3/library/constants.html#None)***= None*,*relax_pipeline:***[None](https://docs.python.org/3/library/constants.html#None)***|***[str](https://docs.python.org/3/library/stdtypes.html#str)***|***[Pass](https://tvm.apache.org/docs/reference/api/python/transform.html#tvm.transform.Pass)***= 'default'*,*tir_pipeline:***[None](https://docs.python.org/3/library/constants.html#None)***|***[str](https://docs.python.org/3/library/stdtypes.html#str)***|***[Pass](https://tvm.apache.org/docs/reference/api/python/transform.html#tvm.transform.Pass)***= 'default'*,*exec_mode:***[str](https://docs.python.org/3/library/stdtypes.html#str)***= 'bytecode'*,***,*system_lib:***[bool](https://docs.python.org/3/library/functions.html#bool)***|***[None](https://docs.python.org/3/library/constants.html#None)***= None*)→ Executable**

构建一个 IRModule 到 VM 可执行文件。
* **参数：**
   * **mod** ()：要构建的输入 IRModule。
   * **target** (Optional*[**Union**[, ]])：「一个构建目标，可以包含可选的主机端编译目标。」
   * 当 TVM 编译设备特定程序（如 CUDA）时，还需要主机（CPU）端代码与驱动程序交互，以正确设置维度和参数*。*`host` 用于指定主机端代码生成目标。默认情况下，如果启用了 `llvm`*，*则使用它，否则使用 `stackvm` 解释器。
   * **params** (Optional[**Dict**[,]])：将绑定的输入 IRModule 的参数。
   * **relax_pipeline** (str = "default")：要使用的 Relax 编译管道。
   * **tir_pipelinie** (str = "default")**：** 要使用的 TIR 编译管道。
   * **exec_mode** ()：执行模式。
   * **system_lib** (Optional[])：是否构建正在静态打包的系统库，并自动将生成的函数注册到系统中。默�


_head:
  mov rsi, [rsp + r8]
  add rsi, rdx
  mov ax, word ptr [rsi]
  mov cl, byte ptr [rsi + 2]
  mov word ptr [rdi], ax
  mov byte ptr [rdi + 2], cl
  mov rdi, rsi
  sub r8, 16
  jae cycle_final_3_inner_head
  mov word ptr [rsi], r9w
  mov byte ptr [rsi + 2], r10b
  lea rsp, [rbp - 80]
  ret

align 8
cycle_final_5:
  endbr64
  add rdi, rdx
  mov r9d, dword ptr [rdi]
  mov r10b, byte ptr [rdi + 4]
cycle_final_5_inner_head:
  mov rsi, [rsp + r8]
  add rsi, rdx
  mov eax, dword ptr [rsi]
  mov cl, byte ptr [rsi + 4]
  mov dword ptr [rdi], eax
  mov byte ptr [rdi + 4], cl
  mov rdi, rsi
  sub r8, 16
  jae cycle_final_5_inner_head
  mov dword ptr [rsi], r9d
  mov byte ptr [rsi + 4], r10b
  lea rsp, [rbp - 80]
  ret

align 8
cycle_final_6:
  endbr64
  add rdi, rdx
  mov r9d, dword ptr [rdi]
  mov r10w, word ptr [rdi + 4]
cycle_final_6_inner_head:
  mov rsi, [rsp + r8]
  add rsi, rdx
  mov eax, dword ptr [rsi]
  mov cx, word ptr [rsi + 4]
  mov dword ptr [rdi], eax
  mov word ptr [rdi + 4], cx
  mov rdi, rsi
  sub r8, 16
  jae cycle_final_6_inner_head
  mov dword ptr [rsi], r9d
  mov word ptr [rsi + 4], r10w
  lea rsp, [rbp - 80]
  ret

align 8
cycle_final_7:
  endbr64
  add rdi, rdx
  movss xmm0, dword ptr [rdi]
  mov r9w, word ptr [rdi + 4]
  mov r10b, byte ptr [rdi + 6]
cycle_final_7_inner_head:
  mov rsi, [rsp + r8]
  add rsi, rdx
  mov eax, dword ptr [rsi]
  mov r11w, word ptr [rsi + 4]
  mov cl, byte ptr [rsi + 6]
  mov dword ptr [rdi], eax
  mov word ptr [rdi + 4], r11w
  mov byte ptr [rdi + 6], cl
  mov rdi, rsi
  sub r8, 16
  jae cycle_final_7_inner_head
  movss dword ptr [rsi], xmm0
  mov word ptr [rsi + 4], r9w
  mov byte ptr [rsi + 6], r10b
  lea rsp, [rbp - 80]
  ret
}