import os
import random
from scipy.io import loadmat
from collections import defaultdict

from .oxford_pets import OxfordPets
from .utils import Datum, DatasetBase, read_json

template = ['a photo of a {}, a type of flower.']

class OxfordFlowers(DatasetBase):

    def __init__(self, root, num_shots):
        # self.dataset_dir = os.path.join(root, 'data')
        self.dataset_dir = root
        self.image_dir = os.path.join(self.dataset_dir, 'jpg')
        self.label_file = os.path.join(root, 'imagelabels.mat')
        self.lab2cname_file = os.path.join(root, 'cat_to_name.json')
        self.split_path = os.path.join(root, 'split_zhou_OxfordFlowers.json')

        self.template = template

        train, val, test = OxfordPets.read_split(self.split_path, self.image_dir)
        train = self.generate_fewshot_dataset(train, num_shots=num_shots)

        super().__init__(train_x=train, val=val, test=test)

    def read_data(self):
        tracker = defaultdict(list)
        label_file = loadmat(self.label_file)['labels'][0]
        for i, label in enumerate(label_file):
            imname = f'image_{str(i + 1).zfill(5)}.jpg'
            impath = os.path.join(self.image_dir, imname)
            label = int(label)
            tracker[label].append(impath)

        print('Splitting data into 50% train, 20% val, and 30% test')

        def _collate(ims, y, c):
            items = []
            for im in ims:
                item = Datum(
                    impath=im,
                    label=y-1, # convert to 0-based label
                    classname=c
                )
                items.append(item)
            return items

        lab2cname = read_json(self.lab2cname_file)
        train, val, test = [], [], []
        for label, impaths in tracker.items():
            random.shuffle(impaths)
            n_total = len(impaths)
            n_train = round(n_total * 0.5)
            n_val = round(n_total * 0.2)
            n_test = n_total - n_train - n_val
            assert n_train > 0 and n_val > 0 and n_test > 0
            cname = lab2cname[str(label)]
            train.extend(_collate(impaths[:n_train], label, cname))
            val.extend(_collate(impaths[n_train:n_train+n_val], label, cname))
            test.extend(_collate(impaths[n_train+n_val:], label, cname))

        return train, val, test


        };

            var clone = source.ShallowCopy();

            clone.Should().NotBeSameAs(source);
            clone.Should().BeEquivalentTo(source);

            clone.Nested.Should().BeSameAs(source.Nested);
        }

        private sealed class SomeObject
        {
            public int Number { get; set; }

            public SomeNestedObject? Nested { get; set; }
        }

        private sealed class SomeNestedObject
        {
            public string? Text { get; set; }

            public SomeNestedNestedObject? Nested { get; set; }
        }

        private sealed class SomeNestedNestedObject
        {
            public double Number { get; set; }
        }
    }
}


};
}

function PlaygroundOutput(el) {
	'use strict';

	return function(write) {
		if (write.Kind == 'start') {
			el.innerHTML = '';
			return;
		}

		var cl = 'system';
		if (write.Kind == 'stdout' || write.Kind == 'stderr')
			cl = write.Kind;

		var m = write.Body;
		if (write.Kind == 'end')
			m = '\nProgram exited' + (m?(': '+m):'.');

		if (m.indexOf('IMAGE:') === 0) {
			// TODO(adg): buffer all writes before creating image
			var url = 'data:image/png;base64,' + m.substr(6);
			var img = document.createElement('img');
			img.src = url;
			el.appendChild(img);
			return;
		}

		// ^L clears the screen.
		var s = m.split('\x0c');
		if (s.length > 1) {
			el.innerHTML = '';
			m = s.pop();
		}

		m = m.replace(/&/g, '&');
		m = m.replace(/</g, '<');
		m = m.replace(/>/g, '>');

		var needScroll = (el.scrollTop + el.offsetHeight) == el.scrollHeight;

		var span = document.createElement('span');
		span.className = cl;
		span.innerHTML = m;
		el.appendChild(span);

		if (needScroll)
			el.scrollTop = el.scrollHeight - el.offsetHeight;
	}
}

(function() {
  function lineHighlight(error) {
    var regex = /prog.go:([0-9]+)/g;
    var r = regex.exec(error);
    while (r) {
      $(".lines div").eq(r[1]-1).addClass("lineerror");
      r = regex.exec(error);
    }
  }
  function highlightOutput(wrappedOutput) {
    return function(write) {
      if (write.Body) lineHighlight(write.Body);
      wrappedOutput(write);
    }
  }
  function lineClear() {
    $(".lineerror").removeClass("lineerror");
  }

  // opts is an object with these keys
  //  codeEl - code editor element
  //  outputEl - program output element
  //  runEl - run button element
  //  fmtEl - fmt button element (optional)
  //  fmtImportEl - fmt "imports" checkbox element (optional)
  //  shareEl - share button element (optional)
  //  shareURLEl - share URL text input element (optional)
  //  shareRedirect - base URL to redirect to on share (optional)
  //  toysEl - toys select element (optional)
  //  enableHistory - enable using HTML5 history API (optional)
  //  transport - playground transport to use (default is HTTPTransport)
  function playground(opts) {
    var code = $(opts.codeEl);
    var transport = opts['transport'] || new HTTPTransport();
    var running;

    // autoindent helpers.
    function insertTabs(n) {
      // find the selection start and end
      var start = code[0].selectionStart;
      var end   = code[0].selectionEnd;
      // split the textarea content into two, and insert n tabs
      var v = code[0].value;
      var u = v.substr(0, start);
      for (var i=0; i<n; i++) {
        u += "\t";
      }
      u += v.substr(end);
      // set revised content
      code[0].value = u;
      // reset caret position after inserted tabs
      code[0].selectionStart = start+n;
      code[0].selectionEnd = start+n;
    }
    function autoindent(el) {
      var curpos = el.selectionStart;
      var tabs = 0;
      while (curpos > 0) {
        curpos--;
        if (el.value[curpos] == "\t") {
          tabs++;
        } else if (tabs > 0 || el.value[curpos] == "\n") {
          break;
        }
      }
      setTim


 to calculate weekNo
    var n = Math.floor((dt.getTime()-new Date(dt.getFullYear(),0,1)+3600000)/86400000);
    return Math.floor(n/7)+1;
}

Date.prototype.getYearForWeekNo = function()
{
    var dt = new Date(this.getTime());
    var d = dt.getDay();
    if (d==0) d=7;// JavaScript Sun=0, ISO Sun=7
    dt.setTime(dt.getTime()+(4-d)*86400000);// shift day to Thurs of same week
    return dt.getFullYear();
}

Date.prototype.getHours12 = function()
{
    var h = this.getHours();
    return h > 12 ? h-12 : ( h > 0 ? h : 12 );
}

Date.prototype.getAmPm = function()
{
    return this.getHours() >= 12 ? "pm" : "am";
}

Date.prototype.daySuffix = function()
{
    var num = this.getDate();
    if (num >= 11 && num <= 13) return "th";
    else if (num.toString().substr(-1)=="1") return "st";
    else if (num.toString().substr(-1)=="2") return "nd";
    else if (num.toString().substr(-1)=="3") return "rd";
    return "th";
}

// Convert a date to local YYYYMMDDHHMM string format
Date.prototype.convertToLocalYYYYMMDDHHMM = function()
{
    return(String.zeroPad(this.getFullYear(),4) + String.zeroPad(this.getMonth()+1,2) + String.zeroPad(this.getDate(),2) + String.zeroPad(this.getHours(),2) + String.zeroPad(this.getMinutes(),2));
}

// Convert a date to UTC YYYYMMDDHHMM string format
Date.prototype.convertToYYYYMMDDHHMM = function()
{
    return(String.zeroPad(this.getUTCFullYear(),4) + String.zeroPad(this.getUTCMonth()+1,2) + String.zeroPad(this.getUTCDate(),2) + String.zeroPad(this.getUTCHours(),2) + String.zeroPad(this.getUTCMinutes(),2));
}

// Convert a date to UTC YYYYMMDD.HHMMSSMMM string format
Date.prototype.convertToYYYYMMDDHHMMSSMMM = function()
{
    return(String.zeroPad(this.getUTCFullYear(),4) + String.zeroPad(this.getUTCMonth()+1,2) + String.zeroPad(this.getUTCDate(),2) + "." + String.zeroPad(this.getUTCHours(),2) + String.zeroPad(this.getUTCMinutes(),2) + String.zeroPad(this.getUTCSeconds(),2) + String.zeroPad(this.getUTCMilliseconds(),4));
}

// Static method to create a date from a UTC YYYYMMDDHHMM format string
Date.convertFromYYYYMMDDHHMM = function(d)
{
    var theDate = new Date(Date.UTC(parseInt(d.substr(0,4),10),
                            parseInt(d.substr(4,2),10)-1,
                            parseInt(d.substr(6,2),10),
                            parseInt(d.substr(8,2),10),
                            parseInt(d.substr(10,2),10),0,0));
    return(theDate);
}

// ---------------------------------------------------------------------------------
// Crypto functions and associated conversion routines
// ---------------------------------------------------------------------------------

// Crypto


#ifndef _VDMA_H_
#define _VDMA_H_
//ISA DMA virtualization
//https://wiki.osdev.org/ISA_DMA
#include <stdint.h>

#ifdef __cplusplus
extern "C"
{
#endif

//words
#define VDMA_REG_CH0_ADDR       0x00
#define VDMA_REG_CH0_COUNTER    0x01
#define VDMA_REG_CH1_ADDR       0x02
#define VDMA_REG_CH1_COUNTER    0x03
#define VDMA_REG_CH2_ADDR       0x04
#define VDMA_REG_CH2_COUNTER    0x05
#define VDMA_REG_CH3_ADDR       0x06
#define VDMA_REG_CH3_COUNTER    0x07
//bytes
#define VDMA_REG_STATUS_CMD     0x08 //status (R) / command (W)
#define VDMA_REG_REQUEST        0x09
#define VDMA_REG_SINGLEMASK     0x0A
#define VDMA_REG_MODE           0x0B
#define VDMA_REG_FLIPFLOP       0x0C
#define VDMA_REG_IMM_RESET      0x0D //immediate (R) / master reset (W)
#define VDMA_REG_MASK_RESET     0x0E
#define VDMA_REG_MULTIMASK      0x0F

#define VDMA_REG_CH0_PAGEADDR   0x87
#define VDMA_REG_CH1_PAGEADDR   0x83
#define VDMA_REG_CH2_PAGEADDR   0x81
#define VDMA_REG_CH3_PAGEADDR   0x82

//16bit
#define VDMA_REG_CH4_ADDR       0xC0
#define VDMA_REG_CH4_COUNTER    0xC2
#define VDMA_REG_CH7_ADDR       0xCC
#define VDMA_REG_CH7_COUNTER    0xCE
#define VDMA_REG_STATUS_CMD16   0xD0
#define VDMA_REG_MULTIMASK16    0xDE
#define VDMA_REG_CH4_PAGEADDR   0x8F
#define VDMA_REG_CH7_PAGEADDR   0x8A

void VDMA_Write(uint16_t port, uint8_t byte);
uint8_t VDMA_Read(uint16_t port);

void VDMA_Virtualize(int channel, int enable);
uint32_t VDMA_GetAddress(int channel);
uint32_t VDMA_GetCounter(int channel);
int32_t VDMA_GetIndex(int channel);
int32_t VDMA_SetIndexCounter(int channel, int32_t index, int32_t counter);
int VDMA_GetAuto(int channel); //auto init mode
int VDMA_GetWriteMode(int channel); //DMA write mode (device is writing to DMA)
void VDMA_ToggleComplete(int channel);

void VDMA_WriteData(int channel, uint8_t data);

#ifdef __cplusplus
}
#endif

#endif//_VDMA_H_


ffsets.reference,p.placement)),p=st(p.instance.modifiers,p,"flip"))}),p},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,r=i.popper,o=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[s?"left":"top"]=o[n]-(a?r[s?"width":"height"]:0),e.placement=it(t),e.offsets.popper=Ge(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!pt(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=ot(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,i=t.y,r=e.offsets.popper,o=ot(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:t.gpuAcceleration,a=Je(We(e.instance.popper)),l={position:r.position},c={left:Math.floor(r.left),top:Math.round(r.top),bottom:Math.round(r.bottom),right:Math.floor(r.right)},u="bottom"===n?"top":"bottom",f="right"===i?"left":"right",h=lt("transform"),d=void 0,p=void 0;if(p="bottom"===u?-a.height+c.bottom:c.top,d="right"===f?-a.width+c.right:c.left,s&&h)l[h]="translate3d("+d+"px, "+p+"px, 0)",l[u]=0,l[f]=0,l.willChange="transform";else{var m="bottom"===u?-1:1,g="right"===f?-1:1;l[u]=p*m,l[f]=d*g,l.willChange=u+", "+f}var _={"x-placement":e.placement};return e.attributes=ze({},_,e.attributes),e.styles=ze({},l,e.styles),e.arrowStyles=ze({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return dt(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&dt(e.arrowElement,e.arrowStyles),e},onLoad:


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

import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/elements/entities.dart';
import 'package:expect/expect.dart';
import '../helpers/compiler_helper.dart';
import 'package:compiler/src/util/memory_compiler.dart';

const String TEST_1 = r"""
  import 'dart:_foreign_helper';
  main() {
    JS('', '#.toString()', -5);
    // absent: "5.toString"
    // present: "(-5).toString"
  }
""";

main() {
  runTest() async {
    check(String test) async {
      // Pretend this is a web_2/native test to allow use of 'native' keyword
      // and import of private libraries.
      String main = 'sdk/tests/web_2/native/main.dart';
      Uri entryPoint = Uri.parse('memory:$main');
      var result = await runCompiler(
          entryPoint: entryPoint, memorySourceFiles: {main: test});
      Expect.isTrue(result.isSuccess);
      var compiler = result.compiler;
      var closedWorld = compiler.backendClosedWorldForTesting;
      var elementEnvironment = closedWorld.elementEnvironment;

      MemberEntity element = elementEnvironment.mainFunction;
      String generated =
          compiler.backendStrategy.getGeneratedCodeForTesting(element);
      checkerForAbsentPresent(test)(generated);
    }

    await check(TEST_1);
  }

  asyncTest(() async {
    print('--test from kernel------------------------------------------------');
    await runTest();
  });
}
// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:expect/expect.dart';
import 'package:compiler/src/native/behavior.dart';
import 'package:compiler/src/native/js.dart';
import 'package:compiler/src/js/js.dart' as js;

void test(String source, NativeThrowBehavior expectedThrowBehavior) {
  js.Template template = js.js.parseForeignJS(source);
  NativeThrowBehavior throwBehavior =
      ThrowBehaviorVisitor().analyze(template.ast);
  Expect.equals(expectedThrowBehavior, throwBehavior, 'source "$source"');
}

void main() {
  final MAY = NativeThrowBehavior.MAY;
  final NEVER = NativeThrowBehavior.NEVER;
  final NULL_NSM = NativeThrowBehavior.NULL_NSM;
  final NULL_NSM_THEN_MAY = NativeThrowBehavior.NULL_NSM_THEN_MAY;

  test('0', NEVER);
  test('void 0', NEVER);
  test('#', NEVER);
  test('void #', NEVER);
  test('# + 1', NEVER);
  test('!#', NEVER);
  test('!!#', NEVER);
  test('~#', NEVER);
  test('~~#', NEVER);
  test('-#', NEVER);
  test('+#', NEVER);
  test('-(-#)', NEVER);
  test('+#', NEVER);

  test('# * #', NEVER);
  test('# / #', NEVER);
  test('# % #', NEVER);
  test('# + #', NEVER);
  test('# - #', NEVER);

  test('# << #', NEVER);
  test('# >> #', NEVER);
  test('# >>> #', NEVER);

  test('# < #', NEVER);
  test('# > #', NEVER);
  test('# <= #', NEVER);
  test('# >= #', NEVER);

  test('# == #', NEVER);
  test('# != #', NEVER);
  test('# === #', NEVER);
  test('# !== #', NEVER);

  test('# & #', NEVER);
  test('# ^ #', NEVER);
  test('# | #', NEVER);

  test('# , #', NEVER);

  test('typeof(#) == "string"', NEVER);
  test('"object" === typeof #', NEVER);

  test('# == 1 || # == 2 || # == 3', NEVER);
  test('# != 1 && # != 2 && # != 3', NEVER);

  test('#.x', NULL_NSM);
  test('!!#.x', NULL_NSM


77";
  --fa--fa: "\e477\e477"; }

.fa-transporter {
  --fa: "\e042";
  --fa--fa: "\e042\e042"; }

.fa-calendar-circle-user {
  --fa: "\e471";
  --fa--fa: "\e471\e471"; }

.fa-arrow-up-long {
  --fa: "\f176";
  --fa--fa: "\f176\f176"; }

.fa-long-arrow-up {
  --fa: "\f176";
  --fa--fa: "\f176\f176"; }

.fa-person-carry-box {
  --fa: "\f4cf";
  --fa--fa: "\f4cf\f4cf"; }

.fa-person-carry {
  --fa: "\f4cf";
  --fa--fa: "\f4cf\f4cf"; }

.fa-fire-flame-simple {
  --fa: "\f46a";
  --fa--fa: "\f46a\f46a"; }

.fa-burn {
  --fa: "\f46a";
  --fa--fa: "\f46a\f46a"; }

.fa-person {
  --fa: "\f183";
  --fa--fa: "\f183\f183"; }

.fa-male {
  --fa: "\f183";
  --fa--fa: "\f183\f183"; }

.fa-laptop {
  --fa: "\f109";
  --fa--fa: "\f109\f109"; }

.fa-file-csv {
  --fa: "\f6dd";
  --fa--fa: "\f6dd\f6dd"; }

.fa-menorah {
  --fa: "\f676";
  --fa--fa: "\f676\f676"; }

.fa-union {
  --fa: "\f6a2";
  --fa--fa: "\f6a2\f6a2"; }

.fa-chevrons-left {
  --fa: "\f323";
  --fa--fa: "\f323\f323"; }

.fa-chevron-double-left {
  --fa: "\f323";
  --fa--fa: "\f323\f323"; }

.fa-circle-heart {
  --fa: "\f4c7";
  --fa--fa: "\f4c7\f4c7"; }

.fa-heart-circle {
  --fa: "\f4c7";
  --fa--fa: "\f4c7\f4c7"; }

.fa-truck-plane {
  --fa: "\e58f";
  --fa--fa: "\e58f\e58f"; }

.fa-record-vinyl {
  --fa: "\f8d9";
  --fa--fa: "\f8d9\f8d9"; }

.fa-bring-forward {
  --fa: "\f856";
  --fa--fa: "\f856\f856"; }

.fa-square-p {
  --fa: "\e279";
  --fa--fa: "\e279\e279"; }

.fa-face-grin-stars {
  --fa: "\f587";
  --fa--fa: "\f587\f587"; }

.fa-grin-stars {
  --fa: "\f587";
  --fa--fa: "\f587\f587"; }

.fa-sigma {
  --fa: "\f68b";
  --fa--fa: "\f68b\f68b"; }

.fa-camera-movie {
  --fa: "\f8a9";
  --fa--fa: "\f8a9\f8a9"; }

.fa-bong {
  --fa: "\f55c";
  --fa--fa: "\f55c\f55c"; }

.fa-clarinet {
  --fa: "\f8ad";
  --fa--fa: "\f8ad\f8ad"; }

.fa-


25, U+9b3c, U+9ce5, U+9cf3, U+9ea5, U+9eb5, U+9f4a, U+9f61, U+ff0d;
}
/* [t0/gf_113] (211) */
@font-face {
  font-family: 'Chiron Hei HK WS';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../woff2/vf/t0/gf_113.woff2') format('woff2-variations'), url('../woff2/vf/t0/gf_113.woff2') format('woff2 supports variations');
  unicode-range: U+300e, U+4e4e, U+4e82, U+4e92, U+4ec1, U+4ecd, U+4f48, U+4f53, U+4fb5, U+5012, U+502b, U+522a, U+52dd, U+52ff, U+532f, U+53eb, U+53f3, U+5409, U+5433, U+5496, U+54c8, U+554a, U+5561, U+5594, U+559d, U+56b4, U+56fa, U+5713, U+5750, U+57df, U+584a, U+58c7, U+58de, U+593e, U+5976, U+59d0, U+59d4, U+5a66, U+5b85, U+5b88, U+5ba3, U+5bae, U+5bbf, U+5bdf, U+5c01, U+5c04, U+5c3a, U+5c3e, U+5c4f, U+5ddd-5dde, U+5de8, U+5e63, U+5e7c, U+5e8a, U+5eda, U+5ef3, U+5ef6, U+5f48, U+6015, U+6025, U+602a, U+6050, U+6069, U+60e1, U+6162, U+6176, U+61c2, U+6200, U+6263, U+6279, U+6297, U+62b1, U+62bd, U+62ec, U+6311, U+6377, U+6388-6389, U+638c, U+63a2, U+63f4, U+641e, U+6436, U+64c1, U+6551, U+6557, U+6563, U+6696, U+66b4, U+66f2, U+6751, U+675f, U+676f, U+6790, U+6838, U+684c, U+68d2, U+6982, U+699c, U+69ae, U+69cb, U+6a39, U+6a4b, U+6b66, U+6bd2, U+6cb3, U+6ce1, U+6d3e, U+6de8, U+6ed1, U+6f22, U+6f54, U+6fc0, U+6fdf, U+719f, U+71c8, U+7236, U+7259, U+72d7, U+7389, U+73e0, U+745e, U+751a, U+7532-7533, U+7562, U+7591, U+75c5, U+75db, U+7686, U+76d2, U+76db, U+76df, U+76e3, U+7701, U+7761, U+786c, U+7981, U+79cb, U+79d2, U+79fb, U+7a81, U+7a97, U+7aef, U+7b26, U+7b80, U+7c64,


subtitle_duration = 3.209,
				subtitle_start = 106.34,
			},
			{
				currently_playing_subtitle = "loc_interrogator_a__adamant_cinematic_aa_01",
				speaker_name = "interrogator_a",
				subtitle_duration = 1.25,
				subtitle_start = 110.43,
			},
			{
				currently_playing_subtitle = "loc_sergeant_a__adamant_cinematic_ac_01",
				speaker_name = "sergeant_a",
				subtitle_duration = 2.73,
				subtitle_start = 126.99,
			},
		},
		pre_video_action = {
			action_type = "set_narrative_stat",
			event_name = "onboarding_step_chapel_video_viewed",
		},
	},
}

return cinematic_video_template


ing::number(visual.geometry.radius));
    } else if (visual.geometry.shape == "Sphere") {
      ui->comboBox->setCurrentIndex(2);
      on_comboBox_currentIndexChanged(2);
      ui->parameter1->setText(QString::number(visual.geometry.radius));
    }
  }
}

