l]); trail--);
  }

  return str.slice(lead, trail + 1)
}

module.exports = {
  dataURLProcessor,
  URLSerializer,
  collectASequenceOfCodePoints,
  collectASequenceOfCodePointsFast,
  stringPercentDecode,
  parseMIMEType,
  collectAnHTTPQuotedString,
  serializeAMimeType
}

/***/ }),

/***/ 8511:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

"use strict";

const { Blob, File: NativeFile } = __nccwpck_require__(4300)
const { types } = __nccwpck_require__(3837)
const { kState } = __nccwpck_require__(5861)
const { isBlobLike } = __nccwpck_require__(2538)
const { webidl } = __nccwpck_require__(1744)
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
const { kEnumerableProperty } = __nccwpck_require__(3983)
const encoder = new TextEncoder()

class File extends Blob {
  constructor (fileBits, fileName, options = {}) {
    // The File constructor is invoked with two or three parameters, depending
    // on whether the optional dictionary parameter is used. When the File()
    // constructor is invoked, user agents must run the following steps:
    webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' })

    fileBits = webidl.converters['sequence<BlobPart>'](fileBits)
    fileName = webidl.converters.USVString(fileName)
    options = webidl.converters.FilePropertyBag(options)

    // 1. Let bytes be the result of processing blob parts given fileBits and
    // options.
    // Note: Blob handles this for us

    // 2. Let n be the fileName argument to the constructor.
    const n = fileName

    // 3. Process FilePropertyBag dictionary argument by running the following
    // substeps:

    //    1. If the type member is provided and is not the empty string, let t
    //    be set to the type dictionary member. If t contains any characters
    //    outside the range U+0020 to U+007E, then set t to the empty string
    //    and return from these substeps.
    //    2. Convert every character in t to ASCII lowercase.
    let t = options.type
    let d

    // eslint-disable-next-line no-labels
    substep: {
      if (t) {
        t = parseMIMEType(t)

        if (t === 'failure') {
          t = ''
          // eslint-disable-next-line no-labels
          break substep
        }

        t = serializeAMimeType(t).toLowerCase()
      }

      //    3. If the lastModified member is provided, let d be set to the
      //    lastModified dictionary member. If it is not provided, set d to the
      //    current date and time represented as the number of milliseconds since
      //    the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).
      d = options.lastModified
    }

    // 4. Return a new File object F such that:
    // F refers to the bytes byte sequence.
    // F.size is set to the number of total bytes in bytes.
    // F.name is set to n.
    // F.type is set to t.
    // F.lastModified is set to d.

    super(processBlobParts(fileBits, options), { type: t })
    this[kState] = {
      name: n,
      lastModified: d,
      type: t
    }
  }

  get name () {
    webidl.brandCheck(this, File)

    return this[kState].name
  }

  get lastModified


opacity="0.6"/>
            <rect x="203.25" y="261" width="2.5" height="3.75" fill="#015530" fill-opacity="0.6"/>
            <rect x="220.75" y="267.25" width="3.75" height="3.75" fill="#F4F3EC"/>
            <rect x="220.75" y="274.75" width="3.75" height="3.75" fill="#F4F3EC"/>
            <rect x="220.75" y="271" width="3.75" height="3.75" fill="#E7BEAA"/>
            <rect x="217" y="271" width="3.75" height="3.75" fill="#F4F3EC"/>
            <rect x="224.5" y="271" width="3.75" height="3.75" fill="#F4F3EC"/>
            <path fill-rule="evenodd" clip-rule="evenodd" d="M439.5 69H437V79H434.5V90.25H432V87.75H429.5V90.25H427V87.75H424.5V92.75H427V95.25H429.5V92.75H432H434.5V95.25H437V92.75H439.5V95.25H442V97.75H444.5H447V100.25H449.5H452V102.75H454.5V100.25H457V97.75H459.5H462V92.75H464.5V95.25H467H469.5V87.75H467V85.25H464.5V80.25H462V82.75H459.5V75.25H457V77.75H454.5H452V75.25H449.5V80.25H447V77.75H444.5V85.25H442V90.25H439.5V69ZM444.5 85.25H447V87.75H444.5V85.25ZM467 87.75V90.25H464.5V87.75H467ZM454.5 85.25V80.25H457V85.25H454.5ZM432 76.5H429.5V81.5H427V85.25H429.5V84H432V76.5ZM413.25 84H415.75V86.5H418.25V89H420.75V95.25H418.25V92.75H415.75H413.25H410.75H408.25V86.5H410.75V89H413.25V84ZM437 97.75H439.5V100.25H437V97.75ZM439.5 100.25H442H444.5V102.75H442V105.25H439.5V100.25ZM472 90.25H474.5V87.75H477V85.25H479.5V90.25H482V87.75H484.5V92.75H482H479.5H477H474.5V95.25H472V90.25ZM394.5 121.5H392V126.5H394.5V129H397V126.5H399.5H402V129H404.5V126.5H407V129H409.5V131.5H412H414.5V134H417H419.5V136.5H422V134H424.5V131.5H427H429.5V126.5H432V129H434.5H437V121.5H434.5V119H432V114H429.5V116.5H427V109H424.5V111.5H422H419.5V109H417V114H414.5V111.5H412V119H409.5V124H407V110.25H404.5V112.75H402V124H399.5V121.5H397V124H394.5V121.5ZM412 121.5H414.5V119H412V121.5ZM434.5 121.5H432V124H434.5V121.5ZM397 110.25H399.5V117.75H397V119H394.5V115.25H397V110.25ZM407 131.5H404.5V134H407V139H409.5V136.5H412V134H409.5H407V131.5ZM424


相邻重复字符的过程。对于每个字符，我们将其与栈顶元素比较，如果相同，则将栈顶元素出栈，表示删除这对相邻重复字符；如果不同，则将当前字符入栈。

解题步骤如下：

1. 创建一个栈`stack`，用于模拟删除相邻重复字符的过程。

2. 遍历字符串`S`中的每个字符，并执行以下操作：

   - 如果栈为空或当前字符与栈顶元素不同，则将当前字符入栈。

   - 如果当前字符与栈顶元素相同，则将栈顶元素出栈。

3. 遍历完整个字符串后，栈中剩余的字符即为最终结果。

4. 将栈中的字符按照出栈的顺序组合成字符串，并返回最终结果。

## **JavaScript解题框架：**

```javascript
function removeDuplicates(S) {
  let stack = new Stack();

  for (let i = 0; i < S.length; i++) {
    let char = S.charAt(i);

    if (stack.isEmpty() || char !== stack.peek()) {
      stack.push(char);
    } else {
      stack.pop();
    }
  }

  let result = '';
  while (!stack.isEmpty()) {
    result = stack.pop() + result;
  }

  return result;
}
```

在这个框架中，我们首先定义了一个栈类`Stack`，其中包含了常用的栈操作方法。然后，我们使用栈来删除字符串中的所有相邻重复项。

在`removeDuplicates`函数中，我们遍历字符串`S`，并使用栈来模拟删除相邻重复字符的过程。对于每个字符，我们将其与栈顶元素比较，如果相同，则将栈顶元素出栈，表示删除这对相邻重复字符；如果不同，则将当前字符入栈。# 拓扑排序

在计算机科学领域，有向图的拓扑排序（Topological Sort）是对其顶点的一种线性排序，使得对于每条有向边 `(u, v)`，顶点 `u` 在排序中都出现在顶点 `v` 之前。

例如，图中的顶点可以表示要执行的任务，而边表示一个任务必须在另一个任务之前执行的约束；在这种应用中，拓扑排序就是任务的有效顺序。

只有当图没有有向环时，即为[有向无环图](https://en.wikipedia.org/wiki/Directed_acyclic_graph)（DAG），才可能存在拓扑排序。任何DAG都至少有一个拓扑排序，而且已知的算法可以在线性时间内构造任何DAG的拓扑排序。

![有向无环图](https://upload.wikimedia.org/wikipedia/commons/c/c6/Topological_Ordering.svg)

有向无环图的拓扑排序：每条边从排序中的较早顶点（左上）指向较后�


            });

    }

    private pushRooms(roomsFromservice: Array<RoomInfo>) {
        for(var i = 0;i<roomsFromservice.length;i++)
        {
            this._rooms.push(roomsFromservice[i]);
        }
     }

    private onDataLoaded() {
        this.filter();
        this.set('isLoading',false);
    }

    get rooms():Array<RoomInfo>{
        return this._rooms;
    }

    get isLoading(): boolean {
        return this._isLoading;
    }
    set isLoading(value: boolean) {
        this._isLoading = value;
        this.notify({ object: this, eventName: Observable.propertyChangeEvent, propertyName: 'isLoading', value: this._isLoading });
    }

    private filter() {
        var index= this._rooms.findIndex(x=>x.roomId == this._addedRoom);
        if(index >=0)
        {
            this._rooms.splice(index,1);

            console.log(this._rooms.length);
            this.notify({object: this, eventName: Observable.propertyChangeEvent, propertyName: 'rooms', value: this._rooms});

        }

    }
}import LocalStorageUtil from "../../utils/LocalStorageUtil";

describe("LocalStorageUtil", () => {
  beforeEach(() => {
    window.localStorage.clear();
  });

  describe("#get", () => {
    it("gets value from localStorage", () => {
      window.localStorage.setItem("foo", "bar");
      expect(LocalStorageUtil.get("foo")).toEqual("bar");
    });

    it("does not mutate", () => {
      window.localStorage.setItem("foo", "bar");
      LocalStorageUtil.get("foo");

      expect(LocalStorageUtil.get("foo")).toEqual("bar");
    });
  });

  describe("#set", () => {
    it("gets value from localStorage", () => {
      LocalStorageUtil.set("foo", "bar");
      expect(LocalStorageUtil.get("foo")).toEqual("bar");
    });
  });
});
import { useCallback, useLayoutEffect, useRef } from 'react';

export function useIsUnmounted() {
  const rIsUnmounted = useRef<'mounting' | 'mounted' | 'unmounted'>('mounting');

  useLayoutEffect(() => {
    rIsUnmounted.current = 'mounted';
    return () => {
      rIsUnmounted.current = 'unmounted';
    };
  }, []);

  return useCallback(() => rIsUnmounted.current !== 'mounted', []);
}
import { KonvaEventObject } from "konva/lib/Node";
import { LineConfig } from "konva/lib/shapes/Line";

// I was running into issues with the server having a different import
// path for the same "LineFig" type, so I'm creating this alias that everything
// should point to so it's all the same. Importing types from the front end in my
// server hasn't been an issue at all (I think because it all gets ignored when compiled)
export type LineFig = LineConfig;

export type KMouse =
  | KonvaEventObject<MouseEvent>
  | KonvaEventObject<TouchEvent>;

export interface Point {
  x: number;
  y: number;
}

// Very explicit and readable way to explain what I'm tracking and what it means
export interface DrawState {
  drawing: boolean;
  name: string;
  index?: number;
}
export interface DrawTracker {
  me: DrawState;
  [userId: string]: DrawState;
}

export const CONN_HOST =
  process.env.NODE_ENV === "development"
    ? "http://localhost:8001"
    : "https://sockets.connorjamesallen.com";

export interface DrawEmits {
  "join-room": (room: stri


RCH64_GLOB_DAT, 1025)

 /* Create PLT entry.  */
RELOC_NUMBER (R_AARCH64_JUMP_SLOT, 1026)

/* Adjust by program base.  */
RELOC_NUMBER (R_AARCH64_RELATIVE, 1027)
RELOC_NUMBER (R_AARCH64_TLS_DTPMOD64, 1028)
RELOC_NUMBER (R_AARCH64_TLS_DTPREL64, 1029)
RELOC_NUMBER (R_AARCH64_TLS_TPREL64, 1030)
/* Aliasing relocs are guarded by RELOC_MACROS_GEN_FUNC
   so that readelf.c won't generate duplicated case
   statements.  */
#ifndef RELOC_MACROS_GEN_FUNC
RELOC_NUMBER (R_AARCH64_TLS_DTPMOD, 1028)
RELOC_NUMBER (R_AARCH64_TLS_DTPREL, 1029)
RELOC_NUMBER (R_AARCH64_TLS_TPREL, 1030)
#endif
RELOC_NUMBER (R_AARCH64_TLSDESC, 1031)
RELOC_NUMBER (R_AARCH64_IRELATIVE, 1032)

END_RELOC_NUMBERS (R_AARCH64_end)

#endif /* _ELF_AARCH64_H */


/* Vector optimized 32/64 bit S/390 version of strchr.
   Copyright (C) 2015-2017 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

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

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

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

#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)

# include "sysdep.h"
# include "asm-syntax.h"

	.text

/* char *strchr (const char *s, int c)
   Locate character in string.

   Register usage:
   -r1=tmp
   -r2=s
   -r3=c
   -r4=tmp
   -r5=current_len
   -v16=part of s
   -v17=index of unequal
   -v18=replicated c
*/
ENTRY(__strchr_vx)
	.machine "z13"
	.machinemode "zarch_nohighgprs"

