.is_some() {
            return self.0.cast(&DataType::Float64)?.rolling_min(options);
        }
        rolling_agg(
            &self.0,
            options,
            &rolling::no_nulls::rolling_min,
            &rolling::nulls::rolling_min,
            Some(&super::rolling_kernels::no_nulls::rolling_min),
        )
    }

    fn rolling_max(&self, options: RollingOptionsImpl) -> Result<Series> {
        if options.weights.is_some() {
            return self.0.cast(&DataType::Float64)?.rolling_max(options);
        }
        rolling_agg(
            &self.0,
            options,
            &rolling::no_nulls::rolling_max,
            &rolling::nulls::rolling_max,
            Some(&super::rolling_kernels::no_nulls::rolling_max),
        )
    }

    fn rolling_var(&self, options: RollingOptionsImpl) -> Result<Series> {
        self.0.cast(&DataType::Float64)?.rolling_var(options)
    }

    fn rolling_std(&self, options: RollingOptionsImpl) -> Result<Series> {
        self.0.cast(&DataType::Float64)?.rolling_std(options)
    }

    fn rolling_mean(&self, options: RollingOptionsImpl) -> Result<Series> {
        self.0.cast(&DataType::Float64)?.rolling_mean(options)
    }
}
//
// Copyright 2020 bplist Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
//

//! # The bplist object model.
//!
//! The bplist format version 00 supports the following object kinds:
//!
//! 1. Boolean.
//! 2. Integers, up to 64 bits long.
//! 3. Real, single- and double-precision.
//! 4. Data.
//! 5. Date.
//! 6. String.
//! 7. Uid.
//! 8. Array.
//! 9. Dictionary.
//!
//! # References
//!
//! 1. https://github.com/opensource-apple/CF/blob/master/ForFoundationOnly.h
//! 2. https://opensource.apple.com/source/CF/CF-855.17/CFBinaryPList.c

/// A date structure roughly equivalent to an `NSDate`.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct Date {
    /// A double-precision 64-bit offset, in seconds, from the Core Data Epoch.
    /// This is defined as 1 January 2001, 00:00:00 UTC.
    pub absolute_time: ordered_float::OrderedFloat<f64>,
}

/// Represents a bplist uid.
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct Uid(pub u64);

