    5: {'other': '000\u1796\u17B6\u1793\u17CB'},
    6: {'other': '0 \u179B\u17B6\u1793'},
    9: {'other': '0 \u1794\u17CA\u17B8\u179B\u17B6\u1793'},
    12: {'other': '0 \u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'},
  }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const {
    3: {'other': '\u00A40\u00A0\u1796\u17B6\u1793\u17CB'},
    6: {'other': '\u00A40\u00A0\u179B\u17B6\u1793'},
    9: {'other': '\u00A40\u00A0\u1794\u17CA\u17B8\u179B\u17B6\u1793'},
    12: {'other': '\u00A40\u00A0\u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'},
  }),
  // Compact number symbols for locale kn.
  "kn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const {
    3: {'other': '0\u0CB8\u0CBE'},
    6: {'other': '0\u0CAE\u0CBF'},
    9: {'other': '0\u0CAC\u0CBF'},
    12: {'other': '0\u0C9F\u0CCD\u0CB0\u0CBF'},
  }, COMPACT_DECIMAL_LONG_PATTERN: const {
    3: {'other': '0 \u0CB8\u0CBE\u0CB5\u0CBF\u0CB0'},
    6: {'other': '0 \u0CAE\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD'},
    9: {'other': '0 \u0CAC\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD'},
    12: {
      'other': '0 \u0C9F\u0CCD\u0CB0\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD\u200C'
    },
  }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const {
    3: {'other': '\u00A40\u0CB8\u0CBE'},
    6: {'other': '\u00A40\u0CAE\u0CBF'},
    9: {'other': '\u00A40\u0CAC\u0CBF'},
    12: {'other': '\u00A40\u0C9F\u0CCD\u0CB0\u0CBF'},
  }),
  // Compact number symbols for locale ko.
  "ko": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const {
    3: {'other': '0\uCC9C'},
    4: {'other': '0\uB9CC'},
    8: {'other': '0\uC5B5'},
    12: {'other': '0\uC870'},
  }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const {
    3: {'other': '\u00A40\uCC9C'},
    4: {'other': '\u00A40\uB9CC'},
    8: {'other': '\u00A40\uC5B5'},
    12: {'other': '\u00A40\uC870'},
  }),
  // Compact number symbols for locale ky.
  "ky": new CompactNumberSy


11 の非サポート（Internet Explorer 11 は 2022年6月15日にサポート終了予定）

  https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/
---
id: release-notes-v1.0.5
title: v1.0.5 Release Notes
sidebar_label: v1.0.5 Release Notes
---

## 概要

[kintone UI Component v1.0.5](https://github.com/kintone-labs/kintone-ui-component/releases/tag/v1.0.5) のリリースノートです。

不具合修正, メンテナンス対応, カスタマイズ記事の追加を行いました。

## アップデート内容

詳細は以下になります。

### 不具合修正
- Dropdown と MultiChoice コンポーネントにて、上下矢印を押して選択肢間を移動する時のキーボード動作を修正
- Safari ブラウザにて Dropdown コンポーネントの外側をクリックした時に、正しく選択肢一覧を閉じるように修正

### メンテナンス
- Checkbox と RadioButton コンポーネントの group クラスに `role` と `aria-labelledby` のマークアップを追加
- Mobile コンポーネントの error クラスの HTML 構造を統一
- ユニットテストのソースコードを改善

### ドキュメント
- Mobile timecard customization 記事の追加
---
id: release-notes
title: v1.3.1 Release Notes
sidebar_label: v1.3.1 Release Notes
---

## 概要

[kintone UI Component v1.3.1](https://github.com/kintone-labs/kintone-ui-component/releases/tag/v1.3.1) のリリースノートです。

メンテナンス対応, ドキュメントのアップデート, セキュリティアップデートを行いました。

## アップデート内容
### メンテナンス
- Dialog コンポーネントの content と footer パーツに padding 設定を追加
  - デフォルト設定で見た目のデザインをよくするために改善を実施
- MultiChoice コンポーネントにて disabled 時の選択された項目のチェックマークカラーを変更
  - 選択されていることが分かるように色味を追加
- Dropdown メニューパーツの表示位置の挙動修正とスクロール操作の追加
- Desktop コンポーネントをアプリの HeaderMenuSpaceElement に設置した時の line-height 問題を修正

### セキュリティアップデート
- 依存ライブラリの更新：karma, engine.io, follow-redirects

### ドキュメント
- Contributing Guideline と Pull Request テンプレートの公開、issue テンプレートの更新
- 2022年のロードマップの公開と README への追記
- DatePicker と DateTimePicker コンポーネントにて language プロパティ設定によって日付の表示フォーマットが変更される仕様を追記---
id: comparison-v0-v1
title: A commentary on the difference between v0 and v1
sidebar_label: A commentary on the difference between v0 and v1
---

## 概要
**kintone UI Component** の v1 は、


     std::future<void> handle;

        void TranscodeRoutine()
        {
            using namespace std::chrono;
            MSDK_CHECK_POINTER_NO_RET(pPipeline);
            transcodingSts = MFX_ERR_NONE;

            auto start_time = system_clock::now();
            while (MFX_ERR_NONE == transcodingSts)
            {
                transcodingSts = pPipeline->Run();
            }
            working_time = duration_cast<duration<mfxF64>>(system_clock::now() - start_time).count();

            MSDK_IGNORE_MFX_STS(transcodingSts, MFX_WRN_VALUE_NOT_CHANGED);
            numTransFrames = pPipeline->GetProcessFrames();
        }
    };
}

#endif


Report();

    newReport.date = report.date;
    newReport.type = report.type;
    newReport.user = user;
    newReport.logs = logs;
    newReport.data = {
      number: num + 1,
      hours: logs.map(l => +l.duration).reduce((a, b) => a + b, 0),
      rate: report.data.rate,
      itemView: report.data.itemView,
    };

    return await this.reportRepository.save(newReport);
  }

  public async delete(id: string, user: User): Promise<Report> {
    const report: Report = await this.reportRepository.findOneOrFail({
      where: { id, user },
    });

    return this.reportRepository.remove(report);
  }
}import { Component } from '../../modules/component'

interface IAvatarInputProps {
    avatar?: string
}

export class AvatarInput extends Component<IAvatarInputProps> {
    render() {
        return `

                <input class="hidden" type="file" name="{{name}}"/>

        `
    }

    componentDidMount() {
        this.node.addEventListener('click', function() {
            const control: HTMLInputElement = (<HTMLDivElement>this).querySelector('input[type="file"]')

            control.click()
        })
    }
}import {
  Component,
  OnInit,
  Input,
  Output,
  OnDestroy,
  AfterViewInit,
  EventEmitter
} from "@angular/core";

import {
  FormBuilder,
  Validators,
  FormGroup,
  FormControl
} from "@angular/forms";
import {
  IValidationOuterMessage,
  mapValidationMessage
} from "../cxi-interfaces/IValidationMessage";