	vlbb	%v16,0(%r2),6	/* Load s until next 4k-byte boundary.  */
	lcbb	%r1,0(%r2),6	/* Get bytes to 4k-byte boundary or 16.  */

	lghi	%r5,0		/* current_len = 0.  */

	vlvgb	%v18,%r3,0	/* Generate vector which elements are all c.
				   If c


Task_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_DEF), 0x1, 0x0, 0x10, 0x33ed	@ green bg pal
BloomDoomEnding:
	call BloomDoomPetalBlast
	waitforvisualfinish
	clearmonbg ANIM_ATTACKER
	call ResetFromGreenScreen
	end
BloomDoomFadeScreenTargetPartner:
	createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_ATK_PARTNER), 0x1, 0x0, 0x10, 0x33ed	@ green bg pal
	goto BloomDoomEnding
BloomDoomHurricane:
	createsprite gBloomDoomHurricaneSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0
	createvisualtask AnimTask_AnimateGustTornadoPalette, 0x5, 0x1, 0x46
	return
BloomDoomFlowerGeyser:
	createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xfffc, 0x10	@ -4, -0x10
	delay 0x0
	createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x100D, 0x10
	delay 0x0
	createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x4, 0x10
	delay 0x0
	createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xfff0, 0x10
	delay 0x0
	return
BloomDoomHyperBeam:
	createsprite gBloomDoomGreenBeamSpriteTemplate, ANIM_TARGET, 2
	createsprite gBloomDoomGreenBeamSpriteTemplate, ANIM_TARGET, 2
	delay 0x1
	return
BloomDoomPetalBlast:
	playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER
	createsprite gBloomDoomExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1
	createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xffe0, 0x10
	delay 0x2
	createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x16, 0xffea, 0x10
	delay 0x2
	createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x1e, 0x0, 0x10
	delay 0x2
	playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER
	createsprite gBloomDoomExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1
	createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x14, 0x14, 0x10
	delay 0x2
	createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x1c, 0x10
	delay 0x2
	createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffed, 0x13, 0x10
	delay 0x2
	playsewithpan SE_M_EXPLOSION, SOUND_PAN_


nt Size"] < 14) ? -1 : -2) + "px}}body,.prev span::after,.prev form::after,.next span::after,.next form::after,.pages a,#qr input.field,#qr:not(.sjis-preview) textarea.field,#qr span.field,#qr-file-button,#qr input[type=submit],#qr select[data-name=thread],#menu .entry,#boardList,#shortcuts,#index-search,#tegaki,select,input,div.next,form.pageSwitcherForm>input[type=submit]{font-family:" + $SS.formatFont($SS.conf["Font Family"]) + ";font-size:" + $SS.conf["Font Size"] + "px!important}#full-board-list a,#custom-board-list,a.qr-link{font-family:" + $SS.formatFont($SS.conf["Font Family"]) + "!important;font-size:" + $SS.conf["Font Size"] + "px!important}#qr .field::-moz-placeholder,::-moz-placeholder{font-family:" + $SS.formatFont($SS.conf["Font Family"]) + "!important;font-size:" + $SS.conf["Font Size"] + "px!important}#qr .field::webkit-input-placeholder,::webkit-input-placeholder{font-family:" + $SS.formatFont($SS.conf["Font Family"]) + "!important;font-size:" + $SS.conf["Font Size"] + "px!important}.backlink{font-size:" + $SS.conf["Backlink Font Size"] + "px!important}:root.info-on-hover .postNum{font-size:0!important}:root.info-on-hover .postContainer:hover .postNum{font-size:" + $SS.conf["Font Size"] + "px!important}#qr-file-button,#qr input[type=submit],#qr label,.captcha-counter{font-size:" + (($SS.conf["Font Size"] < 11) ? 8 : 10) + "px!important}#qr-file-button,#qr input[type=submit],#qr label,.captcha-counter{text-transform:uppercase}#qr label:not(.riceCheck){overflow:hidden;padding-bottom:2px}:root.underline-disabled a{text-decoration:none!important}.navLinks.navLinksBot.desktop a{text-decoration:underline}:root.underline-disabled .filtered{text-decoration:line-through!important}.deadlink.quotelink{text-decoration:none!important}:root.underline-quotes .deadlink.quotelink,:root.underline-quotes .quotelink,:root.underline-quotes .deadlink.backlink,:root.underline-quotes .backlink{text-decoration:underline!important}a.options-button,#oneechan-version a{text-decoration:none!important}.closed{text-align:center}.name,.subject,.option.header .option-title,a.current{font-weight:" + ($SS.conf["Bitmap Font"] ? 4 : 7) + "00!important}.qr-link{font-weight:400}.summary{font-style:" + ($SS.conf["Bitmap Font"] ? 'none' : 'italic') + "}#qr{box-shadow:none!important;border-radius:0!important;min-width:298px!important}#qr:not(:root.vertical-qr #qr) .move{min-width:302px}#qr .close{padding:2px 3px 2px 4px!important}#qr .riceCheck,#qr input[type=checkbox]{margin:0 4px 1px!important;vertical-align:baseline;position:relative;top:3px}#qr-filename-container .riceCheck,#qr-filename-container input[type=checkbox]{margin:0 0 1px!important}#qr-file-button,#qr input[type=submit]{height:25px!important;margin:0!important}#qr-file-button,#qr-filename-container:not(:root.fourchan-xt #qr-filename-container){margin-right:1px!important}#qr-spoiler-label+


][Self::LONG_MODE] is set,
        /// this must be unset. In 64-bit mode, ignored for data segments.
        const DEFAULT_SIZE      = 1 << 54;
        /// Limit field is scaled by 4096 bytes. In 64-bit mode, ignored for all segments.
        const GRANULARITY       = 1 << 55;

        /// Bits `0..=15` of the limit field (ignored in 64-bit mode)
        const LIMIT_0_15        = 0xFFFF;
        /// Bits `16..=19` of the limit field (ignored in 64-bit mode)
        const LIMIT_16_19       = 0xF << 48;
        /// Bits `0..=23` of the base field (ignored in 64-bit mode, except for fs and gs)
        const BASE_0_23         = 0xFF_FFFF << 16;
        /// Bits `24..=31` of the base field (ignored in 64-bit mode, except for fs and gs)
        const BASE_24_31        = 0xFF << 56;
    }
}

impl DescriptorFlags {
    const COMMON: Self = Self::from_bits_truncate(
        Self::USER_SEGMENT.bits()
            | Self::PRESENT.bits()
            | Self::WRITABLE.bits()
            | Self::ACCESSED.bits()
            | Self::LIMIT_0_15.bits()
            | Self::LIMIT_16_19.bits()
            | Self::GRANULARITY.bits(),
    );

    pub const KERNEL_DATA: Self =
        Self::from_bits_truncate(Self::COMMON.bits() | Self::DEFAULT_SIZE.bits());

    pub const KERNEL_CODE32: Self = Self::from_bits_truncate(
        Self::COMMON.bits() | Self::EXECUTABLE.bits() | Self::DEFAULT_SIZE.bits(),
    );

    pub const KERNEL_CODE64: Self = Self::from_bits_truncate(
        Self::COMMON.bits() | Self::EXECUTABLE.bits() | Self::LONG_MODE.bits(),
    );

    pub const USER_DATA: Self =
        Self::from_bits_truncate(Self::KERNEL_DATA.bits() | Self::DPL_RING_3.bits());

    pub const USER_CODE32: Self =
        Self::from_bits_truncate(Self::KERNEL_CODE32.bits() | Self::DPL_RING_3.bits());

    pub const USER_CODE64: Self =
        Self::from_bits_truncate(Self::KERNEL_CODE64.bits() | Self::DPL_RING_3.bits());
}

impl Descriptor {
    #[inline]
    pub const fn kernel_code_segment() -> Descriptor {
        Descriptor::UserSegment(DescriptorFlags::KERNEL_CODE64.bits())
    }

    #[inline]
    pub const fn kernel_data_segment() -> Descriptor {
        Descriptor::UserSegment(DescriptorFlags::KERNEL_DATA.bits())
    }

    #[inline]
    pub const fn user_data_segment() -> Descriptor {
        Descriptor::UserSegment(DescriptorFlags::USER_DATA.bits())
    }

    #[inline]
    pub const fn user_code_segment() -> Descriptor {
        Descriptor::UserSegment(DescriptorFlags::USER_CODE64.bits())
    }

    #[inline]
    pub fn tss_segment(tss: &'static crate::segmentation::TaskStateSegment) -> Descriptor {
        use self::DescriptorFlags as Flags;
        use core::mem::size_of;

        let ptr = tss as *const _ as u64;

        let mut low = Flags::PRESENT.bits();
        // base
        low.set_bits(16..40, ptr.get_bits(0..24));
        low.set_bits(56..64, ptr.get_bits(24..32));
        // limit (the `-1` in needed since the bound is inclusive)
        low.set_bits(0..16, (size_of::<crate::segmentation::TaskStateSegment>() - 1) as u64);
        // type (0b1001 = available 64-bit tss)
        low.set_bits(40..44, 0b1001);

        let mut high = 0;
        high.set_bits(0..32, ptr.get_bits(32..64));

        Descriptor::SystemSegment(low, high)
    }
}


ontent="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="002588.html">

[cxx-abi-dev] need mangling for string literals and lifetime-extended temporaries used in static constexpr member initializers and for string literals in constexpr functions

    Richard Smith
    <A HREF="mailto:cxx-abi-dev%40codesourcery.com?Subject=Re%3A%20%5Bcxx-abi-dev%5D%20need%20mangling%20for%20string%20literals%20and%0A%20lifetime-extended%20temporaries%20used%20in%20static%20constexpr%20member%20initializers%0A%20and%20for%20string%20literals%20in%20constexpr%20functions&In-Reply-To=%3CCAGL0aWch%2Bxdf6NPKUCiG_P7UFfyxz1UE1d78rcw36QJCtCk_tg%40mail.gmail.com%3E"
       TITLE="[cxx-abi-dev] need mangling for string literals and lifetime-extended temporaries used in static constexpr member initializers and for string literals in constexpr functions">richardsmith at google.com

    Thu May 30 00:48:55 UTC 2013

Previous message: [cxx-abi-dev] need mangling for string literals and lifetime-extended temporaries used in static constexpr member initializers and for string literals in constexpr functions

 Messages sorted by:
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]

On Fri, May 24, 2013 at 6:23 AM, Jason Merrill <jason at redhat.com> wrote:

> On 05/24/2013 01:23 AM, Richard Smith wrote:
>
>> So... this problem was not really new in C++11. In C++98 it can be
>> witnessed for an inline function such as:
>>
>> inline const char *get() {
>>    static const char *str = "foo";
>>    return str;
>> }
>>
>
> The ABI already deals with this case:
>
> ---
>
> Occasionally entities in local scopes must be mangled too (e.g. because
> inlining or template compilation causes multiple translation units to
> require access to that entity). The encoding for such entities is as
> follows:
>
>   <local-name> := Z <function encoding> E <entity name> [<discriminator>]
>                := Z <function encoding> E s [<discriminator>]
>
>   <


{
            let no_active_individuals = html! {

{"No active individuals found?"}

{"Can't find any active individual."}

{"Please, check in the `Settings` section if every individual is deactivated."}

                        <Link<LillaOstRoutes> classes="button is-success" to={LillaOstRoutes::Settings} >
                            {"Go to settings"}
                        </Link<LillaOstRoutes>>

            };
            return html! {

                    { no_active_individuals }

            };
        }
        html! {

                <QuickInsert />
                <SummaryFeeding />
                <SummaryExpulsions />

                    <EventListing page={self.page} />

        }
    }
}
// Copyright 2019 The Exonum Team
//
// 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.

use exonum::{
    crypto,
    messages::{AnyTx, Verified},
    runtime::{CallInfo, DispatcherError, ErrorMatch, ExecutionError},
};
use exonum_testkit::{TestKit, TestKitBuilder};

use crate::{
    error::Error,
    services::{
        AnyCall, AnyCallService, CallAny, DepositInterface, DepositService, TxIssue,
        WalletInterface, WalletService,
    },
};

mod error;
mod interface;
mod proto;
mod schema;
mod services;

fn testkit_with_interfaces() -> TestKit {
    TestKitBuilder::validator()
        .with_logger()
        .with_default_rust_service(WalletService)
        .with_default_rust_service(DepositService)
        .with_default_rust_service(AnyCallService)
        .create()
}

fn execute_transaction(testkit: &mut TestKit, tx: Verified<AnyTx>) -> Result<(), ExecutionError> {
    testkit.create_block_with_transaction(tx).transactions[0]
        .status()
        .map_err(Clone::clone)
}

#[test]
fn test_create_wallet_ok() {
    let mut testkit = testkit_with_interfaces();
    let keypair = crypto::gen_keypair();

    execute_transaction(
        &mut testkit,
        keypair.create_wallet(WalletService::ID, "Alice".into()),
    )
    .expect("Unable to create wallet");
}

#[test]
fn test_create_wallet_fallthrough_auth() {
    let mut testkit = testkit_with_interfaces();
    let keypair = crypto::gen_keypair();

    // Without fallthrough auth, the call should fail: `create_wallet` expects the caller
    // to be external, and it is a service.
    let mut call = AnyCall::new(CallInfo::new(WalletService::ID, 0), "Alice".to_owned());
    let err = execute_transaction(
        &mut test


start.PreparePosition,
			false,
			maxCount,
			requireLeader,
			validationStreamVersion,
			user,
			replyOnExpired,
			longPollTimeout,
			expires,
			CancellationToken.None
		);

		var result = await Sut.ReadBackwards(msg, CancellationToken.None);
		envelope.ReplyWith(result);

		return await tcs.Task;
	}

	private static ReadIndexEventsBackwardCompleted ReadStreamEventsBackwardCompleted(
		ReadIndexResult result,
		IReadOnlyList<ResolvedEvent> events,
		bool isEndOfStream = false,
		long tfLastCommitPosition = 0,
		string? error = null
	) =>


     * 微信退款单号
     */
    @JsonProperty(WepayField.REFUND_ID)
    private String refundId;