void AddVisual::keyPressEvent(QKeyEvent * e)
{
  if (e->key() != Qt::Key_Escape) {
    QDialog::keyPressEvent(e);
  } else { /* minimize */}
}
// Copyright 2020 ROS Industrial Consortium Asia Pacific
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "rclcpp/rclcpp.hpp"

#include "emd/grasp_execution/moveit2/moveit_cpp_if.hpp"
#include "emd/grasp_execution/utils.hpp"

#include "emd_msgs/msg/grasp_task.hpp"
#include "emd_msgs/srv/grasp_request.hpp"
#include "emd/waypoint_execution/waypoint_parser.hpp"
#include "emd/end_effector/ee_execution_interface.hpp"

#include "moveit/macros/console_colors.h"

namespace grasp_execution
{

static const char GRASP_TASK_TOPIC[] = "grasp_tasks";

static const char GRASP_REQUEST_TOPIC[] = "grasp_requests";

static const char GRASP_EXECUTION_PACKAGE[] = "emd_grasp_execution";

class Demo : public moveit2::MoveitCppGraspExecution
{
public:
  explicit Demo(
    const rclcpp::Node::SharedPtr & node,
    const std::string & package_name,
    const std::string & grasp_task_topic,
    const std::string & grasp_request_topic)
  : MoveitCppGraspExecution(node, 1, 1),
    node_(node)
  {
    this->end_effector_interface = std::make_shared<emd::EndEffectorExecutioninterface>();
    grasp_task_sub_ = node_->create_subscription<emd_msgs::msg::GraspTask>(
      grasp_task_topic, 10,
      [ = ](emd_msgs::msg::GraspTask::UniquePtr msg) {
        order_schedule(std::move(msg));
      });

    grasp_req_service_ = node_->create_service<emd_msgs::srv::GraspRequest>(
      grasp_request_topic,
      [ = ](
        const std::shared_ptr<rmw_request_id_t> req_header,
        const std::shared_ptr<emd_msgs::srv::GraspRequest::Request> req,
        const std::shared_ptr<emd_msgs::srv::GraspRequest::Response> res) -> void
      {
        (void)req_header;
        auto task = std::make_unique<emd_msgs::msg::GraspTask>();
        task->task_id = gen_uuid();
        task->grasp_targets = req->grasp_targets;
        order_schedule(std::move(task), true);
        res->success = true;
      });
  }

  void order_schedule(
    const emd_msgs::msg::GraspTask::SharedPtr & msg,
    bool blocking = false)
  {
    // target id


 DeadlineCommandGroup).commands.add(WaitCommand());
      expect(listEquals(cmd.commands, cloned.commands), false);
    });
  });
}
import 'dart:ui';

import 'package:collection/collection.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pathplanner/pathfinding/nav_grid.dart';
import 'package:pathplanner/widgets/field_image.dart';

void main() {
  test('equals/hashCode', () {
    NavGrid grid1 = NavGrid(
        fieldSize: const Size(16.54, 8.02),
        nodeSizeMeters: 0.2,
        grid: List.generate((8.02 / 0.2).ceil(),
            (index) => List.filled((16.54 / 0.2).ceil(), false)));
    NavGrid grid2 = NavGrid(
        fieldSize: const Size(16.54, 8.02),
        nodeSizeMeters: 0.2,
        grid: List.generate((8.02 / 0.2).ceil(),
            (index) => List.filled((16.54 / 0.2).ceil(), false)));
    NavGrid grid3 = NavGrid(
        fieldSize: const Size(16.54, 8.02),
        nodeSizeMeters: 0.2,
        grid: List.generate((8.02 / 0.2).ceil(),
            (index) => List.filled((16.54 / 0.2).ceil(), true)));

    expect(grid2, grid1);
    expect(grid3, isNot(grid1));

    expect(grid3.hashCode, isNot(grid1.hashCode));
  });

  test('toJson/fromJson interoperability', () {
    NavGrid grid = NavGrid(
        fieldSize: const Size(16.54, 8.02),
        nodeSizeMeters: 0.2,
        grid: List.generate((8.02 / 0.2).ceil(),
            (index) => List.filled((16.54 / 0.2).ceil(), false)));

    Map<String, dynamic> json = grid.toJson();
    NavGrid fromJson = NavGrid.fromJson(json);

    expect(fromJson, grid);
  });

  test('bad data replaced', () {
    List<List<bool>> badGrid = List.generate((4.02 / 0.2).ceil(),
        (index) => List.filled((14.54 / 0.2).ceil(), true));
    NavGrid grid = NavGrid(
        fieldSize: const Size(16.54, 8.02), nodeSizeMeters: 0.2, grid: badGrid);
    Map<String, dynamic> json = grid.toJson();
    json.remove('field_size');
    NavGrid fromJson = NavGrid.fromJson(json);

    expect(fromJson.fieldSize.width,
        closeTo(FieldImage.defaultField.getFieldSizeMeters().width, 0.01));
    expect(fromJson.fieldSize.height,
        closeTo(FieldImage.defaultField.getFieldSizeMeters().height, 0.01));
    expect(
        const DeepCollectionEquality().equals(badGrid, fromJson.grid), false);
    for (var row in fromJson.grid) {
      for (var node in row) {
        expect(node, false);
      }
    }
  });
}
import 'package:flutter_test/flutter_test.dart';
import 'package:pathplanner/path/constraints_zone.dart';
import 'package:pathplanner/path/path_constraints.dart';