/// Represents any valid bplist object.
///
/// See the `bplist::object` module documentation for usage examples.
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub enum Object {
    /// Represents a bplist boolean, like `NSNumber`.
    Boolean(bool),

    /// Represents a bplist integral value of up to 64 bits, like `NSNumber`.
    Integer(i64),

    /// Represents a bplist floating-point value, like `NSNumber`.
    ///
    /// Unlike normal `f64` values, these values have a defined order, implementing
    /// `Ord`, `Eq` and `Hash` in addition to `PartialOrd` and `PartialEq`.
    /// This allows them to be used as keys and values in Dictionaries.
    Real(ordered_float::OrderedFloat<f64>),

    /// Represents a bplist data instance, like `NSData`.
    Data(Vec<u8>),

    /// Represent


def main():
  try:
    valor = int(input("> Digite um número POSITIVO: "))

    if valor < 0:
      raise ValueError("negative value")

    print(f"O número é: {valor}")
  except BaseException as erro:
    print(f"[ERROR] Ocorreu um erro: {erro}")

main()


com/slavfox/godot_pid_controller or https://github.com/fire/godot-pid/blob/master/PID_Controller/PID_Controller.gd).
- Info tab: make clickable entries that expand to tutorial entries.
- Split LOD system into objects / environment / ship categories and allow maximum LOD level.
- Take into account star death zone based on ship's reflection / radiation ability.
- Add solar prominences.

## Refactor
- Refactor ship code.
- **Rename all the space objects to their proper names.**
- Refactor nav list scripts.

## Fix
- Keyboard keys behavior (also refactor).
- Panic screen scaling.
# System: Elace
System data

#### System Infocard data
```
Temperature zone data by main star:
* Mineral melting line: < 0.145 AU
* Hot zone   :   0.145 ... 0.374 AU
* Warm zone  :   0.374 ... 1.302 AU
* Temp. zone :   1.302 ... 1.841 AU
* Cold zone  :   1.841 ... 5.284 AU
* Frost line : > 5.284 AU
```
```
Дані температурного зонування відносно основної зірки:
* Межа плавлення мінералів: < 0.145 а.о.
* Гаряча зона  :   0.145 ... 0.374 а.о.
* Тепла зона   :   0.374 ... 1.302 а.о.
* Помірна зона :   1.302 ... 1.841 а.о.
* Холодна зона :   1.841 ... 2.813 а.о.
* Межа кригоутворення : > 5.284 а.о.
```
#### GODOT data
```
* System ID: 0
* Star cluster: unspecified
* System zone codename: STAR_0_SYSTEM_ZONE
* System codename: STAR_0_SYSTEM
* System translation name codename: NAME_STAR_0_SYSTEM
* System translation description codename: DESC_STAR_0_SYSTEM
* System name: Elace
* System description: see above. Optionally add lore.
* System zone size: 1.83e+13
* System autopilot range: 1.83e+13
```

---
Primary star : Elace A, type: F3

#### Star pseudo-color
![b4ff00](Colors/b4ff00.png)
#### Star Infocard data
```
Absolute units:
* Size: 1.82e+09 m
* Mass: 2.52e+30 kg
* Temperature: 6904 K
* Luminosity: 1.33e+27 W

Sun-relative units:
* Size: 1.306 D
* Mass: 1.266 M
* Temperature: 1.2 T
* Luminosity: 3.49 L

Spectral data:
* Type: F3
* Peak wavelength: 420.0 nm
* Peak wavelength type: visible

```
```
Абсолютні величини:
* Розмір: 1.82e+09 м
* Маса: 2.52e+30 кг
* Температура: 6904 К
* Світність: 1.33e+27 Вт

Величини відносно Сонця:
* Розмір: 1.306 D
* Маса: 1.266 M
* Температура: 1.2 T
* Світність: 3.49 L

Спектральні дані:
* Тип: F3
* Пікова довжина хвилі: 420.0 нм
* Тип пікового випромінювання: visible

```
#### GODOT data
```
* Star zone codename: STAR_0_ZONE
* Star codename: STAR_0
* Star translation name codename: NAME_STAR_0
* Star translation description codename: DESC_STAR_0
* Star name: Elace A
* Star description: see above.
* Star zone size: 9.10e+10
* Star death zone size: 1.19e+10
* Star size: 1.82e+09
* Star flare distance: 9.10e+10


stFlair(type: String): List<Flair> {
        return reddit.request {
            it.path("/r/${JrawUtils.urlEncode(subreddit)}/api/${type}_flair")
        }.deserializeWith(JrawUtils.moshi.adapter(listOfFlairsType))
    }

    /**
     * Returns a UserFlairReference for a user.
     *
     * Equivalent to `redditClient.user(name).flairOn(subreddit)`.
     */
    fun otherUserFlair(name: String) = reddit.user(name).flairOn(subreddit)

    /**
     * Returns a UserFlairReference for the authenticated user.
     *
     * Equivalent to `redditClient.me().flairOn(subreddit)`.
     */
    fun selfUserFlair() = reddit.me().flairOn(subreddit)

    /**
     * Returns a SubmissionFlairReference for the given submission id (without the kind prefix).
     */
    fun submissionFlair(id: String) = SubmissionFlairReference(reddit, subreddit, id)

    /**
     * Returns the moderator-created rules for the subreddit. Users can report things in this subreddit using the String
     * specified in [SubredditRule.getViolationReason]
     */
    @EndpointImplementation(Endpoint.GET_SUBREDDIT_ABOUT_RULES)
    fun rules(): Ruleset {
        return reddit.request {
            it.endpoint(Endpoint.GET_SUBREDDIT_ABOUT_RULES, subreddit)
        }.deserialize()
    }

    /** Returns a reference to the subreddit's wiki */
    fun wiki() = WikiReference(reddit, subreddit)

    /** Fetches the stylesheet of a subreddit. Returned value is CSS. */
    @EndpointImplementation(Endpoint.GET_STYLESHEET)
    fun stylesheet(): String {
        return reddit.request {
            it.endpoint(Endpoint.GET_STYLESHEET, subreddit)
        }.body
    }

    /**
     * Updates the stylesheet of a subreddit. Requires mod priveleges on the subreddit.
     *
     * @param stylesheet New stylesheet of the subreddit, completely replaces the pre-existing one
     * @param reason Reason for the update to be displayed in the stylesheet change history
     * */
    @EndpointImplementation(Endpoint.POST_SUBREDDIT_STYLESHEET)
    fun updateStylesheet(stylesheet: String, reason: String) {
        reddit.request {
            it.endpoint(Endpoint.POST_SUBREDDIT_STYLESHEET, subreddit)
                .post(mapOf(
                    "api_type" to "json",
                    "op" to "save",
                    "reason" to reason,
                    "stylesheet_contents" to stylesheet
                ))
        }
    }

    /**
     * Returns a listing of currently set flairs on the subreddit (both custom and template-based ones)
     * Requires mod priveleges on the subreddit.
     */
    @EndpointImplementation(Endpoint.GET_FLAIRLIST)
    fun flairList() = BarebonesPaginator.Builder.create<SimpleFlairInfo>(reddit, "/r/$subreddit/api/flairlist")

    /**
     * Updates users flairs on the subreddit in bulk (up to 100 rows, the rest are ignored by Reddit).
     * Requires mod privileges on the subreddit. If the CSS class and text are empty/null for a particular user, that
     * user's flair is cleared.
     *
     * Note that even if this call succeeds, reddit may still have rejected one or more of the changes. Make sure to
     * check the [FlairPatchReport]s that this method returns.
     */
    @EndpointImplementation(Endpoint.POST_FLAIRCSV)
    fun patchFlairList(patch: List<SimpleFlairInfo>): List<FlairPatchReport> {
        return reddit.request {
            it.path("/r/$subreddit/api/flaircsv")
                .post(mapOf(
                    "flair_csv" to (patch.join


NAMESPACES = [
			  // These are the official namespaces
			  "http://a9.com/-/spec/opensearch/1.1/",
			  "http://a9.com/-/spec/opensearch/1.0/",
			  // These were also in nsSearchService.js
			  "http://a9.com/-/spec/opensearchdescription/1.1/",
			  "http://a9.com/-/spec/opensearchdescription/1.0/"
			];

			var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"]
					.createInstance(Components.interfaces.nsIDOMParser),
				doc = parser.parseFromString(xmlStr, "application/xml"),
				docEl = doc.documentElement,
				ns = docEl.namespaceURI,
				xns = {"s":doc.documentElement.namespaceURI,
					"xmlns":"http://www.w3.org/2000/xmlns"};
			if(OPENSEARCH_NAMESPACES.indexOf(ns) === -1) {
				throw new Error("Invalid namespace");
			}

			// get simple attributes
			this.alias = Zotero.Utilities.xpathText(docEl, 's:ShortName', xns);
			this.name = Zotero.Utilities.xpathText(docEl, 's:LongName', xns);
			if(!this.name) this.name = this.alias;
			this.description = Zotero.Utilities.xpathText(docEl, 's:Description', xns);

			// get the URL template
			this._urlTemplate = undefined;
			var urlTags = Zotero.Utilities.xpath(docEl, 's:Url[@type="text/html"]', xns),
				i = 0;
			while(urlTags[i].hasAttribute("rel") && urlTags[i].getAttribute("rel") != "results") {
				i++;
				if(i == urlTags.length) throw new Error("No Url tag found");
			}

			// TODO: better error handling
			var urlTag = urlTags[i];
			this._urlTemplate = urlTag.getAttribute("template")
			this._method = urlTag.getAttribute("method").toString().toUpperCase() === "POST" ? "POST" : "GET";

			// get namespaces
			this._urlNamespaces = {};
			var node = urlTag;
			while(node && node.attributes) {
				for(var i=0; i<node.attributes.length; i++) {
					var attr = node.attributes[i];
					if(attr.namespaceURI == "http://www.w3.org/2000/xmlns/") {
						this._urlNamespaces[attr.localName] = attr.nodeValue;
					}
				}
				node = node.parentNode;
			}

			// get params
			this._urlParams = [];
			for(var param of Zotero.Utilities.xpath(urlTag, 's:Param', xns)) {
				this._urlParams[param.getAttribute("name")] = param.getAttribute("value");
			}

			// find the icon
			this._iconSourceURI = iconURL;
			for(var img of Zotero.Utilities.xpath(docEl, 's:Image', xns)) {
				if((!img.hasAttribute("width") && !img.hasAttribute("height"))
						|| (img.getAttribute("width") == "16" && img.getAttribute("height") == "16")) {
					this._iconSourceURI = img.textContent;
				}
			}

			if(this._iconSourceURI) {
				// begin fetching the icon if necesssary
				this._updateIcon();
			}

			// delete any old engine with the same name
			var engine = Zotero.LocateManager.getEngineByName(this.name);
			if(engine) Zotero.LocateManager.removeEngine(engine);

			// add and serialize the new engine
			_locateEngines.push(this);
			_serializeLocateEngines();
		},

		"getItemSubmission":function(item, responseType) {
			if


\u5bb6\u5ead\u88ab\u6597 \u4e25\u91cd\u7684\u8d44\u4ea7\u9636\u7ea7\u4e2a\u4eba\u4e3b\u4e49 \u4e25\u91cd\u7684\u8d44\u4ea7\u9636\u7ea7\u4e2a\u4eba\u4e3b\u4e49   \u5907\u8003 - \u6551\u706b\u70e7\u6b7b - - -   ", "type": "paragraph"}, {"text": "\u7b2c48\u9875", "type": "subtitle"}, {"text": "", "type": "appellation"}, {"text": "   \u5730\u533a\u53ca\u5355\u4f4d \u957f\u6625\u7b2c\u4e00\u6c7d\u8f66\u5236\u9020\u5382 \u957f\u6625\u94c1\u8def\u56db\u5e73\u7ad9\u4e1a\u4f59 \u5b66\u6821 \u957f\u6625\u5e02\u5efa\u7b51\u4e8c\u516c\u53f8 \u957f\u6625\u5e02\u4eba\u6c11\u59d4\u5458\u4f1a \u5efa\u8bbe\u5c40 \u957f\u6625\u7b2c\u4e00\u6c7d\u8f66\u5236\u9020\u5382   \u804c\u522b \u6280\u672f\u5458 \u6559\u5458 \u5de5\u957f \u52a9\u7406\u6280\u672f\u5458 \u79d1\u5458   \u59d3\u540d \u6208\u4e1c\u5e86 \u4e95\u6811\u6625 \u4e95\u5ef6\u751f \u8fb9\u6587\u9e3f \u5218\u5141\u7ae0   \u6027\u522b \u7537 \u7537 \u7537 \u7537 \u5973   \u5e74\u9f84 24 23 44 29 26   \u6c11\u65cf \u6c49 \u6c49 \u6c49 \u6c49 \u6c49   \u5bb6\u5ead\u51fa\u8eab \u5730\u4e3b \u5de5\u4eba \u57ce\u5e02\u8d2b\u6c11 \u5730\u4e3b\u517c\u623f\u4e3b \u8d44\u672c\u5bb6   \u672c\u4eba\u6210\u5206 \u5b66\u751f \u5b66\u751f \u5de5\u4eba \u5b66\u751f \u5b66\u751f   \u6587\u5316\u7a0b\u5ea6 \u5927\u5b66 \u4e2d\u7b49\u4e13\u4e1a \u9ad8\u5c0f \u9ad8\u4e2d \u521d\u4e2d   \u4f55\u65f6\u53c2\u52a0\u5de5\u4f5c 1955\u5e749\u6708 1954\u


60025 l -2.15363,2.89527 2.15363,3.6084 7.53057,-7.94418 4.30726,0.35656 -0.71312,-4.69234 -6.81745,-1.44051 4.66382,-16.97231 6.14711,-5.81907 0,0 z","name":"Russian Federation"},"mv":{"path":"m 436.59252,455.60965 0.42788,3.72249 2.38183,0.87001 0.42787,-3.28036 -3.23758,-1.31214 0,0 m 3.0379,7.87286 -0.21393,4.59251 1.74002,0.87001 1.52608,-3.06643 -3.05217,-2.39609 0,0 m 0.44214,8.97108 -1.52608,1.52608 1.74002,1.52608 2.16789,-1.52608 -2.38183,-1.52608 0,0 z","name":"Maldives"},"lk":{"path":"m 471.02206,437.48208 0.35657,3.87938 0.35656,2.82397 -2.09658,0.35656 1.05542,6.34679 3.152,1.76854 4.89202,-2.82396 -1.39772,-6.68909 0.35656,-2.4674 -4.54972,-4.22169 -2.12511,1.0269 0,0 z","name":"Sri Lanka"},"mn":{"path":"m 461.40918,240.8315 8.30074,-11.01061 9.96945,4.60677 6.77466,1.81133 8.30074,-7.61614 -5.63366,-4.15037 3.70823,-5.23432 11.06766,3.90791 3.83659,6.28974 6.93155,0.18541 3.62266,-2.6956 7.45926,-0.29951 1.62592,2.76691 12.39406,0.62755 7.84435,-8.00123 10.85372,1.14099 -0.62755,10.89651 4.74939,1.08395 5.83334,-2.65282 6.17564,3.05216 -0.14262,1.54035 -4.47841,0.12836 -4.66382,9.78404 -3.62266,0.35656 -14.09129,18.41281 -14.39081,6.34679 -8.9996,0.69886 -7.47352,-4.82071 -9.55584,5.10596 -9.41321,-2.9238 -2.66708,-6.83171 -17.82806,-1.2551 -9.12796,-15.47475 -4.43562,-0.28525 -2.29625,-5.49104 0,0 z","name":"Mongolia"},"kp":{"path":"m 610.42319,275.20399 2.62429,1.09821 0.7987,9.18501 5.20579,0.29951 4.90628,-5.74776 -1.69723,-1.51182 0.19967,-6.16138 4.50694,-5.44825 -2.29626,-4.13611 1.49756,-1.71149 0.82722,-4.27873 -2.61003,-1.18379 -2.22494,1.12674 -2.75265,8.35779 -4.44988,-0.38509 -5.14874,6.0758 0.61328,4.42136 0,0 z","name":"North Korea"},"kr":{"path":"m 624.77121,280.80913 8.81419,7.18827 1.49756,6.96008 -0.29951,3.73676 -4.30726,4.84923 -3.70824,0.19967 -4.20742,-9.08518 -1.59739,-4.


.mapId};this.target.postMessage(ze)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let S=R.data,F=S.id;if(!(S.origin!=="file://"&&location.origin!=="file://"&&S.origin!=="resource://android"&&location.origin!=="resource://android"&&S.origin!==location.origin||S.targetMapId&&this.mapId!==S.targetMapId)){if(S.type==="<cancel>"){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(O(self)||S.mustQueue)return this.tasks[F]=S,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,S)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),S=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(R,S)}processTask(R,S){return a(this,void 0,void 0,function*(){if(S.type==="<response>"){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(S.error?te.reject(Na(S.error)):te.resolve(Na(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let F=Na(S.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[S.type](S.sourceMapId,F,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,te)}})}completeTask(R,S,F){let W=[];delete this.abortControllers[R];let te={id:R,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:S?La(S):null,data:La(F,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=ke,i.H=function(){var R=new xi(16);return xi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=


 la même sequence', () => {
    let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
    let dp2: DependanceCirculaire = new DependanceCirculaire("c -> a -> d -> c");
    dp.equals(dp2).should.be.false();
  })
  it('sont différentes si les n\'ont pas la même sequence', () => {
    let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
    let dp2: DependanceCirculaire = new DependanceCirculaire("a -> c -> b -> a");
    dp.equals(dp2).should.be.false();
  })
  it('sont différentes si les n\'ont pas la même sequence', () => {
    let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
    let dp2: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> d -> a");
    dp.equals(dp2).should.be.false();
  })
})

describe('une dependances circulaire', () => {
  describe('est une sous sequence dans les cas suivants', () => {

    it('a -> b -> c -> a dans z -> a -> b -> c -> z', () => {
      let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
      let dp2: DependanceCirculaire = new DependanceCirculaire("z -> a -> b -> c -> z");
      dp.isSubSequenceOf(dp2).should.be.true();
    })
    it('a -> b -> c -> a dans z -> c -> a -> b -> z', () => {
      let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
      let dp2: DependanceCirculaire = new DependanceCirculaire("z -> c -> a -> b -> z");
      dp.isSubSequenceOf(dp2).should.be.true();
    })
    it('a -> b -> c -> a dans b -> c -> d -> a -> b', () => {
      let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
      let dp2: DependanceCirculaire = new DependanceCirculaire("b -> c -> d -> a -> b");
      dp.isSubSequenceOf(dp2).should.be.true();
    })
  })

  describe('n\'est pas une sous sequence dans les cas suivants', () => {

    it('a -> b -> c -> a dans z -> a -> b -> d -> z', () => {
      let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
      let dp2: DependanceCirculaire = new DependanceCirculaire("z -> a -> b -> d -> z");
      dp.isSubSequenceOf(dp2).should.be.false();
    })

    it('a -> b -> c -> a dans z -> a -> c -> b -> z', () => {
      let dp: DependanceCirculaire = new DependanceCirculaire("a -> b -> c -> a");
      let dp2: DependanceCirculaire = new DependanceCirculaire("z -> a -> c -> b -> z");
      dp.isSubSequenceOf(dp2).should.be.false();
    })
  })
})
import { Injectable } from '@angular/core';
import { Subject }    from 'rxjs/Subject';
import { Cell } from '../cell/cell';
import { ORIENTATION } from './orientation';

@Injectable()
export class BoardService {
  size: number;

  generateCells(size) {
    this.size = size;
    let board = new Array();

    for(let i = 0; i < size; i++) {
      board.push([]);
      board[i].push([]);
      for(let j = 0; j < size; j++) {
        // board[i][j] = new Cell ('empty', false, {x: String.fromCharCode(65 + i), y: j});
        board[i][j] = {
          status: 'empty',
          hasShip: false,
          coordinates: {x: i, y: j}
        };
      }
    }
    return board;


		gameObject = null;
			minValue = new FsmFloat {UseVariable=true};
			maxValue = new FsmFloat {UseVariable=true};
			resetOnExit = null;
			everyFrame = false;
		}

		public override void OnEnter()
		{
		    var go = Fsm.GetOwnerDefaultTarget(gameObject);
		    if (UpdateCache(go))
		    {
		        slider = cachedComponent;
		    }

			if (resetOnExit.Value)
			{
				originalMinValue = slider.minValue;
				originalMaxValue = slider.maxValue;
			}

			DoSetValue();

			if (!everyFrame)
			{
				Finish();
			}
		}

		public override void OnUpdate()
		{
			DoSetValue();
		}

	    private void DoSetValue()
		{
		    if (slider == null) return;

		    if (!minValue.IsNone)
		    {
		        slider.minValue = minValue.Value;
		    }
		    if (!maxValue.IsNone)
		    {
		        slider.maxValue = maxValue.Value;
		    }
		}

		public override void OnExit()
		{
		    if (slider == null) return;

			if (resetOnExit.Value)
			{
				slider.minValue = originalMinValue;
				slider.maxValue = originalMaxValue;
			}
		}
	}
}


 x30, [sp, #0x10]
	ldp		x20, x21, [sp], #0x20
#if __has_feature(ptrauth_returns)
	retab
#else
	ret
#endif

Lppl_fail_bootstrap_dispatch:
	/* Pop our stack frame and panic. */
	ldp		x29, x30, [sp, #0x10]
	ldp		x20, x21, [sp], #0x20
#if __has_feature(ptrauth_returns)
	autibsp
#endif
	adrp	x0, Lppl_bad_call_panic_str@page
	add		x0, x0, Lppl_bad_call_panic_str@pageoff
	b		EXT(panic)

	.text
	.align 2
	.globl EXT(ml_panic_trap_to_debugger)
LEXT(ml_panic_trap_to_debugger)
	mrs		x10, DAIF
	msr		DAIFSet, #(DAIFSC_ASYNCF | DAIFSC_IRQF | DAIFSC_FIQF)

	adrp		x12, EXT(pmap_ppl_locked_down)@page
	ldr		w12, [x12, #EXT(pmap_ppl_locked_down)@pageoff]
	cbz		w12, Lnot_in_ppl_dispatch

	LOAD_PMAP_CPU_DATA	x11, x12, x13

	ldr		w12, [x11, PMAP_CPU_DATA_PPL_STATE]
	cmp		w12, #PPL_STATE_DISPATCH
	b.ne		Lnot_in_ppl_dispatch

	/* Indicate (for the PPL->kernel transition) that we are panicking. */
	mov		x15, #PPL_EXIT_PANIC_CALL

	/* Restore the old stack pointer as we can't push onto PPL stack after we exit PPL */
	ldr		x12, [x11, PMAP_CPU_DATA_KERN_SAVED_SP]
	mov		sp, x12

	mrs		x10, DAIF
	mov		w13, #PPL_STATE_PANIC
	str		w13, [x11, PMAP_CPU_DATA_PPL_STATE]

	/* Now we are ready to exit the PPL. */
	b		ppl_return_to_kernel_mode
Lnot_in_ppl_dispatch:
	REENABLE_DAIF	x10
	ret

	.data
Lppl_bad_call_panic_str:
	.asciz "ppl_dispatch: failed due to bad arguments/state"
#else /* XNU_MONITOR */
	.text
	.align 2
	.globl EXT(ml_panic_trap_to_debugger)
LEXT(ml_panic_trap_to_debugger)
	ret
#endif /* XNU_MONITOR */

/* ARM64_TODO Is globals_asm.h needed? */
//#include	"globals_asm.h"

/* vim: set ts=4: */


ustomFloatingLayerClick,
              confirmCallback: (_) {
                EventBus.instance.fire(RefreshMenuTitleEvent());
                _onSelectionChanged(
                    widget.originalSelectionData.indexOf(entity));
              },
            );
          }));
    }
  }
}
import 'package:bruno/src/components/button/brn_big_main_button.dart';
import 'package:bruno/src/components/dialog/brn_dialog.dart';
import 'package:bruno/src/constants/brn_asset_constants.dart';
import 'package:bruno/src/l10n/brn_intl.dart';
import 'package:bruno/src/theme/brn_theme_configurator.dart';
import 'package:bruno/src/theme/configs/brn_dialog_config.dart';
import 'package:bruno/src/utils/brn_tools.dart';
import 'package:flutter/material.dart';

class BrnDialogConstants {
  /// 提示图标
  static const int iconAlert = 0;

  /// 警示图标
  static const int iconWarning = 1;

  /// 成功图标
  static const int iconSuccess = 2;

  /// 自定义图标
  static const int iconCustom = 100;

  /// icon地址列表
  static const List shareItemImagePathList = [
    BrnAsset.iconAlert,
    BrnAsset.iconWarning,
    BrnAsset.iconSuccess,
  ];
}

/// 用于显示在屏幕中间展示重要信息，具有强操作的提示dialog
/// 含有纵向单按钮和双按钮
// ignore: must_be_immutable
class BrnEnhanceOperationDialog extends StatelessWidget {
  /// 构建环境上下文
  final BuildContext context;

  /// 图片类型，默认 0，[BrnDialogConstants.iconAlert]
  final int iconType;

  /// 自定义图标
  final Widget? customIconWidget;

  /// 弹框标题文案，为空则不显示标题
  final String? titleText;

  /// 弹框辅助信息文案，为空则不显示辅助信息
  final String? descText;

  /// 主要按钮文本
  final String? mainButtonText;

  /// 次要按钮文案，为空则不显示次要按钮
  final String? secondaryButtonText;

  /// 主要按钮回调
  final VoidCallback? onMainButtonClick;

  /// 次要按钮回调
  final VoidCallback? onSecondaryButtonClick;

  /// 主题配置
  BrnDialogConfig? themeData;

  BrnEnhanceOperationDialog({
    this.iconType = BrnDialogConstants.iconAlert,
    this.customIconWidget,
    required this.context,
    this.titleText,
    this.descText,
    this.mainButtonText,
    this.secondaryButtonText,
    this.onMainButtonClick,
    this.onSecondaryButtonClick,
    this.themeData,
  }) {
    this.themeData ??= BrnDialogConfig();
    this.themeData = BrnThemeConfigurator.instance
        .getConfig(configId: this.themeData!.configId)
        .dialogConfig
        .merge(this.themeData);
  }

  @override
  Widget build(BuildContext context) {
    return Material(
      type: MaterialType.transparency,
      child: BrnDialog(
        themeData: themeData,
        iconImage: (iconType == BrnDialogConstants.iconCustom)
            ? customIconWidget as Image
            : BrunoTools.getAssetImage(
                BrnDialogConstants.shareItemImagePathList[iconType]),
        titleText: titleText,
        messageText: descText,
        warningWidget: Container(
          color: Colors.transparent,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: _configDialogWidgets(context),
          ),
        ),
      ),
    );
  }

  /// 弹出dialog
  show() {
    showDialog(
        context: context,
        barrierDismissible: false,
        builder: (BuildContext context) {
          return this;
        }).then((value) {


                  controller: _titleController,
                    // TODO: Make this a search or create new circle
                    decoration: const InputDecoration(
                      helperText: 'Create a new circle',
                      helperMaxLines: 2,
                      labelText: 'New Circle',
                      errorMaxLines: 2,
                    ),
                    textInputAction: TextInputAction.done,
                  ),
                ),
                IconButton(
                  key: const Key('circlesForm_submitNewCircle'),
                  onPressed: (_titleController.text.trim().isEmpty)
                      ? null
                      : _addNewCircle,
                  icon: const Icon(Icons.add),
                ),
              ],
            ),
          ),
        // If we don't need wrapping but go for a list, use CheckboxListTile
        Wrap(
          spacing: 8,
          runSpacing: 6,
          children: _state.circles
              .asMap()
              .map(
                (i, c) => MapEntry(
                  i,
                  GestureDetector(
                    onTap: () => _updateCircleMembership(i, !c.$3),
                    behavior: HitTestBehavior.opaque,
                    child: Row(
                      mainAxisSize: MainAxisSize.min,
                      children: [
                        Checkbox(
                          value: c.$3,
                          onChanged: (value) => (value == null)
                              ? null
                              : _updateCircleMembership(i, value),
                        ),
                        Expanded(
                          child: Text(
                            '${c.$2} (${c.$4})',
                            overflow: TextOverflow.ellipsis,
                          ),
                        ),
                        const SizedBox(width: 16),
                      ],
                    ),
                  ),
                ),
              )
              .values
              .asList(),
        ),
        const SizedBox(height: 8, width: double.maxFinite),
      ],
    ),
  );
}

class CirclesFormState with FormzMixin {
  CirclesFormState({
    this.newCircleName = '',
    this.circles = const [],
    this.status = FormzSubmissionStatus.initial,
  });

  final FormzSubmissionStatus status;
  final String newCircleName;
  final List<(String, String, bool, int)> circles;

  CirclesFormState copyWith({
    String? newCircleName,
    List<(String, String, bool, int)>? circles,
    FormzSubmissionStatus? status,
  }) => CirclesFormState(
    newCircleName: newCircleName ?? this.newCircleName,
    circles: circles ?? this.circles,
    status: status ?? this.status,
  );

  @override
  List<FormzInput<dynamic, dynamic>> get inputs => [];
}
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'contact_location.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

ContactAddressLocation _$ContactAddressLocationFromJson(
        Map<String, dynamic> json) =>
    ContactAddressLocation(
      longitude: (json['longitude'] as num).toDouble(),
      latitude: (json['latitude'] as num).toDouble(),
      address: json['address'] as String?,
      coagContactId: json['coag_contact_id'] as String?,
    );

Map<String, dynamic> _$ContactAddressLocationToJson(
        ContactAddressLocation instance) =>
    <String, dynamic>{
      'coag_contact_id': instance.coagContactId,
      'longitude': instance.longitude,
      'latitude': instance.latitude,


import numpy as np
import pybdsim

basename = "d2"

dRaw = pybdsim.Data.Load(basename+".root")

energydep = []
for Event in dRaw.GetEventTree():
    energydep.append(Event.Summary.energyDeposited)

energydep = np.array(energydep)

em = np.mean(energydep)
er = np.std(energydep)

dRaw.GetEventTree().GetEntry(0)
primEK = np.array(dRaw.GetEvent().Primary.kineticEnergy, dtype=float)[0]

print "Mean energy deposited:    ",em,"+-",er," GeV"
print "Primary kinetic energy:   ",primEK," GeV"
print "Fraction energy absorbed: ",(em/primEK)*100, " %"

dHist = pybdsim.Data.Load(basename+"-histos.root")
hscorer = dHist.histogramspy['Event/MergedHistograms/meshForAll-dosesc']
dose = hscorer.contents[0,0,0]

density = 19.3 #g/cm3 for tungsten (approximate)
volume  = 100*100*100 #cm*cm*cm
mass    = (density * volume) / 1000.0 # in kg
print "Density: ",density," g/cm^3"
print "Volume:  ",volume," cm^3"
print "Mass:    ",mass," kg"

energyFromDose = (dose * mass)/ 1.6021773e-10 # GeV to J

print "Dose:             ",dose," Gray"
print "Energy from dose: ",energyFromDose," GeV"

print "ratio (dose energy / energy deposition integral): ",energyFromDose/em


5.2](https://github.com/marp-team/marp-cli/releases/tag/v1.5.2) ([#325](https://github.com/marp-team/marp-vscode/pull/325))
  - Improved WSL 2 detection and browser resolution
- Upgrade dependent packages to the latest version ([#325](https://github.com/marp-team/marp-vscode/pull/325))

## v1.4.6 - 2021-11-27

### Changed

- Upgrade Marp Core to [v2.3.0](https://github.com/marp-team/marp-core/releases/tag/v2.3.0) ([#316](https://github.com/marp-team/marp-vscode/pull/316))
- Upgrade Marp CLI to [v1.5.0](https://github.com/marp-team/marp-cli/releases/tag/v1.5.0) ([#316](https://github.com/marp-team/marp-vscode/pull/316))
  - Support [`::backdrop` CSS selector provided by Marpit framework](https://marpit.marp.app/inline-svg?id=backdrop-css-selector) in HTML export
- Upgrade dependent packages to the latest version ([#316](https://github.com/marp-team/marp-vscode/pull/316))

### Fixed

- Improve initialization of preview styling in VS Code 1.63 ([#317](https://github.com/marp-team/marp-vscode/pull/317))

## v1.4.5 - 2021-11-22

### Fixed

- Regression about CSS attribute selector with `$=` substring matcher for slide's `class` ([#313](https://github.com/marp-team/marp-vscode/issues/313), [#314](https://github.com/marp-team/marp-vscode/pull/314))

## v1.4.4 - 2021-11-11

### Changed

- Make compatible to upcoming new Markdown preview in VS Code v1.63 ([#307](https://github.com/marp-team/marp-vscode/pull/307))
- Upgrade Marp Core to [v2.2.0](https://github.com/marp-team/marp-core/releases/tag/v2.2.0) ([#309](https://github.com/marp-team/marp-vscode/pull/309))
- Upgrade Marp CLI to [v1.4.2](https://github.com/marp-team/marp-cli/releases/tag/v1.4.2) ([#309](https://github.com/marp-team/marp-vscode/pull/309))
- Upgrade development Node and dependencies to the latest ([#309](https://github.com/marp-team/marp-vscode/pull/309))

## v1.4.3 - 2021-10-06

### Fixed

- Fix regression about export with local custom theme ([#302](https://github.com/marp-team/marp-vscode/issues/302), [#303](https://github.com/marp-team/marp-vscode/pull/303))

## v1.4.2 - 2021-10-02

### Fixed

- Web extension does not recognize custom theme provided by remote URL ([#300](https://github.com/marp-team/marp-vscode/issues/300), [#301](https://github.com/marp-team/marp-vscode/pull/301))

## v1.4.1 - 2021-10-02

### Added

- Custom theme CSS support for web extension ([#289](https://github.com/marp-team/marp-vscode/issues/289), [#298](https://github.com/marp-team/marp-vscode/pull/298))

### Changed

- Completely move build system from rollup to webpack ([#290](https://github.com/marp-team/marp-vscode/pull/290))
- Upgrade Marp CLI to


import java.util.HashSet;
import java.util.Set;

/**
 * Created by wangpeng on 2019-03-21.
 * 653. 两数之和 IV - 输入 BST
 *

 * 给定一个二叉搜索树和一个目标结果，如果 BST 中存在两个元素且它们的和等于给定的目标结果，则返回 true。
 *

 * 案例 1:
 *

 * 输入:
 * 5
 * / \
 * 3   6
 * / \   \
 * 2   4   7
 *

 * Target = 9
 *

 * 输出: True
 *

 *

 * 案例 2:
 *

 * 输入:
 * 5
 * / \
 * 3   6
 * / \   \
 * 2   4   7
 *

 * Target = 28
 *

 * 输出: False
 *
 * @see two-sum-iv-input-is-a-bst
 */
public class _653_findTarget {

    public static void main(String[] args) {
        TreeNode root = new TreeNode(5);
        root.left = new TreeNode(3);
        root.left.left = new TreeNode(2);
        root.left.right = new TreeNode(4);
        root.right = new TreeNode(6);
        root.right.right = new TreeNode(7);
        _653_findTarget findTarget = new _653_findTarget();
        System.out.println(findTarget.findTarget(root, 9));
        System.out.println(findTarget.findTarget(root, 28));
    }

    private Set<Integer> set = new HashSet<>();

    public boolean findTarget(TreeNode root, int k) {
        if (root == null) return false;
        if (set.contains(k - root.val)) return true;
        set.add(root.val);
        return findTarget(root.left, k) || findTarget(root.right, k);
    }

}
package pp.arithmetic.leetcode;

/**
 * Created by wangpeng on 2019-04-02.
 * 304. 二维区域和检索 - 矩阵不可变
 *

 * 给定一个二维矩阵，计算其子矩形范围内元素的总和，该子矩阵的左上角为 (row1, col1) ，右下角为 (row2, col2)。
 * <image src="https://leetcode.com/static/images/courses/range_sum_query_2d.png"></image>
 *

 * Range Sum Query 2D
 * 上图子矩阵左上角 (row1, col1) = (2, 1) ，右下角(row2, col2) = (4, 3)，该子矩形内元素的总和为 8。
 *

 * 示例:
 *

 * 给定 matrix = [
 * [3, 0, 1, 4, 2],
 * [5, 6, 3, 2, 1],
 * [1, 2, 0, 1, 5],
 * [4, 1, 0, 1, 7],
 * [1, 0, 3, 0, 5]
 * ]
 *

 * sumRegion(2, 1, 4, 3) -> 8
 * sumRegion(1, 1, 2, 2) -> 11
 * sumRegion(1, 2, 2, 4) -> 12
 * 说明:
 *

 * 你可以假设矩阵不可变。
 * 会多次调用 sumRegion 方法。
 * 你可以假设 row1 ≤ row2 且 col1 ≤ col2。
 *
 * @see range-sum-query-2d-immutable
 */
public class _304_NumM


bytes.
    // r8 = IPCSYNC
    // r9 = IPCFIFOSEND
    // r10 = IPCFIFORECV
    // r11 = 0
    // r12 = counter for IPCSYNC
_stage2:
_stage2_init:
    mov r7, #1
_stage2_sync_loop:
    bl _stage2_wait_recv_r7
    add r7, r7, #0x1
    ands r7, r7, #0xF
    bne _stage2_sync_loop
_stage2_next_cmd:
    bl _stage2_bump_counter
    mov r7, #0
    bl _stage2_wait_recv_r7
_stage2_wait_cmd:
    ldr r0, [r8]
    and r0, r0, #0xF
    // command 0xF = synchronize
    cmp r0, #0xF
    beq _stage2_next_cmd
    cmp r0, #0x2
    beq _stage2_cmd2
    cmp r0, #0x1
    bne _stage2_wait_cmd

    // command 0x1 = copy N1 bytes from N2 to N3
_stage2_cmd1:
    ldr r0, [r10]
    ldr r2, [r10]
    ldr r1, [r10]
    // r1 = destination address
    // r2 = source address
_stage2_copy:
    subs r0, r0, #4
    ldrge r3, [r2], #4
    strge r3, [r1], #4
    bgt _stage2_copy
    b _stage2_next_cmd

    // command 0x2 = jump to entrypoint, which is already set in the header
_stage2_cmd2:
    bl _stage2_bump_counter
    swi 0

    // wait to receive the value in r7 from ARM9 via IPC, then send N+1
_stage2_wait_recv_r7:
    ldr r0, [r8]
    and r0, r0, #0xF
    cmp r0, r7
    bne _stage2_wait_recv_r7

    // send N+1 to ARM9 via IPC
_stage2_bump_counter:
    add r12, r12, #0x100
    and r12, r12, #0xF00
    str r12, [r8]
    bx lr


rs = mutableListOf<Supplier<*>>()

    redis.pipelining {
      suppliers.addAll(
        listOf(
          lpush("{same-slot-key}1", "lval1".encodeUtf8(), "lval2".encodeUtf8()),
          rpush("{same-slot-key}1", "lval3".encodeUtf8(), "lval4".encodeUtf8()),
          lrange("{same-slot-key}1", 0, -1),
          lrem("{same-slot-key}1", 1, "lval1".encodeUtf8()),
          lmove("{same-slot-key}1", "{same-slot-key}2", ListDirection.LEFT, ListDirection.RIGHT),
          rpoplpush("{same-slot-key}1", "{same-slot-key}2"),
          lpop("{same-slot-key}1"),
          rpop("{same-slot-key}2"),
        )
      )
    }
    assertThat(suppliers.map { it.get() }).containsExactly(
      2L,
      4L,
      listOf(
        "lval2".encodeUtf8(),
        "lval1".encodeUtf8(),
        "lval3".encodeUtf8(),
        "lval4".encodeUtf8()
      ),
      1L,
      "lval2".encodeUtf8(),
      "lval4".encodeUtf8(),
      "lval3".encodeUtf8(),
      "lval2".encodeUtf8()
    )
  }

  @Test
  fun `pipelining works - blocking operations`() {
    val suppliers = mutableListOf<Supplier<*>>()

    redis.pipelining {
      suppliers.addAll(
        listOf(
          // Blocking operations work best under scenarios where there are multiple clients writing to the same key.
          // This is really hard to test, so we just test the commands are accepted under situations where they are guaranteed
          // not to block.
          lpush("{same-slot-key}1", "lval1".encodeUtf8(), "lval2".encodeUtf8()),
          lpush("{same-slot-key}2", "lval3".encodeUtf8(), "lval4".encodeUtf8()),
          blmove("{same-slot-key}1", "{same-slot-key}2", ListDirection.LEFT, ListDirection.RIGHT, 0.0),
          brpoplpush("{same-slot-key}1", "{same-slot-key}2", 0),
        )
      )
    }

    assertThat(suppliers.map { it.get() }).containsExactly(
      2L,
      2L,
      "lval2".encodeUtf8(),
      "lval1".encodeUtf8()
    )
  }

  @Test
  fun `pipelining works - sorted sets`() {
    val suppliers = mutableListOf<Supplier<*>>()

    redis.pipelining {
      suppliers.addAll(
        listOf(
          zadd("zkey", 1.0, "a"),
          zscore("zkey", "a"),
          zrangeWithScores("zkey", start = ZRangeIndexMarker(0), stop = ZRangeIndexMarker(-1)),
          zremRangeByRank("zkey", start = ZRangeRankMarker(0), stop = ZRangeRankMarker(-1)),
          zcard("zkey")
        )
      )
    }
    assertThat(suppliers.map { it.get() }).containsExactly(
      1L,
      1.0,
      listOf("a".encodeUtf8() to 1.0),
      1L,
      0L,
    )
  }

  @Test
  fun `pipelining captures errors`() {
    val suppliers = mutableListOf<Supplier<*>>()
    redis.pipelining {
      suppliers.addAll(
        listOf(
          set("string key", "string value".encodeUtf8()),
          incr("string key"),


ed in order to submit the whole form.
///
/// The widget is a flexible wrapper. A parent class should pass [currentStep]
/// to this widget based on some logic triggered by the three callbacks that it
/// provides.
///
/// {@tool sample --template=stateful_widget_scaffold_center}
///
/// ```dart
///
/// StepperType _type = StepperType.vertical;
///
/// List<Tuple2> tuples = [
///   Tuple2(Icons.directions_bike, StepState.indexed, ),
///   Tuple2(Icons.directions_bus, StepState.editing, ),
///   Tuple2(Icons.directions_railway, StepState.complete, ),
///   Tuple2(Icons.directions_car, StepState.disabled, ),
///   Tuple2(Icons.directions_boat, StepState.error, ),
/// ];

/// int _index = 0;
///
/// @override
/// Widget build(BuildContext context) {
/// return EnhanceStepper(
///     stepSize: 40,
///     type: _type,
///     horizontalTitlePosition: HorizontalTitlePosition.bottom,
///     horizontalLinePosition: HorizontalLinePosition.top,
///     currentStep: _index,
///     physics: ClampingScrollPhysics(),
///     steps: tuples.map((e) => EnhanceStep(
///       icon: Icon(e.item1, color: Colors.blue, size: 40,),
///       state: StepState.values[tuples.indexOf(e)],
///       isActive: _index == tuples.indexOf(e),
///       horizontalLinePosition = HorizontalLinePosition.top,
///       title: Text("step ${tuples.indexOf(e)}"),
///       subtitle: Text("subtitle_${tuples.indexOf(e)}_${e.item2.toString()}",),
///       content: Text("Content for Step ${tuples.indexOf(e)}"),
///     )).toList(),
///     onStepCancel: () {
///       go(-1);
///     },
///     onStepContinue: () {
///       go(1);
///     },
///     onStepTapped: (index) {
///       DLog.d(index);
///       setState(() {
///         _index = index;
///       });
///     },
///     controlsBuilder: (BuildContext context, { VoidCallback? onStepContinue, VoidCallback? onStepCancel }){
///       return Row(
///         children: [
///           SizedBox(height: 30,),
///           ElevatedButton(
///             onPressed: onStepContinue,
///             child: Text("Next"),
///           ),
///           SizedBox(width: 8,),
///           TextButton(onPressed: onStepCancel, child: Text("Back"), ),
///         ],
///       );
///     }
/// );
/// }
///
///   void go(int index) {
///      if (index == -1 && _index <= 0 ) {
///        DLog.d("it's first Step!");
///        return;
///      }
///
///      if (index == 1 && _index >= titles.length - 1) {
///        DLog.d("it's last Step!");
///        return;
///      }
///
///      setState(() {
///        _index += index;
///      });
///    }
/// ```
///
/// {@end-tool}
///
/// See also:
///
///  * [Step]
///  * <https://material.io/archive/guidelines/components/steppers.html>
class EnhanceStepper extends StatefulWidget {
  /// Creates a stepper from a list of steps.
  ///
  /// This widget is not meant to be rebuilt with a different list of steps
  /// unless a key is provided in order to distinguish the old stepper from the
  /// new one.
  ///
  /// The [steps], [type], and [currentStep] arguments must not be null.
  const EnhanceStepper({
    Key? key,
    required this.steps,
    this.physics,
    this.stepIconSize = _kStepSize,
    this.type = StepperType.vertical,
    this.horizontalTitlePosition = HorizontalTitlePosition.inline,
    this.horizontalLinePosition =


KHQDQ, operand1: Some(Direct(XMM31)), operand2: Some(Direct(XMM5)), operand3: Some(Indirect(RDX, Some(OperandSize::Qword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K2), broadcast: Some(BroadcastMode::Broadcast1To2) }, &[98, 97, 213, 154, 109, 58], OperandSize::Qword)
}

<gh_stars>1000+
use bastion::prelude::*;
use std::sync::{
    atomic::{AtomicUsize, Ordering},
    Arc,
};
use std::thread;
use std::time::Duration;

#[cfg(feature = "tokio-runtime")]
mod tokio_tests {
    #[tokio::test]
    async fn test_run_blocking() {
        super::run()
    }
}

#[cfg(not(feature = "tokio-runtime"))]
mod not_tokio_tests {
    #[test]
    fn test_run_blocking() {
        super::run()
    }
}

fn run() {
    Bastion::init();
    Bastion::start();

    let c = Bastion::children(|children| {
        // We are creating the function to exec
        children.with_exec(|ctx: BastionContext| {
            let received_messages = Arc::new(AtomicUsize::new(0));
            async move {
                let received_messages = Arc::clone(&received_messages);
                loop {
                    msg! {
                        ctx.recv().await?,
                        msg: &'static str =!>
                         {
                            assert_eq!(msg, "hello");
                            let messages = received_messages.fetch_add(1, Ordering::SeqCst);
                            answer!(ctx, messages + 1).expect("couldn't reply :(");
                        };
                        _: _ => panic!();
                    }
                }
            }
        })
    })
    .unwrap();

    let child = c.elems()[0].clone();

    let output = (0..100)
        .map(|_| {
            let child = child.clone();
            run!(blocking!(
                async move {
                    let duration = Duration::from_millis(1);
                    thread::sleep(duration);
                    msg! {
                        child.clone()
                            .ask_anonymously("hello").unwrap().await.unwrap(),
                            output: usize => output;
                            _: _ => panic!();
                    }
                }
                .await
            ))
            .unwrap()
        })
        .collect::<Vec<_>>();

    Bastion::stop();
    Bastion::block_until_stopped();

    assert_eq!((1..=100).map(|i| i).collect::<Vec<_>>(), output);
}
use rand::prelude::*;

include!(concat!(env!("OUT_DIR"), "/adjectives.rs"));
include!(concat!(env!("OUT_DIR"), "/animals.rs"));

#[derive(Debug)]
pub struct Generator<'a, R> {
    rng: R,
    adjectives: &'a [&'a str],
    nouns: &'a [&'a str],
}