    /**
     * 商户退款单号
     */
    @JsonProperty(WepayField.OUT_REFUND_NO)
    private String outRefundNo;

    /**
     * 退款金额(元)
     */
    @JsonProperty(WepayField.REFUND_FEE)
    private Float refundFee;

    /**
     * 企业红包退款金额(元)
     */
    @JsonProperty(WepayField.ENTER_RED_PKG_REFUND_FEE)
    private Float enterRedPkgRefundFee;

    /**
     * 退款类型
     */
    @JsonProperty(WepayField.REFUND_CHANNEL)
    @JsonDeserialize(using = RefundChannelDeserializer.class)
    private RefundChannel channel;

    /**
     * 退款状态
     */
    @JsonProperty(WepayField.REFUND_STATUS)
    private String refundStatus;

    public String getRefundId() {
        return refundId;
    }

    public void setRefundId(String refundId) {
        this.refundId = refundId;
    }

    public String getOutRefundNo() {
        return outRefundNo;
    }

    public void setOutRefundNo(String outRefundNo) {
        this.outRefundNo = outRefundNo;
    }

    public Float getRefundFee() {
        return refundFee;
    }

    public void setRefundFee(Float refundFee) {
        this.refundFee = refundFee;
    }

    public Float getEnterRedPkgRefundFee() {
        return enterRedPkgRefundFee;
    }

    public void setEnterRedPkgRefundFee(Float enterRedPkgRefundFee) {
        this.enterRedPkgRefundFee = enterRedPkgRefundFee;
    }

    public RefundChannel getChannel() {
        return channel;
    }

    public void setChannel(RefundChannel channel) {
        this.channel = channel;
    }

    public String getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(String refundStatus) {
        this.refundStatus = refundStatus;
    }

    @Override
    public String toString() {
        return "CommonBill{" +
                "refundId='" + refundId + '\'' +
                ", outRefundNo='" + outRefundNo + '\'' +
                ", refundFee=" + refundFee +
                ", enterRedPkgRefundFee=" + enterRedPkgRefundFee +
                ", channel=" + channel +
                ", refundStatus='" + refundStatus + '\'' +
                "} " + super.toString();
    }
}
package me.hao0.antares.client.job.script;

import com.google.common.base.Throwables;
import me.hao0.antares.client.job.JobResult;
import me.hao0.antares.common.util.Constants;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.DefaultExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;

/**
 * The script executor
 * Author: haolin
 * Email:  haolin.h0@gmail.com
 */
public class DefaultScriptExecutor implements ScriptExecutor {

    private static final Logger log = LoggerFactory.getLogger(DefaultScriptExecutor.class);

    @Override
    public JobResult exec(String command) {
        return exec(command, null);
    }

    @Override
    public JobResult exec(String command, Map<String, String> env) {

        try {

            CommandLine cmdLine = CommandLine.parse(command);
            DefaultExecutor executor = new DefaultExecutor();
            executor.execute(cmdLine, env);

            return JobResult.SUCCESS;
        } catch (Exception e) {


ess;
import org.restcomm.protocols.ss7.ss7ext.Ss7ExtInterface;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

/**
*
* @author sergey vetyutnev
*
*/
public class RouteOnGtTest extends SccpHarness {

    private SccpAddress a1, a2;

    public RouteOnGtTest() {
    }

    public byte[] getDataSrc() {
        return new byte[] { 11, 12, 13, 14, 15 };
    }

    public byte[] getDataUdt1() {
        return new byte[] { 0x09, (byte) 0x81, 0x03, 0x0e, 0x19, 0x0b, 0x12, 0x06, 0x00, 0x12, 0x04, 0x45, 0x23, 0x00, 0x21, 0x00,
                0x50, 0x0b, 0x12, 0x07, 0x00, 0x11, 0x04, 0x79, 0x52, 0x14, 0x02, 0x26, 0x05, 0x5b, 0x62, 0x59, 0x48, 0x04,
                0x00, 0x00, 0x00, 0x05, 0x6b, 0x1e, 0x28, 0x1c, 0x06, 0x07, 0x00, 0x11, (byte) 0x86, 0x05, 0x01, 0x01, 0x01,
                (byte) 0xa0, 0x11, 0x60, 0x0f, (byte) 0x80, 0x02, 0x07, (byte) 0x80, (byte) 0xa1, 0x09, 0x06, 0x07, 0x04, 0x00,
                0x00, 0x01, 0x00, 0x05, 0x03, 0x6c, 0x31, (byte) 0xa1, 0x2f, 0x02, 0x01, 0x01, 0x02, 0x01, 0x16, 0x30, 0x27,
                (byte) 0x80, 0x08, (byte) 0x91, 0x45, 0x19, 0x61, 0x34, 0x11, 0x79, (byte) 0xf7, (byte) 0x83, 0x01, 0x00,
                (byte) 0x86, 0x07, (byte) 0x91, 0x79, 0x52, 0x14, 0x02, 0x26, (byte) 0xf5, (byte) 0x87, 0x05, 0x7b,
                (byte) 0xb6, (byte) 0xa0, 0x41, 0x56, (byte) 0xab, 0x08, 0x03, 0x02, 0x04, (byte) 0xf0, (byte) 0x80, 0x02,
                0x01, (byte) 0xfe };
    }

    @BeforeClass
    public void setUpClass() throws Exception {
        this.sccpStack1Name = "RouteOnGtTestStack1";
        this.sccpStack2Name = "RouteOnGtTestStack2";
    }

    @AfterClass
    public void tearDownClass() throws Exception {
    }

    @Override
    protected void createStack1() {
        sccpStack1 = createStack(sccpStack1Name, null);
        sccpProvider1 = sccpStack1.getSccpProvider();
    }

    @Override
    protected void createStack2() {
        sccpStack2 = createStack(sccpStack2Name, null);
        sccpProvider2 = sccpStack2.getSccpProvider();
    }

    @Override
    protected SccpStackImpl createStack(String name, Ss7ExtInterface ss7ExtInterface) {
        SccpStackImpl stack = new SccpStackImplProxy(name, ss7ExtInterface);
        final String dir = Util.getTmpTestDir();
        if (dir != null) {
            stack.setPersistDir(dir);
        }
        return stack;
    }

    @BeforeMethod
    public void setUp() throws Exception {
        super.setUp();
    }

    @AfterMethod
    public void tearDown() {
        super.tearDown();
    }

    @Test(groups = { "SccpMessage", "functional.transfer" })
    public void testSend() throws Exception


 *testing.T) {
	suite.Run(t, &UpdateMasterSlaveTestSuite{
		MasterSlaveSuite: MasterSlaveSuite{
			driver:     "mysql",
			masterDsn:  "root:root@tcp(localhost:13307)/integration_test",
			slaveDsns:  []string{"root:root@tcp(localhost:13308)/integration_test"},
			initSlaves: newRoundRobinSlaves,
		},
	})
}
// Copyright 2023 ecodeclub
//
// 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.

//go:build wireinject

package label

import (
	"sync"

	"github.com/ecodeclub/webook/internal/label/internal/repository"
	"github.com/ecodeclub/webook/internal/label/internal/repository/dao"
	"github.com/ecodeclub/webook/internal/label/internal/service"
	"github.com/ecodeclub/webook/internal/label/internal/web"
	"github.com/ego-component/egorm"
	"github.com/google/wire"
)

var HandlerSet = wire.NewSet(
	repository.NewCachedLabelRepository,
	InitTablesOnce,
	service.NewService,
	web.NewHandler)

func InitHandler(db *egorm.Component) *Handler {
	wire.Build(HandlerSet)
	return new(Handler)
}

var once = &sync.Once{}

func InitTablesOnce(db *egorm.Component) dao.LabelDAO {
	once.Do(func() {
		dao.InitTables(db)
	})
	return dao.NewLabelGORMDAO(db)
}

type Handler = web.Handler
// Copyright 2021 ecodeclub
//
// 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.

//go:build e2e

package integration

import (
	"context"
	"database/sql"
	"testing"

	"github.com/ecodeclub/eorm/internal/errs"
	"github.com/stretchr/testify/require"

	"github.com/ecodeclub/eorm"
	"github.com/ecodeclub/eorm/internal/test"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/suite"
)

type SelectTestSuite struct {
	Suite
	data *test.SimpleStruct
}

func (s *SelectTestSuite) SetupSuite() {
	s.Suite.SetupSuite()
	s.data = test.NewSimpleStruct(1)
	s.data.Int32Ptr = nil
	res := eorm.NewInserter[test.SimpleStruct](s.orm).Values(s.dat


tic const char * __lv_i18n_get_text_core(lv_i18n_phrase_t * trans, const char * msg_id)
{
    uint16_t i;
    for(i = 0; trans[i].msg_id != NULL; i++) {
        if(lv_strcmp(trans[i].msg_id, msg_id) == 0) {
            /*The msg_id has found. Check the translation*/
            if(trans[i].translation) return trans[i].translation;
        }
    }

    return NULL;
}

/**
 * Get the translation from a message ID
 * @param msg_id message ID
 * @return the translation of `msg_id` on the set local
 */
const char * lv_i18n_get_text(const char * msg_id)
{
    if(current_lang == NULL) return msg_id;

    const lv_i18n_lang_t * lang = current_lang;
    const void * txt;

    /* Search in current locale */
    if(lang->singulars != NULL) {
        txt = __lv_i18n_get_text_core(lang->singulars, msg_id);
        if(txt != NULL) return txt;
    }

    /* Try to fallback */
    if(lang == current_lang_pack[0]) return msg_id;
    lang = current_lang_pack[0];

    /* Repeat search for default locale */
    if(lang->singulars != NULL) {
        txt = __lv_i18n_get_text_core(lang->singulars, msg_id);
        if(txt != NULL) return txt;
    }

    return msg_id;
}

/**
 * Get the translation from a message ID and apply the language's plural rule to get correct form
 * @param msg_id message ID
 * @param num an integer to select the correct plural form
 * @return the translation of `msg_id` on the set local
 */
const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num)
{
    if(current_lang == NULL) return msg_id;

    const lv_i18n_lang_t * lang = current_lang;
    const void * txt;
    lv_i18n_plural_type_t ptype;

    /* Search in current locale */
    if(lang->locale_plural_fn != NULL) {
        ptype = lang->locale_plural_fn(num);

        if(lang->plurals[ptype] != NULL) {
            txt = __lv_i18n_get_text_core(lang->plurals[ptype], msg_id);
            if(txt != NULL) return txt;
        }
    }

    /* Try to fallback */
    if(lang == current_lang_pack[0]) return msg_id;
    lang = current_lang_pack[0];

    /* Repeat search for default locale */
    if(lang->locale_plural_fn != NULL) {
        ptype = lang->locale_plural_fn(num);

        if(lang->plurals[ptype] != NULL) {
            txt = __lv_i18n_get_text_core(lang->plurals[ptype], msg_id);
            if(txt != NULL) return txt;
        }
    }

    return msg_id;
}

/**
 * Get the name of the currently used locale.
 * @return name of the currently used locale. E.g. "en-GB"
 */
const char * lv_i18n_get_current_locale(void)
{
    if(!current_lang) return NULL;
    return current_lang->locale_name;
}

#endif /*#if LV_USE_DEMO_EBIKE*/


}

	if (compile && regcomp (&compiled_pattern, "\\.[mM][iI][dD][iI]?$", REG_EXTENDED)) {
		return false;
	} else {
		compile = false;
	}

	if (regexec (&compiled_pattern, file.c_str(), nmatches, matches, 0)) {
		return false;
	}

	return true;
}

static bool compare_eventlist (
	const std::pair< const Evoral::Event<Temporal::Beats>*, gint >& a,
	const std::pair< const Evoral::Event<Temporal::Beats>*, gint >& b) {
	return ( a.first->time() < b.first->time() );
}

void
SMFSource::load_model (const WriterLock& lock, bool force_reload)
{
	invalidate (lock);
	load_model_unlocked (force_reload);
	invalidate (lock);
}

void
SMFSource::load_model_unlocked (bool force_reload)
{
	assert (!_writing);

	if (!_model) {
		_model = std::shared_ptr<MidiModel> (new MidiModel (*this));
	} else {
		_model->clear();
	}

	_model->start_write();
	Evoral::SMF::seek_to_start();

	uint64_t time = 0; /* in SMF ticks */
	Evoral::Event<Temporal::Beats> ev;

	uint32_t scratch_size = 0; // keep track of scratch and minimize reallocs

	uint32_t delta_t = 0;
	uint32_t size    = 0;
	uint8_t* buf     = NULL;
	int ret;
	Evoral::event_id_t event_id;
	bool have_event_id;

	_num_channels     = 0;
	_n_note_on_events = 0;
	_has_pgm_change   = false;
	_used_channels.reset ();

	// TODO simplify event allocation
	std::list< std::pair< Evoral::Event<Temporal::Beats>*, gint > > eventlist;

	for (unsigned i = 1; i <= num_tracks(); ++i) {
		if (seek_to_track(i)) {
			continue;
		}

		time = 0;
		have_event_id = false;

		while ((ret = read_event (&delta_t, &size, &buf, &event_id)) >= 0) {

			time += delta_t;

			if (ret == 0) {
				/* meta-event : did we get an event ID ?  */
				if (event_id >= 0) {
					have_event_id = true;
				}
				continue;
			}

			/* aggregate information about channels and pgm-changes */
			uint8_t type = buf[0] & 0xf0;
			uint8_t chan = buf[0] & 0x0f;
			if (type >= 0x80 && type <= 0xE0) {
				_used_channels.set(chan);
				switch (type) {
					case MIDI_CMD_NOTE_ON:
						++_n_note_on_events;
						break;
					case MIDI_CMD_PGM_CHANGE:
						_has_pgm_change = true;
						break;
					default:
						break;
				}
			}

			if (ret > 0) {
				/* not a meta-event */

				if (!have_event_id) {
					event_id = Evoral::next_event_id();
				}
				const Temporal::Beats event_time = Temporal::Beats::ticks_at_rate(time, ppqn());
#ifndef NDEBUG
				std::string ss;

				for (uint32_t xx = 0; xx < size; ++xx) {
					char b[8];
					snprintf (b, sizeof (b), "0x%x ", buf[xx]);
					ss += b;
				}

				DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF %7 load model delta %1, time %2, size %3 buf %4, id %6\n",
							delta_t, time, size, ss, event_id, name()));
#endif

				eventlist.pu


ring defaultNam
    /// espace)
    /// bei XmlDeserializerTest.Program.Main(String[] args)
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            StaticContainerClass.XmlContainer toBeDeserialized = new StaticContainerClass.XmlContainer();

            toBeDeserialized.Entries = new List<StaticContainerClass.XmlContainerEntry>();
            toBeDeserialized.Entries.Add(new StaticContainerClass.XmlContainerEntry() { Id = Guid.NewGuid()});

            try
            {
                using (XmlTextWriter writer = new XmlTextWriter("test.xml", Encoding.UTF8))
                {
                    var serializer = new XmlSerializer(typeof(StaticContainerClass.XmlContainer));
                    serializer.Serialize(writer, toBeDeserialized);
                }
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc);
            }
        }
    }