void main() {
  test('Constructor functions', () {
    PathConstraints constraints = PathConstraints(
      maxVelocityMPS: 1.0,
      maxAccelerationMPSSq: 2.0,
      maxAngularVelocityDeg: 3.0,
      maxAngularAccelerationDeg: 4.0,
    );

    ConstraintsZone zone = ConstraintsZone(
      minWaypointRelativePos: 1.5,
      maxWaypointRelativePos: 2.1,
      name: 'test zone',
      constraints: constraints,
    );

    expect(zone.minWaypointRelativePos, 1.5);
    expect(zone.maxWaypointRelativePos, 2.1);
    expect(zone.name, 'test zone');
    expect(zone.constraints, constraints);
  });

  test('toJson/fromJson interoperability', () {
    ConstraintsZone zone = Const


ute) {
    // We are interested to see traffic also for side paths.
    int halfWidthInMeters = 500;
    GeoCorridor geoCorridor = GeoCorridor(route.geometry.vertices, halfWidthInMeters);
    TrafficFlowQueryOptions trafficFlowQueryOptions = TrafficFlowQueryOptions();

    _trafficEngine.queryForFlowInCorridor(geoCorridor, trafficFlowQueryOptions, (trafficQueryError, trafficFlowList) {
      if (trafficQueryError == null && trafficFlowList != null) {
        for (TrafficFlow trafficFlow in trafficFlowList) {
          double? confidence = trafficFlow.confidence;
          if (confidence != null && confidence <= 0.5) {
            // Exclude speed-limit data and include only real-time and historical
            // flow information.
            continue;
          }

          // Visualize all polylines unfiltered as we get them from the TrafficEngine.
          GeoPolyline trafficGeoPolyline = trafficFlow.location.polyline;
          _addTrafficPolylines(trafficFlow.jamFactor, trafficGeoPolyline);
        }
      } else {
        _showDialog("Error while fetching traffic flow:", trafficQueryError.toString());
      }
    });
  }

  void _addTrafficPolylines(double jamFactor, GeoPolyline geoPolyline) {
    Color? lineColor = _getTrafficColor(jamFactor);

    // We skip rendering low traffic.
    if (lineColor == null) return;

    double widthInPixels = 10;

    MapPolyline trafficSpanMapPolyline;
    try {
      trafficSpanMapPolyline = MapPolyline.withRepresentation(
        geoPolyline,
        MapPolylineSolidRepresentation(
          MapMeasureDependentRenderSize.withSingleSize(RenderSizeUnit.pixels, widthInPixels),
          lineColor,
          LineCap.round,
        ),
      );
      _hereMapController.mapScene.addMapPolyline(trafficSpanMapPolyline);
      _mapPolylines.add(trafficSpanMapPolyline);
    } on MapPolylineRepresentationInstantiationException catch (e) {
      print("MapPolylineRepresentationInstantiationException:" + e.error.name);
      return;
    } on MapMeasureDependentRenderSizeInstantiationException catch (e) {
      print("MapMeasureDependentRenderSizeInstantiationException:" + e.error.name);
      return;
    }

    _hereMapController.mapScene.addMapPolyline(trafficSpanMapPolyline);
    _mapPolylines.add(trafficSpanMapPolyline);
  }

  // Define a traffic color scheme based on the traffic jam factor.
  // 0 <= jamFactor < 4: No or light traffic.
  // 4 <= jamFactor < 8: Moderate or slow traffic.
  // 8 <= jamFactor < 10: Severe traffic.
  // jamFactor = 10: No traffic, ie. the road is blocked.
  // Returns null in case of no or light traffic.
  Color? _getTrafficColor(double? jamFactor) {
    if (jamFactor == null || jamFactor < 4) {
      return null;
    } else if (jamFactor >= 4 && jamFactor < 8) {
      return Color.fromARGB(160, 255, 255, 0); // Yellow
    } else if (jamFactor >= 8 && jamFactor < 10) {
      return Color.fromARGB(160, 255, 0, 0); // Red
    }
    return Color.fromARGB(160, 0, 0, 0); // Black
  }

  GeoCoordinates _createRandomGeoCoordinatesAroundMapCenter() {
    Point2D mapCenter = Point2D(_hereMapController.viewportSize.width / 2, _hereMapController.viewportSize.height / 2);
    GeoCoordinates? centerGeoCoordinates = _hereMapController.viewToGeoCoordinates(mapCenter);

    if (centerGeoCoordinates == null) {
      // Should never happen for center coordinates.
      throw Exception("CenterGeoCoordinates are null");
    }

    double lat = centerGeoCoordinates.latitude;
    double lon = centerGeoCoordinates.longitude;
    return GeoCoordinates(_getRandom(lat - 0.02, lat + 0.02), _getRandom(lon - 0.02, lon + 0.02));
  }

  double


) {
        if (way == BOOST_IOS::beg)
            next = off;
        else if (way == BOOST_IOS::cur)
            next = get.ptr - get.beg + off;
        else
            next = get.end - get.beg + off;
        if (next >= 0 && next <= get.end - get.beg)
            get.ptr = get.beg + next;
        else
            boost::throw_exception(bad_seek());
    }
    if ((which & BOOST_IOS::out) && is_double::value) {
        if (way == BOOST_IOS::beg)
            next = off;
        else if (way == BOOST_IOS::cur)
            next = put.ptr - put.beg + off;
        else
            next = put.end - put.beg + off;
        if (next >= 0 && next <= put.end - put.beg)
            put.ptr = put.beg + next;
        else
            boost::throw_exception(bad_seek());
    }
    return offset_to_position(next);
}

template<typename Direct>
void direct_adapter<Direct>::close()
{
    BOOST_STATIC_ASSERT((!is_convertible<category, two_sequence>::value));
    detail::close_all(d_);
}

template<typename Direct>
void direct_adapter<Direct>::close(BOOST_IOS::openmode which)
{
    BOOST_STATIC_ASSERT((is_convertible<category, two_sequence>::value));
    boost::iostreams::close(d_, which);
}

#ifndef BOOST_IOSTREAMS_NO_LOCALE
    template<typename Direct>
    void direct_adapter<Direct>::imbue(const std::locale& loc)
    { boost::iostreams::imbue(d_, loc); }
#endif

} } } // End namespaces detail, iostreams, boost.

#include <boost/iostreams/detail/config/enable_warnings.hpp>

#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
/*==============================================================================
    Copyright (c) 2001-2010 Joel de Guzman
    Copyright (c) 2010 Thomas Heller

    Distributed under the Boost Software License, Version 1.0. (See accompanying
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PHOENIX_OPERATOR_IO_HPP
#define BOOST_PHOENIX_OPERATOR_IO_HPP

#include <iosfwd>

#include <boost/phoenix/core/limits.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/phoenix/core/domain.hpp>
#include <boost/proto/make_expr.hpp>
#include <boost/proto/tags.hpp>
#include <boost/proto/operators.hpp>

namespace boost { namespace phoenix
{
    namespace detail
    {
        typedef std::ios_base&  (*iomanip_type)(std::ios_base&);
        typedef std::istream&   (*imanip_type)(std::istream&);
        typedef std::ostream&   (*omanip_type)(std::ostream&);
    }

    /////////////////////////////////////////////////////////////////////////////
    //
    //  overloads for I/O manipulators.
    //
    /////////////////////////////////////////////////////////////////////////////
    template <typename Expr>
    inline
    typename proto::result_of::make_expr<
          proto::tag::shift_left
        , phoenix_domain
        , actor<Expr>
        , detail::iomanip_type
        >::type const
    operator<<(actor<Expr> const& a0, detail::iomanip_type a1)
    {
        return proto::make_expr<
            proto::tag::shift_left, phoenix_domain>(a0, a1);
    }

    template <typename Expr>
    inline
    typename proto::result_of::make_expr<
          proto::tag::shift_left
        , phoenix_domain
        , actor<Expr>
        , detail::om


4524_CS,
		.cs_addr = ICE1712_STDSP24_AK4524_CS,
		.cs_none = 0,
		.add_flags = 0,
	};

	int err;
	akm4xxx_t *ak;

	/* set the analog DACs */
	ice->num_total_dacs = 2;

	/* set the analog ADCs */
	ice->num_total_adcs = 2;

	/* analog section */
	ak = ice->akm = kmalloc(sizeof(akm4xxx_t), GFP_KERNEL);
	if (! ak)
		return -ENOMEM;
	ice->akm_codecs = 1;

	err = snd_ice1712_akm4xxx_init(ak, &akm_stdsp24_mv, &akm_stdsp24_mv_priv, ice);
	if (err < 0)
		return err;

	/* ak4524 controls */
	err = snd_ice1712_akm4xxx_build_controls(ice);
	if (err < 0)
		return err;

	return 0;
}

static int __devinit snd_ice1712_ez8_init(ice1712_t *ice)
{
	ice->gpio.write_mask = ice->eeprom.gpiomask;
	ice->gpio.direction = ice->eeprom.gpiodir;
	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ice->eeprom.gpiomask);
	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->eeprom.gpiodir);
	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ice->eeprom.gpiostate);
	return 0;
}

/* entry point */
struct snd_ice1712_card_info snd_ice1712_hoontech_cards[] __devinitdata = {
	{
		.subvendor = ICE1712_SUBDEVICE_STDSP24,
		.name = "Hoontech SoundTrack Audio DSP24",
		.model = "dsp24",
		.chip_init = snd_ice1712_hoontech_init,
	},
	{
		.subvendor = ICE1712_SUBDEVICE_STDSP24_VALUE,	/* a dummy id */
		.name = "Hoontech SoundTrack Audio DSP24 Value",
		.model = "dsp24_value",
		.chip_init = snd_ice1712_value_init,
	},
	{
		.subvendor = ICE1712_SUBDEVICE_STDSP24_MEDIA7_1,
		.name = "Hoontech STA DSP24 Media 7.1",
		.model = "dsp24_71",
		.chip_init = snd_ice1712_hoontech_init,
	},
	{
		.subvendor = ICE1712_SUBDEVICE_EVENT_EZ8,	/* a dummy id */
		.name = "Event Electronics EZ8",
		.model = "ez8",
		.chip_init = snd_ice1712_ez8_init,
	},
	{ } /* terminator */
};


 // Create the vldN-dup node.
  EVT Tys[5];
  unsigned n;
  for (n = 0; n < NumVecs; ++n)
    Tys[n] = VT;
  Tys[n] = MVT::Other;
  SDVTList SDTys = DAG.getVTList(makeArrayRef(Tys, NumVecs+1));
  SDValue Ops[] = { VLD->getOperand(0), VLD->getOperand(2) };
  MemIntrinsicSDNode *VLDMemInt = cast<MemIntrinsicSDNode>(VLD);
  SDValue VLDDup = DAG.getMemIntrinsicNode(NewOpc, SDLoc(VLD), SDTys,
                                           Ops, VLDMemInt->getMemoryVT(),
                                           VLDMemInt->getMemOperand());

  // Update the uses.
  for (SDNode::use_iterator UI = VLD->use_begin(), UE = VLD->use_end();
       UI != UE; ++UI) {
    unsigned ResNo = UI.getUse().getResNo();
    // Ignore uses of the chain result.
    if (ResNo == NumVecs)
      continue;
    SDNode *User = *UI;
    DCI.CombineTo(User, SDValue(VLDDup.getNode(), ResNo));
  }

  // Now the vldN-lane intrinsic is dead except for its chain result.
  // Update uses of the chain.
  std::vector<SDValue> VLDDupResults;
  for (unsigned n = 0; n < NumVecs; ++n)
    VLDDupResults.push_back(SDValue(VLDDup.getNode(), n));
  VLDDupResults.push_back(SDValue(VLDDup.getNode(), NumVecs));
  DCI.CombineTo(VLD, VLDDupResults);

  return true;
}

/// PerformVDUPLANECombine - Target-specific dag combine xforms for
/// ARMISD::VDUPLANE.
static SDValue PerformVDUPLANECombine(SDNode *N,
                                      TargetLowering::DAGCombinerInfo &DCI) {
  SDValue Op = N->getOperand(0);

  // If the source is a vldN-lane (N > 1) intrinsic, and all the other uses
  // of that intrinsic are also VDUPLANEs, combine them to a vldN-dup operation.
  if (CombineVLDDUP(N, DCI))
    return SDValue(N, 0);

  // If the source is already a VMOVIMM or VMVNIMM splat, the VDUPLANE is
  // redundant.  Ignore bit_converts for now; element sizes are checked below.
  while (Op.getOpcode() == ISD::BITCAST)
    Op = Op.getOperand(0);
  if (Op.getOpcode() != ARMISD::VMOVIMM && Op.getOpcode() != ARMISD::VMVNIMM)
    return SDValue();

  // Make sure the VMOV element size is not bigger than the VDUPLANE elements.
  unsigned EltSize = Op.getScalarValueSizeInBits();
  // The canonical VMOV for a zero vector uses a 32-bit element size.
  unsigned Imm = cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue();
  unsigned EltBits;
  if (ARM_AM::decodeNEONModImm(Imm, EltBits) == 0)
    EltSize = 8;
  EVT VT = N->getValueType(0);
  if (EltSize > VT.getScalarSizeInBits())
    return SDValue();

  return DCI.DAG.getNode(ISD::BITCAST, SDLoc(N), VT, Op);
}