@Component({
  selector: "lib-cxi-individual-form-bsrc",
  template: `
    <ng-content></ng-content>
  `,
  styles: []
})
export class CxiIndividualFormBsrcComponent
  implements OnInit, OnDestroy, AfterViewInit {
  /**
   * A Standard Angular Input Decorator.
   * Replace or remove default validation message <individualFormGroupValidationMessage> or Adding more type into validation message.
   *
   * e.g.
   * replace the firstName Message and add one more error type message with the below message.
   * ```ts
   * this.validationMessageOptions = {
   *   firstName: [
   *     {
   *       type: "required",
   *       message: "First Name is Required for Advisor Portal!!"
   *     },
   *    {
   *       type: "alphabetOnly",
   *       message: "First Name Only Allow English Letters."
   *     }
   *   ]
   * };
   * ```
   *
   * @param   validationMessage - IValidationOuterMessage
   * @returns $event - IValidationOuterMessage
   *
   */
  @Input()
  set setValidationMessage(validationMessage: IValidationOuterMessage) {
    this.individualFormGroupValidationMessage = mapValidationMessage(
      validationMessage,
      this.individualFormGroupValidationMessage
    );
    this.validationMessageEmit.emit(this.individualFormGroupValidationMessage);
  }

  /**
   *
   * A Standard Angular Output Decorator.
   * Emit a FormGroup to parent component for validate trigger purpose.
   *
   * @remarks
   * This method is an UI extension of cxi business logic component <cxi-individual-form-bsrc>
   *
   * @returns $event : FormGroup
   *
   */

  @Output() formGroupEmit? = new EventEmitter<FormGroup>();

  /**
   * A Standard Angular Output Decorator.
   * Emit a ValidationMessage to parent component for validation purpose.
   *


				if (Character.isWhitespace(cp))
				{
					whiteIndex = i
					whiteRun = 0
					do
					{
						val sz = Character.charCount(cp)
						i += sz
						whiteRun += sz
						cp =
							if (i < wideLimit) s.codePointAt(i) else 'x'.code
					}
					while (Character.isWhitespace(cp))
					break
				}
				else
				{
					i += Character.charCount(cp)
				}
			}
			if (whiteIndex == 0)
			{
				// If no whitespace characters were ever discovered and the
				// limit was exceeded, then answer the entire string as the
				// line and empty residue.
				assert(whiteRun == 0)
				return s to ""
			}
			return Pair(
				s.substring(0, whiteIndex),
				s.substring(whiteIndex + whiteRun))
		}

		/**
		 * Emit a block comment. A best effort will be made to keep the lines of
		 * the block comment within the specified [limit][charactersPerLine],
		 * accounting for indentation and comment overhead.
		 *
		 * @param comment
		 *   The block comment.
		 * @throws IOException
		 *   If emission fails.
		 */
		@Throws(IOException::class)
		fun blockComment(comment: String)
		{
			val limit = max(1, charactersPerLine - 4 * indentationLevel - 3)
			var residue = comment
			while (residue.isNotEmpty())
			{
				val pair = extractLine(residue, limit)
				val line = pair.first
				indent()
				endOfLineComment(line)
				residue = pair.second
			}
		}

		/**
		 * Is the alleged identifier actually a `dot` keyword?
		 *
		 * @param id
		 *   The would-be identifier.
		 * @return
		 *   `true` if the would-be identifier is actually a `dot` keyword,
		 *   `false` otherwise.
		 */
		private fun isKeyword(id: String) = keywords.contains(id)

		/**
		 * Emit an appropriately escaped variant of the proposed identifier.
		 *
		 * @param proposedId
		 *   The identifier.
		 * @throws IOException
		 *   If emission fails.
		 */
		@Throws(IOException::class)
		internal fun identifier(proposedId: String)
		{
			val id: String
			when
			{
				isKeyword(proposedId) ->
					// If the proposed identifier is a keyword, then it needs to
					// be quoted before it can be used as an identifier.
					id = """"$proposedId""""
				tokenPattern.matcher(proposedId).matches() ->
					// The proposed identifier comprises only alphanumerics, so
					// it doesn't require any escaping.
					id = proposedId
				proposedId.startsWith("<") ->
					// The proposed identifier is HTML-like, so escape it inside
					// angle brackets.
					id = "<$proposedId>"
				else ->
					// The proposed identifier contains problematic characters,
					// so it must be appropriately escaped.
					id = "\"" + proposedId.codePoints()
						.mapToObj { cp ->
							val s = when (cp)
							{
								'\"'.code -> "\\\""
								'\n'.code -> "\\n"
								else -> String(Character.toChars(cp))
							}
							s
						}
						.collect(Collectors.joining()) + "\""
			}
			emit(id)
		}

		/**
		 * Emit a simple attribute statement.
		 *
		 * @param lhs
		 *   The assignment target.
		 * @param rhs
		 *   The value to bind to the assignment target.
		 * @throws IOException
		 *   If emission fails.
		 */
		@Throws(IOException::class)
		fun attribute(lhs: String, rhs: String)
		{
			val isColor = lhs.contains("color")
			indent()
			identifier(lhs)
			emit(" = ")
			identifier(if (isColor) adjust(rhs) else rhs)
			linefeed()
		}

		/**
		 * Answer


c-section81 .g-table .btn4{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAXVBMVEUAAACOjo6Hh4eKioqJiYmLi4uLi4uIiIiKioqJiYmJiYmKioqJiYmJiYmJiYmJiYmKioqJiYmKioqKioqKioqJiYmKioqKioqKioqJiYmKioqJiYmKioqKioqKiooum5b9AAAAHnRSTlMAEiQlNjdASUpbbG1ugIiRkpOjpbW2t8DI2drb3O3DrtjzAAABiElEQVR42u3d2W6CQACGUewibdVK69LFtu//mL3+G0ORjELkfLeTmXiCF4ADVpUkSZI07RZvRXrNVTdlVl2cAHn5KdIhV/0qs2oDAgICAgICAgIyCkiTn2fVuX1M/GyD7Lqveih0RHbdJy67H5ETzsb3ICAgICAgICAgI4SsY+Y2B+fRLG8ax8SPNshTjM1y1Zy4jYnrUkckrw7qMkfkIVe9yFcLBAQEBAQEBAQEZDqn8a4QQUBAQEBAQEBAqupqt3DYHQQCAgICAgICAnKkq3l8T5IkSZpOg1+PnOdnBRAQEBAQEBAQEJAj5Qbm93nnmu4bmFvL29bfMTa2DcwD/D4CAgICAgICAgJSEtK0QXJz8U0L5IQNzJsBjkgue54HKkFAQEBAQEBAQMYPaX15Rd6XvYux3i+vuL/E/48M/kBlqb0oICAgICAgICAgIP+exveu/2l8Tnwe9d8IDvB6QxAQEBAQEBAQkJKQelWkP+epyxjMu9+3OTMnPsZYXUmSJEmSJEmSptEvIzdZQ86kYUAAAAAASUVORK5CYII=)}#uicut-app .uc-section81 .total{text-align:right;line-height:50px}#uicut-app .uc-section91{padding:60px 10px 10px 10px;background-color:#fff}#uicut-app .uc-section91 .title{background-color:#f5f5f5;line-height:40px;padding-left:20px;margin-bottom:20px}#uicut-app .uc-section91 .form li{position:relative;padding-left:220px;line-height:32px;margin-bottom:20px}#uicut-app .uc-section91 .form .tt{position:absolute;left:0;width:200px;text-align:right}#uicut-app .uc-section91 .form input[type=text],#uicut-app .uc-section91 .form select{width:400px;height:32px;border-radius:0;float:left;margin-right:10px}#uicut-app .uc-section91 .form input[type=text].w50,#uicut-app .uc-section91 .form select.w50{


le(void)
{
	int rc;

	rc = register_pernet_subsys(&geneve_net_ops);
	if (rc)
		goto out1;

	rc = register_netdevice_notifier(&geneve_notifier_block);
	if (rc)
		goto out2;

	rc = rtnl_link_register(&geneve_link_ops);
	if (rc)
		goto out3;

	return 0;
out3:
	unregister_netdevice_notifier(&geneve_notifier_block);
out2:
	unregister_pernet_subsys(&geneve_net_ops);
out1:
	return rc;
}
late_initcall(geneve_init_module);

static void __exit geneve_cleanup_module(void)
{
	rtnl_link_unregister(&geneve_link_ops);
	unregister_netdevice_notifier(&geneve_notifier_block);
	unregister_pernet_subsys(&geneve_net_ops);
}
module_exit(geneve_cleanup_module);

MODULE_LICENSE("GPL");
MODULE_VERSION(GENEVE_NETDEV_VER);
MODULE_AUTHOR("John W. Linville <linville@tuxdriver.com>");
MODULE_DESCRIPTION("Interface driver for GENEVE encapsulated traffic");
MODULE_ALIAS_RTNL_LINK("geneve");


/* Copyright (c) 2003-2004, Roger Dingledine
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
 * Copyright (c) 2007-2021, The Tor Project, Inc. */
/* See LICENSE for licensing information */

/**
 * \file cmp.h
 *
 * \brief Macro definitions for MIN, MAX, and CLAMP.
 **/

#ifndef TOR_INTMATH_CMP_H
#define TOR_INTMATH_CMP_H

/** Macros for MIN/MAX.  Never use these when the arguments could have
 * side-effects.
 * {With GCC extensions we could probably define a safer MIN/MAX.  But
 * depending on that safety would be dangerous, since not every platform
 * has it.}
 **/
#ifndef MAX
#define MAX(a,b) ( ((a)<(b)) ? (b) : (a) )
#endif
#ifndef MIN
#define MIN(a,b) ( ((a)>(b)) ? (b) : (a) )
#endif

/* Return v if it's between min and max.  Otherwise
 * return min if v is smaller than min, or max if
 * b is larger than max.
 *
 * Requires that min is no more than max. May evaluate any of
 * its arguments more than once! */
#define CLAMP(min,v,max)                        \
  ( ((v) < (min)) ? (min) :                     \
    ((v) > (max)) ? (max) :                     \
    (v) )

/** Give the absolute value of x, independent of its type. */
#define ABS(x) ( ((x)<0) ? -(x) : (x) )

#endif /* !defined(TOR_INTMATH_CMP_H) */


.wd32,V.hR,V.cd4)","=A(V.wd32,V.hR,(V.cd4 + V.cd2))","=IF(V.cd2 > 0, FALSE, TRUE)"],["L",V,0],["L","=V.x10","=V.y3"],["L",V,"=V.y4"],["L","=V.x9","=V.y4"],["L","=V.x9","=V.y5"],["E","=V.cx15","=V.cy15","=V.wd32","=V.hR",0,"=A(V.wd32,V.hR,0)","=A(V.wd32,V.hR,(V.cd4))","=IF(V.cd4 > 0, FALSE, TRUE)"],["L","=V.x3",n],["E","=V.cx16","=V.cy16","=V.wd32","=V.hR",0,"=A(V.wd32,V.hR,V.cd4)","=A(V.wd32,V.hR,(V.cd4 + V.cd4))","=IF(V.cd4 > 0, FALSE, TRUE)"],["L",d,"=V.y4"],["L",0,"=V.y4"],["L","=V.wd8","=V.y3"],["Z"],["M","=V.x5","=V.hR"],["L","=V.x5",s],["M","=V.x6",s],["L","=V.x6","=V.hR"],["M",d,"=V.y4"],["L",d,"=V.y6"],["M","=V.x9","=V.y6"],["L","=V.x9","=V.y4"],{fillMode:"none"}]],textRect:{left:d,top:s,right:"=V.x9",bottom:n}},curvedUpRibbon:{variables:{adj1:25e3,adj2:5e4,adj3:12500,a1:"=MIN(MAX(0, V.adj1), 100000)",a2:"=MIN(MAX(25000, V.adj2), 75000)",q10:"=100000 - V.a1",q11:"=V.q10 / 2",q12:"=V.a1 - V.q11",minAdj3:"=MAX(0, V.q12)",a3:"=MIN(MAX(V.minAdj3, V.adj3), V.a1)",dx2:"=width * V.a2 / 200000",hc:y,x2:"=V.hc - V.dx2",wd8:"=width/8",x3:"=V.x2 + V.wd8",r:V,x4:"=width - V.x3",x5:"=width - V.x2",x6:"=width - V.wd8",dy1:"=height * V.a3 / 100000",f1:"=4 * V.dy1 / width",q1:"=V.x3 * V.x3 / width",q2:"=V.x3 - V.q1",u1:"=V.f1 * V.q2",b:n,y1:"=height - V.u1",cx1:"=V.x3 / 2",cu1:"=V.f1 * V.cx1",cy1:"=height - V.cu1",cx2:"=width - V.cx1",_q1:"=height * V.a1 / 100000",dy3:"=V._q1 - V.dy1",q3:"=V.x2 * V.x2 / width",q4:"=V.x2 - V.q3",q5:"=V.f1 * V.q4",u3:"=V.q5 + V.dy3",y3:"=height - V.u3",q6:"=V.dy1 + V.dy3 - V.u3",q7:"=V.q6 + V.dy1",cu3:"=V.q7 + V.dy3",cy3:"=height - V.cu3",rh:"=height - V._q1",q8


ionKnowledgeRegulatorySchedule", "BackboneElement")
export class MedicationKnowledgeRegulatorySchedule extends BackboneElement {
  static readonly baseType: string = "FHIR.BackboneElement";

  static readonly namespace: string = "FHIR";

  static readonly typeName: string = "MedicationKnowledge.Regulatory.Schedule";

  static readonly primaryCodePath: string | null = null;

  @FhirField("CodeableConcept")
  public schedule?: CodeableConcept;

  public static parse(
    json: IMedicationKnowledgeRegulatorySchedule,
    providedInstance: MedicationKnowledgeRegulatorySchedule = new MedicationKnowledgeRegulatorySchedule()
  ): MedicationKnowledgeRegulatorySchedule {
    const newInstance: MedicationKnowledgeRegulatorySchedule = BackboneElement.parse(json, providedInstance);

    if (json.schedule !== undefined) {
      newInstance.schedule = CodeableConcept.parse(json.schedule);
    }
    return newInstance;
  }

  public static isMedicationKnowledgeRegulatorySchedule(input?: unknown): input is MedicationKnowledgeRegulatorySchedule {
    const castInput = input as MedicationKnowledgeRegulatorySchedule;
    return !!input && castInput.getTypeName && castInput.getTypeName() === "MedicationKnowledgeRegulatorySchedule";
  }

  public toJSON(): IMedicationKnowledgeRegulatorySchedule {
    const result: IMedicationKnowledgeRegulatorySchedule = super.toJSON();

    if (this.schedule) {
      result.schedule = this.schedule.toJSON();
    }

    return result;
  }

  public clone(): MedicationKnowledgeRegulatorySchedule {
    return MedicationKnowledgeRegulatorySchedule.parse(this.toJSON());
  }

  public getTypeName(): string {
    return "MedicationKnowledgeRegulatorySchedule";
  }
}
/* eslint-enable import/prefer-default-export, import/no-cycle */
import { ProxyManager } from "./ProxyManager";
import { ChildProcess, spawn } from "child_process";
import { sleep, tempDir } from "../util/Util";

export class Tor extends ProxyManager {
	private process?: ChildProcess;
	private intalized: boolean;

	constructor(port: number) {
		super("socks5", "localhost", port);
	}

	public static get available() {
		return 100000;
	}

	async init() {
		if (this.intalized) return;
		this.intalized = true;

		const dir = await tempDir();
		this.process = spawn("tor", `--SocksPort ${this.port} --DataDirectory ${dir}`.split(" "));
		await new Promise((resolve, reject) => {
			let history = "";
			this.process?.stdout?.on("data", (log) => {
				log = log.toString().slice(0, -1);
				history += log;
				if (log.includes("100% (done)")) resolve(true);
				if (log.includes("[err]")) reject(history);
			});
		});
	}

	async release() {
		this.process?.kill("SIGHUP");
		await sleep(500);
		this.emit("released", this);
		return this;
	}
}
/* eslint-disable import/prefer-default-export */
import {
  Container,
} from 'pixi.js';

export class GameObject extends Container {
  localAnchorX = 0;

  localAnchorY = 0;

  activate():


MS))) // Whether BFD has symbols
        {
            bfd_close(abfd);
            free(matching);
            fprintf(stderr, "Error: Failed to parse the executable format.\n");
            return;
        }
        free(matching);

        // Obtain the symbol table.
        unsigned int dummy = 0;
        if(bfd_read_minisymbols(abfd, FALSE, reinterpret_cast<void**>(&symbol_table), &dummy) == 0 &&
                bfd_read_minisymbols(abfd, TRUE, reinterpret_cast<void**>(&symbol_table), &dummy) < 0)
        {
            free(symbol_table);
            bfd_close(abfd);
            fprintf(stderr, "Error: Failed to obtain the symbol table from the executable.\n");
            return;
        }
    }

    ~bfd_usage(void)
    {
        free(symbol_table);
        bfd_close(abfd);
    }

    string get_function_name(DWORD offset)
    {
        fnis_para para;
        para.symbol_table = symbol_table;
        para.counter = offset;
        bfd_map_over_sections(abfd, &find_function_name_in_section, &para); // Call the corresponding functions.
        return para.function;
    }

private:
    bfd* abfd;
    asection* sec;
    asymbol** symbol_table;

    class fnis_para
    {
    public:
        string function;
        asymbol** symbol_table;
        bfd_vma counter;
    };
    static void find_function_name_in_section(bfd* tabfd, asection* tsec, void* tpara)
    {
        fnis_para& para = *static_cast<fnis_para*>(tpara);
        if(!para.function.empty()) return; // We have got the name.
        if(!(bfd_get_section_flags(tabfd, tsec) & SEC_ALLOC)) return; // Allocate space for this section.
        bfd_vma vma = bfd_get_section_vma(tabfd, tsec);
        if(para.counter < vma || vma+bfd_get_section_size(tsec) <= para.counter) return;
        const char* function = NULL;
        const char* file = NULL;
        unsigned int line = 0;
        // Get corresponding file and function name, and line number.
        if(bfd_find_nearest_line(tabfd, tsec, para.symbol_table, para.counter-vma, &file, &function, &line) && function)
        {
            para.function = CallStack::Demangle(function);
        }
    }
};
#endif // __MINGW32__
#endif // _WIN32