    public static class StaticContainerClass
    {
        [XmlType(AnonymousType = true)]
        [XmlRoot(Namespace = "", IsNullable = false, ElementName = "container")]
        public class XmlContainer
        {
            public XmlContainer()
            {
                Entries = new List<XmlContainerEntry>();
            }

            [XmlElement("entry")]
            public List<XmlContainerEntry> Entries { get; set; }
        }

        [XmlType(AnonymousType = true)]
        public class XmlContainerEntry
        {
            [XmlAttribute("id")]
            public Guid Id { get; set; }
        }

    }
}


2Val(0), U32Val(4))

            // Write the middle 2 bytes back to memory
            val res = Buf.copy_to_linear_memory(map1, U32Val(1), U32Val(66), U32Val(2))
            certoraAssert(res eq VoidVal)

            certoraAssert(i32.load8(i32(66)) eq i32(1))
            certoraAssert(i32.load8(i32(67)) eq i32(2))
        })
    }

    @Test
    fun insert() {
        assertTrue(verifyWasm {
            for (i in 0..<4) {
                i32.store8(i32(i), i32(i))
            }
            val map1 = Buf.new_from_linear_memory(U32Val(0), U32Val(4))

            // Insert a byte at position 2
            val map2 = Buf.insert(map1, U32Val(2), U32Val(42))

            certoraAssert(Buf.len(map2) eq U32Val(5))
            for ((i, v) in listOf(0L to 0L, 1L to 1L, 2L to 42L, 3L to 2L, 4L to 3L)) {
                certoraAssert(Buf.get(map2, U32Val(i)) eq U32Val(v))
            }
        })
    }

    @Test
    fun delete() {
        assertTrue(verifyWasm {
            for (i in 0..<4) {
                i32.store8(i32(i), i32(i))
            }
            val map1 = Buf.new_from_linear_memory(U32Val(0), U32Val(4))

            // Delete the byte at position 2
            val map2 = Buf.del(map1, U32Val(2))

            certoraAssert(Buf.len(map2) eq U32Val(3))
            for ((i, v) in listOf(0L to 0L, 1L to 1L, 2L to 3L)) {
                certoraAssert(Buf.get(map2, U32Val(i)) eq U32Val(v))
            }
        })
    }

    @Test
    fun `new_from_linear_memory equality`() {
        assertTrue(verifyWasm(
            watModule {
                memory("default", 65536)
                global("heap", i32, i32(10000))
                dataSegment("data", 1000, "abcd1234")

                func(exportName = "entry").implement {
                    val map1 = Buf.new_from_linear_memory(U32Val(1000), U32Val(4))
                    val map2 = Buf.new_from_linear_memory(U32Val(1000), U32Val(4))
                    val map3 = Buf.new_from_linear_memory(U32Val(1004), U32Val(4))
                    certoraAssert(map2 valEq map1)
                    certoraAssert(not(map3 valEq map1))
                }
            },
            "entry"
        ))
    }
}
/*
 *     The Certora Prover
 *     Copyright (C) 2025  Certora Ltd.
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, version 3 of the License.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package analysis.opt

import analysis.assertNotNull
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import vc.data.CoreTACProgram
import vc.data.TACBuilderAuxiliaries
import vc.data.TACCmd
import vc.data.TACProgramBuilder
import vc.data.T


 | 官方网站: https://www.shopsuite.cn  https://www.golershop.cn
// +----------------------------------------------------------------------
// | 版权和免责声明:
// | 本公司对该软件产品拥有知识产权（包括但不限于商标权、专利权、著作权、商业秘密等）
// | 均受到相关法律法规的保护，任何个人、组织和单位不得在未经本团队书面授权的情况下对所授权
// | 软件框架产品本身申请相关的知识产权，禁止用于任何违法、侵害他人合法权益等恶意的行为，禁
// | 止用于任何违反我国法律法规的一切项目研发，任何个人、组织和单位用于项目研发而产生的任何
// | 意外、疏忽、合约毁坏、诽谤、版权或知识产权侵犯及其造成的损失 (包括但不限于直接、间接、
// | 附带或衍生的损失等)，本团队不承担任何法律责任，本软件框架只能用于公司和个人内部的
// | 法律所允许的合法合规的软件产品研发，详细见https://www.golershop.cn/policy
// +----------------------------------------------------------------------

package dao

import (
	"golershop.cn/internal/dao/internal"
)

// internalAnalyticsReturnDao is internal type for wrapping internal DAO implements.
type internalAnalyticsReturnDao = *internal.AnalyticsReturnDao

// analyticsReturnDao is the data access object for table trade_order_info.
// You can define custom methods on it to extend its functionality as you wish.
type analyticsReturnDao struct {
	internalAnalyticsReturnDao
}

var (
	// AnalyticsReturn is globally public accessible object for table trade_order_info operations.
	AnalyticsReturn = analyticsReturnDao{
		internal.NewAnalyticsReturnDao(),
	}
)

// Fill with you ideas below.
// +----------------------------------------------------------------------
// | ShopSuite商城系统 [ 赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | 版权所有 随商信息技术（上海）有限公司
// +----------------------------------------------------------------------
// | 未获商业授权前，不得将本软件用于商业用途。禁止整体或任何部分基础上以发展任何派生版本、
// | 修改版本或第三方版本用于重新分发。
// +----------------------------------------------------------------------
// | 官方网站: https://www.shopsuite.cn  https://www.golershop.cn
// +----------------------------------------------------------------------
// | 版权和免责声明:
// | 本公司对该软件产品拥有知识产权（包括但不限于商标权、专利权、著作权、商业秘密等）
// | 均受到相关法律法规的保护，任何个人、组织和单位不得在未经本团队书面授权的情况下对所授权
// | 软件框架产品本身申请相关的知识产权，禁止用于任何违法、侵害他人合法权益等恶意的行为，禁
// | 止用于任何违反我国法律法规的一切项目研发，任何个人、


-> bool {
        self.bits
    }
    #[doc = r"Returns `true` if the bit is clear (0)"]
    #[inline(always)]
    pub fn bit_is_clear(&self) -> bool {
        !self.bit()
    }
    #[doc = r"Returns `true` if the bit is set (1)"]
    #[inline(always)]
    pub fn bit_is_set(&self) -> bool {
        self.bit()
    }
}
#[doc = r"Proxy"]
pub struct _USB_RXCSRH5_ISOW<'a> {
    w: &'a mut W,
}
impl<'a> _USB_RXCSRH5_ISOW<'a> {
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits &= !(1 << 6);
        self.w.bits |= ((value as u8) & 1) << 6;
        self.w
    }
}
impl R {
    #[doc = r"Value of the register as raw bits"]
    #[inline(always)]
    pub fn bits(&self) -> u8 {
        self.bits
    }
    #[doc = "Bit 0 - Incomplete RX Transmission Status"]
    #[inline(always)]
    pub fn usb_rxcsrh5_incomprx(&self) -> USB_RXCSRH5_INCOMPRXR {
        let bits = ((self.bits >> 0) & 1) != 0;
        USB_RXCSRH5_INCOMPRXR { bits }
    }
    #[doc = "Bit 1 - Data Toggle"]
    #[inline(always)]
    pub fn usb_rxcsrh5_dt(&self) -> USB_RXCSRH5_DTR {
        let bits = ((self.bits >> 1) & 1) != 0;
        USB_RXCSRH5_DTR { bits }
    }
    #[doc = "Bit 2 - Data Toggle Write Enable"]
    #[inline(always)]
    pub fn usb_rxcsrh5_dtwe(&self) -> USB_RXCSRH5_DTWER {
        let bits = ((self.bits >> 2) & 1) != 0;
        USB_RXCSRH5_DTWER { bits }
    }
    #[doc = "Bit 3 - DMA Request Mode"]
    #[inline(always)]
    pub fn usb_rxcsrh5_dmamod(&self) -> USB_RXCSRH5_DMAMODR {
        let bits = ((self.bits >> 3) & 1) != 0;
        USB_RXCSRH5_DMAMODR { bits }
    }
    #[doc = "Bit 4 - PID Error"]
    #[inline(always)]
    pub fn usb_rxcsrh5_piderr(&self) -> USB_RXCSRH5_PIDERRR {
        let bits = ((self.bits >> 4) & 1) != 0;
        USB_RXCSRH5_PIDERRR { bits }
    }
    #[doc = "Bit 5 - DMA Request Enable"]
    #[inline(always)]
    pub fn usb_rxcsrh5_dmaen(&self) -> USB_RXCSRH5_DMAENR {
        let bits = ((self.bits >> 5) & 1) != 0;
        USB_RXCSRH5_DMAENR { bits }
    }
    #[doc = "Bit 6 - Auto Request"]
    #[inline(always)]
    pub fn usb_rxcsrh5_autorq(&self) -> USB_RXCSRH5_AUTORQR {
        let bits = ((self.


E_CPP11_INITIALIZER_LIST",
					"EA_HAVE_CPP11_SYSTEM_ERROR", "EA_HAVE_CPP11_TYPEINDEX", "EASTL_STD_ITERATOR_CATEGORY_ENABLED",
					"EASTL_STD_TYPE_TRAITS_AVAILABLE", "EASTL_MOVE_SEMANTICS_ENABLED", "EASTL_VARIADIC_TEMPLATES_ENABLED",
					"EASTL_VARIABLE_TEMPLATES_ENABLED", "EASTL_INLINE_VARIABLE_ENABLED", "EASTL_HAVE_CPP11_TYPE_TRAITS",
					"EASTL_INLINE_NAMESPACES_ENABLED", "EASTL_ALLOCATOR_EXPLICIT_ENABLED", "EASTL_USER_DEFINED_ALLOCATOR", {
						public = true
					})
	target:add("defines", "LC_EASTL_EXPORT=1", "EASTL_PROJECT=1")
end)
add_headerfiles("include/**.h")
add_headerfiles("packages/EABase/include/Common/**.h")
add_files("source/*.cpp")
if enable_mimalloc then
	add_defines("EASTL_MIMALLOC_ENABLED=1")
	includes("packages/mimalloc")
	add_deps("mimalloc")
end
target_end()


 */  lw    $t9, ($v0)