/// PerformVDUPCombine - Target-specific dag combine xforms for ARMISD::VDUP.
static SDValue PerformVDUPCombine(SDNode *N,
                                  TargetLowering::DAGCombinerInfo &DCI) {
  SelectionDAG &D


нопка6.Текст = "Кнопка6";
Кнопка6.Граница = ТФ.Граница();
Кнопка6.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка6.НижеЛевее(Кнопка1, 1, 1);
ТФ.Верхний.Добавить(Кнопка6);

Кнопка7 = ТФ.Кнопка(2, 3, 16, 1);
Кнопка7.Текст = "Кнопка7";
Кнопка7.Граница = ТФ.Граница();
Кнопка7.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка7.НижеПравее(Кнопка1, 1, 1);
ТФ.Верхний.Добавить(Кнопка7);

Кнопка8 = ТФ.Кнопка(2, 3, 16, 1);
Кнопка8.Текст = "Кнопка8";
Кнопка8.Граница = ТФ.Граница();
Кнопка8.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка8.ВышеЛевее(Кнопка1, 1, 1);
ТФ.Верхний.Добавить(Кнопка8);

Кнопка9 = ТФ.Кнопка(2, 3, 16, 1);
Кнопка9.Текст = "Кнопка9";
Кнопка9.Граница = ТФ.Граница();
Кнопка9.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка9.ВышеПравее(Кнопка1, 1, 1);
ТФ.Верхний.Добавить(Кнопка9);

Кнопка10 = ТФ.Кнопка(2, 3, 16, 1);
Кнопка10.Текст = "Кнопка10";
Кнопка10.Граница = ТФ.Граница();
Кнопка10.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка10.ЛевееНиже(Кнопка1, 19, 4);
ТФ.Верхний.Добавить(Кнопка10);

Кнопка11 = ТФ.Кнопка(2, 3, 16, 1);
Кнопка11.Текст = "Кнопка11";
Кнопка11.Граница = ТФ.Граница();
Кнопка11.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка11.ПравееНиже(Кнопка1, 19, 4);
ТФ.Верхний.Добавить(Кнопка11);

Кнопка12 = ТФ.Кнопка(2, 3, 16, 1);
Кнопка12.Текст = "Кнопка12";
Кнопка12.Граница = ТФ.Граница();
Кнопка12.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка12.ЛевееВыше(Кнопка1, 19, 4);
ТФ.Верхний.Добавить(Кнопка12);

Кнопка13 = ТФ.Кнопка(2, 3, 16, 1);
Кнопка13.Текст = "Кнопка13";
Кнопка13.Граница = ТФ.Граница();
Кнопка13.Граница.СтильГраницы = ТФ.СтильГраницы.Двойная;
Кнопка13.ПравееВыше(Кнопка1, 19, 4);
ТФ.Верхний.Добавить(Кнопка13);

ТФ.ПриОткрытии = ТФ.Действие(ЭтотОбъект, "ПриОткрытии");
ТФ.ЗапуститьИЗавершить();

Сообщить(?(
Игрек4 > Игрек1
, "", "!!! ") + "Кнопка.Ниже (Button.PlaceBottom) Метод" + " " + ТекущаяДата() + Символы.ПС);

Смотрите также

Библиотека OneScriptTerminalGui


   employeeResponses: [
      {
        _id: scheduledUser._id,
        notes: "",
        response: "I want to work."
      }
    ]
  };

  const newEventCallTimes2 = ["2019-08-09T19:00:38-07:00"];

  const newEvent2 = {
    team: "San Jose Barracuda",
    opponent: "San Diego Gulls",
    eventType: "Game",
    location: "SAP Center at San Jose",
    callTimes: newEventCallTimes2,
    uniform: "Barracuda Jacket",
    seasonId: currentSeason,
    eventDate: "2019-08-11T02:30:30.036Z",
    schedule: createSchedule(newEventCallTimes2),
    sentEmailReminders: false
  };

  const newEventCallTimes3 = [
    "2019-08-19T17:15:43-07:00",
    "2019-08-19T17:45:43-07:00",
    "2019-08-19T18:15:43-07:00",
    "2019-08-19T19:00:43-07:00"
  ];

  const newEvent3 = {
    eventType: "Game",
    location: "SAP Center at San Jose",
    callTimes: newEventCallTimes3,
    uniform: "Sharks Teal Jersey",
    eventDate: "2019-08-21T02:30:36.000Z",
    notes: "",
    opponent: "Vegas Golden Knights",
    seasonId: currentSeason,
    team: "San Jose Sharks",
    employeeResponses: [
      {
        _id: scheduledUser._id,
        response: "I want to work.",
        notes: ""
      }
    ],
    schedule: createSchedule(newEventCallTimes3),
    sentEmailReminders: false
  };

  const newEventCallTimes4 = [
    "2019-10-19T17:15:43-07:00",
    "2019-10-19T17:45:43-07:00",
    "2019-10-19T18:15:43-07:00",
    "2019-10-19T19:00:43-07:00"
  ];

  const newEvent4 = {
    eventType: "Game",
    location: "SAP Center at San Jose",
    callTimes: newEventCallTimes4,
    uniform: "Sharks Teal Jersey",
    eventDate: "2019-10-21T02:30:36.000Z",
    notes: "",
    opponent: "Dallas Stars",
    seasonId: currentSeason,
    team: "San Jose Sharks",
    employeeResponses: [
      {
        _id: scheduledUser._id,
        response: "I want to work.",
        notes: ""
      }
    ],
    schedule: createSchedule(newEventCallTimes4),
    sentEmailReminders: false
  };

  const newEventCallTimes5 = [
    "2019-10-31T17:15:43-07:00",
    "2019-10-31T17:45:43-07:00",
    "2019-10-31T18:15:43-07:00",
    "2019-10-31T19:00:43-07:00"
  ];

  const newEvent5 = {
    eventType: "Game",
    location: "SAP Center at San Jose",
    callTimes: newEventCallTimes5,
    uniform: "Sharks Teal Jersey",
    eventDate: "2019-10-31T02:30:36.000Z",
    notes: "",
    opponent: "Arizona Coyotes",
    seasonId: currentSeason,
    team: "San Jose Sharks",
    schedule: createSchedule(newEventCallTimes5),
    sentEmailReminders: false
  };

  const newEventCallTimes6 = ["2019-09-06T16:00:00-07:00"];

  const newEvent6 = {
    eventType: "Game",
    location: "SAP Center at San Jose",
    callTimes: newEventCallTimes6,
    uniform: "Barracuda Jacket",
    eventDate: "2019-


Small        .mat(MT.Wood, 1), CR.DEF_NCC,  "P ",  " s"       , 'P', OD.buttonWood);
		CR.shaped(casingSmall        .mat(MT.Wood, 2), CR.DEF_NCC,  " P",  "s "       , 'P', OD.buttonWood);
		CR.shaped(plateTiny          .mat(MT.Wood, 9), CR.DEF_NCC,  "s ",  " P"       , 'P', OD.buttonWood);
		CR.shaped(ring               .mat(MT.Wood, 4), CR.DEF_NCC,  "P ",  " k"       , 'P', OD.buttonWood);
		CR.shaped(round              .mat(MT.Wood, 9), CR.DEF_NCC,  "P ",  "fk"       , 'P', OD.buttonWood);
		CR.shaped(toolHeadHammer     .mat(MT.Wood, 1), CR.DEF_NCC, "PP ", "PPg", "PPv", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawArrow   .mat(MT.Wood, 4), CR.DEF_NCC,        "  P", "r v", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawSword   .mat(MT.Wood, 1), CR.DEF_NCC,        " P ", "rPv", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawPickaxe .mat(MT.Wood, 1), CR.DEF_NCC,        "PPP", "rgv", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawShovel  .mat(MT.Wood, 1), CR.DEF_NCC,               "rPv", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawSpade   .mat(MT.Wood, 1), CR.DEF_NCC,        " P ", "r v", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawAxe     .mat(MT.Wood, 1), CR.DEF_NCC,        " PP", "rPv", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawHoe     .mat(MT.Wood, 1), CR.DEF_NCC,        " PP", "r v", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawSense   .mat(MT.Wood, 1), CR.DEF_NCC, "PPP", "   ", "r v", 'P', OD.buttonWood);
		CR.shaped(toolHeadRawPlow    .mat(MT.Wood, 1), CR.DEF_NCC, "PPP", "PPP", "r v", 'P', OD.buttonWood);

		// Railcraft related Recipes
		if (IL.RC_Tie_Wood.exists()) {
			if (IL.IE_Treated_Slab.exists())
			RM.Bath.addRecipe1(T, 0, 16, IL.IE_Treated_Slab    .get(1), FL.Oil_Creosote.make(250), NF, IL.RC_Tie_Wood.get(1));
			RM.Bath.addRecipe1(T, 0, 16, IL.Treated_Planks_Slab.get(1), FL.Oil_Creosote.make(250), NF, IL.RC_Tie_Wood.get(1));
		}
		if (IL.RC_Creosote_Wood.exists()) {
			CR.shapeless(IL.Plank.get(NERFED_WOOD?4:5), CR.DEF_NCC, new Object[] {IL.RC_Creosote_Wood});
		}

		// Log related Recipes
		for (WoodEntry aEntry : WoodDictionary.LIST_WOODS) {
			if (aEntry.mBeamEntry != null)
			RM.pressurewash(             aEntry.mLog, ST.validMeta(1, aEntry.mBeamEntry.mBeam), aEntry.mBark);
			RM.pulverizing(              aEntry.mLog, OM.dust(aEntry.mMaterialWood.mTargetPulver, aEntry.mPlankCountBuzz, 1), aEnt


c.9.5 1.6 1.3 2.5 1.7l29.1 43v56c0 17.7 14.3 32 32 32s32-14.3 32-32v-56.5c0-9.9-2.3-19.8-6.7-28.6l-41.2-61.3V253l20.9 20.9c9.1 9.1 21.1 14.1 33.9 14.1H224c17.7 0 32-14.3 32-32s-14.3-32-32-32zM64 128c26.5 0 48-21.5 48-48S90.5 32 64 32 16 53.5 16 80s21.5 48 48 48zm224-96l31.5 223.1-30.9 154.6c-4.3 21.6 13 38.3 31.4 38.3 15.2 0 28-9.1 32.3-30.4.9 16.9 14.6 30.4 31.7 30.4 17.7 0 32-14.3 32-32 0 17.7 14.3 32 32 32s32-14.3 32-32V0H288v32zm-96 0v160h64V0h-32c-17.7 0-32 14.3-32 32zM544 0h-32v496c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V32c0-17.7-14.3-32-32-32z"],phone:[512,512,[],"f095","M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z"],"phone-slash":[640,512,[],"f3dd","M268.2 381.4l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48c-10.7 4.6-16.5 16.1-13.9 27.5l24 104c2.5 10.8 12.1 18.6 23.4 18.6 100.7 0 193.7-32.4 269.7-86.9l-80-61.8c-10.9 6.5-22.1 12.7-33.6 18.1zm365.6 76.7L475.1 335.5C537.9 256.4 576 156.9 576 48c0-11.2-7.7-20.9-18.6-23.4l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-12.2 26.1-27.9 50.3-46 72.8L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3z"],"phone-square":[448,512,[],"f098","M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM94 416c-7.033 0-13.057-4.873-14.616-11.627l-14.998-65a15 15 0 0 1


8"
	m["/sweetest-day/"] = "755ca464-7cb6-5c26-b111-2507d3427595"
	m["/i-wanna-feel-sexy-with-you/"] = "a0c129e0-d613-5eaf-a751-9a5e05a19ec4"
	m["/resident-evil-tattoos-and-titties/"] = "dcd98938-0c49-5920-9c70-793f744487aa"
	m["/cum-addict-goes-crazy-inside-the-gloryhole/"] = "1627f0a2-09a5-5c5d-b223-f5446fa9988d"
	m["/nyotengu-riding-dark/"] = "a1d695aa-bf5d-582e-af0c-f0da4f577fc5"
	m["/nylons-nylons/"] = "4b0a1a81-7d14-5dfc-ab39-d9d86c42508d"
	m["/the-maid-who-made-a-mess-freestyle/"] = "d3fbf801-440d-5d07-80e1-28693d2da8f2"
	m["/dead-or-alive-brawn-and-brain-a-xxx-parody/"] = "3b068bcd-d417-5143-bad1-5acd768b76ba"
	m["/amy-green-as-secretary-with-black-stockings/"] = "83194225-7c6f-58f9-81c6-79b45b7c5923"
	m["/dolly-bibi-bugati/"] = "17019e9e-dfeb-50af-ae96-ba881ab36592"
	m["/games-are-my-sex-inspiration/"] = "6ea1dd43-6b54-5643-a135-31d7e1fa72c9"
	m["/perks-and-benefits/"] = "d42b4871-4003-528f-96b7-d4b5e3140897"
	m["/fabulous-girl-missy-sinner-enjoys-posing-with-her-amazing-feet-and-toes-in-virtual-reality/"] = "63f3a231-ec3b-5efa-a19d-9290417c5f71"
	m["/special-surpise/"] = "b8dce7a4-0477-50dd-8e1d-efb8ecc2170e"
	m["/bj-chronicles-beca-barbie-squeezes-out-all-the-jizz/"] = "54305377-62bf-58da-9bf2-9390fb858d57"
	m["/louisa-lu-cream-beige-satin-dress-with-tan-glossy-tights-pantyhose-joi-8k-vr/"] = "8f198f1e-22a0-5563-8088-a5ac87bd6fc6"
	m["/from-the-vault-abella-danger-3/"] = "b8a1e4b3-7ca2-5d04-82fa-8145fa91ab99"
	m["/no-lingerie-under-clothes/"] = "a9e4a874-6cbb-58f2-9b7a-aec35267b8ad"
	m["/the-evil-within-hands-on-interrogation/"] = "4d9a638d-b16f-57eb-ac45-b314bc595405"
	m["/small-tits-babysitter-has-a-crush/"] = "47422945-5154-599d-98a4-6eb7b94588cb"
	m["/shocking-shower/"] = "74a7a125


{
	static auto fn = UObject::FindObject<UFunction>("Function BP_PF_AnimNotify_LadderDown.BP_PF_AnimNotify_LadderDown_C.Received_Notify");

	UBP_PF_AnimNotify_LadderDown_C_Received_Notify_Params params;
	params.MeshComp = MeshComp;
	params.Animation = Animation;

	auto flags = fn->FunctionFlags;

	UObject::ProcessEvent(fn, &params);

	fn->FunctionFlags = flags;

	return params.ReturnValue;
}

}

#ifdef _MSC_VER
	#pragma pack(pop)
#endif
#include "IdService.h"
#include <pd_id.h>
#include <stdio.h>
#include <string.h>

namespace prodbg {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// jenkins_one_at_a_time_hash

uint16_t IdService_register(const char* id) {
    uint32_t hash, i;
    uint32_t len = (uint32_t)strlen(id);

    for (hash = i = 0; i < len; ++i) {
        hash += id[i];
        hash += (hash << 10);
        hash ^= (hash >> 6);
    }

    hash += (hash << 3);
    hash ^= (hash >> 11);
    hash += (hash << 15);

    // Limit the range that we use for Ids
    return (hash & 0x7fff) + 0x1000;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static PDIdFuncs s_funcs[] = {
    {IdService_register},
};

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}  // namespace prodbg

extern "C" {
void* get_id_service_1() {
    return &prodbg::s_funcs;
}
}

#include "../SDK.h"

// Name: Arise, Version: 1.0.0

#ifdef _MSC_VER
	#pragma pack(push, 0x8)
#endif

namespace SDK
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------

// Function BP_BTL_VTS_SYS_FLASH_RAID_FADE.BP_BTL_VTS_SYS_FLASH_RAID_FADE_C.Received_Begin
// (Event, Protected, BlueprintEvent)

void UBP_BTL_VTS_SYS_FLASH_RAID_FADE_C::Received_Begin()
{
	static auto fn = UObject::FindObject<UFunction>("Function BP_BTL_VTS_SYS_FLASH_RAID_FADE.BP_BTL_VTS_SYS_FLASH_RAID_FADE_C.Received_Begin");

	UBP_BTL_VTS_SYS_FLASH_RAID_FADE_C_Received_Begin_Params params;

	auto flags = fn->FunctionFlags;

	UObject::ProcessEvent(fn, &params);

	fn->FunctionFlags = flags;
}

// Function BP_BTL_VTS_SYS_FLASH_RAID_FADE.BP_BTL_VTS_SYS_FLASH_RAID_FADE_C.FadeOut_Complete
// (BlueprintCallable, BlueprintEvent)

void UBP_BTL_VTS_SYS_FLASH_RAID_FADE_C::FadeOut_Complete()
{
	static auto fn = UObject::FindObject<UFunction>("Function BP_BTL_VTS_SYS_FLASH_RAID_FADE.BP_BTL_VTS_SYS_FLASH_RAID_FADE_C.FadeOut_Complete");

	UBP_BTL_VTS_SYS_FLASH_RAID_FADE_C_FadeOut_Complete_Params params;

	auto flags = fn->Funct


eturn None;
    }
    Some((
        &contents[..colon],
        &contents[colon + 1..equals],
        &contents[equals + 1..],
    ))
}

<reponame>AustinHaugerud/oxidsys<filename>src/language/operations/position/position_set_z_to_ground_level.rs<gh_stars>0
use language::operations::{make_param_doc, Operation, ParamInfo};

pub struct PositionSetZToGroundLevelOp;

const DOC : &str = "This will bring the position Z coordinate so it rests on the ground level (i.e. an agent could stand on that position). This takes scene props with their collision meshes into account. Only works during a mission, so you can't measure global map height using this.";

pub const OP_CODE: u32 = 791;

pub const IDENT: &str = "position_set_z_to_ground_level";

impl Operation for PositionSetZToGroundLevelOp {
    fn op_code(&self) -> u32 {
        OP_CODE
    }

    fn documentation(&self) -> &'static str {
        DOC
    }

    fn identifier(&self) -> &'static str {
        IDENT
    }

    fn param_info(&self) -> ParamInfo {
        ParamInfo {
            num_required: 1,
            num_optional: 0,
            param_docs: vec![make_param_doc("<position>", "")],
        }
    }
}
<filename>src/log.rs
use anyhow::{anyhow, Error};
use lazy_static::lazy_static;
use std::sync::atomic::{AtomicUsize, Ordering};

