@font-size-h6:            ceil((@font-size-base * .85)); // ~12px\n\n//** Unit-less `line-height` for use in components like buttons.\n@line-height-base:        1.428571429; // 20/14\n//** Computed \"line-height\" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.\n@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px\n\n//** By default, this inherits from the `<body>`.\n@headings-font-family:    inherit;\n@headings-font-weight:    500;\n@headings-line-height:    1.1;\n@headings-color:          inherit;\n\n\n//== Iconography\n//\n//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.\n\n//** Load fonts from this directory.\n@icon-font-path:          \"../fonts/\";\n//** File name for all font files.\n@icon-font-name:          \"glyphicons-halflings-regular\";\n//** Element ID within SVG icon file.\n@icon-font-svg-id:        \"glyphicons_halflingsregular\";\n\n\n//== Components\n//\n//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).\n\n@padding-base-vertical:     6px;\n@padding-base-horizontal:   12px;\n\n@padding-large-vertical:    10px;\n@padding-large-horizontal:  16px;\n\n@padding-small-vertical:    5px;\n@padding-small-horizontal:  10px;\n\n@padding-xs-vertical:       1px;\n@padding-xs-horizontal:     5px;\n\n@line-height-large:         1.3333333; // extra decimals for Win 8.1 Chrome\n@line-height-small:         1.5;\n\n@border-radius-base:        4px;\n@border-radius-large:       6px;\n@border-radius-small:       3px;\n\n//** Global color for active items (e.g., navs or dropdowns).\n@component-active-color:    #fff;\n//** Global background color for active items (e.g., navs or dropdowns).\n@component-active-bg:       @brand-primary;\n\n//** Width of the `border` for generating carets that indicate dropdowns.\n@caret-width-base:          4px;\n//** Carets increase slightly in size for larger components.\n@caret-width-large:         5px;\n\n\n//== Tables\n//\n//## Customizes the `.table` component with basic values, each used across all table variations.\n\n//** Padding for `<th>`s and `<td>`s.\n@table-cell-padding:            8px;\n//** Padding for cells in `.table-condensed`.\n@table-condensed-cell-padding:  5px;\n\n//** Default background color used for all tables.\n@table-bg:                      transparent;\n//** Background color used for `.table-striped`.\n@table-bg-accent:               #f9f9f9;\n//** Background color used for `.table-hover`.\n@table-bg-hover:                #f5f5f5;\n@table-bg-active:               @table-bg-hover;\n\n//** Border color for table and cell borders.\n@table-border-color:            #ddd;\n\n\n//== Buttons\n//\n//## For each of Bootstrap's buttons, define text, background and border color.\n\n@btn-font-weight:                normal;\n\n@btn-default-color:              #333;\n@btn


(cinfo, version, structsize);
}

void jpeg_stdio_src(j_decompress_ptr cinfo, FILE *infile) {
  jpegli_stdio_src(cinfo, infile);
}

void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *inbuffer,
                  unsigned long insize /* NOLINT */) {
  jpegli_mem_src(cinfo, inbuffer, insize);
}

int jpeg_read_header(j_decompress_ptr cinfo, boolean require_image) {
  return jpegli_read_header(cinfo, require_image);
}

boolean jpeg_start_decompress(j_decompress_ptr cinfo) {
  return jpegli_start_decompress(cinfo);
}

JDIMENSION jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines,
                               JDIMENSION max_lines) {
  return jpegli_read_scanlines(cinfo, scanlines, max_lines);
}

JDIMENSION jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines) {
  return jpegli_skip_scanlines(cinfo, num_lines);
}

void jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset,
                        JDIMENSION *width) {
  jpegli_crop_scanline(cinfo, xoffset, width);
}

boolean jpeg_finish_decompress(j_decompress_ptr cinfo) {
  return jpegli_finish_decompress(cinfo);
}

JDIMENSION jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data,
                              JDIMENSION max_lines) {
  return jpegli_read_raw_data(cinfo, data, max_lines);
}

jvirt_barray_ptr *jpeg_read_coefficients(j_decompress_ptr cinfo) {
  return jpegli_read_coefficients(cinfo);
}

boolean jpeg_has_multiple_scans(j_decompress_ptr cinfo) {
  return jpegli_has_multiple_scans(cinfo);
}

boolean jpeg_start_output(j_decompress_ptr cinfo, int scan_number) {
  return jpegli_start_output(cinfo, scan_number);
}

boolean jpeg_finish_output(j_decompress_ptr cinfo) {
  return jpegli_finish_output(cinfo);
}

boolean jpeg_input_complete(j_decompress_ptr cinfo) {
  return jpegli_input_complete(cinfo);
}

int jpeg_consume_input(j_decompress_ptr cinfo) {
  return jpegli_consume_input(cinfo);
}

#if JPEG_LIB_VERSION >= 80
void jpeg_core_output_dimensions(j_decompress_ptr cinfo) {
  jpegli_core_output_dimensions(cinfo);
}
#endif
void jpeg_calc_output_dimensions(j_decompress_ptr cinfo) {
  jpegli_calc_output_dimensions(cinfo);
}

void jpeg_save_markers(j_decompress_ptr cinfo, int marker_code,
                       unsigned int length_limit) {
  jpegli_save_markers(cinfo, marker_code, length_limit);
}

void jpeg_set_marker_processor(j_decompress_ptr cinfo, int marker_code,
                               jpeg_marker_parser_method routine) {
  jpegli_set_marker_processor(cinfo, marker_code, routine);
}

boolean jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr,
                              unsigned int *icc_data_len) {
  return jpegli_read_icc_profile(cinfo, icc_data_ptr, icc_data_len);
}

void jpeg_abort_decompress(j_decompress_ptr cinfo) {
  jpegli_abort


ube][filter] = data;
        this.saveData2ConfigData(scope, dataType.FILTERDATA, DataStoreUtil.getInstance().filterData)
    }

    /**
     * 获取过滤器
     * @param scope 唯一ID
     * @param cube 数据ID
     * @param filter 过滤器名称
     */
    public static getFilterData(scope: string, cube: number, filter?: string): any {
        let data = this.getDataFromConfigData(scope, dataType.FILTERDATA);
        DataStoreUtil.getInstance().filterData = data? data:{};
        if(!DataStoreUtil.getInstance().filterData[scope]){
            DataStoreUtil.getInstance().filterData = {};
        }
        if (data) {
            if (DataStoreUtil.getInstance().filterData[scope] && DataStoreUtil.getInstance().filterData[scope][cube]) {
                if (filter) {
                    return DataStoreUtil.getInstance().filterData[scope][cube][filter];
                } else {
                    return DataStoreUtil.getInstance().filterData[scope][cube];
                }
            }
        }
        return null;
    }

    /**
     * 移除过滤器
     * @param scope 唯一ID
     * @param cube 数据ID
     * @param filter 过滤器名称
     */
    public static removeFilterData(scope: string, cube: number, filter?: string) {
        if (scope && cube) {
            if (filter) {
                delete DataStoreUtil.getInstance().filterData[scope][cube][filter];
            } else {
                delete DataStoreUtil.getInstance().filterData[scope][cube];
            }
        } else {
            delete DataStoreUtil.getInstance().filterData[scope];
        }
        this.saveData2ConfigData(scope, dataType.FILTERDATA, DataStoreUtil.getInstance().filterData)
    }
}
interface IEvent<T> {
    on(handler: {
        (data?: T): void;
    }): void;
    off(handler: {
        (data?: T): void;
    }): void;
}
declare class EventHandler<T> implements IEvent<T> {
    private handlers;
    on(handler: {
        (data?: T): void;
    }): void;
    off(handler: {
        (data?: T): void;
    }): void;
    trigger(data?: T): void;
}
declare class Message {
    payload: string;
    bytes: ArrayBuffer;
    topic: string;
    qos: number;
    retained: boolean;
    constructor(mqttMessage: {
        payloadString?: string;
        payloadBytes?: ArrayBuffer;
        destinationName?: string;
        qos?: number;
        retained?: boolean;
    });
}
declare let guid: () => string;
export { IEvent, EventHandler, guid, Message };
export const parseQs = () => {
  let obj = {};
  let query = window.location.search.substring(1);
  let keys = query.split("&");
  for (let i = 0; i < keys.length; i++) {
    let pair = keys[i].split("=");
    obj[pair[0]] = pair[1];
  }
  return obj;
};

