ी पुस्तक 1:1").osis()).toEqual("2Sam.1.1");
		expect(p.parse("2. SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1");
		expect(p.parse("2 SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1");
		expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1");
		expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1");
		expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1");
		expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1");
		expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1");
	});
});
describe("Localized book 1Sam (hi)", () => {
	let p: InstanceType<typeof bcv_parser>;
	beforeEach(() => {
		p = new bcv_parser();
		p.set_options({book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete"});
		p.include_apocrypha(true);
	});
	it("should handle book: 1Sam (hi)", () => {
		expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1. Shamooael 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1 Shamooael 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1");
	});
	it("should handle non-Latin digits in book: 1Sam (hi)", () => {
		p.set_options({non_latin_digits_strategy: "replace"});
		expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1. Shamooael 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1 Shamooael 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1");
		expect(p.parse("1 शमू 1:


temID.GoldCoin, 1)
		};

		private RootOfTheProblem()
        {
			_tasks.AddTask(new TalkNPCTask(ModContent.NPCType<NPCs.Town.Adventurer>(), "I thought I was a real goner there! If you didn't butt in, I probably would've been fed to whatever those monsters were trying to conjure up over there. I wouldn't touch it if I were you... Look, you have my thanks; but just between you and me, it's been a long few months, and all I want is a vacation from adventuring for a while. Life is short, and I'd rather not make it shorter. I'll see you around sometime. Could you get rid of that altar for me, too?", "Go to the Underground Briar and rescue the Adventurer"));
		}

		public override void OnQuestComplete()
		{
			bool showUnlocks = true;

			QuestManager.UnlockQuest<ReturnToYourRoots>(showUnlocks);
			QuestManager.UnlockQuest<IdleIdol>(showUnlocks);
			QuestManager.UnlockQuest<BareNecessities>(showUnlocks);
			QuestManager.UnlockQuest<SlayerQuestBriar>(showUnlocks);

			base.OnQuestComplete();
		}
    }
}


assertPrinted('build label:"bug fix"');
		assertPrinted('author:nat');
		assertPrinted('is:issue assignee:@me');
	});

	test('GH Samples 2', function () {
		// https://help.github.com/en/github/searching-for-information-on-github/searching-issues-and-pull-requests
		// USE [...document.querySelectorAll('a[href*="https://github.com/search?"]')].map(a => a.textContent).join('\n')
		assertPrinted('cat type:pr');
		assertPrinted('github commenter:defunkt type:issue');
		assertPrinted('warning in:title');
		assertPrinted('error in:title,body');
		assertPrinted('shipit in:comments');
		assertPrinted('user:defunkt ubuntu');
		assertPrinted('org:github');
		assertPrinted('repo:mozilla/shumway created:<2012-03-01');
		assertPrinted('performance is:open is:issue');
		assertPrinted('is:public');
		assertPrinted('is:private cupcake');
		assertPrinted('cool author:gjtorikian');
		assertPrinted('bootstrap in:body author:mdo');
		assertPrinted('author:app/robot');
		assertPrinted('resque mentions:defunkt');
		assertPrinted('involves:defunkt involves:jlord');
		assertPrinted('NOT bootstrap in:body involves:mdo');
		assertPrinted('repo:desktop/desktop is:open linked:pr');
		assertPrinted('repo:desktop/desktop is:closed linked:issue');
		assertPrinted('repo:desktop/desktop is:open -linked:pr');
		assertPrinted('repo:desktop/desktop is:open -linked:issue');
		assertPrinted('broken in:body -label:bug label:priority');
		assertPrinted('e1109ab');
		assertPrinted('0eff326d6213c is:merged');
		assertPrinted('language:ruby state:open');
		assertPrinted('state:closed comments:>100');
		assertPrinted('comments:500..1000');
		assertPrinted('interactions:>2000');
		assertPrinted('interactions:500..1000');
		assertPrinted('reactions:>1000');
		assertPrinted('reactions:500..1000');
		assertPrinted('draft:true');
		assertPrinted('draft:false');
		assertPrinted('type:pr team-review-requested:atom/design');
		assertPrinted('language:c# created:<2011-01-01 state:open');
		assertPrinted('weird in:body updated:>=2013-02-01');
		assertPrinted('language:swift closed:>2014-06-11');
		assertPrinted('language:javascript merged:<2011-01-01');
		assertPrinted('fast in:title language:ruby merged:>=2014-05-01');
		assertPrinted('archived:true GNOME');
		assertPrinted('archived:false GNOME');
		assertPrinted('code of conduct is:locked is:issue archived:false');
		assertPrinted('code of conduct is:unlocked is:issue archived:false');
		assertPrinted('priority no:label');
		assertPrinted('sprint no:milestone type:issue');
		assertPrinted('important no:assignee language:java type:issue');
	});

	test('Show Error/Warning when the query is invalid #24', function () {
		// https://github.com/microsoft/vscode-github-issue-notebooks/issues/24
		assertPrinted('fooBar -assignee:@me sort:created-asc');
		assertPrinted('fooBar sort asc by created -assignee:@me');
	});

	test('Queries using GH OR syntax don\'t execute correctly #122', function () {
		assertPrinted('repo:microsoft/v


local l10nTable = {
	deDE = {},
	enGB = {},
	enUS = {},
	esES = {},
	esMX = {},
	frFR = {},
	itIT = {},
	koKR = {
		localize = function()
			-- Adjust Macro Name Input Box's Texture Width
			MacroPopupFrame.BorderBox.IconSelectorEditBox.IconSelectorPopupNameMiddle:SetWidth(190);

			-- Adjust the spacing and size of the Macro Character Limit fontstring.
			MacroFrameCharLimitText:SetPoint("BOTTOM", MacroFrame, "BOTTOM", -15, 103);
		end,
	},
	ptBR = {},
	ptPT = {},
	ruRU = {},
	zhCN = {
		localize = function()
			-- Adjust Macro text
			MacroFrameCharLimitText:SetPoint("BOTTOM", "MacroFrame", "BOTTOM", -15, 30);
			MacroFrameCharLimitText:SetFontObject(SpellFont_Small);

			Mac


ition:opacity 1s ease;transition:opacity 1s ease}[class*=signUpProcess-step-] ol#creationList .fa.show,[class*=signUpProcess-step-] ol#creationList li .fa.show{opacity:1}[class*=signUpProcess-step-] iframe#pm_captcha{outline:none;border:none;width:100%;position:relative;left:-8px;height:120px;overflow:hidden;z-index:5}[class*=signUpProcess-step-] #captchaFrame{position:relative}[class*=signUpProcess-step-] #captchaFrame .loading{position:absolute;left:0;right:0;top:4rem;text-align:center;z-index:1;display:block}[class*=signUpProcess-step-] .spinner.large{height:14rem}[class*=signUpProcess-step-] .spinner.large .spinner1,[class*=signUpProcess-step-] .spinner.large .spinner2,[class*=signUpProcess-step-] .spinner.large .spinner3{background-color:#9397cd}[class*=signUpProcess-step-] .signup-radio-label{height:1.5rem}[class*=signUpProcess-step-] .signup-radio-label-text{color:#000;font-size:1rem}[class*=signUpProcess-step-] .creating-loader-container,[class*=signUpProcess-step-] .genNewKeys-loader-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}body.appConfigBody-is-mobile [class*=signUpProcess-step-],body.appConfigBody-is-mobile [class*=signUpProcess-step-] .pm_panel{margin:0}body.appConfigBody-is-mobile [class*=signUpProcess-step-] [data-step]:before{display:none}body.appConfigBody-is-mobile [class*=signUpProcess-step-] .wrapper{padding:0}body.appConfigBody-is-mobile [class*=signUpProcess-step-] .wrapper label{margin-top:3rem}body.appConfigBody-is-mobile .signUpProcess-btn-create{width:100%;height:4rem;line-height:4rem}html.protonmail body.light{background-color:#f4f4f4}html.protonmail body.blank{background-color:#fff}body#eo-message{overflow:initial;background:#4d4c5d}body#eo-message #pm_footer{position:static}body#eo-message #attachmentArea{margin:0}body#eo-message .message-head{padding-left:35px;padding-right:35px}body#eo-reply{overflow:initial;background:#4d4c5d}body#eo-reply #attachmentArea{margin:0}body#eo-reply .composer-outside-container{position:relative}body#eo-reply .composer-askEmbedding,body#eo-reply .composer-dropzone,body#eo-reply .squireToolbar-text-mode{display:none!important}body#eo-reply .composer-dropzone *{pointer-events:none}body#eo-reply .composer-draggable:not(.composer-draggable-editor) .composer-dropzone{position:absolute;top:0;right:0;left:0;bottom:0;background:#fff;z-index:10;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}body#eo-reply .composer-draggable:not(.composer-draggable-editor) .composer-dropzone *{display:block!


te = lane.getAlignment();
				System.out.print(alignmentAnte);
				System.out.print(lane.getToLinkIds());
				if (alignmentAnte == 0 && lane.getToLinkIds()!=null) {// || lane.getToLinkIds().isEmpty())) //sbraun26052020
					if (lane.getToLinkIds().isEmpty())
					alignmentAnte = -10;
				}
				if (reverseLink!=null) {
                    lane.addToLinkId(reverseLink.getLink().getId());
					writeOutLinkInfo(lane, reverseLink.getLink().getId(), "reverse");
                }
				if (alignmentAnte == 0)
					lane.setAlignment(1);
				else
					lane.setAlignment(2);

			}
			if (lane.getToLinkIds()==null || lane.getToLinkIds().isEmpty()) {
				LOG.warn("No toLink could be found for " + lane.getId());
				if (toLinks.get(0).getLink()!=null) {
					lane.addToLinkId(toLinks.get(0).getLink().getId());
				}
			}
			it++;
		}
	}

	/*
	 * This class gets a fromLink and a List of toLinks. It returns a sorted List of
	 * LinkVectors. The LinkVectors are sorted from very right to very left. This is
	 * useful to check against the turnlane-informations later. nschirrmacher on
	 * 170613
	 */

	private List<LinkVector> orderToLinks(Link link, List<Link> toLinks) {
		List<LinkVector> toLinkList = new ArrayList<LinkVector>();
		LinkVector fromLink;
		//sbraun20200225: added this so we are using old degrees for vectors
		if (linkToOrigToNodeCoord.containsKey(link.getId())|| linkToOrigFromNodeCoord.containsKey(link.getId())) {
			Coord oldToNode = link.getToNode().getCoord();
			Coord oldFromNode = link.getFromNode().getCoord();
			if (linkToOrigToNodeCoord.containsKey(link.getId())) {
				oldToNode = linkToOrigToNodeCoord.get(link.getId());
			}
			if (linkToOrigFromNodeCoord.containsKey(link.getId())) {
				oldFromNode = linkToOrigFromNodeCoord.get(link.getId());
			}
			fromLink = new LinkVector(link,oldFromNode,oldToNode);
		} else {
			fromLink = new LinkVector(link);
		}

		//sbraun20200225: added this so we are using old degrees for vectors
		for (Link value : toLinks) {
			LinkVector toLink;// = new LinkVector(toLinks.get(i));
			//sbraun20200225: added this so we are using old degrees for vectors
			if (linkToOrigToNodeCoord.containsKey(value.getId()) || linkToOrigFromNodeCoord.containsKey(value.getId())) {
				Coord oldToNode = value.getToNode().getCoord();
				Coord oldFromNode = value.getFromNode().getCoord();
				if (linkToOrigToNodeCoord.containsKey(value.getId())) {
					oldToNode = linkToOrigToNodeCoord.get(value.getId());
				}
				if (linkToOrigFromNodeCoord.containsKey(value.getId())) {
					oldFromNode = linkToOrigFromNodeCoord.get(value.getId());
				}

				toLink = new LinkVector(value, oldFromNode, oldToNode);
				toLink.calculateRotation(fromLink);
				toLinkList.add(toLink);

			} else {
				toLink = new LinkVector(value);
				toLink.calculateRotation(fromLink);

				toLinkList.add(toLink);

			}
		}
		Collections.sort(toLinkList);
		return toLinkList;
	}

	private void removeRestrictedLinks(Link fromLink, List<LinkVector> toLinks) {
		//07082020 sbraun I added a return if only one Link is in the toLinks structure
		// -> that way the network is still connected
		if (toLinks


# id 5 (CaravanP1_chk5), field 867200500
sm.createQuestWithQRValue(64006, "WC=2;speed=20;man=200;prog=0;Pt=Caravan_chk5;Ec=5;weather=2;max=16;food=450")
sm.createQuestWithQRValue(64006, "WC=2;speed=20;man=200;prog=0;Pt=CaravanP1_chk5;Ec=5;weather=2;max=16;food=450")
sm.createQuestWithQRValue(64006, "WC=2;k1=0;speed=20;man=200;prog=0;Pt=CaravanP1_chk5;Ec=5;weather=2;max=16;food=450")
sm.setSpeakerType(3)
sm.setParam(37)
sm.setColor(1)
sm.setInnerOverrideSpeakerTemplateID(9400587) # Kan
sm.sendNext("#face0#Good decision. ")
sm.sendSay("#face0#But remember that our food is limited, so not everyone can have his or her fill. ")
sm.setInnerOverrideSpeakerTemplateID(9400580) # Alika
sm.sendSay("#face0##h0#, are you distributing food? ")
sm.sendSay("#face0#If you would, please make sure the children and wounded get their portions first. They need all the help they can get. ")
sm.setInnerOverrideSpeakerTemplateID(9400587) # Kan
sm.sendSay("#face0#If you let your emotions decide for you, you may end up losing everyone's trust. ")
sm.sendSay("#face0#It is tradition in Kaptafel to allow our hunters to eat first, guaranteeing their strength to continue hunting. It's a tradition that has kept us alive through many harsh winters. ")
sm.setInnerOverrideSpeakerTemplateID(9400580) # Alika
sm.sendSay("#face0#Then, at least let the children eat first. They do not understand such things, and hunger hits them the hardest. ")
sm.setInnerOverrideSpeakerTemplateID(9400587) # Kan
sm.sendSay("#face0#...#h0#, the decision is yours. ")
sm.createQuestWithQRValue(64005, "FoodL=3")
sm.createQuestWithQRValue(64005, "FoodL=3;FoodM=2")
sm.createQuestWithQRValue(64005, "FoodL=3;FoodM=2;FoodS=0")
sm.createQuestWithQRValue(64005, "FoodL=3;FoodM=2;FoodS=0;FoodNone=1")
sm.createQuestWithQRValue(64007, "happy0=75;happy1=60;happy2=60;happy3=55;man0=56;man1=33;man2=38;man3=73")
sm.createQuestWithQRValue(64007, "happy0=75;happy1=70;happy2=60;happy3=55;man0=56;man1=33;man2=38;man3=73")
sm.createQuestWithQRValue(64007, "happy0=75;happy1=70;happy2=70;happy3=55;man0=56;man1=33;man2=38;man3=73")
sm.createQuestWithQRValue(64007, "happy0=75;happy1=70;happy2=70;happy3=65;man0=56;man1=33;man2=38;man3=73")
sm.sendNext("#face0#Good. We shall distribute the remaining food. ")
sm.sendSay("#face0#It seems that everyone is satisfied.")
sm.createQuestWithQRValue(64006, "WC=2;k1=0;speed=20;man=200;prog=0;Pt=CaravanP1_chk5;Ec=5;weather=2;max=16;food=250")
sm.createQuestWithQRValue(64007, "happy0=85;happy1=70;happy2=70;happy3=65;man0=56;man1=33;man2=38;man3=73")
sm.createQuestWithQRValue(64007, "happy0=85;happy1=70;happy2=90;happy3=65;man0=56;man1=33;man2=38;man3=73")
sm.createQuestWithQRValue(64007, "happy0=85;happy1=70;happy2=90;happy3=95;man0=56;man1=33;man2=38;man3=73")
sm.createQuestWithQRValue(64006, "WC=2;k1=0;speed=20;man=200;prog=0;Pt=CaravanP1_chk5;Ec=6;weather=2;max=16;food=250")


strongs_def":" born"},
"G2712":{"derivation":"from G2596 (κατείδωλος) (intensively) and G1497 (κατείδωλος);","lemma":"κατείδωλος","kjv_def":"wholly given to idolatry","strongs_def":" utterly idolatrous"},
"G449":{"derivation":"from G1 (ἄνιπτος) (as a negative particle) and a presumed derivative of G3538 (ἄνιπτος);","lemma":"ἄνιπτος","kjv_def":"unwashen","strongs_def":" without ablution"},
"G1689":{"derivation":"from G1722 (ἐμβλέπω) and G991 (ἐμβλέπω);","lemma":"ἐμβλέπω","kjv_def":"behold, gaze up, look upon, (could) see","strongs_def":" to look on, i.e. (relatively) to observe fixedly, or (absolutely) to discern clearly"},
"G749":{"derivation":"from G746 (ἀρχιερεύς) and G2409 (ἀρχιερεύς);","lemma":"ἀρχιερεύς","kjv_def":"chief (high) priest, chief of the priests","strongs_def":" the high-priest (literally, of the Jews, typically, Christ); by extension a chief priest"},
"G5272":{"derivation":"from G5271 (ὑπόκρισις);","lemma":"ὑπόκρισις","kjv_def":"condemnation, dissimulation, hypocrisy","strongs_def":" acting under a feigned part, i.e. (figuratively) deceit (\"hypocrisy\")"},
"G479":{"derivation":"from G473 (ἀντικαλέω) and G2564 (ἀντικαλέω);","lemma":"ἀντικαλέω","kjv_def":"bid again","strongs_def":" to invite in return"},
"G4223":{"derivation":"of Latin origin;","lemma":"Ποτίολοι","kjv_def":"Puteoli","strongs_def":" little wells, i.e. mineral springs; Potioli (i.e. Puteoli), a place in Italy"},
"G323":{"derivation":"from G322 (ἀνάδειξις);","lemma":"ἀνάδειξις","kjv_def":"shewing","strongs_def":" (the act of) exhibition"},
"G5599":{"derivation":"a primary interjection;","lemma":"ὦ","kjv_def":"O","strongs_def":" as a sign of the vocative case, O; as a note of exclamation, oh"},
"G30":{"derivation":"from (a pail, perhaps as bent;","lemma":"ἀγγεῖον","kjv_def":"vessel","strongs_def":" compare the base of G43 (ἀγγεῖον)); a receptacle"},
"G1647":{"derivation":"comparative of G1646 (ἐλαχιστότερος);","lemma":"ἐλαχιστότερος","kjv_def":"less than the least","strongs_def":" far less"},
"G4612":{"derivation":"of Latin origin;","lemma":"σιμικίνθιον","kjv_def":"apron","strongs_def":" a semicinctium or half-girding, i.e. narrow covering (apron)"},
"G4616":{"derivation":"of uncertain (perhaps foreign) origin;","lemma":"σινδών","kjv_def":"(fine) linen (cloth)","strongs_def":" byssos, i.e. bleached linen (the cloth or a garment of it)"},
"G5089":{"derivation":"perhaps akin to the alternate of G138 (τίλλω), and thus to G4951 (τίλλω);","lemma":"τίλλω","kjv_def":"pluck","strongs_def":" to pull off"},
"G5500":{"derivation":"from a comparative of G5495 (χειροτονέω) and (to stretch);","lemma":"χειροτονέω","kjv_def":"choose


events.updateEvent(
      new mongo.ObjectId(eventId),
      req.body as IRawEvent,
      req.AUTHENTICATED_USER_ID
    );
    return res.json({
      message: "Attempted to update event",
      payload
    });
  };

  private handleGetOneEvent = async (
    req: IAuthenticatedRequest,
    res: express.Response
  ) => {
    if (!isValidMongoID(req.body.eventId)) {
      return sendError(res, [`Invalid event ID: ${req.body.eventId}`]);
    }
    const payload = await this.events.getOneEvent(req.body.eventId);
    return res.json({
      message: "Attempted to get one event",
      payload
    });
  };

  private handleGetManyEvents = async (
    req: IAuthenticatedRequest,
    res: express.Response
  ) => {
    if (!isValidMongoIDArray(req.body.eventIds)) {
      return sendError(res, [`Invalid event IDs: ${req.body.eventIds}`]);
    }
    const payload = await this.events.getManyEvents(req.body.eventIds);
    return res.json({
      message: "Attempted to get many events",
      payload
    });
  };

  private handleDeleteEvent = async (
    req: IAuthenticatedRequest,
    res: express.Response
  ) => {
    if (!isValidMongoID(req.body.eventId)) {
      return sendError(res, [`Invalid event ID: ${req.body.eventId}`]);
    }
    const payload = await this.events.deleteOneEvent(
      req.body.eventId,
      req.AUTHENTICATED_USER_ID
    );
    return res.status(getStatus(payload)).json({
      message: "Attempted to delete one event",
      payload
    });
  };

  private handleReindex = async (
    req: IAuthenticatedRequest,
    res: express.Response
  ) => {
    if (req.body.password !== process.env.NODE_SECRET) {
      return sendError(res, ["Something went wrong."]);
    }
    const payload = await this.events.reindexAllEvents();
    return res.json({
      message: "Attempted full reindex of all events and users",
      payload
    });
  };
}

export const EventRouters = (db: mongo.Db): express.Router =>
  new PureEventsRouter(db).router;
// SMS and Pager only. Information about a conversation the message belongs to
export interface ConversationInfo {
  /**
   * Internal identifier of a conversation
   */
  id: string;
  /**
   * Deprecated. Link to a conversation resource
   */
  uri: string;
}
import 'typeface-anton';

function fontStack(fonts: string[]) {
    return fonts.map(font => (font.includes(' ') ? `"${font}"` : font)).join(', ')
}

const theme = {
  space: [ 0, 4, 8, 16, 32, 64],

  fonts: {
    body: fontStack([
      '-apple-system',
      'BlinkMacSystemFont',
      'Segoe UI',
      'Helvetica',
      'Arial',
      'sans-serif',
      'Apple Color Emoji',
      'Segoe UI Emoji'
    ]),
    heading: fontStack(['Anton', 'Arial', 'sans-serif']),
    monospace: 'Menlo, monospace',
  },
  fontSizes: [14, 18, 24, 36, 48, 72, 96],
  fontWeights: {
    body: 400,
    heading: 700,
    bold: 700,
  },
  borderWidths: [0, 1, 2, 4],

  colors: {
  },

  // Theming by seat number.
  seats: [
    // 0 => Red
    {
      paint: "#c62828",
      diceBg: "#c62828",
      diceFg: "#f0f0f0",
    },
    // 1 => Blue
    {
      paint: "#1565c0",
      diceBg: "#1565c0",


 false,}) {
    final map = <String, List<PersonCreateDto>>{};
    if (json is Map && json.isNotEmpty) {
      // ignore: parameter_assignments
      json = json.cast<String, dynamic>();
      for (final entry in json.entries) {
        map[entry.key] = PersonCreateDto.listFromJson(entry.value, growable: growable,);
      }
    }
    return map;
  }

  /// The list of required keys that must be present in a JSON.
  static const requiredKeys = <String>{
  };
}

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18

// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars

part of openapi.api;

class AssetOrder {
  /// Instantiate a new enum with the provided [value].
  const AssetOrder._(this.value);

  /// The underlying value of this enum member.
  final String value;

  @override
  String toString() => value;

  String toJson() => value;

  static const asc = AssetOrder._(r'asc');
  static const desc = AssetOrder._(r'desc');

  /// List of all possible values in this [enum][AssetOrder].
  static const values = <AssetOrder>[
    asc,
    desc,
  ];

  static AssetOrder? fromJson(dynamic value) => AssetOrderTypeTransformer().decode(value);

  static List<AssetOrder> listFromJson(dynamic json, {bool growable = false,}) {
    final result = <AssetOrder>[];
    if (json is List && json.isNotEmpty) {
      for (final row in json) {
        final value = AssetOrder.fromJson(row);
        if (value != null) {
          result.add(value);
        }
      }
    }
    return result.toList(growable: growable);
  }
}

/// Transformation class that can [encode] an instance of [AssetOrder] to String,
/// and [decode] dynamic data back to [AssetOrder].
class AssetOrderTypeTransformer {
  factory AssetOrderTypeTransformer() => _instance ??= const AssetOrderTypeTransformer._();

  const AssetOrderTypeTransformer._();

  String encode(AssetOrder data) => data.value;

  /// Decodes a [dynamic value][data] to a AssetOrder.
  ///
  /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
  /// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
  /// cannot be decoded successfully, then an [UnimplementedError] is thrown.
  ///
  /// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
  /// and users are still using an old app with the old code.
  AssetOrder? decode(dynamic data, {bool allowNull = true}) {
    if (data != null) {
      switch (data) {
        case r'asc': return AssetOrder.asc;
        case r'desc': return AssetOrder.desc;
        default:
          if (!allowNull) {
            throw ArgumentError('Unknown enum value to decode: $data');
          }
      }
    }
    return null;
  }

  /// Singleton [AssetOrderTypeTransformer] instance.
  static AssetOrderTypeTransformer? _instance;
}

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18

// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars

part of openapi.api;

class PeopleUpdateItem {
  /// Returns a new [PeopleUpdateItem] instance.
  PeopleUpdateItem({
    this.birthDate,
    this.color,
    this.featureF


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import datetime
import re
import scrape_common as sc
import scrape_so_common as soc

pdf_urls = soc.get_all_weekly_pdf_urls()
# start with the oldest PDF to have the most recent ones last
pdf_urls.reverse()
for pdf_url in pdf_urls:
    content = sc.pdfdownload(pdf_url, layout=True, silent=True, page=1)
    # remove ' separator to simplify pattern matching
    content = re.sub(r'(\d)\'(\d)', r'\1\2', content)

    date = sc.find(r'S\s?tand: (\d+\.\d+\.20\d{2})', content)
    date = sc.date_from_text(date)
    year1 = (date - datetime.timedelta(weeks=2)).year
    year2 = (date - datetime.timedelta(weeks=1)).year
    res = re.match(r'.*Woche (?P<w1>\d+)(\s+\(\d+\.\d+-\d+\.\d+\))?\s+Woche (?P<w2>\d+)\s+', content, re.DOTALL)
    assert res, 'Weeks could not be extracted'
    week1 = res['w1']
    week2 = res['w2']

    res = re.match(r'.*PCR-Tes\s?ts\s+(\d.*\n)?Total\s+\d+\s+\d+\s+(\d+)\s+\d+\.?\d?\s+(\d+)\s', content, re.DOTALL)
    if not res:
        res = re.match(r'.*Labortes\s?ts\s\(PCR\s-\sund\sS\s?chnelltes\s?ts\s?\)\s+(\d.*\n)?Total\s+\d+\s+\d+\.?\d?\s+(\d+)\s+\d+\.?\d?\s+(\d+)\s', content, re.DOTALL)
    if not res:
        res = re.match(r'.*Labortes\s?ts\s\(PCR\s-\sund\sS\s?chnelltes\s?ts\s?\)\s+(\d.*\n)?Total\s+\d+\s+(\d+)\s+\d+\.?\d?\s+(\d+)\s', content, re.DOTALL)
    if res:
        total_tests1 = res[2]
        total_tests2 = res[3]

    if not res:
        res = re.match(r'.*\s+PCR\s+(\d+\s+)?(\d+)\s+(\d+)\s', content, re.DOTALL)
        assert res, f'PCR tests for week {week1} or {week2} could not be extracted!'
        if res:
            total_tests1 = int(res[2])
            total_tests2 = int(res[3])

        res = re.match(r'.*\s+Antigen-Schnelltests\s+(\d+\s+)?(\d+)\s+(\d+)', content, re.DOTALL)
        assert res, f'Antigen tests for week {week1} or {week2} could not be extracted!'
        if res:
            total_tests1 += int(res[2])
            total_tests2 += int(res[3])

    assert res, f'PCR tests for week {week1} or {week2} could not be extracted!'

    res = re.match(r'.*Positivit.tsrate\s+\*+?\s+\d+\.?\d?%?\s+(\d+\.?\d?)%?\s+(\d+\.?\d?)%?', content, re.DOTALL)
    pos_rate1 = None
    pos_rate2 = None
    if res:
        pos_rate1 = res[1]
        pos_rate2 = res[2]
    else:
        res = re.match(r'.*Anteil\s+pos\s?itiv\s?er\s+Tes\s?ts\s+\(%\)\s+(\d+\w+)?\s+(\d+\.?\d?)%?\s+(\d+\.?\d?)%?', content, re.DOTALL)
        if res:
            pos_rate1 = res[2]
            pos_rate2 = res[3]

    data = sc.TestData(canton='SO', url=pdf_url)
    data.week = week1
    data.year = year1
    data.total_tests = total_tests1
    data.positivity_rate = pos_rate1
    print(data)

    data = sc.TestData(canton='SO', url=pdf_url)
    data.week = week2
    data.year = year2
    data.total_tests = total_tests2
    data.positivity_rate = pos_rate2
    print(data)


oot/settings"
)

// Grub represents a grub instance, it exposes methods to generate a new grub
// config compatible with ABRoot, and to check if the system is booted into
// the present root or the future root
type Grub struct {
	PresentRoot string
	FutureRoot  string
}

// generateABGrubConf generates a new grub config with the given details
func generateABGrubConf(kernelVersion string, rootPath string, rootUuid string, rootLabel string, generatedGrubConfigPath string) error {
	PrintVerboseInfo("generateABGrubConf", "generating grub config for ABRoot")

	kargs, err := KargsRead()
	if err != nil {
		PrintVerboseErr("generateABGrubConf", 0, err)
		return err
	}

	var grubPath, bootPrefix, systemRoot string
	if settings.Cnf.ThinProvisioning {
		grubPath = filepath.Join(rootPath, "boot", "init", rootLabel)
		bootPrefix = "/" + rootLabel

		diskM := NewDiskManager()
		sysRootPart, err := diskM.GetPartitionByLabel(rootLabel)
		if err != nil {
			PrintVerboseErr("generateABGrubConf", 3, err)
			return err
		}
		systemRoot = "/dev/mapper/" + sysRootPart.Device
	} else {
		grubPath = filepath.Join(rootPath, "boot", "grub")
		bootPrefix = "/.system/boot"
		systemRoot = "UUID=" + rootUuid
	}

	confPath := filepath.Join(grubPath, "abroot.cfg")
	template := `  search --no-floppy --fs-uuid --set=root %s
  linux   %s/vmlinuz-%s root=%s %s
  initrd  %s/initrd.img-%s
`

	err = os.MkdirAll(grubPath, 0755)
	if err != nil {
		PrintVerboseErr("generateABGrubConf", 2, err)
		return err
	}

	abrootBootConfig := fmt.Sprintf(template, rootUuid, bootPrefix, kernelVersion, systemRoot, kargs, bootPrefix, kernelVersion)

	generatedGrubConfigContents, err := os.ReadFile(filepath.Join(rootPath, generatedGrubConfigPath))
	if err != nil {
		PrintVerboseErr("generateABGrubConf", 3, "could not read grub config", err)
		return err
	}

	generatedGrubConfig := string(generatedGrubConfigContents)

	replacementString := "REPLACED_BY_ABROOT"
	if !strings.Contains(generatedGrubConfig, replacementString) {
		err := errors.New("could not find replacement string \"" + replacementString + "\", check /etc/grub.d configuration")
		PrintVerboseErr("generateABGrubConf", 3.1, err)
		return err
	}
	grubConfigWithBootEntry := strings.Replace(generatedGrubConfig, "REPLACED_BY_ABROOT", abrootBootConfig, 1)

	err = os.WriteFile(confPath, []byte(grubConfigWithBootEntry), 0644)
	if err != nil {
		PrintVerboseErr("generateABGrubConf", 4, "could not read grub config", err)
		return err
	}

	PrintVerboseInfo("generateABGrubConf", "done")
	return nil
}

// NewGrub creates a new Grub instance
func NewGrub(bootPart Partition) (*Grub, error) {
	PrintVerboseInfo("NewGrub", "running...")

	grubPath := filepath.Join(bootPart.MountPoint, "grub")
	confPath := filepath.Join(grubPath, "grub.cfg")

	cfg, err := os.ReadFile(confPath)
	if err != nil {
		PrintVerboseErr("NewGrub", 0, err)
		return nil, err
	}

	var presentRoot, futureRoot string

	for


#!/usr/bin/env python
# -*- coding: utf-8 -*-

import rospy, sys
import moveit_commander
import math
from std_msgs.msg import Int8
from geometry_msgs.msg import PoseStamped, Pose
from moveit_commander import MoveGroupCommander, PlanningSceneInterface
from moveit_msgs.msg import PlanningScene, ObjectColor
from moveit_msgs.msg import Grasp,PlaceLocation,GripperTranslation, MoveItErrorCodes
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from tf.transformations import quaternion_from_euler
from copy import deepcopy
GRIPPER_JOINT_NAMES = ['gripper_1_joint','gripper_2_joint']
GRIPPER_OPEN = [0.65,0.65]
GRIPPER_GRASP = [0.1,0.1]
BASE_LINK = 'base_link'
TABLE_ID = "table"
TARGET_ID = "target"

class MoveItPickPlaceDemo:
    def __init__(self):
        # 初始化Python API 依赖的moveit_commanderC++系统
        moveit_commander.roscpp_initialize(sys.argv)
        # 初始化节点
        rospy.init_node('moveit_pick_place_demo')
        rospy.loginfo("Pick and Place demo is ready. ")

        # 初始化场景对象
        self.scene = PlanningSceneInterface()
        rospy.sleep(1)
        # 在规划场景中添加物体
        self.add_collision_object()

        # 初始化规划组
        self.xarm_group = MoveGroupCommander("xarm")
        self.gripper_group = MoveGroupCommander("gripper")
        # 设置最大速度限制
        self.xarm_group.set_max_velocity_scaling_factor(0.8)
        self.gripper_group.set_max_velocity_scaling_factor(0.8)

        # 设置桌子table为抓取和放置操作的支撑面，使MoveIt!忽略物体放到桌子上时产生的碰撞警告
        self.xarm_group.set_support_surface_name(TABLE_ID)
        # 设置抓取列表
        grasps = self.make_grasps();
        # 设置result标记每次抓取尝试的结果
        max_pick_attempts = 5
        result = None
        n_attempts = 0
        rospy.loginfo("Try to pick up the box. ")
        # 循环尝试抓取操作直到抓取成功或最大尝试次数用尽
        while result != MoveItErrorCodes.SUCCESS and n_attempts < max_pick_attempts:
            n_attempts += 1
            rospy.loginfo("Pick attempt: " +  str(n_attempts))
            result = self.xarm_group.pick(TARGET_ID, grasps)
            rospy.sleep(0.2)

        # 设置一个放置目标位姿
        place_pose = PoseStamped()
        place_pose.header.frame_id = BASE_LINK
        place_pose.pose.position.x = 0.32
        place_pose.pose.position.y = -0.32
        place_pose.pose.position.z = 0.22 / 2.0
        q = quaternion_from_euler(0, 0, -math.pi/4)
        place_pose.pose.orientation.x = q[0]
        place_pose.pose.orientation.y = q[1]
        place_pose.pose.orientation.z = q[2]
        place_pose.pose.orientation.w = q[3]
        # 生成一系列放置位姿
        places = self.make_places(place_pose)
        # 如果抓取成功，尝试物品放置操作。
        if result == MoveItErrorCodes.SUCCESS:
            rospy.loginfo("Picked up successfully. Try to place the box. ")
            # 定义放置操作的最大尝试次数
            max_place_attempts = 5
            # 重置标记操作结果的result和尝试次数
            result = None
            n_attempts = 0

            # 循环放置直到放置成功或超过最大尝试次数
            while result != MoveItErrorCodes.SUCCESS and n_attempts < max_place_attempts:
                n_attempts += 1
                rospy.loginfo("Place attempt: " +  str(n_attempts))
                for place in places:
                    result = self.xarm_group.place(TARGET_ID, place)
                    if result == MoveItErrorCodes.SUCCESS:
                        break
                rospy.sleep(0.2)

        rospy.loginfo("Move to Home. ")
        # 回到初始位姿
        self.xarm_group.set_named_target('Home')
        self.xarm_group.go()
        # 闭合手爪
        self.gripper_group.set_named_target('Close_gripper')
        self.gripper_group.go()
        rospy.sleep(1)
        # 删除规划场景里物体
        rospy.loginfo("Remove objects. ")
        self.scene.remove_world_object(TABLE_ID)
        self.scene.remove_world_object(TARGET_ID)
        rospy.sleep(1)
        moveit_commander.roscpp_shutdown()
        moveit_commander.os._exit(0)

    #
    def add_collision_object(self):
        # 设置桌子的长宽高 [l, w, h]
        table_size = [1.0, 1.2, 0.01]
        # 设置桌子的位姿
        table_pose = PoseStamped()
        table_pose.header.frame_id = BASE_LINK
        table_pose.pose.position.x = 0.0
        table_pose.pose.position.y = 0.0
        table_pose.pose.position.z = - table_size[2] / 2.0
        table_pose.pose.orientation.w = 1.0
        # 把桌子添加到规划场景中
        self.scene.add_box(TABLE_ID, table_pose, table_size)

        # 设置目标物体的长宽高 [l, w, h]
        target_size = [0.05, 0.05, 0.22]
        # 设置目标的位姿，让目标物体位于桌子上
        target_pose = PoseStamped()
        target_pose.heade


('Modified Waypoints',"Deleted waypoint: " .. v.NAME)
			table.remove(pWayPoints, i)
		end
	end
	refreshwaypoints()
	updatesaves()
end)

addcmd('clearwaypoints',{'cwp','clearpositions','cpos','clearpos'},function(args, speaker)
	WayPoints = {}
	pWayPoints = {}
	refreshwaypoints()
	updatesaves()
	AllWaypoints = {}
	notify('Modified Waypoints','Removed all waypoints')
end)

addcmd('cleargamewaypoints',{'cgamewp'},function(args, speaker)
	for i,v in pairs(WayPoints) do
		if v.GAME == PlaceId then
			table.remove(WayPoints, i)
		end
	end
	if AllWaypoints ~= nil and #AllWaypoints > 0 then
		for i,v in pairs(AllWaypoints) do
			if v.GAME == PlaceId then
				table.remove(AllWaypoints, i)
			end
		end
	end
	for i,v in pairs(pWayPoints) do
		if v.GAME == PlaceId then
			table.remove(pWayPoints, i)
		end
	end
	refreshwaypoints()
	updatesaves()
	notify('Modified Waypoints','Deleted game waypoints')
end)

local coreGuiTypeNames = {
	-- predefined aliases
	["inventory"] = Enum.CoreGuiType.Backpack,
	["leaderboard"] = Enum.CoreGuiType.PlayerList,
	["emotes"] = Enum.CoreGuiType.EmotesMenu
}

-- Load the full list of enums
for _, enumItem in ipairs(Enum.CoreGuiType:GetEnumItems()) do
	coreGuiTypeNames[enumItem.Name:lower()] = enumItem
end

addcmd('enable',{},function(args, speaker)
	local input = args[1] and args[1]:lower()
	if input then
		if input == "reset" then
			StarterGui:SetCore("ResetButtonCallback", true)
		else
			local coreGuiType = coreGuiTypeNames[input]
			if coreGuiType then
				StarterGui:SetCoreGuiEnabled(coreGuiType, true)
			end
		end
	end
end)

addcmd('disable',{},function(args, speaker)
	local input = args[1] and args[1]:lower()
	if input then
		if input == "reset" then
			StarterGui:SetCore("ResetButtonCallback", false)
		else
			local coreGuiType = coreGuiTypeNames[input]
			if coreGuiType then
				StarterGui:SetCoreGuiEnabled(coreGuiType, false)
			end
		end
	end
end)

local invisGUIS = {}
addcmd('showguis',{},function(args, speaker)
	for i,v in pairs(speaker:FindFirstChildWhichIsA("PlayerGui"):GetDescendants()) do
		if (v:IsA("Frame") or v:IsA("ImageLabel") or v:IsA("ScrollingFrame")) and not v.Visible then
			v.Visible = true
			if not FindInTable(invisGUIS,v) then
				table.insert(invisGUIS,v)
			end
		end
	end
end)

addcmd('unshowguis',{},function(args, speaker)
	for i,v in pairs(invisGUIS) do
		v.Visible = false
	end
	invisGUIS = {}
end)

local hiddenGUIS = {}
addcmd('hideguis',{},function(args, speaker)
	for i,v in pairs(speaker:FindFirstChildWhichIsA("PlayerGui"):GetDescendants()) do
		if (v:IsA("Frame") or v:IsA("ImageLabel") or v:IsA("ScrollingFrame")) and v.Visible then
			v.Visible = false
			if not FindInTable(hiddenGUIS,v) then
				table.insert(hiddenGUIS,v)
			end
		end
	end
end)

addcmd('unhideguis',{},function(args, speaker)
	for i,v in pairs(hiddenGUIS) do
		v.Visible = true
	end
	hiddenGUIS = {}
end)

function deleteGuisAtPos()
	pcall(function()
		local guisAtPosition =


formations for stratum 'TestStratum' and for this stratums following line mapping
 *     is defined:
 *         "Java"          "TestStratum"
 *         <init>
 *         32      -->     1001
 *         32      -->     1002
 *         32      -->     1003
 *         32      -->     1004
 *     For this case locationsOfLine('TestStratum', null, 1001) should return single location for java line 32,
 *     and for lines 1002, 1003, 1004 should return empty list.
 *         33      -->     1005
 *         34      -->     1005
 *         35      -->     1005
 *         36      -->     1005
 *     For this case locationsOfLine('TestStratum', null, 1005) should return 4 locations for java lines 33 - 36,
 *         37      -->     1006
 *         38      -->     1007
 *         39      -->     1008
 *     For this case locationsOfLine for lines 1006-1007 should return single corresponding java line.
 *     Debugger forces debuggee to load 'TestClass1' from updated class file, obtains ReferenceType for this class
 *     and checks up that for method '<init>' method 'com.sun.jdi.Method.locationsOfLine(String stratum, String sourceName, int lineNumber)'
 *     returns correct values for 3 cases described above.
 *
 * @library /vmTestbase
 *          /test/lib
 * @build nsk.jdi.Method.locationsOfLine_ssi.locationsOfLine_ssi002.locationsOfLine_ssi002
 * @run driver
 *      nsk.jdi.Method.locationsOfLine_ssi.locationsOfLine_ssi002.locationsOfLine_ssi002
 *      -verbose
 *      -arch=${os.family}-${os.simpleArch}
 *      -waittime=5
 *      -debugee.vmkind=java
 *      -transport.address=dynamic
 *      -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
 *      -testClassPath ${test.class.path}
 *      -testWorkDir .
 */

package nsk.jdi.Method.locationsOfLine_ssi.locationsOfLine_ssi002;

import java.io.*;
import java.util.*;
import com.sun.jdi.*;
import nsk.share.Consts;
import nsk.share.TestBug;
import nsk.share.jdi.sde.*;

public class locationsOfLine_ssi002 extends SDEDebugger {
    public static void main(String argv[]) {
        int result = run(argv,System.out);
        if (result != 0) {
            throw new RuntimeException("TEST FAILED with result " + result);
        }
    }

    public static int run(String argv[], PrintStream out) {
        return new locationsOfLine_ssi002().runIt(argv, out);
    }

    protected void preparePatchedClassFile(String className) {
        String smapFileName = "TestSMAP.smap";
        SmapGenerator smapGenerator = new SmapGenerator();

        SmapStratum smapStratum = new SmapStratum(testStratumName);
        smapStratum.addFile(testStratumSourceName, testStratumSourcePath);

        // single output line is mapped to the multiple input lines
        // 1001 -> 32
        // 1002 -> 32
        // 1003 -> 32
        // 1004 -> 32
        smapStratum.addLineData(1001, testStratumSourceName, 1, INIT_LINE, 1);
        smapStratum.addLineData(1002, testStratumSourceName, 1, INIT_LINE, 1);
        smapStratum.addLineData(1003, testStratumSourceName, 1, INIT_LINE, 1);
        smapStratum.addLineData(1004, testStratumSourceName, 1, INIT_LINE, 1);

        // multiple output lines are mapped to the single input line
        // 1005 -> 33
        // 1005 -> 34
        // 1005 -> 35
        // 1005 -> 36
        smapStratum.addLineData(1005, testStratumSourceName, 1, INIT_LINE + 1, 1);
        smapStratum.addLineData(1005, testStratumSourceName, 1, INIT_LINE + 2, 1);
        smapStratum.addLineData(1005, testStratumSourceName, 1, INIT_LINE + 3, 1);
        smapStratum.addLineData(1005, testStratumSourceName, 1, INIT_LINE + 4, 1);

        //


      // case 'uri': case 'uri-reference': case 'uri-template':
      case 'url':
        return 'Tem que ser uma URL, por exemplo "http://www.exemplo.com.br/pagina.html"';
      case 'uuid':
        return 'Tem que ser um uuid, por exemplo "12345678-9ABC-DEF0-1234-56789ABCDEF0"';
      case 'color':
        return 'Tem que ser uma cor, por exemplo "#FFFFFF" ou "rgb(255, 255, 255)"';
      case 'json-pointer':
        return 'Tem que ser um JSON Pointer, por exemplo "/referencia/para/algo"';
      case 'relative-json-pointer':
        return 'Tem que ser um JSON Pointer relativo, por exemplo "2/referencia/para/algo"';
      case 'regex':
        return 'Tem que ser uma expressão regular, por exemplo "(1-)?\\d{3}-\\d{3}-\\d{4}"';
      default:
        return 'Tem que ser no formato: ' + error.requiredFormat;
    }
  },
  minimum: 'Tem que ser {{minimumValue}} ou mais',
  exclusiveMinimum: 'Tem que ser mais que {{exclusiveMinimumValue}}',
  maximum: 'Tem que ser {{maximumValue}} ou menos',
  exclusiveMaximum: 'Tem que ser menor que {{exclusiveMaximumValue}}',
  multipleOf: function (error) {
    if ((1 / error.multipleOfValue) % 10 === 0) {
      const decimals = Math.log10(1 / error.multipleOfValue);
      return `Tem que ter ${decimals} ou menos casas decimais.`;
    } else {
      return `Tem que ser um múltiplo de ${error.multipleOfValue}.`;
    }
  },
  minProperties: 'Deve ter {{minimumProperties}} ou mais itens (itens até o momento: {{currentProperties}})',
  maxProperties: 'Deve ter {{maximumProperties}} ou menos intens (itens até o momento: {{currentProperties}})',
  minItems: 'Deve ter {{minimumItems}} ou mais itens (itens até o momento: {{currentItems}})',
  maxItems: 'Deve ter {{maximumItems}} ou menos itens (itens até o momento: {{currentItems}})',
  uniqueItems: 'Todos os itens devem ser únicos',
  // Note: No default error messages for 'type', 'const', 'enum', or 'dependencies'
};
export type NormalizeCoords = (value: number, size?: number, shift?: number) => number;

export const normalizeCoords: NormalizeCoords = (value, size = 1, shift = 0.5) => (value + 0.5) * size + shift;
import { Collection } from "mongodb";
import { readOne } from "./collectionRead";

/**
 * 专业模型结构同步到通知模型结构函数
 * **注意**:这个函数要先于removeRedundancyOnNotcieModel函数执行
 * @param specialityModel 专业模型
 * @param noticeModel 通知模型
 */
export const noticelSyncSpeciality = (specialityModel: Object, noticeModel) => {

  const padding = name => {
    return {
      name,
      title: '',
      notice: '',
      lists: []
    }
  },
    notKeyInNotice = (name: string, noticeModel: Array<any>) => noticeModel.findIndex(value => value.name === name);

  const core = (specialityModel: Object | Array<any>, noticeModel: Array<any>) => {
    // 遇到了结果集合,这里的名称都是最后用户可以被选择的专业名字
    if (Array.isArray(specialityModel)) {
      for (const FinalSpecialityName of specialityModel) {
        // 只有当数组中不存在名称相同的时候才会插入这个内容
        if(notKe


          result2.as_slice(),
                T::from(1.0e-3).unwrap(),
            );
        }
    }
}

#[test]
fn fft_real_backward_f32() {
    fft_real_backward::<f32>();
}

#[test]
fn fft_real_backward_f64() {
    fft_real_backward::<f64>();
}

fn fft_roundtrip_real<T: Num>() {
    for size_ref in &[1, 2, 3, 4, 5, 6, 7, 8, 16, 32, 40, 49, 64, 128] {
        let size = *size_ref;

        let setup1: Setup<T> = Setup::new(&Options {
            input_data_order: DataOrder::Natural,
            output_data_order: DataOrder::Natural,
            input_data_format: DataFormat::Real,
            output_data_format: DataFormat::HalfComplex,
            len: size * 2,
            inverse: false,
        })
        .unwrap();
        let setup2: Setup<T> = Setup::new(&Options {
            input_data_order: DataOrder::Natural,
            output_data_order: DataOrder::Natural,
            input_data_format: DataFormat::HalfComplex,
            output_data_format: DataFormat::Real,
            len: size * 2,
            inverse: true,
        })
        .unwrap();

        let mut env1 = Env::new(&setup1);
        let mut env2 = Env::new(&setup2);

        let factor = T::one() / T::from(size).unwrap();

        let mut result = vec![T::zero(); size * 2];
        for pat in test_patterns::<T>(size * 2) {
            result.copy_from_slice(pat.as_slice());
            env1.transform(result.as_mut_slice());
            env2.transform(result.as_mut_slice());

            for e in &mut result {
                *e = *e * factor;
            }

            assert_num_slice_approx_eq(result.as_slice(), pat.as_slice(), T::from(1.0e-3).unwrap());
        }
    }
}

#[test]
fn fft_roundtrip_real_f32() {
    fft_roundtrip_real::<f32>();
}

#[test]
fn fft_roundtrip_real_f64() {
    fft_roundtrip_real::<f64>();
}
<gh_stars>0
#![windows_subsystem = "windows"]
use rodio::{source::Source, Decoder, OutputStream};
use std::io::Cursor;
use std::time::Duration;

fn main() {
    loop {
        let (_stream, stream_handle) = OutputStream::try_default().unwrap();
        let buf = Cursor::new(include_bytes!("../slient.wav"));
        let source = Decoder::new(buf).expect("音频解码错误");
        stream_handle
            .play_raw(source.convert_samples())
            .expect("播放失败");
        std::thread::sleep(Duration::from_secs(60 * 5));
    }
}
<gh_stars>0
use crate::{
    functor::{Functor, Morphism},
    layers::ILayer,
    models,
};

pub fn build_and_save(template_name: String, model_name: String) {
    let model: Box<dyn ILayer> = models::build_model_by_name(template_name);
    save(model, model_name);
}

pub fn get_functors(model_name: String) -> Vec<Functor> {
    let mut model = get_by_name(model_name);
    let functors = model.get_functors_mut_ref();

    let mut ret = vec![];
    for fun in functors {
        ret.push(fun.to_owned());
    }
    ret
}

pub fn get_functors_names(model_name: String) -> Vec<String> {
    let mut model = get_by_name(model_name);
    let fun


x.y.push(1);
}

const z = b.find(item => {
    return item === 'a';
});

const zz = b.findIndex(item => {
    return item === 'a';
});
import { Injectable, NotFoundException } from '@nestjs/common';
import { Sprint } from '../models/sprint.model';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';

@Injectable()
export class SprintService {
  private sprints: Sprint[] = [];

  constructor(@InjectModel('Sprint') private readonly sprintModel: Model<Sprint>) {}

  async addSprint(title: string) {
    const newSprint = new this.sprintModel({ title });
    const result = await newSprint.save();
    return result.id as string;
  }

  async getSprints() {
    const sprints = await this.sprintModel.find().exec(); // exec makes it a real promise
    return sprints.map(sprint => ({
      id: sprint.id,
      title: sprint.title,
      tasks: sprint.tasks,
      assignee: sprint.assignee,
    }));
  }

  async getSprint(sprintId: string) {
    const sprint = await this.findSprint(sprintId);
    return {
      id: sprint.id,
      title: sprint.title,
      tasks: sprint.tasks,
      assignee: sprint.assignee,
    };
  }

  async updateSprint(sprintId: string, sprintTitle: string) {
    const updatedSprint = await this.findSprint(sprintId);

    if (sprintTitle) {
      updatedSprint.title = sprintTitle;
    }
    updatedSprint.save();
  }

  async deleteSprint(sprintId: string) {
    const result = await this.sprintModel.deleteOne({ _id: sprintId }).exec(); // mongoDb stores the id in _id

    // deletedCount and n both hold the count of how many items where deleted
    if (result.n === 0) {
      throw new NotFoundException('Could not find Sprint by given id'); // Send 404 Status
    }
  }

  private async findSprint(id: string): Promise<Sprint> {
    let sprint;
    try {
      sprint = await this.sprintModel.findById(id).exec();
    } catch (error) {
      throw new NotFoundException('Could not find Sprint by given id'); // Send 404 Status
    }
    if (!sprint) {
      throw new NotFoundException('Could not find Sprint by given id'); // Send 404 Status
    }
    return sprint;
  }
}
import getRandomInteger from "./getRandomInteger";
import getRandomBoolean from "./getRandomBoolean";

export default function getRandomLatinSymbol(
  {
    capital = false,
    lowercase = false
  }: {
    capital?: boolean;
    lowercase?: boolean;
  } = {}
): string {

  const latinSymbols: string = "abcdefghijklmnopqrstuvwxyz";
  const randomLatinSymbol: string = latinSymbols[getRandomInteger({
    minimalValue: 0,
    maximalValue: latinSymbols.length - 1
  })];

  if (capital) {
    return randomLatinSymbol.toUpperCase();
  } else if (lowercase) {
    return randomLatinSymbol;
  }

  return getRandomBoolean() ? randomLatinSymbol : randomLatinSymbol.toUpperCase();
}
type Command = "join" | "leave" | "move";

const spaces = [
    "a1", "a2", "a3", "a4", "a5",  "a6", "a7", "a8",
    "b1", "b2", "b3", "b4", "b5",  "b6", "b7", "b8",
    "c1", "c2", "c3", "c4", "c5",  "c6", "c7", "c8",
    "d1", "d2", "d3", "d4", "d5",  "d6", "d7", "d8",
    "e1", "e2


CString::new("foreign table").unwrap().as_ptr(),
                        CString::new("bt").unwrap().as_ptr(),
                        es)
}

#[no_mangle]
pub unsafe extern "C" fn bt_fdw_begin_foreign_scan(node: *mut ForeignScanState, eflags: i32) {
    if (eflags & 0x0001) == 0x0001 {
        return
    }
    (*node).fdw_state = bt_fdw_state_new(node) as *mut c_void;
}

// Generics are hard in C :)
#[no_mangle]
pub extern "C" fn bt_fdw_state_from_fss(fss: *mut ForeignScanState) -> *mut BtFdwState {
    bt_fdw_state_new(fss)
}

#[no_mangle]
pub extern "C" fn bt_fdw_state_from_relinfo(rinfo: *mut ResultRelInfo) -> *mut BtFdwState {
    bt_fdw_state_new(rinfo)
}

#[no_mangle]
pub unsafe extern "C" fn get_limit(plan_info: *mut PlannerInfo) {
    let limit = (*plan_info).limit_tuples;
    LIMIT = {
        if limit == -1. {
            None
        } else {
            Some(limit as i64)
        }
    };
}

#[no_mangle]
pub unsafe extern "C" fn bt_fdw_exec_foreign_insert(estate: *mut EState,
                                                    rinfo: *mut ResultRelInfo,
                                                    slot: *mut TupleTableSlot,
                                                    plan_slot: *mut TupleTableSlot) -> *mut TupleTableSlot {
    let mut node = Node::from(rinfo);
    let mut isnull: bool_ = 0;
    let val = slot_getattr(slot, 1, &mut isnull);
    let data = text_to_cstring(val as *const varlena);
    let inserted = match _exec_foreign_insert((*rinfo).ri_FdwState as *mut BtFdwState, data) {
        Ok(ref x) => serde_json::to_string(x).unwrap_or(String::from("Failed to process return value.")),
        Err(e) => String::from("Failed to get insert count.")
    };
    println!("{}", inserted);
    node.slot = Some(slot);
    ExecClearTuple(node.slot.expect("Expected TupleTableSlot, got None."));
    node.assign_slot(inserted);
    node.slot.unwrap()
}

#[no_mangle]
pub extern "C" fn bt_fdw_iterate_foreign_scan(node: *mut ForeignScanState) -> *mut TupleTableSlot {
    unsafe {
        match _iterate_foreign_scan((*node).fdw_state as *mut BtFdwState, node) {
            Ok(x) => match x {
                Some(row) => Node::from(node).assign_slot(
                    match serde_json::to_string(&row) {
                        Ok(x) => x,
                        Err(e) => return_err(e)
                    }
                ),
                None => {}
            },
            Err(e) => Node::from(node).assign_slot(return_err(e))
        }
        (*node).ss.ss_ScanTupleSlot
    }
}

fn return_err<T: Error>(e: T) -> String {
    serde_json::to_string(&format!("{}: {:?}", e.description(), e.cause()))
        .unwrap_or(String::from("An unknown error has occured."))
}pub mod ambient;
pub mod cell_manager;
pub mod helper;
pub mod hist_memory;<reponame>castor-software/rethread<gh_stars>10-100

pub type Sample = f64;

use std::f64::consts::PI;
use nannou::rand::random;

use super::wavetable::{WavetableArena, WavetableIndex};
use super::buffer::Buffer;
use super::envelope::ExponentialDecay;

/// Trait for a mono sign


ec4\u7ec7\u653f\u5e9c\u53f8\u6cd5\u3001\u76d1\u5bdf\u3001\u516c\u5b89\u7b49\u90e8\u95e8\u53ca\u5987\u8054\u4f1a\uff0c\u6d3e\u51fa\u5e72\u90e8\uff0c\u6df1\u5165\u533a\u4e61\u8fdb\u884c\u68c0\u67e5\uff0c\u7136\u540e\u8d23\u6210\u6709\u5173\u5e72\u90e8\u53ca\u90e8\u95e8\u8fdb\u884c\u68c0\u8ba8\u548c\u4e88\u4ee5\u9002\u5f53\u5904\u7406\u3002", "type": "paragraph"}, {"text": "\u6765\u6e90\uff1a1953\u5e741\u67089\u65e5\u65b0\u534e\u901a\u8baf\u793e\u7f16\u300a\u5185\u90e8\u53c2\u8003\u300b\u3002", "type": "paragraph"}]}
  </script>

    [返回索引页面]

   关中、陕南地区非正常死人现象严重

   日期：1953-1-9 作者：李蕴辉

   李蕴辉

   【陕西分社讯】据宝鸡专区麟游、永寿、干县、陇县、凤翔等五县的不完全统计：去年元月至十月非正常死人共一百九十八名。南郑专区仅凤县一县去年元月至十月非正常死亡人数即达五十一名。渭南、咸阳也经常发生非正常死人事件。

   据各地研究，产生以上严重情况的原因，除个别为特务陷害及少数地主、反革命分子畏罪自杀外，大部分是由於某些干部，特别是区乡干部对群众生命重视不够和在工作中存在着较严重的不按政策办事，主观主义、官僚主义的作风所致。如：(一)婚姻法颁布已两年，但宝鸡专区上述五县非正常死人中有五十四人是因家庭不和、婚姻纠纷、公婆虐待而致死的；南郑专区凤县有十七人因上述原因致死。(二)据宝鸡地委了解：该专区上述五县中因山洪暴发，房屋倒塌致死者三十二人，如区乡干部事先给予应有注意和关心，即可免於死亡。(三)各地反映中都有因干部主观主义、强迫命令逼死人命的情形，在凤县为七人，在宝鸡专区五县中为十四人。

   为防止非正常死人现象继续发生，宝鸡地委已准备结合当前中心工作组织政府司法、监察、公安等部门及妇联会，派出干部，深入区乡进行检查，然后责成有关干部及部门进行检讨和予以适当处理。

   来源：1953年1月9日新华通讯社编《内部参考》。

    [返回索引页面]


		}).
		Block(
			j.List(j.Id("run"), j.Err()).Op(":=").Id("c").Dot(m.toCamel("%sAsync", workflow)).CallFunc(func(g *j.Group) {
				g.Id("ctx")
				if hasInput {
					g.Id("req")
				}
				g.Id("opts").Op("...")
			}),
			j.If(j.Err().Op("!=").Nil()).Block(
				j.ReturnFunc(func(g *j.Group) {
					if hasOutput {
						g.Nil()
					}
					g.Err()
				}),
			),
			j.Return(j.Id("run").Dot("Get").Call(j.Id("ctx"))),
		)
}

// genTestClientImplWorkflowMethodAsync generates a TestClient's <workflow>Async method
func (m *Manifest) genTestClientImplWorkflowMethodAsync(f *j.File, workflow protoreflect.FullName) {
	method := m.methods[workflow]
	hasInput := !isEmpty(method.Input)

	f.Commentf("%sAsync executes a(n) %s workflow in the test environment", m.methods[workflow].GoName, m.fqnForWorkflow(workflow))
	f.Func().
		Params(j.Id("c").Op("*").Id(m.toCamel("Test%sClient", m.Service.GoName))).
		Id(m.toCamel("%sAsync", workflow)).
		ParamsFunc(func(g *j.Group) {
			g.Id("ctx").Qual("context", "Context")
			if hasInput {
				g.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), m.getMessageName(method.Input))
			}
			g.Id("options").Op("...").Op("*").Id(m.toCamel("%sOptions", workflow))
		}).
		Params(
			j.Id(m.toCamel("%sRun", workflow)),
			j.Error(),
		).
		BlockFunc(func(g *j.Group) {
			// initialize options
			g.Var().Id("o").Op("*").Id(m.toCamel("%sOptions", workflow))
			g.If(j.Len(j.Id("options")).Op(">").Lit(0).Op("&&").Id("options").Index(j.Lit(0)).Op("!=").Nil()).Block(
				j.Id("o").Op("=").Id("options").Index(j.Lit(0)),
			).Else().Block(
				j.Id("o").Op("=").Id(m.toCamel("New%sOptions", workflow)).Call(),
			)

			// initialize client.StartWorkfowOptions
			g.List(j.Id("opts"), j.Err()).Op(":=").Id("o").Dot("Build").CallFunc(func(g *j.Group) {
				if hasInput {
					g.Id("req").Dot("ProtoReflect").Call()
				} else {
					g.Nil()
				}
			})
			g.If(j.Err().Op("!=").Nil()).Block(
				j.Return(j.Nil(), j.Qual("fmt", "Errorf").Call(j.Lit("error initializing client.StartWorkflowOptions: %w"), j.Err())),
			)

			g.Return(
				j.Op("&").Id(m.toLowerCamel("test%sRun", workflow)).ValuesFunc(func(g *j.Group) {
					g.Id("client").Op(":").Id("c")
					g.Id("env").Op(":").Id("c").Dot("env")
					g.Id("opts").Op(":").Op("&").Id("opts")
					if hasInput {
						g.Id("req").Op(":").Id("req")
					}
					g.Id("workflows").Op(":").Id("c").Dot("workflows")
				}),
				j.Nil(),
			)
		})
}

// genClientImplWorkflowTerminateMethod generates a Terminate<Workflow> client method
func (m *Manifest) genTestClientImplWorkflowTerminateMethod(f *j.File) {
	clientType := m.toCamel("Test%sClient"


/*
 * Copyright (c) 2011 Patrick McHardy <kaber@trash.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * Based on Rusty Russell's IPv6 MASQUERADE target. Development of IPv6
 * NAT funded by Astaro.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/ipv6.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv6.h>
#include <linux/netfilter/x_tables.h>
#include <net/netfilter/nf_nat.h>
#include <net/addrconf.h>
#include <net/ipv6.h>
#include <net/netfilter/ipv6/nf_nat_masquerade.h>

static unsigned int
masquerade_tg6(struct sk_buff *skb, const struct xt_action_param *par)
{
	return nf_nat_masquerade_ipv6(skb, par->targinfo, par->out);
}

static int masquerade_tg6_checkentry(const struct xt_tgchk_param *par)
{
	const struct nf_nat_range *range = par->targinfo;

	if (range->flags & NF_NAT_RANGE_MAP_IPS)
		return -EINVAL;
	return 0;
}

static struct xt_target masquerade_tg6_reg __read_mostly = {
	.name		= "MASQUERADE",
	.family		= NFPROTO_IPV6,
	.checkentry	= masquerade_tg6_checkentry,
	.target		= masquerade_tg6,
	.targetsize	= sizeof(struct nf_nat_range),
	.table		= "nat",
	.hooks		= 1 << NF_INET_POST_ROUTING,
	.me		= THIS_MODULE,
};

static int __init masquerade_tg6_init(void)
{
	int err;

	err = xt_register_target(&masquerade_tg6_reg);
	if (err == 0)
		nf_nat_masquerade_ipv6_register_notifier();

	return err;
}
static void __exit masquerade_tg6_exit(void)
{
	nf_nat_masquerade_ipv6_unregister_notifier();
	xt_unregister_target(&masquerade_tg6_reg);
}

module_init(masquerade_tg6_init);
module_exit(masquerade_tg6_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
MODULE_DESCRIPTION("Xtables: automatic address SNAT");


tle } }
      end
    elseif layout_config.prompt_position == "bottom" then
      results.line = max_lines - results.height - (1 + bs) + 1
      preview.line = results.line
      prompt.line = max_lines - bs
      if type(prompt.title) == "string" then
        prompt.title = { { pos = "S", text = prompt.title } }
      end
      if results.border == true then
        results.border = { 1, 1, 0, 1 }
      end
    else
      error(string.format("Unknown prompt_position: %s\n%s", self.window.prompt_position, vim.inspect(layout_config)))
    end

    -- Col
    prompt.col = 0 -- centered
    if layout_config.mirror and preview.width > 0 then
      results.col = preview.width + (3 * bs) + 1
      preview.col = bs + 1
    else
      results.col = bs + 1
      preview.col = results.width + (3 * bs) + 1
    end

    if tbln then
      prompt.line = prompt.line + 1
      results.line = results.line + 1
      preview.line = preview.line + 1
    end

    return {
      preview = self.previewer and preview.width > 0 and preview,
      prompt = prompt,
      results = results,
    }
  end
)

layout_strategies._validate_layout_config = validate_layout_config

return layout_strategies


eros<'_, O, T>
where
	O: BitOrder,
	T: BitStore,
{
	fn len(&self) -> usize {
		self.inner.count_zeros()
	}
}

impl<O, T> FusedIterator for IterZeros<'_, O, T>
where
	O: BitOrder,
	T: BitStore,
{
}

/* This macro has some very obnoxious call syntax that is necessary to handle
the different iteration protocols used above.

The `Split` iterators are not `DoubleEndedIterator` or `ExactSizeIterator`, and
must be excluded from those implementations. However, bounding on `DEI` causes
`.next_back()` and `.nth_back()` to return opaque associated types, rather than
the return type from the directly-resolved signatures. As such, the item type of
the source iterator must also be provided so that methods on it can be named.
*/
macro_rules! noalias {
	( $(
		$from:ident $( ( $p:ident ) )?
		=> $alias:ty
		=> $to:ident
		=> $item:ty
		=> $map:path
		;
	)+ ) => { $(
		/// An iterator variant that does not apply a [`T::Alias`] marker to its
		/// yielded items.
		///
		/// This iterator can be safely used in `for … in` loop headers, but
		/// cannot be used anywhere that its surrounding code may pull multiple
		/// yielded items into the same scope. This includes any iterator
		/// adapters that pull multiple yielded items into the same collection!
		/// Each yielded item **must** not have any sibling items in its scope.
		///
		/// This iterator does not yield [`T::Mem`] raw-typed references, as it
		/// may be produced from an already-aliased iterator and must retain its
		/// initial aliasing properties. It merely asserts that it will not be
		/// used in contexts that produce multiple yielded items in the same
		/// scope.
		///
		/// [`T::Alias`]: crate::store::BitStore::Alias
		/// [`T::Mem`]: crate::store::BitStore::Mem
		pub struct $to <'a, O, T $( , $p )? >
		where
			O: BitOrder,
			T: BitStore,
			$( $p : FnMut(usize, &bool) -> bool, )?
		{
			/// The actual iterator that this modifies.
			inner: $from <'a, O, T $( , $p )? >,
		}

		impl<'a, O, T $( , $p )? > $from <'a, O, T $( , $p )? >
		where
			O: BitOrder,
			T: BitStore,
			$( $p : FnMut(usize, &bool) -> bool, )?
		{
			/// Adapts the iterator to no longer mark its yielded items as
			/// aliased.
			///
			/// # Safety
			///
			/// This adapter can only be used in contexts where only one yielded
			/// item will be alive at any time. This is most commonly true in
			/// `for … in` loops, so long as no subsequent adapter collects
			/// multiple yielded items into a collection where they are live
			/// simultaneously.
			///
			/// The items yielded by this iterator will not have an additional
			/// alias marker applied to them, so their use in an iteration
			/// sequence will not be penalized when the surrounding code
			/// guarantees that each item yielded by the iterator i


	}
	var test5Id []byte
	test5Id, err = api.SendAsync(api.Prefix()+"a/b/cc/d", []byte{}, []byte("test5"))
	if err != nil {
		panic(err)
	}
	var test6Id []byte
	test6Id, err = api.SendAsync(api.Prefix()+"a/z/c/d", []byte{}, []byte("test6"))
	if err != nil {
		panic(err)
	}
	var test7Id []byte
	test7Id, err = api.SendAsync(api.Prefix()+"a/bb/c/d", []byte{}, []byte("test7"))
	if err != nil {
		panic(err)
	}
	var test8Id []byte
	test8Id, err = api.SendAsync(api.Prefix()+"z/b/c/d", []byte{}, []byte("test8"))
	if err != nil {
		panic(err)
	}
	var test9Id []byte
	test9Id, err = api.SendAsync(api.Prefix()+"aa/b/c/d", []byte{}, []byte("test9"))
	if err != nil {
		panic(err)
	}
	var test10Id []byte
	test10Id, err = api.SendAsync(api.Prefix()+"a/b/czd", []byte{}, []byte("test10"))
	if err != nil {
		panic(err)
	}
	var test11Id []byte
	test11Id, err = api.SendAsync(api.Prefix()+"a/bzc/d", []byte{}, []byte("test11"))
	if err != nil {
		panic(err)
	}
	var test12Id []byte
	test12Id, err = api.SendAsync(api.Prefix()+"azb/c/d", []byte{}, []byte("test12"))
	if err != nil {
		panic(err)
	}
	var test13Id []byte
	test13Id, err = api.SendAsync(api.Prefix()+"a/bzczd", []byte{}, []byte("test13"))
	if err != nil {
		panic(err)
	}
	var test14Id []byte
	test14Id, err = api.SendAsync(api.Prefix()+"azbzc/d", []byte{}, []byte("test14"))
	if err != nil {
		panic(err)
	}
	var test15Id []byte
	test15Id, err = api.SendAsync(api.Prefix()+"azbzczd", []byte{}, []byte("test15"))
	if err != nil {
		panic(err)
	}
	// n.b., depends on cloudi_core_i_constants.hrl having
	// RECV_ASYNC_STRATEGY == recv_async_select_oldest
	_, _, _, err = api.RecvAsync(test1Id, false)
	if err != nil {
		panic(err)
	}
	var test1Check []byte
	var test1IdCheck []byte
	_, test1Check, test1IdCheck, err = api.RecvAsync()
	if err != nil {
		panic(err)
	}
	assert(test1Check, []byte("test1"))
	assert(test1Id, test1IdCheck)
	_, _, _, err = api.RecvAsync(test2Id, false)
	if err != nil {
		panic(err)
	}
	var test2Check []byte
	var test2IdCheck []byte
	_, test2Check, test2IdCheck, err = api.RecvAsync()
	if err != nil {
		panic(err)
	}
	assert(test2Check, []byte("test2"))
	assert(test2Id, test2IdCheck)
	_, _, _, err = api.RecvAsync(test3Id, false)
	if err != nil {
		panic(err)
	}
	var test3Check []byte
	var test3IdCheck []byte
	_, test3Check, test3IdCheck, err = api.RecvAsync()
	if err != nil {
		panic(err)
	}
	assert(test3Check, []byte("test


',
      maxItems,
      1,
      1152921504606846976,
    );
    final $query = <String, List<String>>{
      if (creationToken != null) 'CreationToken': [creationToken],
      if (fileSystemId != null) 'FileSystemId': [fileSystemId],
      if (marker != null) 'Marker': [marker],
      if (maxItems != null) 'MaxItems': [maxItems.toString()],
    };
    final response = await _protocol.send(
      payload: null,
      method: 'GET',
      requestUri: '/2015-02-01/file-systems',
      queryParams: $query,
      exceptionFnMap: _exceptionFns,
    );
    return DescribeFileSystemsResponse.fromJson(response);
  }

  /// Returns the current LifecycleConfiguration object for the
  /// specified Amazon EFS file system. Lifecycle management uses the
  /// LifecycleConfiguration object to identify when to move files
  /// between storage classes. For a file system without a
  /// LifecycleConfiguration object, the call returns an empty
  /// array in the response.
  ///
  /// This operation requires permissions for the
  /// elasticfilesystem:DescribeLifecycleConfiguration operation.
  ///
  /// May throw [InternalServerError].
  /// May throw [BadRequest].
  /// May throw [FileSystemNotFound].
  ///
  /// Parameter [fileSystemId] :
  /// The ID of the file system whose LifecycleConfiguration object
  /// you want to retrieve (String).
  Future<LifecycleConfigurationDescription> describeLifecycleConfiguration({
    required String fileSystemId,
  }) async {
    final response = await _protocol.send(
      payload: null,
      method: 'GET',
      requestUri:
          '/2015-02-01/file-systems/${Uri.encodeComponent(fileSystemId)}/lifecycle-configuration',
      exceptionFnMap: _exceptionFns,
    );
    return LifecycleConfigurationDescription.fromJson(response);
  }

  /// Returns the security groups currently in effect for a mount target. This
  /// operation requires that the network interface of the mount target has been
  /// created and the lifecycle state of the mount target is not
  /// deleted.
  ///
  /// This operation requires permissions for the following actions:
  ///
  ///

  ///

  /// elasticfilesystem:DescribeMountTargetSecurityGroups action on
  /// the mount target's file system.
  ///

  ///

  /// ec2:DescribeNetworkInterfaceAttribute action on the mount
  /// target's network interface.
  ///

  ///

  ///
  /// May throw [BadRequest].
  /// May throw [InternalServerError].
  /// May throw [MountTargetNotFound].
  /// May throw [IncorrectMountTargetState].
  ///
  /// Parameter [mountTargetId] :
  /// The ID of the mount target whose security groups you want to retrieve.
  Future<DescribeMountTargetSecurityGroupsResponse>
      describeMountTargetSecurityGroups({
    required String mountTargetId,
  }) async {
    final response = await _protocol.send(
      payload: null,
      method: 'GET',
      requestUri:
          '/2015-02-01/mount-targets/${Uri.encodeComponent(mountTargetId)}/security-groups',
      exceptionFnMap: _exceptionFns,
    );
    return DescribeMountTargetSecurityGroupsResponse.fromJson(response);
  }

  /// Returns the descriptions of all the current mount targets, or a specific
  /// mount target, for a file system. When requesting all of the current mount
  /// targets, the order of mount targets returned in the response is
  /// unspecified.
  ///
  /// This operation requires permissions for the
  /// elasticfilesystem:DescribeMountTargets action, on either the
  /// file system ID that you specify in FileSystemId, or on


f_005fbuiltin_005f_005f_005fbnd_005fnull_005fptr_005fbounds-3616"></var>

This built-in function returns a new pointer with the value of <var>q</var>, and
associates it with NULL (allowing no memory access) bounds. With Pointer
Bounds Checker off, the built-in function just returns the first argument.

— Built-in Function: void __builtin___bnd_store_ptr_bounds (<var>const void **ptr_addr, const void *ptr_val</var>)<var></var>

This built-in function stores the bounds associated with pointer <var>ptr_val</var>
and location <var>ptr_addr</var> into Bounds Table.  This can be useful to propagate
bounds from legacy code without touching the associated pointer's memory when
pointers are copied as integers.  With Pointer Bounds Checker off, the built-in
function call is ignored.

— Built-in Function: void __builtin___bnd_chk_ptr_lbounds (<var>const void *q</var>)<var></var>

This built-in function checks if the pointer <var>q</var> is within the lower
bound of its associated bounds.  With Pointer Bounds Checker off, the built-in
function call is ignored.

          extern void *__wrap_memset (void *dst, int c, size_t len)
          {
            if (len > 0)
              {
                __builtin___bnd_chk_ptr_lbounds (dst);
                __builtin___bnd_chk_ptr_ubounds ((char *)dst + len - 1);
                __real_memset (dst, c, len);
              }
            return dst;
          }

— Built-in Function: void __builtin___bnd_chk_ptr_ubounds (<var>const void *q</var>)<var></var>

This built-in function checks if the pointer <var>q</var> is within the upper
bound of its associated bounds.  With Pointer Bounds Checker off, the built-in
function call is ignored.

— Built-in Function: void __builtin___bnd_chk_ptr_bounds (<var>const void *q, size_t size</var>)<var></var>

This built-in function checks if [<var>q</var>, <var>q</var> + <var>size</var> - 1] is within
the lower and upper bounds associated with <var>q</var>.  With Pointer Bounds Checker
off, the built-in function call is ignored.

          extern void *__wrap_memcpy (void *dst, const void *src, size_t n)
          {
            if (n > 0)
              {
                __bnd_chk_ptr_bounds (dst, n);
                __


-bitcoin-user) section, or if you already have it installed, only continue with the next steps
{% endhint %}

* Return to the `tmp` folder

```bash
cd ..
```

* **(Optional)** Clean the installation files to be ready for the next update

{% code overflow="wrap" %}
```bash
sudo rm -r bitcoin-$VERSION bitcoin-$VERSION.tar.gz SHA256SUMS SHA256SUMS.asc SHA256SUMS.ots
```
{% endcode %}

* If you have an existing Bitcoin Core installation without Ordisrespector applied, restart it using systemd and start a new instance with the Ordisrespector patch applied

```sh
sudo systemctl restart bitcoind
```

* Monitor the systemd journal and check the logging output. You can exit monitoring at any time with Ctrl+C and continue

```sh
journalctl -fu bitcoind
```

## Extras (optional)

### Add an external fee estimator to the LND

By applying Ordisrespector to our node, we can have a different version of the mempool compared to the rest of the network, and with it, the estimation of the fees. It is possible to point the fee estimator to another node without Ordisrespector applied

* With user admin, stop LND if you have installed

```bash
sudo systemctl stop lnd
```

* Edit `lnd.conf`

```bash
sudo nano /data/lnd/lnd.conf
```

* Add the next lines at the end of the file

[fee]
# Use external fee estimator
fee.url=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json

* Start LND again

```bash
sudo systemctl start lnd
```

### Reject other possible data included in transactions

Once you get to the [Configuration section](../../bitcoin/bitcoin/bitcoin-client.md#configuration) of the Bitcoin Client: Bitcoin Core

* With user `bitcoin`, create the `bitcoin.conf` file

```bash
nano /home/bitcoin/.bitcoin/bitcoin.conf
```

* Include with the rest, the next lines at the end of the file. Save and exit

```
# Reject data in transactions
datacarrier=0
permitbaremultisig=0
```

{% hint style="info" %}
[Continue](../../bitcoin/bitcoin/bitcoin-client.md#configuration) with the guide on `Set permissions:..`. step
{% endhint %}

{% hint style="warning" %}
Attention: with the previous configuration, Whirlpool will not work, and is not recommended for mining use
{% endhint %}

## Upgrade

The latest release can be found on the [GitHub page](https://github.com/bitcoin/bitcoin/releases) of the Bitcoin Core project. Always read the [RELEASE NOTES](https://github.com/bitcoin/bitcoin/tree/master/doc/release-notes) first! When upgrading, there might be breaking changes or changes in the data structure that need special attention

Go to the [Installation section](ordisrespector.md#installation), and replace the environment variable `"VERSION=x.xx"` value for the latest version if it has not already been changed in this guide. Continue until you complete the entire [Installation section](ordisrespector.md#installation)

{% hint style="info" %}
Remember to restart the Bitcoin Core to apply the new version with `sudo systemctl restart bitcoind`
{% endhint %}

## Uninstall

To uninstall Bitcoin Core with the Ordisrespector patch applied, follow the entire Bitcoin Core [uninstall section](../../bitcoin/bitcoin/bitcoin-client.md#uninstall)

## Port reference

Same as the [Bitcoin Core section](../../bitcoin/bitcoin/bitcoin-client.md#port-reference)
---
title: Desktop wallet
nav_order: 30
parent: Bitcoin
---

# 2.4 Desktop signing app: Sparrow Wallet

We install [Sparrow Wallet](https://github.com/sparrowwallet/sparrow) on a computer and connect it to your Electrum server on your node for private Bitcoin on-chain transactions.

<img src="../../.gitbook/assets/sparrow_wallet_lo


 Acquire a searcher (previously `index.searcher()`) is now written:
    let searcher = reader.searcher();

    // With the default setting of the reader, you are not required to
    // call `index.load_searchers()` anymore.
    //
    // The IndexReader will pick up that change automatically, regardless
    // of whether the update was done in a different process or not.
    // If this behavior is not wanted, you can create your reader with
    // the `ReloadPolicy::Manual`, and manually decide when to reload the index
    // by calling `reader.reload()?`.

    ```

Tantivy 0.8.2
=====================

Fixing build for x86_64 platforms. (#496)
No need to update from 0.8.1 if tantivy
is building on your platform.

Tantivy 0.8.1
=====================

Hotfix of #476.

Merge was reflecting deletes before commit was passed.
Thanks @barrotsteindev  for reporting the bug.

Tantivy 0.8.0
=====================

*No change in the index format*

- API Breaking change in the collector API. (@jwolfe, @fulmicoton)
- Multithreaded search (@jwolfe, @fulmicoton)

Tantivy 0.7.1
=====================

*No change in the index format*

- Bugfix: NGramTokenizer panics on non ascii chars
- Added a space usage API

Tantivy 0.7
=====================

- Skip data for doc ids and positions (@fulmicoton),
  greatly improving performance
- Tantivy error now rely on the failure crate (@drusellers)
- Added support for `AND`, `OR`, `NOT` syntax in addition to the `+`,`-` syntax
- Added a snippet generator with highlight (@vigneshsarma, @fulmicoton)
- Added a `TopFieldCollector` (@pentlander)

Tantivy 0.6.1
=========================

- Bugfix #324. GC removing was removing file that were still in useful
- Added support for parsing AllQuery and RangeQuery via QueryParser
  - AllQuery: `*`
  - RangeQuery:
    - Inclusive `field:[startIncl to endIncl]`
    - Exclusive `field:{startExcl to endExcl}`
    - Mixed `field:[startIncl to endExcl}` and vice versa
    - Unbounded `field:[start to *]`, `field:[* to end]`

Tantivy 0.6
==========================

Special thanks to @drusellers and @jason-wolfe for their contributions
to this release!

- Removed C code. Tantivy is now pure Rust. (@fulmicoton)
- BM25 (@fulmicoton)
- Approximate field norms encoded over 1 byte. (@fulmicoton)
- Compiles on stable rust (@fulmicoton)
- Add &[u8] fastfield for associating arbitrary bytes to each document (@jason-wolfe) (#270)
  - Completely uncompressed
  - Internally: One u64 fast field for indexes, one fast field for the bytes themselves.
- Add NGram token support (@drusellers)
- Add Stopword Filter support (@drusellers)
- Add a FuzzyTermQuery (@drusellers)
- Add a RegexQuery (@drusellers)
- Various performance improvements (@fulmicoton)_

Tantivy 0.5.2
===========================

- bugfix #274
- bugfix #280
- bugfix #289

Tantivy 0.5.1
==========================

- bugfix #254 : tantivy failed if no documents in a segment contained a specific field.

Tantivy 0.5
==========================

- Faceting
- RangeQuery
- Configurable tokenization pipeline
- Bugfix in PhraseQuery
- Various query optimisation
- Allowing very large indexes
  - 64 bits file address
  - Smarter encoding of the `TermInfo` objects

Tantivy 0.4.3
==========================

- Bugfix r


C1 = b.CFrame:inverse() * a.CFrame
	    weldd.Parent = a
	    return weldd
	end

--//=================================\\
--||	      RESIZE PLAYER
--\\=================================//

if Player_Size ~= 1 then
RootPart.Size = RootPart.Size * Player_Size
Torso.Size = Torso.Size * Player_Size
Head.Size = Head.Size * Player_Size
RightArm.Size = RightArm.Size * Player_Size
LeftArm.Size = LeftArm.Size * Player_Size
RightLeg.Size = RightLeg.Size * Player_Size
LeftLeg.Size = LeftLeg.Size * Player_Size
RootJoint.Parent = RootPart
Neck.Parent = Torso
RightShoulder.Parent = Torso
LeftShoulder.Parent = Torso
RightHip.Parent = Torso
LeftHip.Parent = Torso

RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
	RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
	Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0))
	Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180))
	RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0
	LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0
	if Disable_Moving_Arms == false then
		RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
		LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
	else
		RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
		LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
	end
	RightHip.C0 = CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
	LeftHip.C0 = CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
	RightHip.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
	LeftHip.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
end

--//=================================\\
--\\=================================//

--//=================================\\
--||	     WEAPON CREATION
--\\=================================//

local HandlePart = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Carnation pink", "Handle", VT(0, 0, 0


 new NodeInstance([],
                                    `process._debugEnd();
                                     process.exit(42);`);
  strictEqual(42, (await instance.expectShutdown()).exitCode);
}

async function testNoSessionNoCrash() {
  console.log('Test there\'s no crash stopping server without connecting');
  const instance = new NodeInstance('--inspect=0',
                                    'process._debugEnd();process.exit(42);');
  strictEqual(42, (await instance.expectShutdown()).exitCode);
}

async function testSessionNoCrash() {
  console.log('Test there\'s no crash stopping server after connecting');
  const script = `process._debugEnd();
                  process._debugProcess(process.pid);
                  setTimeout(() => {
                      console.log("Done");
                      process.exit(42);
                  });`;

  const instance = new NodeInstance('--inspect-brk=0', script);
  const session = await instance.connectInspectorSession();
  await session.send({ 'method': 'Runtime.runIfWaitingForDebugger' });
  await session.waitForServerDisconnect();
  strictEqual(42, (await instance.expectShutdown()).exitCode);
}

async function runTest() {
  await testNoServerNoCrash();
  await testNoSessionNoCrash();
  await testSessionNoCrash();
}

common.crashOnUnhandledRejection();

runTest();
// Copyright Joyent, Inc. and other Node 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.

'use strict';
require('../common');
const fixtures = require('../common/fixtures');
const assert = require('assert');
const execFile = require('child_process').execFile;
const depmod = fixtures.path('deprecated.js');
const node = process.execPath;

const depUserlandFunction =
  fixtures.path('deprecated-userland-function.js');

const depUserlandClass =
  fixtures.path('deprecated-userland-class.js');

const depUserlandSubClass =
  fixtures.path('deprecated-userland-subclass.js');

const normal = [depmod];
const noDep = ['--no-deprecation', depmod];
const traceDep = ['--trace-deprecation', depmod];

execFile(node, normal, function(er, stdout, stderr) {
  console.error('normal: show deprecation warning');
  assert.strictEqual(er, null);
  assert.strictEqual(stdout, '');
  assert(/util\.debug is deprecated/.test(stderr));
  console.log('normal ok');
});

execFile(node, noDep, function(er, stdout, stderr) {
  console.error('--no-deprecation: silence deprecations');
  assert.strictEqual(er, null);
  assert.strictEqual(stdout, '');
  assert.strictEqual(stderr, 'DEBUG: This is deprecated\n');
  console.log('silent ok');
});

execFile(node, traceDep,


nt	intr.h

INT_VEC_KEY_PRESS	Constant	intr.h

INT_VEC_LINE_1010	Constant	intr.h

INT_VEC_LINE_1111	Constant	intr.h

INT_VEC_LINK	Constant	intr.h

INT_VEC_MANUAL_RESET	Constant	intr.h

INT_VEC_OFF	Constant	intr.h

INT_VEC_ON_KEY_PRESS	Constant	intr.h

INT_VEC_PRIVILEGE_VIOLATION	Constant	intr.h

INT_VEC_RESET	Constant	intr.h

INT_VEC_SELF_TEST	Constant	intr.h

INT_VEC_SPURIOUS_INT	Constant	intr.h

INT_VEC_STACK_OVERFLOW	Constant	intr.h

INT_VEC_TRACE	Constant	intr.h

INT_VEC_TRAPV_INS	Constant	intr.h

INT_VEC_UNINITIALIZED_INT	Constant	intr.h

INT_VEC_ZERO_DIVIDE	Constant	intr.h

INT16_C	Function (Macro constructor)	stdint.h

INT16_MAX	<


 if (
      schedule.participationDivision === ParticipationDivisionType.Available &&
      schedule.attendanceDivision === AttendanceDivisionType.Absent
    ) {
      return PatternType.Absent;
    }

    return PatternType.None;
  };

  /**
   * Get plan view of schedule
   * @returns PatternPlan
   */
  static getPlanOfSchedule = (
    schedule: DataOfSchedule,
    modeInHour?: boolean
  ) => {
    const isView = ItemCalendar.isViewDetailSchedule(schedule)
      ? ViewPermission.Available
      : ViewPermission.Unavailable;
    let type = ItemCalendar.getPatternTypeSchedule(schedule);
    if (type === PatternType.None) {
      type = PatternType.NotConfirmed;
    }

    let plan: PatternPlan;
    if (modeInHour) {
      plan = _.cloneDeep(InHourSchedulePlan[isView][type]);
    } else if (schedule.isFullDay) {
      plan = _.cloneDeep(FullDaySchedulePlan[isView][type]);
    } else if (schedule.isOverDay) {
      plan = _.cloneDeep(OverDaySchedulePlan[isView][type]);
    } else {
      plan = _.cloneDeep(NormalSchedulePlan[isView][type]);
    }

    if (plan && schedule.isReportActivity) {
      plan.bgColor = ColorType.Grey;
    }

    return plan;
  };

  /**
   * Check view detail
   * @returns ViewPermission
   */
  static isViewDetailMilestone = (schedule: DataOfSchedule) => {
    return schedule.isParticipantUser || schedule.isPublic;
  };
}
import { StdIoReaderInterface } from "lib/std-io-reader"
import { getMessageForError } from "./env/error"

const bgCyan = (message: string): string => `\x1b[46m${message}\x1b[0m`
const fgRed = (message: string): string => `\x1b[31m${message}\x1b[0m`
const fgYellow = (message: string): string => `\x1b[33m${message}\x1b[0m`
const buildQuestion = (name: string, defaultValue: string): string => {
    const hasDefaultValue = defaultValue.trim().length > 0
    const defaultValueNote = hasDefaultValue ? ` (${fgYellow(defaultValue)})` : ''

    return `${bgCyan(name)}${defaultValueNote}: `
}

export interface EnvironmentVariable {
    name: string
    value: string
}

export interface CliPrompterInterface {
    promptUserAboutNewVariables: () => void
    promptUserForEnvironmentVariable: (environmentVariable: EnvironmentVariable) => Promise<EnvironmentVariable>
    printError: (error: Error) => void
    printWarning: (warning: string) => void
}

export class CliPrompter implements CliPrompterInterface {
    public constructor(
        private console: Console,
        private stdIoReader: StdIoReaderInterface
    ) {}

    public promptUserAboutNewVariables() {
        this.console.warn(fgYellow(
            'New environment variables were found. When prompted, please enter their values.'
        ))
    }

    public async promptUserForEnvironmentVariable({ name, value: defaultValue }: EnvironmentVariable): Promise<EnvironmentVariable> {
        const question: string = buildQuestion(name, defaultValue)
        // TODO maybe trim inputValue before returning it
        const inputValue: string = await this.stdIoReader.promptUser(question)
        const blankValueProvided = inputValue.trim().length === 0
        const value = blankValueProvided ? defaultValue : inputValue
        this.stdIoReader.pause()
        return { name, value }
    }

    public printError(error: Error) {
        const message = getMessageForError(error)
        this.console.error(fgRed(message))
    }

    public printWarning(warning: string) {
        this.console.error(fgYellow(warning))


Cbk = (lefrDoubleCbkFnType) func;
        lefCallbacks->VersionStrCbk = (lefrStringCbkFnType) func;
    }
    if (lefCallbacks->ViaCbk == 0)
        lefCallbacks->ViaCbk = (lefrViaCbkFnType) func;
    if (lefCallbacks->ViaRuleCbk == 0)
        lefCallbacks->ViaRuleCbk = (lefrViaRuleCbkFnType) func;
    if (lefCallbacks->InputAntennaCbk == 0)
        lefCallbacks->InputAntennaCbk = (lefrDoubleCbkFnType) func;
    if (lefCallbacks->OutputAntennaCbk == 0)
        lefCallbacks->OutputAntennaCbk = (lefrDoubleCbkFnType) func;
    if (lefCallbacks->InoutAntennaCbk == 0)
        lefCallbacks->InoutAntennaCbk = (lefrDoubleCbkFnType) func;

    // NEW CALLBACK - Add a line here for each new callback routine
    if (lefCallbacks->AntennaInputCbk == 0)
        lefCallbacks->AntennaInputCbk = (lefrDoubleCbkFnType) func;
    if (lefCallbacks->AntennaInoutCbk == 0)
        lefCallbacks->AntennaInoutCbk = (lefrDoubleCbkFnType) func;
    if (lefCallbacks->AntennaOutputCbk == 0)
        lefCallbacks->AntennaOutputCbk = (lefrDoubleCbkFnType) func;
    if (lefCallbacks->ManufacturingCbk == 0)
        lefCallbacks->ManufacturingCbk = (lefrDoubleCbkFnType) func;
    if (lefCallbacks->UseMinSpacingCbk == 0)
        lefCallbacks->UseMinSpacingCbk = (lefrUseMinSpacingCbkFnType) func;
    if (lefCallbacks->ClearanceMeasureCbk == 0)
        lefCallbacks->ClearanceMeasureCbk = (lefrStringCbkFnType) func;
    if (lefCallbacks->MacroClassTypeCbk == 0)
        lefCallbacks->MacroClassTypeCbk = (lefrStringCbkFnType) func;
    if (lefCallbacks->MacroOriginCbk == 0)
        lefCallbacks->MacroOriginCbk = (lefrMacroNumCbkFnType) func;
    if (lefCallbacks->MacroSiteCbk == 0)
        lefCallbacks->MacroSiteCbk = (lefrMacroSiteCbkFnType) func;
    if (lefCallbacks->MacroForeignCbk == 0)
        lefCallbacks->MacroForeignCbk = (lefrMacroForeignCbkFnType) func;
    if (lefCallbacks->MacroSizeCbk == 0)
        lefCallbacks->MacroSizeCbk = (lefrMacroNumCbkFnType) func;
    if (lefCallbacks->MacroFixedMaskCbk == 0)
        lefCallbacks->MacroFixedMaskCbk = (lefrIntegerCbkFnType) func;
    if (lefCallbacks->MacroEndCbk == 0)
        lefCallbacks->MacroEndCbk = (lefrStringCbkFnType) func;
    if (lefCallbacks->MaxStackViaCbk == 0)
        lefCallbacks->MaxStackViaCbk = (lefrMaxStackViaCbkFnType) func;
    if (lefCallbacks->ExtensionCbk == 0)
        lefCallbacks->ExtensionCbk = (lefrStringCbkFnType) func;
    if (lefCallbacks->DensityCbk == 0)
        lefCallbacks->DensityCbk = (lefrDensityCbkFnType) func;
    if (lefCallbacks->FixedMaskCbk == 0)
        lefCallbacks->FixedMaskCbk = (lefrIntegerCbkFnType) func;
}

// These count up the number of times an unset callback is called...
static int lefrUnusedCount[NOCBK];

int
lefrCountFunc(lefrCallbackType_e    e,
              void                  *v,
              lefiUserData          d)
{
    LEF_INIT;
    int i = (int) e;
    if (lefiDebug(23))
        printf("count %d 0x%p 0x%p\n", (int) e, v, d);
    if (i >= 0 && i < NOCBK) {


cxd-Form--column-6 > .cxd-Form-item:nth-last-child(-n+6){margin-bottom:0;}.amis-scope .cxd-Form--column-7 > .cxd-Form-item{width:14.2%;}.amis-scope .cxd-Form--column-7 > .cxd-Form-item:nth-last-child(-n+7){margin-bottom:0;}.amis-scope .cxd-Form--column-8 > .cxd-Form-item{width:12.5%;}.amis-scope .cxd-Form--column-8 > .cxd-Form-item:nth-last-child(-n+8){margin-bottom:0;}.amis-scope .cxd-Form-column-9 > .cxd-Form-item{width:11.1%;}.amis-scope .cxd-Form--column-9 > .cxd-Form-item:nth-last-child(-n+9){margin-bottom:0;}.amis-scope .cxd-Form-column-10 > .cxd-Form-item{width:10%;}.amis-scope .cxd-Form--column-10 > .cxd-Form-item:nth-last-child(-n+10){margin-bottom:0;}@media (max-width: 767px){.amis-scope .cxd-Combo-form::before{border-bottom:none;}.amis-scope .cxd-Form-item{display:flex;margin-bottom:0;padding:var(--Form-item-mobile-gap) 0;position:relative;}.amis-scope .cxd-Form-item::after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--borderColor);transform:scaleY(0.5);}.amis-scope .cxd-Form-item .cxd-InputGroup-addOn,.amis-scope .cxd-Form-item .cxd-TextControl-addOn{border:none;}.amis-scope .cxd-Form-item .cxd-Form-label{flex:0 0 28%;max-width:28%;min-height:1px;text-align:left;padding-right:calc(var(--Form--horizontal-gutterWidth) / 2);overflow-wrap:break-word;margin-right:0;margin-bottom:0;font-size:var(--fontSizeLg);}.amis-scope .cxd-Form-item .cxd-Form-label + .cxd-Form-item-controlBox{max-width:calc(100% - 28%);}.amis-scope .cxd-Form-item .cxd-Form-label > span{line-height:2rem;display:inline-block;}.amis-scope .cxd-Form-item .cxd-Form-description{font-size:var(--fontSizeBase);}.amis-scope .cxd-Form-item .cxd-TextControl-input{font-size:var(--fontSizeLg);}.amis-scope .cxd-Form-item .cxd-TextControl-input input{height:calc(var(--Form-input-lineHeight) * var(--fontSizeLg));}.amis-scope .cxd-Form-item .cxd-NumberControl .cxd-Number{min-width:0;min-height:0;flex:1;border:none;}.amis-scope .cxd-Form-item .cxd-NumberControl .cxd-Number .cxd-Number-handler-wrap{display:none;}.amis-scope .cxd-Form-item .cxd-NumberControl .cxd-Select{flex:none;border:none;}.amis-scope .cxd-Form-item .cxd-Number--enhance{float:right;border:none;}.amis-scope .cxd-Form-item .cxd-Number--enhance-left-icon,.amis-scope .cxd-Form-item .cxd-Number--enhance-right-icon{width:var(--inputNumber-enhance-mobile-icon-width);height:var(--inputNumber-enhance-mobile-icon-height);border:var(--Form-input-borderWidth) solid var(--borderColor);border-radius:var(--Form-input-borderRadius);user-select:


*>();
	usize_t size = a.size();
	launchcfg cfg = make_elemwise_launchcfg(size);
	launch_clamp(cfg.gdim,cfg.bdim,cfg.smem,cfg.stream,
	             size,a.dtype,
	             a.get<void*>(),
	             args->lo,args->hi);
}

// opcode_xxx
//    When the an instruction is registered, the machine returns an integer
//    identifier (type opcode_t) for the instruction, so store it here.
//
opcode_t oc_lerp  = -1;
opcode_t oc_clamp = -1;

#pragma warning(disable : 4190 4297)  // disable warning about C linkage of shape_t, and about throwing exceptions from C functions

extern "C" {

// py_lerp:
//    A C function that emits the 'lerp' instruction,
//    exported from the DLL, callable from Python via ctypes.
//
SM_DLLEXPORT smat* api_lerp(const smat* A, const smat* B, double alpha)
{
	SM_API_TRY
	smat* C = new smat(A->shape(),A->dtype());
	thread_ctx().emit(oc_lerp,A->as_arg(),   // emit instruction "lerp A,B,C,alpha" to the virtual machine
	                          B->as_arg(),
	                          C->as_arg(),
	                          carray(alpha));
	return C;
	SM_API_CATCH_AND_RETURN(0)
}

SM_DLLEXPORT smat* api_clamp(smat* A, const clamp_args_t* args)
{
	auto deleter = [](void* ptr) { delete (clamp_args_t*)ptr; };
	SM_API_TRY
	clamp_args_t* args_copy = new clamp_args_t(*args); // make a copy so that the calling code can do whatever it wants with its own args
	thread_ctx().emit(oc_clamp,A->as_arg(),            // emit instruction "clamp A,args" to the virtual machine
	                           user_arg(args_copy,deleter));
	return A;
	SM_API_CATCH_AND_RETURN(0)
}

// registration function:
//    After smat loads an extension DLL, the first thing it does is
//    look for an exported C function called "register_ext" and
//    calls it exactly once. The registration function notifies
//    smat of all instructions that this extension provides.
//
SM_DLLEXPORT void register_ext()
{
	// We can define completely new instructions.
	// This demo provides a "lerp" and a "clamp" instruction.
	oc_lerp  = add_instruction("lerp",
			iprop_elemwise|             // flag for the optimizer that says "lerp is elementwise"
			iprop_match_all,            // flag for the machine that says "all operands should have matching dtypes"
			aprop_in |aprop_float,      // first  argument is floating-point input  (a)
			aprop_in |aprop_float,      // second argument is floating-point input  (b)
			aprop_out|aprop_float,      // third  argument is floating-point output (c)
			aprop_in |aprop_float       // fourth argument is floating-point input  (alpha)
		);

	oc_clamp = add_instruction("clamp",
			iprop_elemwise,
			aprop_in | aprop_out | aprop_float,      // first  argument (a) is floating-point array, both input and output
			aprop_in | aprop_user                    // second argument (hi,lo) is user structure, a pointer to an example_args_t struct
		);

	// Once the new instructions are in the database, we can provide
	// implementations for any particular backend (CUDA,MKL etc).
	// The way this works is to associate a callback with the (backend_uuid,opcode) pair.
	add_instruction_impl(cuda_uuid,oc_lerp ,execute_lerp ,0);   // register callbacks for executing/validating the "lerp" instruction
	add_instruction_impl(cuda_uuid,oc_clamp,execute_clamp