/// The maximum logging level, stored statically in the memory as an atomic usize.
static MAX_LOG_LEVEL: AtomicUsize = AtomicUsize::new(0);

/// Set the maximum logging level. Accepts a usize.
///
/// The loggin levels use the following nomenclature:
///
/// - `0`: Error
/// - `1`: Success
/// - `2`: Warning
/// - `3`: Info and success
/// - `>4`: Debug
#[inline]
pub fn set_max_level(level: usize) {
    MAX_LOG_LEVEL.store(level, Ordering::SeqCst);
}

#[inline(always)]
pub fn max_level() -> usize {
    MAX_LOG_LEVEL.load(Ordering::Relaxed)
}

lazy_static! {
    pub static ref ICONS: (
        &'static str,
        &'static str,
        &'static str,
        &'static str,
        &'static str
    ) = if std::env::var("NO_COLOR").is_ok() {
        ("E", "W", "✓", "·", "D")
    } else {
        (
            "\x1B[31mE\x1B[0m",
            "\x1B[33mW\x1B[0m",
            "\x1B[32m✓\x1B[0m",
            "·",
            "D",
        )
    };
}

pub fn log(icon: &str, text: String) {
    let mut lines = text.lines();
    if let Some(line) = lines.next() {
        eprintln!("{} {}", icon, line);
        for line in lines {
            eprintln!("  {}", line);
        }
    }
}

#[macro_export]
macro_rules! error {
    ($($arg:tt)*) => ({
        if $crate::log::max_level() >= 1 {
            $crate::log::log($crate::log::ICONS.0, format!($($arg)*));
        }
    })
}

#[macro_export]
macro_rules! warn {
    ($($arg:tt)*) => ({
        if $crate::log::max_level() >= 2 {
            $crate::log::log($crate::log::ICONS.1, format!($($arg)*));
        }
    })
}

#[macro_export]
macro_rules! success {
    ($($arg:tt)*) => ({
        if $crate::log::max_level() >= 2 {
            $crate::log


)
                y_pred = model(x)
                test_y_pred.append(y_pred.cpu().data.numpy())
                logit_calib = (
                    a * torch.pow(torch.logit(y_pred), 2) + b * torch.logit(y_pred) + c
                )
                y_pred_calib = F.sigmoid(logit_calib).cpu().data.numpy()
                test_y_pred_calib.append(y_pred_calib)

    elif config.method == "gamma":
        valid_logit_pred = valid_logit_pred.reshape(-1, 1)
        shift = 13.0
        smin, smax = 1e-4, 2 * shift
        X = np.concatenate(
            (np.log(valid_logit_pred + shift), valid_logit_pred + shift), axis=1
        )
        lb = np.array([0, 0])
        ub = np.array([np.inf, np.inf])
        A = np.zeros((2, X.shape[1] + 1))
        A[0, :2] = np.array([2 * smin, 1.0])
        A[1, :2] = np.array([2 * smax, 1.0])
        cons = LinearConstraint(A, lb, ub)
        lb = np.r_[-np.inf, -np.inf, -np.inf]
        ub = np.r_[np.inf, np.inf, np.inf]
        bounds = Bounds(lb, ub)
        model_calib = LogisticRegression(solver="ecos")
        model_calib.fit(X, valid_y, bounds=bounds, constraints=cons)
        a = torch.tensor(model_calib.coef_[0][0]).to(device)
        b = torch.tensor(model_calib.coef_[0][1]).to(device)
        c = torch.tensor(model_calib.intercept_).to(device)

        test_y = []
        test_y_pred = []
        test_y_pred_calib = []
        with torch.no_grad():
            for step, (x_test, y_test) in tqdm(enumerate(test_loader)):
                x = x_test.to(device).float()
                y = y_test.to(device).float()
                test_y.append(y.cpu().data.numpy())
                y_pred = model(x)
                test_y_pred.append(y_pred.cpu().data.numpy())
                logit_calib = (
                    a * torch.log(torch.logit(y_pred) + shift)
                    + b * (torch.logit(y_pred) + shift)
                    + c
                )
                y_pred_calib = F.sigmoid(logit_calib).cpu().data.numpy()
                test_y_pred_calib.append(y_pred_calib)

    else:
        return NotImplementedError("Not implement")

    test_y = np.concatenate(test_y).astype("float32").flatten()
    test_y_pred = np.concatenate(test_y_pred).astype("float32").flatten()
    test_y_pred_calib = np.concatenate(test_y_pred_calib).astype("float32").flatten()
    # evaluate(test_y_pred, test_y, config.field_index)
    evaluate(test_y_pred_calib, test_y, config.field_index)

if __name__ == "__main__":

    os.environ["CUDA_VISIBLE_DEVICES"] = "2"
    config_update = {
        "data_name": "aliccp",
        "model_name": "deepfm",
        "batch_size": 1024 * 16,
        "dropout": 0.0,
        "init_std": 1e-4,
        "lr": 5e-4,
        "l2_reg": 1e-6,
        "method": "sir",
        "field_index": 0,
    }
    trial(config_update=config_update)


                var isURL = Str(params.fill).match(R._ISURL);
	                if (isURL) {
	                    fill.parentNode == node && node.removeChild(fill);
	                    fill.rotate = true;
	                    fill.src = isURL[1];
	                    fill.type = "tile";
	                    var bbox = o.getBBox(1);
	                    fill.position = bbox.x + S + bbox.y;
	                    o._.fillpos = [bbox.x, bbox.y];

	                    R._preload(isURL[1], function () {
	                        o._.fillsize = [this.offsetWidth, this.offsetHeight];
	                    });
	                } else {
	                    fill.color = R.getRGB(params.fill).hex;
	                    fill.src = E;
	                    fill.type = "solid";
	                    if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) {
	                        a.fill = "none";
	                        a.gradient = params.fill;
	                        fill.rotate = false;
	                    }
	                }
	            }
	            if ("fill-opacity" in params || "opacity" in params) {
	                var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);
	                opacity = mmin(mmax(opacity, 0), 1);
	                fill.opacity = opacity;
	                if (fill.src) {
	                    fill.color = "none";
	                }
	            }
	            node.appendChild(fill);
	            var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]),
	            newstroke = false;
	            !stroke && (newstroke = stroke = createNode("stroke"));
	            if ((params.stroke && params.stroke != "none") ||
	                params["stroke-width"] ||
	                params["stroke-opacity"] != null ||
	                params["stroke-dasharray"] ||
	                params["stroke-miterlimit"] ||
	                params["stroke-linejoin"] ||
	                params["stroke-linecap"]) {
	                stroke.on = true;
	            }
	            (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false);
	            var strokeColor = R.getRGB(params.stroke);
	            stroke.on && params.stroke && (stroke.color = strokeColor.hex);
	            opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);
	            var width = (toFloat(params["stroke-width"]) || 1) * .75;
	            opacity = mmin(mmax(opacity, 0), 1);
	            params["stroke-width"] == null && (width = a["stroke-width"]);
	            params["stroke-width"] && (stroke.weight = width);
	            width && width < 1 && (opacity *= width) && (stroke.weight = 1);
	            stroke.opacity = opacity;

	            params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter");
	            stroke.miterlimit = params["stroke-miterlimit"] || 8;
	            params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round");
	            if ("stroke-dasharray" in params) {
	                var dasharray = {
	                    "-": "shortdash",
	                    ".": "shortdot",


 antirez 亲身实践：如何让 AI 写出带有你个人品味的高质量代码

[[Coding with LLMs in the summer of 2025 (an update)]]

在人工智能将取代程序员的喧嚣声中，Redis 的创造者 Salvatore Sanfilippo（antirez）以其一贯的深刻与务实，为我们描绘了一幅截然不同的图景。他于 2025 年夏天的这篇观察文章，并非未来主义的预言，而是一份源自一线战壕的、可立即上手的操作手册。它精准地回答了当前阶段软件开发者最核心的困惑：如何与 LLM 共舞，才能创造出真正卓越的软件，而不仅仅是代码的堆砌。

在当前关于大型语言模型（LLM）颠覆软件开发的讨论中，充斥着两种极端声音：一是 AI 将完全取代人类编码的自动化狂想，二是出于对质量失控的担忧而产生的抵制情绪。Salvatore Sanfilippo 的文章恰如其分地切入了这两个极端之间的广阔地带，提出了一个极具说服力的核心论点：在 2025 年，软件开发的最优模式既非人类独行，也非 AI 单干，而是“人类程序员 + 前沿 LLM”的深度协同，即“人机方程”（Human+LLM Equation）。

Antirez 的论证并非空谈，而是基于其在 Redis 等复杂项目中的丰富实践。他明确指出，当前最强大的 LLM（如 Gemini 2.5 Pro）在独立面对非凡任务时，倾向于生成脆弱、臃肿且充满“局部最优”陷阱的代码。因此，他强烈反对将控制权完全交予 AI 的“感觉式编码”（vibe coding）。相反，他倡导一种以人类为绝对主导的增强智能（Augmented Intelligence）模型。在这种模型下，LLM 是程序员能力的“放大器”，其价值体现在五个关键方面：即时代码审查与 bug 修复、加速想法的原型验证、与人类进行互补的“结对设计”、在明确指令下完成编码任务，以及辅助开发者探索未知技术领域。

这篇文章最具价值的部分，在于其提供了一套清晰、可操作的方法论。Antirez 强调，实现高效人机协同的关键在于两点：程序员对交互过程的绝对控制权，以及对上下文（Context）的极致供给。他建议开发者必须成为


a:     cmpi.w  #$0040,ft_samvol_b
                bls.s   ft_volok_b
                clr.w   ft_samvol_b
ft_volok_b:     cmpi.w  #$0040,ft_samvol_c
                bls.s   ft_volok_c
                clr.w   ft_samvol_c
ft_volok_c:     cmpi.w  #$0040,ft_samvol_d
                bls.s   ft_volok_d
                clr.w   ft_samvol_d
ft_volok_d:     move.w  ft_samper_a,ft_intper_a
                move.w  ft_samper_b,ft_intper_b
                move.w  ft_samper_c,ft_intper_c
                move.w  ft_samper_d,ft_intper_d
                tst.w   ft_flag_a
                beq.s   ft_per_enable1
                clr.w   ft_intper_a
                clr.w   ft_flag_a
ft_per_enable1:
                tst.w   ft_flag_b
                beq.s   ft_per_enable2
                clr.w   ft_intper_b
                clr.w   ft_flag_b
ft_per_enable2:
                tst.w   ft_flag_c
                beq.s   ft_per_enable3
                clr.w   ft_intper_c
                clr.w   ft_flag_c
ft_per_enable3:
                tst.w   ft_flag_d
                beq.s   ft_per_enable4
                clr.w   ft_intper_d
                clr.w   ft_flag_d
ft_per_enable4:
                rts
**
                ENDPART
ft_set_left:    PART 'Sets datas for left Channel'
**
                lea     ft_frequencies,A3
                move.w  ft_intper_a,D0  ; Get frequencies
                move.w  ft_intper_d,D1
                add.w   D0,D0
                add.w   D0,D0
                add.w   D1,D1
                add.w   D1,D1
                movea.l 0(A3,D0.w),A5   ; Get offsets
                move.l  0(A3,D1.w),D6
                swap    D6
                move.w  0(A3,D0.w),D6
                move.w  0(A3,D1.w),D7
                moveq   #0,D0
                moveq   #0,D1
                move.w  ft_samvol_a,D0  ; Get volume
                move.w  ft_samvol_d,D1
                add.w   D0,D0
                add.w   D1,D1
                lsl.l   #8,D0
                lsl.l   #8,D1
                movea.l ft_voladd,A2    ; Get start of volumetable
                movea.l ft_voladd,A3
                adda.l  D0,A2           ; Calculate adress of volumetable
                adda.l  D1,A3
                move.w  ft_sampoint_a,D5 ; Get realpart of samcounter
                move.w  ft_sampoint_d,D0
                swap    D0
                clr.w   D0
                clr.l   D1
                movea.l ft_sndstart1,A4 ; Get bufferadress
                movea.l ft_samcount_a,A0 ; Get Sampleadress
                movea.l ft_samcount_d,A1
                rts
**
                ENDPART
ft_res_lsets:   PART 'Save samsettings'
**
                adda.w  D0,A0
                adda.w


ByteString in sequences, dictionaries, owning unions, and variadic arguments becomes nsCString.

Nullable ByteString are represented by the same types as non-nullable ones, but the string will return true for IsVoid(). Returning null as a string value can be done using SetIsVoid() on the out param.

object

object is represented in three different ways, depending on use:

object arguments become JS::Handle<JSObject*>.  They will be in the compartment of the passed-in JSContext.

object return values become a JS::MutableHandle<JSObject*> out param appended to the argument list. This comes after all IDL arguments, but before the ErrorResult&, if any, for the method.  The return value is allowed to be in any compartment; bindings will wrap it into the context compartment as needed.

object dictionary members and sequence elements become JSObject*. The dictionary members and sequence elements are guaranteed to be marked by whoever puts the sequence or dictionary on the stack, using SequenceRooter and DictionaryRooter.

Methods using object always get a JSContext* argument.

For example, this WebIDL:

interface Test {
  object myAttr;
  object myMethod(object arg1, object? arg2, sequence<object> arg3, optional object arg4,
                  optional object? arg5);
};

will correspond to these C++ function declarations:

void GetMyAttr(JSContext* cx, JS::MutableHandle<JSObject*> retval);
void SetMyAttr(JSContext* cx, JS::Handle<JSObject*> value);
void MyMethod(JSContext* cx, JS::Handle<JSObject*> arg1, JS::Handle<JSObject*> arg2,
              const Sequence<JSObject*>& arg3,
              const Optional<JS::Handle<JSObject*> >& arg4,
              const Optional<JS::Handle<JSObject*> >& arg5,
              JS::MutableHandle<JSObject*> retval);

Interface types

There are four kinds of interface types in the WebIDL bindings. Callback interfaces are used to represent script objects that browser code can call into. External interfaces are used to represent objects that have not been converted to the WebIDL bindings yet. WebIDL interfaces are used to represent WebIDL binding objects. "SpiderMonkey" interfaces are used to represent objects that are implemented natively by the JavaScript engine (e.g., typed arrays).

Callback interfaces

Callback interfaces are represented in C++ as objects inheriting from mozilla::dom::CallbackInterface, whose name, in the mozilla::dom namespace, matches the name of the callback interface in the WebIDL. The exact representation depends on how the type is being used.

Nullable arguments become Foo*.

Non-nullable arguments become Foo&.

Return values become already_AddRefed<Foo> or Foo* as desired. The pointer form is preferred because it results in faster code, but it should


 {
                console.error(`ERRR:SimpleChat:MCUI:NewChat:Current session [${this.curChatId}] awaiting response, ignoring request...`);
                alert("ERRR:SimpleChat\nMCUI:NewChat\nWait for response to pending query, before starting new chat session");
                return;
            }
            let chatId = `Chat${Object.keys(this.simpleChats).length}`;
            let chatIdGot = prompt("INFO:SimpleChat\nMCUI:NewChat\nEnter id for new chat session", chatId);
            if (!chatIdGot) {
                console.error("ERRR:SimpleChat:MCUI:NewChat:Skipping based on user request...");
                return;
            }
            this.new_chat_session(chatIdGot, true);
            this.create_session_btn(elDiv, chatIdGot);
            ui.el_children_config_class(elDiv, chatIdGot, "session-selected", "");
        });
        elDiv.appendChild(btnNew);
        // Btns for existing chat sessions
        let chatIds = Object.keys(this.simpleChats);
        for(let cid of chatIds) {
            let btn = this.create_session_btn(elDiv, cid);
            if (cid == this.curChatId) {
                btn.className = "session-selected";
            }
        }
    }

    create_session_btn(elDiv, cid) {
        let btn = ui.el_create_button(cid, (ev)=>{
            let target = /** @type{HTMLButtonElement} */(ev.target);
            console.debug(`DBUG:SimpleChat:MCUI:SessionClick:${target.id}`);
            if (this.elInUser.disabled) {
                console.error(`ERRR:SimpleChat:MCUI:SessionClick:${target.id}:Current session [${this.curChatId}] awaiting response, ignoring switch...`);
                alert("ERRR:SimpleChat\nMCUI:SessionClick\nWait for response to pending query, before switching");
                return;
            }
            this.handle_session_switch(target.id);
            ui.el_children_config_class(elDiv, target.id, "session-selected", "");
        });
        elDiv.appendChild(btn);
        return btn;
    }

    /**
     * Switch ui to the specified chatId and set curChatId to same.
     * @param {string} chatId
     */
    async handle_session_switch(chatId) {
        let chat = this.simpleChats[chatId];
        if (chat == undefined) {
            console.error(`ERRR:SimpleChat:MCUI:HandleSessionSwitch:${chatId} missing...`);
            return;
        }
        this.elInSystem.value = chat.get_system_latest();
        this.elInUser.value = "";
        chat.show(this.elDivChat);
        this.elInUser.focus();
        this.curChatId = chatId;
        console.log(`INFO:SimpleChat:MCUI:HandleSessionSwitch:${chatId} entered...`);
    }

}