/* 1D9BE8 801E8E78 3C01800E */ lui $at, %hi(D_800E33D0)
/* 1D9BEC 801E8E7C 00194880 */  sll   $t1, $t9, 2
/* 1D9BF0 801E8E80 00290821 */  addu  $at, $at, $t1
/* 1D9BF4 801E8E84 E42033D0 */ swc1 $f0, %lo(D_800E33D0)($at)
/* 1D9BF8 801E8E88 8C480000 */  lw    $t0, ($v0)
/* 1D9BFC 801E8E8C 3C01800E */ lui $at, %hi(D_800E3210)
/* 1D9C00 801E8E90 0008C080 */  sll   $t8, $t0, 2
/* 1D9C04 801E8E94 00380821 */  addu  $at, $at, $t8
/* 1D9C08 801E8E98 E4203210 */ swc1 $f0, %lo(D_800E3210)($at)
/* 1D9C0C 801E8E9C 8C4A0000 */  lw    $t2, ($v0)
/* 1D9C10 801E8EA0 3C01800E */ lui $at, %hi(D_800E3050)
/* 1D9C14 801E8EA4 24080001 */  li    $t0, 1
/* 1D9C18 801E8EA8 000A5880 */  sll   $t3, $t2, 2
/* 1D9C1C 801E8EAC 002B0821 */  addu  $at, $at, $t3
/* 1D9C20 801E8EB0 E4203050 */ swc1 $f0, %lo(D_800E3050)($at)
/* 1D9C24 801E8EB4 8C4C0000 */  lw    $t4, ($v0)
/* 1D9C28 801E8EB8 3C01801F */  lui   $at, %hi(D_801F4B48_ovl10) # $at, 0x801f
/* 1D9C2C 801E8EBC C4244B48 */  lwc1  $f4, %lo(D_801F4B48_ovl10)($at)
/* 1D9C30 801E8EC0 000C6880 */  sll   $t5, $t4, 2
/* 1D9C34 801E8EC4 00AD7021 */  addu  $t6, $a1, $t5
/* 1D9C38 801E8EC8 E5C40000 */  swc1  $f4, ($t6)
/* 1D9C3C 801E8ECC 8C430000 */  lw    $v1, ($v0)
/* 1D9C40 801E8ED0 3C01800E */ lui $at, %hi(D_800E3C90)
/* 1D9C44 801E8ED4 00031880 */  sll   $v1, $v1, 2
/* 1D9C48 801E8ED8 00A37821 */  addu  $t7, $a1, $v1
/* 1D9C4C 801E8EDC C5E20000 */  lwc1  $f2, ($t7)
/* 1D9C50 801E8EE0 00230821 */  addu  $at, $at, $v1
/* 1D9C54 801E8EE4 E4223C90 */ swc1 $f2, %lo(D_800E3C90)($at)
/* 1D9C58 801E8EE8 8C590000 */  lw    $t9, ($v0)
/* 1D9C5C 801E8EEC 3C01800E */ lui $at, %hi(D_800E3AD0)
/* 1D


aneAlignmentEXT.p("planeAlignments")
}

val XrSpatialComponentMesh2DListEXT = struct(Module.OPENXR, "XrSpatialComponentMesh2DListEXT") {
    Expression("#TYPE_SPATIAL_COMPONENT_MESH_2D_LIST_EXT")..XrStructureType("type")
    nullable..opaque_p("next")
    AutoSize("meshes")..uint32_t("meshCount")
    XrSpatialMeshDataEXT.p("meshes")
}

val XrSpatialPolygon2DDataEXT = struct(Module.OPENXR, "XrSpatialPolygon2DDataEXT") {
    XrPosef("origin")
    XrSpatialBufferEXT("vertexBuffer")
}

val XrSpatialComponentPolygon2DListEXT = struct(Module.OPENXR, "XrSpatialComponentPolygon2DListEXT") {
    Expression("#TYPE_SPATIAL_COMPONENT_POLYGON_2D_LIST_EXT")..XrStructureType("type")
    nullable..opaque_p("next")
    AutoSize("polygons")..uint32_t("polygonCount")
    XrSpatialPolygon2DDataEXT.p("polygons")
}

val XrSpatialComponentPlaneSemanticLabelListEXT = struct(Module.OPENXR, "XrSpatialComponentPlaneSemanticLabelListEXT") {
    Expression("#TYPE_SPATIAL_COMPONENT_PLANE_SEMANTIC_LABEL_LIST_EXT")..XrStructureType("type")
    nullable..opaque_p("next")
    AutoSize("semanticLabels")..uint32_t("semanticLabelCount")
    XrSpatialPlaneSemanticLabelEXT.p("semanticLabels")
}

val XrSpatialCapabilityConfigurationQrCodeEXT = struct(Module.OPENXR, "XrSpatialCapabilityConfigurationQrCodeEXT", parentStruct = XrSpatialCapabilityConfigurationBaseHeaderEXT) {
    Expression("#TYPE_SPATIAL_CAPABILITY_CONFIGURATION_QR_CODE_EXT")..XrStructureType("type")
    PointerSetter(
        "XrSpatialMarkerSizeEXT", "XrSpatialMarkerStaticOptimizationEXT",
        prepend = true
    )..nullable..opaque_const_p("next")
    XrSpatialCapabilityEXT("capability")
    AutoSize("enabledComponents")..uint32_t("enabledComponentCount")
    XrSpatialComponentTypeEXT.const.p("enabledComponents")
}

val XrSpatialCapabilityConfigurationMicroQrCodeEXT = struct(Module.OPENXR, "XrSpatialCapabilityConfigurationMicroQrCodeEXT", parentStruct = XrSpatialCapabilityConfigurationBaseHeaderEXT) {
    Expression("#TYPE_SPATIAL_CAPABILITY_CONFIGURATION_MICRO_QR_CODE_EXT")..XrStructureType("type")
    PointerSetter(
        "XrSpatialMarkerSizeEXT", "XrSpatialMarkerStaticOptimizationEXT",
        prepend = true
    )..nullable..opaque_const_p("next")
    XrSpatialCapabilityEXT("capability")
    AutoSize("enabledComponents")..uint32_t("enabledComponentCount")
    XrSpatialComponentTypeEXT.const.p("enabledComponents")
}

val XrSpatialCapabilityConfigurationArucoMarkerEXT = struct(Module.OPENXR, "XrSpatialCapabilityConfigurationArucoMarkerEXT", parentStruct = XrSpatialCapabilityConfigurationBaseHeaderEXT) {
    Expression("#TYPE_SPATIAL_CAPABILITY_CONFIGURATION_ARUCO_MARKER_EXT")..XrStructureType("type")
    PointerSetter(
        "XrSpatialMarkerSizeEXT", "XrSpatialMarkerStaticOptimizationEXT",
        prepend = true
    )..nullable..opaque_const_p("next")
    XrSpatialCapabilityEXT("capability")
    AutoSize("enabledComponents")..uint32_t("enabledComponentCount")
    XrSpatialC


 JSP_running.setVisible(false);
                    });
                } catch (WriterException | IOException e) {
                    Platform.runLater(() -> {
                        ViewUtils.alertPane((Stage) JLB_title.getScene().getWindow(), Init.getLanguage("Warning"), e.getMessage());
                        JSP_running.setVisible(false);
                    });
                    throw new RuntimeException(e);
                }
            }).start();
        } else {
            ViewUtils.alertPane((Stage) JLB_title.getScene().getWindow(), Init.getLanguage("Warning"), Init.getLanguage("ErrorMessage_notNull"));
            JSP_running.setVisible(false);
        }
    }

    private int colorStringConvert(String colorString) {
        colorString = colorString.replace("0x","");
        String[] colorList = colorString.split("");
        StringBuilder sb = new StringBuilder();
        sb.append(colorList[colorList.length - 2]);
        sb.append(colorList[colorList.length - 1]);

        for (int i = 0; i < colorList.length - 2; i++) {
            sb.append(colorList[i]);
        }
        return new BigInteger(sb.toString(), 16).intValue();
    }
}
/*
 *  UVCCamera
 *  library and sample to access to UVC web camera on non-rooted Android device
 *
 * Copyright (c) 2014-2017 saki t_saki@serenegiant.com
 *
 *  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.
 *
 *  All files in the folder are under this Apache License, Version 2.0.
 *  Files in the libjpeg-turbo, libusb, libuvc, rapidjson folder
 *  may have a different license, see the respective files.
 */

package com.serenegiant.usb.common;

import android.app.Activity;
import android.view.Surface;

import com.serenegiant.glutils.RendererHolder;
import com.serenegiant.usb.UVCCamera;
import com.serenegiant.usb.widget.CameraViewInterface;

import java.io.FileNotFoundException;

public class UVCCameraHandlerMultiSurface extends AbstractUVCCameraHandler {
	/**
	 * create UVCCameraHandlerMultiSurface, use MediaVideoEncoder, try MJPEG, default bandwidth
	 * @param parent
	 * @param cameraView
	 * @param width
	 * @param height
	 * @return
	 */
	public static final UVCCameraHandlerMultiSurface createHandler(
			final Activity parent, final CameraViewInterface cameraView,
			final int width, final int height) {

		return createHandler(parent, cameraView, 1, width, height, UVCCamera.FRAME_FORMAT_MJPEG, UVCCamera.DEFAULT_BANDWIDTH);
	}

	/**
	 * create UVCCameraHandlerMultiSurface, use MediaVideoEncoder, try MJPEG
	 * @param parent
	 * @param cameraView
	 * @param width
	 * @param height
	 * @param bandwidthFactor
	 * @return
	 */
	public static final UVCCameraHandlerMultiSurface createHandler(
			final Activity parent, final CameraViewInterface cameraView,
			final int width, final int height, final float bandwidthFactor) {

		return createHandler(parent, cameraView, 1, width, height, UVCCamera.FRAME_FORMAT_MJPEG, bandwidthFactor);
	}

