; i < l; i++) result += String.fromCharCode(97 + r(26))
  return result
}
function rChange(len: number): {from: number, to?: number, insert?: string} {
  if (len == 0 || r(3) == 0) return {insert: rStr(r(5) + 1), from: r(len)}
  let from = r(len - 1)
  return {from, to: Math.min(from + r(5) + 1, len), insert: r(2) == 0 ? rStr(r(2) + 1) : undefined}
}
function rChanges(len: number, count: number): {from: number, to?: number, insert?: string}[] {
  let result = []
  for (let i = 0; i < count; i++) result.push(rChange(len))
  return result
}

describe("ChangeDesc", () => {
  describe("composition", () => {
    function comp(...specs: string[]) {
      let result = specs.pop(), sets = specs.map(mk)
      ist(String(sets.reduce((a, b) => a.composeDesc(b))), result)
    }

    it("can compose unrelated changes",
       () => comp("5 0:2", "1 2:0 4", "1 2:0 2 0:2"))

    it("cancels insertions with deletions",
       () => comp("2 0:2 2", "2 2:0 2", "4"))

    it("joins adjacent insertions",
       () => comp("2 0:2 2", "4 0:3 2", "2 0:5 2"))

    it("joins adjacent deletions",
       () => comp("2 5:0", "1 1:0", "1 6:0"))

    it("allows a delete to shadow multiple operations",
       () => comp("2 2:0 0:3", "5:0", "4:0"))

    it("can handle empty sets",
       () => comp("", "0:8", "8:0", "", ""))

    it("can join multiple replaces", () => {
      comp("2 2:2 2:2 2", "1 2:2 2:2 2:2 1", "1 6:6 1")
      comp("1 2:2 2:2 2:2 1", "2 2:2 2:2 2", "1 6:6 1")
      comp("1 2:3 3:2 1", "2 3:1 2", "1 5:3 1")
    })

    it("throws for inconsistent lengths", () => {
      ist.throws(() => mk("2 0:2").composeDesc(mk("1 0:1")))
      ist.throws(() => mk("2 0:2").composeDesc(mk("30 0:1")))
      ist.throws(() => mk("2 2:0 0:3").composeDesc(mk("7:0")))
    })
  })

  describe("mapping", () => {
    function over(a: string, b: string, result: string) {
      ist(String(mk(a).mapDesc(mk(b))), result)
    }
    function under(a: string, b: string, result: string) {
      ist(String(mk(a).mapDesc(mk(b), true)), result)
    }

    it("can map over an insertion",
       () => over("4 0:1", "0:3 4" , "7 0:1"))

    it("can map over a deletion",
       () => over("4 0:1", "2:0 2", "2 0:1"))

    it("orders insertions", () => {
      over("2 0:1 2", "2 0:1 2", "3 0:1 2")
      under("2 0:1 2", "2 0:1 2", "2 0:1 3")
    })

    it("can map a deletion over an overlapping replace", () => {
      over("2 2:


435547f, 3.8827686f, 9.749226f, 3.8827686f, 17.888355f)
    cubicTo(3.8827686f, 26.027485f, 10.48844f, 32.633156f, 18.62757f, 32.633156f)
    cubicTo(22.107124f, 32.633156f, 25.17857f, 31.248762f, 27.701292f, 29.230509f)
    cubicTo(27.495914f, 30.23739f, 27.623257f, 31.265877f, 28.457436f, 31.990433f)
    lineTo(39.42152f, 41.51784f)
    cubicTo(40.654938f, 42.58917f, 42.508984f, 42.448803f, 43.58031f, 41.215385f)
    cubicTo(44.651638f, 39.981968f, 44.51127f, 38.127922f, 43.277855f, 37.056595f)
    lineTo(32.31377f, 27.529182f)
    cubicTo(31.642242f, 26.945904f, 30.820892f, 26.773214f, 30.007532f, 26.886461f)
    cubicTo(31.994232f, 24.374039f, 33.37237f, 21.337658f, 33.37237f, 17.888351f)
    cubicTo(33.37237f, 9.749222f, 26.7667f, 3.14355f, 18.627571f, 3.14355f)
    close()
    moveTo(18.551954f, 4.369738f)
    cubicTo(26.191414f, 4.369738f, 31.843729f, 9.158689f, 31.843729f, 17.661512f)
    cubicTo(31.843729f, 26.336624f, 26.027039f, 30.953287f, 18.551954f, 30.953287f)
    cubicTo(11.249005f, 30.953287f, 5.2601805f, 25.475195f, 5.2601805f, 17.661512f)
    cubicTo(5.2601805f, 9.677405f, 11.084819f, 4.3697376f, 18.551954f, 4.3697376f)
    close()
}
shape = Outline.Generic(generalPath!!)
drawOutline(outline = shape!!, style = stroke!!, brush=brush!!, alpha = alpha, blendMode = blendMode)
}
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
withTransform({
transform(
Matrix(values=floatArrayOf(
-0.6432769894599915f, 0.0f, 0.0f, 0.0f,
0.0f, 0.6432769894599915f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
31.49802017211914f, 4.828703880310059f, 0.0f, 1.0f)
))}){
// _0_2_6_0_1
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(18.602905f, 3.0803552f)
    cubicTo(10.437466f, 3.0803552f, 3.810441f, 9.707379f, 3.810441f, 17.87282f)
    cubicTo(3.810441f, 26.03826f, 10.437466f


) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
#define BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <boost/asio/detail/config.hpp>

#if defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))

#include <boost/asio/detail/noncopyable.hpp>

#include <boost/asio/detail/push_options.hpp>

namespace boost {
namespace asio {
namespace detail {

class gcc_hppa_fenced_block
  : private noncopyable
{
public:
  enum half_t { half };
  enum full_t { full };

  // Constructor for a half fenced block.
  explicit gcc_hppa_fenced_block(half_t)
  {
  }

  // Constructor for a full fenced block.
  explicit gcc_hppa_fenced_block(full_t)
  {
    barrier();
  }

  // Destructor.
  ~gcc_hppa_fenced_block()
  {
    barrier();
  }

private:
  static void barrier()
  {
    // This is just a placeholder and almost certainly not sufficient.
    __asm__ __volatile__ ("" : : : "memory");
  }
};

} // namespace detail
} // namespace asio
} // namespace boost

#include <boost/asio/detail/pop_options.hpp>

#endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))

#endif // BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
//
// detail/posix_signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef BOOST_ASIO_DETAIL_POSIX_SIGNAL_BLOCKER_HPP
#define BOOST_ASIO_DETAIL_POSIX_SIGNAL_BLOCKER_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <boost/asio/detail/config.hpp>

#if defined(BOOST_ASIO_HAS_PTHREADS)

#include <csignal>
#include <pthread.h>
#include <signal.h>
#include <boost/asio/detail/noncopyable.hpp>

#include <boost/asio/detail/push_options.hpp>

namespace boost {
namespace asio {
namespace detail {

class posix_signal_blocker
  : private noncopyable
{
public:
  // Constructor blocks all signals for the calling thread.
  posix_signal_blocker()
    : blocked_(false)
  {
    sigset_t new_mask;
    sigfillset(&new_mask);
    blocked_ = (pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask_) == 0);
  }

  // Destructor restores the previous signal mask.
  ~posix_signal_blocker()
  {
    if (blocked_)
      pthread_sigmask(SIG_SETMASK, &old_mask_, 0);
  }

  // Block all signals for the calling thread.
  void block()
  {
    if (!blocked_)
    {
      sigset_t new_mask;
      sigfillset(&new_mask);
      blocked_ = (pthread_sigmask(


  String get close => 'បិទ';

  @override
  String get searchSettings => 'ការកំណត់ស្វែងរក';

  @override
  String get cut => 'កាត់';

  @override
  String get paste => 'បិទភ្ជាប់';

  @override
  String get insertTable => 'បញ្ចូលតារាង';

  @override
  String get insertVideo => 'បញ្ចូលវីដេអូ';

  @override
  String get errorUnexpectedSavingImage =>
      'An unexpected error occurred while saving the image. Please try again.';

  @override
  String get successImageSavedGallery => 'Image saved to your gallery.';

  @override
  String get successImageSaved => 'Image saved successfully.';

  @override
  String get successImageDownloaded => 'Image downloaded successfully.';

  @override
  String get openGallery => 'Open Gallery';

  @override
  String get openFileLocation => 'Open File Location';

  @override
  String get openFile => 'Open File';

  @override
  String get saveImagePermissionDenied =>
      'Couldn’t save the image due to missing permission';
}
import 'package:flutter/foundation.dart' show Diagnosticable, immutable;
import 'package:flutter/material.dart';

/// Used to configure the dialog's look and feel.

@immutable
class QuillDialogTheme with Diagnosticable {
  const QuillDialogTheme({
    this.buttonTextStyle,
    this.labelTextStyle,
    this.inputTextStyle,
    this.dialogBackgroundColor,
    this.shape,
    this.buttonStyle,
    this.linkDialogConstraints,
    this.linkDialogPadding = const EdgeInsets.all(16),
    this.mediaSelectorDialogConstraints,
    this.mediaSelectorDialogPadding = const EdgeInsets.all(16),
    this.isWrappable = false,
    this.runSpacing = 8.0,
  }) : assert(runSpacing >= 0);

  ///The text style to use for the button shown in the dialog
  final TextStyle? buttonTextStyle;

  ///The text style to use for the label shown in the link-input dialog
  final TextStyle? labelTextStyle;

  ///The text style to use for the input text shown in the link-input dialog
  final TextStyle? inputTextStyle;

  ///The background color for the Quill dialog
  final Color? dialogBackgroundColor;

  /// The shape of this dialog's border.
  ///
  /// Defines the dialog's [Material.shape].
  ///
  /// The default shape is a [RoundedRectangleBorder] with a radius of 4.0
  final ShapeBorder? shape;

  /// Constrains for [LinkStyleDialog].
  final BoxConstraints? linkDialogConstraints;

  /// The padding for content of [LinkStyleDialog].
  final EdgeInsetsGeometry linkDialogPadding;

  /// Constrains for [MediaSourceSelectorDialog].
  final BoxConstraints? mediaSelectorDialogConstraints;

  /// The padding for content of [MediaSourceSelectorDialog].
  final EdgeInsetsGeometry mediaSelectorDialogPadding;

  /// Customizes this button's appearance.
  final ButtonStyle? buttonStyle;

  /// Whether dialog's children are wrappred with [Wrap] instead of [Row].
  final bool isWrappable;

  /// How much space to place between the runs themselves in the cross axis.
  ///
  /// Make sense if [isWrappable] is `true`.
  ///
  /// Defaults to 0.0.
  final double runSpacing;

  QuillDialogTheme copyWith({
    TextStyle? buttonTextStyle,
    TextStyle? labelTextStyle,
    TextStyle? inputTextStyle,
    Color? dialogBackgroundColor,
    ShapeBorder? shape,
    ButtonStyle? buttonStyle,
    BoxConstraints? linkDialogConstraints,
    EdgeInsetsGeometry? linkDialogPadding,
    BoxConstraints? imageDialogConstraints,
    EdgeInsetsGeometry? mediaDialogPadding,
    bool? isWrappable,
    double? runSpacing,
  }) {
    return QuillDialogTheme(
      buttonTextStyle: buttonTextStyle ?? this.buttonTextStyle,
      labelTextStyle: labelTex


pe is a subtype of a type U if all the
   * union type's constituents are a subtype of U. Formally

   * {@code (T1, …, Tn) <: U} if and only
   * {@code Tk <: U} for all {@code k ∈ 1..n}.

   *
(union-r) — A type U is a subtype of a union type if it is a
   * subtype of one of the union type's constituents. Formally

   * {@code U <: (T1, …, Tn)} if and only
   * if {@code U <: Tk} for some index {@code k}.

   *
(objects) — an Object {@code O1} is a subtype
   * of an object {@code O2} if it has more properties
   * than {@code O2} and all common properties are
   * pairwise subtypes.

   *

   *
   * @return {@code this <: that}
   */
  public abstract boolean isSubtype(JSType that);

  /**
   * Whether this type is meaningfully different from {@code that} type.
   * This is a trickier check than pure equality, because it has to properly
   * handle unknown types.
   *
   * @see Unknown
   *     unknowns
   */
  public boolean differsFrom(JSType that) {
    // if there are no unknowns, just use normal equality.
    if (!this.isUnknownType() && !that.isUnknownType()) {
      return !this.isEquivalentTo(that);
    }
    // otherwise, they're different iff one is unknown and the other is not.
    return this.isUnknownType() ^ that.isUnknownType();
  }

  /**
   * A generic implementation meant to be used as a helper for common subtyping
   * cases.
   */
  static boolean isSubtype(JSType thisType, JSType thatType) {
    // unknown
    if (thatType.isUnknownType()) {
      return true;
    }
    // equality
    if (thisType.isEquivalentTo(thatType)) {
      return true;
    }
    // all type
    if (thatType.isAllType()) {
      return true;
    }
    // unions
    if (thatType instanceof UnionType) {
      UnionType union = (UnionType)thatType;
      for (JSType element : union.alternates) {
        if (thisType.isSubtype(element)) {
          return true;
        }
      }
    }
    // named types
    if (thatType instanceof NamedType) {
      return thisType.isSubtype(((NamedType)thatType).getReferencedType());
    }
    return false;
  }

  /**
   * Visit this type with the given visitor.
   * @see com.google.javascript.rhino.jstype.Visitor
   * @return the value returned by the visitor
   */
  public abstract <T> T visit(Visitor<T> visitor);

  /**
   * Force this type to resolve, even if the registry is in a lazy
   * resolving mode.
   * @see #resolve
   */
  public final JSType forceResolve(ErrorReporter t, StaticScope<JSType> scope) {
    ResolveMode oldResolveMode = registry.getResolveMode();
    registry.setResolveMode(ResolveMode.IMMEDIATE);
    JSType result = resolve(t, scope);
    registry.setResolveMode(oldResolveMode);
    return result;
  }

  /**
   * Resolve this type in the given scope.
   *
   * The returned value must be equal to {@code this}, as defined by
   * {@link #isEquivalentTo}. It may or may not be the same object. This method
   * may modify the internal state of {@code this}, as long as it does
   * so in a way that preserves Object


ktO8hnZrFPN1FOim70A04x+5k76aSTqJIU8ndR5fCYwDSY6tHrI5gOSZnndL9Ozx9rBmtf9xbgvsf+WkUWj9hJS+KkrT4nqprr7g9L5Ewntf4nLmhf87uXNUDOLxEktc6vOl8SrqpxPv9JbLH8nJzONJLcDIqU8w5fblEw8bLRFMr4gve4rBJ7C3cJ4y82Qx+TBwyNhKB1i0+FNQt74s2fFSrn/Nu4jm9j/fh89hbin5eTI+wCdCFQp2j6q4J9YCj/NICnQxB+52tKiti2IOPDtwUj5N1DYArSiugtsT+hMVnAjoX9gSKy8q+gVxZWpJWpE3SDm90yZLp/Xdgb+qt0E1jiFyYE2KgTGRqSu5/ZodRS1c+4GsWU38g412W4c0ryZviZZkWHp10U+mqELSVgpaBWs27OGteIbtQXWwDp0SNig/v/Nj44pE4rRSXLDFOjcZCAyGJYxEUqdC6WICknWr7meWxSIq0xvZNZZNWilZJ6vfkhgcI0BHkrS7vki7KXGV83HVEj0Wz8z0HnilqVhF1K71ww6blpmojbdre0VisAzvao3XhAPZt7tH6BM0i/e07jIvfgousXbE7kUQCcpiTktpQthOPCbSlTHX4gBVIUAVFboJuadWzi7sTMUX9tawM/1Zc9i2xpda1FJ6PIcj9HuKYkWBxp5rD8jYZGPqr3//KwElRpSPMj9Qwx47cruQfXaRlNZ6j0Fa/Uc7de58b72iHyEJ82Vy9ArpxFREaoJMuyeUbxZ/Dwb5TOuOfiNiR7LmyQaYaeHwIcjatqJW2GmJ0xN53V38eYQZ2Hlo7uYKQwn9B2maoCwDQFT8PvM6ASn6+ABn+zsNAfv2NOlEW6AIRCX32qpE3QxvAIjANVCCDQK6eA8IKjgIPV9AL+SlrkbnIBHg40h/hArOBPrwOY858jBXPnGfCo/MoPAIPt4ThoXiQkYxkmLBlyJRPiJcPg2T92Qpok8fN89riEpIpsFKOgw0QXs+xDEVctfGVY35fq29yCVKFjIGLkF4IRxgLisLaHQV+rC7wzgWoIPOviEwkJOstAAA=) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Alegreya Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(data:font/woff2;base64,d09GMgABAAAAAFU8ABEAAAAAwkAAA


e a5, off, s[8:11], s3 offset:4095 slc

// GFX90A: buffer_load_sbyte a5, off, s[8:11], s3 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe0,0x00,0x05,0x82,0x03]
// NOT-GFX90A: :[[@LINE+1]]:{{[0-9]+}}: error: invalid register class: agpr loads and stores not supported on this GPU
buffer_load_sbyte a5, off, s[8:11], s3 offset:4095

// GFX90A: buffer_load_sbyte a255, off, s[8:11], s3 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe0,0x00,0xff,0x82,0x03]
// NOT-GFX90A: :[[@LINE+1]]:{{[0-9]+}}: error: invalid register class: agpr loads and stores not supported on this GPU
buffer_load_sbyte a255, off, s[8:11], s3 offset:4095

// GFX90A: buffer_load_sbyte a5, off, s[12:15], s3 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe0,0x00,0x05,0x83,0x03]
// NOT-GFX90A: :[[@LINE+1]]:{{[0-9]+}}: error: invalid register class: agpr loads and stores not supported on this GPU
buffer_load_sbyte a5, off, s[12:15], s3 offset:4095

// GFX90A: buffer_load_sbyte a5, off, s[96:99], s3 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe0,0x00,0x05,0x98,0x03]
// NOT-GFX90A: :[[@LINE+1]]:{{[0-9]+}}: error: invalid register class: agpr loads and stores not supported on this GPU
buffer_load_sbyte a5, off, s[96:99], s3 offset:4095

// GFX90A: buffer_load_sbyte a5, off, s[8:11], s101 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe0,0x00,0x05,0x82,0x65]
// NOT-GFX90A: :[[@LINE+1]]:{{[0-9]+}}: error: invalid register class: agpr loads and stores not supported on this GPU
buffer_load_sbyte a5, off, s[8:11], s101 offset:4095

// GFX90A: buffer_load_sbyte a5, off, s[8:11], m0 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe0,0x00,0x05,0x82,0x7c]
// NOT-GFX90A: :[[@LINE+1]]:{{[0-9]+}}: error: invalid register class: agpr loads and stores not supported on this GPU
buffer_load_sbyte a5, off, s[8:11], m0 offset:4095

// GFX90A: buffer_load_sbyte a5, off, s[8:11], 0 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe0,0x00,0x05,0x82,0x80]
// NOT-GFX90A: :[[@LINE+1]]:{{[0-9]+}}: error: invalid register class: agpr loads and stores not supported on this GPU
buffer_load_sbyte a5, off, s[8:11], 0 offset:4095

// GFX90A: buffer_load_sbyte a5, off, s[8:11], -1 offset:4095 ; encoding: [0xff,0x0f,0x44,0xe


IABILITY, 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. */

#include "asmdef.h"

/* char *__utoa_ncheck (unsigned val, char *s, unsigned char radix)
   This function is the utoa() without checking the radix for 2..36 margins.
 */

#define val_lo	r24
#define val_hi	r25
#define str_lo	r22
#define radix	r20

#define counter	r21
#define digit	r26
#define sign	r27

ENTRY	__utoa_ncheck
	clr	sign

ENTRY	__utoa_common
	X_movw	ZL, str_lo
	clr	counter

1:  ; Vanilla 16:8 quotient and remainder to pop the digit
    ; digit <- val % radix
    ; val   <- val / radix
	clr	digit

2:	lsl	val_lo
	rol	val_hi
	rol	digit
	cp	digit, radix
	brlo	3f
	sub	digit, radix
	inc	val_lo
3:	subi	counter, 16		; 256 / 16 == 16 loops
	brne	2b

    ; Convert the digit to ASCII...
	subi	digit, -'0'
	cpi	digit, '9'+1
	brlo	4f
	subi	digit, '0'-'a'+10
4:  ; ... and store it to the reversed string
	st	Z+, digit

    ; Iterate until all digits are sucked out of VAL.
	X_sbiw	val_lo, 0
	brne	1b

    ; Store the sign (if any)
	cpse	sign, __zero_reg__
	st	Z+, sign

    ; Terminate the string with '\0'
	st	Z+, __zero_reg__

    ; Reverse the string and return the original string pointer
	X_movw	r24, str_lo
	XJMP	_U(strrev)

ENDFUNC


old_copy</c-><c- p>(</c-><c- n>cb_t</c-> <c- n>cb</c-><c- p>,</c-> <c- b>void</c-> <c- o>*</c-><c- n>data</c-><c- p>,</c-> <c- b>size_t</c-> <c- n>data_size</c-><c- p>);</c->

<c- b>void</c-> <c- nf>example7_modified</c-><c- p>()</c->
<c- p>{</c->
  <c- c1>// non const-qualified variable is by-name</c->
  <c- b>int</c-> <c- p>(</c-><c- o>*</c-><c- n>p</c-><c- p>)[</c-><c- mi>10</c-><c- p>]</c-> <c- o>=</c-> <c- n>malloc</c-><c- p>(</c-><c- k>sizeof</c-> <c- o>*</c-><c- n>p</c-><c- p>);</c->
  <c- k>if</c-> <c- p>(</c-><c- o>!</c-><c- n>p</c-><c- p>)</c-> <c- k>return</c-><c- p>;</c->
  <c- c1>// change to `const` to enable capture</c->
  <c- b>int</c-> <c- p>(</c-><c- k>const</c-> <c- o>*</c-><c- n>cap_p</c-><c- p>)[</c-><c- mi>10</c-><c- p>]</c-> <c- o>=</c-> <c- n>p</c-><c- p>;</c->
  <c- b>int</c-> <c- n>bar</c-><c- p>(</c-><c- b>int</c-> <c- n>x</c-><c- p>,</c-> <c- b>void</c-> <c- o>*</c-><c- n>data</c-><c- p>)</c-> <c- n>_Closure</c-><c- p>(</c-><c- n>data</c-><c- p>)</c->
  <c- p>{</c->
<c- cp>#if 0</c->
<c- c>    // dangerous -- may not exist</c->
<c- c>    return (*p)[x];</c->
<c- cp>#else</c->
    <c- c1>// not dangerous -- captured by value</c->
    <c- k>return</c-> <c- p>(</c-><c- o>*</c-><c- n>cap_p</c-><c- p>)[</c-><c- n>x</c-><c- p>];</c->
<c- cp>#endif</c->
  <c- p>}</c->
  <c- c1>// sizeof can be used to obtain the required size</c->
  <c- n>api_old_copy</c-><c- p>(</c-><c- n>bar</c-><c- p>,</c-> <c- o>&</c-><c- n>_Closure</c-><c- p>(</c-><c- n>bar</c-><c- p>),</c-> <c- k>sizeof</c-><c- p>(</c-><c- n>_Closure</c-><c- p>(</c-><c- n>bar</c-><c- p>)));</c->
<c- p>}</c->

One would need to form a copy of any mutable variable into a <c- k>const</c-> one in order to ensure that it gets its whole value placed inside of whatever the implementation decides to place inside of <c- n>_Closure</c->. This is, in many ways, a by-proxy form of doing C++ Lambda captures or using <c- n>__block</c-> in Apple blocks. At the very least with C++ Lambdas and Apple Blocks, their design is once again explicit; it allows the user to decide if something should be transported by-value, and then can be moved into a by-name state by the user. For 1980 direction, this requires duplicated


ull)
            {
                this.BeginGetValueList(sender, args);
            }
        }

        public event EndGetValueListEventHandle EndGetValueList;
        public void fireEndGetValueList(object sender,
            EndGetValueListEventArgs args)
        {
            if (EndGetValueList != null)
            {
                this.EndGetValueList(sender, args);
            }
        }

        #endregion

        private void MarcFixedFieldControl_Enter(object sender, EventArgs e)
        {
            if (this.templateRoot.Lines.Count > 0)
            {

                TemplateLine line = null;
                if (this.m_currentTextBox != null)
                    line = GetLine(this.m_currentTextBox);
                else
                    line = this.templateRoot.Lines[0];

                if (line == null)
                    return;

                ChangeFocusDisplay(line.TextBox_value);
                line.TextBox_value.Focus();
            }
        }

        public void FocusFirstLine()
        {
            // 如果有闲暇，可以编为第一次就针对性焦点在某个行上
            if (this.templateRoot.Lines.Count > 0)
            {
                TemplateLine line = this.templateRoot.Lines[0];
                line.TextBox_value.SelectionStart = 0;
                line.TextBox_value.SelectionLength = 0;

                ChangeFocusDisplay(line.TextBox_value);
                line.TextBox_value.Focus();
            }
        }

        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);

            AdjuetLayoutSize();
        }

        // 调整 ListView 内部左边第一列的宽度，确保文字不被显示截断
        public void AdjustListviewColumnWidth()
        {

        }

        public void AdjuetLayoutSize()
        {
            if (this._editArea != null)
            {
                int height = this.ClientSize.Height;
                this._editArea.Size = new Size(this._editAreaWidth, Math.Max(0, height));
            }

            if (listView_values != null)
            {
                int nWidth = this.Width - this.listView_values.Location.X;
                this.listView_values.Size = new Size(nWidth, this.Size.Height);
            }
        }

        int _editAreaWidth = 0;

        public void AdjustTextboxSize(
            bool bSimulate,
            out int nResultWidth,
            out int nResultHeight
            )
        {
            this.SuspendLayout();

            int nLabelWidth = 0;
            int nNameWidth = 0;
            GetMaxWidth(//Graphics g,
  out nLabelWidth,
  out nNameWidth);

            int y = this._editArea.Padding.Top;
            int nBlankWidth = 8;
            int nLineSep = 4;
            int nStateWidth = 8;
            int left_padding = this._editArea.Padding.Left;
            int right_padding = this._editArea.Padding.Right;

            int nMaxValueWidth = 0;
            for (int i = 0; i < this.templateRoot.Lines.Count; i++)
            {
                if (i != 0)
                    y += nLineSep;

                TemplateLine line = this.templateRoot.Lines[i];

                string strTempValue = line.m_strValue;
                // strTempValue = strTempValue.Replace(' ','m');   // ?
                /*
                string strTemp = "";
                strTempValue = strTemp.PadLeft(strTempValue.Length+1, 'M');   // 2008/7/16
                 * */
                strTempValue = strTempValue.Replace(' ', 'M');   // ?

                int nValueWidth = GraphicsUtil.GetWidth(//g,
                    this.DefaultValueFont,
                    strTempValue);

                if (nMaxValueWidth <


理人, 负责人",
"superinsulant":"超绝热体; 超绝缘体",
"superinsulation":"[机] 超绝缘",
"superintegrated":"[计] 高密度集成的",
"superintegrated memory":"[计] 高密度集成存储器",
"superintegration":"高密度集成",
"superintelligence":"[网络] 超智能；超级智能",
"superintelligent":"a. 特别聪明的,有超常智慧的",
"superintend":"v. 指挥, 管理, 监督",
"superintended":"v. 管理, 监督, 主管( superintend的过去式和过去分词 )",
"superintendence":"n. 指挥, 管理, 监督权\\n[法] 监督, 管理, 指挥",
"superintendency":"n. 监督者的地位\\n[法] 主管人的职位",
"superintendent":"n. 监督人, 主管人, 主日学校校长\\n[经] 监督人, 主管人(部门)",
"superintendent of customs":"[经] 海关监督",
"superintendent of documens":"[法] 档案室主任",
"superintendent of registrar":"[法] 注册监督",
"superintendent of state police":"[法] 州警察总监",
"superintendent office":"[经] 工场监督部门, 监工部",
"superintendent office expense":"[经] 监工部门费用",
"superintendents":"n. 警长( superintendent的复数形式 ); （大楼的）管理人; 监管人; （美国）警察局长",
"superintending":"v. 管理, 监督, 主管( superintend的现在分词 )",
"superintends":"v. 管理, 监督, 主管( superintend的第三人称单数 )",
"superinvar":"n. [冶]超殷钢,超级因瓦铁镍合金",
"superinverse":"上逆",
"superinvolution":"[医] 复旧过度",
"superinvolution of uterus":"[医] 子宫复旧过度",
"superionic conductor":"[化] 超离子导体",
"superior":"n. 长者, 占优势的人, 上级\\na. 上级的, 出众的, 高傲的",
"superior alveolar artery":"un. 上齿槽动脉",
"superior articular process":"[医] 上关节突",
"superior ataxia":"[医] 面臂型共济失调",
"superior carotid ganglia":"[医] 颈动脉上神经节",
"superior carotid triangle":"[医] 颈动脉上三角",
"superior cerebellar artery":" 小脑上动脉",
"superior cerebral vein":" [医]大脑上静脉",
"superior colliculus":" 上丘",
"superior commissure":"[医] 上连合, 缰连合",
"superior conjunction":" 上合",
"superior court":"[法] 上级法院, 高级法院",
"superior dental foramina":"[医] 鼻腭神经孔,


}

class GGetMarketsData_markets_marketDynamicsBuilder
    implements
        Builder<GGetMarketsData_markets_marketDynamics,
            GGetMarketsData_markets_marketDynamicsBuilder> {
  _$GGetMarketsData_markets_marketDynamics? _$v;

  String? _G__typename;
  String? get G__typename => _$this._G__typename;
  set G__typename(String? G__typename) => _$this._G__typename = G__typename;

  String? _marketId;
  String? get marketId => _$this._marketId;
  set marketId(String? marketId) => _$this._marketId = marketId;

  double? _startPrice;
  double? get startPrice => _$this._startPrice;
  set startPrice(double? startPrice) => _$this._startPrice = startPrice;

  double? _amount24h;
  double? get amount24h => _$this._amount24h;
  set amount24h(double? amount24h) => _$this._amount24h = amount24h;

  double? _lastPrice;
  double? get lastPrice => _$this._lastPrice;
  set lastPrice(double? lastPrice) => _$this._lastPrice = lastPrice;

  double? _lowPrice;
  double? get lowPrice => _$this._lowPrice;
  set lowPrice(double? lowPrice) => _$this._lowPrice = lowPrice;

  double? _highPrice;
  double? get highPrice => _$this._highPrice;
  set highPrice(double? highPrice) => _$this._highPrice = highPrice;

  GGetMarketsData_markets_marketDynamicsBuilder() {
    GGetMarketsData_markets_marketDynamics._initializeBuilder(this);
  }

  GGetMarketsData_markets_marketDynamicsBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _G__typename = $v.G__typename;
      _marketId = $v.marketId;
      _startPrice = $v.startPrice;
      _amount24h = $v.amount24h;
      _lastPrice = $v.lastPrice;
      _lowPrice = $v.lowPrice;
      _highPrice = $v.highPrice;
      _$v = null;
    }
    return this;
  }

  @override
  void replace(GGetMarketsData_markets_marketDynamics other) {
    ArgumentError.checkNotNull(other, 'other');
    _$v = other as _$GGetMarketsData_markets_marketDynamics;
  }

  @override
  void update(
      void Function(GGetMarketsData_markets_marketDynamicsBuilder)? updates) {
    if (updates != null) updates(this);
  }

  @override
  GGetMarketsData_markets_marketDynamics build() => _build();

  _$GGetMarketsData_markets_marketDynamics _build() {
    final _$result = _$v ??
        new _$GGetMarketsData_markets_marketDynamics._(
            G__typename: BuiltValueNullFieldError.checkNotNull(G__typename,
                r'GGetMarketsData_markets_marketDynamics', 'G__typename'),
            marketId: marketId,
            startPrice: startPrice,
            amount24h: amount24h,
            lastPrice: lastPrice,
            lowPrice: lowPrice,
            highPrice: highPrice);
    replace(_$result);
    return _$result;
  }
}

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint

// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:gql/ast.dart' as _i1;

const CreateNonCustodialRecipient = _i1.OperationDefinitionNode(
  type: _i1.OperationType.mutation,
  name: _i1.NameNode(value: 'CreateNonCustodialRecipient'),
  variableDefinitions: [
    _i1.


/* CSS for Medium Laptops */
@media only screen and (min-width: 1400px) and (max-width: 1500px) and (max-device-height: 900px) {
  .add_ons_page_1_container {
    grid-template-columns: repeat(auto-fit, minmax(33.35%, 1fr));
  }
}

/* CSS for Big Desktops */
@media only screen and (min-width: 1800px) {
  .add_ons_page_1_header h2 {
    font-size: 4rem;
    line-height: 4rem;
    margin-top: 1rem;
  }

  .add_ons_page_1_header h3 p {
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 3rem;
  }
}

/* CSS for Huge Desktops */
@media only screen and (min-width: 2200px) {
  .add_ons_page_1_header h2 {
    font-size: 5rem;
    line-height: 8rem;
    margin-top: 2rem;
  }

  .add_ons_page_1_header h3 p {
    margin-top: 1rem;
    margin-bottom: 3rem;
    font-size: 4rem;
  }
}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}meta.foundation-version{font-family:"/5.5.3/"}meta.foundation-mq-small{font-family:"/only screen/";width:0}meta.found


/*
 * Copyright (C) 2018 KeePassXC Team <team@keepassxc.org>
 *
 * 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 2 or (at your option)
 * version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef KEEPASSXC_TESTCLOCK_H
#define KEEPASSXC_TESTCLOCK_H

#include "core/Clock.h"

#include <QDateTime>

class MockClock : public Clock
{
public:
    MockClock(int year, int month, int day, int hour, int min, int second);

    MockClock(QDateTime utcBase = QDateTime::currentDateTimeUtc());

    const QDateTime& advanceSecond(int seconds);
    const QDateTime& advanceMinute(int minutes);
    const QDateTime& advanceHour(int hours);
    const QDateTime& advanceDay(int days);
    const QDateTime& advanceMonth(int months);
    const QDateTime& advanceYear(int years);

    static void setup(Clock* clock);
    static void teardown();

protected:
    QDateTime currentDateTimeUtcImpl() const;
    QDateTime currentDateTimeImpl() const;

private:
    QDateTime m_utcCurrent;
};

#endif // KEEPASSXC_TESTCLOCK_H


into a bowl then add the juice from the lemons. Break the eggs into a large bowl and add the caster sugar and mix well. Add the lemon juice, zest and the cream and whisk gently.

5. Pour the mixture into the pastry case and bake at 350°F for 25 to 30 minutes until set.

6. Sprinkle with a little icing sugar and serve with cream.

Nutrition

Amount per serving

Serving size: 1 slice<meta content=\"1 slice\" itemprop=\"recipeNutServingSize\">

Calories: 480<meta content=\"480\" itemprop=\"recipeNutCalories\">

Total Fat: 22.4g<meta content=\"22.4\" itemprop=\"recipeNutTotalFat\">

Saturated Fat: 12.7g<meta content=\"12.7\" itemprop=\"recipeNutSaturatedFat\">

Cholesterol: 215mg<meta content=\"215\" itemprop=\"recipeNutCholesterol\">

Sodium: 197mg<meta content=\"197\" itemprop=\"recipeNutSodium\">

Total Carbohydrate: 64.7g<meta content=\"64.7\" itemprop=\"recipeNutTotalCarbohydrate\">

Dietary Fiber: 0.6g<meta content=\"0.6\" itemprop=\"recipeNutDietaryFiber\">

Sugars: 46.1g<meta content=\"46.1\" itemprop=\"recipeNutSugars\">

Protein: 8g<meta content=\"8\" itemprop=\"recipeNutProtein\">

Photos

<meta content=\"b05310a1-15ec-560e-896d-e7a54223d0a0\" itemprop=\"recipeId\"><meta content=\"\" itemprop=\"recipeShareId\"><meta content=\"False\" itemprop=\"recipeIsFavourite\"><meta content=\"0\" itemprop=\"recipeRating\">

Pancakes

Courses: Breakfast

Categories:

Collections:

Source: Recipe Keeper

Serving size: 8-12 pancakes

Preparation time: 5 mins<meta content=\"PT5M\" itemprop=\"prepTime\">

Cooking time: 15 mins<meta content=\"PT15M\" itemprop=\"cookTime\">

Ingredients

3 cups/375g all-purpose flour

3 teaspoons baking powder

1 tablespoon caster sugar

1 1/2 cups/375ml milk

3 eggs

1/2 teaspoon salt

Directions

1. Sift


、炸毁礁石等损害海岸带地形地貌和生态环境的活动。鼓励开展退堤还海、清淤疏浚、生态廊道建设等提升海岸带资源价值和恢复海岸带生态功能的整治修复活动。

在优化利用区域应当科学布局占用海岸带的建设项目，合理控制建设项目规模，提高利用效率。

第二十条 除国家重大项目外，全面禁止围海填海。围海填海活动应当执行法律、法规和国家有关规定。

第二十一条 市、区（县级市）人民政府应当划定海岸带范围内海水养殖禁养区和限养区。禁养区内禁止各类水产养殖活动。限养区内不得超越养殖证许可范围从事水产养殖活动。

毗邻海岸线的限养区，市、区（县级市）人民政府可以划定一定的范围禁止筏式养殖、网箱养殖等水面设施养殖。

海岸带陆域范围内禁止规模化畜禽养殖及新建、扩建畜禽养殖专业户。已有的畜禽养殖专业户、散养户应当采取必要的污染防治措施，妥善处理畜禽养殖废弃物，达到防渗、防雨、防溢流的要求。

第二十二条 区（县级市）人民政府应当制定海岸带整治修复计划，对因潮汐侵蚀等自然灾害和开发利用等人类活动破坏的海岸带进行整治修复。

整治修复应当按照维护生态、保持原貌的原则，尽可能多地保留原始风貌并与周围的自然环境相协调。

第二十三条 市、区（县级市）人民政府应当加强海洋垃圾污染防治工作，建立海洋垃圾监测、收集、运输及处置机制，落实属地管理责任。

在海岸带范围内禁止丢弃、掩埋、堆积、抛撒、焚烧垃圾等废弃物，禁止倾倒含有毒有害物质的可能破坏环境的液体。

海岸带范围内从事生产、经营、服务活动的单位和个人应当设置垃圾回收装置或者设施，及时收集清理垃圾等废弃物，保持海岸带


margin-top: theme(margin.16);
  }

  > :first-child,
  li > :first-child {
    margin-top: 0;
  }
}
@charset "UTF-8";/*!
 * Bootstrap v5.0.2 (https://getbootstrap.com/)
 * Copyright 2011-2021 The Bootstrap Authors
 * Copyright 2011-2021 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0))}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-font-sans-serif);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.


#pragma once
#include <QWidget>

class ChildWindow;
QT_BEGIN_NAMESPACE
class QImage;
class QPainter;
QT_END_NAMESPACE

enum DrawStatus
{
	kChoose,
	kPaste,
	kNone
};

class ImageWidget :
	public QWidget
{
	Q_OBJECT

public:
	ImageWidget(ChildWindow *relatewindow);
	~ImageWidget(void);

	int ImageWidth();											// Width of image
	int ImageHeight();											// Height of image
	void set_draw_status_to_choose();
	void set_draw_status_to_paste();
	QImage* image();
	void set_source_window(ChildWindow* childwindow);

protected:
	void paintEvent(QPaintEvent *paintevent);
	void mousePressEvent(QMouseEvent *mouseevent);
	void mouseMoveEvent(QMouseEvent *mouseevent);
	void mouseReleaseEvent(QMouseEvent *mouseevent);

public slots:
	// File IO
	void Open(QString filename);								// Open an image file, support ".bmp, .png, .jpg" format
	void Save();												// Save image to current file
	void SaveAs();												// Save image to another file

	// Image processing
	void Invert();												// Invert pixel value in image
	void Mirror(bool horizontal=false, bool vertical=true);		// Mirror image vertically or horizontally
	void TurnGray();											// Turn image to gray-scale map
	void Restore();												// Restore image to origin

public:
	QPoint						point_start_;					// Left top point of rectangle region
	QPoint						point_end_;						// Right bottom point of rectangle region

private:
	QImage						*image_;						// image
	QImage						*image_backup_;

	// Pointer of child window
	ChildWindow					*source_window_;				// Source child window

	// Signs
	DrawStatus					draw_status_;					// Enum type of draw status
	bool						is_choosing_;
	bool						is_pasting_;
};


ons[1]
	require.Equal(t, "token", otelObj.Actions[1].Key)
	require.Equal(t, "delete", string(action.Action))

	var inputLog = `{
		"resourceLogs": [{
			"scopeLogs": [{
				"log_records": [{
					"timeUnixNano": "1581452773000000111",
					"severityNumber": 9,
					"severityText": "info",
					"name": "logA",
					"body": { "stringValue": "AUTH log message" },
					"attributes": [{
						"key": "password",
						"value": { "stringValue": "12345" }
					},
					{
						"key": "token",
						"value": { "stringValue": "12345" }
					}]
				}]
			}]
		},
		{
			"scopeLogs": [{
				"log_records": [{
					"timeUnixNano": "1581452773000000999",
					"severityNumber": 5,
					"severityText": "debug",
					"name": "logA",
					"body": { "stringValue": "AUTH log message" },
					"attributes": [{
						"key": "password",
						"value": { "stringValue": "12345" }
					},
					{
						"key": "token",
						"value": { "stringValue": "12345" }
					}]
				}]
			}]
		}]
	}`

	expectedOutputLog := `{
		"resourceLogs": [{
			"scopeLogs": [{
				"log_records": [{
					"timeUnixNano": "1581452773000000111",
					"severityNumber": 9,
					"severityText": "info",
					"name": "logA",
					"body": { "stringValue": "AUTH log message" },
					"attributes": [{
						"key": "password",
						"value": { "stringValue": "obfuscated" }
					}]
				}]
			}]
		},
		{
			"scopeLogs": [{
				"log_records": [{
					"timeUnixNano": "1581452773000000999",
					"severityNumber": 5,
					"severityText": "debug",
					"name": "logA",
					"body": { "stringValue": "AUTH log message" },
					"attributes": [{
						"key": "password",
						"value": { "stringValue": "12345" }
					},
					{
						"key": "token",
						"value": { "stringValue": "12345" }
					}]
				}]
			}]
		}]
	}`

	testRunProcessor(t, cfg, processortest.NewLogSignal(inputLog, expectedOutputLog))
}

func Test_LogSeverity(t *testing.T) {
	cfg := `
	include {
		match_type = "regexp"
		log_severity {
			min = "INFO"
			match_undefined = true
		}
	}
	action {
		key = "password"
		action = "update"
		value = "obfuscated"
	}
	action {
		key = "token"
		action = "delete"
	}

	output {
		// no-op: will be overridden by test code.
	}
	`
	var args attributes.Arguments
	require.NoError(t, river.Unmarshal([]byte(cfg), &args))

	convertedArgs, err := args.Convert()
	require.NoError(t, err)
	otelObj := (convertedArgs).(*attributesprocessor.Config)

	require.NotNil(t, otelObj.Include)
	require.Equal(t, "regexp", string(otelObj.Include.MatchType))

	require.Equal(t, int32(9), int32(otelObj.Include.LogSeverityNumber.Min))
	require.Equal(t, true, otelObj.Include.LogSeverityNumber.MatchUndefined)

	action := &otelObj.Actions[0]
	require.Equal(t, "password", action.Key)


libdirs { "./../../extlibs/bullet/bullet-2.79/src/BulletDynamics"
                    , "./../../extlibs/bullet/bullet-2.79/src/BulletCollision"
                    , "./../../extlibs/bullet/bullet-2.79/src/LinearMath" }
            links { "BulletDynamics", "BulletCollision", "LinearMath" }
         end

      configuration { "macosx", "xcode4" }
         includedirs {
            "/Library/Frameworks/SDL.framework/Headers"
         }

      -- Windows specific
      configuration { "windows" }
         defines { 'NOMINMAX', '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64' }

      -- Linux specific
      configuration { "linux", "gmake" }
         defines { '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64' }

         -- Bullet physics
         if _OPTIONS["with-bullet"] then
            defines { 'ENABLE_BULLET' }
            includedirs { "./extlibs/bullet/bullet3/src" }
            libdirs { "./extlibs/bullet/bullet3/src/BulletDynamics"
                    , "./extlibs/bullet/bullet3/src/BulletCollision"
                    , "./extlibs/bullet/bullet3/src/LinearMath" }
            links { "BulletDynamics", "BulletCollision", "LinearMath" }
         end
         links { "GL", "glut" }

      configuration "Debug"
         defines { "DEBUG" } -- -DDEBUG
         flags { "Symbols" }
         targetname "mmdview_debug"

      configuration "Release"
         -- defines { "NDEBUG" } -- -NDEBUG
         flags { "Symbols", "Optimize" }
         targetname "mmdview"


                                                                                |
| 文本摘要              | 给定以下文章，请使用GPT-3.5生成一段摘要： 近日，美国华盛顿州西雅图市发生一起枪击案，导致至少6人死亡。据警方透露，嫌犯已被捕。                                                                                |
| 文本辩论              | 请列举出至少三个理由，支持或反对实行全球性碳税。                                                                                |
| 文本去敏感化处理      | 参考以下句子，请使用GPT-3.5生成一段相同含义但更加中立的文本： 据报道，这位领导曾因涉及贪污被判刑入狱5年。                                                                                |
| 文本补全              | 给定以下上下文，请使用GPT-3.5补全缺失的句子：在历史上，猫一直是人类的伴侣，因为它们可以帮助控制害虫，并提供陪伴和安慰。而一些人认为，养猫也有助于减压。然而，除了宠物之外，还有一种动物同样可以成为人类的“灵丹妙药”，那就是_______。                                                                                |
| 文本修改              | 参考以下句子，将其中的语病修正： 一只鸟儿，在天空飞翔着、欢快地唱着歌。                                                                                |
| 实体关系抽取          | 给定以下文本，请抽取其中的两个实体以及它们之间的关系： 中国国家主席习近平将于下周访问俄罗斯，并与俄罗斯总统普京举行会谈。                                                                                |
| 情感分析                | 分析一则电影评论，判断其中的情感倾向是正面、负面还是中性？                                                         |
| 文本生成                | 请根据以下提示，生成一篇关于旅游的文章：目的地：北京；交通方式：高铁；住宿：酒店；景点：长城、故宫。                            |
| 实体识别                | 对于一篇新闻报道，请提取出其中涉及到的人名、地名和组织机构名。                                                       |
| 文本分类                | 给定一篇新闻报道，请判断其属于哪个领域：政治、经济、文化、娱乐、科技等？                                             |
| 文本翻译                | 请将以下英文句子翻译成中文：“I love the smell of coffee in the morning.”                                                 |
| 问答系统                | 有一个长度为1000的整数列表，如何找到其中最大的10个数？                                                                |
| 文本匹配                |


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

from alipay.aop.api.constant.ParamConstants import *

class AlipayOpenCloudEnvDeleteModel(object):

    def __init__(self):
        self._cloud_id = None
        self._env_id = None
        self._invoke_app_id = None

    @property
    def cloud_id(self):
        return self._cloud_id

    @cloud_id.setter
    def cloud_id(self, value):
        self._cloud_id = value
    @property
    def env_id(self):
        return self._env_id

    @env_id.setter
    def env_id(self, value):
        self._env_id = value
    @property
    def invoke_app_id(self):
        return self._invoke_app_id

    @invoke_app_id.setter
    def invoke_app_id(self, value):
        self._invoke_app_id = value

    def to_alipay_dict(self):
        params = dict()
        if self.cloud_id:
            if hasattr(self.cloud_id, 'to_alipay_dict'):
                params['cloud_id'] = self.cloud_id.to_alipay_dict()
            else:
                params['cloud_id'] = self.cloud_id
        if self.env_id:
            if hasattr(self.env_id, 'to_alipay_dict'):
                params['env_id'] = self.env_id.to_alipay_dict()
            else:
                params['env_id'] = self.env_id
        if self.invoke_app_id:
            if hasattr(self.invoke_app_id, 'to_alipay_dict'):
                params['invoke_app_id'] = self.invoke_app_id.to_alipay_dict()
            else:
                params['invoke_app_id'] = self.invoke_app_id
        return params

    @staticmethod
    def from_alipay_dict(d):
        if not d:
            return None
        o = AlipayOpenCloudEnvDeleteModel()
        if 'cloud_id' in d:
            o.cloud_id = d['cloud_id']
        if 'env_id' in d:
            o.env_id = d['env_id']
        if 'invoke_app_id' in d:
            o.invoke_app_id = d['invoke_app_id']
        return o


"""
Created on 28. aug. 2015

@author: pab
"""
from __future__ import absolute_import, division, print_function

import numpy as np
from numpy.testing import assert_array_almost_equal, assert_allclose  # @UnresolvedImport
from numdifftools.limits import Limit, Residue, CStepGenerator
from numdifftools.step_generators import make_exact
from numdifftools.extrapolation import EPS

class TestCStepGenerator(object):

    @staticmethod
    def test_default_generator():
        step_gen = CStepGenerator(num_steps=8)
        h = np.array([h for h in step_gen(0)])
        print(h)
        desired = np.array([[1.47701940e-09, 3.69254849e-10, 9.23137122e-11,
                            2.30784281e-11, 5.76960701e-12, 1.44240175e-12,
                            3.60600438e-13, 9.01501096e-14]])

        assert_array_almost_equal((h - desired) / desired, 0)

    @staticmethod
    def test_default_base_step():
        step_gen = CStepGenerator(num_steps=1, offset=0)
        h = [h for h in step_gen(0)]
        desired = make_exact(EPS ** (1. / 1.2))
        assert_array_almost_equal((h[0] - desired) / desired, 0)

    @staticmethod
    def test_fixed_base_step():
        desired = 0.1
        step_gen = CStepGenerator(base_step=desired, num_steps=1, scale=2, offset=0)
        h = [h for h in step_gen(0)]
        assert_array_almost_equal((h[0] - desired) / desired, 0)

class TestLimit(object):

    def test_sinx_div_x(self):

        def fun(x):
            return np.sin(x) / x

        for path in ['radial', 'spiral']:
            lim_f = Limit(fun, path=path, full_output=True)

            x = np.arange(-10, 10) / np.pi
            lim_f0, err = lim_f(x * np.pi)
            assert_array_almost_equal(lim_f0, np.sinc(x))
            assert np.all(err.error_estimate < 1.0e-14)

    def test_derivative_of_cos(self):
        x0 = np.pi / 2

        def fun(x):
            return (np.cos(x0 + x) - np.cos(x0)) / x

        lim, err = Limit(fun, step=CStepGenerator(), full_output=True)(0)
        assert_allclose(lim, -1)
        assert err.error_estimate < 1e-14

    def test_residue_1_div_1_minus_exp_x(self):

        def fun(z):
            return -z / (np.expm1(2 * z))

        lim, err = Limit(fun, full_output=True)(0)
        assert_allclose(lim, -0.5)

        assert err.error_estimate < 1e-14

    def test_difficult_limit(self):

        def fun(x):
            return (x * np.exp(x) - np.expm1(x)) / x ** 2

        for path in ['radial', ]:
            lim, err = Limit(fun, path=path, full_output=True)(0)
            assert_allclose(lim, 0.5)

            assert err.error_estimate < 1e-8

class TestResidue(object):

    def test_residue_1_div_1_minus_exp_x(self):

        def fun(z):
            return -1.0 / (np.expm1(2 * z))

        res_h, err = Residue(fun, full_output=True)(0)
        assert_allclose(res_h, -0.5)

        assert err.error_estimate < 1e-14

    def test_residue_1_div_sin_x2(self):

        def fun(z):
            return 1.0 / np.sin(z) ** 2

        res_h, info = Residue(fun, full_output=True, pole_order=2)(np.pi)
        assert_allclose(res_h, 1)

        assert info.error_estimate < 1e-10


 source and/or binary forms;
 provided that if you redistribute the Apple Software in its entirety and
 without modifications, you must retain this notice and the following
 text and disclaimers in all such redistributions of the Apple Software.
 Neither the name, trademarks, service marks or logos of Apple Inc. may
 be used to endorse or promote products derived from the Apple Software
 without specific prior written permission from Apple.  Except as
 expressly stated in this notice, no other rights or licenses, express or
 implied, are granted by Apple herein, including but not limited to any
 patent rights that may be infringed by your derivative works or by other
 works in which the Apple Software may be incorporated.

 The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
 MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
 THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
 FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
 OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.

 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
 OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
 MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
 AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
 STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.

 Copyright (C) 2014 Apple Inc. All Rights Reserved.

*/
#include "CAAudioUnit.h"

#if !TARGET_OS_IPHONE
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
	#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/Components.h>
	#include <dlfcn.h>
#else
	#include <Components.h>
#endif
#endif

#include "CAXException.h"
#include "CAReferenceCounted.h"
#include "AUOutputBL.h" //this is for the Preroll only

struct StackAUChannelInfo {
		StackAUChannelInfo (UInt32 inSize) : mChanInfo ((AUChannelInfo*)malloc (inSize)) {}
		~StackAUChannelInfo() { free (mChanInfo); }

	AUChannelInfo* mChanInfo;
};

// is this symbol is not defined then we use the default setting which is that fast dispatch
// is supported on a desktop environment
#ifndef CA_AU_USE_FAST_DISPATCH
	#define CA_AU_USE_FAST_DISPATCH !TARGET_OS_IPHONE
#endif

#if CA_AU_USE_FAST_DISPATCH
static void *LoadGetComponentInstanceStorage (void *inst);
#endif

class CAAudioUnit::AUState : public CAReferenceCounted  {
public:
	AUState (AudioComponent inComp)
						: mUnit(0), mNode (0)
						{
							OSStatus result = ::AudioComponentInstanceNew (inComp, &mUnit);
							if (result)
								throw result;
							Init();
						}

	AUState (const AUNode &inNode, const AudioUnit& inUnit)
						: mUnit (inUnit), mNode (inNode)
						{
							Init();
						}

	~AUState();

	AudioUnit			mUnit;
	AUNode				mNode;

	OSStatus			GetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element,
											Float32 &outValue) const
	{
#if CA_AU_USE_FAST_DISPATCH
			if (mGetParamProc != NULL) {
				return (mGetParamProc) (mConnInstanceStorage, inID, scope, element, &outValue);
			}
#endif
		return AudioUnitGetParameter


", thirdLine);
    thirdLine.insertAdjacentElement("afterend", howToPlay);
  }

  /**
   * Pause/settings Screen
   */
  pauseScreen(Controller:DronesCanvas) {
    this.clearGUI();
    let pauseText:HTMLLabelElement = document.createElement('LABEL') as HTMLLabelElement;
    pauseText.innerText = "PAUSED";
    pauseText.setAttribute('style', 'color:lime;font:40px Verdana;');
    this.guiBox.insertAdjacentElement("afterbegin", pauseText);
    let newLine1 = this.getNewLineElem(15);
    pauseText.insertAdjacentElement("afterend", newLine1);

    let easyBtn:HTMLButtonElement = document.createElement('BUTTON') as HTMLButtonElement;
    easyBtn = this.setButtonStyles(easyBtn);
    easyBtn.onclick = () => {
      Controller.setDifficulty(1)
      easyBtn.blur();
    }
    easyBtn.innerText = "EASY";
    newLine1.insertAdjacentElement('afterend', easyBtn);
    let medBtn:HTMLButtonElement = document.createElement('BUTTON') as HTMLButtonElement;
    medBtn = this.setButtonStyles(medBtn);
    medBtn.onclick = () => {
      Controller.setDifficulty(2);
      medBtn.blur();
    }
    medBtn.innerText = "MEDIUM";
    easyBtn.insertAdjacentElement('afterend', medBtn);
    let hardBtn:HTMLButtonElement = document.createElement('BUTTON') as HTMLButtonElement;
    hardBtn = this.setButtonStyles(hardBtn);
    hardBtn.onclick = () => {
      Controller.setDifficulty(3);
      hardBtn.blur();
    }
    hardBtn.innerText = "HARD";
    medBtn.insertAdjacentElement('afterend', hardBtn);

    let newLine2 = this.getNewLineElem(20);
    hardBtn.insertAdjacentElement("afterend", newLine2);
    let volueBtn:HTMLButtonElement = document.createElement('BUTTON') as HTMLButtonElement;
    volueBtn = this.setButtonStyles(volueBtn);
    volueBtn.onclick = () => {
      Controller.toggleVolume();
      volueBtn.blur();
     }
    volueBtn.innerText = "Play Music";
    newLine2.insertAdjacentElement('afterend', volueBtn);
  }

  /**
   * Game Over Screen
   */
  gameOverScreen(Controller:DronesCanvas){
    this.clearGUI();
    let gameOverText:HTMLLabelElement = document.createElement('LABEL') as HTMLLabelElement;
    gameOverText.innerText = "GAME OVER";
    gameOverText.setAttribute('style', 'color:lime;font:40px Verdana;');
    let resetBtn:HTMLButtonElement = document.createElement('BUTTON') as HTMLButtonElement;
    resetBtn.innerText = "RESET";
    resetBtn.id = "resetBtn";
    resetBtn = this.setButtonStyles(resetBtn);
    resetBtn.onclick = () => {
      this.clearGUI();
      Controller.reset();
    }
    this.guiBox.insertAdjacentElement("afterbegin", gameOverText);
    let thirdLine = this.getNewLineElem(25);
    gameOverText.insertAdjacentElement("afterend", thirdLine);
    thirdLine.insertAdjacentElement("afterend", resetBtn);
  }

  /**
   * Build GUI Box so I can use HTML for buttons, not canvas... canvas dom sucks
   */
  createGUI(): void {
    let canvasElem = window.document.getElementById('canvasElem');
    let guiOverlay = window.document.createElement("DIV");
    guiOverlay.id = "gui";
    guiOverlay.setAttribute('style', 'position:absolute;top:0;float:left; width:99%;height:99vh;text-align:center;z-index:5;');
    canvasElem.insertAdjacentElement("afterend", guiOverlay);
    this.guiBox =


gular/core';

@Pipe({
  name: 'utc'
})
export class UtcPipe implements PipeTransform {

  data: any = '';
  type:any='';
  transform(date: any, type: any): any {
    return this.convertUTCDateToLocalDate(date,type);
  }

  hrs:any;
 displayMonthVal:any;
 displayDateVal:any;
 minutesval:any;
convertUTCDateToLocalDate(date1, type) {
    let hrs:any;
    let newDate = new Date();
    let CurrentDate = new Date();
    let ary = date1.split("T"), ary2 = ary[0].split("-"), ary1 = ary[1].split(":");
    newDate.setUTCHours(parseInt(ary1[0])), newDate.setUTCMinutes(ary1[1]), newDate.setUTCFullYear(ary2[0]), newDate.setUTCMonth(Number(ary2[1]) - 1), newDate.setUTCDate(ary2[2]);
    let dateval = newDate.getDate(), monthval = newDate.getMonth(), yearval = newDate.getFullYear(), hoursval = newDate.getHours();
     this.minutesval = newDate.getMinutes();
    let Curdateval = CurrentDate.getDate(), Curmonthval = CurrentDate.getMonth(), CurYear = CurrentDate.getFullYear();
      hrs = hoursval,  this.displayMonthVal ='',  this.displayDateVal = '';

    let weekday = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];

    let AMPM = hoursval >= 12 ? 'PM' : 'AM';
    hrs = hrs % 12;
    hrs = hrs ? hrs : 12;
    if (hrs < 10) {
        this.hrs = "0" + hrs;
    }

    if ((Number(monthval) + 1) <= 9)
        this.displayMonthVal = "0" + (Number(monthval) + 1);
    else this.displayMonthVal = (Number(monthval) + 1);

    if (dateval <= 9)
        this.displayDateVal = '0' + dateval;
    else
        this.displayDateVal = dateval;

	 if (this.minutesval <= 9)
        this.minutesval = "0"+ this.minutesval;
    else
        this.minutesval = this.minutesval;

    let hrsformat = hrs + ':' + this.minutesval + ' ' + AMPM;

    if (Curdateval == dateval && Curmonthval == monthval && CurYear == yearval) {
        return  hrsformat;
    }
    else if (CurYear == yearval && Curmonthval == monthval && dateval < Curdateval) {
        let datediff = Number(Curdateval) - Number(dateval);
        if (datediff <= 7) {
            if (datediff == 1) {
                if (type == "L")
                    return "Yesterday"
                else
                    return "Yesterday" + ' @ ' + hrsformat;
            }
            else if (datediff != 1 && datediff <= 7) {
                if (type == "L")
                    return weekday[newDate.getDay()]
                else
                    return weekday[newDate.getDay()] + ' @ ' + hrsformat;
            }
        }
        else {
            if (type == "L")
                return this.displayMonthVal + '.' + this.displayDateVal + '.' + yearval.toString().substr(2, 4);
            else
                return this.displayMonthVal + '.' + this.displayDateVal + '.' + yearval.toString().substr(2, 4) + ' @ ' + hrsformat;
        }
    }
    else {
        if (type == "L")
            return this.displayMonthVal + '.' + this.displayDateVal + '.' + yearval.toString().substr(2, 4);
        else
            return this.displayMonthVal + '.' + this.displayDateVal + '.' + yearval.toString().substr(2, 4) + ' @ ' + hrs


return now - state.updateTime;
    }

    function isDone(): boolean {
        return state.done;
    }

    function get(): T {
        const timeDifference = getTimeDifference();

        if (timeDifference >= (state.duration ?? defaultDuration) || !interpolator) {
            state.done = true;
            return state.current;
        }

        const progress = timeDifference / (state.duration ?? defaultDuration);
        return interpolator(state.previous, state.current, progress);
    }

    function getCurrentValue() {
        return state.current;
    }

    function update(next: T, duration?: number) {
        if (eq ? eq(state.current, next) : state.current === next) {
            return;
        }

        state.previous = get();
        state.current = next;
        state.updateTime = performance.now();
        state.duration = duration;
        state.done = false;
    }

    return {
        get,
        isDone,
        update,
        getCurrentValue,
    };
}
import { queue } from "./observe";
import { AnyFunction, AnyObject } from "types";
import { isFunction } from "utils";

type Target = AnyObject;
type Subscriber = AnyFunction;

const subscribers = new WeakMap();

export const subscribe = (target: Target, key: string) => {
  addSubscriber(target, key, queue.last);
};

export const unsubscriber = (
  target: Target,
  key: string,
  subscriber: Subscriber
) => {
  removeSubscriber(target, key, subscriber);
};

export const dispatch = (target: Target, key: string) => {
  const subscribers = getSubscribers(target, key);

  subscribers.forEach((s: any) => {
    if (isFunction(s)) {
      s();
    }
  });
};

function getTarget(target: Target) {
  if (!subscribers.has(target)) {
    subscribers.set(target, new Map());
  }

  return subscribers.get(target);
}

function getKey(target: Target, key: string) {
  const _target = getTarget(target);

  if (!_target.has(key)) {
    _target.set(key, new Set());
  }

  return _target.get(key);
}

function getSubscribers(target: Target, key: string) {
  return getKey(target, key);
}

export function addSubscriber(
  target: Target,
  key: string,
  subscriber: Subscriber
) {
  if (!subscriber) return;
  const _subscribers = getSubscribers(target, key);
  _subscribers.add(subscriber);
}

export function removeSubscriber(
  target: Target,
  key: string,
  subscriber: Subscriber
) {
  const _subscribers = getSubscribers(target, key);
  _subscribers.delete(subscriber);
}
import {IAgent} from "../types/Agent";

const AUTHENTICATED_AGENT_KEY = 'AUTHENTICATED_AGENT';

/**
 * This method stores authenticated agent into local storage.
 * @param agent authenticated agent
 */
export function storeAuthenticatedAgent(agent: IAgent): void {
    localStorage.setItem(AUTHENTICATED_AGENT_KEY, JSON.stringify(agent));
}

/**
 * Load authenticated user from local storage. Returns null, when no
 *   authenticated user is found. Otherwise it returns authenticated agent.
 */
export function loadAuthenticatedAgent(): IAgent | null {
    const authenticatedAgentStr = localStorage.getItem(AUTHENTICATED_AGENT_KEY);
    if (authenticatedAgentStr == null) {
        return null;
    }
    return JSON.parse(authenticatedAgentStr);
}

/**
 * Removes agent from local storage after log out.
 * Returns information if user was deleted.
 */
export function removeAuthenticatedA


* DHCPv6 timeout handling (this function must be called every 500ms,
 * see @ref DHCP6_TIMER_MSECS).
 *
 * A DHCPv6 server is expected to respond within a short period of time.
 * This timer checks whether an outstanding DHCPv6 request is timed out.
 */
void
dhcp6_tmr(void)
{
  struct netif *netif;
  /* loop through netif's */
  NETIF_FOREACH(netif) {
    struct dhcp6 *dhcp6 = netif_dhcp6_data(netif);
    /* only act on DHCPv6 configured interfaces */
    if (dhcp6 != NULL) {
      /* timer is active (non zero), and is about to trigger now */
      if (dhcp6->request_timeout > 1) {
        dhcp6->request_timeout--;
      } else if (dhcp6->request_timeout == 1) {
        dhcp6->request_timeout--;
        /* { dhcp6->request_timeout == 0 } */
        LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp6_tmr(): request timeout\n"));
        /* this client's request timeout triggered */
        dhcp6_timeout(netif, dhcp6);
      }
    }
  }
}

#endif /* LWIP_IPV6 && LWIP_IPV6_DHCP6 */


--!strict
--[=[
	Centralized
	@class InputModeServiceClient
]=]

local require = require(script.Parent.loader).load(script)

local GuiService = game:GetService("GuiService")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local InputMode = require("InputMode")
local InputModeProcessor = require("InputModeProcessor")
local InputModeType = require("InputModeType")
local InputModeTypes = require("InputModeTypes")
local Maid = require("Maid")
local ServiceBag = require("ServiceBag")

local THUMBSTICK_DEADZONE = 0.14

local InputModeServiceClient = {}
InputModeServiceClient.ServiceName = "InputModeServiceClient"

export type InputModeServiceClient = typeof(setmetatable(
	{} :: {
		_maid: Maid.Maid,
		_inputModes: { [InputModeType.InputModeType]: InputMode.InputMode },
		_inputModeProcessor: InputModeProcessor.InputModeProcessor,
		_lastMousePosition: Vector3?,
		_serviceBag: ServiceBag.ServiceBag,
	},
	{} :: typeof({ __index = InputModeServiceClient })
))

function InputModeServiceClient.Init(self: InputModeServiceClient, serviceBag: ServiceBag.ServiceBag)
	assert(not self._serviceBag, "Already initialized")
	self._serviceBag = assert(serviceBag, "No serviceBag")

	self._maid = Maid.new()
	self._inputModes = {}

	self._inputModeProcessor = InputModeProcessor.new()

	-- order semi-matters. general should come first, to non-specific. that way, specific stuff has
	-- priority over non-specific input modes.
	self:GetInputMode(InputModeTypes.KeyboardAndMouse)
	self:GetInputMode(InputModeTypes.Gamepads)
	self:GetInputMode(InputModeTypes.Keyboard)
	self:GetInputMode(InputModeTypes.Touch)
	self:GetInputMode(InputModeTypes.Mouse)
	self:GetInputMode(InputModeTypes.ArrowKeys)
	self:GetInputMode(InputModeTypes.Keypad)
	self:GetInputMode(InputModeTypes.WASD)
	self:GetInputMode(InputModeTypes.DPad)
	-- Don't add InputModeTypes.Thumbsticks, we handle it seperately

	self:_triggerEnabled()
	self:_bindProcessor()
end

function InputModeServiceClient.GetInputMode(
	self: InputModeServiceClient,
	inputModeType: InputModeType.InputModeType
): InputMode.InputMode
	assert(InputModeType.isInputModeType(inputModeType), "Bad inputModeType")

	if not RunService:IsRunning() then
		if not self._inputModes then
			-- fake it till we make it!
			local inputMode = InputMode.new(inputModeType)
			local lastInputType = UserInputService:GetLastInputType()

			-- Hack processing
			if inputModeType:IsValid(lastInputType) then
				inputMode:Enable()
			end

			if inputModeType == InputModeTypes.Keyboard or inputModeType == InputModeTypes.KeyboardAndMouse then
				inputMode:Enable()
			end

			return inputMode
		end
	end

	if self._inputModes[inputModeType] then
		return self._inputModes[inputModeType]
	end

	local inputMode = InputMode.new(inputModeT


# BuildTarget: images/interfaceCameraParameters.png

import IECore
import time
import imath

import Gaffer
import GafferUI

import GafferScene
import GafferSceneUI

# Interface: the object and set sections of a camera in the Scene Inspector
script["Camera"] = GafferScene.Camera()
script["Camera"]["perspectiveMode"].setValue( 1 )
script["Camera"]["focalLength"].setValue( 50.0 )
script["Camera"]["renderSettingOverrides"]["resolution"]["enabled"].setValue( True )
script["Camera"]["renderSettingOverrides"]["overscan"]["value"].setValue( True )
script["Camera"]["renderSettingOverrides"]["overscan"]["enabled"].setValue( True )
script["Camera"]["renderSettingOverrides"]["overscanLeft"]["value"].setValue( 0.05 )
script["Camera"]["renderSettingOverrides"]["overscanLeft"]["enabled"].setValue( True )
script["Camera"]["renderSettingOverrides"]["overscanRight"]["value"].setValue( 0.05 )
script["Camera"]["renderSettingOverrides"]["overscanRight"]["enabled"].setValue( True )
script["Camera"]["renderSettingOverrides"]["overscanTop"]["value"].setValue( 0.05 )
script["Camera"]["renderSettingOverrides"]["overscanTop"]["enabled"].setValue( True )
script["Camera"]["renderSettingOverrides"]["overscanBottom"]["value"].setValue( 0.05 )
script["Camera"]["renderSettingOverrides"]["overscanBottom"]["enabled"].setValue( True )

script.selection().add( script["Camera"] )
GafferSceneUI.ScriptNodeAlgo.setSelectedPaths( script, IECore.PathMatcher( [ "/camera" ] ) )

with GafferUI.Window( "Property" ) as window :

	sceneInspector = GafferSceneUI.SceneInspector( script)
	sceneInspector.setNodeSet( Gaffer.StandardSet( [ script["Camera"] ] ) )
	sceneInspector._SceneInspector__locationPathListing.setExpansion( IECore.PathMatcher( [ "/Location/Object", "/Location/Object/Parameters" ] ) )

window._qtWidget().resize( 400, 500 )
window.setVisible( True )
window.setPosition( imath.V2i( 0, 0 ) )

GafferUI.WidgetAlgo.grab( widget = sceneInspector, imagePath = "images/interfaceCameraParameters.png" )


/* iladiag.f -- translated by f2c (version 20061008).
   You must link the resulting object file with libf2c:
	on Microsoft Windows system, link with libf2c.lib;
	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
	or, if you install libf2c.a in a standard place, with -lf2c -lm
	-- in that order, at the end of the command line, as in
		cc *.o -lf2c -lm
	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,

		http://www.netlib.org/f2c/libf2c.zip
*/

#include "f2c.h"
#include "blaswrap.h"

integer iladiag_(char *diag)
{
    /* System generated locals */
    integer ret_val;

    /* Local variables */
    extern logical lsame_(char *, char *);

/*  -- LAPACK routine (version 3.2) -- */
/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/*     October 2008 */
/*     .. Scalar Arguments .. */
/*     .. */

/*  Purpose */
/*  ======= */

/*  This subroutine translated from a character string specifying if a */
/*  matrix has unit diagonal or not to the relevant BLAST-specified */
/*  integer constant. */

/*  ILADIAG returns an INTEGER.  If ILADIAG < 0, then the input is not a */
/*  character indicating a unit or non-unit diagonal.  Otherwise ILADIAG */
/*  returns the constant value corresponding to DIAG. */

/*  Arguments */
/*  ========= */
/*  DIAG    (input) CHARACTER*1 */
/*          = 'N':  A is non-unit triangular; */
/*          = 'U':  A is unit triangular. */
/*  ===================================================================== */

/*     .. Parameters .. */
/*     .. */
/*     .. External Functions .. */
/*     .. */
/*     .. Executable Statements .. */
    if (lsame_(diag, "N")) {
	ret_val = 131;
    } else if (lsame_(diag, "U")) {
	ret_val = 132;
    } else {
	ret_val = -1;
    }
    return ret_val;

/*     End of ILADIAG */

} /* iladiag_ */


 bytes

const srLatnLangStr string = "" + // Size: 4247 bytes
	"afarskiabhaskiavestanskiafrikansakanskiamharskiaragonskiarapskiasamskiav" +
	"arskiajmaraazerbejdžanskibaškirskibeloruskibugarskibislamabambarabengals" +
	"kitibetanskibretonskibosanskikatalonskičečenskičamorokorzikanskikričeški" +
	"crkvenoslovenskičuvaškivelškidanskinemačkimaldivskidžongaevegrčkienglesk" +
	"iesperantošpanskiestonskibaskijskipersijskifulafinskifidžijskifarskifran" +
	"cuskizapadni frizijskiirskiškotski gelskigalicijskigvaranigudžaratimanks" +
	"hausahebrejskihindihiri motuhrvatskihaićanskimađarskijermenskihererointe" +
	"rlingvaindonežanskiinterlingveigbosečuanski jiinupikidoislandskiitalijan" +
	"skiinuitskijapanskijavanskigruzijskikongokikujukvanjamakazaškigrenlandsk" +
	"ikmerskikanadakorejskikanurikašmirskikurdskikomikornvolskikirgiskilatins" +
	"kiluksemburškigandalimburškilingalalaoskilitvanskiluba-katangaletonskima" +
	"lgaškimaršalskimaorskimakedonskimalajalammongolskimaratimalajskimalteški" +
	"burmanskinauruskiseverni ndebelenepalskindongaholandskinorveški ninorskn" +
	"orveški bukmoljužni ndebelenavahonjandžaoksitanskiodžibveoromoodijaoseti" +
	"nskipendžapskipalipoljskipaštunskiportugalskikečuaromanškirundirumunskir" +
	"uskikinjaruandasanskritsardinskisindiseverni samisangosinhaleškislovački" +
	"slovenačkisamoanskišonasomalskialbanskisrpskisvazisesotosundanskišvedski" +
	"svahilitamilskitelugutadžičkitajskitigrinjaturkmenskicvanatonganskitursk" +
	"icongatatarskitahićanskiujgurskiukrajinskiurduuzbečkivendavijetnamskivol" +
	"apikvalonskivolofkosajidišjorubadžuanškikineskizuluaceškiakoliadangmeadi" +
	"gejskiafrihiliagemainuakadijskialeutskijužnoaltajskistaroengleskiangikaa" +
	"ramejskimapučearapahoaravačkiasuasturijskiavadibelučkibalijskibasabedžab" +
	"embabenazapadni belučkibodžpuribikolbinisisikabrajbodoburjatskibugijskib" +
	"linskikadokaripskiatsamsebuanskičigačipčačagatajčučkimaričinučkičoktavsk" +
	"ičipevjanskičerokičejenskicentralni kurdskikoptskikrimskotatarskisejšels" +
	"ki kreolski francuskikašupskidakotadarginskitaitadelaverskislejvidogrips" +
	"kidinkazarmadogridonji


         STP             X26, X25, [SP,#0x50+var_40]
__text:00000001A8A26C9C F8 5F 02 A9                 STP             X24, X23, [SP,#0x50+var_30]
__text:00000001A8A26CA0 F6 57 03 A9                 STP             X22, X21, [SP,#0x50+var_20]
__text:00000001A8A26CA4 F4 4F 04 A9                 STP             X20, X19, [SP,#0x50+var_10]
__text:00000001A8A26CA8 FD 7B 05 A9                 STP             X29, X30, [SP,#0x50+var_s0]
__text:00000001A8A26CAC FD 43 01 91                 ADD             X29, SP, #0x50
__text:00000001A8A26CB0 FF 07 40 D1                 SUB             SP, SP, #1,LSL#12
```

[libInFieldCollection.dylib的vsPHbdGf](../../stalker_examples/libinfieldcollection_dylib_vsphbdgf.md)

中的输出是：

```log
into hookNative:
into stalkerHookNative_vsPHbdGf:
libraryName=libInFieldCollection.dylib -> moduleBaseAddress=0x1c27fb000
origFuncPtr=0x1c280ec94
funcRelativeStartAddr=81044
functionSize=25084=0x61fc, argNum=2
Frida Stalker hook: module: baseAddress=0x1c27fb000
function: relativeStartAddr=0x13c94, size=25084=0x61fc, relativeEndAddr=0x19e90
funcRealStartAddr=0x1c280ec94, funcRealEndAddr=0x1c2814e90
curTid=null
[iPhone::mobileactivationd ]-> ============ Trigged addr: relative [0x13c94] = real [0x1c280ec94]  ============
arg[0]=0x16fa8a988
arg[1]=0x16fa8a984
curTid=21019
+++ into iterator: startAddress=0x10f3c1768, isAppCode=false
+++ into iterator: startAddress=0x10f3c1778, isAppCode=false
...
+++ into iterator: startAddress=0x1108cc030, isAppCode=false
+++ into iterator: startAddress=0x1c280eca4, isAppCode=true
current: realAddr=0x1c280eca4 -> offset: hex=0x10=16
    0x1c280eca4 <+16>: stp x20, x19, [sp, #0x40]
current: realAddr=0x1c280eca8 -> offset: hex=0x14=20
    0x1c280eca8 <+20>: stp x29, x30, [sp, #0x50]
current: realAddr=0x1c280ecac -> offset: hex=0x18=24
    0x1c280ecac <+24>: add x29, sp, #0x50
...
```

![stalker_vsphbdgf_log](../../assets/img/stalker_vsphbdgf_log.jpg)

此时：

* 函数的第一行代码=函数起始地址是：`0x1c280ec94`
* 真正开始打印log日志的地址是：`0x1c280eca4`
  * 已经是起始地址的偏�


glabel func_80AEF930
/* 04D20 80AEF930 27BDFFE0 */  addiu   $sp, $sp, 0xFFE0           ## $sp = FFFFFFE0
/* 04D24 80AEF934 AFBF001C */  sw      $ra, 0x001C($sp)
/* 04D28 80AEF938 AFB00018 */  sw      $s0, 0x0018($sp)
/* 04D2C 80AEF93C 00808025 */  or      $s0, $a0, $zero            ## $s0 = 00000000
/* 04D30 80AEF940 0C2BAC41 */  jal     func_80AEB104
/* 04D34 80AEF944 AFA50024 */  sw      $a1, 0x0024($sp)
/* 04D38 80AEF948 24010003 */  addiu   $at, $zero, 0x0003         ## $at = 00000003
/* 04D3C 80AEF94C 1441000E */  bne     $v0, $at, .L80AEF988
/* 04D40 80AEF950 24184048 */  addiu   $t8, $zero, 0x4048         ## $t8 = 00004048
/* 04D44 80AEF954 8E0E0004 */  lw      $t6, 0x0004($s0)           ## 00000004
/* 04D48 80AEF958 A618010E */  sh      $t8, 0x010E($s0)           ## 0000010E
/* 04D4C 80AEF95C 3305FFFF */  andi    $a1, $t8, 0xFFFF           ## $a1 = 00004048
/* 04D50 80AEF960 35CF0009 */  ori     $t7, $t6, 0x0009           ## $t7 = 0


  left: 12px;
  display: block;
  content: "";
  border-top: 7px solid transparent;
  border-left: 7px solid black;
  border-bottom: 7px solid transparent;
}

div.dt-datetime-error {
  clear: both;
  padding: 0 1em;
  max-width: 240px;
  font-size: 11px;
  line-height: 1.25em;
  text-align: center;
  color: #b11f1f;
}

html.dark input.dt-datetime {
  color-scheme: dark;
}
html.dark div.dt-datetime {
  border: 1px solid #595b5e;
  background-color: #212529;
  box-shadow: 3px 4px 10px 1px rgba(0, 0, 0, 0.8);
}
html.dark div.dt-datetime table th {
  color: #ccc;
}
html.dark div.dt-datetime table td {
  color: #eee;
}
html.dark div.dt-datetime table td.selectable {
  background: #373c41;
}
html.dark div.dt-datetime table td.selectable.disabled {
  color: #aaa;
  background: #171b1f;
}
html.dark div.dt-datetime table td.selectable.disabled button:hover {
  color: #aaa;
  background: #171b1f;
}
html.dark div.dt-datetime table td.selectable.now {
  background: #4b5055;
}
html.dark div.dt-datetime table td.selectable.selected button {
  background: #6ea8fe;
  color: black;
}
html.dark div.dt-datetime table td.selectable button:hover {
  background: #ff8000;
  color: black;
}
html.dark div.dt-datetime div.dt-datetime-label:hover {
  border: 1px solid transparent;
  background-color: rgba(255, 255, 255, 0.1);
}
html.dark div.dt-datetime div.dt-datetime-iconLeft:hover,
html.dark div.dt-datetime div.dt-datetime-iconRight:hover,
html.dark div.dt-datetime div.dt-datetime-iconUp:hover,
html.dark div.dt-datetime div.dt-datetime-iconDown:hover {
  border: 1px solid transparent;
  background-color: rgba(255, 255, 255, 0.1);
}
html.dark div.dt-datetime div.dt-datetime-iconLeft:after {
  border-right-color: white;
}
html.dark div.dt-datetime div.dt-datetime-iconRight:after {
  border-left-color: white;
}
html.dark div.dt-datetime select {
  color-scheme: dark;
}
html.dark div.dt-datetime-error {
  color: #b11f1f;
}

table.dataTable thead tr > .dtfc-fixed-left,
table.dataTable thead tr > .dtfc-fixed-right,
table.dataTable tfoot tr > .dtfc-fixed-left,
table.dataTable tfoot tr > .dtfc-fixed-right {
  top: 0;
  bottom: 0;
  z-index: 3;
  background-color: white;
}
table.dataTable tbody tr > .dtfc-fixed-left,
table.dataTable tbody tr > .dtfc-fixed-right {
  z-index: 1;
  background-color: white;
}

div.dtfc-left-top-blocker,
div.dtfc-right-top-blocker {
  background-color: white;
}

html.dark table.dataTable thead tr > .dtfc-fixed-left,
html.dark table.dataTable thead tr > .dtfc-fixed-right,
html.dark table.dataTable tfoot tr > .dtfc-fixed-left,
html.dark table.dataTable tfoot tr > .dtfc-fixed-rig


?: V): V;
export function reduce<V, O>(
  arr: V[],
  cb: (t: O, v: V) => O,
  initialValue?: O
): O;
export function reduce<V, O>(
  arr: V[],
  cb: (t: O | V, v: V) => V | O,
  initialValue?: V | O
): O | V | never {
  if (!arr.length) {
    if (typeof initialValue === "undefined")
      throw "Cannot reduce an empty array with no initializer";
    else return initialValue;
  }

  let startingIndex = 0;
  let output: V | O;

  if (typeof initialValue === "undefined") {
    output = arr[0];
    startingIndex = 1;
  } else {
    output = initialValue;
  }

  for (let i = startingIndex; i < arr.length; i++) {
    output = cb(output, arr[i]);
  }

  return output;
}
/* tslint:disable */

/**
 * Reference to none, one of (from or to) or both subjects of a transaction (or transfer)
 * Possible values are:
 * - `both`: Reference to both from and to subjects of the transaction
 * - `from`: Reference to the transaction from
 * - `none`: Reference to none of the transaction subjects
 * - `to`: Reference to the transaction to
 */
export enum TransactionSubjectsEnum {
  BOTH = 'both',
  FROM = 'from',
  NONE = 'none',
  TO = 'to'
}
import { ArgumentNullException, InvalidOperationException } from '../exceptions'

export function ThrowIfNull(name: string, target: any) {
  if (target === null || target === undefined) {
    throw new ArgumentNullException(name)
  }
}

export function ThrowInvalidOperation(message: string): never {
  throw new InvalidOperationException(message)
}
import csv from 'csv-parser';
import fs from 'fs';

export const csvToObject = (dataFilePath: string) => {
    const dataArr: any[] = [];
    fs.createReadStream(dataFilePath)
        .pipe(csv())
        .on('data', (data) => dataArr.push(data))
        .on('end', () => {
        // console.log(dataArr)
        });
    return dataArr;
}

export const delay = (ms: number) => {
    return new Promise((resolve) => setTimeout(resolve, ms) );
}import { Injectable, HttpException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { StudentsEntity } from '../../entities/students.entity';
import { StudentsInterface } from '../../interfaces/students.interface';

@Injectable()
export class StudentsService {
  constructor(
    @InjectRepository(StudentsEntity)
    private readonly studentsRepository: Repository<StudentsEntity>,
  ) {}

  find(): Promise<StudentsEntity[]> {
    return this.studentsRepository
      .createQueryBuilder()
      .orderBy('id', 'ASC')
      .getMany();
  }

  create(student: StudentsInterface): Promise<StudentsEntity> {
    return this.studentsRepository.save(student);
  }

  async edit(student: StudentsInterface): Promise<StudentsEntity> {
    const studentDB = await this.studentsRepository.findOne(student.id);
    if (!studentDB) throw new HttpException({ error: 'No student id' }, 406);
    return this.studentsRepository.save(student);
  }

  async delete(id: number): Promise<StudentsEntity> {
    const studentDB = await this.studentsRepository.findOne(id);
    if (!studentDB) throw new HttpException({ error: 'No student id' }, 406);
    return this.studentsRepository.remove(studentDB);
  }
}
import { injectable } from 'inversify';
// import { getLogger, Logger as LibLogger


local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local DT = E:GetModule("DataTexts")

--Lua functions
local _G = _G
local date = date
local next = next
local select = select
local time = time
local tonumber = tonumber
local find, format, gsub, join, utf8sub = string.find, string.format, string.gsub, string.join, string.utf8sub
local tinsert, wipe = table.insert, table.wipe
--WoW API / Variables
local GetGameTime = GetGameTime
local GetNumSavedInstances = GetNumSavedInstances
local GetSavedInstanceInfo = GetSavedInstanceInfo
local GetWintergraspWaitTime = GetWintergraspWaitTime
local IsInInstance = IsInInstance
local RequestRaidInfo = RequestRaidInfo
local SecondsToTime = SecondsToTime

local QUEUE_TIME_UNAVAILABLE = QUEUE_TIME_UNAVAILABLE
local TIMEMANAGER_AM = TIMEMANAGER_AM
local TIMEMANAGER_PM = TIMEMANAGER_PM
local TIMEMANAGER_TOOLTIP_LOCALTIME = TIMEMANAGER_TOOLTIP_LOCALTIME
local TIMEMANAGER_TOOLTIP_REALMTIME = TIMEMANAGER_TOOLTIP_REALMTIME
local WINTERGRASP_IN_PROGRESS = WINTERGRASP_IN_PROGRESS

local timeDisplayFormat = ""
local dateDisplayFormat = ""
local lockoutInfoFormat = "%s%s %s |cffaaaaaa(%s)"
local lockoutColorExtended, lockoutColorNormal = {r = 0.3, g = 1, b = 0.3}, {r = .8, g = .8, b = .8}
local lockedInstances = {raids = {}, dungeons = {}}
local timeFormat, showAMPM, showSecs
local enteredFrame, fullUpdate
local instanceIconByName
local numSavedInstances = 0

local locale = GetLocale()
local krcntw = locale == "koKR" or locale == "zhCN" or locale == "zhTW"
local difficultyTag = { -- Normal, Normal, Heroic, Heroic
	(krcntw and PLAYER_DIFFICULTY1) or utf8sub(PLAYER_DIFFICULTY1, 1, 1), -- N
	(krcntw and PLAYER_DIFFICULTY1) or utf8sub(PLAYER_DIFFICULTY1, 1, 1), -- N
	(krcntw and PLAYER_DIFFICULTY2) or utf8sub(PLAYER_DIFFICULTY2, 1, 1), -- H
	(krcntw and PLAYER_DIFFICULTY2) or utf8sub(PLAYER_DIFFICULTY2, 1, 1), -- H
}

local function getTimeDiffSeconds(srvHours, srvMinutes, seconds)
	local timeUTC = date("!*t")
	local timeLocal = date("*t")

	local tzDiffHours = (timeLocal.hour - timeUTC.hour)
	local tzDiffMinutes = (timeLocal.min - timeUTC.min)
	local tzDiffTotalSeconds = tzDiffHours * 3600 + tzDiffMinutes * 60

	local srvOffsetHours = srvHours - timeUTC.hour
	local srvOffsetMinutes = srvMinutes - timeUTC.min
	local srvOffsetSeconds = seconds and (timeUTC.sec - seconds) or 0

	local srvDiffSecondsUTC = (srvOffsetHours * 3600) + (srvOffsetMinutes * 60) - srvOffsetSeconds

	return srvDiffSecondsUTC - tzDiffTotalSeconds
end

local srvHours, srvMinutes = GetGameTime()
local srvDiffSeconds = getTimeDiffSeconds(srvHours, srvMinutes)

local function GetServerTime()
	return time() + srvDiffSeconds
end

local frame = CreateFrame("Frame")
frame:SetScript("OnUpdate", function(self)
	local h, m = GetGameTime()

	if m ~= srvMinutes then


087-.786-2.02c.346-.552.745-1.068 1.192-1.542zm17.28 7.076l-.257-.097H17.95a.252.252 0 0 1-.18-.075l-2.22-2.267a.252.252 0 0 0-.384.027l-.48.654a.252.252 0 0 0 .204.401h.59c.076 0 .148.035.196.094l1.973 2.447a.252.252 0 0 1 .022.284l-3.12 5.419a.252.252 0 0 1-.218.126h-.642a.252.252 0 0 1-.229-.147l-1.85-4.02a.252.252 0 0 0-.228-.147h-1.086a.252.252 0 0 1-.208-.11L9.086 11.35a.252.252 0 0 1-.044-.143v-.984c0-.06.022-.119.061-.164l.726-.843a.252.252 0 0 1 .191-.088h2.412c.091 0 .175-.049.22-.128l.493-.877a.252.252 0 0 0-.22-.375h-2.814a.252.252 0 0 1-.233-.35l1.343-3.206a.252.252 0 0 1 .232-.155h5.11a.252.252 0 0 0 .244-.318l-.085-.312a.252.252 0 0 1 .243-.319h.26a9.966 9.966 0 0 1 2.772 7.138zm-3.795 5.891l.69.086-1.207 1.036v-.432l.517-.69z"))+Y(Mm,Q("M9 0a9 9 0 1 1 0 18A9 9 0 0 1 9 0zm1 3H8v5H3v2h5v5h2v-5h5V8h-5V3z"))+Y(vm,Q("M6.323.102a19.026 19.026 0 0 0 5.27 2.566c.242.074.407.3.406.556V5.31a10.05 10.05 0 0 1-1.444 5.306L9.05 9.134A3.8 3.8 0 0 0 5.98 3.1a3.79 3.79 0 0 0-2.684 1.115 3.794 3.794 0 0 0-.18 5.137 3.802 3.802 0 0 0 5.109.607l1.65 1.625c-.963 1.183-2.212 2.055-3.668 2.374a.58.58 0 0 1-.208.042.662.662 0 0 1-.203-.036c-3.541-.78-5.858-4.828-5.794-8.66V3.225c0-.256.164-.48.405-.555A19.024 19.024 0 0 0 5.674.102a.566.566 0 0 1 .65 0zM6.02 4.447c.66 0 1.279.257 1.747.72a2.469 2.469 0 0 1-1.747 4.217A2.468 2.468 0 0 1 3.547 6.91 2.457 2.457 0 0 1 6.02 4.447z"))+Y(m$+nd,Q("M15.6 0A2.4 2.4 0 0 1 18 2.4v11.2a2.4 2.4 0 0 1-2.4 2.4H2.4A2.4 2.4 0 0 1 0 13.6V2.4A2.4 2.4 0 0 1 2.4 0h13.2zM12 1H6v4.5A1.5 1.5 0 0 1 4.5 7H1v5h3.5A1.5 1.5 0 0 1 6 13.5V15h6v-1.5a1.5 1.5 0 0 1 1.5-1.5H


s out of date', () async {
        final server = await servePackages();
        server.serve(
          'foo',
          '5.6.7',
          contents: [
            d.dir('bin', [
              d.file('hello.dart', "void main() => print('hello!');"),
            ]),
          ],
        );

        await d.appDir(dependencies: {'foo': '5.6.7'}).create();

        await pubGet(args: ['--no-precompile']);

        await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
          d.dir('foo', [
            d.outOfDateSnapshot('hello.dart-$versionSuffix.snapshot'),
          ]),
        ]).create();

        final process = await pubRun(args: ['foo:hello']);

        // In the real world this would just print "hello!", but since we
        // collect all output we see the precompilation messages as well.
        expect(process.stdout, emits('Building package executable...'));
        expect(process.stdout, emitsThrough('hello!'));
        await process.shouldExit();

        await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
          d.dir('foo', [
            d.file('hello.dart-$versionSuffix.snapshot', contains('hello!')),
          ]),
        ]).validate();
      });
    });
  });
}
// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:ffi';
import 'dart:io';

typedef PosixMallocNative = Pointer Function(IntPtr);

@Native<PosixMallocNative>(symbol: 'malloc')
external Pointer posixMalloc(int size);

typedef PosixCallocNative = Pointer Function(IntPtr num, IntPtr size);

@Native<PosixCallocNative>(symbol: 'calloc')
external Pointer posixCalloc(int num, int size);

typedef PosixFreeNative = Void Function(Pointer);

@Native<Void Function(Pointer)>(symbol: 'free')
external void posixFree(Pointer ptr);

final Pointer<NativeFunction<PosixFreeNative>> posixFreePointer =
    Native.addressOf(posixFree);

// Note that ole32.dll is the correct name in both 32-bit and 64-bit.
final DynamicLibrary ole32lib = DynamicLibrary.open('ole32.dll');

typedef WinCoTaskMemAllocNative = Pointer Function(Size);
typedef WinCoTaskMemAlloc = Pointer Function(int);
final WinCoTaskMemAlloc winCoTaskMemAlloc = ole32lib
    .lookupFunction<WinCoTaskMemAllocNative, WinCoTaskMemAlloc>(
      'CoTaskMemAlloc',
    );

typedef WinCoTaskMemFreeNative = Void Function(Pointer);
typedef WinCoTaskMemFree = void Function(Pointer);
final Pointer<NativeFunction<WinCoTaskMemFreeNative>> winCoTaskMemFreePointer =
    ole32lib.lookup('CoTaskMemFree');
final WinCoTaskMemFree winCoTaskMemFree = winCoTaskMemFreePointer.asFunction();

/// Manages memory on the native heap.
///
/// Does not initialize newly allocated memory to zero. Use [CallocAllocator]
/// for zero-initialized memory on allocation.
///
/// For POSIX-based systems, this uses `malloc` and `free`. On Windows, it uses
/// `CoTaskMemAlloc` and `CoTaskMemFree`.
final class MallocAllocator implements Allocator {
  const MallocAllocator._();

  /// Allocates [byteCount] bytes of of unitialized memory on the native heap.
  ///
  /// For POSIX-based systems, this uses `malloc`. On Windows, it uses
  /// `CoTaskMemAlloc`.
  ///
  /// Throws an [ArgumentError] if the number of bytes or alignment cannot be
  /// satisfied.
  // TODO:


�ルの数が減るので メソッドが遥かに読み書きしやすくなる

   // コンパイラになりきってみる
    // これらの規則を適用して以下の　first_word関数のシグニチャの参照のライフタイムが何か計算してみる
    // シグニチャは 参照に紐づけられるライフタイムがない状態から始まる
    //fn first_word(s: &str) -> &str {
    // ここでは最初の規則を適用するので 各引数が独自のライフタイムを得るようにする
    // シグニチャはまずこうなる
    //fn first_word<'a>(s: &'a str) -> &str {
    // そして 入力ライフタイムが1つだけなので 2番目の規則も適用できる
    // 入力引数のライフタイムが 出力引数に代入されるので シグニチャはこうなる
    //fn first_word<'a>(s: &'a str) -> &'a str {
    // コンパイラはシグニチャをこのような過程で計算してくれ、
    // 全ての参照にライフタイムが付いた。これでコンパイラは プログラマに関数シグニチャのライフタイムを注釈してもらわなくても 解析を続行できる

    // 別の例に目を向ける。先ほど ライフタイム引数がなかったlongest関数です:
    //fn longest(x: &str, y: &str) -> &str {
    // 1番目の規則を適用する。各引数が独自のライフタイムを得る
    // 今回は 1つではなく 2つ引数があるので ライフタイムも2種類
    //fn longest<'a, 'b>(x: &'a str, y: &'b str) -> &str {
    // 複数の入力ライフタイムがあるので 2番目の規則は適用されない
    // また3番目の規則も適用されない。longest はメソッドではなく関数な故 どの引数もselfではない
    // 3つの規則全部を適用してもなお まだ戻り値型のライフタイムが判明していない
    // なので この longest関数でエラーになったのです
    // コンパイラは ライフタイム省略規則全てを適用しても、シグニチャの参照全部のライフタイムを計算することができなかった

    // 3番目の規則はメソッドシグニチャでしか適用されないので、
    // 次にその文脈でライフタイムを観察して 3番目の規則がメソッドシグニチャであまり頻繁にライフタイムを注釈しなくても済むこと確認する

  // メソッド定義におけるライフタイム注釈
    // 構造体にライフタイムのあるメソッドを実装する際、
    // ジェネリック型引数と同じ記法を使用する
    // ライフタイム引数を宣言たり使用したりする場所は、構造体フィールドか, メソッド引数と戻り値に関係するかによって変わる
    // 構造体のフィールド用のライフタイム名は implキーワードの後ろに宣言する必要があり それから構造体名の後に使用される
    // そのようなライフタイムは構造体の型の一部になる故
    // implブロック内の


 r['total'] as int,
      }
  };

  // 6. 最终在内存合并成 List<Subject>
  return userRows.map((r) {
    final id = r['subject_id'] as String;
    final userRec = r;
    final mainRec = mainMap[id]!;
    return Subject(
      id: id,
      name: mainRec['name'] as String,
      selected: userRec['selected'] as int,
      correct: userRec['correct'] as int,
      incorrect: userRec['incorrect'] as int,
      total: mainRec['total'] as int,
    );
  }).toList();
}

Future<List<Subject>> getSubjectsByIdentity() async {
  // 1. 打开两个数据库连接
  final db = await DatabaseHelper().database; // 题库（question_data）
  final udb = await UserDBHelper().database; // 用户数据（user_data）

  final prefs = await SharedPreferences.getInstance();
  final identityId = prefs.getString('identityId') ?? '30401';

  // 2. 主库中一次 JOIN 拿到 subject_id、name、total
  final mainRows = await db.rawQuery('''
    SELECT
      S.id           AS subject_id,
      S.name         AS subject_name,
      ISUB.total     AS total
    FROM IdentitySubject AS ISUB
    JOIN Subject AS S
      ON S.id = ISUB.subject_id
    WHERE ISUB.identity_id = ?
  ''', [identityId]);

  if (mainRows.isEmpty) return [];

  // 3. 提取所有 subject_id
  final subjectIds = mainRows.map((r) => r['subject_id'] as String).toList();
  final placeholders = List.filled(subjectIds.length, '?').join(', ');

  // 4. 用户库中一次性拿 correct/incorrect/selected
  List<Map<String, dynamic>> userRows = await udb.rawQuery('''
    SELECT subject_id, correct, incorrect, selected
    FROM IdentitySubject
    WHERE identity_id = ?
      AND subject_id IN ($placeholders)
  ''', [identityId, ...subjectIds]);

  // 5. 找出缺失的 subject_id 并批量插入（correct/incorrect/selected 初始为 0）
  final existingIds = userRows.map((r) => r['subject_id'] as String).toSet();
  final missingIds =
      subjectIds.where((id) => !existingIds.contains(id)).toList();

  if (missingIds.isNotEmpty) {
    await Future.microtask(() async {
      await udb.transaction((txn) async {
        final batch = txn.batch();
        for (final id in missingIds) {
          batch.insert('IdentitySubject', {
            'identity_id': identityId,
            'subject_id': id,
            'correct': 0,
            'incorrect': 0,
            'selected': 0,
          });
        }
        await batch.commit(noResult: true);
      });
    });

    // 本地 list 补上初始值，后面合并更方便
    userRows = List<Map<String, dynamic>>.from(userRows);
    userRows.addAll(
      missingIds.map(
        (id) => {
          'subject_id': id,
          'correct': 0,
          'incorrect': 0,
          'selected': 0,
        },
      ),
    );
  }

  // 6. 在内存里合并 mainRows 和 userRows，构造 Subject 对象列表
  //    先把 userRows 转 map
  final userMap = {for (var r in userRows) r['subject_id'] as String: r};

  final List<Subject> subjects = mainRows.map((r) {
    final id = r['subject_id'] as String;
    final mainRec = r;
    final userRec = userMap[id]!;

    return Subject(
      i


*   ApiFuture<User> future = alloyDBAdminClient.updateUserCallable().futureCall(request);
   *   // Do something.
   *   User response = future.get();
   * }
   * }

   */
  public final UnaryCallable<UpdateUserRequest, User> updateUserCallable() {
    return stub.updateUserCallable();
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Deletes a single User.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
   *   UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]");
   *   alloyDBAdminClient.deleteUser(name);
   * }
   * }

   *
   * @param name Required. The name of the resource. For the required format, see the comment on the
   *     User.name field.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final void deleteUser(UserName name) {
    DeleteUserRequest request =
        DeleteUserRequest.newBuilder().setName(name == null ? null : name.toString()).build();
    deleteUser(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Deletes a single User.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
   *   String name = UserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]").toString();
   *   alloyDBAdminClient.deleteUser(name);
   * }
   * }

   *
   * @param name Required. The name of the resource. For the required format, see the comment on the
   *     User.name field.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final void deleteUser(String name) {
    DeleteUserRequest request = DeleteUserRequest.newBuilder().setName(name).build();
    deleteUser(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Deletes a single User.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
   *   DeleteUserRequest request =
   *       DeleteUserRequest.newBuilder()
   *           .setName(UserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]").toString())
   *           .setRequestId("requestId693933066")
   *