void CallStack::GetCalls(vector<CallStack::CallInfo>& calls)
{
#if defined(_WIN32)

    // Prepare context.
    cs.lock();
    if(!SymInitialize(GetCurrentProcess(), 0, TRUE))
    {
        fprintf(stderr, "Error: Failed to initialize symbol context.\n");
        return;
    }
#ifdef __MINGW32__
    bfd_usage bfdu;
#endif

    // Prepare variables.
#if defined(_M_AMD64)
    const DWORD machine = IMAGE_FILE_MACHINE_AMD64;
#else
    const DWORD machine = IMAGE_FILE_MACHINE_I386;
#endif
    const HANDLE process = GetCurrentProcess();
    const HANDLE thread = GetCurrentThread();
    STACKFRAME frame = { 0 };
    CONTEXT context = { 0 };
    context.ContextFlags = CONTEXT_FULL;
    RtlCaptureContext(&context);
#if defined(_M_AMD64)
    frame.AddrPC.Offset = context.Rip;
    frame.AddrPC.Mode = AddrModeFlat;
    frame.AddrStack.Offset = context.Rsp;
    frame.AddrStack.Mode = AddrModeFlat;
    frame.AddrFrame.Offset = context.Rbp;
    frame.Add


lues:n?d("max"):{}});let y="min-screens";for(let b of a)e(b.name,`@media ${at(b)}`,{id:y,sort:n&&f?w:void 0,value:b});t("min",x("min"),{id:y,sort:w})},supportsVariants:({matchVariant:r,theme:e})=>{r("supports",(t="")=>{let i=N(t),n=/^\w*\s*\(/.test(i);return i=n?i.replace(/\b(and|or|not)\b/g," $1 "):i,n?`@supports ${i}`:(i.includes(":")||(i=`${i}: var(--tw)`),i.startsWith("(")&&i.endsWith(")")||(i=`(${i})`),`@supports ${i}`)},{values:e("supports")??{}})},hasVariants:({matchVariant:r})=>{r("has",e=>`&:has(${N(e)})`,{values:{}}),r("group-has",(e,{modifier:t})=>t?`:merge(.group\\/${t}):has(${N(e)}) &`:`:merge(.group):has(${N(e)}) &`,{values:{}}),r("peer-has",(e,{modifier:t})=>t?`:merge(.peer\\/${t}):has(${N(e)}) ~ &`:`:merge(.peer):has(${N(e)}) ~ &`,{values:{}})},ariaVariants:({matchVariant:r,theme:e})=>{r("aria",t=>`&[aria-${N(t)}]`,{values:e("aria")??{}}),r("group-aria",(t,{modifier:i})=>i?`:merge(.group\\/${i})[aria-${N(t)}] &`:`:merge(.group)[aria-${N(t)}] &`,{values:e("aria")??{}}),r("peer-aria",(t,{modifier:i})=>i?`:merge(.peer\\/${i})[aria-${N(t)}] ~ &`:`:merge(.peer)[aria-${N(t)}] ~ &`,{values:e("aria")??{}})},dataVariants:({matchVariant:r,theme:e})=>{r("data",t=>`&[data-${N(t)}]`,{values:e("data")??{}}),r("group-data",(t,{modifier:i})=>i?`:merge(.group\\/${i})[data-${N(t)}] &`:`:merge(.group)[data-${N(t)}] &`,{values:e("data")??{}}),r("peer-data",(t,{modifier:i})=>i?`:merge(.peer\\/${i})[data-${N(t)}] ~ &`:`:merge(.peer)[data-${N(t)}] ~ &`,{values:e("data")??{}})},orientationVariants:({addVariant:r})=>{r("portrait","@media (orientation: portrait)"),r("landscape","@media (orientation: landscape)")},prefersContrastVariants:({addVariant:r})=>{r("contrast-more","@media (prefers-contrast: more)"),r("contrast-less","@media (prefers-contrast: less)")},forcedColorsVariants:({addVariant:r})=>{r("forced-colors","@media (forced-colors: active)")}},Te=["translate(var(--tw-translate-x), var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" "),Me=["var(--tw-blur)","var(--tw-brightness)","var(--tw-contrast)","var(--tw-grayscale)","var(--tw-hue-rotate)","var(--tw-invert)","var(--tw-saturate)","var(--tw-sepia)","var(--tw-drop-shadow)"].join(" "),Be=["var(--tw-backdrop-blur)","var(--tw-backdrop-brightness)","var(--tw-back


agraph">

When reading trailers, there can be whitespaces before and after the
token, the separator and the value. There can also be whitespaces
inside the token and the value.

Note that trailers do not follow and are not intended to follow many
rules for RFC 822 headers. For example they do not follow the line
folding rules, the encoding rules and probably many other rules.

OPTIONS

--trim-empty

If the <value> part of any trailer contains only whitespace,
the whole trailer will be removed from the resulting message.
This apply to existing trailers as well as new trailers.

--trailer <token>[(=|:)<value>]

Specify a (<token>, <value>) pair that should be applied as a
trailer to the input messages. See the description of this
command.

CONFIGURATION VARIABLES

trailer.separators

This option tells which characters are recognized as trailer
separators. By default only : is recognized as a trailer
separator, except that = is always accepted on the command
line for compatibility with other git commands.

The first character given by this option will be the default character
used when another separator is not specified in the config for this
trailer.

For example, if the value for this option is "%=$", then only lines
using the format <token><sep><value> with <sep> containing %, =
or $ and then spaces will be considered trailers. And % will be
the default separator used, so by default trailers will appear like:
<token>% <value> (one percent sign and one space will appear between
the token and the value).

trailer.where

This option tells where a new trailer will be added.

This can be end, which is the default, start, after or before.

If it is end, then each new trailer will appear at the end of the
existing trailers.

If it is start, then each new trailer will appear at the start,
instead of the end, of the existing trailers.

If it is after, then each new trailer will appear just after the
last trailer with the same <token>.

If it is before, then each new trailer will appear just before the
first trailer with the same <token>.

trailer.ifexists

This option makes it possible to choose what action will be
performed when there is already at least one trailer


面已经提到其实模拟器是一个独立的应用程序，所以我们可以通过 Mac 自带的 open 命令来运行，命令如下：open -a "iOS Simulator"。还可以在启动的时候指定模拟哪个设备：open -a "iOS Simulator" --args -CurrentDeviceUDID <udid>。udid 可以通过命令：xcrun simctl list 获得，执行后会列出当前已下载的设备列表，如图：

中间那串数字就是 udid，启动设备为 “iPhone 4S” 的 iOS 模拟器，命令应该是这样的：

open -a "iOS Simulator.app" --args -CurrentDeviceUDID "FCE2CFE8-64C3-4DBE-906B-B9BF4180DE49"

如果已升级到 Xcode 7 命令为：

open -a "Simulator.app" --args -CurrentDeviceUDID "FCE2CFE8-64C3-4DBE-906B-B9BF4180DE49"

至此，“启动模拟器”、“安装 App”、“打开 Web 页面” 我们都可以通过终端命令执行了。不过每次调试都要执行一遍这一点都不符合前端爱装 “X” 的个性。也许你想到了把这些命令封装到一个 shell 脚本中，如果这是这样的话也太小看我们装 “X” 的功力了。

现在不是“云”很火吗！我们也上个“云”。试想一下：所有的前端只要打开一个固定的网站，网站就会显示您当前系统支持启动哪些设备的 iOS 模拟器，只要在网站上轻轻一点本地的模拟器就启动起来了。不仅如此，网站还可以控制模拟器安装指定的 App，用指定的 App 打开的网页。像这样：

这是淘宝前端团队内部系统：MDS（Mobile pages Develop & Debug Solution）的一个局部界面（不知道大家有么有发现，文章写到这里，我的 Xcode 版本已经从 6 升级到了 7 ^ ^！吐槽下 App Store，真的很慢~~~）。

光有个网站就能启动本地的模拟器那是气功大师才干的出来的事儿，配合网站还需要一个安装在本地电脑的 SDK（npm）。为了启动个模拟器搞个网站又搞个 SDK？如果你是这么认为的，那是真的认为我们只是在装 “X” 了。MDS 要处理的事情远远比想象地要多，比如本地怎么才能获取最新的手机淘宝 App Bundle。 另外，MDS 还集成了一个云端的 DevTools 工具，这块内容下次有机会再细讲。

      <footer class="article-footer


    // Write status line.
    if (headers.protocolVersion == "1.1") {
      buffer.add(_Const.HTTP11);
    } else {
      buffer.add(_Const.HTTP10);
    }
    buffer.addByte(_CharCode.SP);
    buffer.add(statusCode.toString().codeUnits);
    buffer.addByte(_CharCode.SP);
    buffer.add(reasonPhrase.codeUnits);
    buffer.addByte(_CharCode.CR);
    buffer.addByte(_CharCode.LF);

    var session = _httpRequest!._session;
    if (session != null && !session._destroyed) {
      // Mark as not new.
      session._isNew = false;
      // Make sure we only send the current session id.
      bool found = false;
      for (int i = 0; i < cookies.length; i++) {
        if (cookies[i].name.toUpperCase() == _DART_SESSION_ID) {
          cookies[i]
            ..value = session.id
            ..httpOnly = true
            ..path = "/";
          found = true;
        }
      }
      if (!found) {
        var cookie = Cookie(_DART_SESSION_ID, session.id);
        cookies.add(
          cookie
            ..httpOnly = true
            ..path = "/",
        );
      }
    }
    // Add all the cookies set to the headers.
    _cookies?.forEach((cookie) {
      headers.add(HttpHeaders.setCookieHeader, cookie);
    });

    headers._finalize();

    // Write headers.
    headers._build(buffer);
    buffer.addByte(_CharCode.CR);
    buffer.addByte(_CharCode.LF);
    Uint8List headerBytes = buffer.takeBytes();
    _outgoing.setHeader(headerBytes, headerBytes.length);
  }

  String _findReasonPhrase(int statusCode) {
    var reasonPhrase = _reasonPhrase;
    if (reasonPhrase != null) {
      return reasonPhrase;
    }

    switch (statusCode) {
      case HttpStatus.continue_:
        return "Continue";
      case HttpStatus.switchingProtocols:
        return "Switching Protocols";
      case HttpStatus.ok:
        return "OK";
      case HttpStatus.created:
        return "Created";
      case HttpStatus.accepted:
        return "Accepted";
      case HttpStatus.nonAuthoritativeInformation:
        return "Non-Authoritative Information";
      case HttpStatus.noContent:
        return "No Content";
      case HttpStatus.resetContent:
        return "Reset Content";
      case HttpStatus.partialContent:
        return "Partial Content";
      case HttpStatus.multipleChoices:
        return "Multiple Choices";
      case HttpStatus.movedPermanently:
        return "Moved Permanently";
      case HttpStatus.found:
        return "Found";
      case HttpStatus.seeOther:
        return "See Other";
      case HttpStatus.notModified:
        return "Not Modified";
      case HttpStatus.useProxy:
        return "Use Proxy";
      case HttpStatus.temporaryRedirect:
        return "Temporary Redirect";
      case HttpStatus.badRequest:
        return "Bad Request";
      case HttpStatus.unauthorized:
        return "Unauthorized";
      case HttpStatus.paymentRequired:
        return "Payment Required";
      case HttpStatus.forbidden:
        return "Forbidden";
      case HttpStatus.notFound:
        return "Not Found";
      case HttpStatus.methodNotAllowed:
        return "Method Not Allowed";
      case HttpStatus.notAcceptable:
        return "Not Acceptable";
      case HttpStatus.proxyAuthenticationRequired:
        return "Proxy Authentication Required";
      case HttpStatus.requestTimeout:
        return "Request Time-out";
      case HttpStatus.conflict:
        return "Conflict";
      case HttpStatus.gone:
        return "Gone";
      case HttpStatus.


l && pts[lastInx].x != hint.x) ||
						(pts[lastInx] == null && target != null &&
						(hint.x < target.x || hint.x > target.x + target.width))))
				{
					addPoint(new mxPoint(hint.x, pt.y));
				}
			}
		}

		// Removes bends inside the source terminal
		if (pts[0] == null && source != null)
		{
			while (tempPoints.length > 0 && tempPoints[0] != null &&
				mxUtils.contains(source, tempPoints[0].x, tempPoints[0].y))
			{
				tempPoints.splice(0, 1);
			}
		}

		// Removes bends inside the target terminal
		if (pts[lastInx] == null && target != null)
		{
			while (tempPoints.length > 0 && tempPoints[tempPoints.length - 1] != null &&
				mxUtils.contains(target, tempPoints[tempPoints.length - 1].x, tempPoints[tempPoints.length - 1].y))
			{
				tempPoints.splice(tempPoints.length - 1, 1);
			}
		}

		// Scales and smoothens edges
		for (var i = 0; i < tempPoints.length; i++)
		{
			pushPoint(tempPoints[i]);
		}

		// Removes last point if inside tolerance with end point
		if (pe != null && result[result.length - 1] != null &&
			Math.abs(pe.x - result[result.length - 1].x) <= tol &&
			Math.abs(pe.y - result[result.length - 1].y) <= tol)
		{
			result.splice(result.length - 1, 1);

			// Lines up second last point in result with end point
			if (result[result.length - 1] != null)
			{
				if (Math.abs(result[result.length - 1].x - pe.x) < tol)
				{
					result[result.length - 1].x = pe.x;
				}

				if (Math.abs(result[result.length - 1].y - pe.y) < tol)
				{
					result[result.length - 1].y = pe.y;
				}
			}
		}
	},

	orthBuffer: 10,

	orthPointsFallback: true,

	dirVectors: [ [ -1, 0 ],
			[ 0, -1 ], [ 1, 0 ], [ 0, 1 ], [ -1, 0 ], [ 0, -1 ], [ 1, 0 ] ],

	wayPoints1: [ [ 0, 0], [ 0, 0],  [ 0, 0], [ 0, 0], [ 0, 0],  [ 0, 0],
	              [ 0, 0],  [ 0, 0], [ 0, 0],  [ 0, 0], [ 0, 0],  [ 0, 0] ],

	routePatterns: [
		[ [ 513, 2308, 2081, 2562 ], [ 513, 1090, 514, 2184, 2114, 2561 ],
			[ 513, 1090, 514, 2564, 2184, 2562 ],
			[ 513, 2308, 2561, 1090, 514, 2568, 2308 ] ],
	[ [ 514, 1057, 513, 2308, 2081, 2562 ], [ 514, 2184, 2114, 2561 ],
			[ 514, 2184, 2562, 1057, 513, 2564, 2184 ],
			[ 514, 1057, 513, 2568, 2308, 2561 ] ],
	[ [ 1090, 514, 1057, 513, 2308, 2081, 2562 ], [ 2114, 2561 ],
			[ 1090, 2562, 1057, 513, 2564, 2184 ],
			[ 1090, 514, 1057, 513, 2308, 2561, 2568 ] ],
	[ [ 2081, 2562 ], [ 1057, 513, 1090, 514, 2184, 2114, 2561 ],
			[ 1057, 513, 1090, 514, 2184, 2562, 2564 ],
			[ 1057, 2561, 1090, 514, 2568, 2308 ] ] ],

	inlineRoutePatterns: [
			[ null, [ 2114, 2568 ], null, null ],
			[ null, [ 514, 2081, 2114, 2568 ] , null, null ],
			[ null, [ 2114


StreamButton_noLock")
	defer logger.Debugf(ctx, "/getUpdatedStatus_startStopStreamButton_noLock")

	obsIsEnabled, _ := p.StreamD.IsBackendEnabled(ctx, obs.ID)
	if obsIsEnabled {
		obsStreamStatus, err := p.StreamD.GetStreamStatus(ctx, obs.ID)
		if err != nil {
			logger.Error(ctx, fmt.Errorf("unable to get stream status from OBS: %v", err))
			return
		}
		logger.Tracef(ctx, "obsStreamStatus == %#+v", obsStreamStatus)

		if obsStreamStatus.IsActive {
			p.startStopButton.Icon = theme.MediaStopIcon()
			p.startStopButton.Importance = widget.DangerImportance
			p.startStopButton.Enable()
			if p.updateStreamClockHandler == nil {
				if obsStreamStatus.StartedAt == nil {
					p.startStopButton.SetText("Stop stream")
				} else {
					p.startStopButton.SetText("...")
					logger.Debugf(ctx, "stream was already started at %s", obsStreamStatus.StartedAt.Format(time.RFC3339))
					p.updateStreamClockHandler = newUpdateTimerHandler(p.startStopButton, *obsStreamStatus.StartedAt)
				}
			}
			return
		}
	}

	if p.updateStreamClockHandler != nil {
		p.updateStreamClockHandler.Close()
		p.updateStreamClockHandler = nil
	}
	p.startStopButton.SetText(startStreamString())
	p.startStopButton.Icon = theme.MediaRecordIcon()
	p.startStopButton.Importance = widget.SuccessImportance

	ytIsEnabled, err := p.StreamD.IsBackendEnabled(ctx, youtube.ID)
	if err != nil {
		logger.Error(ctx, fmt.Errorf("unable to check if YouTube is enabled: %v", err))
		return
	}

	if !ytIsEnabled || !p.youtubeCheck.Checked {
		if obsIsEnabled {
			p.startStopButton.Enable()
		}
		return
	}

	ytStreamStatus, err := p.StreamD.GetStreamStatus(ctx, youtube.ID)
	if err != nil {
		logger.Error(ctx, fmt.Errorf("unable to get stream status from YouTube: %v", err))
		return
	}
	logger.Tracef(ctx, "ytStreamStatus == %#+v", ytStreamStatus)

	if d, ok := ytStreamStatus.CustomData.(youtube.StreamStatusCustomData); ok {
		logger.Tracef(
			ctx,
			"len(d.UpcomingBroadcasts) == %d; len(d.Streams) == %d",
			len(d.UpcomingBroadcasts),
			len(d.Streams),
		)
		if len(d.UpcomingBroadcasts) != 0 {
			p.startStopButton.Enable()
		}
	}
}

func (p *Panel) createMainWindow(
	ctx context.Context,
) {
	logger.Debugf(ctx, "createMainWindow")
	defer belt.Flush(ctx)
	defer func() { logger.Debugf(ctx, "/createMainWindow") }()

	w := p.newPermanentWindow(ctx, gconsts.AppName)
	w.SetCloseIntercept(func() {
		logger.Debugf(ctx, "main window 'close' was clicked")
	})
	w.SetMaster()
	p.mainWindow = w
}

func (p *Panel) initMainWindow(
	ctx context.Context,
	startingPage consts.Page,
) {
	logger.Debugf(ctx, "initMainWindow")
	defer belt.Flush(ctx)
	defer func() { logger.Debugf(ctx, "/initMainWindow") }()

	w := p.mainWindow
	menu := fyne.NewMainMenu(fyne.NewMenu("Main",
		fyne.NewMenuItem("Settings", func() {
			err := p.openSettingsWindow(ctx)
			if err != nil {
				p.DisplayError(fmt.Errorf("unable to ha


#!/usr/bin/env lua

--[[
# markdown.lua -- version 0.32

<http://www.frykholm.se/files/markdown.lua>

**Author:** Niklas Frykholm, <niklas@frykholm.se>
**Date:** 31 May 2008

This is an implementation of the popular text markup language Markdown in pure Lua.
Markdown can convert documents written in a simple and easy to read text format
to well-formatted HTML. For a more thourough description of Markdown and the Markdown
syntax, see <http://daringfireball.net/projects/markdown>.

The original Markdown source is written in Perl and makes heavy use of advanced
regular expression techniques (such as negative look-ahead, etc) which are not available
in Lua's simple regex engine. Therefore this Lua port has been rewritten from the ground
up. It is probably not completely bug free. If you notice any bugs, please report them to
me. A unit test that exposes the error is helpful.

## Usage

    require "markdown"
    markdown(source)

``markdown.lua`` exposes a single global function named ``markdown(s)`` which applies the
Markdown transformation to the specified string.

``markdown.lua`` can also be used directly from the command line:

	lua markdown.lua test.md

Creates a file ``test.html`` with the converted content of ``test.md``. Run:

    lua markdown.lua -h

For a description of the command-line options.

``markdown.lua`` uses the same license as Lua, the MIT license.

## License

Copyright © 2008 Niklas Frykholm.

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

## Version history

-	**0.32** -- 31 May 2008
	- Fix for links containing brackets
-	**0.31** -- 1 Mar 2008
	-	Fix for link definitions followed by spaces
-	**0.30** -- 25 Feb 2008
	-	Consistent behavior with Markdown when the same link reference is reused
-	**0.29** -- 24 Feb 2008
	-	Fix for <pre> blocks with spaces in them
-	**0.28** -- 18 Feb 2008
	-	Fix for link encoding
-	**0.27** -- 14 Feb 2008
	-	Fix for link database links with ()
-	**0.26** -- 06 Feb 2008
	-	Fix for nested italic and bold markers
-	**0.25** -- 24 Jan 2008
	-	Fix for encoding of naked <
-	**0.24** -- 21 Jan 2008
	-	Fix for link behavior.
-	**0.23** -- 10 Jan 2008
	-	Fix for a regression bug in longer expressions in italic or bold.
-	**0.22** -- 27 Dec 2007
	-	Fix for crash when processing blocks with a percent sign in them.
-	**0.21** -- 27 Dec 2007
	- 	Fix for combined strong and emphasis tags
-	**0.20** -- 13 Oct 2007
	-	Fix for < as well in image titles, now


1, [r2]
	cmp	r1, r3
	beq	.L3217
	ldrh	r1, [r2, #48]
	cmp	r1, r3
	beq	.L3217
	ldrh	r2, [r2, #96]
	cmp	r2, r3
	bne	.L3218
.L3217:
	mvn	r2, #0
	movw	r3, #1156
	strh	r2, [r5, r3]	@ movhi
.L3218:
	ldr	r5, .L3323
	mov	r10, r5
.L3251:
	ldr	r8, .L3323+44
	movw	r3, #65535
	ldrh	r2, [r8]
	cmp	r2, r3
	bne	.L3219
	ldr	fp, .L3323+8
	mov	r3, #0
	str	r3, [r5, #-1556]
.L3220:
	ldr	r6, .L3323+52
	ldrh	r7, [r6]
	mov	r0, r7
	bl	List_get_gc_head_node
	ldr	r1, .L3323+44
	uxth	r2, r0
	strh	r2, [r1]	@ movhi
	movw	r1, #65535
	cmp	r2, r1
	bne	.L3221
	mov	r3, #0
	mov	r0, #8
	strh	r3, [r6]	@ movhi
	b	.L3159
.L3189:
	ldr	r3, .L3323+28
	ldrh	r8, [r3]
	cmp	r8, r0
	bne	.L3201
	ldr	r0, .L3323+12
	ldrh	r0, [r0]
	cmp	r0, r8
	movne	r2, #0
	andeq	r2, r2, #1
	cmp	r2, #0
	beq	.L3201
	movw	r2, #1156
	ldrh	r2, [r5, r2]
	cmp	r2, r8
	beq	.L3202
.L3207:
	mov	r4, r8
.L3201:
	ldr	r3, [r5, #-1868]
	cmp	r3, #0
	moveq	r9, #1
	movne	r9, #2
	b	.L3200
.L3202:
	mov	r4, r3
	ldrh	r3, [r6, #-8]
	ldrh	r2, [r4, #-100]!
	str	r1, [r5, #-1556]
	cmp	r2, r3
	bls	.L3203
	movw	r3, #1932
	ldrh	r3, [r5, r3]
	cmp	r3, #0
	bne	.L3204
	ldr	r3, [r5, #-1284]
	ldr	r2, [r5, #1124]
	add	r3, r3, r3, lsl #1
	cmp	r2, r3, lsr #2
	movcs	r3, #18
	bcs	.L3320
.L3204:
	ldr	r3, .L3323+32
	ldrh	r3, [r3]
	add	r3, r3, r3, lsl #1
	asr	r3, r3, #2
.L3320:
	strh	r3, [r6, #-8]	@ movhi
	bl	FtlReadRefresh
	mov	r0, #0
	bl	List_get_gc_head_node
	uxth	r0, r0
	l


5808L, 0L, 10000000010L), asList(9223372036854775807L, 9223372036854775807L)),

            asList(-32.058f, 94.47389f, 16.107912f),
            asList(asList(-82.399826f, 12.633938f, 86.19402f), asList(-13.03544f, 64.65487f)),

            asList(-13.241563769628, 0.3436367772981237, 9.73366),
            asList(asList(-24.049666910012498, 14.975034200, 1.19975056092457), asList(-2.293376758961259, 80.783)),

            asList(parseLocalDate("2018-10-21"), parseLocalDate("2017-07-11"), parseLocalDate("2018-09-23")),
            asList(asList(parseLocalDate("2017-03-21"), parseLocalDate("2017-09-10"), parseLocalDate("2018-01-17")),
                asList(parseLocalDate("2017-03-24"), parseLocalDate("2018-09-22"))),

            asList(parseBest("2018-10-21 04:51:36"), parseBest("2017-07-11 09:26:48"), parseBest("2018-09-23 03:02:33")),
            asList(asList(parseBest("2017-03-21 12:52:33"), parseBest("2017-09-10 01:29:24"), parseBest("2018-01-17 04:45:23")),
                asList(parseBest("2017-03-24 01:03:23"), parseBest("2018-09-22 05:00:26")))
        )
        .go();
  }

  @Test
  public void arrayViewDefinedInDrill() throws Exception {
    queryBuilder().sql(
        "CREATE VIEW " + StoragePluginTestUtils.DFS_TMP_SCHEMA + ".`dfs_arr_vw` AS " +
            "SELECT " +
            "   t1.rid as vwrid," +
            "   t1.arr_n_0 as int_n0," +
            "   t1.arr_n_1 as int_n1," +
            "   t2.arr_n_0 as string_n0," +
            "   t2.arr_n_1 as string_n1," +
            "   t3.arr_n_0 as varchar_n0," +
            "   t3.arr_n_1 as varchar_n1," +
            "   t4.arr_n_0 as char_n0," +
            "   t4.arr_n_1 as char_n1," +
            "   t5.arr_n_0 as tinyint_n0," +
            "   t5.arr_n_1 as tinyint_n1," +
            "   t6.arr_n_0 as smallint_n0," +
            "   t6.arr_n_1 as smallint_n1," +
            "   t7.arr_n_0 as decimal_n0," +
            "   t7.arr_n_1 as decimal_n1," +
            "   t8.arr_n_0 as boolean_n0," +
            "   t8.arr_n_1 as boolean_n1," +
            "   t9.arr_n_0 as bigint_n0," +
            "   t9.arr_n_1 as bigint_n1," +
            "   t10.arr_n_0 as float_n0," +
            "   t10.arr_n_1 as float_n1," +
            "   t11.arr_n_0 as double_n0," +
            "   t11.arr_n_1 as double_n1," +
            "   t12.arr_n_0 as date_n0," +
            "   t12.arr_n_1 as date_n1," +
            "   t13.arr_n_0 as timestamp_n0," +
            "   t13.arr_n_1 as timestamp_n1 " +
            "FROM " +
            "   hive.int_array t1," +
            "   hive.string_array t2," +
            "   hive.varchar_array t3," +
            "   hive.char_array t


#include "test.h"

const idclass_t obj_a_class = {
  .ic_class      = "obj_a",
  .ic_caption    = N_("Object A"),
  .ic_properties = (const property_t[]){
    { PROPDEF1("int1",  "Integer 1", PT_INT,  obj_a_t, a_int1)  },
    { PROPDEF1("bool1", "Boolean 1", PT_BOOL, obj_a_t, a_bool1) },
    { PROPDEF1("str1",  "String 1",  PT_STR,  obj_a_t, a_str1)  },
  }
};

static void obj_b_save ( idnode_t *self );

const idclass_t obj_b_class = {
  .ic_super      = &obj_a_class,
  .ic_class      = "obj_b",
  .ic_caption    = N_("Object B"),
  .ic_save       = obj_b_save,
  .ic_properties = (const property_t[]){
    { PROPDEF1("int2",  "Integer 2", PT_INT,  obj_b_t, b_int2)  },
    { PROPDEF1("bool2", "Boolean 2", PT_BOOL, obj_b_t, b_bool2) },
    { PROPDEF1("str2",  "String 2",  PT_STR,  obj_b_t, b_str2)  },
  }
};

static void
obj_a_func1 ( void *self )
{
  obj_a_t *a = self;
  printf("a->a_int1 = %d\n", a->a_int1);
}

static obj_a_t *
obj_a_create1 ( size_t alloc, const idclass_t *class, const char *uuid )
{
  obj_a_t *a = idnode_create(alloc, class, uuid);
  a->a_func1 = obj_a_func1;
  return a;
}

#define obj_a_create(type, uuid)\
  (struct type*)obj_a_create1(sizeof(struct type), &type##_class, uuid)

static void
obj_b_func1 ( void *self )
{
  obj_b_t *b = self;
  printf("b->a_int1 = %d\n", b->a_int1);
  printf("b->b_int2 = %d\n", b->b_int2);
}

obj_b_t *
obj_b_create ( const char *uuid )
{
  obj_b_t *b = obj_a_create(obj_b, uuid);
  b->a_func1 = obj_b_func1;
  b->a_bool1 = 0;
  b->b_bool2 = 1;
  b->a_int1  = 2;
  b->b_int2  = 3;
  b->a_str1  = strdup("HELLO");
  b->b_str2  = strdup("WORLD");
  return b;
}

void obj_b_save ( idnode_t *self )
{
  idnode_save(self, "test");
}

void obj_b_load_all ( void )
{
  idnode_load_all("test", (void*(*)(const char*))obj_b_create);
}


R__)
                    tIsError = changeRange(aSwipeInfo->TouchDeltaY / 64);
#else
                    /*
                     * Range manual. If offset not fixed, check if swipe in the right third of screen, then do changeOffsetGridCount()
                     */
                    if (MeasurementControl.OffsetMode != OFFSET_MODE_0_VOLT && aSwipeInfo->TouchStartX > BUTTON_WIDTH_3_POS_2) {
                        // Change offset
                        tIsError = changeOffsetGridCount(tTouchDeltaYGrid);
                    } else {
                        // Change range
                        tIsError = changeDisplayRange(tTouchDeltaYGrid / 2);
                    }

                } else if (MeasurementControl.OffsetMode != OFFSET_MODE_0_VOLT) {
                    // Change offset
                    tIsError = changeOffsetGridCount(tTouchDeltaYGrid);
#endif
                }
            }
        } else {
            /*
             * Analyze Mode -> scroll or scale
             */
#if !defined(__AVR__)
            if (aSwipeInfo->TouchStartY < LOCAL_DISPLAY_HEIGHT / 2) {
                tIsError = changeXScale(aSwipeInfo->TouchDeltaX / 64);
            } else
#endif
            {
                tIsError = scrollChart(-aSwipeInfo->TouchDeltaX); // Scroll
            }
        }
    }
#if defined(SUPPORT_LOCAL_DISPLAY)
    LocalTouchButton::playFeedbackTone(tIsError);
#else
    BDButton::playFeedbackTone(tIsError);
#endif
}

/************************************************************************
 * Button handler section
 ************************************************************************/
/*
 * default handler for TouchButtonSlowBluetoothMode
 */
void doSlowBluetoothMode(BDButton *aTheTouchedButton, int16_t aValue) {
    sSlowBluetoothMode = aValue;
}

/*
 * default handler for TouchButtonMainHome
 */
void doDefaultBackButton(BDButton *aTheTouchedButton, int16_t aValue) {
    sBackButtonPressed = true;
}

/*
 * show gui of settings screen
 */
void doShowSettingsPage(BDButton *aTheTouchedButton, int16_t aValue) {
    DisplayControl.DisplayPage = DSO_PAGE_SETTINGS;
    redrawDisplay();
}

void doShowFrequencyPage(BDButton *aTheTouchedButton, int16_t aValue) {
    DisplayControl.DisplayPage = DSO_PAGE_FREQUENCY;
    startFrequencyGeneratorPage();
}

/*
 * toggle between ascending and descending trigger slope
 */
void doTriggerSlope(BDButton *aTheTouchedButton, int16_t aValue) {
    MeasurementControl.TriggerSlopeRising = (!MeasurementControl.TriggerSlopeRising);
    setTriggerLevelAndHysteresis(MeasurementControl.RawTriggerLevel, MeasurementControl.RawHysteresis);
    setSlopeButtonText();
}

/*
 * switch between automatic, manual, free and external trigger mode
 */
void doTriggerMode(BDButton *aTheTouchedButton, int16_t aValue) {
    uint8_t tNewMode = MeasurementControl.TriggerMode + 1;
    if (tNewMode > TRIGGER_MODE_EXTERN) {
        tNewMode = TRIGGER_MODE_AUTOMATIC;
        MeasurementControl.TriggerMode = tNewMode;
#if defined(__AVR__)
        noInterrupts();
        if (EIMSK != 0) {
            // Release waiting for external trigger
            INT0_vect();
        }
        interrupts();
#endif
    }
    MeasurementControl.TriggerMode = tNewMode;
    setTriggerModeButtonText();
}

void doRangeMode(BDButton *aTheTouchedButton, int16_t aValue) {
    setAutoRangeModeAndButtonText(!MeasurementControl.RangeAutomatic);
}

/*
 * step from 0 volt to auto to manual offset
 * No auto offset in AC Mode for AVR
 */
void doOffsetMode(BDButton *aTheTouchedButton, int16_t aValue) {
    MeasurementControl.OffsetM


@Test
    fun crowdNodeAPIConfirmationForwarded_correctMatch() {
        val txData = "01000000016fdb75611fd8892d8d19707f0d0958da5b930c635750f2c8c5bf5a48458a8ffd000000006b483045022100ff77055377b33afb8fc2f622fda59816394a567c50e98569fe8ab68d797948b802204b05504b3f837e80f4d0d8c3c6d98107e770572a8eaae66ddd14a660fe9674f101210275ab1f1c864e594c5e075ac45fbd01a45285701e429b842f8d0a1c872cf3a7baffffffff0149d00000000000001976a9140d5bcbeeb459af40f97fcb4a98e9d1ed13e904c888ac00000000" // ktlint-disable max-line-length
        val forwardedTx = Transaction(networkParams, Utils.HEX.decode(txData))
        val connected = "01000000017a4c4461b44d14a3866bc89482bdd35c800961879d65fc4e0542a377232f124b000000006a47304402206beee5884010d44501dee9094d9922af0c22b63f3afc1f3aa5c43bfcf59f38070220676e5bbeb712cbbbadbde6959cdee3367d1578bd06204178630cb1ba729073a20121025e25aa5f744bdd42f386a11efc584fa25afdaa299477038d2b86ac655287305effffffff0231d40000000000001976a914dcd48b7080eafd7b4db3bac7ea8480ccc3b1093388ac7d54a750000000001976a9149701a96ac4f8bb1a627be9928ccbc717ccce485788ac00000000" // ktlint-disable max-line-length
        val connectedTx = Transaction(networkParams, Utils.HEX.decode(connected))
        forwardedTx.inputs[0].connect(connectedTx.outputs[0])

        val filter = CrowdNodeAPIConfirmationForwarded(networkParams)
        assertTrue("Transaction doesn't match", filter.matches(forwardedTx))
        assertFalse("Tx matches but should not", filter.matches(signUpRequestTx))
    }
}
/*
 * Copyright 2021 Dash Core Group.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.dash.wallet.integrations.coinbase.ui.convert_currency

import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import androidx.core.view.isGone
import androidx.core.view.isVisible
import org.bitcoinj.core.Coin
import org.bitcoinj.utils.ExchangeRate
import org.bitcoinj.utils.MonetaryFormat
import org.dash.wallet.common.util.Constants
import org.dash.wallet.common.util.


d *               const user_data,
    xmlrpc_value *       const paramArrayP);

/*=========================================================================
**  Event Loop Interface
**=========================================================================
**  These functions can be used to run the XML-RPC event loop. If you
**  don't like these, you can also run the libwww event loop directly.
*/

/* Finish all outstanding asynchronous calls. Alternatively, the loop
** will exit if someone calls xmlrpc_client_event_loop_end. */
extern void
xmlrpc_client_event_loop_finish_asynch(void);

/* Finish all outstanding asynchronous calls. */
extern void
xmlrpc_client_event_loop_finish_asynch_timeout(timeout_t const milliseconds);

/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
** 1. Redistributions of source code must retain the above copyright
**    notice, this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright
**    notice, this list of conditions and the following disclaimer in the
**    documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
**    derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. */

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _XMLRPC_CLIENT_H_ */


?: ClickTarget;
  override type = eventUtils.CLICK;

  /**
   * @param opt_block The affected block. Null for click events that do not have
   *     an associated block (i.e. workspace click). Undefined for a blank
   *     event.
   * @param opt_workspaceId The workspace identifier for this event.
   *    Not used if block is passed. Undefined for a blank event.
   * @param opt_targetType The type of element targeted by this click event.
   *     Undefined for a blank event.
   */
  constructor(
    opt_block?: Block | null,
    opt_workspaceId?: string | null,
    opt_targetType?: ClickTarget,
  ) {
    let workspaceId = opt_block ? opt_block.workspace.id : opt_workspaceId;
    if (workspaceId === null) {
      workspaceId = undefined;
    }
    super(workspaceId);

    this.blockId = opt_block ? opt_block.id : undefined;
    this.targetType = opt_targetType;
  }

  /**
   * Encode the event as JSON.
   *
   * @returns JSON representation.
   */
  override toJson(): ClickJson {
    const json = super.toJson() as ClickJson;
    if (!this.targetType) {
      throw new Error(
        'The click target type is undefined. Either pass a block to ' +
          'the constructor, or call fromJson',
      );
    }
    json['targetType'] = this.targetType;
    json['blockId'] = this.blockId;
    return json;
  }

  /**
   * Deserializes the JSON event.
   *
   * @param event The event to append new properties to. Should be a subclass
   *     of Click, but we can't specify that due to the fact that parameters to
   *     static methods in subclasses must be supertypes of parameters to
   *     static methods in superclasses.
   * @internal
   */
  static fromJson(json: ClickJson, workspace: Workspace, event?: any): Click {
    const newEvent = super.fromJson(
      json,
      workspace,
      event ?? new Click(),
    ) as Click;
    newEvent.targetType = json['targetType'];
    newEvent.blockId = json['blockId'];
    return newEvent;
  }
}

export enum ClickTarget {
  BLOCK = 'block',
  WORKSPACE = 'workspace',
  ZOOM_CONTROLS = 'zoom_controls',
}

export interface ClickJson extends AbstractEventJson {
  targetType: ClickTarget;
  blockId?: string;
}

registry.register(registry.Type.EVENT, eventUtils.CLICK, Click);
// Defines structure for a response message from the server.
export class ServerResponse {
    // Status of request
    status: string;
    // Message(s) from server
    message: string[];
    // UserID for session management, if applicable.
    userid: number;
    // Username of user in session.
    username: string;
}
import { ImageState } from './app.types';
import { FluxStandardAction } from '../../../@types/FluxStandardActions';
import { SEND_CAPTURED_IMAGE_REQUEST, SEND_CAPTURED_IMAGE_SUCESS, SEND_CAPTURED_IMAGE_FAILURE } from './app.actions';

export const initialState: ImageState = {
  isFetching: false,
  data: null,
  error: null
};

const image = (state: ImageState = initialState, action: FluxStandardAction) => {
  switch (action.type) {
    case SEND_CAPTURED_IMAGE_REQUEST:
      return {
        ...state,
        isFetching: true
      };

    case SEND_CAPTURED_IMAGE_SUCESS:
      return {
        ...state,
        isFetching: false,
        data: action.payload
      };

    case SEND_CAPTURED_IMAGE_FAILURE:
      return {
        ...state,
        isFetching: false,
        error: action.payload
      };

    default:
      return state;
  }
};


de stirpe Salomonis, ut refert Matthaeus, cuius peccata scripta sunt, et ceterorum, ex quibus multi fecerunt malum in conspectu Dei. Quando vere ascendit, et secundo per Baptismum ortus esse describitur, ut refert Lucas, non per Salomonem, sed per Nathan nascitur, qui arguit patrem super Uriae morte, ortuque Salomonis.
          ORIGEN; The Lord descending into the world took upon Him the person of all sinners, and was willing to be born of the stock of Solomon, (as Matthew relates,) whose sins have been written down, and of the rest, many of whom did evil in the sight of God. But when He ascended, and is described as being born a second time in baptism, (as Luke relates,) He is not born through Salomon, but Nathan, who reproves the father for the death of Uriah, and the birth of Solomon.

          Augustinus in Lib. Retract: Dicendum autem, quod huiusmodi nominis propheta arguit David, ne putetur idem fuisse homo, cum alter fuerit.
          AUG. But it must be confessed that a prophet of this same name reproves David, that he might be thought to be the same man, whereas he was different.

          Gregorius Nazianzenus: Sed a David ultra, secundum utrumque Evangelistam, est generis processus indivisibilis; unde sequitur qui fuit Iesse.
          GREG. NAZ. From David upwards according to each Evangelist there is an unbroken line of descent; as it follows, Who was the son of Jesse.

          Glossa: Interpretatur David manu fortis, Iesse incensum. Sequitur qui fuit Obed, quod est servitus; qui fuit Booz, quod est fortis; qui fuit Salomon, quod est sensibilis, vel pacificus; qui fuit Naasson, quod est augurium, vel serpentinus; qui fuit Aminadab, idest populus voluntarius; qui fuit aram, quod est erectus, vel excelsus; qui fuit Esron idest sagitta; qui fuit Phares, quod est divisio; qui fuit Iudae, idest confitens; qui fuit Iacob, quod est supplantator; qui fuit Isaac, quod est risus, vel gaudium; qui fuit Abraham, quod est pater multarum gentium, vel videns populum.
          GLOSS. David is interpreted, “with a mighty arm, strong in fight.” Obith, i.e. “slavery.” Booz, i.e. “strong.” Salmon, i.e. “capable of feeling, or peacemaking.” Naasson, i.e. “augury, or belonging to serpents.” Aminadal, “the people being willing.” Aram, i.e. “upright, or lofty.” Esro1n, i.e. “an arrow.” Phares, i.e. “division.” Judah, i.e. “confessing.” Who was the son of Jacob, i.e. “supplanted.” Isaac, i.e. “laughing or joy.” Abraham, i.e. “the father of many nations, or the people.”

          Chrysostomus: Matthaeus quidem tamquam qui Iudaeis scribebat, nihil statuit ulterius scribere nisi quod ab Abraham et David Christus processerat: hoc enim maxime placabat Iudaeos. Lucas vero, sicut qui omnibus communiter loquebatur, ulterius protendit sermonem, attingens usque ad Adam; unde sequitur qui fuit Thare.


 used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * 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 THE COPYRIGHT HOLDER OR 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.
 */

package avail.anvil.settings

import avail.anvil.shortcuts.BaseKeyboardShortcut
import avail.anvil.shortcuts.Key
import avail.anvil.shortcuts.KeyCode
import avail.anvil.shortcuts.KeyboardShortcut
import avail.anvil.shortcuts.KeyboardShortcutCategory
import avail.anvil.shortcuts.ModifierKey
import org.availlang.json.JSONFriendly
import org.availlang.json.JSONObject
import org.availlang.json.JSONWriter
import kotlin.IllegalArgumentException

/**
 * A user-defined override for a [BaseKeyboardShortcut].
 *
 * @author Richard Arriaga
 */
data class KeyboardShortcutOverride constructor(
	override val category: KeyboardShortcutCategory,
	override var key: Key,
	override val actionMapKey: String
): BaseKeyboardShortcut, JSONFriendly
{
	/**
	 * The associated [KeyboardShortcut] or `null` if [actionMapKey] is not a
	 * valid [KeyboardShortcut.actionMapKey]
	 */
	val associatedShortcut: KeyboardShortcut? get() =
		category.keyboardShortcut(actionMapKey)

	override fun writeTo(writer: JSONWriter)
	{
		writer.writeObject {
			at(::category.name)
			{
				write(category.name)
			}
			at(::actionMapKey.name)
			{
				write(actionMapKey)
			}
			at(Key::code.name)
			{
				write(key.code.lookupKey)
			}
			at(Key::modifiers.name)
			{
				writeArray {
					key.modifiers.forEach {
						write(it.lookupKey)
					}
				}
			}
		}
	}

	companion object
	{
		/**
		 * Answer a [KeyboardShortcutOverride] from the provided [JSONObject].
		 *
		 * @param obj
		 *   The [JSONObject] to extract data from.
		 * @return
		 *   The [KeyboardShortcutOverride] read from the JSON object.
		 */
		fun from(obj: JSONObject): KeyboardShortcutOverride
		{
			val categoryName =
				obj[KeyboardShortcutOverride::category.name].string
			val category =
				try
				{
					KeyboardShortcutCategory.valueOf(categoryName)
				}
				catch (e: IllegalArgumentException)
				{
					throw IllegalArgumentException(
						"$categoryName is not a valid " +
							"KeyboardShortcutCategory. The category must be " +
							"one of:\n\t${KeyboardShortcutCategory.validNames}",
						e)
				}
			val actionMapKey =
				obj[KeyboardShortcutOverride::actionMapKey.name].string

			val keyCodeLookup =
				obj[Key::code.name].string
			val keyCode = KeyCode.lookup(keyCodeLookup) ?:
				throw IllegalArgumentException(
					"$keyCodeLookup is not a valid KeyCode lookup. " +
						"The KeyCode lookup must be one of:\n\t" +
						KeyCode.validLookups)

			val modifiers = mutableSetOf<ModifierKey>()
			obj.getArray(Key::modifiers.name)
				.strings.forEach {
					val key = ModifierKey.lookup(it) ?:
						throw IllegalArgumentException(
							"$it is not a vali


4dad71e1b1b7c08ef274ba4.2.3">WWW.POSTGRES.CN

<div class="handle fp-tooltips" data-tooltip="右拖合并


to seq1 = Sequence::create(actionMove, actionDone, NULL);
	pEnemySprite->runAction(seq1);
}

void EnemyLayer::addEnemy2(float dt) {
	EnemySprite *pEnemySprite = EnemySprite::create();
	pEnemySprite->setEnemyByType(Enemy2);
	pEnemySprite->setTag(Enemy2);
	this->addChild(pEnemySprite);
	vecEnemy.pushBack(pEnemySprite);

	auto actionMove = MoveTo::create(5.5f,Point(pEnemySprite->getPositionX(),0 - pEnemySprite->getSprite()->getContentSize().height / 2));
	auto actionDone = CallFuncN::create(CC_CALLBACK_1(EnemyLayer::removeEnemy, this));
	auto seq2 = Sequence::create(actionMove, actionDone, NULL);
	pEnemySprite->runAction(seq2);
}

void EnemyLayer::addEnemy3(float dt) {
	EnemySprite *pEnemySprite = EnemySprite::create();
	pEnemySprite->setEnemyByType(Enemy3);
	pEnemySprite->setTag(Enemy3);
	this->addChild(pEnemySprite);
	vecEnemy.pushBack(pEnemySprite);

	auto actionMove = MoveTo::create(7.0f,
			Point(pEnemySprite->getPositionX(),0 - pEnemySprite->getSprite()->getContentSize().height / 2));
	auto actionDone = CallFuncN::create(CC_CALLBACK_1(EnemyLayer::removeEnemy, this));
	auto seq3 = Sequence::create(actionMove, actionDone, NULL);
	pEnemySprite->runAction(seq3);
}

void EnemyLayer::removeEnemy(Node *pNode) {
	EnemySprite* enemy = (EnemySprite*) pNode;
	if (enemy != NULL) {
		this->removeChild(enemy, true);
		vecEnemy.eraseObject(enemy);
	}
}

void EnemyLayer::blowupEnemy(EnemySprite* pEnemySprite) {
	Animation *pAnimation = NULL;
	Sprite *pmsprite = NULL;
	char *buff = NULL;
	if (Enemy1 == pEnemySprite->getTag()) {
		buff = "a_001.png";
		pAnimation = AnimationCache::getInstance()->getAnimation("Enemy1Blowup");
		setScore(ENEMY1_SCORE);
	} else if (Enemy2 == pEnemySprite->getTag()) {
		buff = "b_001.png";
		pAnimation = AnimationCache::getInstance()->getAnimation("Enemy2Blowup");
		setScore(ENEMY2_SCORE);
	} else if (Enemy3 == pEnemySprite->getTag()) {
		buff = "d_00001.png";
		pAnimation = AnimationCache::getInstance()->getAnimation("Enemy3Blowup");
		setScore(ENEMY3_SCORE);
	} else {
		return;
	}
	pmsprite = Sprite::createWithSpriteFrame(SpriteFrameCache::getInstance()->getSpriteFrameByName(buff));

	Point newPos = pEnemySprite->getcurPoint();
	Animate *pAnimate = Animate::create(pAnimation);
	pmsprite->setPosition(newPos);
	this->addChild(pmsprite);

	CallFuncN* mactiondone = CallFuncN::create(CC_CALLBACK_0(EnemyLayer::f_removemyAnimation, this, pmsprite));
	auto seq = Sequence::create(pAnimate, mactiondone, NULL);
	pmsprite->runAction(seq);
	removeEnemy(pEnemySprite);
	updateScore(m_score);
}

void EnemyLayer::f_removemyAnimation(Node


/* $NoKeywords:$ */
/**
 * @file
 *
 * mmLvDdr3.h
 *
 * Main low voltage DDR3 support common header
 *
 * @xrefitem bom "File Content Label" "Release Content"
 * @e project: AGESA
 * @e sub-project: (Mem/Main)
 * @e \$Revision: 63425 $ @e \$Date: 2011-12-22 11:24:10 -0600 (Thu, 22 Dec 2011) $
 *
 **/
/*****************************************************************************
  *
 * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Advanced Micro Devices, Inc. nor the names of
 *       its contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 * 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 ADVANCED MICRO DEVICES, INC. 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.
  * ***************************************************************************
  *
 */

#ifndef _MMLVDDR3_H_
#define _MMLVDDR3_H_

/*----------------------------------------------------------------------------
 *   Mixed (DEFINITIONS AND MACROS / TYPEDEFS, STRUCTURES, ENUMS)
 *
 *----------------------------------------------------------------------------
 */

/*-----------------------------------------------------------------------------
 *                         DEFINITIONS AND MACROS
 *
 *-----------------------------------------------------------------------------
 */

/*----------------------------------------------------------------------------
 *                         TYPEDEFS, STRUCTURES, ENUMS
 *
 *----------------------------------------------------------------------------
 */

/*----------------------------------------------------------------------------
 *                           FUNCTIONS PROTOTYPE
 *
 *----------------------------------------------------------------------------
 */
BOOLEAN
MemMLvDdr3PerformanceEnhPre (
  IN OUT   MEM_MAIN_DATA_BLOCK *MemMainPtr
  );

BOOLEAN
MemMLvDdr3PerformanceEnhFinalize (
  IN OUT   MEM_MAIN_DATA_BLOCK *MemMainPtr
  );
#endif  /* _MMLVDDR3_H_ */


oString ignoring the memory address
        val s = "SnapSpec@"
        val a = Modifier.animateContentSize(animationSpec = snap(100)).toString().let {
            val from = it.indexOf(s) + s.length
            val to = it.indexOf(',', from)
            it.removeRange(from, to)
        }
        val b = modifier.toString().let {
            val from = it.indexOf(s) + s.length
            val to = it.indexOf(',', from)
            it.removeRange(from, to)
        }
        assertEquals(a, b)
    }
}/*
 * This file is part of Sui.
 *
 * Sui 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 3 of the License, or
 * (at your option) any later version.
 *
 * Sui 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 Sui.  If not, see <https://www.gnu.org/licenses/>.
 *
 * Copyright (c) 2021 Sui Contributors
 */
package com.libremobileos.freeform.utils

import android.util.Log
import java.io.IOException
import java.util.Locale
import java.util.logging.FileHandler
import java.util.logging.Logger
import java.util.logging.SimpleFormatter

private const val MAIN_TAG = "LMOFreeform"

class Logger {
    private val TAG: String
    private val LOGGER: Logger?

    constructor(TAG: String) {
        this.TAG = "${MAIN_TAG}/${TAG}"
        LOGGER = null
    }

    constructor(TAG: String, file: String?) {
        this.TAG = TAG
        LOGGER = Logger.getLogger(TAG)
        try {
            val fh = FileHandler(file)
            fh.formatter = SimpleFormatter()
            LOGGER.addHandler(fh)
        } catch (e: IOException) {
            e.printStackTrace()
        }
    }

    fun isLoggable(tag: String?, level: Int): Boolean {
        return Log.isLoggable(MAIN_TAG, level) || Log.isLoggable(tag, level)
    }

    fun v(msg: String?) {
        if (isLoggable(TAG, Log.VERBOSE)) {
            println(Log.VERBOSE, msg)
        }
    }

    fun v(fmt: String?, vararg args: Any?) {
        if (isLoggable(TAG, Log.VERBOSE)) {
            println(Log.VERBOSE, String.format(Locale.ENGLISH, fmt!!, *args))
        }
    }

    fun v(msg: String, tr: Throwable?) {
        if (isLoggable(TAG, Log.VERBOSE)) {
            println(
                Log.VERBOSE, """
     $msg
     ${Log.getStackTraceString(tr)}
     """.trimIndent()
            )
        }
    }

    fun d(msg: String?) {
        if (isLoggable(TAG, Log.DEBUG)) {
            println(Log.DEBUG, msg)
        }
    }

    fun d(fmt: String?, vararg args: Any?) {
        if (isLoggable(TAG, Log.DEBUG)) {
            println(Log.DEBUG, String.format(Locale.ENGLISH, fmt!!, *args))
        }
    }

    fun d(msg: String, tr: Throwable?) {
        if (isLoggable(TAG, Log.DEBUG)) {
            println(
                Log.DEBUG, """
     $msg
     ${Log.getStackTraceString(tr)}
     """.trimIndent()
            )
        }
    }

    fun i(msg: String?) {
        if (isLoggable(TAG, Log.INFO)) {
            println(Log.INFO, msg)
        }
    }

    fun i(fmt: String?, vararg args: Any?) {
        if (isLoggable(TAG, Log.INFO)) {
            println(Log.INFO, String.format(Locale.ENGLISH, fmt!!, *args))
        }
    }

    fun i(msg: String, tr: Throwable?) {
        if (isLoggable(TAG, Log.INFO)) {
            println


n 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.
*/
package org.pepstock.charba.client.impl.plugins.enums;

import java.util.Arrays;

import org.pepstock.charba.client.colors.GwtMaterialColor;
import org.pepstock.charba.client.colors.IsColor;
import org.pepstock.charba.client.impl.plugins.ColorScheme;
import org.pepstock.charba.client.impl.plugins.ColorSchemes;

/**
 * Contains all scheme definitions to map the GWT material schemes.

 * To configure {@link ColorSchemes#ID} plugin, where category is "gwtmaterial".

 * Every color scheme has a number at the end of its name, which indicates the number of that colors included in the scheme. If the number of the datasets is larger than it, the
 * same colors will appear repeatedly. A color is not modified if it is specified by dataset options.
 *
 * @author Andrea "Stock" Stocchero
 *
 */
public enum GwtMaterialScheme implements IsEnumeratedScheme
{
	/**
	 * Color scheme name "BLUE" -
	 *
	 */
	BLUE(GwtMaterialColor.BLUE_LIGHTEN_5, GwtMaterialColor.BLUE_LIGHTEN_4, GwtMaterialColor.BLUE_LIGHTEN_3, GwtMaterialColor.BLUE_LIGHTEN_2, GwtMaterialColor.BLUE_LIGHTEN_1, GwtMaterialColor.BLUE, GwtMaterialColor.BLUE_DARKEN_1,
			GwtMaterialColor.BLUE_DARKEN_2, GwtMaterialColor.BLUE_DARKEN_3, GwtMaterialColor.BLUE_DARKEN_4),
	/**
	 * Color scheme name "PURPLE" -
	 *        <span style="background-color:#e1bee7;
	 * border-style


out.print(msg);
        }

        /**
         * Print a message.
         *
         * @param msg the message
         */
        void println(String msg) {
            System.out.println(msg);
            pos = 0;
        }

        /**
         * Set the range.
         *
         * @param low the percent value if current = 0
         * @param high the percent value if current = total
         * @param total the maximum value
         */
        void setRange(int low, int high, long total) {
            this.low = low;
            this.high = high;
            this.current = 0;
            this.total = total;
        }

        /**
         * Print the progress.
         *
         * @param offset the offset since the last operation
         */
        void printProgress(long offset) {
            current += offset;
            long now = System.nanoTime();
            if (now - lastTime > TimeUnit.SECONDS.toNanos(3)) {
                String msg = (low + (high - low) * current / total) + "% ";
                if (pos > 80) {
                    System.out.println();
                    pos = 0;
                }
                System.out.print(msg);
                pos += msg.length();
                lastTime = now;
            }
        }

    }

    /**
     * Write a variable size long value.
     *
     * @param out the output stream
     * @param x the value
     * @return the number of bytes written
     */
    static int writeVarLong(OutputStream out, long x)
            throws IOException {
        int len = 0;
        while ((x & ~0x7f) != 0) {
            out.write((byte) (0x80 | (x & 0x7f)));
            x >>>= 7;
            len++;
        }
        out.write((byte) x);
        return ++len;
    }

    /**
     * Read a variable size long value.
     *
     * @param in the input stream
     * @return the value
     */
    static long readVarLong(InputStream in) throws IOException {
        long x = in.read();
        if (x < 0) {
            throw new EOFException();
        }
        x = (byte) x;
        if (x >= 0) {
            return x;
        }
        x &= 0x7f;
        for (int s = 7; s < 64; s += 7) {
            long b = in.read();
            if (b < 0) {
                throw new EOFException();
            }
            b = (byte) b;
            x |= (b & 0x7f) << s;
            if (b >= 0) {
                break;
            }
        }
        return x;
    }

    /**
     * An input stream that uses a shared file channel.
     */
    static class SharedInputStream extends InputStream {
        private final FileChannel channel;
        private final long endPosition;
        private long position;

        SharedInputStream(FileChannel channel, long position, long endPosition) {
            this.channel = channel;
            this.position = position;
            this.endPosition = endPosition;
        }

        @Override
        public int read() {
            throw new UnsupportedOperationException();
        }

        @Override
        public int read(byte[] b, int off, int len) throws IOException {
            if (len == 0) {
                return 0;
            }
            len = (int) Math.min(len, endPosition - position);
            if (len <= 0) {
                return -1;
            }
            ByteBuffer buff = ByteBuffer.wrap(b, off, len);
            len = channel.read(buff, position);
            position += len;
            return len;
        }

    }

}
/*
 * Copyright 2004-2019 H2 Group. Multip


 loop {
        let op_token = scanner.peek_token(0)?;
        if op_token.kind == TokenKind::Eof {
            break;
        }

        let op_bp = infix_binding_power(op_token.kind);

        if op_bp < min_bp {
            trace!("end of infix at {:?}", op_token.kind);
            break;
        }

        let op = scanner.next_token()?;
        let rhs = parse_expression(scanner, op_bp + 1)?;
        lhs = if matches!(op_bp, BindingPower::LogicalAnd | BindingPower::LogicalOr) {
            trace!("logical");
            Expr::Logical {
                lhs: Box::new(lhs),
                op,
                rhs: Box::new(rhs),
            }
        } else {
            trace!("infix");
            Expr::Binary {
                lhs: Box::new(lhs),
                op,
                rhs: Box::new(rhs),
            }
        }
    }

    Ok(lhs)
}

fn consume<'a>(scanner: &mut Scanner<'a>, kind: TokenKind) -> Result<Token<'a>, PiccoloError> {
    let tok = scanner.next_token()?;
    if tok.kind == kind {
        Ok(tok)
    } else {
        Err(PiccoloError::new(ErrorKind::UnexpectedToken {
            exp: format!("{:?}", kind),
            got: format!("{:?}", tok.kind),
        })
        .line(tok.line))
    }
}

fn prefix_binding_power(kind: TokenKind) -> BindingPower {
    match kind {
        TokenKind::Minus => BindingPower::Unary,
        TokenKind::Not => BindingPower::Unary,

        TokenKind::Identifier => BindingPower::None,
        _ => BindingPower::None,
    }
}

#[rustfmt::skip]
pub(crate) fn infix_binding_power(kind: TokenKind) -> BindingPower {
    match kind {
          TokenKind::Multiply
        | TokenKind::Divide
        | TokenKind::Modulo
            => BindingPower::Factor,

          TokenKind::Plus
        | TokenKind::Minus
            => BindingPower::Term,

          TokenKind::ShiftLeft
        | TokenKind::ShiftRight
            => BindingPower::BitShift,

          TokenKind::Less
        | TokenKind::Greater
        | TokenKind::LessEqual
        | TokenKind::GreaterEqual
            => BindingPower::Comparison,

          TokenKind::Equal
        | TokenKind::NotEqual => BindingPower::Equality,

        TokenKind::BitwiseAnd => BindingPower::BitAnd,
        TokenKind::BitwiseXor => BindingPower::BitXor,
        TokenKind::BitwiseOr => BindingPower::BitOr,

        TokenKind::LogicalAnd => BindingPower::LogicalAnd,
        TokenKind::LogicalOr => BindingPower::LogicalOr,

        TokenKind::Retn => BindingPower::None,
        TokenKind::Identifier => BindingPower::None,
        _ => BindingPower::None,
    }
}

macro_rules! prec {
    ($name:ident => $($item:ident = $num:expr,)*) => {
        #[derive(Debug, Clone, Copy, PartialOrd, PartialEq)]
        pub(crate) enum $name {
            $($item = $num,)*
        }

        impl Into<u8> for $name {
            fn into(self) -> u8 {
                match self {
                    $($name::$item => $num,)*
                }
            }
        }

        impl From<u8> for $name {
            fn from(v: u8) -> $name {
                match v {
                    $($num => $name::$item,)*
                    _ => panic!("{} does not correspond to any item in {}", v, stringify!($


YYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiem:function(o){return o<12?"\u067E.\u0646":"\u062F.\u0646"},relativeTime:{future:"\u0644\u06D5 %s",past:"\u0644\u06D5\u0645\u06D5\u0648\u067E\u06CE\u0634 %s",s:"\u0686\u06D5\u0646\u062F \u0686\u0631\u06A9\u06D5\u06CC\u06D5\u06A9",m:"\u06CC\u06D5\u06A9 \u062E\u0648\u0644\u06D5\u06A9",mm:"%d \u062E\u0648\u0644\u06D5\u06A9",h:"\u06CC\u06D5\u06A9 \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631",hh:"%d \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631",d:"\u06CC\u06D5\u06A9 \u0695\u06C6\u0698",dd:"%d \u0695\u06C6\u0698",M:"\u06CC\u06D5\u06A9 \u0645\u0627\u0646\u06AF",MM:"%d \u0645\u0627\u0646\u06AF",y:"\u06CC\u06D5\u06A9 \u0633\u0627\u06B5",yy:"%d \u0633\u0627\u06B5"}};i.default.locale(r,null,!0),n.default=r,n.englishToArabicNumbersMap=e,Object.defineProperty(n,"__esModule",{value:!0})})});var gn=H((Ee,Fe)=>{(function(n,t){typeof Ee=="object"&&typeof Fe<"u"?Fe.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_cs=t(n.dayjs)})(Ee,function(n){"use strict";function t(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var s=t(n);function i(u){return u>1&&u<5&&~~(u/10)!=1}function e(u,r,o,d){var l=u+" ";switch(o){case"s":return r||d?"p\xE1r sekund":"p\xE1r sekundami";case"m":return r?"minuta":d?"minutu":"minutou";case"mm":return r||d?l+(i(u)?"minuty":"minut"):l+"minutami";case"h":return r?"hodina":d?"hodinu":"hodinou";case"hh":return r||d?l+(i(u)?"hodiny":"hodin"):l+"hodinami";case"d":return r||d?"den":"dnem";case"dd":return r||d?l+(i(u)?"dny":"dn\xED"):l+"dny";case"M":return r||d?"m\u011Bs\xEDc":"m\u011Bs\xEDcem";case"MM":return r||d?l+(i(u)?"m\u011Bs\xEDce":"m\u011Bs\x


    allocateOneByteString,
        allocateTwoByteString,
        ClassID,
        copyRangeFromUint8ListToOneByteString,
        patch,
        POWERS_OF_TEN,
        unsafeCast,
        writeIntoOneByteString,
        writeIntoTwoByteString,
        createOneByteStringFromCharacters;

import "dart:typed_data" show Uint8List, Uint16List;

/// This patch library has no additional parts.

// JSON conversion.

@patch
dynamic _parseJson(
  String source,
  Object? Function(Object? key, Object? value)? reviver,
) {
  _JsonListener listener = _JsonListener(reviver);
  var parser = _JsonStringParser(listener);
  parser.chunk = source;
  parser.chunkEnd = source.length;
  parser.parse(0);
  parser.close();
  return listener.result;
}

@patch
class Utf8Decoder {
  @patch
  Converter<List<int>, T> fuse<T>(Converter<String, T> next) {
    if (next is JsonDecoder) {
      return _JsonUtf8Decoder(
            (next as JsonDecoder)._reviver,
            this._allowMalformed,
          )
          as dynamic /*=Converter<List<int>, T>*/;
    }
    return super.fuse<T>(next);
  }
}

class _JsonUtf8Decoder extends Converter<List<int>, Object?> {
  final Object? Function(Object? key, Object? value)? _reviver;
  final bool _allowMalformed;

  _JsonUtf8Decoder(this._reviver, this._allowMalformed);

  Object? convert(List<int> input) {
    var parser = _JsonUtf8DecoderSink._createParser(_reviver, _allowMalformed);
    parser.parseChunk(input, 0, input.length);
    parser.close();
    return parser.result;
  }

  ByteConversionSink startChunkedConversion(Sink<Object?> sink) {
    return _JsonUtf8DecoderSink(_reviver, sink, _allowMalformed);
  }
}

//// Implementation ///////////////////////////////////////////////////////////

// Simple API for JSON parsing.

/**
 * A [_JsonListener] builds data objects from the parser events.
 *
 * This is a simple stack-based object builder. It keeps the most recently
 * seen value in a variable, and uses it depending on the following event.
 */
class _JsonListener {
  _JsonListener(this.reviver);

  final Object? Function(Object? key, Object? value)? reviver;

  /**
   * Stack used to handle nested containers.
   *
   * The current container is pushed on the stack when a new one is
   * started.
   */
  final List<Object?> stack = [];

  /** Contents of the current container being built, or null if not building a
  * container.
  *
  * When building [Map] this will contain array of key-value pairs.
  */
  List<dynamic>? currentContainer;

  /** The most recently read value. */
  Object? value;

  /** Pushes the currently active container. */
  void beginContainer() {
    stack.add(currentContainer);
    currentContainer = [];
  }

  /** Pops the top container from the [stack]. */
  void popContainer() {
    value = currentContainer;
    currentContainer = unsafeCast<List?>(stack.removeLast());
  }

  void handleString(String value) {
    this.value = value;
  }

  void handleNumber(num value) {
    this.value = value;
  }

  void handleBool(bool value) {
    this.value = value;
  }

  void handleNull() {
    this.value = null;
  }

  void beginObject() {
    beginContainer();
  }

  void propertyName() {
    unsafeCast<List>(currentContainer).add(value);
    value = null;


s r3, r3, #1
	bne _0220B0A0
	ldr r2, _0220B150 ; =ov00_0221B200
	add r0, sp, #0
	ldr r3, [r2, #0x24]
	eor r3, r3, #1
	str r3, [r2, #0x24]
	bl strcat
	ldr r1, _0220B154 ; =ov00_02219948
	add r0, sp, #0
	bl strcat
	add r1, sp, #0
	mov r0, r4
	bl strstr
	movs r4, r0
	addeq sp, sp, #0x100
	moveq r0, #0
	ldmeqia sp!, {r4, pc}
	add r0, sp, #0
	bl strlen
	ldr r1, _0220B150 ; =ov00_0221B200
	ldr r2, _0220B158 ; =ov00_0221B230
	ldr r1, [r1, #0x24]
	add r3, r4, r0
	add r0, r2, r1, lsl #8
	mov r2, r0
	b _0220B12C
_0220B124:
	ldrsb r1, [r3], #1
	strb r1, [r2], #1
_0220B12C:
	ldrsb r1, [r3]
	cmp r1, #0
	cmpne r1, #0x5c
	bne _0220B124
	mov r1, #0
	strb r1, [r2]
	add sp, sp, #0x100
	ldmia sp!, {r4, pc}
	.balign 4, 0
_0220B14C: .word ov00_022162E7
_0220B150: .word ov00_0221B200
_0220B154: .word ov00_02219948
_0220B158: .word ov00_0221B230
	arm_func_end ov00_0220B088

	arm_func_start ov00_0220B15C
ov00_0220B15C: ; 0x0220B15C
	stmdb sp!, {r3, lr}
	bl ov00_0220B088
	cmp r0, #0
	ldreq r0, _0220B170 ; =ov00_02219944
	ldmia sp!, {r3, pc}
	.balign 4, 0
_0220B170: .word ov00_02219944
	arm_func_end ov00_0220B15C

	arm_func_start ov00_0220B174
ov00_0220B174: ; 0x0220B174
	ldr ip, _0220B17C ; =ov00_021FF694
	bx ip
	.balign 4, 0
_0220B17C: .word ov00_021FF694
	arm_func_end ov00_0220B174

	arm_func_start ov00_0220B180
ov00_0220B180: ; 0x0220B180
	sub r3, r1, #6
	mov r2, r0
	cmp r3, #0
	ble _0220B1E0
_0220B190:
	ldrsb r1, [r2]
	cmp r1, #0x5c
	ldreqsb r1, [r2, #1]
	cmpeq r1, #0x66
	ldreqsb r1, [r2, #2]
	cmpeq r1, #0x69
	ldreqsb r1, [r2, #3]
	cmpeq r1, #0x6e
	ldreqsb r1, [r2, #4]
	cmpeq r1, #0x61
	ldreqsb r1, [r2, #


 variable
            const l = new Array(288);	// length list for huft_build
            let h;	// HuftBuild

            // literal table
            for (i = 0; i < 144; i++) {
                l[i] = 8;
            }
            for (; i < 256; i++) {
                l[i] = 9;
            }
            for (; i < 280; i++) {
                l[i] = 7;
            }
            for (; i < 288; i++) {	// make a complete, but wrong code set
                l[i] = 8;
            }
            fixed_bl = 7;

            h = new HuftBuild(l, 288, 257, cplens, cplext,
                fixed_bl);
            if (h.status != 0) {
                print("HufBuild error: " + h.status);
                return -1;
            }
            fixed_tl = h.root;
            fixed_bl = h.m;

            // distance table
            for (i = 0; i < 30; i++) {	// make an incomplete code set
                l[i] = 5;
            }
            let fixed_bd = 5;

            h = new HuftBuild(l, 30, 0, cpdist, cpdext, fixed_bd);
            if (h.status > 1) {
                fixed_tl = null;
                print("HufBuild error: " + h.status);
                return -1;
            }
            fixed_td = h.root;
            fixed_bd = h.m;
        }

        tl = fixed_tl;
        td = fixed_td;
        bl = fixed_bl;
        bd = fixed_bd;
        return inflate_codes(buff, off, size);
    }

    function inflate_dynamic(buff: Uint8Array, off: number, size: number) {
        // decompress an inflated type 2 (dynamic Huffman codes) block.
        let i;		// temporary variables
        let j;
        let l;		// last length
        let n;		// number of lengths to get
        let t;		// (HuftNode) literal/length code table
        let nb;		// number of bit length codes
        let nl;		// number of literal/length codes
        let nd;		// number of distance codes
        const ll = new Array(286 + 30); // literal/length and distance code lengths
        let h;		// (HuftBuild)

        for (i = 0; i < ll.length; i++) {
            ll[i] = 0;
        }

        // read in table lengths
        NEEDBITS(5);
        nl = 257 + GETBITS(5);	// number of literal/length codes
        DUMPBITS(5);
        NEEDBITS(5);
        nd = 1 + GETBITS(5);	// number of distance codes
        DUMPBITS(5);
        NEEDBITS(4);
        nb = 4 + GETBITS(4);	// number of bit length codes
        DUMPBITS(4);
        if (nl > 286 || nd > 30) {
            return -1;
        }		// bad lengths

        // read in bit-length-code lengths
        for (j = 0; j < nb; j++) {
            NEEDBITS(3);
            ll[border[j]] = GETBITS(3);
            DUMPBITS(3);
        }
        for (; j < 19; j++) {
            ll[border[j]] = 0;
        }

        // build decoding table for trees--single level, 7 bit lookup
        bl = 7;
        h = new HuftBuild(ll, 19, 19, null, null, bl);
        if (h.status != 0) {
            return -1;
        }	// incomplete code set

        tl = h.root;
        bl = h.m;

        // read in literal and distance code lengths
        n = nl + nd;
        i = l = 0;
        while (i < n) {
            NEEDBITS(bl);
            assert(tl && tl.list);
            t = tl.list[GETBITS(bl)];
            j = t.b;
            DUMPBITS(j);
            j = t.n;
            if (j < 16) {		// length of code in bits (0..1


                e = ((AggregateException)e).InnerException;
                }

                Assert.AreEqual(typeof(T), e.GetType(), "An exception was thrown but it was not of the expected type.");

                if (!String.IsNullOrEmpty(expectedMessage))
                {
                    Assert.AreEqual(expectedMessage, e.Message, "Exception didn't have expected mesage.");
                }
            }
        }

        public static void AreStringsEqual(string expected, string actual)
        {
            expected = expected.CanonicalizeNewlines();
            actual = actual.CanonicalizeNewlines();
            Assert.IsTrue(expected == actual, "{0} != {1}", expected, actual);
        }
    }
}


   _images[id]?.item1.dispose();
      _images[id] = Tuple3(image, hotx, hoty);
    }

    // Update last cursor data.
    // Do not use the previous `image` and `id`, because `_id` may be changed.
    _updateCurData();
  }

  Future<bool> _updateCache(
    Uint8List rgba,
    ui.Image image,
    String id,
    double hotx,
    double hoty,
    int w,
    int h,
  ) async {
    Uint8List? data;
    img2.Image imgOrigin = img2.Image.fromBytes(
        width: w, height: h, bytes: rgba.buffer, order: img2.ChannelOrder.rgba);
    if (isWindows) {
      data = imgOrigin.getBytes(order: img2.ChannelOrder.bgra);
    } else {
      ByteData? imgBytes =
          await image.toByteData(format: ui.ImageByteFormat.png);
      if (imgBytes == null) {
        return false;
      }
      data = imgBytes.buffer.asUint8List();
    }
    final cache = CursorData(
      peerId: peerId,
      id: id,
      image: imgOrigin,
      scale: 1.0,
      data: data,
      hotxOrigin: hotx,
      hotyOrigin: hoty,
      width: w,
      height: h,
    );
    _cacheMap[id] = cache;
    return true;
  }

  bool _updateCurData() {
    _cache = _cacheMap[_id];
    final tmp = _images[_id];
    if (tmp != null) {
      _image = tmp.item1;
      _hotx = tmp.item2;
      _hoty = tmp.item3;
      try {
        // may throw exception, because the listener maybe already dispose
        notifyListeners();
      } catch (e) {
        debugPrint(
            'WARNING: updateCursorId $_id, without notifyListeners(). $e');
      }
      return true;
    } else {
      return false;
    }
  }

  updateCursorId(Map<String, dynamic> evt) {
    if (!_updateCurData()) {
      debugPrint(
          'WARNING: updateCursorId $_id, cache is ${_cache == null ? "null" : "not null"}. without notifyListeners()');
    }
  }

  /// Update the cursor position.
  updateCursorPosition(Map<String, dynamic> evt, String id) async {
    if (!isConnIn2Secs()) {
      gotMouseControl = false;
      _lastPeerMouse = DateTime.now();
    }
    _x = double.parse(evt['x']);
    _y = double.parse(evt['y']);
    try {
      RemoteCursorMovedState.find(id).value = true;
    } catch (e) {
      //
    }
    notifyListeners();
  }

  updateDisplayOrigin(double x, double y, {updateCursorPos = true}) {
    _displayOriginX = x;
    _displayOriginY = y;
    if (updateCursorPos) {
      _x = x + 1;
      _y = y + 1;
      parent.target?.inputModel.moveMouse(x, y);
    }
    parent.target?.canvasModel.resetOffset();
    notifyListeners();
  }

  updateDisplayOriginWithCursor(
      double x, double y, double xCursor, double yCursor) {
    _displayOriginX = x;
    _displayOriginY = y;
    _x = xCursor;
    _y = yCursor;
    parent.target?.inputModel.moveMouse(x, y);
    notifyListeners();
  }

  clear() {
    _x = -10000;
    _x = -10000;
    _image = null;
    _firstUpdateMouseTime = null;
    gotMouseControl = true;
    disposeImages();

    _clearCache();
    _cache = null;
    _cacheMap.clear();
  }

  _clearCache() {
    final keys = {...cachedKeys};
    for


entry:
 *	%l0 = %psr
 *	%l1 = return pc
 *	%l2 = return npc
 *	%l3 = T_TEXTFAULT or T_DATAFAULT
 *
 * Internal:
 *	%l4 = %y, until we call mem_access_fault (then onto trapframe)
 *	%l5 = IE_reg_addr, if async mem error
 *
 */

#if defined(SUN4)
memfault_sun4:
	TRAP_SETUP(-CCFSZ-80)
	INCR(_C_LABEL(uvmexp)+V_FAULTS)	! cnt.v_faults++ (clobbers %o0,%o1)

	st	%g1, [%sp + CCFSZ + 20]	! save g1
	rd	%y, %l4			! save y

	/*
	 * registers:
	 * memerr.ctrl	= memory error control reg., error if 0x80 set
	 * memerr.vaddr	= address of memory error
	 * buserr	= basically just like sun4c sync error reg but
	 *		  no SER_WRITE bit (have to figure out from code).
	 */
	set	_C_LABEL(par_err_reg), %o0 ! memerr ctrl addr -- XXX mapped?
	ld	[%o0], %o0		! get it
	std	%g2, [%sp + CCFSZ + 24]	! save g2, g3
	ld	[%o0], %o1		! memerr ctrl register
	inc	4, %o0			! now VA of memerr vaddr register
	std	%g4, [%sp + CCFSZ + 32]	! (sneak g4,g5 in here)
	ld	[%o0], %o2		! memerr virt addr
	st	%g0, [%o0]		! NOTE: this clears latching!!!
	btst	ME_REG_IERR, %o1	! memory error?
					! XXX this value may not be correct
					! as I got some parity errors and the
					! correct bits were not on?
	std	%g6, [%sp + CCFSZ + 40]
	bz,a	0f			! no, just a regular fault
	 wr	%l0, PSR_ET, %psr	! (and reenable traps)

	/* memory error = death for now XXX */
	clr	%o3
	clr	%o4
	call	_C_LABEL(memerr4_4c)	! memerr(0, ser, sva, 0, 0)
	 clr	%o0
	call	_C_LABEL(prom_halt)
	 nop

0:
	/*
	 * have to make SUN4 emulate SUN4C.   4C code expects
	 * SER in %o1 and the offending VA in %o2, everything else is ok.
	 * (must figure out if SER_WRITE should be set)
	 */
	set	AC_BUS_ERR, %o0		! bus error register
	cmp	%l3, T_TEXTFAULT	! text fault always on PC
	be	normal_mem_fault	! go
	 lduba	[%o0] ASI_CONTROL, %o1	! get its value

#define STORE_BIT 21 /* bit that indicates a store instruction for sparc */
	ld	[%l1], %o3		! offending instruction in %o3 [l1=pc]
	srl	%o3, STORE_BIT, %o3	! get load/store bit (wont fit simm13)
	btst	1, %o3			! test for store operation

	bz	normal_mem_fault	! if (z) is a load (so branch)
	 sethi	%hi(SER_WRITE), %o5     ! damn SER_WRITE wont fit simm13
!	or	%lo(SER_WRITE), %o5, %o5! not necessary since %lo is zero
	or	%o5, %o1, %o1		! set SER_WRITE
#if defined