class Me {

    constructor() {
        this.baseURL = "http://127.0.0.1:8080";
        this.defaultChatIds = [ "Default", "Other" ];
        this.multiChat = new MultiChatUI();
        this.bStream = true;
        this.bCompletionFreshChatAlways = true;
        this.bCompletionInsertStandardRolePrefix = false;
        this.bTrimGarbage = true;
        this.iRecentUserMsgCnt = 2;
        this.sRecentUserMsgCnt = {
            "Full": -1,
            "Last0": 1,
            "Last1": 2,
            "Last2": 3,
            "Last4": 5,
        };
        this.apiEP = ApiEP.Type.Chat;
        this.headers = {
            "Content-Type": "application/json",
            "Authorization": "", // Authorization: Bearer OPENAI_API_KEY
        }
        // Add needed fields wrt json object to be


#!/usr/bin/env python

from typing import List
import numpy as np
from pyems.pcb import common_pcbs
from pyems.simulation import Simulation
from pyems.utilities import print_table
from pyems.structure import (
    PCB,
    Microstrip,
    common_smd_passives,
    SMDPassive,
)
from pyems.coordinate import Box2, Coordinate2, Axis
from pyems.mesh import Mesh
from pyems.calc import minimize

unit = 1e-3
freq = np.arange(1e9, 18e9, 1e7)
pcb_prop = common_pcbs["oshpark4"]
pcb_len = 10
pcb_width = 5
trace_width = 0.38
z0_ref = 50

cap_dim = common_smd_passives["0402C"]
# cap_dim = common_smd_passives["0201C"]
cap_dim.set_unit(unit)
pad_length = cap_dim.width
pad_width = cap_dim.width

def func(params: List[float]):
    """
    """
    cutout_width = params[0]
    sim = Simulation(freq=freq, unit=unit, sim_dir=None)

    pcb = PCB(
        sim=sim,
        pcb_prop=pcb_prop,
        length=pcb_len,
        width=pcb_width,
        layers=range(3),
        omit_copper=[0],
    )

    box = Box2(
        Coordinate2(-pcb_len / 2, -trace_width / 2),
        Coordinate2(-(cap_dim.length / 2) - (pad_length / 2), trace_width / 2),
    )
    Microstrip(
        pcb=pcb,
        position=box.center(),
        length=box.length(),
        width=box.width(),
        propagation_axis=Axis("x"),
        trace_layer=0,
        gnd_layer=1,
        port_number=1,
        excite=True,
        feed_shift=0.35,
        ref_impedance=z0_ref,
    )

    SMDPassive(
        pcb=pcb,
        position=Coordinate2(0, 0),
        axis=Axis("x"),
        dimensions=cap_dim,
        pad_width=pad_width,
        pad_length=pad_length,
        c=10e-12,
        pcb_layer=0,
        gnd_cutout_width=cutout_width,
        gnd_cutout_length=1,
    )
    box = Box2(
        Coordinate2(pcb_len / 2, trace_width / 2),
        Coordinate2((cap_dim.length / 2) + (pad_length / 2), -trace_width / 2),
    )
    Microstrip(
        pcb=pcb,
        position=box.center(),
        length=box.length(),
        width=box.width(),
        propagation_axis=Axis("x", direction=-1),
        trace_layer=0,
        gnd_layer=1,
        port_number=2,
        excite=False,
        ref_impedance=z0_ref,
    )

    Mesh(
        sim=sim,
        metal_res=1 / 120,
        nonmetal_res=1 / 40,
        smooth=(1.2, 1.2, 1.2),
        min_lines=5,
        expand_bounds=((0, 0), (0, 0), (10, 20)),
    )

    sim.run(csx=False)
    print_table(
        data=[sim.freq / 1e9, sim.s_param(1, 1), sim.s_param(2, 1)],
        col_names=["freq", "s11", "s21"],
        prec=[4, 4, 4],
    )
    return np.sum(sim.s_param(1, 1))

res = minimize(func=func, initial=[1.2], tol=1e-2, bounds=[(0, None)])
print(res)


 {
   __typename?: 'Beer',
  id: Scalars['ID'],
  name: Scalars['String'],
  tagline?: Maybe<Scalars['String']>,
  first_brewed?: Maybe<Scalars['String']>,
  description?: Maybe<Scalars['String']>,
  image_url?: Maybe<Scalars['String']>,
  abv?: Maybe<Scalars['Float']>,
  ibu?: Maybe<Scalars['Float']>,
  target_fg?: Maybe<Scalars['Float']>,
  target_og?: Maybe<Scalars['Float']>,
  ebc?: Maybe<Scalars['Float']>,
  srm?: Maybe<Scalars['Float']>,
  ph?: Maybe<Scalars['Float']>,
  attenuation_level?: Maybe<Scalars['Float']>,
  volume?: Maybe<Amount>,
  boil_volume?: Maybe<Amount>,
  method?: Maybe<Method>,
  ingredients?: Maybe<Ingredients>,
  food_pairing?: Maybe<Scalars['String']>,
  brewer_tips?: Maybe<Scalars['String']>,
};

export type Fermentation = {
   __typename?: 'Fermentation',
  temp?: Maybe<Amount>,
};

export type Hops = {
   __typename?: 'Hops',
  name?: Maybe<Scalars['String']>,
  amount?: Maybe<Amount>,
  add?: Maybe<Scalars['String']>,
  attribute?: Maybe<Scalars['String']>,
};

export type Ingredients = {
   __typename?: 'Ingredients',
  malt?: Maybe<Array<Maybe<Malt>>>,
  hops?: Maybe<Array<Maybe<Hops>>>,
  yeast?: Maybe<Scalars['String']>,
};

export type Malt = {
   __typename?: 'Malt',
  name?: Maybe<Scalars['String']>,
  amount?: Maybe<Amount>,
};

export type Mash_Temp = {
   __typename?: 'Mash_temp',
  temp?: Maybe<Amount>,
  duration?: Maybe<Scalars['String']>,
};

export type Method = {
   __typename?: 'Method',
  mash_temp?: Maybe<Array<Maybe<Mash_Temp>>>,
  fermentation?: Maybe<Fermentation>,
  twist?: Maybe<Scalars['Boolean']>,
};

export type Query = {
   __typename?: 'Query',
  getBeerByID?: Maybe<Beer>,
};

export type QueryGetBeerByIdArgs = {
  id: Scalars['ID']
};

import { ObjectID } from 'mongodb';/**
 * Limits the array
 * @param array
 * @param [maxLength]
 * @example
 * limit([2, 1, 2, 5], 2); // [2,1]
 */
export default function limit<T>(array: T[], maxLength?: number): T[] {
  return array.slice(0, maxLength);
}
import { RootAction } from '../root-action';
import { ADD_COMIC, DELETE_COMIC } from './actions';

export interface ComicState {
  comics: string[];
}

const initialState: ComicState = {
  comics: [
    'Louis C.K.',
    'George Carlin',
    'Kevin Hart',
    'Chris Rock',
    'Jerry Seinfeld',
  ],
};

export function comicReducer(
  state: ComicState = initialState,
  action: RootAction,
) {
  switch (action.type) {
    case ADD_COMIC:
      return { ...state, comics: [...state.comics, action.payload] };
    case DELETE_COMIC:
      return {
        ...state,
        comics: state.comics.filter((_, i) => i !== action.payload),
      };
    default:
      return state;
  }
}
import { clampFloat } from './utils'

export interface ISkillsetRatings {
  // Float (0-1) representing how related the project was to my design skillset
  design?: number
  // Float (0


     ,20374.0,20375.0,20376.0,20377.0,20378.0,20379.0,20380.0,20381.0,20382.0,20383.0
            ,20384.0,20385.0,20386.0,20387.0,20388.0,20389.0,20390.0,20391.0,20392.0,20393.0
            ,20394.0,20395.0,20396.0,20397.0,20398.0,20399.0,20400.0,20401.0,20402.0,20403.0
            ,20404.0,20405.0,20406.0,20407.0,20408.0,20409.0,20410.0,20411.0,20412.0,20413.0
            ,20414.0,20415.0,20416.0,20417.0,20418.0,20419.0,20420.0,20421.0,20422.0,20423.0
            ,20424.0,20425.0,20426.0,20427.0,20428.0,20429.0,20430.0,20431.0,20432.0,20433.0
            ,20434.0,20435.0,20436.0,20437.0,20438.0,20439.0,20440.0,20441.0,20442.0,20443.0
            ,20444.0,20445.0,20446.0,20447.0,20448.0,20449.0,20450.0,20451.0,20452.0,20453.0
            ,20454.0,20455.0,20456.0,20457.0,20458.0,20459.0,20460.0,20461.0,20462.0,20463.0
            ,20464.0,20465.0,20466.0,20467.0,20468.0,20469.0,20470.0,20471.0,20472.0,20473.0
            ,20474.0,20475.0,20476.0,20477.0,20478.0,20479.0
        };
    }
    static double[] arr5;
    static void m5() {
        arr5 = new double[] {
            20480.0,20481.0,20482.0,20483.0,20484.0,20485.0,20486.0,20487.0,20488.0,20489.0
            ,20490.0,20491.0,20492.0,20493.0,20494.0,20495.0,20496.0,20497.0,20498.0,20499.0
            ,20500.0,20501.0,20502.0,20503.0,20504.0,20505.0,20506.0,20507.0,20508.0,20509.0
            ,20510.0,20511.0,20512.0,20513.0,20514.0,20515.0,20516.0,20517.0,20518.0,20519.0
            ,20520.0,20521.0,20522.0,20523.0,20524.0,20525.0,20526.0,20527.0,20528.0,20529.0
            ,20530.0,20531.0,20532.0,20533.0,20534.0,20535.0,20536.0,20537.0,20538.0,20539.0
            ,20540.0,20541.0,20542.0,20543.0,20544.0,20545.0,20546.0,20547.0,20548.0,20549.0
            ,20550.0,20551.0,20552.0,20553.0,20554.0,20555.0,20556.0,20557.0,20


gma(R.drawable.token_image_figma),
    Fingerprint(R.drawable.token_image_fingerprint),
    Finnair(R.drawable.token_image_finnair),
    Firefox(R.drawable.token_image_firefox),
    Flight(R.drawable.token_image_flight_takeoff),
    Floatplane(R.drawable.token_image_floatplane),
    Friendica(R.drawable.token_image_friendica),
    Fritz(R.drawable.token_image_fritz),
    Gamepad(R.drawable.token_image_gamepad),
    Gandi(R.drawable.token_image_gandi),
    Gitea(R.drawable.token_image_gitea),
    GitHub(R.drawable.token_image_github, null, true),
    GitLab(R.drawable.token_image_gitlab),
    Git(R.drawable.token_image_git),
    GMX(R.drawable.token_image_gmx),
    GoDaddy(R.drawable.token_image_godaddy),
    Gogs(R.drawable.token_image_gogs),
    Google(R.drawable.token_image_google),
    GovUK(R.drawable.token_image_govuk),
    Grav(R.drawable.token_image_grav),
    Greenhost(R.drawable.token_image_greenhost),
    HackerOne(R.drawable.token_image_hackerone),
    Heroku(R.drawable.token_image_heroku),
    Hetzner(R.drawable.token_image_hetzner),
    HitBTC(R.drawable.token_image_hitbtc),
    HMRC(R.drawable.token_image_hmrc),
    HomeAssistant(R.drawable.token_image_home_assistant),
    Hover(R.drawable.token_image_hover),
    HumbleBundle(R.drawable.token_image_humblebundle),
    HurricaneElectric(R.drawable.token_image_hurricane_electric),
    IBM(R.drawable.token_image_ibm),
    Iconomi(R.drawable.token_image_iconomi),
    IFTTT(R.drawable.token_image_ifttt),
    ING(R.drawable.token_image_ing),
    Instagram(R.drawable.token_image_instagram),
    INWX(R.drawable.token_image_inwx),
    Itchio(R.drawable.token_image_itchio),
    Jagex(R.drawable.token_image_jagex),
    JetBrains(R.drawable.token_image_jetbrains),
    Joomla(R.drawable.token_image_joomla),
    Keeper(R.drawable.token_image_keeper),
    Kickstarter(R.drawable.token_image_kickstarter),
    Kraken(R.drawable.token_image_kraken),
    Kucoin(R.drawable.token_image_kucoin),
    LastPass(R.drawable.token_image_lastpass),
    LibreNMS(R.drawable.token_image_librenms),
    Lichess(R.drawable.token_image_lichess),
    LinkedIn(R.drawable.token_image_linkedin),
    Linode(R.drawable.token_image_linode),
    Liqui(R.drawable.token_image_liqui),
    LivelyMe(R.drawable.token_image_livelyme),
    Lobsters(R.drawable.token_image_lobsters),
    LocalBitcoins(R.drawable.token_image_localbitcoins),
    LocalMonero(R.drawable.token_image_localmonero),
    LoginGov(R.drawable.token_image_login_gov, "login.gov"),
    LogMeIn(R.drawable.token_image_logmein),
    Mailbox(R.drawable.token_image_mailbox),
    Mailchimp(R.drawable.token_image_mailchimp),
    Mailcow(R.drawable.token_image_mailcow),
    Mailgun(R.drawable.token_image_mailgun),


import matplotlib.pyplot as plt

# Função auxiliar para ler valores de um .txt
def ler_valores(caminho_arquivo):
    with open(caminho_arquivo, "r") as f:
        return [float(linha.strip()) for linha in f.readlines()]

# Lê os dados de cada configuração
valores1 = ler_valores("saida_boxplot_1.txt")
valores2 = ler_valores("saida_boxplot_2.txt")

# Junta as listas em uma lista de listas
dados = [valores1, valores2]

# Cria o boxplot comparando as configurações
fig, ax = plt.subplots()
box = ax.boxplot(dados,
                 patch_artist=True,
                 showmeans=False,
                 showcaps=True,
                 showfliers=False,
                 widths=0.6)

# Cores para distinguir
cores = ['orange', 'skyblue']
for patch, cor in zip(box['boxes'], cores):
    patch.set_facecolor(cor)

# Personalização dos eixos
ax.set_xticklabels(["51 cidades, i=51000", "100 cidades, i=100000"])
ax.set_ylabel("Resultado Final do Algoritmo")
ax.set_title("Resultado após Configuração Inicial")

plt.tight_layout()
plt.savefig("comparacao_boxplot.png", dpi=300, bbox_inches='tight')
plt.show()


@field metalnessFactor number
--- @field color math.Vector4
--- @field roughnessFactor number
--- @field alphaCutoff number
--- @field alphaMode AlphaMode
--- @field flags pragma::ShaderGameWorldLightingPass::MaterialFlags
--- @field emissionFactor math.Vector4
--- @field glowScale number
--- @field parallaxHeightScale number
--- @field alphaDiscardThreshold number
shader.Glow.MaterialData = {}

---
--- @class shader.VertexAttribute
--- @field offset int
--- @field format int
--- @field location int
--- @overload fun(arg1: int):shader.VertexAttribute
--- @overload fun(arg1: int, arg2: int):shader.VertexAttribute
--- @overload fun(arg1: int, arg2: int, arg3: int):shader.VertexAttribute
--- @overload fun():shader.VertexAttribute
shader.VertexAttribute = {}

---
--- @class shader.DescriptorSetInfo
--- @field setIndex int
--- @overload fun(arg1: any):shader.DescriptorSetInfo
--- @overload fun(arg1: any, arg2: int):shader.DescriptorSetInfo
--- @overload fun():shader.DescriptorSetInfo
shader.DescriptorSetInfo = {}


o _print(i,v); end

    _print ('SCANSELECT * FROM logical_test_fk');
    local t     = scanselect('*', 'logical_test_fk');
    for i,v in ipairs(t) do _print(i,v); end
    _print ('SCANSELECT * FROM logical_test_fk WHERE count = 33');
    local t     = scanselect('*', 'logical_test_fk', 'count = 33');
    for i,v in ipairs(t) do _print(i,v); end

    -- UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE
    -- UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE
    _print ('UPDATE logical_test_fk SET count = 99 WHERE fk=4')
    local t     = update('logical_test_fk', 'count = 99', 'fk=4');
    _print (t);
    _print ('SCANSELECT * FROM logical_test_fk');
    local t     = scanselect('*', 'logical_test_fk');
    for i,v in ipairs(t) do _print(i,v); end

    -- DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE
    -- DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE
    _print ('DELETE FROM logical_test_fk WHERE fk=5')
    local t     = delete('logical_test_fk', 'fk=5');
    _print (t);
    _print ('SCANSELECT * FROM logical_test_fk');
    local t     = scanselect('*', 'logical_test_fk');
    for i,v in ipairs(t) do _print(i,v); end

    -- DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP
    -- DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP DUMP
    _print ('DUMP logical_test_fk');
    local t     = dump('logical_test_fk');
    for i,v in ipairs(t) do _print(i,v); end

    _print ('DUMP logical_test_fk TO MYSQL');
    local t     = dump_to_mysql('logical_test_fk', 'mysql_logical_test_fk');
    for i,v in ipairs(t) do _print(i,v); end

    _print ('DUMP logical_test_fk TO FILE /tmp/DUMP_logical_test_fk.txt');
    local t     = dump_to_file('logical_test_fk', '/tmp/DUMP_logical_test_fk.txt');
    for i,v in ipairs(t) do _print(i,v); end

    -- DROP_INDEX DROP_INDEX DROP_INDEX DROP_INDEX DROP_INDEX
    -- DROP_INDEX DROP_INDEX DROP_INDEX DROP_INDEX DROP_INDEX
    local t     = drop_index('ind_ltestfk');
    _print (t);

    if is_external.yes == 1 then
        return "FINISHED";
    else
        return is_external.output;
    end
end

if is_external.yes == 1 then
    basic_test();
end


t = f"System restart in {remaining} second."

            countdown_surface = bottom_font.render(countdown_text, True, text_color)
            countdown_rect = countdown_surface.get_rect(center=(screen_width // 2, screen_height - 20))
            screen.blit(countdown_surface, countdown_rect)
            '''

            # After THANK_YOU_DURATION seconds, return to Waiting Mode and reset session data
            if time.time() - thank_you_start_time >= THANK_YOU_DURATION:
                mode = WAITING_MODE
                last_sentence_time = time.time()
                current_sentence = random.choice(SENTENCES)
                # Reset session data for next session
                #session_q_and_a = []
                #qr_surface = None

        # ---------------- Draw the Fixed Prompt at the Bottom ----------------
        if mode==WAITING_MODE:
            prompt_text = ""
        elif mode==INPUT_MODE:
            prompt_text = ""
        elif mode==QUESTION_MODE:
            prompt_text = ""
        elif mode==THANK_YOU_MODE:
            prompt_text = ""
        prompt_surface = bottom_font.render(prompt_text, True, text_color)
        prompt_rect = prompt_surface.get_rect(midbottom=(screen_width // 2, screen_height - 10))
        screen.blit(prompt_surface, prompt_rect)

        # ---------------- Update Display and Tick the Clock ----------------
        pygame.display.flip()
        clock.tick(30)  # Limit to 30 FPS

    pygame.quit()

def append_to_file(filename, text):
    """
    Appends the given text to the specified file, followed by a newline.
    """
    with open(filename, "a", encoding="utf-8") as f:
        f.write(text + "\n")

if __name__=="__main__":
    main()


5] = {
			name				= "BredaSafat03",
			maxAngleDif			= 10,
			slaveTo				= 1,
		},
		[6] = {	-- this is in rear defence turret
			name				= "mg13113mm",
			maxAngleDif			= 50,
			mainDir				= [[0 0 -1]],
		},
		[7] = {
			name				= "mg13113mm",
			maxAngleDif			= 50,
			mainDir				= [[0 0 -1]],
		},
	},
}

local HUN_Me210_attack = AttackFighter:New(HUN_Me210_base):New{
	name			= "Me 210Ca-1 ground attack",
	description		= "Ground attack aircraft",
	cruisealt		= 1500,
	maxVelocity			= 19,
	customParams = {
		maxammo				= 12,
	},

	weapons = {
		[1] = {	-- Pretend this is Bofors 40mm with AP ammo
			name				= "bk37mmap",
			maxAngleDif			= 10,
			mainDir				= [[0 0 9]],
		},
		[2] = {
			name				= "MG15120mm",
			maxAngleDif			= 10,
		},
		[3] = {
			name				= "MG15120mm",
			maxAngleDif			= 10,
			slaveTo				= 1,
		},
		[4] = {	-- Pretend this is MG17
			name				= "BredaSafat03",
			maxAngleDif			= 10,
			slaveTo				= 1,
		},
		[5] = {
			name				= "BredaSafat03",
			maxAngleDif			= 10,
			slaveTo				= 1,
		},
		[6] = {	-- this is in rear defence turret
			name				= "mg13113mm",
			maxAngleDif			= 50,
			mainDir				= [[0 0 -1]],
		},
		[7] = {
			name				= "mg13113mm",
			maxAngleDif			= 50,
			mainDir				= [[0 0 -1]],
		},
		[8] = {
			name	= "NebelAir",
			maxAngleDif = 30,
		},
		[9] = {
			name	= "NebelAir",
			maxAngleDif = 30,
			slaveTo = 8,
		},
	},
}

return lowerkeys({
	["HUNMe210"] = HUN_Me210,
	["HUNMe210_bomber"] = HUN_Me210_Bomber,
	["HUNMe210_attack"] = HUN_Me210_attack,
})


details, please refer to the papers listed below.

m(x) = Encode(m) where m ∈ 𝔹

The [3_ckks_bit_bootstrapping.cu](3_ckks_bit_bootstrapping.cu) provides a basic example of `Bit` bootstrapping with a polynomial degree of 4096.

#### [CKKS Gate Bootstrapping](4_ckks_gate_bootstrapping.cu)

CKKS `Gate` Bootstrapping is quite similar to `Bit` Bootstrapping, but instead of EvalfBinboot, it uses EvalfGateboot. For correct functionality, just like in `Bit` Bootstrapping, a specific condition must be met: the last modulus(q) must be exatly three times the value of delta(Δ); otherwise, it will fail. Unlike other bootstrapping types, `Gate` Bootstrapping does not require an extra level to continue operations after bootstrapping. This is because it applies the logic operation directly during the bootstrapping process, similar to how it is done in `TFHE`. For a comprehensive explanation and technical details, please refer to the papers listed below.

m(x) = Encode(m) where m ∈ 𝔹

The [4_ckks_gate_bootstrapping.cu](4_ckks_gate_bootstrapping.cu) provides a basic example of `Bit` bootstrapping with a polynomial degree of 4096.

All logic gate can be applied with CKKS `Gate` Bootstrapping:
- AND_boot - NAND_boot
- OR_boot - NOR_boot
- XOR_boot - XNOR_boot

### Implementation Details

`CKKS` bootstrapping primarily consists of four main stages: `Mod Raise`, `Coeff to Slot`, `Approximate Modular Reduction`, and `Slot to Coeff`. Among these, `Coeff to Slot` is the most time-consuming part of the bootstrapping. `Coeff to Slot` and `Slot to Coeff` stages primarily involve matrix multiplication, which can be accelerated using the BSGS method. However, HEonGPU employs the most optimized approach described in the [Faster Homomorphic Discrete Fourier Transforms and Improved FHE Bootstrapping](https://eprint.iacr.org/2018/1073.pdf) paper, significantly minimizing both the number of multiplications and rotations. Moreover, HEonGPU does not use sparse packing as described in the [Bootstrapping for Approximate Homomorphic Encryption](https://eprint.iacr.org/2018/153.pdf) paper; instead, it utilizes all slots of CKKS.

Homomorphic operation number and depth consume for homomorphic DFT(from [paper](https://eprint.iacr.org/2018/1073.pdf)):

|                  | Naive       | BSGS        | Ours with radix r   | Hybrid with radix r   |
|:----------------:|:-----------:|:-----------:|:-------------------:|:---------------------:|
| # Hadamard Mult  | O(n)    | O(n)   | O(r logr n)  | O(r logr n)    |
| # Slot Shifting  | O(n)   | O(√n)| O(r logr n)| O(√r logr n)|
| Depth            | 1           | 1           | O(logr n)    | O(logr n)      |

Although this method results in higher depth consumption in stages `Coeff to Slot` and `Slot to Coeff` compared to Naive and BSGS approaches, it provides a significant performance improvement. The HEonGPU `BootstrappingConfig` class allows selecting the level loss for operations in stages `Coeff to Slot` and `Slot to Coeff` (currently limited to 2, 3, 4, or 5).

Additionally, the `BootstrappingConfig` class allows specifying the number of galois keys to be used for


:    [][]int32{{10}, {160}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] NO-BREAK SPACE (GL) ÷ [0.3]",
		},
		{
			inputString: "\n \u00a0",
			segments:    [][]int32{{10}, {32}, {160}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] SPACE (SP) ÷ [18.0] NO-BREAK SPACE (GL) ÷ [0.3]",
		},
		{
			inputString: "\n̈\u00a0",
			segments:    [][]int32{{10}, {776, 160}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] COMBINING DIAERESIS (CM1_CM) × [12.2] NO-BREAK SPACE (GL) ÷ [0.3]",
		},
		{
			inputString: "\n̈ \u00a0",
			segments:    [][]int32{{10}, {776, 32}, {160}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] NO-BREAK SPACE (GL) ÷ [0.3]",
		},
		{
			inputString: "\n가",
			segments:    [][]int32{{10}, {44032}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] HANGUL SYLLABLE GA (H2) ÷ [0.3]",
		},
		{
			inputString: "\n 가",
			segments:    [][]int32{{10}, {32}, {44032}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] SPACE (SP) ÷ [18.0] HANGUL SYLLABLE GA (H2) ÷ [0.3]",
		},
		{
			inputString: "\n̈가",
			segments:    [][]int32{{10}, {776}, {44032}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] HANGUL SYLLABLE GA (H2) ÷ [0.3]",
		},
		{
			inputString: "\n̈ 가",
			segments:    [][]int32{{10}, {776, 32}, {44032}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] HANGUL SYLLABLE GA (H2) ÷ [0.3]",
		},
		{
			inputString: "\n각",
			segments:    [][]int32{{10}, {44033}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] HANGUL SYLLABLE GAG (H3) ÷ [0.3]",
		},
		{
			inputString: "\n 각",
			segments:    [][]int32{{10}, {32}, {44033}},
			description: "× [0.3] <LINE FEED (LF)> (LF) ÷ [5.03] SPACE (SP) ÷ [18.0] HANGUL SYLLABLE GAG (H3) ÷ [0.3]",
		},
		{
			inputString: "\n̈각",
			segments:    [][]int32{{10}, {776}, {44033}},
			description: "× [0.3] <LINE FEED (LF)


mat = parentmdl:GetBoneMatrix(boneindex)
            if bonemat then
                bpos = bonemat:GetTranslation()
                bang = bonemat:GetAngles()
            end

            if !bang or !bpos then
                bang = selfang
                bpos = selfpos
            end

            -- local xpos, xang = wwWorldToLocal(bpos, bang, selfpos, selfang) -- bone cache
            -- self.BonePosCache[bone] = {xpos, xang, CurTime() + 1}
        -- end
    elseif custompos then
        bpos = custompos
        bang = customang or a0
    end

    local cust = self:GetCustomize()
    local possiblecache = self.AttPosCache[slottbl.Address] -- att pos cache
    if !cust and possiblecache then
        if (possiblecache[4] or 0) > CurTime() then
            local qpos, qang = llLocalToWorld(possiblecache[1], possiblecache[2], bpos, bang)
            return qpos, qang, possiblecache[3]
        end
    end

    if slottbl.OriginalAddress then
        local eles = self:GetAttachmentElements()

        for _, ele in ipairs(eles) do
            local mods = ele.AttPosMods or {}

            if mods[slottbl.OriginalAddress] then
                offset_pos = mods[slottbl.OriginalAddress].Pos or offset_pos
                offset_ang = mods[slottbl.OriginalAddress].Ang or offset_ang
                icon_offset = mods[slottbl.OriginalAddress].Icon_Offset or icon_offset
            end
        end
    end

    if wm then
        offset_pos = offset_pos * (self.WorldModelOffset.Scale or 1)
    end

    local apos, aang

    aang = Angle()
    aang:Set(bang)

    apos = bpos + aang:Forward() * offset_pos.x

    apos = apos + aang:Right() * offset_pos.y

    apos = apos + aang:Up() * offset_pos.z

    if !nomodeloffset then
        offset_ang = offset_ang + (atttbl.ModelAngleOffset or a0)
    end

    aang:Set(bang)

    local forward = aang:Forward()
    local right = aang:Right()
    local up = aang:Up()

    aang:RotateAroundAxis(forward, offset_ang.r)
    aang:RotateAroundAxis(right, offset_ang.p)
    aang:RotateAroundAxis(up, offset_ang.y)

    if !nomodeloffset then
        local moffset = (atttbl.ModelOffset or v0) * (slottbl.Scale or 1)
        if wm then
            moffset = moffset * (self.WorldModelOffset.Scale or 1)
        end

        apos = apos + aang:Forward() * moffset.x
        apos = apos + aang:Right() * moffset.y
        apos = apos + aang:Up() * moffset.z
    end

    if idle then
        SafeRemoveEntity(parentmdl)
    end

    local data = {
        pos = apos,
        ang = aang,
        atttbl = atttbl,
        slottbl = slottbl,
    }

    data = self:RunHook("Hook_GetAttachmentPos", data) or data

    apos = data.pos or apos
    aang = data.ang or aang

    if slottbl.Address and !cust then -- att pos cache
        local ypos, yang = wwWorldToLocal(apos, aang, bpos, bang)
        self.AttPosCache[slottbl.Address] = {ypos, yang, icon_offset, CurTime() + 5}
    end

    return apos, aang, icon_offset
end

function SWEP:CreateAttachmentModel(wm, atttbl, slottbl, ignorescale, cm)
    ignorescale = ignorescale or false

    local model = atttbl.Model

    if wm and atttbl.


t to set the scaling factor according to the stream gain
 * @param use_title MPC_TRUE : uses the title gain, MPC_FALSE : uses the album gain
 * @param clip_prevention MPC_TRUE : uses cliping prevention
 */
MPC_API void mpc_set_replay_level(mpc_demux * d, float level, mpc_bool_t use_gain,
                          mpc_bool_t use_title, mpc_bool_t clip_prevention);
/// decode frame
MPC_API mpc_status mpc_demux_decode(mpc_demux * d, mpc_frame_info * i);
/// get streaminfo
MPC_API void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i);
/// seeks to a given sample
MPC_API mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample);
/// seeks to a given second
MPC_API mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds);

/// \return the current position in the stream (in bits) from the beginning of the file
MPC_API mpc_seek_t mpc_demux_pos(mpc_demux * d);

/// chapters : only for sv8 streams
/**
 * Gets the number of chapters in the stream
 * @param d pointer to a musepack demuxer
 * @return the number of chapters found in the stream
 */
MPC_API mpc_int_t mpc_demux_chap_nb(mpc_demux * d);
/**
 * Gets datas associated to a given chapter
 * The chapter tag is an APEv2 tag without the preamble
 * @param d pointer to a musepack demuxer
 * @param chap_nb chapter number you want datas (from 0 to mpc_demux_chap_nb(d) - 1)
 * @return the chapter information structure
 */
MPC_API mpc_chap_info const * mpc_demux_chap(mpc_demux * d, int chap_nb);

#ifdef __cplusplus
}
#endif
#endif


a6',1,'glm::GLM_ALIGNED_TYPEDEF(uint8, aligned_uint8, 1)'],['../a00364.html#ga06c296c9e398b294c8c9dd2a7693dcbb',1,'glm::GLM_ALIGNED_TYPEDEF(uint16, aligned_uint16, 2)'],['../a00364.html#gacf1744488c96ebd33c9f36ad33b2010a',1,'glm::GLM_ALIGNED_TYPEDEF(uint32, aligned_uint32, 4)'],['../a00364.html#ga3328061a64c20ba59d5f9da24c2cd059',1,'glm::GLM_ALIGNED_TYPEDEF(uint64, aligned_uint64, 8)'],['../a00364.html#gaf6ced36f13bae57f377bafa6f5fcc299',1,'glm::GLM_ALIGNED_TYPEDEF(uint8_t, aligned_uint8_t, 1)'],['../a00364.html#gafbc7fb7847bfc78a339d1d371c915c73',1,'glm::GLM_ALIGNED_TYPEDEF(uint16_t, aligned_uint16_t, 2)'],['../a00364.html#gaa86bc56a73fd8120b1121b5f5e6245ae',1,'glm::GLM_ALIGNED_TYPEDEF(uint32_t, aligned_uint32_t, 4)'],['../a00364.html#ga68c0b9e669060d0eb5ab8c3ddeb483d8',1,'glm::GLM_ALIGNED_TYPEDEF(uint64_t, aligned_uint64_t, 8)'],['../a00364.html#ga4f3bab577daf3343e99cc005134bce86',1,'glm::GLM_ALIGNED_TYPEDEF(u8, aligned_u8, 1)'],['../a00364.html#ga13a2391339d0790d43b76d00a7611c4f',1,'glm::GLM_ALIGNED_TYPEDEF(u16, aligned_u16, 2)'],['../a00364.html#ga197570e03acbc3d18ab698e342971e8f',1,'glm::GLM_ALIGNED_TYPEDEF(u32, aligned_u32, 4)'],['../a00364.html#ga0f033b21e145a1faa32c62ede5878993',1,'glm::GLM_ALIGNED_TYPEDEF(u64, aligned_u64, 8)'],['../a00364.html#ga509af83527f5cd512e9a7873590663aa',1,'glm::GLM_ALIGNED_TYPEDEF(uvec1, aligned_uvec1, 4)'],['../a00364.html#ga94e86186978c502c6dc0c0d9c4a30679',1,'glm::GLM_ALIGNED_TYPEDEF(uvec2, aligned_uvec2, 8)'],['../a00364.html#ga5cec574686a7f3c8ed24bb195c5e2d0a',1,'glm::GLM_ALIGNED_TYPEDEF(uvec3, aligned_uvec3, 16)'],['../a00364.html#ga47edfdcee9c89b1ebdaf20450323b1d4',1,'glm::GLM_ALIGNED_TYPEDEF(uvec4, aligned_uvec4, 16)'],['../a00364.html#ga5611d6718e3a00096918a64192e73a45',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec1, aligned_u8vec1, 1)'],['../a00364.html#ga19837e6f72b60d994a805ef564c6c326',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec2,


    %mm1,%mm0
	paddq           (%eax),%mm0
	paddq           %xmm1,%xmm0
	paddq           (%eax),%xmm0
	psubq           %mm1,%mm0
	psubq           (%eax),%mm0
	psubq           %xmm1,%xmm0
	psubq           (%eax),%xmm0