	/**
	 * create UVCCameraHandlerMultiSurface, try MJPEG, default bandwidth
	 * @param parent
	 * @param cameraView
	 * @param encoderType
	 * @param width
	 * @param height
	 * @return
	 */
	public static final UVCCameraHandlerMultiSurface createHandler(
			final Activity parent, final CameraViewInterface cameraView,
			final int encoderType, final int width, final int height) {

		return createHandler(parent, cameraView, encoderType


# Databricks notebook source
# MAGIC %md
# MAGIC # Cálculo da Matriz de Merecimento - Solução Unificada para Todas as Categorias
# MAGIC
# MAGIC Este notebook implementa o cálculo da matriz de merecimento unificado para todas as categorias,
# MAGIC com abstração `grupo_de_necessidade` e implementação de médias aparadas.
# MAGIC
# MAGIC **Objetivo**: Calcular a matriz de merecimento otimizada em duas camadas:
# MAGIC 1. **Primeira camada**: Matriz a nível CD (grupo_de_necessidade)
# MAGIC 2. **Segunda camada**: Distribuição interna ao CD para as lojas
# MAGIC
# MAGIC **Regras de Agrupamento por Categoria**:
# MAGIC - **DIRETORIA DE TELAS**: Usa `gemeos` como grupo_de_necessidade
# MAGIC - **DIRETORIA TELEFONIA CELULAR**: Usa `gemeos` como grupo_de_necessidade
# MAGIC - **DIRETORIA LINHA BRANCA**: Usa `NmEspecieGerencial + "_" + DsVoltagem` como grupo_de_necessidade (DsVoltagem nulls preenchidos com "")
# MAGIC - **DIRETORIA LINHA LEVE**: Usa `NmEspecieGerencial + "_" + DsVoltagem` como grupo_de_necessidade (DsVoltagem nulls preenchidos com "")
# MAGIC - **DIRETORIA INFO/GAMES**: Usa `NmEspecieGerencial` como grupo_de_necessidade

# COMMAND ----------

# MAGIC %md
# MAGIC ## 1. Imports e Configuração Inicial

# COMMAND ----------

from pyspark.sql import SparkSession, DataFrame
from pyspark.sql import functions as F, Window
from datetime import datetime, timedelta, date
import pandas as pd
from typing import List, Optional, Dict, Any

# Inicialização do Spark
spark = SparkSession.builder.appName("calculo_matriz_merecimento_unificado").getOrCreate()

hoje = datetime.now() - timedelta(days=1)
hoje_str = hoje.strftime("%Y-%m-%d")
hoje_int = int(hoje.strftime("%Y%m%d"))

FILIAIS_OUTLET = [2528, 3604]

# COMMAND ----------

def get_data_inicio(min_meses: int = 18, hoje: datetime | None = None) -> datetime:
    """
    Retorna 1º de janeiro mais recente que esteja a pelo menos `min_meses` meses de 'hoje'.
    """
    if hoje is None:
        hoje_d = date.today()
    else:
        hoje_d = hoje.date() if isinstance(hoje, datetime) else hoje

    ano = hoje_d.year
    while True:
        jan = date(ano, 1, 1)
        diff_meses = (hoje_d.year - jan.year) * 12 + (hoje_d.month - jan.month)
        if diff_meses >= min_meses:
            return datetime(jan.year, jan.month, jan.day)
        ano -= 1

data_inicio = get_data_inicio()
data_inicio_int = int(data_inicio.strftime("%Y%m%d"))

# COMMAND ----------

# MAGIC %md
# MAGIC ## 2. Configuração das Regras por Categoria

# COMMAND ----------

# Configuração das regras de agrupamento por categoria
REGRAS_AGRUPAMENTO = {
    "DIRETORIA DE TELAS": {
        "coluna_grupo_necessidade": "gemeos",
        "tipo_agrupamento": "gêmeos",
        "descricao": "Agrupamento por produtos similares (gêmeos)"
    },
    "DIRETORIA TELEFONIA CELULAR": {
        "coluna_grupo_necessidade": "gemeos",
        "tipo_agrupamento": "gêmeos",
        "descricao": "Agrupamento por produtos similares (gêmeos)"
    },
    "DIRETORIA LINHA BRANCA": {
        "coluna_grupo_necessidade": "NmEspecieGerencial",
        "tipo_agrupamento": "espécie_gerencial",
        "descricao": "Agrupamento por espécie gerencial + voltagem (DsVoltagem)"
    },
    "DIRETORIA LINHA LEVE": {
        "coluna_grupo_necessidade": "NmEspecieGerencial",
        "tipo_agrupamento": "espécie_gerencial",
        "descricao": "Agrupamento por espécie gerencial + voltagem (DsVoltagem)"
    },
    "DIRETORIA INFO/GAMES": {
        "coluna_grupo_necessidade": "NmEspecieGerencial",
        "tipo_agrupamento": "espécie_gerencial",
        "descricao": "Agrupamento por espécie gerencial"
    }
}

# Configuração de parâmetros para detecção de outliers
PARAMETROS_OUTLIERS = {
    "desvios_meses_atipicos": 2,  # Desvios para meses atípicos
    "desvios_historico_cd": 3,     # Desvios para outliers históricos a nível CD
    "desvios_historico_loja": 3,   # Desvios para outliers históricos a nível loja
    "desvios_atacado_cd": 3,     # Desvios para outliers CD em lojas de atacado
    "desvios_atacado_loja": 1.5    # Desvios para outliers loja em lojas de atacado
}

# Configuração das janelas móveis para médias aparadas
JANELAS_MOVEIS_APARADAS = [90, 180, 270, 360]

# Configuração específica para merecimento CD (sempre 90 dias)
JANELA_CD_MERECIMENTO = 90

# Configuração das médias aparadas (percentual de corte)
PERCENTUAL_CORTE_MEDIAS_APARADAS = 0.01  # 1% de corte superior e inferior

FILIAIS_ATACADO = [
    1671,     # Petrolina - PE


1;

			// Token: 0x04000420 RID: 1056
			private Transform planeBone2;

			// Token: 0x04000421 RID: 1057
			private Transform planeBone3;

			// Token: 0x04000422 RID: 1058
			private int plane1ChainIndex;

			// Token: 0x04000423 RID: 1059
			private int plane1NodeIndex;

			// Token: 0x04000424 RID: 1060
			private int plane2ChainIndex;

			// Token: 0x04000425 RID: 1061
			private int plane2NodeIndex;

			// Token: 0x04000426 RID: 1062
			private int plane3ChainIndex;

			// Token: 0x04000427 RID: 1063
			private int plane3NodeIndex;
		}
	}
}


import os
from os.path import join, basename, dirname

import numpy as np
import pandas as pd
from matplotlib import pyplot as plt

from config_path import PROSTATE_DATA_PATH, PLOTS_PATH, BASE_PATH

print(PROSTATE_DATA_PATH)
extracted_dir = join(BASE_PATH, 'analysis/figure_3/extracted')

print (extracted_dir)
node_importance = pd.read_csv(join(extracted_dir, 'node_importance_graph_adjusted.csv'), index_col=0)
response = pd.read_csv(join(extracted_dir, 'response.csv'), index_col=0)

l = 1
high_nodes = node_importance[node_importance.layer == l]
col = 'coef'

importance = high_nodes.sort_values(col, ascending=False)
importance['rank'] = range(1, len(importance) + 1)
importance_log = np.log(importance[col].values + 1)

interesting = ['FOXA1', 'SPOP', 'MED12', 'CDK12', 'PIK3CA', 'CHD1', 'ZBTB7B']

annotations = (importance.loc[interesting]).sort_values('rank')
plt.figure(figsize=(6, 4))
ax = plt.subplot()
plt.plot(importance_log, ".")
plt.ylabel('Log (importance score +1)')

xytext = [(20, 60), (20, 50), (40, 40), (30, 30), (0, 10), (-10, 10), (0, 10)]
for i, gene in enumerate(annotations.index):
    x = annotations.loc[gene, 'rank']
    y = annotations.loc[gene, col]
    connectivity = annotations.loc[gene, 'coef_graph']
    print('gene {}, rank {}, importance,  {},  connectivity {}'.format(gene, x, y, connectivity))

    ax.annotate(gene, (x, y),
                xycoords='data',
                fontsize=8,
                bbox=dict(boxstyle="round", fc="none", ec="gray"),
                xytext=xytext[i], textcoords='offset points', ha='center',
                arrowprops=dict(arrowstyle="->"))

fontProperties = dict(family='Arial', weight='normal', size=14, rotation=0, ha='right')
ax.set_yticklabels(ax.get_yticklabels(), fontProperties)

plt.tick_params(
    axis='x',  # changes apply to the x-axis
    which='both',  # both major and minor ticks are affected
    bottom=False,  # ticks along the bottom edge are off
    top=False,  # ticks along the top edge are off
    labelbottom=False)  # labels along the bottom edge are off

ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)

current_dir = basename(dirname(__file__))
saving_dir = join(PLOTS_PATH, 'reviews/{}'.format(current_dir))
if not os.path.exists(saving_dir):
    os.mkdir(saving_dir)

filename = join(saving_dir, '7-all_genes.png')
plt.savefig(filename, dpi=200)


 С 0525 չ إһ
 С 0623 չ إ
  0722 ռ إļ
 С 0821 ռ إ
 С 0919 ʮһ إ
ʮ  1018 ʮ إ߸
ʮһ  1117 ʮ إ
ʮ  1217 ʮ إ
1249
 С 0116 ʮĶ إ
  0214 ʮ嶡 ʮ
  0316 ʮ嶡
 С 0415 һչ ʮ
  0514 չ ʮ
 С 0613 ռ ʮ˼
 С 0712 ռ ʮż
  0810 ռ إһ
 С 0909  إһ
 С 1008  إ
ʮ  1106 ձ إ
ʮһ  1206 ձ إ
ʮ С 0105 ʮն إ
1250
  0203 ʮһ إ
  0305 ʮһ إ߹
  0404 ʮ إ߹
 С 0504 ʮ إ˼
 С 0602 ʮļ إż
  0701 ʮ强 ʮ
 С 0731 ʮ
  0829  ʮ߸
 С 0928  ʮ߸
ʮ С 1027 ձ ʮ
ʮһ  1125 ձ ʮ
ʮ  1225 ն إһ
1251
 С 0124 ն إһ
  0222 ն إ
  0324  إ
 С 0423  إ
  0522 ʮռ إ
  0621 ʮռ إ
 С 0721 ʮһ إ
 С 0819 ʮ إ
  0917 ʮ إű
ʮ С 1017 ʮ إű
ʮ С 1115 ʮ
ʮһ  1214 ն ʮ
ʮ  0113 ն ʮ
1252
 С 0212 ն ʮ˹
  0312  ʮŹ
 С 0411  ʮ
  0510 ռ إһ
 С 0609 ռ إһ
  0708 ո إ
  0807 ո إ
 С 0906 ո إı
  1005 ʮ إ
ʮ С 1104 ʮ إ
ʮһ  1203 ʮ إ߶
ʮ С 0102 ʮ إ߶
1253
 С 0131 ʮĹ إ
  0301 ʮ ʮ
 С 0331 ʮ
  0429 ռ ʮ߼
  0529 ռ ʮ߼
 С 0628 ո ʮ
  0727 ո ʮ
  0826  ʮ
 С 0925  ʮ
ʮ  1024  إ
ʮһ С 1123  إ
ʮ  1222  إ
1254
 С 0121 չ إ
  0219 ʮչ إ
 С 0321 ʮһ إ
 С 0419 ʮ إ߼
  0518 ʮ إŸ
 С 0617 ʮ إŸ
  0716 ʮ
  0815 һ ʮ
 С 0914 һ ʮ
  1013  ʮ˶
ʮ  1112  ʮ˶
ʮһ С 1212  ʮ˶
ʮ  0110 չ ʮ
1255
 С 0209 չ ʮ
  0310 ռ إ
 С 0409 ռ إ
 С 0508 ռ إĸ
  0606 ʮ إ
 С 0706 ʮ إ
  0804 ʮ إ
 С 0903 ʮ إ
  1002 ʮĶ إ
ʮ  1101 ʮĶ إ
ʮһ  1201 ʮ ʮ
ʮ С 1231 ʮ
1256
  0129 һչ ʮ
 С 0228 ռ ʮ߼
  0328 ռ ʮ˼
 С 0427 ռ ʮŸ
 С 0526  ʮ
  0624  إ
 С 07


TUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@
@ *********************************************************************

@ Helper functions for 64-bit integer arithmetic.  ARM version.

#include "sysdeps.h"

@@@ Shift left

@ Note on ARM shifts: the shift amount is taken modulo 256.
@ If shift amount mod 256 >= 32, the shift produces 0.