// checks for query string parameters provided
// by sharepoint or defaults to the current url
export const getCurrentUrl = () => {
  let { origin, pathname } = window.location;
  let url = "";
  let qs = parseQs();

  switch (true) {
    // 404 not found
    case qs.hasOwnProperty("requestUrl"):
      url = qs["requestUrl"];
      break;

    // // document library folder
    // case qs.hasOwnProperty("RootFolder"):
    //   url = origin + qs["RootFolder"];
    //   break;

    // // document library folder
    // case (qs.hasOwnProperty("FolderCTID") || qs.hasOwnProperty("vi


84 / 0.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(148 163 184 / 0.3) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bg-grid-docs-subtle {
  background-image:
    linear-gradient(to right, rgb(203 213 225 / 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(203 213 225 / 0.4) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* 浮动网格效果 */
.bg-grid-floating {
  background-image:
    linear-gradient(to right, rgb(59 130 246 / 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(59 130 246 / 0.08) 1px, transparent 1px),
    radial-gradient(circle at 25% 25%, rgb(59 130 246 / 0.05) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgb(147 51 234 / 0.05) 2px, transparent 2px);
  background-size: 24px 24px, 24px 24px, 48px 48px, 48px 48px;
  background-position: 0 0, 0 0, 0 0, 24px 24px;
}

/* 自定义动画 */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* 渐变文字动画 */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgb(241 245 249);
}

::-webkit-scrollbar-thumb {
  background: rgb(148 163 184);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(100 116 139);
}

/* 玻璃态效果 */
.glass {
  backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(209, 213, 219, 0.3);
}

/* 悬浮效果 */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 渐变边框 */
.gradient-border {
  position: relative;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
  padding: 2px;
  border-radius: 12px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: white;
  border-radius: 10px;
  z-index: -1;
}

/* 文本标注样式 */
.annotation {
  position: relative;
  border-radius: 2px;
  padding: 1px 2px;
  margin: 0 1px;
}

.annotation:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 标注工具提示 */
.annotation[title]:hover::after {
  content: attr(title);


ature, TypeSignature } from "./types"

import { BugError } from "../errors"

export type ComparisonOperator = "==" | "!="

export function isComparisonOperator(str: string): str is ComparisonOperator {
  return ["==", "!="].indexOf(str) !== -1
}

export type FunctionName =
  | "checkSig"
  | "ripemd160"
  | "sha1"
  | "sha256"
  | "older"
  | "after"
  | "checkMultiSig"
  | "bytes"
  | "size"

export type Opcode = string // for now

export type BinaryOperator = ComparisonOperator

export type Instruction = BinaryOperator | FunctionName

// slightly hackish runtime type guard

export function isInstruction(
  instructionName: Instruction | string
): instructionName is Instruction {
  const opcodes = getOpcodes(instructionName as Instruction)
  return opcodes !== undefined
}

export function getOpcodes(instruction: Instruction): Opcode[] {
  switch (instruction) {
    case "checkSig":
      return ["CHECKSIG"]
    case "ripemd160":
      return ["RIPEMD160"]
    case "sha1":
      return ["SHA1"]
    case "sha256":
      return ["SHA256"]
    case "older":
      return ["CHECKSEQUENCEVERIFY", "DROP", "1"] // will get special treatment
    case "after":
      return ["CHECKLOCKTIMEVERIFY", "DROP", "1"] // will get special treatment
    case "checkMultiSig":
      return ["CHECKMULTISIG"] // will get special treatment
    case "==":
      return ["EQUAL"]
    case "!=":
      return ["EQUAL", "NOT"]
    case "bytes":
      return []
    case "size":
      return ["SIZE", "SWAP", "DROP"]
  }
}

export function getTypeSignature(instruction: Instruction): TypeSignature {
  switch (instruction) {
    case "checkSig":
      return createTypeSignature(["PublicKey", "Signature"], "Boolean")
    case "older":
      return createTypeSignature(["Duration"], "Boolean")
    case "after":
      return createTypeSignature(["Time"], "Boolean")
    case "size":
      return createTypeSignature(["Bytes"], "Integer")
    case "checkMultiSig":
      return createTypeSignature(
        [
          { type: "listType", elementType: "PublicKey" },
          { type: "listType", elementType: "Signature" }
        ],
        "Boolean"
      )
    case "==":
    case "!=":
      throw new Error("should not call getTypeSignature on == or !=")
    case "ripemd160":
    case "sha1":
    case "sha256":
      throw new Error("should not call getTypeSignature on hash function")
    case "bytes":
      throw new Error("should not call getTypeSignature on bytes function")
  }
}
import * as masao from 'masao';
import { MasaoJSONFormat } from './format';

// Fileからゲームを取得するかも
export function loadFileAsGame(file: File): Promise<MasaoJSONFormat | null> {
  return new Promise(resolve => {
    if (file.type === 'application/json' || /\.json$/i.test(file.name)) {
      // JSONっぽい
      resolve(
        loadText(file)
          .then(loadJSON)
          .then(game => {
            if (game == null) {
              return Promise.reject(
                new Error(`${file.name}から正男を読み込めませんでした。`),
              );
            } else {
              return


di	$30
	di	$31

	div	$0, $2, $3
	div	$0, $30, $31
	div	$0, $3
	div	$0, $31

	div	$2, $3, $0
	div	$2, $3, $4

	div	$3, $4, 0
	div	$3, $4, 1
	div	$3, $4, -1
	div	$3, $4, 2

	divu	$0, $2, $3
	divu	$0, $30, $31
	divu	$0, $3
	divu	$0, $31

	divu	$2, $3, $0
	divu	$2, $3, $4

	divu	$3, $4, 0
	divu	$3, $4, 1
	divu	$3, $4, -1
	divu	$3, $4, 2

	ei
	ei	$0
	ei	$2
	ei	$3
	ei	$30
	ei	$31

	eret

	ext	$2, $3, 5, 15
	ext	$2, $3, 0, 32
	ext	$2, $3, 31, 1
	ext	$31, $30, 31, 1

	ins	$2, $3, 5, 15
	ins	$2, $3, 0, 32
	ins	$2, $3, 31, 1
	ins	$31, $30, 31, 1

	jr	$0
	DSNOP
	jr	$2
	DSNOP
	jr	$3
	DSNOP
	jr	$4
	DSNOP
	jr	$5
	DSNOP
	jr	$6
	DSNOP
	jr	$7
	DSNOP
	jr	$8
	DSNOP
	jr	$30
	DSNOP
	jr	$31

	jr32	$0
	jr32	$2
	jr32	$3
	jr32	$4
	jr32	$5
	jr32	$6
	jr32	$7
	jr32	$8
	jr32	$30
	jr32	$31

	jrc	$0
	jrc	$2
	jrc	$3
	jrc	$4
	jrc	$5
	jrc	$6
	jrc	$7
	jrc	$8
	jrc	$30
	jrc	$31

	jr.hb	$0
	jr.hb	$2
	jr.hb	$3
	jr.hb	$4
	jr.hb	$5
	jr.hb	$6
	jr.hb	$7
	jr.hb	$8
	jr.hb	$30
	jr.hb	$31

	DSNOP
	j	$0
	DSNOP
	j	$2
	DSNOP
	j	$3
	DSNOP
	j	$4
	DSNOP
	j	$5
	DSNOP
	j	$6
	DSNOP
	j	$7
	DSNOP
	j	$8
	DSNOP
	j	$30
	DSNOP
	j	$31

	jalr	$31, $0
	jalr	$2
	jalr	$3
	jalr	$4
	jalr	$5
	jalr	$6
	jalr	$7
	jalr	$8
	jalr	$30

	jalr32	$31, $0
	jalr32	$2
	jalr32	$3
	jalr32	$4
	jalr32	$5
	jalr32	$6
	jalr32	$7
	jalr32	$8
	jalr32	$30

	jalr	$31, $0
	jalr	$31, $2
	jalr	$31, $3
	jalr


 EPIC_BLOCK_HEADER_VERSION: u16 = 6;

/// Existing versions of the slate
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, PartialOrd, Eq, Ord)]
pub enum SlateVersion {
	/// V2 (most current)
	V2,
}

impl Default for SlateVersion {
	fn default() -> Self {
		SlateVersion::try_from(CURRENT_SLATE_VERSION).unwrap()
	}
}

impl TryFrom<u16> for SlateVersion {
	type Error = ErrorKind;

	fn try_from(value: u16) -> Result<Self, Self::Error> {
		match value {
			2 => Ok(SlateVersion::V2),
			v => Err(ErrorKind::SlateVersion(v)),
		}
	}
}

#[derive(Serialize, Deserialize)]
#[serde(untagged)]
/// Versions are ordered newest to oldest so serde attempts to
/// deserialize newer versions first, then falls back to older versions.
pub enum VersionedSlate {
	/// Current (Epic 1.1.0 - 2.x (current))
	V2(SlateV2),
}

impl VersionedSlate {
	/// Return slate version
	pub fn version(&self) -> SlateVersion {
		match *self {
			VersionedSlate::V2(_) => SlateVersion::V2,
		}
	}

	/// convert this slate type to a specified older version
	pub fn into_version(slate: Slate, version: SlateVersion) -> VersionedSlate {
		match version {
			SlateVersion::V2 => VersionedSlate::V2(slate.into()),
		}
	}
}

impl From<VersionedSlate> for Slate {
	fn from(slate: VersionedSlate) -> Slate {
		match slate {
			VersionedSlate::V2(s) => {
				let s = SlateV2::from(s);
				Slate::from(s)
			}
		}
	}
}

impl From<&VersionedSlate> for Slate {
	fn from(slate: &VersionedSlate) -> Slate {
		match slate {
			VersionedSlate::V2(s) => Slate::from(s),
		}
	}
}

#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
pub enum CompatKernelFeatures {
	Plain,
	Coinbase,
	HeightLocked,
}
fn main() {
    flow_cli::main().ok();
}
<reponame>Marwes/gluon
extern crate env_logger;
#[macro_use]
extern crate log;

extern crate gluon_base as base;
extern crate gluon_parser as parser;
extern crate combine;

mod support;

use combine::primitives::{Error, Info};
use base::ast::*;
use base::error::Errors;
use base::pos::{self, BytePos};
use parser::{parse_string, ParseError};
use parser::lexer::Token;
use support::MockEnv;

fn parse(text: &str) -> Result<SpannedExpr<String>, ::parser::Error> {
    parse_string(&mut MockEnv::new(), text).map_err(|(_, err)| err)
}

#[test]
fn unclosed_let() {
    let _ = ::env_logger::init();
    let text = r#"
let y =
    let x = 1
y
"#;
    let result = parse(text);
    assert!(result.is_err(), "{}", result.unwrap_err());
}

#[test]
fn sequence_expressions() {
    let _ = ::env_logger::init();
    let text = r#"
f 1 2
g ""
"#;
    let result = parse(text);
    match result {
        Ok(expr) => {
            match expr.value {
                Expr::Block(ref exprs) => {
                    assert_eq!(exprs.len(), 2);
                }
                _ => assert!(false, "Expected block, found {:?}", expr),
            }
        }
        Err(err) => assert!(false, "{}", err),
    }
}

#[test]
fn wrong_indent_expression() {
    let _ = ::env_logger::init();
    let text = r#"
let y =
    let x = 1
    x
   2
y
"#;
    let result = parse(text);
    assert_


m128i) -> __m128d {
    let magic_i_lo   = _mm_set1_epi64x(0x4330000000000000);  // 2^52        encoded as floating-point
    let magic_i_hi32 = _mm_set1_epi64x(0x4530000000000000);  // 2^84        encoded as floating-point
    let magic_i_all  = _mm_set1_epi64x(0x4530000000100000);  // 2^84 + 2^52 encoded as floating-point
    let magic_d_all  = _mm_castsi128_pd(magic_i_all);

    let     v_lo     = _mm_blend_epi16(magic_i_lo, v, 0b00110011);      // Blend the 32 lowest significant bits of v with magic_int_lo
    let mut v_hi     = _mm_srli_epi64(v, 32);                           // Extract the 32 most significant bits of v
            v_hi     = _mm_xor_si128(v_hi, magic_i_hi32);               // Blend v_hi with 0x45300000
    let     v_hi_dbl = _mm_sub_pd(_mm_castsi128_pd(v_hi), magic_d_all); // Compute in double precision:
                       _mm_add_pd(v_hi_dbl, _mm_castsi128_pd(v_lo))     // (v_hi - magic_d_all) + v_lo  Do not assume associativity of floating point addition !!
}

// https://stackoverflow.com/a/41223013/2083075
#[inline(always)]
#[rustfmt::skip]
pub unsafe fn _mm_cvtepi64_pdx(v: __m128i) -> __m128d {
    let magic_i_lo   = _mm_set1_epi64x(0x4330000000000000); // 2^52               encoded as floating-point
    let magic_i_hi32 = _mm_set1_epi64x(0x4530000080000000); // 2^84 + 2^63        encoded as floating-point
    let magic_i_all  = _mm_set1_epi64x(0x4530000080100000); // 2^84 + 2^63 + 2^52 encoded as floating-point
    let magic_d_all  = _mm_castsi128_pd(magic_i_all);

    let     v_lo     = _mm_blend_epi16(magic_i_lo, v, 0b00110011);      // Blend the 32 lowest significant bits of v with magic_int_lo
    let mut v_hi     = _mm_srli_epi64(v, 32);                           // Extract the 32 most significant bits of v
            v_hi     = _mm_xor_si128(v_hi, magic_i_hi32);               // Flip the msb of v_hi and blend with 0x45300000
    let     v_hi_dbl = _mm_sub_pd(_mm_castsi128_pd(v_hi), magic_d_all); // Compute in double precision:
                       _mm_add_pd(v_hi_dbl, _mm_castsi128_pd(v_lo))     // (v_hi - magic_d_all) + v_lo  Do not assume associativity of floating point addition !!
}

// NOTE: Saturated add/sub use the "sign bit" as the select bit,
// so when porting to SSE2 it'll need to use the `signbits` methods to properly select with `_mm_blendv_epi8x`

#[inline(always)]
pub unsafe fn _mm_adds_epi64x(lhs: __m128i, rhs: __m128i) -> __m128i {
    let res = _mm_add_ep


../../addon/edit/matchbrackets.js"></script>

CodeMirror

Home

Manual

Code

Language modes

Erlang

Erlang mode

<form><textarea id="code" name="code">
%% -*- mode: erlang; erlang-indent-level: 2 -*-
%%% Created :  7 May 2012 by mats cronqvist <masse@klarna.com>

%% @doc
%% Demonstrates how to print a record.
%% @end

-module('ex').
-author('mats cronqvist').
-export([demo/0,
         rec_info/1]).

-record(demo,{a="One",b="Two",c="Three",d="Four"}).

rec_info(demo) -> record_info(fields,demo).

demo() -> expand_recs(?MODULE,#demo{a="A",b="BB"}).

expand_recs(M,List) when is_list(List) ->
  [expand_recs(M,L)||L<-List];
expand_recs(M,Tup) when is_tuple(Tup) ->
  case tuple_size(Tup) of
    L when L < 1 -> Tup;
    L ->
      try
        Fields = M:rec_info(element(1,Tup)),
        L = length(Fields)+1,
        lists:zip(Fields,expand_recs(M,tl(tuple_to_list(Tup))))
      catch
        _:_ -> list_to_tuple(expand_recs(M,tuple_to_list(Tup)))
      end
  end;
expand_recs(_,Term) ->
  Term.
</textarea></form>

MIME types defined: text/x-erlang.

<!doctype html>

<title>CodeMirror: Fortran mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">

<link rel="stylesheet" href="../../lib/codemirror.css">

CodeMirror

Home

Manual

Code

Language modes

Fortran

Fortran mode

<textarea id="code" name="code">
! Example Fortran code


on + -3.940510424527919E-20;
        double tempA = intPartA * fracPartA;
        double tempB = intPartA * fracPartB + intPartB * fracPartA + intPartB * fracPartB;
        double tempC = tempB + tempA;
        if (tempC == Double.POSITIVE_INFINITY) {
            return Double.POSITIVE_INFINITY;
        }
        double result = extra != 0.0 ? tempC * extra * z + tempC * extra + tempC * z + tempB + tempA : tempC * z + tempB + tempA;
        if (hiPrec != null) {
            hiPrec[0] = tempA;
            hiPrec[1] = tempC * extra * z + tempC * extra + tempC * z + tempB;
        }
        return result;
    }

    public static double expm1(double x) {
        return FastMath.expm1(x, null);
    }

    private static double expm1(double x, double[] hiPrecOut) {
        if (x != x || x == 0.0) {
            return x;
        }
        if (x <= -1.0 || x >= 1.0) {
            double[] hiPrec = new double[2];
            FastMath.exp(x, 0.0, hiPrec);
            if (x > 0.0) {
                return -1.0 + hiPrec[0] + hiPrec[1];
            }
            double ra = -1.0 + hiPrec[0];
            double rb = -(ra + 1.0 - hiPrec[0]);
            return ra + (rb += hiPrec[1]);
        }
        boolean negative = false;
        if (x < 0.0) {
            x = -x;
            negative = true;
        }
        int intFrac = (int)(x * 1024.0);
        double tempA = ExpFracTable.EXP_FRAC_TABLE_A[intFrac] - 1.0;
        double tempB = ExpFracTable.EXP_FRAC_TABLE_B[intFrac];
        double temp = tempA + tempB;
        tempB = -(temp - tempA - tempB);
        tempA = temp;
        temp = tempA * 1.073741824E9;
        double baseA = tempA + temp - temp;
        double baseB = tempB + (tempA - baseA);
        double epsilon = x - (double)intFrac / 1024.0;
        double zb = 0.008336750013465571;
        zb = zb * epsilon + 0.041666663879186654;
        zb = zb * epsilon + 0.16666666666745392;
        zb = zb * epsilon + 0.49999999999999994;
        zb *= epsilon;
        double za = epsilon;
        double temp2 = za + (zb *= epsilon);
        zb = -(temp2 - za - zb);
        za = temp2;
        temp2 = za * 1.073741824E9;
        temp2 = za + temp2 - temp2;
        zb += za - temp2;
        za = temp2;
        double ya = za * baseA;
        temp2 = ya + za * baseB;
        double yb = -(temp2 - ya - za * baseB);
        ya = temp2;
        temp2 = ya + zb * baseA;
        yb += -(temp2 - ya - zb * baseA);
        ya = temp2;
        temp2 = ya + zb * baseB;
        yb += -(temp2 - ya - zb * baseB);
        ya = temp2;
        temp2 = ya + baseA;
        yb += -(temp2 - baseA - ya);
        ya = temp2;
        temp2 = ya + za;
        yb += -(temp2 - ya - za);
        ya = temp2;
        temp2 = ya + baseB;
        yb += -(temp2 - ya - baseB);
        ya = temp2;
        temp2 = ya + zb;
        yb += -(temp2 - ya - zb);
        ya = temp2;
        if (


s: " + isZero);

        }
    }

    /* good2() reverses the bodies in the if statement */
    private void good2() throws Throwable
    {
        if (IO.STATIC_FINAL_FIVE == 5)
        {
            int zeroOrOne = (new SecureRandom()).nextInt(2); /* i will be 0 or 1 */
            boolean isZero = (zeroOrOne == 0);
            if(isZero == true) /* FIX: using == instead of = */
            {
                IO.writeLine("zeroOrOne is 0");
            }
            IO.writeLine("isZero is: " + isZero);
        }
    }

    public void good() throws Throwable
    {
        good1();
        good2();
    }

    /* Below is the main(). It is only used when building this testcase on
     * its own for testing or for building a binary to use in testing binary
     * analysis tools. It is not used when compiling all the testcases as one
     * application, which is how source code analysis tools are tested.
     */
    public static void main(String[] args) throws ClassNotFoundException,
           InstantiationException, IllegalAccessException
    {
        mainFromParent(args);
    }
}
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE470_Unsafe_Reflection__PropertiesFile_71a.java
Label Definition File: CWE470_Unsafe_Reflection.label.xml
Template File: sources-sink-71a.tmpl.java
*/
/*
 * @description
 * CWE: 470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
 * BadSource: PropertiesFile Read data from a .properties file (in property named data)
 * GoodSource: Set data to a hardcoded class name
 * Sinks:
 *    BadSink : Instantiate class named in data
 * Flow Variant: 71 Data flow: data passed as an Object reference argument from one method to another in different classes in the same package
 *
 * */

package testcases.CWE470_Unsafe_Reflection;

import testcasesupport.*;

import javax.servlet.http.*;

import java.util.Properties;

import java.io.FileInputStream;
import java.io.IOException;

import java.util.logging.Level;

public class CWE470_Unsafe_Reflection__PropertiesFile_71a extends AbstractTestCase
{
    public void bad() throws Throwable
    {
        String data;

        data = ""; /* Initialize data */

        /* retrieve the property */
        {
            Properties properties = new Properties();
            FileInputStream streamFileInput = null;

            try
            {
                streamFileInput = new FileInputStream("../common/config.properties");
                properties.load(streamFileInput);

                /* POTENTIAL FLAW: Read data from a .properties file */
                data = properties.getProperty("data");
            }
            catch (IOException exceptIO)
            {
                IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
            }
            finally
            {
                /* Close stream reading object */
                try
                {
                    if (streamFileInput != null)
                    {
                        streamFileInput.close();
                    }
                }
                catch (IOException exceptIO)
                {
                    IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO);
                }
            }
        }

        (new CWE470_Unsafe_Reflection__PropertiesFile_71b()).badSink((Object)data  );
    }

    public void good() throws Throwable
    {
        goodG2B();
    }

    /* goodG2B() - use goodsource and badsink */
    private void goodG2B() throws Throwable
    {
        String data;

        /* FIX: Use a hardcoded class name */
        data = "Testing.test";

        (new


 */
    #[allow(dead_code)]
    pub fn randomize(&mut self) {
        let trows = tiles_spanning(self.rows);
        let tcols = tiles_spanning(self.cols_main);
        let taugs = tiles_spanning(self.cols_aug);
        let ebits = Tile::EDGE_BITS;
        let last_col_mask = if self.cols_main%ebits != 0 {
            Tile::cols_mask(0,self.cols_main%ebits)
        } else {
            Tile::FULL
        };
        let last_aug_mask = if self.cols_aug%ebits != 0 {
            Tile::cols_mask(0,self.cols_aug%ebits)
        } else {
            Tile::FULL
        };
        for trow in 0..trows {
            let row_mask = if trow==trows-1 && self.rows%ebits != 0 {
                Tile::rows_mask(0,self.rows%ebits)
            } else {
                Tile::FULL
            };
            for tcol in 0..tcols {
                let col_mask = if tcol==tcols-1 { last_col_mask } else { Tile::FULL };
                self.tiles[self.stride*trow+tcol] = thread_rng().gen::<Tile>() & row_mask & col_mask;
            }
            for taug in 0..taugs {
                let aug_mask = if taug==taugs-1 { last_aug_mask } else { Tile::FULL };
                self.tiles[self.stride*trow+tcols+taug] = thread_rng().gen::<Tile>() & row_mask & aug_mask;
            }
        }
        // debug_assert!(self.is_valid());
    }

    /** Return mutable aliases to two different rows of self.
     * Must be different to satisfy the borrow checker.
     */
    #[inline(always)]
    fn two_rows(&mut self, r1:usize, r2:usize, start:usize) -> (&mut [Tile], &mut [Tile]) {
        let ttotal = tiles_spanning(self.cols_main) + tiles_spanning(self.cols_aug);
        assert!(start < ttotal);
        let stride = self.stride;
        let (r1,r2) = if r1 < r2 {
            let (lo,hi) = self.tiles.split_at_mut(r2*stride);
            (&mut lo[r1*stride..], hi)
        } else if r2 < r1 {
            let (lo,hi) = self.tiles.split_at_mut(r1*stride);
            (hi, &mut lo[r2*stride..])
        } else {
            panic!("two_rows must be disjoint!");
        };
        (&mut r1[start..ttotal], &mut r2[start..ttotal])
    }

    /**
     * Put self in row-reduced echelon form.
     * Return the rank and a set of which columns are in echelon
     */
    #[inline(always)]
    pub fn rref(&mut self) -> (usize, BitSet) { matrix_rref::runtime(self) }

    /* Place the columns of the other matrix next to this one's, and add their aug components */
    pub fn append_columns(&self, rhs: &Matrix) -> Matrix {
        matrix_append_columns::runtime(self,rhs)
    }

    /**
     * Splits self into two matrices, nondestructively.
     * If want_yes, the first will contain columns where which_to_take == true.
     * If want_no, the second will contain columns where which_to_take == false, and the aug columns.
     * Unwanted outputs will be the trivial matrix.
     *
     * PERF: could do by groups of columns maybe, to improve cache usage??
     */
    pub fn partition_columns(
        &self, columns: &BitSet,
        columns_before: usize,
        columns_after: usize,
        want_yes: bool,
        want_no: bool
    ) -> (Matrix, Matrix) {
        // debug_assert!(self.is_valid());


4 */	beq lbl_8047EE48
/* 8047ED68 0047A2A8  7C 9F 02 14 */	add r4, r31, r0
/* 8047ED6C 0047A2AC  54 C3 E8 FE */	srwi r3, r6, 3
/* 8047ED70 0047A2B0  7C 86 22 14 */	add r4, r6, r4
/* 8047ED74 0047A2B4  7C 69 03 A6 */	mtctr r3
/* 8047ED78 0047A2B8  2C 06 00 08 */	cmpwi r6, 8
/* 8047ED7C 0047A2BC  41 80 00 CC */	blt lbl_8047EE48
lbl_8047ED80:
/* 8047ED80 0047A2C0  A1 01 00 0C */	lhz r8, 0xc(r1)
/* 8047ED84 0047A2C4  7C C3 07 34 */	extsh r3, r6
/* 8047ED88 0047A2C8  38 C6 FF F8 */	addi r6, r6, -8
/* 8047ED8C 0047A2CC  7C FF 42 14 */	add r7, r31, r8
/* 8047ED90 0047A2D0  7C E3 38 AE */	lbzx r7, r3, r7
/* 8047ED94 0047A2D4  7C E4 41 AE */	stbx r7, r4, r8
/* 8047ED98 0047A2D8  A0 E1 00 0C */	lhz r7, 0xc(r1)
/* 8047ED9C 0047A2DC  7D 1F 3A 14 */	add r8, r31, r7
/* 8047EDA0 0047A2E0  7C E4 3A 14 */	add r7, r4, r7
/* 8047EDA4 0047A2E4  7D 03 42 14 */	add r8, r3, r8
/* 8047EDA8 0047A2E8  89 08 FF FF */	lbz r8, -1(r8)
/* 8047EDAC 0047A2EC  99 07 FF FF */	stb r8, -1(r7)
/* 8047EDB0 0047A2F0  A0 E1 00 0C */	lhz r7, 0xc(r1)
/* 8047EDB4 0047A2F4  7D 1F 3A 14 */	add r8, r31, r7
/* 8047EDB8 0047A2F8  7C E4 3A 14 */	add r7, r4, r7
/* 8047EDBC 0047A2FC  7D 03 42 14 */	add r8, r3, r8
/* 8047EDC0 0047A300  89 08 FF FE */	lbz r8, -2(r8)
/* 8047EDC4 0047A304  99 07 FF FE */	stb r8, -2(r7)
/* 8047EDC8 0047A308  A0 E1 00 0C */	lhz r7, 0xc(r1)
/* 8047EDCC 0047A30C  7D 1F 3A 14 */	add r8, r31, r7
/* 8047EDD0 0047A310  7C E4 3A 14 */	add r7, r4, r7
/* 8047EDD4 0047A314  7D 03 42 14 */	add r8, r3, r8
/* 8047EDD8 0047A318  89 08 FF FD */	lbz r8, -3(r8)
/* 8047EDDC 0047A31C  99 07 FF FD */	stb r8, -3(r7)
/* 8047EDE0 0047A320  A0 E1 00 0C */	lhz r7, 0xc(r1)
/* 8047EDE4 0047A324  7D 1F 3A 14 */	add r8, r31, r7
/* 8047EDE8 0047A328  7C E4 3A 14 */	add r7, r4, r7
/* 8047EDEC 0047A32C  7D 03 42 14 */	add r8, r3, r8
/* 8047EDF0 0047


t 'package:bridze/widgets/institution.dart';

final List<Institution> paju2 = [
  Institution(
    name: '샛별 아동심리발달센터 운정점',
    phoneNumber: '031-949-6694',
    imagePath: 'assets/images/paju4.png',
    address: '경기 파주시 교하로159번길 33 목동프라자 5층 505호',
  ),
  Institution(
    name: '안녕심리발달센터',
    phoneNumber: '031-953-3233',
    imagePath: 'assets/images/paju5.png',
    address: '경기 파주시 문산읍 당동2로 1 홈프라자 401-1호',
  ),
  Institution(
    name: '행복한아동심리언어센터',
    phoneNumber: '0507-1439-1802',
    imagePath: 'assets/images/paju6.png',
    address: '경기 파주시 와석순환로 135',
  ),
];
// import 'package:chucker_flutter/chucker_flutter.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter/services.dart';
// import 'package:flutter_gen/gen_l10n/app_localizations.dart';
// import 'package:get/get_navigation/src/root/get_material_app.dart';
// import 'package:vcm360/core/app_theme.dart';
// import 'package:vcm360/di.dart';
// import 'package:vcm360/l10n/service/language_service.dart';
// import 'package:vcm360/router/app_pages.dart';
//
// import 'ConfigConstants.dart';
//
// void main() async {
//   Constants.setEnvironment(Environment.PROD);
//   ChuckerFlutter.showOnRelease = false;
//   WidgetsFlutterBinding.ensureInitialized();
//   await init();
//   runApp(const MyApp());
// }
//
// class MyApp extends StatefulWidget {
//   const MyApp({Key? key}) : super(key: key);
//
//   @override
//   State<MyApp> createState() => _MyAppState();
// }
//
// class _MyAppState extends State<MyApp> {
//   final langService = getIt<LanguageService>();
//
//   @override
//   void initState() {
//     super.initState();
//     SystemChrome.setPreferredOrientations([
//       DeviceOrientation.portraitUp,
//       DeviceOrientation.portraitDown,
//     ]);
//   }
//
//   @override
//   Widget build(BuildContext context) {
//     return GetMaterialApp(
//       navigatorObservers: [


00 | 0.0100 |    5081 B |      211.71 |
| JustMockLite | 61,816.183 ns | 176,052.925 ns | 9,650.055 ns | 56,455.684 ns | 8,246.41 | 4,329.60 | 2.0400 | 2.0300 |   35209 B |    1,467.04 |
| Moq          |  4,537.526 ns |   2,884.661 ns |   158.118 ns |  4,491.125 ns |   630.30 |   370.27 | 0.2200 |      - |    3952 B |      164.67 |
| NSubstitute  |  4,136.267 ns |  37,875.296 ns | 2,076.073 ns |  5,298.865 ns |   463.96 |   128.19 | 0.4400 | 0.0100 |    7648 B |      318.67 |
| PCLMock      |  1,281.088 ns |   1,454.162 ns |    79.708 ns |  1,259.486 ns |   175.20 |    98.79 | 0.1000 |      - |    1872 B |       78.00 |
| Rocks        |     96.669 ns |     486.090 ns |    26.644 ns |     93.683 ns |    12.09 |     4.25 | 0.0200 |      - |     376 B |       15.67 |

Empty Return

| Method       | Mean          | Error          | StdDev       | Median        | Ratio    | RatioSD | Gen0   | Gen1   | Allocated | Alloc Ratio |
|------------- |--------------:|---------------:|-------------:|--------------:|---------:|--------:|-------:|-------:|----------:|------------:|
| Stub         |      8.584 ns |      77.884 ns |     4.269 ns |      8.737 ns |     1.00 |    0.00 |      - |      - |      24 B |        1.00 |
| FakeItEasy   |  2,679.150 ns |   5,918.535 ns |   324.415 ns |  2,700.822 ns |   365.43 |  166.64 | 0.2200 | 0.0100 |    3860 B |      160.83 |
| JustMockLite | 17,412.186 ns | 120,665.774 ns | 6,614.098 ns | 13,624.930 ns | 2,239.69 |  854.40 | 1.2200 | 0.1300 |   21204 B |      883.50 |
| Moq          |  2,947.453 ns |   6,008.482 ns |   329.345 ns |  2,804.481 ns |   439.14 |  303.54 | 0.1400 |      - |    2456 B |      102.33 |
| NSubstitute  |  3,535.381 ns |  14,236.632 ns |   780.358 ns |  3,973.657 ns |   463.04 |  154.33 | 0.3400 |      - |    5872 B |      244.67 |
| PCLMock      |  1,309.170 ns |   1,326.519 ns |    72.711 ns |  1,288.402 ns |   183.63 |   98.03 | 0.1000 |      - |    1872 B |       78.00 |
| Rocks        |     96.470 ns |     465.223 ns |    25.500 ns |     92.646 ns |    12.51 |    4.12 | 0.0200 |      - |     376 B |       15.67 |

Empty Method

| Method       | Mean          | Error          | StdDev       | Ratio    | RatioSD | Gen0   | Gen1   | Allocated | Alloc Ratio |
|------------- |--------------:|---------------:|-------------:|---------:|--------:|-------:|-------:|----------:|------------:|
| Stub         |      7.853 ns |      57.832 ns |     3.170 ns |     1.00 |    0.00 |      - |      - |      24 B |        1.00 |
| FakeItEasy   |  2,789.885 ns |


     super().__init__()
        self.bert = model
        self.classifier1 = torch.nn.Linear(self.bert.config.hidden_size, num_labels_task1)
        self.classifier2 = torch.nn.Linear(self.bert.config.hidden_size, num_labels_task2)

    def forward(self, input_ids):
        outputs = self.bert(input_ids=input_ids)
        pooled_output = outputs.pooler_output
        logits_task1 = self.classifier1(pooled_output)
        logits_task2 = self.classifier2(pooled_output)
        return logits_task1, logits_task2

## train decision head by score head
## for simplicity, we seperately train two heads by two model instances
for param in model.embeddings.parameters():
    param.requires_grad = False

for layer in model.encoder.layer[:12]:
    for param in layer.parameters():
        param.requires_grad = False

base_model =  AutoModelForCausalLM.from_pretrained("lmsys/vicuna-7b-v1.5", torch_dtype=torch.float32).cuda()
base_tokenizer = AutoTokenizer.from_pretrained("lmsys/vicuna-7b-v1.5")

base_model = reorder_vicuna(base_model)

base_tokenizer.padding_side = "left"
base_tokenizer.pad_token = base_tokenizer.eos_token

## How it works
# sample 100 questions from MMLU and MMLU_Pro
# traverse SLO conbinations, for each conbination, traverse all model/prompt pruning ratio conbinations, choose the minimal one that correctly answers the question.
# during training, do CEL for model/prompt pruning ratio.

# step1. sample 100 questions, e.g., 1--3 questions from each subtask
mmlu = load_dataset("cais/mmlu", name ='all', split="test")
mmlu_pro = load_dataset("TIGER-Lab/MMLU-Pro", split="test").remove_columns(["question_id", "answer", "cot_content", "src"]).rename_column('options', 'choices').rename_column('category', 'subject').rename_column('answer_index', 'answer')
dataset_mmlu = []
dataset_mmlu_pro = []
for task in MMLU_TASKS:
    dataset_mmlu.append(mmlu.filter(lambda example: example['subject'] == task).select(list(range(1))))
for task in MMLU_Pro_TASKS:
    dataset_mmlu_pro.append(mmlu_pro.filter(lambda example: example['subject'] == task).select(list(range(4))))

trainset_mmlu_raw = concatenate_datasets(dataset_mmlu)
trainset_mmlu_pro_raw = concatenate_datasets(dataset_mmlu_pro)

# step2. generate SLO conbinations
SLO_conbinations = []
for prefill_slo in PREFILL_SLO:
    for decode_slo in DECODE_SLO:
        SLO_conbinations.append(prefill_slo+ " " + decode_slo)

# step3. generate inputs (samples x slos); for each input, generate outputs (model/prompt ratios)
text_inputs = []
text_scores = []
text_choices = []
labels = []

PREFIX = "You are a smart assistant that helps human sloving problems. You help them by answering questions.\n In the following part, I will give you a question with choices. Choose the correct one you think."

scorehead = torch.load("ELASTICLLM/train_slm/vicuna/slm_scorehead.pt")
# for entry in tqdm(trainset_mmlu_raw):
#     question = entry['question']
#     choices = " "
#     for choice in entry['choices']:
#         choices += " " + choice
#     text_input = question + choices
#     text_inputs.append(text_input)

#     text_choices.append(entry['choices'])
#     labels.append(entry['answer'])
#     a = tokenizer.encode(text_input, return_tensors='pt', truncation=True, max_length=512).cuda()
#     text_score = scorehead(a).logits[:, :, 1].squeeze()
#     text_scores.append(text_score)
for entry in tqdm(trainset_mmlu_pro_raw):
    question = entry['question']
    choices = " "
    for choice in entry['choices']:
        choices += " " + choice
    text_input = question + choices
    text_inputs.append(text_input)

    text_choices.append(entry['choices'])
    labels.append(entry['answer'])
    a = tokenizer.encode(text_input, return_tensors='pt', truncation=True, max_length=512).cuda()
    text_score = scorehead(a).logits[:, :, 1].squeeze()
    text_scores.append(text_score)

# 向tokenizer中加入正交的special tokens
special_tokens_dict = {'additional_special_tokens': PREFILL_SLO + DECODE_SLO}
num_added_toks = tokenizer.add_special_tokens(special_tokens_dict)
model.resize_token_embeddings(len(tokenizer))
print(model.config.hidden_size)

one_hot_matrix = torch.eye(128).cuda()
custom_embeddings = one_hot_matrix[:num_added_toks]
embeddings = model.get_input_embeddings()
new_embeddings = torch.cat([embeddings.weight, custom_embeddings], dim=0).cuda()
embeddings.weight.data = new_embeddings

model = MultiTaskBertforSeqCLS(model, num_labels_task1=len(prompt_ratios), num_labels_task2=len(model_ratios)).cuda()

inputs =


agma inline(PVRSRVTimeTraceCpuPhyAddr)
#endif
static INLINE IMG_VOID PVRSRVTimeTraceCpuPhyAddr(IMG_UINT32 ui32Group, IMG_UINT32 ui32Class,
						IMG_UINT32 ui32Token, IMG_CPU_PHYADDR psPAddr)
{
	PVRSRVTimeTraceArray(ui32Group, ui32Class, ui32Token, PVRSRV_TRACE_TYPE_UI32,
				1, (IMG_UINT8 *) &psPAddr.uiAddr);
}

#ifdef INLINE_IS_PRAGMA
#pragma inline(PVRSRVTimeTraceDevPhysAddr)
#endif
static INLINE IMG_VOID PVRSRVTimeTraceDevPhysAddr(IMG_UINT32 ui32Group, IMG_UINT32 ui32Class,
						IMG_UINT32 ui32Token, IMG_DEV_PHYADDR psPAddr)
{
	PVRSRVTimeTraceArray(ui32Group, ui32Class, ui32Token, PVRSRV_TRACE_TYPE_UI32,
				1, (IMG_UINT8 *) &psPAddr.uiAddr);
}

#ifdef INLINE_IS_PRAGMA
#pragma inline(PVRSRVTimeTraceSysPhysAddr)
#endif
static INLINE IMG_VOID PVRSRVTimeTraceSysPhysAddr(IMG_UINT32 ui32Group, IMG_UINT32 ui32Class,
						IMG_UINT32 ui32Token, IMG_SYS_PHYADDR psPAddr)
{
	PVRSRVTimeTraceArray(ui32Group, ui32Class, ui32Token, sizeof(psPAddr.uiAddr),
				1, (IMG_UINT8 *) &psPAddr.uiAddr);
}

#else

	#define PVR_TTRACE(group, class, token) \
			((void) 0)
	#define PVR_TTRACE_UI8(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_UI16(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_UI32(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_UI64(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_DEV_VIRTADDR(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_CPU_PHYADDR(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_DEV_PHYADDR(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_SYS_PHYADDR(group, class, token, val) \
			((void) 0)
	#define PVR_TTRACE_SYNC_OBJECT(group, token, syncobj, op) \
			((void) 0)

#endif

IMG_IMPORT PVRSRV_ERROR PVRSRVTimeTraceInit(IMG_VOID);
IMG_IMPORT IMG_VOID PVRSRVTimeTraceDeinit(IMG_VOID);

IMG_IMPORT IMG_VOID PVRSRVTimeTraceSyncObject(IMG_UINT32 ui32Group, IMG_UINT32 ui32Token,
					      PVRSRV_KERNEL_SYNC_INFO *psSync, IMG_UINT8 ui8SyncOp);
IMG_IMPORT PVRSRV_ERROR PVRSRVTimeTraceBufferCreate(IMG_UINT32 ui32PID);
IMG_IMPORT PVRSRV_ERROR PVRSRVTimeTraceBufferDestroy(IMG_UINT32 ui32PID);

IMG_IMPORT IMG_VOID PVRSRVDumpTimeTraceBuffers(IMG_VOID);
#endif


.file "exp_m1l.s"

// Copyright (c) 2000, 2001, Intel Corporation
// All rights reserved.
//
// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story,
// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation.
//
// WARRANTY DISCLAIMER
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE 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.
//
// Intel Corporation is the author of this code, and requests that all
// problem reports or change requests be submitted to it directly at
// http://developer.intel.com/opensource.
//
// History
//==============================================================
// 4/04/00  Unwind support added
// 8/15/00  Bundle added after call to __libm_error_support to properly
//          set [the previously overwritten] GR_Parameter_RESULT.
//
// *********************************************************************
//
// Function:   Combined expl(x) and expm1l(x), where
//                        x
//             expl(x) = e , for double-extended precision x values
//                          x
//             expm1l(x) = e  - 1  for double-extended precision x values
//
// *********************************************************************
//
// Resources Used:
//
//    Floating-Point Registers: f8  (Input and Return Value)
//                              f9,f32-f61, f99-f102
//
//    General Purpose Registers:
//      r32-r61
//      r62-r65 (Used to pass arguments to error handling routine)
//
//    Predicate Registers:      p6-p15
//
// *********************************************************************
//
// IEEE Special Conditions:
//
//    Denormal  fault raised on denormal inputs
//    Overflow exceptions raised when appropriate for exp and expm1
//    Underflow exceptions raised when appropriate for exp and expm1
//    (Error Handling Routine called for overflow and Underflow)
//    Inexact raised when appropriate by algorithm
//
//    expl(inf) = inf
//    expl(-inf) = +0
//    expl(SNaN) = QNaN
//    expl(QNaN) = QNaN
//    expl(0) = 1
//    expl(EM_special Values) = QNaN
//    expl(inf) = inf
//    expm1l(-inf) = -1
//    expm1l(SNaN) = QNaN
//    expm1l(QNaN) = QNaN
//    expm1l(0) = 0
//    expm1l(EM_special Values) = QNaN
//
// *********************************************************************
//
// Implementation and Algorithm Notes:
//
//  ker_exp_64( in_FR  : X,
//            in_GR  : Flag,
//            in_GR  : Expo_Range
//            out_FR : Y_hi,
//            out_


itNotZero());

        CartItem cartItem = new CartItem();
        cartItem.setAmount(faker.number().randomDigitNotZero());
        cartItem.setProductVariant(productVariant);

        List<CartItem> cartItemList = new ArrayList<>();
        cartItemList.add(cartItem);

        cart.setCartItemList(cartItemList);

        // when
        Cart cartResult = cartService.calculatePrice(cart);

        // then
        Float totalPriceExpected = Float.parseFloat(twoDForm.format((productVariant.getPrice() + productVariant.getCargoPrice()) * cartItem.getAmount()));
        Float totalPriceDiscountExpected = Float.parseFloat(twoDForm.format(totalPriceExpected - totalPriceExpected * discount.getDiscountPercent() / 100));
        then(cartResult.getTotalPrice()).isEqualTo(totalPriceDiscountExpected);
        then(cartResult.getTotalCartPrice()).isEqualTo(Float.parseFloat(twoDForm.format(productVariant.getPrice() * cartItem.getAmount())));
        then(cartResult.getTotalCargoPrice()).isEqualTo(Float.parseFloat(twoDForm.format(productVariant.getCargoPrice() * cartItem.getAmount())));

    }

    @Test
    void it_should_save_cart() {

        // given
        Cart cart = new Cart();

        ArgumentCaptor<Cart> cartArgumentCaptor = ArgumentCaptor.forClass(Cart.class);
        given(cartRepository.save(cart)).willReturn(cart);

        // when
        cartService.saveCart(cart);

        //then
        verify(cartRepository).save(cartArgumentCaptor.capture());
        then(cart).isEqualTo(cartArgumentCaptor.getValue());

    }

    @Test
    void it_should_throw_exception_when_save_null_cart() {

        // when, then
        assertThatThrownBy(() -> cartService.saveCart(null))
                .isInstanceOf(InvalidArgumentException.class)
                .hasMessage("Cart is null");

    }
}/* Copyright (C) 2010 The Android Open Source Project
 *
 * 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.
 *
 * MODIFIED FOR ANTLERSOFT
 *
 * Changes for antlersoft/ vnc viewer for android
 *
 * Copyright (C) 2010 Michael A. MacDonald
 *
 * This 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; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This software 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 software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 * USA.
 */
package com.antlersoft.android.bc;

/**
 * The listener for receiving notifications when gestures occur.
 * If you want to listen for all the different gestures then implement
 * this interface. If you only want to listen for a subset it might
 * be easier to extend {@link SimpleOnScaleGestureListener}.
 *
 * An application will receive events in the following order:
 *

 *
One {@link OnScaleGestureListener#onScaleBegin(ScaleGestureDetector)}
 *
Zero or more {@link OnScaleGestureListener#onScale(S


CELLPADDING="3" CELLSPACING="0" SUMMARY="">

Field Detail

METHOD_NAME

public static final String METHOD_NAME

See Also:
Constant Field Values

Constructor Detail

HttpOptions

public HttpOptions()

HttpOptions

public HttpOptions(URI uri)

HttpOptions

public HttpOptions(String uri)

Throws:

IllegalArgumentException - if the uri is invalid.

Method Detail

getMethod

public String getMethod()

Description copied from interface: HttpUriRequest

Returns the HTTP method this request uses, such as GET,
 PUT, POST, or other.

Specified by:
getMethod in interface <A HREF="../../../../../org/apache/http/client/methods/HttpUriRequest.html" title="interface in org.apache.http.client.


 data... */
	sync
	icbi	0,9			/* and instruction caches */
	lbz	3,0(3)			/* fetch data */
	stw	5,0(9)			/* restore previous fault handler */
	dcbst	0,9			/* and flush data... */
	sync
	icbi	0,9			/* and instruction caches */
	blr

/*
 * int ipkdbsbyte(unsigned char *p, int c)
 */
	.globl	_C_LABEL(ipkdbsbyte)
_C_LABEL(ipkdbsbyte):
	li	9,EXC_DSI		/* establish new fault routine */
	lwz	5,0(9)
	lis	6,ipkdbfault@ha
	lwz	6,ipkdbfault@l(6)
	stw	6,0(9)
#ifdef	IPKDBUSERHACK
	lis	8,_C_LABEL(ipkdbsr)@ha
	lwz	8,_C_LABEL(ipkdbsr)@l(8)
	mtsr	USER_SR,8
	isync
#endif
	dcbst	0,9			/* flush data... */
	sync
	icbi	0,9			/* and instruction caches */
	mr	6,3
	xor	3,3,3
	stb	4,0(6)
	dcbst	0,6			/* Now do appropriate flushes
					   to data... */
	sync
	icbi	0,6			/* and instruction caches */
	stw	5,0(9)			/* restore previous fault handler */
	dcbst	0,9			/* and flush data... */
	sync
	icbi	0,9			/* and instruction caches */
	blr
#endif	/* NIPKDB > 0 */

/*
 * int setfault()
 *
 * Similar to setjmp to setup for handling faults on accesses to user memory.
 * Any routine using this may only call bcopy, either the form below,
 * or the (currently used) C code optimized, so it doesn't use any non-volatile
 * registers.
 */
	.globl	_C_LABEL(setfault)
_C_LABEL(setfault):
	mflr	0
	mfcr	12
	lis	4,_C_LABEL(curpcb)@ha
	lwz	4,_C_LABEL(curpcb)@l(4)
	stw	3,PCB_FAULT(4)
	stw	0,0(3)
	stw	1,4(3)
	stw	2,8(3)
	stmw	12,12(3)
	xor	3,3,3
	blr

/*
 * The following code gets copied to the top of the user stack on process
 * execution.  It does signal trampolining on signal delivery.
 *
 * On entry r1 points to a struct sigframe at bottom of current stack.
 * All other registers are unchanged.
 */
	.globl	_C_LABEL(sigcode),_C_LABEL(esigcode)
_C_LABEL(sigcode):
	addi	1,1,-16			/* reserved space for callee */
	blrl
	addi	3,1,16+8		/* compute &sf_sc */
	li	0,SYS_sigreturn
	sc				/* sigreturn(scp) */
	li	0,SYS_exit
	sc


// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ALLOCATION_GUARD_H
#define _LIBCPP___MEMORY_ALLOCATION_GUARD_H

#include <__config>
#include <__memory/addressof.h>
#include <__memory/allocator_traits.h>
#include <__utility/move.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#  pragma GCC system_header
#endif

_LIBCPP_PUSH_MACROS
#include <__undef_macros>

_LIBCPP_BEGIN_NAMESPACE_STD

// Helper class to allocate memory using an Allocator in an exception safe
// manner.
//
// The intended usage of this class is as follows:
//
// 0
// 1     __allocation_guard<SomeAllocator> guard(alloc, 10);
// 2     do_some_initialization_that_may_throw(guard.__get());
// 3     save_allocated_pointer_in_a_noexcept_operation(guard.__release_ptr());
// 4
//
// If line (2) throws an exception during initialization of the memory, the
// guard's destructor will be called, and the memory will be released using
// Allocator deallocation. Otherwise, we release the memory from the guard on
// line (3) in an operation that can't throw -- after that, the guard is not
// responsible for the memory anymore.
//
// This is similar to a unique_ptr, except it's easier to use with a
// custom allocator.
template<class _Alloc>
struct __allocation_guard {
    using _Pointer = typename allocator_traits<_Alloc>::pointer;
    using _Size = typename allocator_traits<_Alloc>::size_type;

    template<class _AllocT> // we perform the allocator conversion inside the constructor
    _LIBCPP_HIDE_FROM_ABI
    explicit __allocation_guard(_AllocT __alloc, _Size __n)
        : __alloc_(_VSTD::move(__alloc))
        , __n_(__n)
        , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important
    { }

    _LIBCPP_HIDE_FROM_ABI
    ~__allocation_guard() _NOEXCEPT {
        __destroy();
    }

    _LIBCPP_HIDE_FROM_ABI __allocation_guard(const __allocation_guard&) = delete;
    _LIBCPP_HIDE_FROM_ABI __allocation_guard(__allocation_guard&& __other) _NOEXCEPT
        : __alloc_(std::move(__other.__alloc_))
        , __n_(__other.__n_)
        , __ptr_(__other.__ptr_) {
      __other.__ptr_ = nullptr;
    }

    _LIBCPP_HIDE_FROM_ABI __allocation_guard& operator=(const __allocation_guard& __other) = delete;
    _LIBCPP_HIDE_FROM_ABI __allocation_guard& operator=(__allocation_guard&& __other) _NOEXCEPT {
        if (std::addressof(__other) != this) {
            __destroy();

            __alloc_ = std::move(__other.__alloc_);
            __n_ = __other.__n_;
            __ptr_ = __other.__ptr_;
            __other.__ptr_ = nullptr;
        }

        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    _Pointer __release_ptr() _NOEXCEPT { // not called __release() because it's a keyword in objective-c++
        _Pointer __tmp = __ptr_;
        __ptr_ = nullptr;
        return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    _Pointer __get() const _NOEXCEPT {
        return __ptr_;
    }

private:
    _LIBCPP_HIDE_FROM_ABI
    void __destroy() _NOEXCEPT {
        if (__ptr_ != nullptr) {
            allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __n_);
        }
    }

    _Alloc __alloc_;
    _Size __n_;
    _Pointer __ptr_;
};

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_ALLOCATION_GUARD_H


/*
 * "streamable kanji code filter and converter"
 * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved.
 *
 * LICENSE NOTICES
 *
 * This file is part of "streamable kanji code filter and converter",
 * which is distributed under the terms of GNU Lesser General Public
 * License (version 2) as published by the Free Software Foundation.
 *
 * This software 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 "streamable kanji code filter and converter";
 * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA  02111-1307  USA
 *
 * The author of this file:
 *
 */
/*
 * The source code included in this files was separated from mbfilter.h
 * by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file
 * mbfilter.h is included in this package .
 *
 */

#ifndef MBFL_MEMORY_DEVICE_H
#define MBFL_MEMORY_DEVICE_H

#include "mbfl_defs.h"
#include "mbfl_string.h"

#define MBFL_MEMORY_DEVICE_ALLOC_SIZE	64

typedef struct _mbfl_memory_device {
	unsigned char *buffer;
	int length;
	int pos;
	int allocsz;
} mbfl_memory_device;

typedef struct _mbfl_wchar_device {
	unsigned int *buffer;
	int length;
	int pos;
	int allocsz;
} mbfl_wchar_device;

MBFLAPI extern void mbfl_memory_device_init(mbfl_memory_device *device, int initsz, int allocsz);
MBFLAPI extern void mbfl_memory_device_realloc(mbfl_memory_device *device, int initsz, int allocsz);
MBFLAPI extern void mbfl_memory_device_clear(mbfl_memory_device *device);
MBFLAPI extern void mbfl_memory_device_reset(mbfl_memory_device *device);
MBFLAPI extern mbfl_string * mbfl_memory_device_result(mbfl_memory_device *device, mbfl_string *result);
MBFLAPI extern void mbfl_memory_device_unput(mbfl_memory_device *device);
MBFLAPI extern int mbfl_memory_device_output(int c, void *data);
MBFLAPI extern int mbfl_memory_device_output2(int c, void *data);
MBFLAPI extern int mbfl_memory_device_output4(int c, void *data);
MBFLAPI extern int mbfl_memory_device_strcat(mbfl_memory_device *device, const char *psrc);
MBFLAPI extern int mbfl_memory_device_strncat(mbfl_memory_device *device, const char *psrc, int len);
MBFLAPI extern int mbfl_memory_device_devcat(mbfl_memory_device *dest, mbfl_memory_device *src);

MBFLAPI extern void mbfl_wchar_device_init(mbfl_wchar_device *device);
MBFLAPI extern int mbfl_wchar_device_output(int c, void *data);
MBFLAPI extern void mbfl_wchar_device_clear(mbfl_wchar_device *device);

#endif /* MBFL_MEMORY_DEVICE_H */


行
- 18岁女初中毕业还近视画画还行学什么技术好？
- 别为大学学费发愁！清远启动生源地信用助学贷款“预申请”，本专科生每年最高可申请8000元
- 985英雄志 用数据说话 为你深入解析要不要报考
- 海事动态︱梧州海事志愿者开展防溺水宣传教育
- 一生中有4次机会可以改变你的命运，如果你还没有放弃自己的话
- 二建考试中常见的计算题-深圳建筑工程类培训课
- 为什么改变世界的往往是成绩不好的人，而优等生只能成为高级打工者？
- 官方发布：2018年常州市小升初特长生招生政策
- 诗译英法唯一人！许渊冲分享会将现场揭晓读者提问答案
- 家长：如果你不能回避高考，让他闭上他那张鸟嘴！
- 每日一句英语（20180512）
- 滁州学院信息学院2018考研录取人数再创新高
- 全国的中医药大学哪个好，好在哪？
- 公立医院能整体托管给个人吗？
- 理想教育3D体感互动式教学系统
- 参加广州黄埔军校「少年军旅」军事夏令营课程的收获
- 如何教育小孩？——向霍思燕学习这5种教育方法
- 全国曲艺精品再聚浙江 新秀展演获好评 进校园学生开心
- 「职教活动周」职教魅力“秀” 南商学子“能”——南京商业学校职教活动周开幕式现场报道
- USNEWS全球大学排名之日本大学排名
- 走进名校77：北京航空航天大学
- 数据工具集合，小白也能轻松上手的大数据，自助查询全网数据
- 郎咸平教授的财经观点你们认同吗？
- 一个即将毕业的大学生，必须学会什么技能？
- 中国教育培训联盟网：最好的教室就在你家的客厅
- 连比赛都这么高端！无锡市中小学创客大赛让你一饱眼福
- 学生上厕所路上摔倒，扭了脚，班主任负多大责任？
- 英语老师直言：只要搞懂这20张图，保证三年次次第一！
- 西宁必知教育新闻加餐正


"kő2sö",
      "kő1s2t",
      "kő1tr",
      "kőu2t",
      "kpára2",
      "kpá2rad",
      "kpá2r1at",
      "kpá2r1ál",
      "kpá2r1út",
      "kp2la",
      "kp2le",
      "kp2lé",
      "kp2lu",
      "kpó2t",
      "kp2ra",
      "kp2re",
      "kp2ré",
      "kp2ri",
      "kp2rí",
      "kp2ro",
      "kp2ró",
      "kp2sz",
      "k2rach",
      "kra2chi",
      "1k2rajc",
      "k2rakk",
      "kra1p",
      "krá2sz1e",
      "kren2d1ő2",
      "k2reo",
      "k2repá",
      "1k2rémh",
      "1k2réml",
      "1k2rémr",
      "kré3p2",
      "1k2rist",
      "1k2riti",
      "kro1g2",
      "1krokett.",
      "1krokod",
      "kro2n1a2",
      "kro2ná",
      "kron1d2",
      "kro2n1e",
      "kro1p2",
      "kro1str",
      "kro1sz2f",
      "kró2mar",
      "kró2m1e",
      "kró2mis",
      "k2rómo",
      "1k2rónik",
      "k2rup",
      "k2s1a2rá",
      "ks1elo",
      "ksé2gele",
      "ksé2gis",
      "kségü2l",
      "ksé2g1ülé",
      "k1s2ká",
      "ks2ko",
      "k1s2la",
      "ks2lá",
      "ks2lu",
      "ks2mi",
      "k1s2ni",
      "ks2pa",
      "ks2pe",
      "ks2pi",
      "ks2po",
      "ks2pó",
      "ksp2r",
      "ks2rá",
      "k1s2ta",
      "k1s2tá",
      "ks2ti",
      "k1s2tí",
      "ks2to",
      "k1st2r",
      "k1s2tu",
      "k1s2tú",
      "k2sz1a2d",
      "kszae2",
      "k2szagy",
      "k2sz1aj",
      "ksza2ke",
      "ksza2ké",
      "ksza2k1ü",
      "k2sz1am",
      "ksz1any",
      "ksz1aré",
      "k2sz1ág",
      "kszáraz1",
      "k2sz1e2gy",
      "k2sz1ela",
      "k2szemu",
      "k2sz1eng",
      "k2szev",
      "ksz1élet",
      "kszé2t1",
      "k2sz1id",
      "kszilá2",
      "kszi2p",
      "ksz1ipa",
      "ksz1isk",
      "k2szír",
      "k2sz1old",
      "k2szoltó",
      "k2sz1osz",
      "kszö2g1ell",
      "kszö2g1elv",
      "kszt2",
      "k2szuni",
      "k2szut",
      "k2


push-9  { left: percentage((9 / @grid-columns)); }
  .col-lg-push-10 { left: percentage((10/ @grid-columns)); }
  .col-lg-push-11 { left: percentage((11/ @grid-columns)); }

  .col-lg-pull-0  { right: auto; }
  .col-lg-pull-1  { right: percentage((1 / @grid-columns)); }
  .col-lg-pull-2  { right: percentage((2 / @grid-columns)); }
  .col-lg-pull-3  { right: percentage((3 / @grid-columns)); }
  .col-lg-pull-4  { right: percentage((4 / @grid-columns)); }
  .col-lg-pull-5  { right: percentage((5 / @grid-columns)); }
  .col-lg-pull-6  { right: percentage((6 / @grid-columns)); }
  .col-lg-pull-7  { right: percentage((7 / @grid-columns)); }
  .col-lg-pull-8  { right: percentage((8 / @grid-columns)); }
  .col-lg-pull-9  { right: percentage((9 / @grid-columns)); }
  .col-lg-pull-10 { right: percentage((10/ @grid-columns)); }
  .col-lg-pull-11 { right: percentage((11/ @grid-columns)); }

  // Offsets
  .col-lg-offset-0  { margin-left: 0; }
  .col-lg-offset-1  { margin-left: percentage((1 / @grid-columns)); }
  .col-lg-offset-2  { margin-left: percentage((2 / @grid-columns)); }
  .col-lg-offset-3  { margin-left: percentage((3 / @grid-columns)); }
  .col-lg-offset-4  { margin-left: percentage((4 / @grid-columns)); }
  .col-lg-offset-5  { margin-left: percentage((5 / @grid-columns)); }
  .col-lg-offset-6  { margin-left: percentage((6 / @grid-columns)); }
  .col-lg-offset-7  { margin-left: percentage((7 / @grid-columns)); }
  .col-lg-offset-8  { margin-left: percentage((8 / @grid-columns)); }
  .col-lg-offset-9  { margin-left: percentage((9 / @grid-columns)); }
  .col-lg-offset-10 { margin-left: percentage((10/ @grid-columns)); }
  .col-lg-offset-11 { margin-left: percentage((11/ @grid-columns)); }
}
/* EXTRAS
 * -------------------------- */

/* Stacked and layered icon */
@include icon-stack();

/* Animated rotating icon */
.icon-spin {
  display: inline-block;
  -moz-animation: spin 2s infinite linear;
  -o-animation: spin 2s infinite linear;
  -webkit-animation: spin 2s infinite linear;
  animation: spin 2s infinite linear;
}

/* Prevent stack and spinners from being taken inline when inside a link */
a .icon-stack,
a .icon-spin {
  display: inline-block;
  text-decoration: none;
}

@-moz-keyframes spin {
  0% { -moz-transform: rotate(0deg); }
  100% { -moz-transform: rotate(359deg); }
}
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(359deg); }
}
@-o-keyframes spin {
  0% { -o-transform: rotate(0deg); }
  100% { -o-transform: rotate(359deg); }
}
@-ms-keyframes spin {
  0% { -ms-transform: rotate(0deg); }
  100% { -ms-transform: rotate(359deg); }
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(359deg); }
}

/* Icon rotatio


1. Address box sizing set to `content-box` in IE 8/9.
 * 2. Remove excess padding in IE 8/9.
 */

input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
}

/**
 * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
 * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
 *    (include `-moz` to future-proof).
 */

input[type="search"] {
    -webkit-appearance: textfield; /* 1 */
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/**
 * Remove inner padding and search cancel button in Safari 5 and Chrome
 * on OS X.
 */

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/**
 * Remove inner padding and border in Firefox 4+.
 */

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/**
 * 1. Remove default vertical scrollbar in IE 8/9.
 * 2. Improve readability and alignment in all browsers.
 */

textarea {
    overflow: auto; /* 1 */
    vertical-align: top; /* 2 */
}

/* ==========================================================================
   Tables
   ========================================================================== */

/**
 * Remove most spacing between table cells.
 */

table {
    border-collapse: collapse;
    border-spacing: 0;
}/*
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
*/

.wallets>div{
	display:none;
}
.wallets>div:first-child,
.wallets>div:first-child+div,
.wallets>div:first-child+div+div,
.wallets>div:first-child+div+div+div,
.wallets>div:first-child+div+div+div+div,
.wallets>div:first-child+div+div+div+div+div,
.wallets>div:first-child+div+div+div+div+div+div,
.wallets>div:first-child+div+div+div+div+div+div+div,
.wallets>div:first-child+div+div+div+div+div+div+div+div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div{
	display:inline-block;
}

.wallets>div:first-child+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div>span{
	top:-222px;
}

.wallets>div:first-child+div+div+div+div+div+div+div+div+


dated
			elseif LastKnownUpdate[ Res.publishedfileid ] ~= Res.time_updated then
				self.ChangedModName = Res.title

				self:DestroyTimer( ModChangeTimer )

				self:NotifyOrCycle()

				return
			end
		end
	end
end

--[[
	Checks all installed mods for updates.
]]
function Plugin:CheckForModChange()
	local GetMod = Server.GetActiveModId

	local Params = {}

	Params.itemcount = Server.GetNumActiveMods()

	for i = 1, Params.itemcount do
		Params[ StringFormat( "publishedfileids[%s]", i - 1 ) ] = StringHexToNumber( GetMod( i ) )
	end

	local URL = "http://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/"
	HTTPRequest( URL, "POST", Params, self:WrapCallback( function( Response )
		self:ParseModInfo( Decode( Response ) )
	end ) )
end

--[[
	Informs connected players of the first mod in need of updating.
	Will cycle the map if the server is empty, or we've gone past the max
	number of notifications.
]]
function Plugin:NotifyOrCycle( Recall )
	if Shine.GetHumanPlayerCount() == 0 then
		self:SimpleTimer( 5, function() MapCycle_CycleMap( Shared.GetMapName() ) end )

		return
	end

	local Enabled, MapVote = Shine:IsExtensionEnabled( "mapvote" )

	--Mapvote actions
	if Enabled and not Recall then
		--Deny extension of the map.
		MapVote.Config.AllowExtend = false

		if self.Config.ForceMapvote and not MapVote:VoteStarted() then
			MapVote:StartVote( nil, true )
		elseif self.Config.ForceMapvoteAtRoundEnd then
			MapVote.VoteOnEnd = true
			MapVote.Round = MapVote.RoundLimit
			MapVote.MapCycle.time = Shared.GetTime() / 60
		end
	end

	self:SendTranslatedNotify( nil, "MOD_CHANGED", {
		ModName = self.ChangedModName
	} )
	self:NotifyTranslated( nil, "MAY_BE_UNABLE_TO_CONNECT" )

	if RemainingNotifications < Huge then
		RemainingNotifications = RemainingNotifications - 1

		local TimeBeforeChange = Ceil( RemainingNotifications * self.Config.NotifyInterval )
		if TimeBeforeChange <= 5 then
			TimeBeforeChange = 0
		end

		self:SendTranslatedNotify( nil, "MAP_CYCLE", {
			TimeLeft = TimeBeforeChange
		} )
	end

	if RemainingNotifications == 0 then
		self:SimpleTimer( 5, function() MapCycle_CycleMap( Shared.GetMapName() ) end )
		return
	end

	if self.Config.RepeatNotifications then
		self:SimpleTimer( self.Config.NotifyInterval, function()
			self:NotifyOrCycle( true )
		end )
	end
end


deletecharacters">DeleteCharacters

  UniqFilter

  Native2AsciiFilter

The following string filters are provided by the optional distribution.

  ScriptFilter

  Custom tokenizers and string filters can be declared
  using typedef task.

Some of the filters may be used directly within a filterchain. In this case
a tokenfilter is created implicitly. An extra attribute <var>byline</var> is added to
the filter to specify whether to use a linetokenizer (<var>byline</var>=<q>true</q>) or
a filetokenizer (<var>byline</var>=<q>false</q>). The default is <q>true</q>.

LineTokenizer

This tokenizer splits the input into lines.  The tokenizer delimits lines by <q>\r</q>, <q>\n</q>
or <q>\r\n</q>.  This is the default tokenizer.

    Attribute
    Description
    Required

    includeDelims

      Include the line endings in the token.

    No; default is <q>false</q>

Examples

Convert input current line endings to Unix style line endings.

<tokenfilter delimoutput="\n"/>

Remove blank lines.

<tokenfilter>
    <ignoreblank/>
</tokenfilter>

FileTokenizer

This tokenizer treats all the input as a token. So be careful not to use
this on very large input.

Examples

Replace the first occurrence of <samp>package</samp> with <samp>//package</samp>.

<tokenfilter>
      <filetokenizer/>
      <replaceregex pattern="([\n\r]+[ \t]*|^[ \t]*)package"
                    flags="s"
                    replace="\1//package"/>
</tokenfilter>

StringTokenizer

This tokenizer is based on java.util.StringTokenizer.  It splits up the
input into strings separated by white space, or by a specified list of delimiting characters.  If
the stream starts with delimiter characters, the first token will be the empty string (unless
the <var>delimsaretokens</var> attribute is used).

    Attribute
    Description
    Required

    delims
    The delimiter characters.

    No; defaults to white space as defined
      by java.lang.Char


, [sp, #-16]!
  bl      PreTaskHook
  ldp     x29,x30, [sp], #16
  ldp     x2,x3, [sp], #16
  ldp     x0,x1, [sp], #16
  #if CPU_CORE_NUMBER > 1
  str     w3,[x1, x6, lsl #2]
  #else
  str     w3,[x1]  /* restore CallLevel */
  #endif
  #endif

  ldr     x1, [x0, #0x0 ]
  mov     sp, x1
  ldr     x1, [x0,#0x08]
  br      x1

  .global Os_PortResume
  .type   Os_PortResume, %function
Os_PortResume:
  RestoreContext
  eret

  .global Os_PortActivate
  .type   Os_PortActivate, %function
Os_PortActivate:
  ldr x1, =Os_PortActivateImpl
  msr elr_el1, x1
  eret

  .global Os_PortDispatchImpl
  .type   Os_PortDispatchImpl, %function
Os_PortDispatchImpl:
  SaveContext

  ldr     x3, =RunningVar
  #if CPU_CORE_NUMBER > 1
  mrs     x6, mpidr_el1
  and     x6, x6, #3
  ldr     x4, [x3, x6, lsl #3]
  #else
  ldr     x4, [x3]
  #endif

  mov     x5, sp
  str     x5, [x4, #0x0 ]

  ldr     x12, =Os_PortResume
  str     x12, [x4, #0x08]

  /* loading system stack */
  ldr x0, =stack_top
  #if CPU_CORE_NUMBER > 1
  lsl x3, x6, #14    /*stack size is 16K(1<<14) */
  add x0, x0, x3
  #endif
  mov sp, x0

  #ifdef OS_USE_POSTTASK_HOOK
  ldr     x1, = CallLevel
  #if CPU_CORE_NUMBER > 1
  ldr     w3, [x1, x6, lsl #2]
  #else
  ldr     w3, [x1]
  #endif
  mov     w2, #8   /* CallLevel = TCL_PREPOST */
  #if CPU_CORE_NUMBER > 1
  str     w2, [x1, x6, lsl #2]
  #else
  str     w2,[x1]
  #endif
  stp     x0,x1, [sp, #-16]!
  stp     x2,x3, [sp, #-16]!
  stp     x29,x30, [sp, #-16]!
  bl      PostTaskHook
  ldp     x29,x30, [sp], #16
  ldp     x2,x3, [sp], #16
  ldp     x0,x1, [sp], #16
  #if CPU_CORE_NUMBER > 1
  str     w3,[x1, x6, lsl #2]
  #else
  str     w3,[x1]  /* restore CallLevel */
  #endif
  #endif

  b       Os_PortStartDispatchImpl

EnterISR:
  ldr     x3, =RunningVar
  #if CPU_CORE_NUMBER > 1
  mrs     x6, mpidr_el1
  and     x6, x6, #3
  ldr     x4, [x3, x6, lsl #3]
  #else
  ldr     x4, [x3]
  #endif
  cmp     x4, #0
  beq     l_nosave    /* no task is running */

  ldr     x1, =ISR2Counter
  #if CPU_CORE_


 'rxjs/operators';

@Injectable({
  providedIn: 'root'
})
export class HeroesService {

  private url= 'https://crud-angular-9f4e4.firebaseio.com';

  constructor(private http: HttpClient) {
   }

   crearHeroe(heroe: HeroeModel){
    return this.http.post(`${this.url}/heroes.json`, heroe ).pipe(
      map((resp: any) =>{
        heroe.id= resp.name;
        return heroe;
      })
    );
   }

   //Heroe tiene los valores del nombre, el poder, y el estado
   //Para actualizar solo necesitamos pasar el nombre, poder, y el estado, se debe quitar el atributo de ID
   actualizarHeroe(heroe: HeroeModel){
     const heroenoID={
       //Con el operador spreat, tomas todas las propiedades del objeto heroe y crea una nueva propiedad con el mismo nombre
       ...heroe
     };
     //Ahora simplemente elimino el atributo ID del objeto heronoID
     delete heroenoID.id;
     return this.http.put(`${this.url}/heroes/${ heroe.id}.json`, heroenoID);
   }

   //No pasamos argumentos, por que necesitamos todos los datos del objeto
   /*Para poder mostrar los registros de firebase, debemos convertir la respuesta que nos
   arroja firebase, por que esté es un objeto complejo el cual no podemos iterar en un ngFor
   por ello debemos convertirlo en un arreglo o una colección de arreglos */
   getHeroes(){
      return this.http.get(`${this.url}/heroes.json`).pipe(
        map( this.crearArreglo),
        delay(1500)
      );
   }
   //Creo un metodo privado, para no ponerlo en el método getHeroes y se pueda acceder a el
   private crearArreglo(heroesObj: Object){
    const heroes: HeroeModel[]= [];
    Object.keys(heroesObj).forEach(key =>{
      const heroe: HeroeModel= heroesObj[key];
      heroe.id = key;
      heroes.push( heroe);
    });
    return heroes;
   }

   getHero(id: string){
     return this.http.get(`${this.url}/heroes/${id}.json`);
   }

   borrarHero(id: string){
     return this.http.delete(`${this.url}/heroes/${id}.json`);
   }
}
import {InvertedIndex} from "./inverted_index";
import {IndexSearcher} from "./index_searcher";
import {Tokenizer} from "./tokenizer";
import {ANY, Dict} from "../../common/types";
import {PLUGINS} from "../../common/plugin";

export class FullTextSearch {
  private _id: string;
  private _docs: Set<any>;
  private _idxSearcher: IndexSearcher;
  private _invIdxs: Dict<InvertedIndex> = {};

  /**
   * Registers the full text search as plugin.
   */
  static register(): void {
    PLUGINS["FullTextSearch"] = FullTextSearch;
  }

  /**
   * Initialize the full text search for the given fields.
   * @param {object[]} fields - the field options
   * @param {string} fields.name - the name of the field
   * @param {boolean=true} fields.store - flag to indicate if the full text search should be stored on serialization or
   *  rebuild on deserialization
   * @param {boolean=true} fields.optimizeChanges - flag to indicate if deleting/updating a document should be optimized
   *  (requires more memory but performs better)
   * @param {Tokenizer=Tokenizer} fields.tokenizer - the tokenizer of the field
   * @param {string=$loki} id - the property name of the document index
   */
  constructor(fields: FullTextSearch.FieldOptions[] = [], id = "


	primary.Add(statefe, zmq.POLLIN)
	primary.Add(monitor, zmq.POLLIN)

	secondary1 := zmq.NewPoller()
	secondary1.Add(localfe, zmq.POLLIN)
	secondary2 := zmq.NewPoller()
	secondary2.Add(localfe, zmq.POLLIN)
	secondary2.Add(cloudfe, zmq.POLLIN)

	msg := make([]string, 0)
	for {

		//  If we have no workers ready, wait indefinitely
		timeout := time.Duration(time.Second)
		if local_capacity == 0 {
			timeout = -1
		}
		sockets, err := primary.Poll(timeout)
		if err != nil {
			break //  Interrupted
		}

		//  Track if capacity changes during this iteration
		previous := local_capacity

		//  Handle reply from local worker
		msg = msg[0:0]

		if socketInPolled(localbe, sockets) {
			msg, err = localbe.RecvMessage(0)
			if err != nil {
				break //  Interrupted
			}
			var identity string
			identity, msg = unwrap(msg)
			workers = append(workers, identity)
			local_capacity++

			//  If it's READY, don't route the message any further
			if msg[0] == WORKER_READY {
				msg = msg[0:0]
			}
		} else if socketInPolled(cloudbe, sockets) {
			//  Or handle reply from peer broker
			msg, err = cloudbe.RecvMessage(0)
			if err != nil {
				break //  Interrupted
			}
			//  We don't use peer broker identity for anything
			_, msg = unwrap(msg)
		}

		if len(msg) > 0 {

			//  Route reply to cloud if it's addressed to a broker
			to_broker := false
			for _, peer := range os.Args[2:] {
				if peer == msg[0] {
					to_broker = true
					break
				}
			}
			if to_broker {
				cloudfe.SendMessage(msg)
			} else {
				localfe.SendMessage(msg)
			}
		}

		//  If we have input messages on our statefe or monitor sockets we
		//  can process these immediately:

		if socketInPolled(statefe, sockets) {
			var status string
			m, _ := statefe.RecvMessage(0)
			_, m = unwrap(m) // peer
			status, _ = unwrap(m)
			cloud_capacity, _ = strconv.Atoi(status)
		}
		if socketInPolled(monitor, sockets) {
			status, _ := monitor.Recv(0)
			fmt.Println(status)
		}
		//  Now route as many clients requests as we can handle. If we have
		//  local capacity we poll both localfe and cloudfe. If we have cloud
		//  capacity only, we poll just localfe. We route any request locally
		//  if we can, else we route to the cloud.

		for local_capacity+cloud_capacity > 0 {
			var sockets []zmq.Polled
			var err error
			if local_capacity > 0 {
				sockets, err = secondary2.Poll(0)
			} else {
				sockets, err = secondary1.Poll(0)
			}
			if err != nil {
				panic(err)
			}

			if socketInPolled(localfe, sockets) {
				msg, _ = localfe.RecvMessage(0)
			} else if socketInPolled(cloudfe, sockets) {
				msg, _ = cloudfe.RecvMessage(0)
			} else {
				break //  No work, go back to primary
			}

			if local_capacity > 0 {
				localbe.SendMessage(workers[0], "", msg)
				workers = workers[1:]
				local_capacity--
			} else {
				//  Route to random broker peer
				random_peer := rand.Intn(len(os.Args)-2) + 2
				cloudbe.SendMessage(os.Args[random_peer], "", msg)
			}
		}
		//  We broadcast capacity messages to other p


});
		//SEND THE EMBED!
		await channel.send({content: String(Text).substring(0, 2000).split("+n+").join("\n")}).catch(()=>{});
		//Edit the reply
		interaction?.editReply({content: `✅ Message sent in ${channel}!`, ephemeral: true}).catch(()=>{});
    } catch (e) {
        console.log(String(e.stack).bgRed)
    }
  }
}
/**
  * @INFO
  * Bot Coded by bestgamershk | https://github?.com/BestGamersHK/Discord-Js-Handler-Template
  * @INFO
  * Work for BestGamersHK | discord.gg/rone
  * @INFO
  * Please mention him, when using this Code!
  * @INFO
*/
const Discord = require(`discord.js`);
const {
  MessageEmbed
} = require(`discord.js`);
const config = require(`${process.cwd()}/botconfig/config.json`);
const ee = require(`${process.cwd()}/botconfig/embed.json`);
const emoji = require(`${process.cwd()}/botconfig/emojis.json`);
const playermanager = require(`../../handlers/playermanager`);
const { handlemsg } = require(`${process.cwd()}/handlers/functions`);
module.exports = {
  name: `autoplay`,
  description: `Toggles Autoplay on/off`,
  parameters: {
    "type": "music",
    "activeplayer": true,
    "check_dj": true,
    "previoussong": false
  },
  run: async (client, interaction, cmduser, es, ls, prefix, player, message) => {

    //let es = client.settings.get(message.guild.id, "embed");let ls = client.settings.get(message.guild.id, "language")
    if (!client.settings.get(message.guild.id, "MUSIC")) {
      return interaction?.reply({ephemeral: true, embed : [new MessageEmbed()
        .setColor(es.wrongcolor)
        .setFooter(client.getFooter(es))
        .setTitle(client.la[ls].common.disabled.title)
        .setDescription(handlemsg(client.la[ls].common.disabled.description, {prefix: prefix}))
      ]});
    }
    try {
      //toggle autoplay
      player.set(`autoplay`, !player.get(`autoplay`))
      //Send Success Message
      return interaction?.reply({embeds :[new MessageEmbed()
        .setColor(es.color)
        .setTitle(eval(client.la[ls]["cmds"]["music"]["autoplay"]["variable1"]))
        .setDescription(eval(client.la[ls]["cmds"]["music"]["autoplay"]["variable2"]))
      ]});
    } catch (e) {
      console.log(String(e.stack).dim.bgRed)
    }
  }
};
/**
 * @INFO
 * Bot Coded by BestGamersHK | https://discord.gg/rone
 * @INFO
 * Work for BestGamersHK
 * @INFO
 * Please mention Him when using this Code!
 * @INFO
 */
const Discord = require(`discord.js`);
const {
  MessageEmbed
} = require(`discord.js`);
const config = require(`${process.cwd()}/botconfig/config.json`);
const ee = require(`${process.cwd()}/botconfig/embed.json`);
const emoji = require(`${process.cwd()}/botconfig/emojis.json`);
const playermanager = require(`../../handlers/playermanager`);
const { handlemsg } = require(`${process.cwd()}/handlers/functions`);
    module.exports = {
  name: `search`,
  category: `🎶 Music`,
  aliases: [`search`],
  description: `Searches a song from youtube`,
  usage: `search <Song / URL>`,
  cooldown: 5


next = next % NV;
            } else {
                if (i == 0 || i == vertices.Count - 1)
                    return 180;
            }
            Vector3d e1 = (vertices[prev] - vertices[i]);
            Vector3d e2 = (vertices[next] - vertices[i]);
            e1.Normalize(); e2.Normalize();
            return Vector3d.AngleD(e1, e2);
        }

        /// <summary>
        /// Find nearest vertex to point p
        /// </summary>
        public int NearestVertex(Vector3d p)
        {
            double nearSqr = double.MaxValue;
            int i = -1;
            int N = vertices.Count;
            for ( int vi = 0; vi < N; ++vi ) {
                double distSqr = vertices[vi].DistanceSquared(ref p);
                if ( distSqr < nearSqr ) {
                    nearSqr = distSqr;
                    i = vi;
                }
            }
            return i;
        }

        /// <summary>
        /// find squared distance from p to nearest segment on polyline
        /// </summary>
        public double DistanceSquared(Vector3d p, out int iNearSeg, out double fNearSegT)
        {
            iNearSeg = -1;
            fNearSegT = double.MaxValue;
            double dist = double.MaxValue;
            int N = (Closed) ? vertices.Count : vertices.Count - 1;
            for (int vi = 0; vi < N; ++vi) {
                int a = vi;
                int b = (vi + 1) % vertices.Count;
                Segment3d seg = new Segment3d(vertices[a], vertices[b]);
                double t = (p - seg.Center).Dot(seg.Direction);
                double d = double.MaxValue;
                if (t >= seg.Extent)
                    d = seg.P1.DistanceSquared(p);
                else if (t <= -seg.Extent)
                    d = seg.P0.DistanceSquared(p);
                else
                    d = (seg.PointAt(t) - p).LengthSquared;
                if (d < d


01) != 0)
    }
    #[doc = "Bit 21"]
    #[inline(always)]
    pub fn efuse_secure_boot_key_revoke0_err(&self) -> EFUSE_SECURE_BOOT_KEY_REVOKE0_ERR_R {
        EFUSE_SECURE_BOOT_KEY_REVOKE0_ERR_R::new(((self.bits >> 21) & 0x01) != 0)
    }
    #[doc = "Bits 18:20"]
    #[inline(always)]
    pub fn efuse_spi_boot_crypt_cnt_err(&self) -> EFUSE_SPI_BOOT_CRYPT_CNT_ERR_R {
        EFUSE_SPI_BOOT_CRYPT_CNT_ERR_R::new(((self.bits >> 18) & 0x07) as u8)
    }
    #[doc = "Bits 16:17"]
    #[inline(always)]
    pub fn efuse_wdt_delay_sel_err(&self) -> EFUSE_WDT_DELAY_SEL_ERR_R {
        EFUSE_WDT_DELAY_SEL_ERR_R::new(((self.bits >> 16) & 0x03) as u8)
    }
    #[doc = "Bits 0:15"]
    #[inline(always)]
    pub fn efuse_rpt4_reserved2_err(&self) -> EFUSE_RPT4_RESERVED2_ERR_R {
        EFUSE_RPT4_RESERVED2_ERR_R::new((self.bits & 0xffff) as u16)
    }
}
use crate::renderer::{FluidRenderingMode, SceneRenderer, VolumeVisualizationMode};
use crate::simulation_controller::{SimulationController, SimulationControllerStatus};
use crate::{
    render_output::screen::Screen,
    scene::Scene,
    simulation::{HybridFluid, SolverConfig, SolverStatisticSample},
    ApplicationEvent,
};
use std::{collections::VecDeque, path::PathBuf, time::Duration};
use strum::IntoEnumIterator;
use winit::event_loop::EventLoopProxy;

mod custom_widgets;

const SCENE_DIRECTORY: &str = "scenes";

fn list_scene_files() -> Vec<PathBuf> {
    let files: Vec<PathBuf> = std::fs::read_dir(SCENE_DIRECTORY)
        .expect(&format!("Scene directory \"{}\" not present!", SCENE_DIRECTORY))
        .map(|entry| entry.unwrap())
        .filter(|entry| entry.file_type().unwrap().is_file())
        .map(|entry| entry.path())
        .filter(|path| path.extension().unwrap_or_default() == "json")
        .collect();

    if files.len() == 0 {
        panic!("No scene files found scene directory \"{}\"", SCENE_DIRECTORY);
    }

    files
}

pub struct GUIState {
    fast_forward_length_seconds: f32,
    video_fps: i32,
    selected_scene_idx: usize,
    known_scene_files: Vec<PathBuf>,
    wait_for_vblank: bool,
}

pub struct GUI {
    platform: egui_winit_platform::Platform,
    render_pass: egui_wgpu_backend::RenderPass,

    state: GUIState,
}

struct DummyRepaintSignal;
impl epi::RepaintSignal for DummyRepaintSignal {
    fn request_repaint(&self) {}
}

impl GUI {
    pub fn new(device: &wgpu::Device, window: &winit::window::Window) -> Self {
        let mut style = egui::Style::default();
        style.visuals.code_bg_color = egui::Color32::from_rgb(64, 64, 100);

        let platform = egui_winit_platform::Platform::new(egui_winit_platform::PlatformDescriptor {
            physical_width: window.inner_size().width as u32,
            physical_height: window.inner_size().height as u32,
            scale_factor: window.scale_factor(),
            font_definitions: egui::FontDefinitions::default(),
            style,
        });

        let render_pass = egui_wgpu_backend::RenderPass::new(device, Screen::FORMAT_BACKBUFFER);

        GUI {
            platform,
            render_pass,
            state: GUIState {
                fast_forward_length_


TargetingsShareAddRequest
}

func (e *TargetingsShareAddExample) Init() {
	e.AccessToken = "YOUR ACCESS TOKEN"
	e.TAds = ads.Init(&config.SDKConfig{
		AccessToken: e.AccessToken,
		IsDebug:     true,
	})
	e.Data = model.TargetingsShareAddRequest{}
}

func (e *TargetingsShareAddExample) RunExample() (model.TargetingsShareAddResponseData, http.Header, error) {
	tads := e.TAds
	// change ctx as needed
	ctx := *tads.Ctx
	return tads.TargetingsShare().Add(ctx, e.Data)
}

func main() {
	e := &TargetingsShareAddExample{}
	e.Init()
	response, headers, err := e.RunExample()
	if err != nil {
		if resErr, ok := err.(errors.ResponseError); ok {
			errStr, _ := json.Marshal(resErr)
			fmt.Println("Response error:", string(errStr))
		} else {
			fmt.Println("Error:", err)
		}
	}
	fmt.Println("Response data:", response)
	fmt.Println("Headers:", headers)
}
/*
 * Marketing API
 *
 * Marketing API
 *
 * API version: 1.3
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */

package main

import (
	"encoding/json"
	"fmt"
	"net/http"

	"github.com/tencentad/marketing-api-go-sdk/pkg/ads"
	"github.com/tencentad/marketing-api-go-sdk/pkg/config"
	"github.com/tencentad/marketing-api-go-sdk/pkg/errors"
	"github.com/tencentad/marketing-api-go-sdk/pkg/model"
)

type TargetingsUpdateExample struct {
	TAds        *ads.SDKClient
	AccessToken string
	Data        model.TargetingsUpdateRequest
}

func (e *TargetingsUpdateExample) Init() {
	e.AccessToken = "YOUR ACCESS TOKEN"
	e.TAds = ads.Init(&config.SDKConfig{
		AccessToken: e.AccessToken,
		IsDebug:     true,
	})
	e.Data = model.TargetingsUpdateRequest{
		TargetingId: int64(0),
		Targeting: &model.WriteTargetingSetting{
			Age: &[]model.AgeStruct{{
				Max: int64(0),
				Min: int64(0),
			}},
			Gender: &[]string{"YOUR TARGETING GENDER"},
		},
		AccountId: int64(0),
	}
}

func (e *TargetingsUpdateExample) RunExample() (model.TargetingsUpdateResponseData, http.Header, error) {
	tads := e.TAds
	// change ctx as needed
	ctx := *tads.Ctx
	return tads.Targetings().Update(ctx, e.Data)
}

func main() {
	e := &TargetingsUpdateExample{}
	e.Init()
	response, headers, err := e.RunExample()
	if err != nil {
		if resErr, ok := err.(errors.ResponseError); ok {
			errStr, _ := json.Marshal(resErr)
			fmt.Println("Response error:", string(errStr))
		} else {
			fmt.Println("Error:", err)
		}
	}
	fmt.Println("Response data:", response)
	fmt.Println("Headers:", headers)
}
/*
 * Marketing API
 *
 * Marketing API
 *
 * API version: 1.3
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */

package main

import (
	"encoding/json"
	"fmt"
	"net/http


a list of urls that are currently in the sidebar."""
        if self.__sidebar is None:
            return []
        return self.__sidebar.urls()

    # State

    __serialVersion = 1
    """Store the current version of the serialized data"""

    @classmethod
    def qualifiedName(cls):
        return f"{cls.__module__}.{cls.__name__}"

    def restoreState(self, state):
        """Restores the dialogs's layout, history and current directory to the
        state specified.

        :param qt.QByteArray state: Stream containing the new state
        :rtype: bool
        """
        stream = qt.QDataStream(state, qt.QIODevice.ReadOnly)

        qualifiedName = stream.readQString()
        if qualifiedName != self.qualifiedName():
            _logger.warning(
                "Stored state contains an invalid qualified name. %s restoration cancelled.",
                self.__class__.__name__,
            )
            return False

        version = stream.readInt32()
        if version != self.__serialVersion:
            _logger.warning(
                "Stored state contains an invalid version. %s restoration cancelled.",
                self.__class__.__name__,
            )
            return False

        result = True

        splitterData = stream.readQVariant()
        sidebarUrls = stream.readQStringList()
        history = stream.readQStringList()
        workingDirectory = stream.readQString()
        browserData = stream.readQVariant()
        viewMode = stream.readInt32()
        colormapData = stream.readQVariant()

        result &= self.__splitter.restoreState(splitterData)
        sidebarUrls = [qt.QUrl(s) for s in sidebarUrls]
        self.setSidebarUrls(list(sidebarUrls))
        history = [s for s in history]
        self.setHistory(list(history))
        if workingDirectory is not None:
            self.setDirectory(workingDirectory)
        result &= self.__browser.restoreState(browserData)
        self.setViewMode(qt.QFileDialog.ViewMode(viewMode))
        colormap = self.colormap()
        if colormap is not None:
            result &= self.colormap().restoreState(colormapData)

        return result

    def saveState(self):
        """Saves the state of the dialog's layout, history and current
        directory.

        :rtype: qt.QByteArray
        """
        data = qt.QByteArray()
        stream = qt.QDataStream(data, qt.QIODevice.WriteOnly)

        s = self.qualifiedName()
        stream.writeQString("%s" % s)
        stream.writeInt32(self.__serialVersion)
        stream.writeQVariant(self.__splitter.saveState())
        strings = ["%s" % s.toString() for s in self.sidebarUrls()]
        stream.writeQStringList(strings)
        strings = ["%s" % s for s in self.history()]
        stream.writeQStringList(strings)
        stream.writeQString("%s" % self.directory())
        stream.writeQVariant(self.__browser.saveState())
        viewMode = self.viewMode()
        if qt.BINDING in ("PyQt6", "PySide6"):  # No auto conversion to int
            viewMode = viewMode.value
        stream.writeInt32(viewMode)
        colormap = self.colormap()
        if colormap is not None:
            stream.writeQVariant(self.colormap().saveState())
        else:
            stream.writeQVariant(None)

        return data


from typing import List

# def list_avg(sequence: List) -> float:
#     return sum(sequence) / len(sequence)

# list_avg(123)

class Book:
    pass
# Bookクラスは現時点では何も属性やメソッドを持っていません。passステートメントは、クラスや関数の本体が空であることを示すために使われます。

class BookShelf:
    def __init__(self, books: List[Book]):
        self.books = books
    # __init__メソッドは、クラスのインスタンスが作成されるときに自動的に呼び出される特殊なメソッド（コンストラクタ）です。
    # このメソッドは、booksという引数を受け取り、それをインスタンス変数self.booksに代入します。
    # booksはBookオブジェクトのリスト（List[Book]）であることが型ヒントで示されています。

    def __str__(self) -> str:
        return f"BookShelf with {len(self.books)} books."
    # __str__メソッドは、オブジェクトを文字列として表現するための特殊なメソッドです。
    # このメソッドは、BookShelfオブジェクトがprint()関数などで文字列として表示されるときに呼び出されます。
    # 返される文字列は、本棚に含まれる本の数を示します。例えば、本棚に5冊の本がある場合、"BookShelf with 5 books."という文字列が返されます。

# Bookオブジェクトをいくつか作成
book1 = Book()
book2 = Book()
book3 = Book()

# BookShelfオブジェクトを作成し、Bookオブジェクトのリストを渡す
shelf = BookShelf([book1, book2, book3])

# BookShelfオブジェクトを文字列として表示
print(shelf)  # 出力: "BookShelf with 3 books."