impl Default for Generator<'static, ThreadRng> {
    fn default() -> Self {
        Generator::new(ADJECTIVES, ANIMALS, rand::thread_rng())
    }
}

impl<'a, R> Generator<'a, R> {
    pub fn new(adjectives: &'a [&'a str], nouns: &'a [&'a str], rng: R) -> Self {


} .f1oDfl{border-color:#dfe5eb} .f1oDfl path{fill:#dfe5eb} .f1oDfl:hover{border-color:#3899ec} .f1oDfl:hover path{fill:#3899ec} .fFknGL>button{font-family:HelveticaNeueW01-45Ligh,Helvetica,Arial,sans-serif;color:#32536a} .fFknGL>button:hover{color:#4eb7f5} .yQOfFO{font-family:HelveticaNeueW01-45Ligh,Helvetica,Arial,sans-serif;color:#32536a} .yQOfFO:hover{color:#4eb7f5} .RT0itd.PkxrLH{box-shadow:0 0 0 3px #3899ec} .u_DgBU{background-color:#fff} .QLZi5j, .QLZi5j+div{font:normal normal normal 15px/1.4em proxima-n-w01-reg,sans-serif;font-size:18px;line-height:normal} .hC2IfJ{margin-top:22px} .bfcI18{padding:45px 0;border:1px solid var(--paywall-border-color)} .bfcI18 .puqoT0{color:var(--paywall-title-color);font-family:var(--paywall-title-font);font-size:16px;line-height:24px} .bfcI18 .EpNqLq{color:var(--paywall-text-color);font-family:var(--paywall-text-font);font-size:14px;line-height:24px} .bfcI18 .NOuJsc{font-family:var(--paywall-text-font);font-size:14px;line-height:21px} .bfcI18 .NOuJsc>*{color:var(--paywall-button-text-color)} .VNQZuX{cursor:pointer} .lXjgWq{display:flex;white-space:nowrap;overflow:hidden} .TZ6_II{overflow:hidden;text-overflow:ellipsis} .dczcyO{margin:0 8px} .s6R7Q6{position:relative} .s6R7Q6:focus-visible:before{content:"";position:absolute;top:3px;left:3px;width:calc(100% - 6px);height:calc(100% - 6px);box-shadow:0 0 0 1px #fff,0 0 0 3px #116dff} .RiOfiW{border-radius:0;display:block;background:#fff;cursor:default} .RiOfiW.ac4Ofz.JlQ2sc{padding-top:30px} .RiOfiW.jDqjOt, .RiOfiW.lyd6fK, .RiOfiW.i_25UC, .RiOfiW.yWOr1I, .RiOfiW.hKl06e, .RiOfiW.UUSLFD, .RiOfiW.x_FPRX{display:flex;flex-direction:column;height:100%} .app-desktop .RiOfiW{border-width:1px;border-style:solid} .RiOfiW .PoYsMP, .RiOfiW .EfvfyL, .RiOfiW .NAWdyL{display:block} .RiOfiW.ivAnV0, .RiOfiW.NAWdyL, .RiOfiW.PoYsMP, .Ri


nder: 'f', house: 'Stark', age: 10 } ],
        '',
        '',
      ],
        type: 'data',
        depth: 1 },
      { value: [
        'Cersei',
        '',
        [ { name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 } ],
        '',
      ],
        type: 'data',
        depth: 1 },
      { value: [
        'Sansa',
        [ { name: 'Sansa', gender: 'f', house: 'Stark', age: 12 } ],
        '',
        '',
      ],
        type: 'data',
        depth: 1 },
      { value: [ 'm', 22, 18, 133 ], depth: 0, type: 'rowHeader' },
    ];

    expect(pivot.data.table).to.deep.equal(expectedTable);
    expect(pivot.data.rawData).to.deep.equal(expectedRawData);
  });

  it('should not collapse a data row', () => {
    const pivot = new Pivot(
      dataArray,
      rowsToPivotTestOne,
      colsToPivotTestOne,
      aggregationCategory,
      aggregationType,
    );

    pivot.collapse(2);

    const expectedRow = {
      value: ['Arya', 10, '', '', 10],
      depth: 1,
      row: 2,
      type: 'data',
    };

    expect(pivot.data.table[2]).to.deep.equal(expectedRow);
  });

  it('should be able to chain to collapse multiple rows', () => {
    const pivot = new Pivot(
      dataArray,
      rowsToPivotTestOne,
      colsToPivotTestOne,
      aggregationCategory,
      aggregationType,
    );

    pivot.collapse(1).collapse(2);
    const expectedTable = [
      {
        value: ['sum age', 'Stark', 'Baratheon', 'Lannister', 'Totals'],
        depth: 0,
        type: 'colHeader',
        row: 0 },
      { value: ['f', 22, 38, '', ''],
        depth: 0,
        type: 'rowHeader',
        row: 1,
      },
      {
        value: ['m', 22, 18, 133, ''],
        depth: 0,
        type: 'rowHeader',
        row: 5,
      },
      {
        type: 'aggregated',
        value: ['Totals', 44, 56, 133, ''],
      },
    ];

    expect(pivot.data.table).to.deep.equal(expectedTable);
  });

  it('should collapse to the same result regardless of order collapsed',
    () => {
      const pivot = new Pivot(
        dataArray,
        rowsToPivotTestOne,
        colsToPivotTestOne,
        aggregationCategory,
        aggregationType,
      );

      pivot.collapse(5).collapse(1);
      const expectedTable = [
        {
          value: ['sum age', 'Stark', 'Baratheon', 'Lannister', 'Totals'],
          depth: 0,
          type: 'colHeader',
          row: 0 },
        { value: ['f', 22, 38, '', ''],
          depth: 0,
          type: 'rowHeader',
          row: 1,
        },
        {
          value: ['m', 22, 18, 133, ''],
          depth: 0,
          type: 'rowHeader',
          row: 5,
        },
        {
          type: 'aggregated',
          value: ['Totals', 44, 56, 133, ''],
        },
      ];

      expect(pivot.data.table).to.deep.equal(expectedTable);
    });
};
import { expect } from 'chai';
import Pivot from '../../src';