@ Algorithm:
@    RH = (XH << N) | (XL >> (32-N) | (XL << (N-32))
@    RL = XL << N
@ If N = 0:
@    RH = XH | 0 | 0
@    RL = XL
@ If 1 <= N <= 31:  1 <= 32-N <= 31  and  2s5 <= N-32 mod 256 <= 255
@    RH = (XH << N) | (XL >> (32-N) | 0
@    RL = XL << N
@ If N = 32:
@    RH = 0 | XL | 0
@    RL = 0
@ If 33 <= N <= 63: 225 <= 32-N mod 256 <= 255 and 1 <= N-32 <= 31
@    RH = 0 | 0 | (XL << (N-32))
@    RL = 0

FUNCTION(__i64_shl)
        AND r2, r2, #63         @ normalize amount to 0...63
        RSB r3, r2, #32         @ r3 = 32 - amount
        LSL Reg0HI, Reg0HI, r2
        LSR r3, Reg0LO, r3
        ORR Reg0HI, Reg0HI, r3
        SUB r3, r2, #32         @ r3 = amount - 32
        LSL r3, Reg0LO, r3
        ORR Reg0HI, Reg0HI, r3
        LSL Reg0LO, Reg0LO, r2
        bx lr
ENDFUNCTION(__i64_shl)


if n_plots == 1:
        axes = [axes]
    plt.close()  # Close the figure immediately

    # Initialize scatters and trajectories
    scatters = []
    all_trajectories = []

    # Generate trajectories for each model
    max_range = abs(start_dist).max().item()

    for i, model in enumerate(models):
        device = next(model.parameters()).device
        end_dist, trajectories = integrate_path(model, start_dist.clone().to(device), n_steps=n_frames,
                                          step_fn=step_fn, warp_fn=warp_fn, save_trajectories=True)
        all_trajectories.append(trajectories.cpu())
        scatters.append(axes[i].scatter([], [], alpha=0.6, s=10, color=wong_pink))

        # Update max range
        max_range = max(max_range, abs(end_dist.cpu()).max().item())

    # Set up axes
    for i, ax in enumerate(axes):
        ax.set_xlim((-max_range, max_range))
        ax.set_ylim((-max_range, max_range))
        ax.set_aspect('equal')
        ax.set_xticks([])
        for spine in ['top', 'right', 'bottom', 'left']:
            ax.spines[spine].set_visible(False)
        ax.set_title(titles[i])

    def init():
        """Initialize animation"""
        for scatter in scatters:
            scatter.set_offsets(np.c_[[], []])
        return tuple(scatters)

    def animate(frame):
        """Update animation frame"""
        # Update axis limits (in case they need to be adjusted)
        for ax in axes:
            ax.set_xlim((-max_range, max_range))
            ax.set_ylim((-max_range, max_range))

        # Update scatter positions
        for scatter, trajectories in zip(scatters, all_trajectories):
            scatter.set_offsets(trajectories[frame].numpy())

        return tuple(scatters)

    # Create animation
    anim = animation.FuncAnimation(fig, animate, init_func=init,
                                 frames=n_frames, interval=20, blit=True)

    # Handle saving or displaying
    if save_file:
        os.makedirs(os.path.dirname(save_file), exist_ok=True)
        anim.save(save_file, writer='ffmpeg', fps=30)
        return HTML(f"""<video height="350" controls loop><source src="{anim_file}" type="video/mp4">
              Your browser does not support the video tag. </video>""")
    else:  # direct matplotlib anim offers better controls but makes ipynb file size huge
        rc('animation', html='jshtml')
        return HTML(anim.to_jshtml())
    plt.close()

anim_file = 'images/particles_fm.mp4'
create_flow_animation(val_points.clone(), models=[fm_model], titles=['Flow Matching'],
                      n_frames=50, save_file=anim_file)
{% endhighlight %}

<video width="50%" controls loop>
  <source src="{{ site.baseurl }}/assets/img/2025-04-28-flow-with-what-you-know/particles_fm.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

So, even though we trained using trajectories that crossed, the model


JOR, @FREETYPE_MINOR, and @FREETYPE_PATCH.
   *
   * @input:
   *   library ::
   *     A source library handle.
   *
   * @output:
   *   amajor ::
   *     The major version number.
   *
   *   aminor ::
   *     The minor version number.
   *
   *   apatch ::
   *     The patch version number.
   *
   * @note:
   *   The reason why this function takes a `library` argument is because
   *   certain programs implement library initialization in a custom way that
   *   doesn't use @FT_Init_FreeType.
   *
   *   In such cases, the library version might not be available before the
   *   library object has been created.
   */
  FT_EXPORT( void )
  FT_Library_Version( FT_Library   library,
                      FT_Int      *amajor,
                      FT_Int      *aminor,
                      FT_Int      *apatch );

  /**************************************************************************
   *
   * @function:
   *   FT_Face_CheckTrueTypePatents
   *
   * @description:
   *   Deprecated, does nothing.
   *
   * @input:
   *   face ::
   *     A face handle.
   *
   * @return:
   *   Always returns false.
   *
   * @note:
   *   Since May 2010, TrueType hinting is no longer patented.
   *
   * @since:
   *   2.3.5
   *
   */
  FT_EXPORT( FT_Bool )
  FT_Face_CheckTrueTypePatents( FT_Face  face );

  /**************************************************************************
   *
   * @function:
   *   FT_Face_SetUnpatentedHinting
   *
   * @description:
   *   Deprecated, does nothing.
   *
   * @input:
   *   face ::
   *     A face handle.
   *
   *   value ::
   *     New boolean setting.
   *
   * @return:
   *   Always returns false.
   *
   * @note:
   *   Since May 2010, TrueType hinting is no longer patented.
   *
   * @since:
   *   2.3.5
   *
   */
  FT_EXPORT( FT_Bool )
  FT_Face_SetUnpatentedHinting( FT_Face  face,
                                FT_Bool  value );

  /* */

FT_END_HEADER

#endif /* FREETYPE_H_ */

/* END */


ovato");

		// CONNETTORE
		Connettore connettore = serv.getConnettore();
		java.util.Map<String,String> properties = null;
		if(connettore != null && CostantiConfigurazione.DISABILITATO.equals(connettore.getTipo())==false){
			String nome = connettore.getNome();
			if(connettore.getTipo() == null){
				// la definizione nel servizio applicativo e' un puntatore, lo cerca nel soggetto.
				for(int i=0;i<soggetto.sizeConnettoreList();i++){
					if(nome.equals(soggetto.getConnettore(i).getNome())){
						connettore = soggetto.getConnettore(i);
						break;
					}
				}
			}

			// urlPrefixRewriter
			setPAUrlPrefixRewriter(connectionPdD,connettore, aSoggetto, requestInfo);

			// set properties
			properties = new java.util.HashMap<>();
			for(int i=0;i<connettore.sizePropertyList();i++){
				properties.put(connettore.getProperty(i).getNome(),connettore.getProperty(i).getValore());
			}
		}

		// Autenticazione
		String autenticazione = CostantiConfigurazione.INVOCAZIONE_SERVIZIO_AUTENTICAZIONE_NONE.toString();
		String tmp = null;
		if(serv.getAutenticazione()!=null){
			tmp = serv.getAutenticazione().toString();
		}
		if(CostantiConfigurazione.INVOCAZIONE_SERVIZIO_AUTENTICAZIONE_BASIC.toString().equalsIgnoreCase(tmp))
			autenticazione = CostantiConfigurazione.INVOCAZIONE_SERVIZIO_AUTENTICAZIONE_BASIC.toString();

		// Credenziali
		InvocazioneCredenziali credenziali = null;
		if(serv.getCredenziali()!=null){
			credenziali = new InvocazioneCredenziali();
			credenziali.setUser(serv.getCredenziali().getUser());
			credenziali.setPassword(serv.getCredenziali().getPassword());
		}

		// Costruisco connettoreMsg
		ConnettoreMsg connettoreMsg = null;
		if(connettore != null){
			connettoreMsg = new ConnettoreMsg();
			connettoreMsg.setTipoConnettore(connettore.getTipo());
			connettoreMsg.setConnectorProperties(properties);

			connettoreMsg.setSbustamentoSOAP(CostantiConfigurazione.ABILITATO.equals(serv.getSbustamentoSoap()));
			connettoreMsg.setSbustamentoInformazioniProtocollo(!CostantiConfigurazione.DISABILITATO.equals(serv.getSbustamentoInformazioniProtocollo()));
			connettoreMsg.setAutenticazione(autenticazione);
			connettoreMsg.setCredenziali(credenziali);
		}

		return connettoreMsg;
	}

	protected ConnettoreMsg getConsegnaRispostaAsincrona(Connection connectionPdD,ServizioApplicativo sa,RichiestaApplicativa richiestaApplicativa, RequestInfo requestInfo)throws DriverConfigurazioneException,DriverConfigurazioneNotFound{

		//		 Servizio applicativo
		if(sa.getRispostaAsincrona()==null)
			throw new DriverConfigurazioneNotFound("Servizio applicativo ["+richiestaApplicativa.getServizioApplicativo()+"] del soggetto["+richiestaApplicativa.getSoggettoFruitore()+"] non possiede l'elemento invocazione servizio");
		RispostaAsincrona serv = sa.getRispostaAsincrona();

		// Soggetto che contiene il connettore
		IDSoggetto aS


)?;
  fmt.end_object_key(out)?;
  Ok(())
}
use super::prelude::*;
use rand::{
    distributions::{Distribution, Uniform},
    thread_rng,
};

lazy_static! {
    static ref FLAMONGOS: Vec<&'static str> = vec![
        "RingoDerRetardeteFlamingo",
        "RingoDerBaldImDrogenSumpfVersickendeFlamingo",
        "RingoDerFlamongo",
        "RingOhneFlamingo",
        "RingoDerDrogenAbhängigeFlamingo",
        "WehrabooFlamingo",
        "RingoDerDrogenFlamingo",
        "RingoDingoBingo",
        "RingoDrugFlamingo",
    ];
}

pub fn action() -> Arc<Action> {
    Action::with_name("flamongo")
        .regex(r"\br[io]ngo\b")
        .command(move |_context, _msg, _user| {
            let range = Uniform::new(0, FLAMONGOS.len());
            let flamongo = FLAMONGOS[range.sample(&mut thread_rng())].to_owned();

            Ok(MessageResult::Message(flamongo.clone()))
        })
        .done()
}
/*
 * @lc app=leetcode.cn id=887 lang=rust
 *
 * [887] 鸡蛋掉落
 */

// @lc code=start
use std::rc::Rc;
use std::collections::HashMap;
use std::cmp::min;
use std::cell::RefCell;

impl Solution {
    pub fn super_egg_drop(k: i32, n: i32) -> i32 {
        let mem = Rc::new(RefCell::new(HashMap::new()));
        Solution::super_egg_drop_with_mem(mem, k, n)
    }

    pub fn super_egg_drop_with_mem(mem: Rc<RefCell<HashMap<(i32,i32),i32>>>, k: i32, n: i32) -> i32 {
        if k==1 { return n }
        if n==0 { return 0 }
        if mem.borrow().contains_key(&(k,n)) {
            return mem.borrow()[&(k,n)];
        }
        let mut res = i32::max_value();
        let mut lo = 1;
        let mut hi = n;
        while lo <= hi {
            let mid = (lo+hi) / 2;
            let broken = Solution::super_egg_drop_with_mem(mem.clone(), k-1, mid - 1);
            let not_broken = Solution::super_egg_drop_with_mem(mem.clone(),k, n - mid);
            if broken > not_broken {
                hi = mid - 1;
                res = min(res, broken + 1);
            }
            else {
                lo = mid + 1;
                res = min(res, not_broken + 1);
            }
        }
        mem.borrow_mut().insert((k,n), res);
        res
    }
}
// @lc code=end

struct Solution;

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn test_super_egg_drop() {
        assert_eq!(Solution::super_egg_drop(1, 2), 2);
        assert_eq!(Solution::super_egg_drop(2, 6), 3);
        assert_eq!(Solution::super_egg_drop(3, 14), 4);
    }
}//! Serial interface echo server

#![deny(unsafe_code)]
#![deny(warnings)]
#![no_main]
#![no_std]

extern crate panic_semihosting;

use cortex_m_rt::entry;
use nb::block;
use stm3240g_eval::hal::{prelude::*, stm32};

#[entry]
fn main() -> ! {
    let p = stm32::Peripherals::take().unwrap();

    let rcc = p.RCC.constrain();
    let clocks = rcc.cf


)
        {
        }

        float resize_speed(ref InputState input)
        {
            if (input.IsForDevice(InputDevice.HTCViveWands))
                return 0.0025f;
            else
                return 0.01f;
        }

    }

    class SurfaceBrushTool_2DInputBehavior : Any2DInputBehavior
    {
        FContext context;
        SurfaceBrushTool tool;

        Frame3f lastHitFrameW;
        int lastHitTID;

        bool update_last_hit(SurfaceBrushTool tool, Ray3f rayW)
        {
            SORayHit soHit;
            if (tool.Target.FindRayIntersection(rayW, out soHit)) {
                lastHitFrameW = new Frame3f(soHit.hitPos, soHit.hitNormal);
                lastHitTID = soHit.hitIndex;
                return true;
            }
            return false;
        }

        public SurfaceBrushTool_2DInputBehavior(SurfaceBrushTool tool, FContext s)
        {
            this.tool = tool;
            context = s;
        }

        override public CaptureRequest WantsCapture(InputState input)
        {
            if (context.ToolManager.ActiveRightTool == null || !(context.ToolManager.ActiveRightTool is SurfaceBrushTool))
                return CaptureRequest.Ignore;
            if ( Pressed(ref input) ) {
                if (tool.BeginStrokeHitTestFilter(WorldRay(ref input)) == false)
                    return CaptureRequest.Ignore;
                if ( update_last_hit(tool, WorldRay(ref input)) )
                    return CaptureRequest.Begin(this);
            }
            return CaptureRequest.Ignore;
        }

        override public Capture BeginCapture(InputState input, CaptureSide eSide)
        {
            update_last_hit(tool, WorldRay(ref input));

            if (input.IsForDevice(InputDevice.Mouse)) {
                tool.Invert = input.bCtrlKeyDown;
                tool.UseSecondary = input.bShiftKeyDown;
            }

            tool.BeginBrushStroke(lastHitFrameW, lastHitTID);

            return Capture.Begin(this, CaptureSide.Any);
        }

        override public Capture UpdateCapture(InputState input, CaptureData data)
        {
            if (tool == null)
                throw new Exception("SurfaceBrushTool_MouseBehavior.UpdateCapture: tool is null, how did we get here?");

            if ( Released(ref input) ) {
                tool.EndBrushStroke();
                return Capture.En


 name="psk3d:High" />
    </psf:Feature>

    <psf:Feature name="psk3d:Job3DDensity">
        <psf:Property name="SelectionType">
            <psf:Value xsi:type="xsd:QName">psk:PickOne</psf:Value>
        </psf:Property>
        <psf:Option name="psk3d:Hollow"/>
        <psf:Option name="psk3d:Low"/>
        <psf:Option name="psk3d:Medium"/>
        <psf:Option name="psk3d:High"/>
        <psf:Option name="psk3d:Solid"/>
    </psf:Feature>

    <psf:Feature name="psk3d:Job3DSupports">
        <psf:Property name="SelectionType">
            <psf:Value xsi:type="xsd:QName">psk:PickOne</psf:Value>
        </psf:Property>
        <psf:Option name="psk3d:SupportsIncluded" />
        <psf:Option name="psk3d:SupportsExcluded" />
    </psf:Feature>

    <psf:ParameterDef name="psk3d:Job3DSupportsMaterial">
        <psf:Property name="psf:DataType">
            <psf:Value xsi:type="xsd:QName">xsd:QName</psf:Value>
        </psf:Property>
        <psf:Property name="psf:DefaultValue">
            <psf:Value xsi:type="xsd:QName">vnd:B</psf:Value>
        </psf:Property>
        <psf:Property name="psf:MaxLength">
            <psf:Value xsi:type="xsd:integer">1024</psf:Value>
        </psf:Property>
        <psf:Property name="psf:MinLength">
            <psf:Value xsi:type="xsd:integer">1</psf:Value>
        </psf:Property>
        <psf:Property name="psf:Mandatory">
            <psf:Value xsi:type="xsd:QName">psk:Optional</psf:Value>
        </psf:Property>
        <psf:Property name="psf:UnitType">
            <psf:Value xsi:type="xsd:string">characters</psf:Value>
        </psf:Property>
    </psf:ParameterDef>

    <psf:Feature name="psk3d:Job3DRaft">
        <psf:Property name="SelectionType">
            <psf:Value xsi:type="xsd:QName">psk:PickOne</psf:Value>
        </psf:Property>
        <psf:Option name="psk3d:RaftIncluded" />
        <psf:Option name="psk3d:RaftExcluded" />
    </psf:Feature>

    <psf:ParameterDef name="psk3d:Job3DRaftMaterial">
        <psf:Property name="psf:DataType">
            <psf:Value xsi:type="xsd:QName">xsd:QName</psf:Value>
        </psf:Property>
        <psf:Property name="psf:DefaultValue">
            <psf:Value xsi:type="xsd:QName">vnd:B</psf:Value>
        </psf:Property>
        <psf:Property name="psf:MaxLength">
            <psf:Value xsi:type="xsd:integer">1024</psf:Value>
        </psf:Property>
        <psf:Property name="psf:MinLength">
            <psf:Value xsi:type="xsd:integer">1</psf:Value>
        </psf:Property>
        <psf:Property name="psf:Mandatory">
            <psf:Value xsi:type="xsd:QName">psk:Optional</psf:Value>
        </psf:Property>
        <psf:Property name="psf:UnitType">
            <psf:Value xsi:type="xsd:string">characters</psf:Value>
        </psf:Property>
    </psf:ParameterDef>

</psf:PrintCapabilities>
```
---
title: Driver Installation
description: The print driver provided in this SDK is an experimental 3D printer device driver still under development.
ms.date: 03/17/2023
ms.topic: install-set-up-deploy
---

# Driver installation

> [!NOTE]
> The print driver provide


  }
  return newSquare;
}

/* 只读属性 */
interface ICustom {
  readonly user: string
}
const custom: ICustom = {
  user: 'yy'
};
let a: number[] = [1, 2, 3];
let ro: ReadonlyArray<number> = a
a = ro as number[];
// console.log(a[0] = 10)export class GameFinalResult {
  isMatched: boolean;
  similarity: number;
  constructor(isMatched: boolean, similarity: number) {
    this.isMatched = isMatched;
    this.similarity = similarity;
  }
}import { Component, OnInit } from '@angular/core';
import { NavController } from 'ionic-angular';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage implements OnInit {

  level: number = -1;
  initLevel: number = -1;
  destinationLevel: number;

  timePast: string = "00:00";
  tempsEcouler: any;

  ismoving: boolean = false;
  isUp: boolean = false;
  isDown: boolean = false;

  constructor(public navCtrl: NavController) {

  }

  ngOnInit() {
      this.level = Math.floor(Math.random() * (3 - (-1)) + -1);
      this.initLevel = this.level;
      console.log(this.level);
  }

  goTo(level: number) {
    if (level !== this.initLevel && !this.ismoving) {
      this.destinationLevel = level;
      this.level = -2;

      // console.log('click button ' + level);

      if (this.initLevel < this.destinationLevel) {
        console.log('Monte');

        this.ismoving = true;
        this.isUp = true;
        this.incrementTime();
        let timer = setInterval(() => {

          this.initLevel++;
          if (this.initLevel === this.destinationLevel) {
            this.destinationLevel = -2;
            this.level = this.initLevel;
            clearInterval(timer);
            clearInterval(this.tempsEcouler);
            this.ismoving = false;
            this.isUp = false;
          }
        }, 2000);
      } else {
        console.log('Descend');
        this.ismoving = true;
        this.isDown = true;

        this.incrementTime();
        let timer = setInterval(() => {
          this.initLevel--;
          if (this.initLevel === this.destinationLevel) {
            this.destinationLevel = -2;
            this.level = this.initLevel;
            clearInterval(timer);
            clearInterval(this.tempsEcouler);
            this.ismoving = false;
            this.isDown = false;
          }
        }, 2000);
      }
    }

  }

  incrementTime() {
     // Afiche le temps
     let i = 0;
     this.tempsEcouler = setInterval(() => {
       if (i>9) {
         this.timePast = "00:" + (i++);
       } else {
         this.timePast = "00:0" + (i++);
       }
     }, 300);
  }

}
import IModel from '../interfaces/imodel';

class Estado implements IModel {

  private id: string;
  private nome: string;
  private sigla: string;

  fromJson(document: any): Estado {
    this.id = document.id;
    this.nome = document.nome;
    this.sigla = document.sigla;

    return this;
  }

  /* #region Getters e Setters */

  public getId(): string {
    return this.id;
  }

  public setId(id: string
  ): void {
    this.id = id;
  }

  public getNome(): string {
    return this.nome;
  }

  public setNome(nome: string
  ): void {
    this.nome = nome;
  }

  public getSigla(): string {
    return this.sigla;


auto mid = span.beg + ( span.end - span.beg ) / 2;
            nextSpans.push_back( { span.beg, mid } );
            nextSpans.push_back( { mid, span.end } );
        }
        spans = std::move( nextSpans );
    }

    std::vector<FaceBitSet> meshParts( spans.size() );
    std::vector<std::shared_ptr<Object>> levelObjs( spans.size() );
    ParallelFor( levelObjs, [&]( size_t i )
    {
        auto objMesh = std::make_shared<ObjectMesh>();

        FaceBitSet & region = meshParts[i];
        region.resize( spans[i].end, false );
        region.set( spans[i].beg, spans[i].end - spans[i].beg, true );
        objMesh->setMesh( std::make_shared<Mesh>( mesh.cloneRegion( region ) ) );

        objMesh->setName( "mesh" + std::to_string( maxDepth ) + "_" + std::to_string( i ) );
        objMesh->setVisualizeProperty( true, MeshVisualizePropertyType::Edges, ViewportMask::all() );
        objMesh->setVisible( false );
        levelObjs[i] = std::move( objMesh );
    } );

    int currDepth = maxDepth;
    while ( meshParts.size() > 1 )
    {
        --currDepth;
        DecimateSettings dsettings;
        dsettings.subdivideParts = int( meshParts.size() );
        dsettings.decimateBetweenParts = false;
        dsettings.partFaces = &meshParts;
        dsettings.maxError = FLT_MAX;
        dsettings.minFacesInPart = numFacesPerObj;
        decimateMesh( mesh, dsettings );

        ParallelFor( levelObjs, [&]( size_t i )
        {
            auto objMesh = std::make_shared<ObjectMesh>();

            const FaceBitSet & region = meshParts[i];
            objMesh->setMesh( std::make_shared<Mesh>( mesh.cloneRegion( region ) ) );
            objMesh->setVisualizeProperty( true, MeshVisualizePropertyType::Edges, ViewportMask::all() );

            auto obj = std::make_shared<Object>();
            obj->setName( "lvl" + std::to_string( currDepth ) + "_" + std::to_string( i ) );

            objMesh->setName( "mesh" + std::to_string( currDepth ) + "_" + std::to_string( i ) );
            obj->addChild( objMesh );
            obj->addChild( levelObjs[i] );
            levelObjs[i]->setVisible( false );
            levelObjs[i] = std::move( obj );
        } );

        std::vector<FaceBitSet> nextMeshParts( meshParts.size() / 2 );
        std::vector<std::shared_ptr<Object>> nextLevelObjs( meshParts.size() / 2 );
        ParallelFor( nextLevelObjs, [&]( size_t i )
        {
            auto l = 2 * i;
            auto r = 2 * i + 1;
            nextMeshParts[i] = meshParts[l] | meshParts[r];
            auto obj = std::make_shared<Object>();
            obj->setName( "lvl" + std::to_string( currDepth ) );
            obj->addChild( level


odD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n    background-color: darkorange;\n}\n\n.ace_scrollbar {\n    contain: strict;\n    position: absolute;\n    right: 0;\n    bottom: 0;\n    z-index: 6;\n}\n\n.ace_scrollbar-inner {\n    position: absolute;\n    cursor: text;\n    left: 0;\n    top: 0;\n}\n\n.ace_scrollbar-v{\n    overflow-x: hidden;\n    overflow-y: scroll;\n    top: 0;\n}\n\n.ace_scrollbar-h {\n    overflow-x: scroll;\n    overflow-y: hidden;\n    left: 0;\n}\n\n.ace_print-margin {\n    position: absolute;\n    height: 100%;\n}\n\n.ace_text-input {\n    position: absolute;\n    z-index: 0;\n    width: 0.5em;\n    height: 1em;\n    opacity: 0;\n    background: transparent;\n    -moz-appearance: none;\n    appearance: none;\n    border: none;\n    resize: none;\n    outline: none;\n    overflow: hidden;\n    font: inherit;\n    padding: 0 1px;\n    margin: 0 -1px;\n    contain: strict;\n    -ms-user-select: text;\n    -moz-user-select: text;\n    -webkit-user-select: text;\n    user-select: text;\n    /*with `pre-line` chrome inserts   instead of space*/\n    white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n    background: transparent;\n    color: inherit;\n    z-index: 1000;\n    opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n    border-bottom: 1px solid;\n


, volume: 0.2,delay:jumptime, obj:child);
              OPENWORLD.Mob.setSpeech(child, ["I can jump!", "Im clever"], z: 80, width: 300,  scale:0.4);

            } else {
              jumpsound.stop();
              OPENWORLD.Actor.playAction(child,    name: "idle2", duration:1, stopallactions: true);
              OPENWORLD.Mob.clearText(child);
              var fartime=OPENWORLD.Math.random()*10;
              if (OPENWORLD.Math.random() <0.5)
                OPENWORLD.Sound.play( path: "sounds/fart.wav", volume: 0.2,delay:fartime);
              else
                OPENWORLD.Sound.play( path: "sounds/fart2.mp3", volume: 0.2,delay:fartime);
              OPENWORLD.Sound.play( path: "sounds/laugh.wav", volume: 0.1,delay:fartime+2);

              OPENWORLD.Mob.setSpeech(child, ["I farted!"], z: 80, width: 300,  scale:0.4, delay:fartime);

            }

        });
        OPENWORLD.BaseObject.addTimer(child,t);
      } else {
        print("child out");
        jumpsound.stop();
        OPENWORLD.Space.faceObjectAlwaysRemove(child);
        OPENWORLD.BaseObject.clearTimers(child);
      }
    });

    addnpc(child, "child", false, deathsoundpath: "sounds/groan.mp3");

    OPENWORLD.BaseObject.setCustomTrigger(child);//, dist: 1.5);
    child.extra['customtrigger'].addEventListener('strucktrigger', (THREE.Event event) async {
      print("child dead");
      OPENWORLD.BaseObject.clearAll(child);
      actorDie(child); //,diesoundpath:"sounds/groan.mp3");
      OPENWORLD.BaseObject.disableDistanceTrigger(child);

      var lolly= await OPENWORLD.Model.createModel('assets/models/lolly.glb');
      lolly.scale.set(0.0015, 0.0015, 0.0015);
      OPENWORLD.Space.worldToLocalSurfaceObjHide(
          lolly,365.33+0.1,232.03,0,4);//409.66, 328.47,0,4);//408.75,327.88,0.1, 4);
      scene.add(lolly);
      setGetObject(lolly,scalenotselected:1.1, scaleselected:1.2, takelabel:"Eat");
      setEatObject(lolly,3,0.2);
    });

    // This is the prison entrance of lindos but not the actual prison where the prisoners are chained up
    var roomPrisonentrance = OPENWORLD.Room.createRoom(368.479,281.857,
    soundpath: "sounds/home.mp3",  randomsoundpath:"sounds/groan.mp3", randomsoundgap:30, volume: 0.05, exitroom: roomDefault); //THREE.Object3D();
    roomPrisonentrance.extra['guide'] = [
      "This where the",
      "bad people go.",
      "Not many people",
      "tend to leave this place"
    ];
    OPENWORLD.Room.setAutoIndoors( roomPrisonentrance , true);

    scene.add( roomPrisonentrance );

    OPENWORLD.Room.setDistanceTrigger( roomPrisonentrance , dist:0.5);
    // minx: -3.47, maxx: 10.1, miny: -12.4, maxy: -2.1);

    guard2 =await OPENWORLD.Actor.copyActor( guard,
        texture: "assets/actors/knight15.jpg",
        action:"idle2"
      //   z: actoroffset
    );
    setDefaultActor(guard2);
    OPENWORLD.Space.worldToLocalSurfaceObjHide(
        g


/* Copyright 2020-2022, RespiraWorks
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.
*/

#pragma once

#include <cstddef>
#include <cstdint>

#include "serial_listeners.h"

/*! \class RxBuffer rx_buffer.h "rx_buffer.h"
 *  \brief Abstract class for serial receiver buffers.
 */
class RxBuffer {
 public:
  /// \brief Sets up underlying receive infrastructure and starts the first reception.
  virtual bool begin(RxListener *listener) = 0;

  /// \brief Restarts the ongoing reception, i.e. the buffer will be written from the beginning.
  virtual void restart_rx(RxListener *listener) = 0;

  /// \brief Returns how many bytes were written to the buffer.
  virtual size_t received_length() const = 0;

  /// \brief Returns the buffer.
  virtual uint8_t *get() = 0;
};