const dataArray = [
  ['name', 'gender', 'house', 'age'],
  ['Jon', 'm', 'Stark', 14],


3ClinearGradient id='d' gradientUnits='userSpaceOnUse' x1='20.25' y1='38.976' x2='20.25' y2='22.783'%3E%3Cstop offset='0' stop-color='%23869ba6'/%3E%3Cstop offset='.379' stop-color='%238399a4'/%3E%3Cstop offset='.576' stop-color='%237b929e'/%3E%3Cstop offset='.731' stop-color='%236d8694'/%3E%3Cstop offset='.863' stop-color='%235a7785'/%3E%3Cstop offset='.981' stop-color='%23426373'/%3E%3Cstop offset='.99' stop-color='%23416271'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' gradientUnits='userSpaceOnUse' x1='20.25' y1='39.476' x2='20.25' y2='22.283'%3E%3Cstop offset='0' stop-color='%23869ba6'/%3E%3Cstop offset='.379' stop-color='%238399a4'/%3E%3Cstop offset='.576' stop-color='%237b929e'/%3E%3Cstop offset='.731' stop-color='%236d8694'/%3E%3Cstop offset='.863' stop-color='%235a7785'/%3E%3Cstop offset='.981' stop-color='%23426373'/%3E%3Cstop offset='.99' stop-color='%23416271'/%3E%3C/linearGradient%3E%3Cpath d='M21.8 37.4V24.3c0-.9-.7-1.5-1.5-1.5-.9 0-1.5.7-1.5 1.5v13.1c0 .9.7 1.5 1.5 1.5.8.1 1.5-.6 1.5-1.5z' fill='url(%23d)' stroke='url(%23e)' stroke-miterlimit='10'/%3E%3ClinearGradient id='f' gradientUnits='userSpaceOnUse' x1='20.25' y1='62.649' x2='20.25' y2='46.457'%3E%3Cstop offset='0' stop-color='%23869ba6'/%3E%3Cstop offset='.379' stop-color='%238399a4'/%3E%3Cstop offset='.576' stop-color='%237b929e'/%3E%3Cstop offset='.731' stop-color='%236d8694'/%3E%3Cstop offset='.863' stop-color='%235a7785'/%3E%3Cstop offset='.981' stop-color='%23426373'/%3E%3Cstop offset='.99' stop-color='%23416271'/%3E%3C/linearGradient%3E%3ClinearGradient id='g' gradientUnits='userSpaceOnUse' x1='20.25' y1='63.149' x2='20.25' y2='45.957'%3E%3Cstop offset='0' stop-color='%23869ba6'/%3E%3Cstop offset='.379' stop-color='%238399a4'/%3E%3Cstop offset='.576' stop-color='%237b929e'/%3E%3Cstop offset='.731' stop-color='%236d8694'/%3E%3Cstop offset='.863' stop-color='%235a7785'/%3E%3Cstop offset='.981' stop-color='%23426373'/%3E%3Cstop offset='.99' stop-color='%23416271'/%3E%3C/linearGradient%3E%3C


_TEXT_ANIM_SCALE = 1.28f;

	/** Time, in milliseconds, for the hit result text to bounce. */
	private static final int HITCIRCLE_TEXT_BOUNCE_TIME = 100;

	/** Time, in milliseconds, for the hit result text to fade. */
	private static final int HITCIRCLE_TEXT_FADE_TIME = 833;

	/** Letter grades. */
	public enum Grade {
		NULL (null, null),
		SS  (GameImage.RANKING_SS,  GameImage.RANKING_SS_SMALL),
		SSH (GameImage.RANKING_SSH, GameImage.RANKING_SSH_SMALL), // silver
		S   (GameImage.RANKING_S,   GameImage.RANKING_S_SMALL),
		SH  (GameImage.RANKING_SH,  GameImage.RANKING_SH_SMALL),  // silver
		A   (GameImage.RANKING_A,   GameImage.RANKING_A_SMALL),
		B   (GameImage.RANKING_B,   GameImage.RANKING_B_SMALL),
		C   (GameImage.RANKING_C,   GameImage.RANKING_C_SMALL),
		D   (GameImage.RANKING_D,   GameImage.RANKING_D_SMALL);

		/** GameImages associated with this grade (large and small sizes). */
		private final GameImage large, small;

		/** Large-size image scaled for use in song menu. */
		private Image menuImage;

		/**
		 * Clears all image references.
		 * This does NOT destroy images, so be careful of memory leaks!
		 */
		public static void clearReferences() {
			for (Grade grade : Grade.values())
				grade.menuImage = null;
		}

		/**
		 * Constructor.
		 * @param large the large size image
		 * @param small the small size image
		 */
		Grade(GameImage large, GameImage small) {
			this.large = large;
			this.small = small;
		}

		/**
		 * Returns the large size grade image.
		 */
		public Image getLargeImage() { return large.getImage(); }

		/**
		 * Returns the small size grade image.
		 */
		public Image getSmallImage() { return small.getImage(); }

		/**
		 * Returns the large size grade image scaled for song menu use.
		 */
		public Image getMenuImage() {
			if (menuImage != null)
				return menuImage;

			Image img = getSmallImage();
			if (!small.hasBeatmapSkinImage())  // save default image only
				this.menuImage = img;
			return img;
		}
	}

	/** Hit result types. */
	public static final int
		HIT_MISS             = 0,
		HIT_50               = 1,
		HIT_100              = 2,
		HIT_300              = 3,
		HIT_100K             = 4,   // 100-Katu
		HIT_300K             = 5,   // 300-Katu
		HIT_300G             = 6,   // Geki
		HIT_SLIDER10         = 7,
		HIT_SLIDER30         = 8,
		HIT_MAX              = 9,
		HIT_SLIDER_REPEAT    = 10,
		HIT_ANIMATION_RESULT = 11,
		HIT_SPINNERSPIN      = 12,
		HIT_SPINNERBONUS     = 13,
		HIT_MU               = 14;  // Mu

	/** Random number generator (for score animation). **/
	private static Random random = new Random();

	/** Hit result-related images (indexed by HIT_* constants to HIT_MAX). */
	private Image[] hitResults;

	/** Counts of each hit result so far (indexed by HIT_* constants to HIT_MAX). */
	private int[] hitResultCount;

	/** Total objects including slider hits/ticks (for determining Full Combo status). */
	private int fullObjectCount;

	/** The current combo streak. */
	private int combo;

	/** The max combo streak obtained. */
	private int comboMax;

	/** The current combo pop timer, in milliseconds. */
	private int comboPopTime;

	/**
	 * Hit result types accumulated this streak (bitmask), for Katu/Geki status.
	 * <ul>
	 * <li>&1: 100
	 * <li>&2: 50/Miss
	 * </ul>
	 */
	private byte comboEnd;

	/** Combo b


State:         uuid.New().String(),
		MDMDeviceType:          "CIMClient_Windows",
		MDMDeviceName:          "DESKTOP-1C3ARC1",
		MDMEnrollType:          "ProgrammaticEnrollment",
		MDMEnrollUserID:        "upn@domain.com",
		MDMEnrollProtoVersion:  "5.0",
		MDMEnrollClientVersion: "10.0.19045.2965",
		MDMNotInOOBE:           false,
	}

	err := s.ds.MDMWindowsInsertEnrolledDevice(context.Background(), enrolledDevice)
	require.NoError(t, err)

	// Checking if device was enrolled
	_, err = s.ds.MDMWindowsGetEnrolledDeviceWithDeviceID(context.Background(), deviceID)
	require.NoError(t, err)

	// Preparing the SyncML unenroll request
	requestBytes, err := s.newSyncMLUnenrollMsg(deviceID, targetEndpointURL)
	require.NoError(t, err)

	resp := s.DoRaw("POST", targetEndpointURL, requestBytes, http.StatusOK)

	// Checking that Command error code was updated

	// Checking response headers
	require.Contains(t, resp.Header["Content-Type"], syncml.SyncMLContentType)

	// Read response data
	resBytes, err := io.ReadAll(resp.Body)
	require.NoError(t, err)

	// Checking if response can be unmarshalled to an golang type
	var xmlType interface{}
	err = xml.Unmarshal(resBytes, &xmlType)
	require.NoError(t, err)

	// Checking if device was unenrolled
	_, err = s.ds.MDMWindowsGetEnrolledDeviceWithDeviceID(context.Background(), deviceID)
	require.True(t, fleet.IsNotFound(err))
}

func (s *integrationMDMTestSuite) TestRunMDMCommands() {
	t := s.T()

	// create a Windows host enrolled in MDM
	enrolledWindows, _ := createWindowsHostThenEnrollMDM(s.ds, s.server.URL, t)

	// create an unenrolled Windows host
	unenrolledWindows := createOrbitEnrolledHost(t, "windows", "h2", s.ds)

	// create an enrolled and unenrolled macOS host
	enrolledMac, _ := createHostThenEnrollMDM(s.ds, s.server.URL, t)
	unenrolledMac := createOrbitEnrolledHost(t, "darwin", "h4", s.ds)

	macRawCmd := `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Command</key>
    <dict>
        <key>RequestType</key>
        <string>ShutDownDevice</string>
    </dict>
    <key>CommandUUID</key>
    <string>0001_ShutDownDevice</string>
</dict>
</plist>`

	winRawCmd := `
<Exec>
	<CmdID>11</CmdID>
	<Item>
		<Target>
			<LocURI>./SetValues</LocURI>
		</Target>
		<Meta>
			<Format xmlns="syncml:metinf">chr</Format>
			<Type xmlns="syncml:metinf">text/plain</Type>
		</Meta>
		<Data>NamedValuesList=MinPasswordLength,8;</Data>
	</Item>
</Exec>
`

	var runResp runMDMCommandResponse

	// no host provided
	s.DoJSON("POST", "/api/latest/fleet/commands/run", &runMDMCommandRequest{
		Command: base64.StdEncoding.EncodeToString([]byte(macRawCmd)),
	}, http.StatusNotFound, &runResp)

	// mix of mdm and non-mdm hosts
	s.DoJSON("POST", "/api/latest/fleet/commands/run", &runMDMCo


)
	db.SetDB(g.dbConfig.Name,g.dbConfig.DatabaseName)
	return db
}
//FieldName
func (g *genInfo)FieldName(feild string)string{
	arr:=strings.Split(feild,"_")
	m:=""
	for _,k:=range arr{
		m+=lib.FirstToUpper(k)
	}
	return m
}
func (g *genInfo)getTableName(table string)string{
	table=g.getSmallTableName(table)
	arr:=strings.Split(table,"_")
	m:=""
	for i,k:=range arr{
		if g.dbConfig.Prefix!=""&&i==0&&k==g.dbConfig.Prefix{
		}else if g.dbConfig.Suffix!=""&&i==len(arr)-1&&k==g.dbConfig.Suffix{
		}else{
			m+=lib.FirstToUpper(arr[i])
		}
	}
	return m
}
//getDbName
func (g *genInfo)getDbName(dbName string)string{
	arr:=strings.Split(dbName,"_")
	var arr2 []string
	for i,k:=range arr{
		if g.isCode{
			if i!=len(arr)-1{
				arr2=append(arr2, k)
			}
		}else{
			arr2=append(arr2, k)
		}
	}
	return strings.Join(arr2,"_")
}
//getSmallTableName
func (g *genInfo)getSmallTableName(table string)string{
	arr:=strings.Split(table,"_")
	var arr2 []string
	for i,k:=range arr{
		if g.isCode{
			if i!=len(arr)-1{
				arr2=append(arr2, k)
			}
		}else{
			arr2=append(arr2, k)
		}
	}
	return strings.Join(arr2,"_")
}
//getModelName
func (g *genInfo) getModelName(table string)string{
	return g.getTableName(table)+"Model"
}
//getEntityName
func (g *genInfo) getEntityName(table string)string{
	return g.getTableName(table)+"Entity"
}
//genModel
func (g *genInfo) genModel(table string){
	modelName:=g.getModelName(table)
	entityName:=g.getEntityName(table)
	//tableName:=g.getTableName(table)
	content:=fmt.Sprintf(
		g.getModelTemplate(),
		g.moduleName,
		modelName,
		modelName,
		modelName,
		modelName,
		modelName,
		modelName,
		g.getDbName(g.dbConfig.DatabaseName),
		g.getSmallTableName(table),
		modelName,
		entityName,
		modelName,
		modelName,
		modelName,
		entityName,
		entityName,
	)
	fileName:=fmt.Sprintf("model/%s.go",strings.ToLower(modelName))
	file.PutContent(fileName,content)
	//fmt.Println(content)
}

var mysqlTypMap map[string]string=map[string]string{
	"bigint":"int64",
	"binary":"[]byte",
	"bit":"byte",
	"blob":"[]byte",
	"char":"string",
	"date":"string",
	"datetime":"string",
	"decimal":"float32",
	"double":"float64",
	"float":"float32",
	"int":"int",
	"integer":"int",
	"varchar":"string",
	"tinyint":"int",
	"time":"int",
	"tinytext":"string",
	"text":"string",
	"longtext":"string",
	"mediumtext":"string",
	"mediumint":"int",
	"smallint":"int",
}

//genEntity
func (g *genI


dt * dt * 0.5;// s = s0 + v0*t + a*t*t*0.5;
        if(pos.y <= 0.5){
            pos.y = 0.5;
        }
        this.vy += (this.jumTime > 2 ? (0.8 / this.jumTime - 0.0005) : 1) * this.gravity * dt; // v = v0 + a*t;

        this.node.setWorldPosition(pos);

        if(this.passedTime >= this.jumTime){
            this.isJumping = false;
            if(this.endFunc){
                this.endFunc(this.missing_time);
            }
        }
    }

    lateUpdate(): void{
        if(this.camera && this.isJumping){
            let pos = this.camera.getWorldPosition();
            pos.z = this.node.worldPosition.z + this.cameraOffetZ;
            this.camera.setWorldPosition(pos);
        }
    }
}
import { Bot } from "../../../bot.ts";
import { ScheduledEvent } from "../../../transformers/scheduledEvent.ts";
import { DiscordScheduledEvent } from "../../../types/discord.ts";
import { ScheduledEventEntityType, ScheduledEventPrivacyLevel } from "../../../types/shared.ts";

/** Create a guild scheduled event in the guild. A guild can have a maximum of 100 events with `SCHEDULED` or `ACTIVE` status at any time. */
export async function createScheduledEvent(
  bot: Bot,
  guildId: bigint,
  options: CreateScheduledEvent,
): Promise<ScheduledEvent> {
  if (!bot.utils.validateLength(options.name, { min: 1, max: 100 })) {
    throw new Error("Name must be between 1-100 characters.");
  }
  if (options.description && !bot.utils.validateLength(options.description, { max: 1000 })) {
    throw new Error("Description must be below 1000 characters.");
  }
  if (options.location) {
    if (!bot.utils.validateLength(options.location, { max: 100 })) {
      throw new Error("Location must be below 100 characters.");
    }
    if (options.entityType === ScheduledEventEntityType.Voice) {
      throw new Error("Location can not be provided for a Voice event.");
    }
  }
  if (options.entityType === ScheduledEventEntityType.External) {
    if (!options.scheduledEndTime) throw new Error("A scheduled end time is required when making an External event.");
    if (!options.location) throw new Error("A location is required when making an External event.");
  }
  if (options.scheduledStartTime && options.scheduledEndTime && options.scheduledStartTime > options.scheduledEndTime) {
    throw new Error("Cannot schedule event to end before starting.");
  }

  const result = await bot.rest.runMethod<DiscordScheduledEvent>(
    bot.rest,
    "POST",
    bot.constants.routes.GUILD_SCHEDULED_EVENTS(guildId),
    {
      channel_id: options.channelId?.toString(),
      entity_metadata: options.location ? { location: options.location } : undefined,
      name: options.name,
      description: options.description,
      scheduled_start_time: new Date(options.scheduledStartTime).toISOString(),
      scheduled_end_time: options.scheduledEndTime ? new Date(options.scheduledEndTime).toISOString() : undefined,
      privacy_level: options.privacyLevel || ScheduledEventPrivacyLevel.GuildOnly,
      entity_type: options.entityType,
      reason: options.reason,
    },
  );

  return bot.transformers.scheduledEvent(bot, result);
}

export interface CreateScheduledEvent {
  /** the channel id of the scheduled event. */
  channelId?: bigint;


z-only-whitespace:-moz-last-node, th > listing:-moz-only-whitespace:-moz-last-node,
td > plaintext:-moz-only-whitespace:-moz-last-node, th > plaintext:-moz-only-whitespace:-moz-last-node,
td > xmp:-moz-only-whitespace:-moz-last-node, th > xmp:-moz-only-whitespace:-moz-last-node,
td > pre:-moz-only-whitespace:-moz-last-node, th > pre:-moz-only-whitespace:-moz-last-node,
td > ul:-moz-only-whitespace:-moz-last-node, th > ul:-moz-only-whitespace:-moz-last-node,
td > menu:-moz-only-whitespace:-moz-last-node, th > menu:-moz-only-whitespace:-moz-last-node,
td > dir:-moz-only-whitespace:-moz-last-node, th > dir:-moz-only-whitespace:-moz-last-node,
td > ol:-moz-only-whitespace:-moz-last-node, th > ol:-moz-only-whitespace:-moz-last-node {
  margin-block-start: 0;
}

/* Quirk: DD not in DL has text-indent instead of margin (b=5119) */

:not(dl) > dd {
  display: inline;
  margin: 0;
}

:not(dl) > dd:before {
  display: inline;
  white-space: pre;
  font-size: 1px;
  line-height: 0;
  content: "\A  ";
  -moz-margin-end: 40px;
}

/* quirk to indent nested DL elements (b=8749) */

dl > dl {
  display: block;
  -moz-margin-start: 40px;
}

/* Quirk: Make floated images have a margin  (b=58899) */
img[align=left]:-moz-dir(ltr), img[align=right]:-moz-dir(rtl) {
  -moz-margin-end: 3px;
}

img[align=right]:-moz-dir(ltr), img[align=left]:-moz-dir(rtl) {
  -moz-margin-start: 3px;
}

/*
 * Quirk: Use border-box box sizing for text inputs, password inputs, and
 * textareas.  (b=184478 on why we use content-box sizing in standards mode)
 */

/* Note that all other <input>s already use border-box
   sizing, so we're ok with this selector */
input:not([type=image]), textarea {
  box-sizing: border-box;
}

/* Quirk: give form margin for compat (b=41806) */
form {
  margin-block-end: 1em;
}
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#style-editor-chrome {
  -moz-box-flex: 1;
}

.stylesheet-error-message {
  display: none;
}

li.error > .stylesheet-info > .stylesheet-more  > .stylesheet-error-message {
  display: block;
}

.devtools-toolbar > spacer {
  -moz-box-flex: 1;
}

.splitview-nav > li,
.stylesheet-info,
.stylesheet-more {
  display: -moz-box;
}

.stylesheet-details-container {
  -moz-box-flex: 1;
}

.stylesheet-media-container {
  overflow-y: auto;
}

.media-rule-label {
  display: flex;
}

.media-rule-condition {


ame")
    val name: String
)

data class Property(
    @SerializedName("description")
    val description: String,

    @SerializedName("type")
    val type: String,

    @SerializedName("name")
    val name: String,

    @SerializedName("level")
    val level: String,

    @SerializedName("style")
    val style: String,

    @SerializedName("allowNameWrap")
    val allowNameWrap: Boolean,

    @SerializedName("valueId")
    val valueId: String?,

    @SerializedName("ifNull")
    val ifNull: String?,

    @SerializedName("missingIfNull")
    val missingIfNull: Boolean,

    @SerializedName("propertyType")
    val propertyType: String,

    @SerializedName("defaultLevel")
    val defaultLevel: String,

    // 'value' 可以是 Int, Boolean, String 或 null, 所以用 Any?
    @SerializedName("value")
    val value: Any?,

    @SerializedName("locationId")
    val locationId: Int?,

    @SerializedName("creationLocation")
    val creationLocation: CreationLocation?,

    @SerializedName("createdByLocalProject")
    val createdByLocalProject: Boolean?,

    @SerializedName("defaultValue")
    val defaultValue: Any?,

    @SerializedName("isDiagnosticableValue")
    val isDiagnosticableValue: Boolean?,

    @SerializedName("showName")
    val showName: Boolean?,

    @SerializedName("ifTrue")
    val ifTrue: String?
)/*
 * Copyright (c) 2015, the Dart project authors.
 *
 * Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html
 *
 * 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.
 */
package vm.element

// This file is generated by the script: pkg/vm_service/tool/generate.dart in dart-lang/sdk.

import com.google.gson.JsonArray
import com.google.gson.JsonObject

/**
 * {@link TypeArguments} 对象表示某个实例化泛型类型的类型参数向量。
 */
class TypeArguments(json: JsonObject) : Obj(json) {

    /**
     * 此类型参数列表的名称。
     */
    fun getName(): String? {
        return getAsString("name")
    }

    /**
     * 类型列表。
     *
     * 该值始终是以下类型之一：Type, TypeRef, TypeParameter, BoundedType。
     */
    fun getTypes(): ElementList<InstanceRef> {
        return object : ElementList<InstanceRef>(json.get("types").asJsonArray) {
            override fun basicGet(array: JsonArray, index: Int): InstanceRef {
                return InstanceRef(array.get(index).asJsonObject)
            }
        }
    }
}
/*
 * Copyright (c) 2015, the Dart project authors.
 *
 * Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to


ly int Failures;

        /// <summary>
        /// The exception that was thrown
        /// </summary>
        [Id(3)]
        public readonly Exception Exception;

        /// <summary>
        /// Creates new instance of <see cref="BackgroundJobFailed"/> message
        /// </summary>
        /// <param name="name">The name of the job</param>
        /// <param name="id">The unique id of the job (PID)</param>
        /// <param name="exception">The exception that was thrown</param>
        /// <param name="failures">The number of times this job has failed</param>
        public BackgroundJobFailed(string name, int id, int failures, Exception exception) =>
            (Name, Id, Failures, Exception) = (name, id, failures, exception);
    }

    /// <summary>
    /// This message is sent back to the actor hosting the job
    /// when job execution has been terminated, either
    /// by itself (ran to completion) or terminated externally.
    /// </summary>
    [GenerateSerializer, Immutable]
    public class BackgroundJobTerminated
    {
        /// <summary>
        /// The name of the job
        /// </summary>
        [Id(0)]
        public readonly string Name;

        /// <summary>
        /// The unique id of the job (PID)
        /// </summary>
        [Id(1)]
        public readonly int Id;

        /// <summary>
        /// Creates new instance of <see cref="BackgroundJobTerminated"/> message
        /// </summary>
        /// <param name="name">The name of the job</param>
        /// <param name="id">The unique id of the job (PID)</param>
        public BackgroundJobTerminated(string name, int id) =>
            (Name, Id) = (name, id);
    }
}


sage response = await httpClient.GetAsync("users");
            response.EnsureSuccessStatusCode();
            string json = await response.Content.ReadAsStringAsync();
            return JsonSerializer.Deserialize<List<User>>(json, new JsonSerializerOptions
            {
                PropertyNameCaseInsensitive = true
            });
        }
        public async Task<bool> CanDeleteUsersAsync()
        {
            HttpResponseMessage response = await httpClient.GetAsync("users/candelete");
            response.EnsureSuccessStatusCode();
            string json = await response.Content.ReadAsStringAsync();
            return JsonSerializer.Deserialize<bool>(json);
        }
        public async Task DeleteUserAsync(string email)
        {
            var response = await httpClient.DeleteAsync($"users/{email}");
            response.EnsureSuccessStatusCode();
        }
        public async Task<User> GetCurrentUserAsync()
        {
            HttpResponseMessage response = await httpClient.GetAsync("me");
            response.EnsureSuccessStatusCode();
            string json = await response.Content.ReadAsStringAsync();
            return JsonSerializer.Deserialize<User>(json, new JsonSerializerOptions
            {
                PropertyNameCaseInsensitive = true
            });
        }
        public async Task GoogleAuthAsync()
        {
            WebAuthenticatorResult authResult = await WebAuthenticator.Default.AuthenticateAsync(
                new Uri($"{baseAddress}mauth/google"),
                new Uri("myapp://"));
            BearerTokenInfo tokenInfo = new BearerTokenInfo
            {
                AccessToken = authResult.AccessToken,
                RefreshToken = authResult.RefreshToken,
                ExpiresIn = int.Parse(authResult.Properties["expires_in"]),
                TokenTimestamp = DateTime.UtcNow
            };
            SetAuthHeader(tokenInfo.AccessToken);
            await SessionService.Instance.SaveTokenToStorage(tokenInfo);
        }
    }
}


ectstore-fuse')
    manager.flush_pg_stats(range(num_osds))
    manager.wait_for_clean()

    # write some data
    p = manager.do_rados(mon, ['-p', 'rbd', 'bench', '--no-cleanup', '1',
                               'write', '-b', '4096'])
    log.info('err is %d' % p.exitstatus)

    # wait for some PG to have data that we can mess with
    pg, acting = wait_for_victim_pg(manager)
    osd = acting[0]

    osd_remote, obj_path, obj_name = find_victim_object(ctx, pg, osd)
    manager.do_rados(mon, ['-p', 'rbd', 'setomapval', obj_name, 'key', 'val'])
    log.info('err is %d' % p.exitstatus)
    manager.do_rados(mon, ['-p', 'rbd', 'setomapheader', obj_name, 'hdr'])
    log.info('err is %d' % p.exitstatus)

    # Update missing digests, requires "osd deep scrub update digest min age: 0"
    pgnum = get_pgnum(pg)
    manager.do_pg_scrub('rbd', pgnum, 'deep-scrub')

    log.info('messing with PG %s on osd %d' % (pg, osd))
    test_repair_corrupted_obj(ctx, manager, pg, osd_remote, obj_path, 'rbd')
    test_repair_bad_omap(ctx, manager, pg, osd, obj_name)
    test_list_inconsistent_obj(ctx, manager, osd_remote, pg, acting, osd,
                               obj_name, obj_path)
    log.info('test successful!')

    # shut down fuse mount
    for i in range(num_osds):
        manager.raw_cluster_cmd('tell', 'osd.%d' % i, 'injectargs',
                                '--', '--no-osd-objectstore-fuse')
    time.sleep(5)
    log.info('done')


pthread_t th;

    gettimeofday(&tv_start, NULL);

    NVM_Initialize();
    cal_rgn_id = NVM_FindOrCreateRegion("cal", O_RDWR, NULL);

    alist = create_cal();

    NVM_SetRegionRoot(cal_rgn_id, alist);

    pthread_create(&th, 0, (void *(*)(void *))do_work, 0);

    int t = 0;
    while (!t) {
        NVM_LOCK(ready_lock);
        t = ready;
        NVM_UNLOCK(ready_lock);
    }

    uint64_t sum = 0;
    int count = 0;
    while (count < NUM_ITER) {
        sum += sum_cal(alist);

        add_cal(alist, 100);
        sum += sum_cal(alist);

        insert_cal(alist, 200, 210);
        sum += sum_cal(alist);

#ifdef _FORCE_FAIL
        if (count == NUM_ITER / 2)
            exit(0);
#endif
        remove_cal(alist, 50);
        sum += sum_cal(alist);

        ++count;
    }

    fprintf(stderr, "parent sum is %ld\n", sum);

    pthread_join(th, NULL);

    NVM_CloseRegion(cal_rgn_id);

#ifdef NVM_STATS
    NVM_PrintStats();
#endif

    NVM_Finalize();

    gettimeofday(&tv_end, NULL);
    fprintf(stderr, "time elapsed %ld us\n",
            tv_end.tv_usec - tv_start.tv_usec +
                (tv_end.tv_sec - tv_start.tv_sec) * 1000000);

    return 0;
}

/*
int main(int argc, char *argv[])
{
    COW_AL * alist = create_cal();
    sum_cal(*alist);
    add_cal(alist, 100);
    sum_cal(*alist);
    insert_cal(alist, 2, 210);
    sum_cal(*alist);
    remove_cal(alist, 10);
    sum_cal(*alist);
    fprintf(stderr, "Does 23 exist? %s\n",
            cal_contains(alist, 23) ? "yes" : "no");
    fprintf(stderr, "Elements at positions 5 and 86 are %d and %d\n",
            cal_get(alist, 5), cal_get(alist, 86));
}

*/


t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis===\"object\"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.


 used to set gpu memory for the job,match the option --gpumemory
func (b *KFServingJobBuilder) GPUMemory(memory int) *KFServingJobBuilder {
	if memory > 0 {
		b.args.GPUMemory = memory
	}
	return b
}

// GPUCore is used to set gpu core for the job, match the option --gpucore
func (b *KFServingJobBuilder) GPUCore(core int) *KFServingJobBuilder {
	if core > 0 {
		b.args.GPUCore = core
	}
	return b
}

// Image is used to set job image,match the option --image
func (b *KFServingJobBuilder) Image(image string) *KFServingJobBuilder {
	if image != "" {
		b.args.Image = image
	}
	return b
}

// ImagePullPolicy is used to set image pull policy,match the option --image-pull-policy
func (b *KFServingJobBuilder) ImagePullPolicy(policy string) *KFServingJobBuilder {
	if policy != "" {
		b.args.ImagePullPolicy = policy
	}
	return b
}

// CPU assign cpu limits,match the option --cpu
func (b *KFServingJobBuilder) CPU(cpu string) *KFServingJobBuilder {
	if cpu != "" {
		b.args.Cpu = cpu
	}
	return b
}

// Memory assign memory limits,match option --memory
func (b *KFServingJobBuilder) Memory(memory string) *KFServingJobBuilder {
	if memory != "" {
		b.args.Memory = memory
	}
	return b
}

// Envs is used to set env of job containers,match option --env
func (b *KFServingJobBuilder) Envs(envs map[string]string) *KFServingJobBuilder {
	if len(envs) != 0 {
		envSlice := []string{}
		for key, value := range envs {
			envSlice = append(envSlice, fmt.Sprintf("%v=%v", key, value))
		}
		b.argValues["env"] = &envSlice
	}
	return b
}

// Replicas is used to set serving job replicas,match the option --replicas
func (b *KFServingJobBuilder) Replicas(count int) *KFServingJobBuilder {
	if count > 0 {
		b.args.Replicas = count
	}
	return b
}

// EnableIstio is used to enable istio,match the option --enable-istio
func (b *KFServingJobBuilder) EnableIstio() *KFServingJobBuilder {
	b.args.EnableIstio = true
	return b
}

// ExposeService is used to expose service,match the option --expose-service
func (b *KFServingJobBuilder) ExposeService() *KFServingJobBuilder {
	b.args.ExposeService = true
	return b
}

// Version is used to set serving job version,match the option --version
func (b *KFServingJobBuilder) Version(version string) *KFServingJobBuilder {
	if version != "" {
		b.args.Version = version
	}
	return b
}

// Tolerations is used to set tolerations for tolerate nodes,match option --toleration
func (b *KFServingJobBuilder) Tolerations(tolerations []string) *KFServingJobBuilder {
	b.argValues["toleration"] = &tolerations
	return b
}

// NodeSelectors is used to set node selectors for scheduling job,match option --selector
func (b *KFServingJobBuilder) NodeSelectors(selectors map[string]string) *KFServingJobBuilder {
	if len(selectors) != 0 {
		selectorsSlice := []string{}
		for key, value := range selectors {
			selectorsSlice = append(selectorsSlice, fmt.Sprintf("%v=%v", key, value))
		}
		b.argValues["selector"] = &selecto


Monster 4 ID"] = 40,
      ["Monster 5 ID"] = 103,
      ["Monster DPS%"] = 100,
      ["Monster HP%"] = 3000,
      ["MP 1"] = 0,
      ["MP 2"] = 0,
      ["MP 3"] = 0,
      ["MP 4"] = 900,
      ["MP 5"] = 0,
      ["Raid Wave Weight"] = 2,
      ["Stage Difficulty"] = 3,
      ["Stage ID"] = 40016,
      ["Stage Name"] = LSTR("BATTLE.FURY_CLAW"),
      ["Stage Type"] = "guild",
      ["Stars 1"] = 5,
      ["Stars 2"] = 5,
      ["Stars 3"] = 5,
      ["Stars 4"] = 5,
      ["Stars 5"] = 5,
      ["Wave ID"] = 2
    },
    [3] = {
      ["Background Pic"] = "battle_bg/bbg_underground_hall.jpg",
      ["Boss DPS%"] = 100,
      ["Boss HP%"] = 120,
      ["Boss Position"] = 2,
      ["BOSS SIZE%"] = 0,
      ["Chest 1 ID"] = 10335,
      ["Chest 1 Mult"] = 50,
      ["Chest 2 ID"] = 10248,
      ["Chest 2 Mult"] = 0,
      ["Chest 3 ID"] = 10335,
      ["Chest 3 Mult"] = 50,
      ["Chest 4 ID"] = 10335,
      ["Chest 4 Mult"] = 50,
      ["Chest 5 ID"] = 10335,
      ["Chest 5 Mult"] = 50,
      ["FD Bonus 1"] = 0,
      ["FD Bonus 2"] = 0,
      ["FD Bonus 3"] = 0,
      ["FD Bonus 4"] = 0,
      ["FD Bonus 5"] = 0,
      ["H Flip"] = false,
      ["Level 1"] = 71,
      ["Level 2"] = 71,
      ["Level 3"] = 71,
      ["Level 4"] = 71,
      ["Level 5"] = 71,
      ["Money Reward 1"] = 0,
      ["Money Reward 2"] = 0,
      ["Money Reward 3"] = 0,
      ["Money Reward 4"] = 0,
      ["Money Reward 5"] = 0,
      ["Monster 1 ID"] = 121,
      ["Monster 2 ID"] = 23,
      ["Monster 3 ID"] = 123,
      ["Monster 4 ID"] = 102,
      ["Monster 5 ID"] = 11,
      ["Monster DPS%"] = 100,
      ["Monster HP%"] = 3500,
      ["MP 1"] = 0,
      ["MP 2"] = 900,
      ["MP 3"] = 0,
      ["MP 4"] = 0,
      ["MP 5"] = 900,
      ["Raid Wave Weight"] = 3,
      ["Stage Difficulty"] = 3,
      ["Stage ID"] = 40016,
      ["Stage Name"] = LSTR("BATTLE.FURY_CLAW"),
      ["Stage Type"] = "guild",
      ["Stars 1"] = 5,
      ["Stars 2"] = 5,
      ["Stars 3"] = 5,
      ["Stars 4"] = 5,
      ["Stars 5"] = 5,
      ["Wave ID"] = 3
    }
  },
  [40017] = {
    [1] = {
      ["Background Pic"] = "battle_bg/bbg_fall_grassland.jpg",
      ["Boss DPS%"] = 120,
      ["Boss HP%"] = 120,
      ["Boss Position"] = 4,
      ["BOSS SIZE%"] = 0,
      ["Chest 1 ID"] = 10336,
      ["Chest 1 Mult"] = 50,
      ["Chest 2 ID"] = 10336,
      ["Chest 2 Mult"] = 50,
      ["Chest 3 ID"] = 10336,
      ["Chest 3 Mult"] = 50,
      ["Chest 4 ID"] = 10336,
      ["Chest 4 Mult"] = 50,
      ["Chest 5 ID"] = 0,
      ["Chest


0409241);

  // Convert to ECI
  simCore::Coordinate eciFromLla;
  cc.convert(llaPos, eciFromLla, simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(eciFromLla.coordinateSystem() == simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(almostEqualCoord(eciFromLla, eciPos));

  simCore::Coordinate eciFromXeast;
  cc.convert(xEastPos, eciFromXeast, simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(eciFromXeast.coordinateSystem() == simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(almostEqualCoord(eciFromXeast, eciPos));

  simCore::Coordinate eciFromEcef;
  cc.convert(ecefPos, eciFromEcef, simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(eciFromEcef.coordinateSystem() == simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(almostEqualCoord(eciFromEcef, eciPos));

  simCore::Coordinate eciFromEnu;
  cc.convert(enuPos, eciFromEnu, simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(eciFromEnu.coordinateSystem() == simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(almostEqualCoord(eciFromEnu, eciPos));

  simCore::Coordinate eciFromNed;
  cc.convert(nedPos, eciFromNed, simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(eciFromNed.coordinateSystem() == simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(almostEqualCoord(eciFromNed, eciPos));

  simCore::Coordinate eciFromNwu;
  cc.convert(nwuPos, eciFromNwu, simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(eciFromNwu.coordinateSystem() == simCore::COORD_SYS_ECI);
  rv += SDK_ASSERT(almostEqualCoord(eciFromNwu, eciPos));

  // Convert from ECI
  simCore::Coordinate llaFromEci;
  cc.convert(eciPos, llaFromEci, simCore::COORD_SYS_LLA);
  rv += SDK_ASSERT(llaFromEci.coordinateSystem() == simCore::COORD_SYS_LLA);
  rv += SDK_ASSERT(almostEqualCoord(llaFromEci, llaPos));

  simCore::Coordinate xEastFromEci;
  cc.convert(eciPos, xEastFromEci, simCore::COORD_SYS_XEAST);
  rv += SDK_ASSERT(xEastFromEci.coordinateSystem() == simCore::COORD_SYS_XEAST);
  rv += SDK_ASSERT(almostEqualCoord(xEastFromEci, xEastPos));

  simCore::Coordinate ecefFromEci;
  cc.convert(eciPos, ecefFromEci, simCore::COORD_SYS_ECEF);
  rv += SDK_ASSERT(ecefFromEci.coordinateSystem() == simCore::COORD_SYS_ECEF);
  rv += SDK_ASSERT(almostEqualCoord(ecefFromEci, ecefPos));

  simCore::Coordinate enuFromEci;
  cc.convert(eciPos, enuFromEci, simCore::COORD_SYS_ENU);
  rv += SDK_ASSERT(enuFromEci.coordinateSystem() == simCore::COORD_SYS_ENU);
  rv += SDK_ASSERT(almostEqualCoord(enuFromEci, enuPos));

  simCore::Coordinate nedFromEci;
  cc.convert(eciPos, nedFromEci, simCore


local I18N = require("api.I18N")
local Gui = require("api.Gui")
local Input = require("api.Input")
local Save = require("api.Save")
local Action = require("api.Action")
local Item = require("api.Item")
local Enum = require("api.Enum")

local Autopickup = {}

Autopickup.OP = {
   DESTROY = "!",
   DESTROY_PROMPT = "!?",
   PROMPT = "?",
   NEGATION = "~",
   AUTOSAVE = "%",
   SET_NO_DROP = "=",
}

local VALID_OPS = {}
for k, v in pairs(Autopickup.OP) do
   VALID_OPS[v] = k
end

function Autopickup.compile_rule(rule)
   -- >>>>>>>> oomSEST/src/southtyris.hsp:82451 						p = 0 ...
   local fns = {}

   rule = string.strip_whitespace(rule)

   local ops = {}

   local ch = rule:sub(0, 1)
   local op = VALID_OPS[ch]
   while op do
      rule = rule:sub(2)
      ops[#ops+1] = ch
      ch = rule:sub(0, 1)
      if ops[#ops] == Autopickup.OP.DESTROY and ch == "?" then
         ops[#ops] = Autopickup.OP.DESTROY_PROMPT
         rule = rule:sub(2)
         ch = rule:sub(0, 1)
      end
      op = VALID_OPS[ch]
   end

   local going = true
   while going do
      going = false
      for _, pred in data["autopickup.predicate"]:iter() do
         local ident = I18N.localize_optional("autopickup.predicate", pred._id, "identifier")
         if ident == nil then
            error(("Autopickup: Missing identifier for predicate %s"):format(pred._id))
         else
            if string.has_prefix(rule, ident) then
               rule = string.strip_prefix(rule, ident)
               rule = string.strip_whitespace(rule)
               fns[#fns+1] = function(item, chara)
                  return pred.match(item, chara)
               end
               going = true
               break
            end
         end
      end
   end

   -- item name or target identifier
   local name = rule
   local target_pred = nil

   for _, target in data["autopickup.target"]:iter() do
      local ident = I18N.localize_optional("autopickup.target", target._id, "identifier")
      if ident == nil then
         error(("Autopickup: Missing identifier for target %s"):format(rule))
      else
         if name == ident then
            target_pred = function(item, chara)
               return target.match(item, chara)
            end
            break
         end
      end
   end

   return function(item, chara)
      local matched = false
      for _, pred in ipairs(fns) do
         if not pred(item, chara) then
            return false
         end
         matched = true
      end

      if item:build_name():find(name) then
         return true, ops
      else
         if not matched then
            return false
         end
         if target_pred and target_pred(item, chara) then
            return true, ops
         end
      end

      return false
   end
   -- <<<<<<<< oomSEST/src/southtyris.hsp


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

#include <assert.h>

void ngtcp2_idtr_init(ngtcp2_idtr *idtr, const ngtcp2_mem *mem) {
  ngtcp2_gaptr_init(&idtr->gap, mem);
}

void ngtcp2_idtr_free(ngtcp2_idtr *idtr) {
  if (idtr == NULL) {
    return;
  }

  ngtcp2_gaptr_free(&idtr->gap);
}

/*
 * id_from_stream_id translates |stream_id| to an internal ID.
 */
static uint64_t id_from_stream_id(int64_t stream_id) {
  return (uint64_t)(stream_id >> 2);
}

int ngtcp2_idtr_open(ngtcp2_idtr *idtr, int64_t stream_id) {
  uint64_t q;

  q = id_from_stream_id(stream_id);

  if (ngtcp2_gaptr_is_pushed(&idtr->gap, q, 1)) {
    return NGTCP2_ERR_STREAM_IN_USE;
  }

  return ngtcp2_gaptr_push(&idtr->gap, q, 1);
}

int ngtcp2_idtr_is_open(const ngtcp2_idtr *idtr, int64_t stream_id) {
  uint64_t q;

  q = id_from_stream_id(stream_id);

  return ngtcp2_gaptr_is_pushed(&idtr->gap, q, 1);
}


对此多加排斥，一面接受舒斯伯利博士建议尽可能客观地对待它们。

上古米纳尔之灰石雕刻而成之五角之星乃汝之护甲。佩其之人可抵抗巫术与恶魔，对抗深潜者，巨噬蠕虫，令人憎恶之米-戈，舒格斯，沃尔米斯人，丘丘人，瓦鲁斯人，及其它侍奉旧日支配者与其眷祖之仆从；亦可操控一切攀爬行走，游水蠕动之异兽，或飞翔至无归之源头，但其无力应对旧日支配者之正身。

于伊赫之地同宏伟之拉莱耶，至易哈-尼斯雷与约斯；于尤格斯同佐希克，至恩卡伊深渊与克恩-颜之城；于哈利之湖同卡达斯坐落于冰封废土之上，至伊伯之城与卡尔克萨废墟，此印皆有其功效。然而群星衰落，恒星熄灭，星之间隔日渐加增，一切约束之力继而衰败减退——因此印正乃仁慈之旧神施于旧日支配者之法朮。而上古之刻将重现于星辰，先世预言将再次应验：[8]

那永恒长眠的并非亡者，

在诡秘的万古中

即使死亡本身亦会消逝。

正当我忙于抄写这些书页时，我发现一位年长的图书管理员正在聚精会神的审视着我，并一点点地不断向我凑近。我对此并不在意——世间仅存五件抄本，死者之书的稀有可想而知，那位老者自然而然地不希望见到这件抄本发生任何闪失。而我马上又意识到他似乎对我更加好奇，于是我在完成抄写之后又在原地逗留了一阵，等待着他上前与我搭讪。

[1]Chianti，意大利图斯康尼(Tuscany)地区特产的红酒。

[2]Chateau d'Yquem，法国南部基隆特省特产的白酒。

[3]Naacal, Aklo, and Tsatho-yo，Naacal最早作爲语言被英国神秘学作家詹姆斯.彻奇沃德 (James Churchward) 认爲是史前穆大陆的语言，洛伕克拉伕特之后在《穿越银鈅之门》中有所提及；Aklo起初来自于亚瑟.麦肯 (Art


/* Round to integer, toward zero.  i386 version.
   Copyright (C) 2024-2025 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <https://www.gnu.org/licenses/>.  */

#include <libm-alias-float.h>

#define FUNC       __truncf
#define TYPE       float
#define FE_OPTION  FE_TOWARDZERO
#include "s_nearestint_387_template.c"
libm_alias_float (__trunc, trunc)


		break;
					case personPayments:
					case personScores:
					case tripBeelineDistances:
					case tripBeelineDistancesCumulative:
					case tripBeelineDistancesOtherBins:
						break;
					default:
						throw new RuntimeException("`item' for statistics type not defined; statistics type: " + statType ) ;
				}
				if ( item != null ) {
					addItemToAllRegisteredTypes(legTypes, statType, item);
				}
			}

		}
	}

	private double calcBeelineDistance(final Activity fromAct, final Activity toAct ) {
		final Coord fromCoord = PopulationUtils.decideOnCoordForActivity( fromAct, scenario );
		Gbl.assertNotNull( fromCoord ); ;
		final Coord toCoord = PopulationUtils.decideOnCoordForActivity( toAct, scenario );
		Gbl.assertNotNull( toCoord ); ;
		return CoordUtils.calcEuclideanDistance( fromCoord, toCoord ) ;
	}

	private String getSubpopName(Person person) {
		return "yy_" + getSubpopName( person, this.scenario.getConfig() ) ;
	}
	private String getSubpopName( Person person, Config config ) {
//		String subpop = (String) personAttributes.getAttribute( personId.toString(), subpopAttrName ) ;
		String subpop = PopulationUtils.getSubpopulation(person );
		return "subpop_" + subpop;
	}

	private void addItemToAllRegisteredTypes(List<String> legTypes, StatType statType, double item) {
		// ... go through all legTypes to which the leg belongs ...
		for ( String legType : legTypes ) {

			// ... finally add the "item" to the correct bin in the container:
			int idx = this.statsContainer.get(statType).getIndex(item) ;
			this.statsContainer.get(statType).inc( legType, idx ) ;

			// also add it to the sums container:
			this.sumsContainer.get(statType).addValue( legType, item ) ;

		}
	}

	@Override
	public void reset(final int iteration) {
		delegate.reset(iteration);

		this.agentDepartures.clear();
		this.agentLegs.clear();

		for ( StatType type : StatType.values() ) {
			this.statsContainer.get(type).clear() ;
			if ( this.sumsContainer.get(type)==null ) {
				this.sumsContainer.put( type, new DataMap<String>() ) ;
			}
			this.sumsContainer.get(type).clear() ;
		}

		for ( Person person : this.scenario.getPopulation().getPersons().values() ) {

			attribs.putAttribute( person.getId().toString(), TRAV_TIME, 0. ) ;

			if ( attribs.getAttribute( person.getId().toString(), CERTAIN_LINKS_CNT ) != null ) {
				attribs.putAttribute( person.getId().toString(), CERTAIN_LINKS_CNT, 0. ) ;
			}
			// yy I must have written this myself, but I don't know why there is the null check first.  kai, may'19

			if ( attribs.getAttribute( person.getId().toString(), PAYMENTS) != null ) {
				attribs.putAttribute( person.getId().toString(), PAYMENTS, 0. ) ;
			}
			// yy I must have written this myself, but I don't know why there is the null check first.  kai, may'19
		}

		controlStatisticsSum = 0. ;
		controlStatisticsCnt = 0. ;

	}

	@Override
	public void handleEvent(PersonMoneyEvent event) {
		List<String> legTypes = new ArrayList<>() ;

		final Population pop = this.scenario.getPopulation();
		Person person = pop.getPersons().get( event.getPersonId() ) ;
		legTypes.add( this.getSubpopName(person)) ;

		double item = - event.getAmount() ;

		this.addItemToAllRegisteredTypes(legTypes, StatType.personPayments,