.triggerPreviewUpdate()}),50))}))}

            ${this.renderFieldSection((0,c.kg)("editor.image.crop_fit",l,"Crop & Fit"),(0,c.kg)("editor.image.crop_fit_desc",l,"Control how the image fits within its container."),t,{object_fit:r.object_fit||"cover"},[this.selectField("object_fit",[{value:"cover",label:(0,c.kg)("editor.image.fit.cover",l,"Cover (crop to fill)")},{value:"contain",label:(0,c.kg)("editor.image.fit.contain",l,"Contain (fit entire image)")},{value:"fill",label:(0,c.kg)("editor.image.fit.fill",l,"Fill (stretch to fit)")},{value:"scale-down",label:(0,c.kg)("editor.image.fit.scale_down",l,"Scale Down")},{value:"none",label:(0,c.kg)("editor.image.fit.none",l,"None (original size)")}])],(e=>{const t=e.detail.value.object_fit;t!==(r.object_fit||"cover")&&(n({object_fit:t}),setTimeout((()=>{this.triggerPreviewUpdate()}),50))}))}

            ${s.Q.renderField((0,c.kg)("editor.image.border_radius",l,"Border Radius"),(0,c.kg)("editor.image.border_radius_desc",l,"Control the rounded corners of the image."),t,{border_radius:r.border_radius||8},[s.Q.createSchemaItem("border_radius",{number:{min:0,max:64,step:1}})],(e=>n({border_radius:e.detail.value.border_radius})))}

            ${(0,c.kg)("editor.image.filters",l,"Filters")}

            ${s.Q.renderField((0,c.kg)("editor.image.filter.blur",l,"Blur"),(0,c.kg)("editor.image.filter.blur_desc",l,"Apply a blur effect to your image."),t,{filter_blur:r.filter_blur||0},[s.Q.createSchemaItem("filter_blur",{number:{min:0,max:20,step:1}})],(e=>n({filter_blur:e.detail.value.filter_blur})))}

            ${s.Q.renderField((0,c.kg)("editor.image.filter.brightness",l,"Brightness (%)"),(0,c.kg)("editor.image.filter.brightness_desc",l,"Adjust the brightness of your image."),t,{filter_brightness:r.filter_brightness||100},[s.Q.createSchemaItem("filter_brightness",{number:{min:0,max:200,step:1}})],(e=>n({filter_brightness:e.detail.value.filter_brightness})))}

            ${s.Q.renderField((0,c.kg)("editor.image.filter.contrast",l,"Contrast (%)"),(0,c.kg)("editor.image.filter.contrast_desc",l,"Modify the contrast of your image."),t,{filter_contrast:


urem",
[182173] = "Höllenfeuerbanner, W",
[182174] = "Höllenfeuerbanner, N",
[182175] = "Höllenfeuerbanner, S",
[182176] = "Stufen von Boha'mu",
[182177] = "Allerias Feste",
[182178] = "Tuurem",
[182179] = "Steinbrecherfeste",
[182180] = "Shattrath",
[182181] = "Zangarmarschen",
[182182] = "Irdenes Brandmal",
[182183] = "Totschlägerschädel",
[182184] = "Gifthandbuch von Dolchfenn",
[182185] = "Giftphiole von Dolchfenn",
[182186] = "Sonnentor",
[182187] = "Unterirdische Wasserquelle",
[182188] = "Dolchfennfels",
[182189] = "Schattenmondtal",
[182190] = "Posten der Feuerschwingen",
[182191] = "Tuurem",
[182192] = "Der Schwarze Tempel",
[182193] = "Shattrath",
[182194] = "Zangarmarschen",
[182196] = "Arkaner Behälter",
[182197] = "Arkaner Behälter",
[182198] = "Arkaner Behälter",
[182199] = "Keannas Aufzeichnungen",
[182200] = "Kochtopf",
[182203] = "Die Grünen Hügel des Schlingendorntals",
[182205] = "Lagerfeuer",
[182206] = "Lagerfeuer",
[182209] = "Lagerfeuer",
[182210] = "Banner von Halaa",
[182211] = "Feuer (klein)",
[182212] = "Monument der Nazzivus",
[182215] = "Freudenfeuer",
[182216] = "Freudenfeuer",
[182217] = "Freudenfeuer",
[182218] = "Freudenfeuer",
[182219] = "Freudenfeuer",
[182220] = "Freudenfeuer",
[182221] = "Freudenfeuer",
[182222] = "Bombenwagen",
[182223] = "Feuerbombe",
[182251] = "Die Kristallhalle",
[182252] = "Die Halle des Lichts",
[182253] = "Händlertreppe",
[182254] = "Greifenhorst",
[182255] = "Wyvernhorst",
[182256] = "Liegengelassene Nahrung",
[182257] = "Teppich der Mag'har",
[182258] = "Kristallfragment von Oshu'gun",
[182259] = "Schlachtstandarte der Mag'har",
[182260] = "Prasselnde Flamme",
[182261] = "Erster Scheiterhaufen der Brennenden Klinge",
[182262] = "Dritter Scheiterhaufen der Brennenden Klinge",
[182263] = "Erster Scheiterhaufen der Brennenden Klinge",
[182264] = "Zweiter Scheiterhaufen der Brennenden Klinge",
[182265] = "Vorratskiste des Blutenden Auges",
[182266] = "Zerstörter Wyvernhorst",
[182267] = "Wyvernhorst",
[182269] = "Amboss",
[182270] = "Schmiede",
[182271] = "Lagerfeuer",
[182


Serpent Sting"]="毒蛇釘刺",
		["Setup"]="調整",
		["Shackle Undead"]="束縛不死生物",
		["Shadow Affinity"]="暗影親和",
		["Shadow Bolt"]="暗影箭",
		["Shadow Focus"]="暗影集中",
		["Shadow Mastery"]="暗影專精",
		["Shadow Protection"]="暗影防護",
		["Shadow Reach"]="暗影延伸",
		["Shadow Resistance Aura"]="暗影抗性光環",
		["Shadow Resistance"]="暗影抗性",
		["Shadow Trance"]="暗影冥思",
		["Shadow Vulnerability"] = "暗影易傷",
		["Shadow Ward"]="防護暗影結界",
		["Shadow Weaving"]="暗影之波",
		["Shadow Word: Pain"]="暗言術：痛",
		["Shadowburn"]="暗影灼燒",
		["Shadowform"]="暗影形態",
		["Shadowguard"]="暗影守衛",
		["Shadowmeld Passive"]="影遁",
		["Shadowmeld"]="影遁",
		["Sharpened Claws"]="鋒利獸爪",
		["Shatter"]="碎冰",
		["Sheep"]="羊",
		["Shell Shield"]="甲殼護盾",
		["Shield Bash"]="盾擊",
		["Shield Bash - Silenced"] = "盾擊 - 沈默",
		["Shield Block"]="盾牌格擋",
		["Shield Slam"]="盾牌猛擊",
		["Shield Specialization"]="盾牌專精",
		["Shield Wall"]="盾牆",
		["Shield"]="盾牌",
		["Shoot Bow"]="弓射擊",
		["Shoot Crossbow"]="弩射擊",
		["Shoot Gun"]="槍械射擊",
		["Shoot"]="射擊",
		["Shred"]="撕碎",
		["Silence"]="沉默",
		["Silent Resolve"]="無聲消退",
		["Sinister Strike"]="邪惡攻擊",
		["Siphon Life"]="生命虹吸",
		["Skinning"]="剝皮",
		["Slam"]="猛擊",
		["Sleep"]="催眠術",
		["Slice and Dice"]="切割",
		["Slow Fall"]="緩落術",
		["Smelting"]="熔煉",
		["Smite"]="懲擊",
		["Solid Sharpening Stone"]="堅固的磨刀石",
		["Soothe Animal"]="安撫動物",
		["Soothing Kiss"]="安撫之吻",
		["Soul Fire"]="靈魂之火",
		["Soul Link"]="靈魂鏈結",
		["Soul Siphon"] = "靈魂虹吸",
		["Soulstone Resurrection"]="靈魂石復活",
		["Spell Lock"]="法術封鎖",
		["Spell Warding"]="法術護衛",
		["Spirit Bond"]="靈魂聯結",
		["Spirit Tap"]="精神分流",
		["Spirit of Redemption"]="救贖之魂",
		["Spiritual Focus"]="精神集中",
		["Spiritual Guid


addVectors]( [param:Vector3 a], [param:Vector3 b] )

将该向量设置为[page:Vector3 a] + [page:Vector3 b]。

[method:this applyAxisAngle]( [param:Vector3 axis], [param:Float angle] )

		[page:Vector3 axis] - 一个被归一化的[page:Vector3]。

		[page:Float angle] - 以弧度表示的角度。

		将轴和角度所指定的旋转应用到该向量上。

[method:this applyEuler]( [param:Euler euler] )

		通过将[page:Euler]（欧拉）对象转换为[page:Quaternion]（四元数）并应用，
		将欧拉变换应用到这一向量上。

[method:this applyMatrix3]( [param:Matrix3 m] )

将该向量乘以三阶矩阵[page:Matrix3 m]。

[method:this applyMatrix4]( [param:Matrix4 m] )

			将该向量乘以四阶矩阵m（第四个维度隐式地为1），并按角度进行划分。

[method:this applyNormalMatrix]( [param:Matrix3 m] )

将该向量乘以正规矩阵 [page:Matrix3 m]，并将结果进行归一化。

[method:this applyQuaternion]( [param:Quaternion quaternion] )

		将[page:Quaternion]变换应用到该向量。

[method:Float angleTo]( [param:Vector3 v] )

		以弧度返回该向量与向量[page:Vector3 v]之间的角度。

[method:this ceil]()

		将该向量[page:.x x]分量、 [page:.y y]分量以及[page:.z z]分量向上取整为最接近的整数。

[method:this clamp]( [param:Vector3 min], [param:Vector3 max] )

		[page:Vector3 min] - 在限制范围内，[page:.x x]值、[page:.y y]值和[page:.z z]的最小值。

		[page:Vector3 max] - 在限制范围内，[page:.x x]值、[page:.y y]值和[page:.z z]的最大值。

		如果该向量的x值、y值或z值大于限制范围内最大x值、y值或z值，则该值将会被所对应的值取代。

		如果该向量的x值、y值或z值小于限制范围内最小x值、y值或z值，则该值将会被所对应的值取代。

[method:this clampLength]( [param:Float min], [param:Float max] )

		[page:Float min] - 长度将被限制为的最小值

		[page:Float max] - 长度将被限制为的最大


rint = debugPrint;
    debugPrint = (String? message, {int? wrapWidth}) {
      log.add(message);
    };

    await tester.pumpWidget(const example.ActionsExampleApp());

    // Verify that value is not marked as dirty.
    Color? saveButtonColor = getSaveButtonColor(tester);
    expect(saveButtonColor, equals(Colors.green));
    expect(
      find.descendant(of: find.byType(example.SaveButton), matching: find.text('0')),
      findsOneWidget,
    );

    // Decrement the value, which marks it as dirty.
    await tester.tap(find.byIcon(Icons.exposure_minus_1));
    await tester.pump();
    expect(find.text('Value: -1'), findsOneWidget);

    // Verify that value is marked as dirty.
    saveButtonColor = getSaveButtonColor(tester);
    expect(saveButtonColor, equals(Colors.red));
    expect(
      find.descendant(of: find.byType(example.SaveButton), matching: find.text('0')),
      findsOneWidget,
    );

    // Tap SaveButton to reset dirty status.
    await tester.tap(find.byType(example.SaveButton));
    await tester.pump();

    // Verify log record.
    expect(log.length, equals(1));
    expect(log.last, equals('Saved Data: -1'));

    // Verify that value is no more marked as dirty.
    saveButtonColor = getSaveButtonColor(tester);
    expect(saveButtonColor, equals(Colors.green));
    expect(
      find.descendant(of: find.byType(example.SaveButton), matching: find.text('-1')),
      findsOneWidget,
    );

    debugPrint = originalDebugPrint;
  });
}
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_api_samples/widgets/focus_traversal/focus_traversal_group.0.dart'
    as example;
import 'package:flutter_test/flutter_test.dart';

void main() {
  bool hasFocus(WidgetTester tester, String text) {
    return Focus.of(tester.element(find.text(text))).hasPrimaryFocus;
  }

  testWidgets('The focus updates should follow the focus traversal groups policy', (
    WidgetTester tester,
  ) async {
    await tester.pumpWidget(const example.FocusTraversalGroupExampleApp());

    // Set the focus to the first button.
    Focus.of(tester.element(find.text('num: 0'))).requestFocus();
    await tester.pump();

    expect(hasFocus(tester, 'num: 0'), isTrue);

    const List<String> focusOrder = <String>[
      'num: 1',
      'num: 2',
      'String: A',
      'String: B',
      'String: C',
      'ignored num: 3',
      'ignored num: 2',
      'ignored num: 1',
      'num: 0',
    ];

    for (final String text in focusOrder) {
      await tester.sendKeyEvent(LogicalKeyboardKey.tab);
      await tester.pump();

      expect(hasFocus(tester, text), isTrue);
    }
  });
}
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_api_samples/widgets/focus_manager/focus_node.unfocus.0.dart' as example;
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('Unfocusing with UnfocusDisposition.scope gives the focus to the parent scope


因此加上选了两次0号球的方案数$C_{n+m}^{m-2}$... 因此总方案数是$\sum_{j=0}^m (-1)^j C_{n + m}^{m-j}$ 故 $$ C_{n + m - 1}^{n - 1} = C_{n+m-1}^m= \sum_{j=0}^m (-1)^j C_{n + m}^{m-j}=\sum_{j=0}^m (-1)^j C_{n + m}^{n + j} $$
#### Grading rules
| 评分规则 | 分值 | 得分 | 评分过程 |
| --- | --- | --- | --- |
| 得出左侧组合意义 | 1 | 1 | 学生答案正确地描述了左侧组合数的意义，即从n+m-1个球中选m个的方案数是$C_{n+m-1}^m = C_{n + m - 1}^{n - 1}$。这与标准答案一致，因此根据评分规则，该部分得分。 |
| 右侧组合数的组合意义 | 1 | 1 | 学生答案完整地解释了右侧组合数的组合意义，与标准答案完全一致。因此，根据评分规则，该部分得分。 |
| 应用容斥原理 | 1 | 1 | 学生答案完整地应用了容斥原理，详细解释了从n+m-1个球中选m个的方案数，并通过增加一个0号球的方式，逐步推导出总方案数的表达式。这一过程与标准答案完全一致，符合评分规则的要求。 |
| 能说明清楚为什么容斥没有组合数系数 | 1 | 1 | 学生答案完全复制了标准答案的内容，包括对组合场景的解释和容斥原理的应用。因此，学生答案符合评分规则，能够说明清楚为什么容斥没有组合数系数。 |

## Problem 6.2
### Subproblem (1)
#### Status
graded
#### Answer
## (1) 首先不考虑限制的情况：${9! \over 3!3!3!}$ 设$A_3$表示存在连续3个a的方案集合，$B_3$表示存在连续3个b的方案集合，$C_3$表示存在连续3个c的方案集合 对$|A_3|, |B_3|, |C_3|$： 将aaa看成一个字母，故$|A_3|= {7! \over 1!3!3!}= 140 $ 对$|A_3\bigcap B_3|, |A_3\bigcap C_3|, |C_3\bigcap B_3|$ ： 将aaa bbb分别看成一个字母，故$|A_3\bigcap B_3| = {5! \over 1!1!3!}=20$ 对$|A_3\bigcap B_3\bigcap C_3|$ ： 将aaa bbb ccc分别看成一个字母，故$|A_3\bigcap B_3\bigcap C_3| = {3! \over 1!1!1!}=6$ 总方案数为 $$ {9! \over 3!3!3!} - 3*140+20*3-6= 1680 - 42


 ccache,
		  unsigned *flags)
{
    DigestReqInner ireq;
    DigestRepInner irep;
    krb5_error_code ret;

    memset(&ireq, 0, sizeof(ireq));
    memset(&irep, 0, sizeof(irep));

    ireq.element = choice_DigestReqInner_supportedMechs;

    ret = digest_request(context, realm, ccache,
			 KRB5_KU_DIGEST_ENCRYPT, &ireq, &irep);
    if (ret)
	goto out;

    if (irep.element == choice_DigestRepInner_error) {
	ret = irep.u.error.code;
	krb5_set_error_message(context, ret, "Digest probe error: %s",
			       irep.u.error.reason);
	goto out;
    }

    if (irep.element != choice_DigestRepInner_supportedMechs) {
	ret = EINVAL;
	krb5_set_error_message(context, ret, "Digest reply not an probe");
	goto out;
    }

    *flags = DigestTypes2int(irep.u.supportedMechs);

 out:
    free_DigestRepInner(&irep);

    return ret;
}

#endif /* HEIMDAL_SMALLER */


 static void SetPlacement(AvaloniaObject element, PlacementType value) =>
        element.SetValue(PlacementProperty, value);

    public static PlacementType GetPlacement(AvaloniaObject element) => element.GetValue(PlacementProperty);

    public static readonly AttachedProperty<string> StringFormatProperty =
        AvaloniaProperty.RegisterAttached<TipElement, AvaloniaObject, string>("StringFormat", defaultValue: "N1");

    public static void SetStringFormat(AvaloniaObject element, string value) =>
        element.SetValue(StringFormatProperty, value);

    public static string GetStringFormat(AvaloniaObject element) => element.GetValue(StringFormatProperty);
}


et timer_driver = timer_driver.activate()?;
/// # Ok(())
/// # }
/// ```
pub struct TimerDriver<'a> {
    callback: Callback,
    context: &'a DriverContext,
}

struct Callback;

struct ParallelTimerConsumer;

impl<'a> Consumer<Callback> for ParallelTimerConsumer {
    fn consume(_: &mut Callback, _: usize, _: usize, _: usize) {}
}

/// Activated time driver. Updates current time in the context and manages
/// active alarms.
/// Example usage (sleep for 1 second):
/// ```no_run
/// # use libtock::result::TockResult;
/// # use libtock::timer::Duration;
/// # async fn doc() -> TockResult<()> {
/// # let mut drivers = libtock::retrieve_drivers()?;
/// # let mut timer_driver = drivers.timer.create_timer_driver();
/// let timer_driver = timer_driver.activate()?;
/// timer_driver.sleep(Duration::from_ms(1000)).await?;
/// # Ok(())
/// # }
/// ```
pub struct ParallelSleepDriver<'a> {
    _callback_subscription: CallbackSubscription<'a>,
    context: &'a DriverContext,
}

impl<'a> TimerDriver<'a> {
    /// Activate the timer driver, will return a ParallelSleepDriver which
    /// can used to sleep.
    pub fn activate(&'a mut self) -> TockResult<ParallelSleepDriver<'a>> {
        let subscription = syscalls::subscribe::<ParallelTimerConsumer, _>(
            DRIVER_NUMBER,
            subscribe_nr::SUBSCRIBE_CALLBACK,
            &mut self.callback,
        )?;
        let driver = ParallelSleepDriver {
            _callback_subscription: subscription,
            context: &self.context,
        };
        Ok(driver)
    }
}

impl<'a> ParallelSleepDriver<'a> {
    /// Sleep for the given duration
    pub async fn sleep(&self, duration: Duration<usize>) -> TockResult<()> {
        let now = get_current_ticks()?;
        let freq = get_clock_frequency()?;
        let alarm_instant = Self::compute_alarm_instant(duration.ms, now, freq)?;
        let this_alarm = ActiveTimer {
            instant: alarm_instant as u32,
            set_at: now as u32,
        };

        let suspended_timer: Cell<Option<ActiveTimer>> = Cell::new(None);

        futures::wait_until(|| {
            self.activate_current_timer(this_alarm, &suspended_timer)
                .unwrap_or(false)
        })
        .await;

        Ok(())
    }

    fn activate_timer(&self, timer: ActiveTimer) -> TockResult<()> {
        set_alarm_at(timer.instant as usize)?;
        let now = get_current_ticks()?;
        if !is_over(timer, now as u32) {
            self.context.active_timer.set(Some(timer));
        } else {
            self.wakeup_soon()?;
        }
        Ok(())
    }

    fn wakeup_soon(&self) -> TockResult<()> {
        self.context.active_timer.set(None);

        for i in 0.. {
            let now = get_current_ticks()?;

            let next_timer = ActiveTimer {
                instant: now as u32 + i,
                set_at: now as u32,
            };
            set_alarm_at(next_timer.instant as usize)?;
            let now = get_current_ticks()?;
            if !is_over(next_timer,


-all-theme-mixins-arguments();
@include test-individual-system-mixins-unwrap();
@use '@angular/docs/styles/media-queries' as mq;

.adev-nav-item {
  color: var(--quaternary-contrast);
  position: relative;
  width: 6.875rem;

  @include mq.for-phone-only {
    width: 5.05rem;
  }

  @include mq.for-tablet {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
  }

  &::before {
    content: '';
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    width: 2px;

    // TODO: Make this gradient if the page is currently active, and black if child page active
    background-color: var(--primary-contrast);
    opacity: 0;
    transform: scale(0.9);
    transform-origin: center;
    transition: opacity 0.3s ease, transform 0.3s ease;

    @include mq.for-tablet {
      width: auto;
      top: auto;
      right: 0;
      height: 2px;
    }
  }

  &:not(.adev-nav-item--logo) {
    @include mq.for-tablet {
      a,
      .adev-nav-button {
        gap: 0.25rem;
      }
    }
  }

  .adev-nav-button {
    width: 100%;
    font-weight: 500;
  }

  a,
  .adev-nav-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding-block: 1.25rem;
    text-decoration: none;
    fill: var(--quaternary-contrast);
    color: inherit;
    cursor: pointer;
    transition: fill 0.3s ease;

    @include mq.for-tablet {
      flex-direction: row;
    }
  }

  &__label {
    margin: 0;
    font-size: 0.813; // 13px
    color: inherit;

    abbr {
      font-size: 0.688; // 11px
    }
  }

  i {
    color: var(--quaternary-contrast);
    transition: color 0.3s ease;
  }

  span,
  abbr {
    transition: color 0.3s ease;
  }

  &:hover {
    a,
    .adev-nav-button {
      fill: var(--primary-contrast);
    }
    span,
    abbr {
      color: var(--primary-contrast);
    }
    i {
      color: var(--primary-contrast);
    }
  }

  &--active {
    &::before {
      opacity: 1;
      transform: scaleY(1);
    }

    &:not(.adev-nav-item--logo) {
      path {
        fill: var(--primary-contrast);
      }
    }
    span,
    abbr,
    i {
      color: var(--primary-contrast);
    }
  }
}
@use '@angular/docs/styles/media-queries' as mq;

$resizer-width: 0.0625rem;
$column-width: calc(50% - #{$resizer-width} - var(--layout-padding));

.adev-page-content {
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  position: relative;
  padding: 0 var(--layout-padding) var(--layout-padding);
  max-width: calc(100vw - var(--layout-padding) * 2);
  container: page-content / inline-size;

  @include mq.for-tablet-landscape-down {
    flex-direction: column;
  }

  // Tablet / Mobile Tutorial Nav
  @include mq.for-tablet-landscape-up {
    >.adev-tutoria


*
   * @param color color to be multiplied
   * @param alpha value between 0 and 255
   * @return multiplied color
   */
  @JvmStatic
  fun multiplyColorAlpha(color: Int, alpha: Int): Int {
    if (alpha == 255) {
      return color
    }
    if (alpha == 0) {
      return color and 0x00FFFFFF
    }

    var clippedAlpha = alpha
    clippedAlpha += (clippedAlpha shr 7) // make it 0..256
    val colorAlpha = color ushr 24
    val multipliedAlpha = colorAlpha * clippedAlpha shr 8
    return multipliedAlpha shl 24 or (color and 0x00FFFFFF)
  }

  /**
   * Gets the opacity from a color. Inspired by Android ColorDrawable.
   *
   * @param color
   * @return opacity expressed by one of PixelFormat constants
   */
  @JvmStatic
  fun getOpacityFromColor(color: Int): Int =
      when (color ushr 24) {
        255 -> PixelFormat.OPAQUE
        0 -> PixelFormat.TRANSPARENT
        else -> PixelFormat.TRANSLUCENT
      }
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

package com.facebook.common.media

import androidx.annotation.NonNull
import java.util.Locale

/** Utility class. */
object MediaUtils {

  @JvmField // Additional mime types that we know to be a particular media type but which may not be
  // supported natively on the device.
  val ADDITIONAL_ALLOWED_MIME_TYPES =
      mapOf(
          "mkv" to "video/x-matroska",
          "glb" to "model/gltf-binary",
      )

  @JvmStatic fun isPhoto(mimeType: String?): Boolean = mimeType?.startsWith("image/") ?: false

  @JvmStatic fun isVideo(mimeType: String?): Boolean = mimeType?.startsWith("video/") ?: false

  @JvmStatic fun isThreeD(mimeType: String?): Boolean = mimeType == "model/gltf-binary"

  @JvmStatic
  fun extractMime(@NonNull path: String): String? {
    val extension = extractExtension(path)?.lowercase(Locale.US) ?: return null

    // If we did not find a mime type for the extension specified, check our additional
    // extension/mime-type mappings.
    return MimeTypeMapWrapper.getMimeTypeFromExtension(extension)
        ?: ADDITIONAL_ALLOWED_MIME_TYPES[extension]
  }

  private fun extractExtension(@NonNull path: String): String? {
    val pos = path.lastIndexOf('.')
    return if (pos < 0 || pos == path.length - 1) null else path.substring(pos + 1)
  }

  /**
   * @return true if the mime type is one of our whitelisted mimetypes that we support beyond what
   *   the native platform supports.
   */
  @JvmStatic
  fun isNonNativeSupportedMimeType(@NonNull mimeType: String): Boolean {
    return ADDITIONAL_ALLOWED_MIME_TYPES.containsValue(mimeType)
  }
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

package com.facebook.fresco.samples.showcase.vito

import android.graphics.Color
import androidx.core.content.ContextCompat
import com.facebook.fresco.samples.showcase.LithoSample
import com.facebook.fresco.samples.showcase.R
import com.facebook.fresco.samples.showcase.misc.ImageUriProvider
import com.facebook.fresco.vito.litho.FrescoVitoImage2
import com.facebook.fresco.vito.options.BorderOptions
import com.facebook.fresco.vito.options.ImageOptions
import com.facebook.fresco.vito.source.DrawableImageSource
import com.fac


e7e8e8 1%,#d8ddde 25%,#e7e8e8 100%);background-image:-ms-linear-gradient(top, #e7e8e8 1%,#d8ddde 25%,#e7e8e8 100%)}.x-msgbox .x-icon{margin:0 0.8em 0 0.5em;background:#fff}.x-msgbox .x-msgbox-warning .x-button,.x-msgbox x-msgbox-error .x-button{border-color:#fc3e39}.x-msgbox .x-msgbox-warning .x-button .x-button-label,.x-msgbox .x-msgbox-warning .x-button .x-badge,.x-msgbox x-msgbox-error .x-button .x-button-label,.x-msgbox x-msgbox-error .x-button .x-badge{color:#fc3e39}.x-msgbox .x-msgbox-title{margin-top:5px;margin-left:10px;margin-right:10px}.x-msgbox .x-msgbox-title .x-title{font-size:1.2em;padding:0px}.x-msgbox .x-dock-body{margin:10px}.x-msgbox .x-body{background:transparent !important}.x-msgbox .x-toolbar{background:transparent none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.x-msgbox .x-field{padding-top:.5em;min-height:.8em;margin:0 0 .6em 0;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}.x-msgbox .x-field-input{padding-right:2.2em}.x-msgbox .x-form-field{min-height:.8em;padding:.3em;padding-right:0 !important;-webkit-appearance:none;background:transparent}.x-msgbox-text{color:#000;font-size:.9em;font-weight:400}.x-msgbox{-webkit-border-radius:7px;-moz-border-radius:7px;-ms-border-radius:7px;-o-border-radius:7px;border-radius:7px}.x-msgbox .x-msgbox-buttons{padding:0;height:auto;min-height:auto}.x-msgbox .x-msgbox-buttons .x-toolbar-inner{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.x-msgbox .x-msgbox-buttons .x-toolbar-inner .x-button{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;-webkit-border-radius:0px;-moz-border-radius:0px;-ms-border-radius:0px;-o-border-radius:0px;border-radius:0px;background-color:transparent;border:1px solid #9da1a0;border-bottom-width:0px;height:40px;margin:0}.x-msgbox .x-msgbox-buttons .x-toolbar-inner .x-button:first-child{border-left-width:0px}.x-msgbox .x-msgbox-buttons .x-toolbar-inner .x-button:last-child{border-left-width:0px;border-right-width:0px}.x-msgbox .x-msgbox-buttons .x-toolbar-inner .x-button.x-button-pressing{background-color:#fff}.x-msgbox .x-msgbox-buttons .x-toolbar-inner .x-button .x-button-label,.x-msgbox .x-msgbox-


rough[39].t(2265,6737,flip_x)
   + passthrough.t(10675,6737) + passthrough[39].t(1715,6737,flip_x)

-- add asymmetric Equator to mirror-symmetric North and South
MWSSrecipes = MWSSrecipes + MWSSrecipes.t(0,13583,flip_y)
all = all + all.t(0,13583,flip_y) + center

all.put()
g.fit()

-- Different glider paths


ed-light: #fb7185;--vp-c-red-lighter: #fda4af;--vp-c-red-lightest: #fdd6e0;--vp-c-red-dark: #e11d48;--vp-c-red-darker: #be123c;--vp-c-red-darkest: #9f1239;--vp-c-red-dimm-1: rgba(244, 63, 94, .05);--vp-c-red-dimm-2: rgba(244, 63, 94, .2);--vp-c-red-dimm-3: rgba(244, 63, 94, .5)}:root{--vp-font-family-base: "Chinese Quotes", "Inter var", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-local-nav: 10;--vp-z-index-nav: 20;--vp-z-index-layout-top: 30;--vp-z-index-backdrop: 40;--vp-z-index-sidebar: 50;--vp-z-index-footer: 60}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2


cam3);
        view3.setClearFlags(true, true, true);
        view3.attachScene(rootNode);

        // Setup fourth view
        Camera cam4 = cam.clone();
        cam4.setViewPort(.5f, 1f, .5f, 1f);
        cam4.setLocation(new Vector3f(4.775564f, 1.4548365f, 0.11491505f));
        cam4.setRotation(new Quaternion(0.02356979f, -0.74957186f, 0.026729556f, 0.66096294f));

        ViewPort view4 = renderManager.createMainView("Top Right", cam4);
        view4.setClearFlags(true, true, true);
        view4.attachScene(rootNode);

        //test multiview for gui
        guiViewPort.getCamera().setViewPort(.5f, 1f, .5f, 1f);

        // Setup second gui view
        Camera guiCam2 = guiViewPort.getCamera().clone();
        guiCam2.setViewPort(0f, 0.5f, 0f, 0.5f);
        ViewPort guiViewPort2 = renderManager.createPostView("Gui 2", guiCam2);
        guiViewPort2.setClearFlags(false, false, false);
        guiViewPort2.attachScene(guiViewPort.getScenes().get(0));

    }
}
/*
 * Copyright (c) 2009-2021 jMonkeyEngine
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 * * Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 *
 * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
 *   may be used to endorse or promote products derived from this software
 *   without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package jme3test.material;

import com.jme3.app.SimpleApplication;
import com.jme3.input.KeyInput;
import com.jme3.input.controls.ActionListener;
import com.jme3.input.controls.AnalogListener;
import com.jme3.input.controls.KeyTrigger;
import com.jme3.light.DirectionalLight;
import com.jme3.material.Material;
import com.jme3.math.*;
import com.jme3.renderer.queue.RenderQueue.ShadowMode;
import com.jme3.scene.Geometry;
import com.jme3.scene.Spatial;
import com.jme3.scene.shape.RectangleMesh;
import com.jme3.util.SkyFactory;
import com.jme3.util.mikktspace.MikktspaceTangentGenerator;

public class TestParallax extends SimpleApplication {

    private final Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal();

    public static void main(String[] args) {
        TestParallax app = new TestParallax();
        app.


7b56

        jsr     jumpBlitImage
        jsr     jumpFlipPageMask

renderBCDLowDigit:
		clc
        lda     renderBCDState+1
        adc     #$08
        sta     renderBCDState+1
        bcc     renderBCD_Cont
        inc     renderBCDState+2
renderBCD_Cont:
		lda     renderBCDNew
        and     #$0F
        asl
        tax
        lda     fontGraphicsTable,x			; Find sprite for the lower digit
        sta     ZP_SPRITE_PTR_L
        lda     fontGraphicsTable+1,x
        sta     ZP_SPRITE_PTR_H

        jsr     jumpSetSpriteAnimPtr
				.word $001a

        jsr     jumpSetBlitPos
				.word $7b56

        jsr     jumpBlitImage				; Draw it in both buffers
        jsr     jumpFlipPageMask
        jsr     jumpSetBlitPos
				.word $7b56

        jsr     jumpBlitImage
        jsr     jumpFlipPageMask
renderBCDDone:
		rts

renderBCDXPos:		; $7b50
	.byte $3f,$8d,$db	; X screen positions of the three HUD numbers

renderBCDOld:			; $7b53
	.byte $00
renderBCDNew:			; $7b54
	.byte $00

renderBCDState:		; $7b55
	.byte	$00
	.byte	$00,$00	; $7b56  Pointer to render structure (always $0095, I think)
	.byte	$00

; Applies desired offsets to render position of current entity, then caches it at $1c-$1e
; Render offsets are used for a lot of things- rendering the chopper accessories, rendering
; the tank cannons, and sometimes just as fudges for sprites that need to align a certain way
; X = X render offset (low byte)
; A = X render offset (high byte)
; Y = Y render offset
setRenderOffset:		; $7b59
		stx     ZP_SCRATCH61
        sty     ZP_SCRATCH62
        sta     ZP_SCRATCH58
        ldx     ZP_CURR_ENTITY
        sec
        lda     ENTITY_X_L,x			; Fetch X position of entity
        sbc     ZP_SCRATCH61				; Apply desired offset...
        sta     ZP_RENDERPOS_XL			; ...then store as global render position
        lda     ENTITY_X_H,x
        bit     ZP_SCRATCH61
        bmi     setRenderOffsetNeg
        sbc     #$00
        sta     ZP_RENDERPOS_XH
        jmp     setRenderOffsetPos

setRenderOffsetNeg:
		sbc     #$FF
        sta     ZP_RENDERPOS_XH

setRenderOffsetPos:
		clc
        lda     ENTITY_Y,x				; Fetch Y position of entity
        adc     ENTITY_GROUND,x			; Offset for ground plane
        adc     ZP_SCRATCH62				; Apply desired additional offet
        sta     ZP_RENDERPOS_Y			; ...then store as global render position
        lda     ZP_SCRATCH58
        beq     setRenderParamsDone
        lsr
        eor     ZP_SCROLLPOS_L
        eor     ZP_RENDERPOS_XL
        and     #$01
        beq     setRenderParamsDone
        inc     ZP_RENDERPOS_XL
        bne     setRenderParamsDone
        inc     ZP_RENDERPOS_XH

setRenderParamsDone:
		rts

; Initializes the entity (game object) table. This code is partly wrong- see below
initEntityTable:		; $7b9a
		lda     #$00			; Render offset table iterators
        sta     ZP_OFFSET_ROW0
        sta     ZP_OFFSET_ROW1

        lda     #$25			; Pointer to renderDisplayList0
        sta     ZP_OFFSETPTR0_L
        lda     #$70
        sta     ZP_O


individual response \[
\hat{y}_0 = \hat{\alpha} +\hat{\beta}x_0
\]

However, the uncertainty associated with this estimator, as indicated by its variance, is higher compared to the mean estimator because it relies on the value of an individual response \(y_0\) rather than the more stable mean. To account for the additional variability of an individual response relative to the mean, an extra term, \(\sigma^2\), must be included in the variance expression for the estimator of a mean response.

\[
var[\hat{y}_0] = \left(1+\frac{1}{n}+\frac{(x_0-\bar{x})^2}{S_{xx}}\right)\sigma^2
\]

Thus,

\[
\frac{\hat{y}-y_0}{se[\hat{y}_0]}=\frac{\hat{y}-y_0}{\sqrt{\left(1+\frac{1}{n}+\frac{(x_0-\bar{x})^2}{S_{xx}}\right)\sigma^2}}\sim t_{n-2}
\]

Let’s put this two idea through our example. If we want to find a \(95\%\) confidence interval or the expected portfolio value on stock price of say, 360. In that case,

\[
\text{Estimate of the expected portfolio value} = 0.266+0.836\times 3.6 = 3.276
\]

and

\[
\text{se}[\text{Estimate}] = \sqrt{\left(\frac{1}{10}+\frac{(3.6-3.566)^2}{8.53}\right) 0.1594}=0.1263
\]

So, the \(95\%\) CI

\[
3.276\pm (t_{0.025,8}\times \text{se}[\text{Estimate}]) = 3.276 \pm 2.306\times 0.1263 = (2.985,3.567)
\]

That is for a stock price of \(\$360\), the expected portfolio value would be in the range of \((\$298.50,\$356.70)\)

Similarly, the \(95\%\) CI for the predicted actual portfolio value

\[\begin{align*}
3.276\pm (t_{0.025,8}\times \text{se}[\text{Estimate}]) &= 3.276 \pm 2.306\sqrt{\left(1+\frac{1}{10}+\frac{(3.6-3.566)^2}{8.53}\right) 0.1594}\\
& = (2.3103,4.2417)
\end{align*}\]

or \((\$231.03,\$424.17)\)

Model Accuracy

The residual from the fit at \(x_i\) is the estimated error which is defined by \[
\hat{\epsilon}_i = y_i - \hat{y}_i
\]

Scatter plots of residuals versus the explanatory variable (or the fitted response values) are particularly insightful. A lack of random scatter in


 failed");
        shaderCreateInfo = {static_cast<uint32_t>(bytecode.size()), bytecode.data()};
        PPX_CHECKED_CALL(GetDevice()->CreateShaderModule(&shaderCreateInfo, &PS));

        grfx::TextDrawCreateInfo createInfo = {};
        createInfo.pFont                    = mRoboto;
        createInfo.maxTextLength            = 4096;
        createInfo.VS                       = {VS.Get(), "vsmain"};
        createInfo.PS                       = {PS.Get(), "psmain"};
        createInfo.renderTargetFormat       = GetSwapchain()->GetColorFormat();

        PPX_CHECKED_CALL(GetDevice()->CreateTextDraw(&createInfo, &mStaticText));
        PPX_CHECKED_CALL(GetDevice()->CreateTextDraw(&createInfo, &mDynamicText));

        GetDevice()->DestroyShaderModule(VS);
        GetDevice()->DestroyShaderModule(PS);
    }

    mStaticText->AddString(float2(50, 100), "Diego brazenly plots pixels for\nmaking, very quirky, images with just code!", float3(0.7f, 0.7f, 0.8f));
    mStaticText->AddString(float2(50, 200), "RED: 0xFF0000", float3(1, 0, 0));
    mStaticText->AddString(float2(50, 240), "GREEN: 0x00FF00", float3(0, 1, 0));
    mStaticText->AddString(float2(50, 280), "BLUE: 0x0000FF", float3(0, 0, 1));
    mStaticText->AddString(float2(50, 330), "This string has\tsome\ttabs that are 400% the size of a space!", 4.0f, 1.0f, float3(1), 1);
    mStaticText->AddString(float2(50, 370), "This string has 70%\nline\nspacing!", 3.0f, 0.7f, float3(1), 1);

    PPX_CHECKED_CALL(mStaticText->UploadToGpu(GetGraphicsQueue()));
}

void ProjApp::Render()
{
    PerFrame& frame = mPerFrame[0];

    grfx::SwapchainPtr swapchain = GetSwapchain();

    // Wait for and reset render complete fence
    PPX_CHECKED_CALL(frame.renderCompleteFence->WaitAndReset());

    uint32_t imageIndex = UINT32_MAX;
    PPX_CHECKED_CALL(swapchain->AcquireNextImage(UINT64_MAX, frame.imageAcquiredSemaphore, frame.imageAcquiredFence, &imageIndex));

    // Wait for and reset image acquired fence
    PPX_CHECKED_CALL(frame.imageAcquiredFence->WaitAndReset());

    // Build command buffer
    PPX_CHECKED_CALL(frame.cmd->Begin());
    {
        // Add some dynamic text
        {
            std::stringstream ss;
            ss << "Frame: " << GetFrameCount() << "\n";
            ss << "FPS: " << std::setw(6) << std::setprecision(6) << GetAverageFPS();

            mDynamicText->Clear();
            mDynamicText->AddString(float2(50, 500), ss.str());

            mDynamicText->UploadToGpu(frame.cmd);
        }

        // Update constnat buffer
        mStaticText->PrepareDraw(mCamera.GetViewProjectionMatrix(), frame.cmd);
        mDynamicText->PrepareDraw(mCamera.GetViewProjectionMatrix(), frame.cmd);

        grfx::RenderPassPtr renderPass = swapchain->GetRenderPass(imageIndex);
        PPX_ASSERT_MSG(!renderPass.IsNull(), "render pass object is null");

        grfx::RenderPassBeginInfo beginInfo = {};
        beginInfo.pRenderPass               = renderPass;
        beginInfo.renderArea                = renderPass->GetRenderArea();
        beginInfo.RTVClearCount             = 1;
        beginInfo.RTVClearValues[0]         = {{0.25f, 0.3f, 0.33f, 1}};

        frame.cmd->TransitionImageLayout(renderPass->GetRenderTargetImage(0), PPX_ALL_SUBRESOURCES, grfx::RESOURCE


rejected).to.eql(true)
    return expect(d).to.eventually.be.rejectedWith(/boom/)
  })

  it("resolved ignores subsequent resolutions", () => {
    const d = new Deferred<number>()
    expect(d.resolve(123)).to.eql(true)
    expect(d.resolve(456)).to.eql(false)
    expect(d.pending).to.eql(false)
    expect(d.fulfilled).to.eql(true)
    expect(d.rejected).to.eql(false)
    return expect(d).to.become(123)
  })

  it("resolved respects subsequent rejections", () => {
    const d = new Deferred<number>()
    expect(d.resolve(123)).to.eql(true)
    expect(d.reject("boom")).to.eql(false)
    expect(d.pending).to.eql(false)
    // CAUTION: THIS IS WEIRD. The promise is resolved, but something later
    // wanted to reject, so we assume the rejected state, even though we can't
    // reach back in the promise chain and un-resolve the promise.
    expect(d.fulfilled).to.eql(false)
    expect(d.rejected).to.eql(true)
    return expect(d).to.become(123)
  })

  it("rejected ignores subsequent resolutions", () => {
    const d = new Deferred<number>()
    expect(d.reject("first boom")).to.eql(true)
    expect(d.resolve(456)).to.eql(false)
    return expect(d).to.eventually.be.rejectedWith(/first boom/)
  })

  it("rejected ignores subsequent rejections", () => {
    const d = new Deferred<number>()
    expect(d.reject("first boom")).to.eql(true)
    expect(d.reject("second boom")).to.eql(false)
    return expect(d).to.eventually.be.rejectedWith(/first boom/)
  })
})
import {ISegment, ICharacterSpecification, IState} from './interfaces';

// A State has a character specification and (`charSpec`) and a list of possible
// subsequent states (`nextStates`).
//
// If a State is an accepting state, it will also have several additional
// properties:
//
// * `regex`: A regular expression that is used to extract parameters from paths
//   that reached this accepting state.
// * `handlers`: Information on how to convert the list of captures into calls
//   to registered handlers with the specified parameters.
// * `types`: How many static, dynamic, or star segments in this route. Used to
//   decide which route to use if multiple registered routes match a path.
//
// Currently, State is implemented naively by looping over `nextStates` and
// comparing a character specification against a character. A more efficient
// implementation would use a hash of keys pointing at one or more next states.

export class State implements IState {
    charSpec: ICharacterSpecification;
    nextStates: State[];
    constructor(charSpec?: ICharacterSpecification) {
        this.charSpec = charSpec;
        this.nextStates = [];
    }

    get(charSpec: ICharacterSpecification): State {
        for (let child of this.nextStates) {
            var isEqual = child.charSpec.validChars === charSpec.validChars &&
                child.charSpec.invalidChars === charSpec.invalidChars;

            if (isEqual) {
                return child;
            }
        }
    }

    put(charSpec: ICharacterSpecification): State {
        var state = this.get(charSpec);

        // If the character specification already exists in a child of the current
        // state, just return that state.
        if (state) {
            return state;
        }

        // Make a new state for the character spec
        state = new State(charSpec);

        //


unc",

        FT_Pointer.p("data_pointer"),

        nativeType = "SVG_Lib_Free_Func"
    )
}

val SVG_Lib_Render_Func = Module.FREETYPE.callback {
    FT_Error(
        "SVG_Lib_Render_Func",

        FT_GlyphSlot("slot"),
        FT_Pointer.p("data_pointer"),

        nativeType = "SVG_Lib_Render_Func"
    )
}

val SVG_Lib_Preset_Slot_Func = Module.FREETYPE.callback {
    FT_Error(
        "SVG_Lib_Preset_Slot_Func",

        FT_GlyphSlot("slot"),
        FT_Bool("cache"),
        FT_Pointer.p("state"),

        nativeType = "SVG_Lib_Preset_Slot_Func"
    )
}

val SVG_RendererHooks = struct(Module.FREETYPE, "SVG_RendererHooks") {
    SVG_Lib_Init_Func("init_svg")
    SVG_Lib_Free_Func("free_svg")
    SVG_Lib_Render_Func("render_svg")
    SVG_Lib_Preset_Slot_Func("preset_slot")
}

val FT_SVG_DocumentRec = struct(Module.FREETYPE, "FT_SVG_Document", nativeName = "FT_SVG_DocumentRec", mutable = false) {
    FT_Byte.p("svg_document")
    AutoSize("svg_document")..FT_ULong("svg_document_length")
    FT_Size_Metrics("metrics")
    FT_UShort("units_per_EM")
    FT_UShort("start_glyph_id")
    FT_UShort("end_glyph_id")
    FT_Matrix("transform")
    FT_Vector("delta")
}
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 */
package opengl.templates

import org.lwjgl.generator.*
import opengl.*

val NVX_gpu_multicast2 = "NVXGpuMulticast2".nativeClassGL("NVX_gpu_multicast2", postfix = NVX) {
    GLuint(
        "AsyncCopyImageSubDataNVX",

        AutoSize("waitSemaphoreArray", "waitValueArray")..GLsizei("waitSemaphoreCount"),
        GLuint.const.p("waitSemaphoreArray"),
        GLuint64.const.p("waitValueArray"),
        GLuint("srcGpu"),
        GLbitfield("dstGpuMask"),
        GLuint("srcName"),
        GLenum("srcTarget"),
        GLint("srcLevel"),
        GLint("srcX"),
        GLint("srcY"),
        GLint("srcZ"),
        GLuint("dstName"),
        GLenum("dstTarget"),
        GLint("dstLevel"),
        GLint("dstX"),
        GLint("dstY"),
        GLint("dstZ"),
        GLsizei("srcWidth"),
        GLsizei("srcHeight"),
        GLsizei("srcDepth"),
        AutoSize("signalSemaphoreArray", "signalValueArray")..GLsizei("signalSemaphoreCount"),
        GLuint.const.p("signalSemaphoreArray"),
        GLuint64.const.p("signalValueArray")
    )

    GLsync(
        "AsyncCopyBufferSubDataNVX",

        AutoSize("waitSemaphoreArray", "fenceValueArray")..GLsizei("waitSemaphoreCount"),
        GLuint.const.p("waitSemaphoreArray"),
        GLuint64.const.p("fenceValueArray"),
        GLuint("readGpu"),
        GLbitfield("writeGpuMask"),
        GLuint("readBuffer"),
        GLuint("writeBuffer"),
        GLintptr("readOffset"),
        GLintptr("writeOffset"),
        GLsizeiptr("size"),
        AutoSize("signalSemaphoreArray", "signalValue


x0
	mov     r2, r4
	mov     r5, r0
	blx     Call_FillMemWithValue
	mov     r0, #0x0
	mov     r1, r0
	bl      SetBrightnessWithValue
	mov     r0, #0x1
	mov     r1, #0x0
	bl      SetBrightnessWithValue
	mov     r0, r5
	pop     {r4-r6,pc}
@ 0x22376fc

.thumb
Function_22376fc: @ 22376fc :thumb
	push    {r4-r7,lr}
	add     sp, #-0x1c
	ldr     r5, [pc, #0x7c] @ 0x2237780, (=Unknown_223daac)
	mov     r6, r3
	mov     r7, r0
	mov     r4, r1
	ldmia   r5!, {r0,r1}
	add     r3, sp, #0x0
	stmia   r3!, {r0,r1}
	ldmia   r5!, {r0,r1}
	stmia   r3!, {r0,r1}
	ldmia   r5!, {r0,r1}
	stmia   r3!, {r0,r1}
	ldr     r0, [r5, #0x0]
	cmp     r2, #0x4
	str     r0, [r3, #0x0]
	add     r0, sp, #0x0
	strb    r2, [r0, #0x10]
	bhi     branch_2237756
	add     r0, r2, r2
	add     r0, pc
	ldrh    r0, [r0, #0x6]
	lsl     r0, r0, #16
	asr     r0, r0, #16
	add     pc, r0
@ 0x223772e

Jumppoints_223772e:
.hword branch_2237756 - Jumppoints_223772e - 2
.hword branch_2237738 - Jumppoints_223772e - 2
.hword branch_2237740 - Jumppoints_223772e - 2
.hword branch_2237748 - Jumppoints_223772e - 2
.hword branch_2237750 - Jumppoints_223772e - 2
.thumb
branch_2237738: @ 2237738 :thumb
	mov     r0, #0x2
	lsl     r0, r0, #10
	str     r0, [sp, #0x8]
	b       branch_2237756

branch_2237740: @ 2237740 :thumb
	mov     r0, #0x1
	lsl     r0, r0, #12
	str     r0, [sp, #0x8]
	b       branch_2237756

branch_2237748: @ 2237748 :thumb
	mov     r0, #0x1
	lsl     r0, r0, #12
	str     r0, [sp, #0x8]
	b       branch_2237756

branch_2237750: @ 2237750 :thumb
	mov     r0, #0x2
	lsl     r0, r0, #12
	str     r0, [sp, #0x8]
branch_2237756: @ 2237756 :thumb
	lsr     r1, r6, #11
	add     r0, sp, #0x0
	strb    r1, [r0, #0x12]
	ldr     r1, [sp, #0x30]
	add     r2, sp, #0x0
	lsr     r1, r1, #14
	strb    r1, [r0, #0x13]
	lsl     r1, r4, #24
	mov     r0, r7
	lsr     r1,


   "Analyze market trends and generate strategic recommendations",
    user_id="strategy-team",
    template_name="market_analysis",
    labels={
        "workflow": "supervisor",  # Route to supervisor for complex analysis
        "priority": "high",
    },
)

print(f"✓ Task with template and supervisor workflow")
print(f"  Task ID: {handle5.task_id}")
print(f"  Template: market_analysis")
print(f"  Workflow: supervisor (via labels)")
print()

result5 = handle5.result(timeout=120)
print(f"Result: {result5[:200]}..." if len(result5) > 200 else f"Result: {result5}")

client.close()
print("\n✓ Template examples completed!")
print()
print("Templates provide structured, reusable task patterns that can:")
print("  • Enforce consistent output formats")
print("  • Pre-configure tool selections and parameters")
print("  • Support versioning for backward compatibility")
print("  • Enable template-only mode for deterministic execution")
print("  • Combine with workflow routing for complex scenarios")


vo, il veicolo cambia lato dopo ogni svolta.
È un po' difficile da capire, quindi diamo un'occhiata a due esempi.

![Image](../assets/images/regularchange_0_0_1020_765.png)

Se il cambio corsia è disattivato, il veicolo rimane sullo stesso lato per tutto il percorso da cui è partito.
Se è partito dalla corsia più a sinistra, rimarrà sempre nella corsia più a sinistra. Questo evita conflitti con gli altri conducenti,
ma i veicoli all'interno della curva (quelli più a sinistra per le curve a sinistra,
quelli più a destra per le curve a destra) dovranno fare curve più strette mentre proseguono sulla corsia adiacente.

![Image](../assets/images/symetricchange_0_0_1020_765.png)

Se è attivo il cambio corsia, ad esempio per due veicoli, il veicolo A a sinistra e il veicolo B a destra, dopo la svolta le corsie vengono cambiate.
Ciò significa che A è quindi sulla destra e B è quindi sulla sinistra.
Il vantaggio è che tutti i veicoli hanno la stessa larghezza di svolta e quindi la stessa distanza da percorrere.
Per le mietitrebbie questa impostazione è importante, poiché assicura che il tubo resti fuori dal frutto e non lo raggiunga in un'altra corsia.
Lo svantaggio è che i veicoli hanno la possibilità di scontrarsi tra loro quando guidano l'uno verso l'altro su corsie vicine.

Se dai un'occhiata all'ordine delle corsie, da sinistra a destra, sarà chiaro:
Senza cambio simmetrico: sinistra, destra, sinistra, destra - è quasi come saltare una corsia.
Con cambio simmetrico: sinistra, destra, destra, sinistra - da sinistra a destra, una corsia dopo l'altra.
Nell'esempio con la mietitrebbia significa che nessuna mietitrebbia avrà frutti a sinistra e a destra della sua corsia.

# Nozioni di base sul generatore di corsi

Il generatore di percorsi di Courseplay è uno strumento sofisticato in grado di generare percorsi di lavoro sul campo personalizzati per ogni possibile lavoro.
Ha molte impostazioni e potrebbe volerci del tempo per familiarizzarci. Se sei nuovo di Courseplay, dovresti
probabilmente iniziare a giocare prima con il numero di promontori e poi avventurarti nelle impostazioni più avanzate.
Dopo aver modificato un parametro, premi Genera per vedere quale impatto ha l'impostazione. Il modo migliore per esplorare tutte le possibilità
offerte dal generatore è sperimentarlo.

Nozioni di base:
I primi valori che vedi qui sono davvero fondamentali.
- Larghezza di lavoro: Courseplay rileva automaticamente la larghezza di lavoro per la maggior parte degli strumenti, quindi non dovrai preoccuparti di questo,
ma se il rilevamento automatico fallisce, puoi impostarlo manualmente. Questa impostazione ha un impatto sul percorso complessivo.
- Margine campo: i valori positivi riducono la dimensione del campo per aggiungere un buffer attorno all'area lavorata nel caso in cui ci siano ostacoli vicino al bordo del campo.
I valori negativi ingrandiscono l'area lavorata oltre il bordo del campo per coprire i bordi del campo che non sono perf


 catch (Exception ex) {
            Object[] params = {name};
            throw new EntitlementException(204, params, ex);
        }
    }

    /**
     * Attempts to find a legacy policy with the given policy name. As a legacy policy with multiple rules will be
     * translated into multiple Privilege objects named {@code policy1_rule1}, we may not be able to find the legacy
     * policy with the same name. In this case, we repeatedly strip off {@code _XXX} suffixes from the policy name to
     * try to find the matching legacy policy. If we still cannot find such a policy, then we return {@code null}.
     *
     * @param adminToken the SSOToken to use when querying to see if a policy exists.
     * @param realm the realm in which the policy exists.
     * @param policyName the initial name of the policy.
     * @return the DN of the matching legacy policy, or {@code null} if no match was found.
     */
    private String findLegacyPolicyDn(SSOToken adminToken, String realm, String policyName) {
        String dn = getPolicyDistinguishedName(realm, policyName);
        int idx = policyName.length();
        while (!SMSEntry.checkIfEntryExists(dn, adminToken)) {
            debug("Unable to find policy with name %s using DN %s", policyName, dn);
            idx = policyName.lastIndexOf('_', idx-1);
            if (idx >= 0) {
                dn = getPolicyDistinguishedName(realm, policyName.substring(0, idx));
            } else {
                return null;
            }
        }
        return dn;
    }

    private static void debug(final String format, final Object...args) {
        if (PrivilegeManager.debug.messageEnabled()) {
            PrivilegeManager.debug.message(String.format(Locale.US, "OpenSSOPolicyDataStore: " + format, args));
        }
    }

    public ReferralPrivilege getReferral(
        Subject adminSubject,
        String realm,
        String name
    ) throws EntitlementException {
        SSOToken adminToken =
            (adminSubject == PrivilegeManager.superAdminSubject) ?
                dsameUserToken : SubjectUtils.getSSOToken(adminSubject);

        if (adminToken == null) {
            Object[] params = {name};
            throw new EntitlementException(262, params);
        }

        String dn = getPolicyDistinguishedName(realm, name);

        if (!SMSEntry.checkIfEntryExists(dn, adminToken)) {
            Object[] params = {name};
            throw new EntitlementException(263, params);
        }
        try {
            SMSEntry s = new SMSEntry(adminToken, dn);
            Map<String, Set<String>> map = s.getAttributes();
            Set<String> set = map.get(SMSEntry.ATTR_KEYVAL);
            String xml = set.iterator().next();
            if (xml.startsWith(POLICY_XML)) {
                xml = xml.substring(POLICY_XML.length() +1);
            }
            Set<IPrivilege> privileges = PrivilegeUtils.policyToPrivileges(
                createPolicy(adminToken, realm, xml));
            return (ReferralPrivilege)privileges.iterator().next();
        } catch (SSOException ex) {
            Object[] params = {name};
            throw new EntitlementException(204, params, ex);
        } catch (SMSException ex) {
            Object[] params = {name};
            throw new EntitlementException(204, params, ex);
        } catch (Exception ex) {
            Object[] params = {name};
            throw new EntitlementException(204, params, ex);
        }
    }

    private Object createPolicy(SSOToken adminToken, String realm, String xml)
        throws Exception,
        SSOException, PolicyException {
        Object policy = null;

        if (xml.startsWith("xmlpolicy=")) {
            xml = xml.subst


), "$TcpTimerReschedule$tcpip.sys", 0xa404, 0x0, true, 0xbe66862e2c79fbf8)
#define _s986(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTimerStarvationCallbackObject$tcpip.sys", 0x207990, 0x0, true, 0xc8749b6976acdc5d)
#define _s987(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTimerUpdateNextExpirationTick$tcpip.sys", 0xa268, 0x0, true, 0x22f2b6e911816260)
#define _s988(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTimerUpdateOnDemandQuotas$tcpip.sys", 0x10cfe4, 0x0, true, 0x9c0fc0025c826373)
#define _s989(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionCloseEndpoint$tcpip.sys", 0x75ab0, 0x0, true, 0x5705bcc131f76b27)
#define _s990(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionCloseEndpointCalloutRoutine$tcpip.sys", 0x5e290, 0x0, true, 0x4f85a4af42def39)
#define _s991(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionDisconnect$tcpip.sys", 0x7b8a0, 0x0, true, 0x4fb62a4f31d69f6f)
#define _s992(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionDisconnectCalloutRoutine$tcpip.sys", 0x51b20, 0x0, true, 0x71d109c2f794e453)
#define _s993(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionIoControlEndpoint$tcpip.sys", 0x60e70, 0x0, true, 0x3ae2f6dcd84d53ff)
#define _s994(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionReceive$tcpip.sys", 0x52330, 0x0, true, 0x188160d8fce09c51)
#define _s995(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionSend$tcpip.sys", 0x723a0, 0x0, true, 0x693a85128a668271)
#define _s996(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlConnectionSendCalloutRoutine$tcpip.sys", 0x52bd0, 0x0, true, 0xb9dff41eb20822e9)
#define _s997(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlEndpointCloseEndpoint$tcpip.sys", 0x5cba0, 0x0, true, 0x23f2cf06e1e333bd)
#define _s998(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlEndpointIoControlEndpoint$tcpip.sys", 0x7a520, 0x0, true, 0xc45ec6d4ef2e0735)
#define _s999(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$TcpTlEndpointIoControlEndpointCalloutRoutine$tcpip.sys", 0x63700, 0x0, true, 0xed5727a3ef22d1a2)
#defi


 return o.attachData(p._data);
      }

      //============================================================
      // <T>追加一个矩阵。</T>
      //
      // @method
      // @param p:value:SMatrix3d 矩阵
      //============================================================
      public append(p) {
         this.appendData(p._data);
      }

      //============================================================
      // <T>强制更新数据。</T>
      //
      // @method
      //============================================================
      public updateForce() {
         var o = this;
         var d = o._data;
         var rsx = Math.sin(o.rx);
         var rcx = Math.cos(o.rx);
         var rsy = Math.sin(o.ry);
         var rcy = Math.cos(o.ry);
         var rsz = Math.sin(o.rz);
         var rcz = Math.cos(o.rz);
         d[0] = rcy * rcz * o.sx;
         d[1] = rcy * rsz * o.sx;
         d[2] = -rsy * o.sx;
         d[3] = 0;
         d[4] = (rsx * rsy * rcz - rcx * rsz) * o.sy;
         d[5] = (rsx * rsy * rsz + rcx * rcz) * o.sy;
         d[6] = rsx * rcy * o.sy;
         d[7] = 0;
         d[8] = (rcx * rsy * rcz + rsx * rsz) * o.sz;
         d[9] = (rcx * rsy * rsz - rsx * rcz) * o.sz;
         d[10] = rcx * rcy * o.sz;
         d[11] = 0;
         d[12] = o.tx;
         d[13] = o.ty;
         d[14] = o.tz;
         d[15] = 1;
      }

      //============================================================
      // <T>更新数据。</T>
      //
      // @method
      //============================================================
      public update() {
         var o = this;
         if (o._dirty) {
            o.updateForce();
            o._dirty = false;
         }
      }

      //============================================================
      // <T>合并数据。</T>
      //
      // @method
      //============================================================
      public merge(bm, am) {
         var o = this;
         o.tx = bm.tx + am.tx;
         o.ty = bm.ty + am.ty;
         o.tz = bm.tz + am.tz;
         o.rx = bm.rx + am.rx;
         o.ry = bm.ry + am.ry;
         o.rz = bm.rz + am.rz;
         o.sx = bm.sx * am.sx;
         o.sy = bm.sy * am.sy;
         o.sz = bm.sz * am.sz;
         o.updateForce();
      }

      /*
      public my_create() {
         var out = new Float32Array(16);
         out[0] = 1;
         out[1] = 0;
         out[2] = 0;
         out[3] = 0;
         out[4] = 0;
         out[5] = 1;
         out[6] = 0;
         out[7] = 0;
         out[8] = 0;
         out[9] = 0;
         out[10] = 1;
         out[11] = 0;
         out[12] = 0;
         out[13] = 0;
         out[14] = 0;
         out[15] = 1;
         return out;
      };
      public my_normalize(out, mat) {
         var m44 = mat[15]
         // Cannot normalize.
         if (m44 === 0)
            return false
         var scale = 1 / m44
         for (var i = 0; i < 16; i++)
            out[i] = mat[i


ED)
        assertThat(InternalAppEventsLogger.getPushNotificationsRegistrationId())
            .isEqualTo(mockNotificationId)
    }

    @Test
    fun testAppEventsKillSwitchDisabled() {
        var appEventQueueCalledTimes = 0
        whenever(AppEventQueue.add(any(), any())).thenAnswer {
            appEventQueueCalledTimes++
            Unit
        }
        mockStatic(FetchedAppGateKeepersManager::class.java)
        PowerMockito.`when`(
            FetchedAppGateKeepersManager.getGateKeeperForKey(
                eq(APP_EVENTS_KILLSWITCH), any(), any()
            )
        )
            .thenReturn(false)
        logger.logEvent(mockEventName, mockValueToSum, mockParams, true, null)
        logger.logEventImplicitly(mockEventName, mockDecimal, mockCurrency, mockParams)
        logger.logSdkEvent(mockEventName, mockValueToSum, mockParams)
        logger.logPurchase(mockDecimal, mockCurrency, mockParams, true)
        logger.logPurchaseImplicitly(mockDecimal, mockCurrency, mockParams)
        logger.logPushNotificationOpen(mockParams, null)
        logger.logProductItem(
            "F40CEE4E-471E-45DB-8541-1526043F4B21",
            AppEventsLogger.ProductAvailability.IN_STOCK,
            AppEventsLogger.ProductCondition.NEW,
            "description",
            "https://www.sample.com",
            "https://www.link.com",
            "title",
            mockDecimal,
            mockCurrency,
            "GTIN",
            "MPN",
            "BRAND",
            mockParams
        )

        assertThat(appEventQueueCalledTimes).isEqualTo(5)
    }

    @Test
    fun testAppEventsKillSwitchEnabled() {
        var appEventQueueCalledTimes = 0
        whenever(AppEventQueue.add(any(), any())).thenAnswer {
            appEventQueueCalledTimes++
            Unit
        }
        mockStatic(FetchedAppGateKeepersManager::class.java)
        PowerMockito.`when`(
            FetchedAppGateKeepersManager.getGateKeeperForKey(
                eq(APP_EVENTS_KILLSWITCH), any(), any()
            )
        )
            .thenReturn(true)
        val logger = AppEventsLoggerImpl(RuntimeEnvironment.application, mockAppID, null)
        logger.logEvent(mockEventName, mockValueToSum, mockParams, true, null)
        logger.logEventImplicitly(mockEventName, mockDecimal, mockCurrency, mockParams)
        logger.logSdkEvent(mockEventName, mockValueToSum, mockParams)
        logger.logPurchase(mockDecimal, mockCurrency, mockParams, true)
        logger.logPurchaseImplicitly(mockDecimal, mockCurrency, mockParams)
        logger.logPushNotificationOpen(mockParams, null)
        logger.logProductItem(
            "F40CEE4E-471E-45DB-8541-1526043F4B21",
            AppEventsLogger.ProductAvailability.IN_STOCK,
            AppEventsLogger.ProductCondition.NEW,
            "description",
            "https://www.sample.com",
            "https://www.link.com",
            "title",
            mockDecimal,
            mockCurrency,
            "GTIN",
            "MPN",
            "BRAND",
            mockParams
        )
        assertThat(appEventQueueCalledTimes).isEqualTo(0)
    }

    @Test
    fun `test augmentWebView will run on Android api 17+`() {
        Whitebox.setInternalState(Build.VERSION::class.java, "RELEASE", "4.2.0")
        val mockWebView = mock<WebView>()
        AppEventsLoggerImpl.augmentWebView(mockWebView, RuntimeEnvironment.application)
        verify(mockWebView).addJavascriptInterface(any(), any())
    }

    @Test
    fun `test augmentWebView will not run on And


ition():sendMagicEffect(CONST_ME_TELEPORT)
		player:say('Someone is fighting against the boss! You need wait awhile.', TALKTYPE_MONSTER_SAY)
		return true
	end
	clearRoom(teleport.bossPos, teleport.range, teleport.range, fromPosition)
	local monster = Game.createMonster(teleport.bossName, teleport.bossPos, true, true)
	if not monster then
		return true
	end

	position:sendMagicEffect(CONST_ME_TELEPORT)
	player:teleportTo(teleport.newPos)
	player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
	player:say(
		'You have ten minutes to kill and loot this boss. \z
		Otherwise you will lose that chance and will be kicked out.', TALKTYPE_MONSTER_SAY)
	addEvent(clearBossRoom, 60 * 10 * 1000, player.uid, monster.uid, teleport.bossPos, teleport.range, teleport.range, fromPosition)
	player:setStorageValue(teleport.timer, os.time() + 2 * 3600)
	return true
end

kroazurEntrance:type("stepin")
kroazurEntrance:aid(24900)
kroazurEntrance:register()


CloudLoginUsers_hinemosUser_scope", CloudLoginUserEntity.class);
		query.setParameter("cloudScopeId", cloudScopeId);
		query.setParameter("userId", hinemosUserId);
		query.setParameter("ADMINISTRATORS", RoleIdConstant.ADMINISTRATORS);
		query.setParameter("accountType", CloudLoginUserEntity.CloudUserType.account);
		return query.getResultList();
	}

	@Override
	public CloudLoginUserEntity getPrimaryCloudLoginUser(String cloudScopeId, String hinemosUserId) throws CloudManagerException {
		try {
			HinemosEntityManager em = Session.current().getEntityManager();
			TypedQuery<CloudLoginUserEntity> query = em.createNamedQuery("findPrimaryCloudLoginUser", CloudLoginUserEntity.class);
			query.setParameter("cloudScopeId", cloudScopeId);
			query.setParameter("userId", hinemosUserId);
			query.setParameter("ADMINISTRATORS", RoleIdConstant.ADMINISTRATORS);
			query.setParameter("accountType", CloudLoginUserEntity.CloudUserType.account);

			return query.getSingleResult();
		} catch (NoResultException e) {
			throw ErrorCode.LOGINUSER_NOT_FOUND.cloudManagerFault(cloudScopeId, hinemosUserId);
		}
	}

	@Override
	public CloudLoginUserEntity getPrimaryCloudLoginUserByCurrent(String cloudScopeId) throws CloudManagerException {
		return getPrimaryCloudLoginUser(cloudScopeId, Session.current().getHinemosCredential().getUserId());
	}

	@Override
	public List<String> getCloudLoginUserPriority(String cloudScopeId) {
		HinemosEntityManager em = Session.current().getEntityManager();
		TypedQuery<CloudLoginUserEntity> query = em.createNamedQuery("getCloudLoginUserPriority", CloudLoginUserEntity.class);
		query.setParameter("cloudScopeId", cloudScopeId);
		query.setParameter("accountType", CloudLoginUserEntity.CloudUserType.account);

		List<String> users = new ArrayList<>();
		for (CloudLoginUserEntity user: query.getResultList()) {
			users.add(user.getLoginUserId());
		}
		return users;
	}

	@Override
	public void modifyCloudLoginUserPriority(String cloudScopeId, List<String> cloudLoginUserIds) throws CloudManagerException {
		HinemosEntityManager em = Session.current().getEntityManager();
		TypedQuery<CloudLoginUserEntity> query = em.createNamedQuery("getCloudLoginUserPriority", CloudLoginUserEntity.class);
		query.setParameter("cloudScopeId", cloudScopeId);
		query.setParameter("accountType", CloudLoginUserEntity.CloudUserType.account);

		List<CloudLoginUserEntity> result = new ArrayList<>(query.getResultList());
		if (result.size() != cloudLoginUserIds.size()) {
			throw ErrorCode.LOGINUSER_NUM_NOT_MATCH.cloudManagerFault(cloudLoginUserIds.toString());
		}

		for (int i = 0; i < cloudLoginUserIds.size(); ++i) {
			Iterator<CloudLoginUserEntity> iter = result.iterator();
			int before = result.size();
			while (iter.hasNext()) {
				CloudLoginUserEntity user = iter.next();
				if (user.getLoginUserId().equals(cloudLoginUserIds.get(i))) {
					user.setPriority(i + 1);
					iter.remove();
					break;
				}
			}
			if (before == result.size()) {
				throw ErrorCode.LOGINUSER_USER_NOT_INCLUDE.cloudManagerFault(cloudLoginUserIds.toString());
			}
		}
		if (!result.isEmpty()) {
			throw ErrorCode.LOGINUSER_USER_NOT_INCLUDE.cloudManagerFault(cloudLoginUserIds.toString());
		}
	}
}
/*
 * Copyright (c) 2018 NTT DATA INTELLILINK Corporation. All rights reserved.
 *
 * Hinemos (http://www.hinemos.info/)
 *
 * See the LICENSE file for licensing information.
 */
package com.clustercontrol.xcloud.validation;

import java.lang


from abc import ABC, abstractmethod
from typing import Any

# ----------------->> Classe Entity <<-----------------
class User:
    def __init__(self) -> None:
        self._nome: str | None = None
        self._idade: int | None = None
        self._phnes: list[str] | Any = []

# ----------------->> Classe Abstrata | Interface <<-----------------
class IUserBuilder(ABC):
    @property
    @abstractmethod
    def result(self) -> User: ... # Essa propriedade vai acessar todas as da Entity

    @abstractmethod
    def add_name(self, name: str): ... # Métodos set

    @abstractmethod
    def add_age(self, idade: int): ...

    @abstractmethod
    def add_phone(self, phone_number: str): ...

# ----------------->> Classe Concreta <<-----------------
class UserBuilder(IUserBuilder):
    def __init__(self) -> None:
        self.reset()

    def reset(self):
        self._result = User()

    @property
    def result(self):
        return_data = self._result
        self.reset()
        return return_data

    def add_name(self, name: str):
        self._result._nome = name

    def add_age(self, idade: int):
        self._result._idade = idade

    def add_phone(self, phone_number: str):
        self._result._phnes.append(phone_number)

# ----------------->> Classe Construtora <<-----------------
class UserDirector:
    def __init__(self, builder: UserBuilder) -> None:
        self._builder = builder

    def with_name_and_age(self, name: str, age: int):
        self._builder.add_name(name= name)
        self._builder.add_age(idade= age)
        return self._builder.result

# ----------------->> Como Usar <<-----------------
if __name__ == '__main__':
    user_builder = UserBuilder()
    user_director = UserDirector(user_builder)

    user1 = user_director.with_name_and_age('Wanderley', 34)


0xCC008000@ha
/* 803D0B34 003CD934  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 803D0B38 003CD938  38 00 00 30 */	li r0, 0x30
/* 803D0B3C 003CD93C  38 60 00 10 */	li r3, 0x10
/* 803D0B40 003CD940  98 05 80 00 */	stb r0, -0x8000(r5)
/* 803D0B44 003CD944  38 00 10 18 */	li r0, 0x1018
/* 803D0B48 003CD948  80 84 00 80 */	lwz r4, 0x80(r4)
/* 803D0B4C 003CD94C  90 85 80 00 */	stw r4, -0x8000(r5)
/* 803D0B50 003CD950  98 65 80 00 */	stb r3, -0x8000(r5)
/* 803D0B54 003CD954  90 05 80 00 */	stw r0, -0x8000(r5)
/* 803D0B58 003CD958  90 85 80 00 */	stw r4, -0x8000(r5)
/* 803D0B5C 003CD95C  48 00 00 38 */	b lbl_803D0B94
lbl_803D0B60:
/* 803D0B60 003CD960  38 00 00 08 */	li r0, 8
/* 803D0B64 003CD964  80 82 F0 70 */	lwz r4, __GXContexts@sda21(r2)
/* 803D0B68 003CD968  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 803D0B6C 003CD96C  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 803D0B70 003CD970  38 00 00 40 */	li r0, 0x40
/* 803D0B74 003CD974  38 60 00 10 */	li r3, 0x10
/* 803D0B78 003CD978  98 05 80 00 */	stb r0, -0x8000(r5)
/* 803D0B7C 003CD97C  38 00 10 19 */	li r0, 0x1019
/* 803D0B80 003CD980  80 84 00 84 */	lwz r4, 0x84(r4)
/* 803D0B84 003CD984  90 85 80 00 */	stw r4, -0x8000(r5)
/* 803D0B88 003CD988  98 65 80 00 */	stb r3, -0x8000(r5)
/* 803D0B8C 003CD98C  90 05 80 00 */	stw r0, -0x8000(r5)
/* 803D0B90 003CD990  90 85 80 00 */	stw r4, -0x8000(r5)
lbl_803D0B94:
/* 803D0B94 003CD994  80 62 F0 70 */	lwz r3, __GXContexts@sda21(r2)
/* 803D0B98 003CD998  38 00 00 01 */	li r0, 1
/* 803D0B9C 003CD99C  B0 03 00 02 */	sth r0, 2(r3)
/* 803D0BA0 003CD9A0  4E 80 00 20 */	blr

.global func_803D0BA4
func_803D0BA4:
/* 803D0BA4 003CD9A4  80 A2 F0 70 */	lwz r5, __GXContexts@sda21(r2)
/* 803D0BA8 003CD9A8  80 05 04 E4 */	lwz r0, 0x4e4(r5)
/* 803


Point(1210, 3651, 0), "Kebos Swamp mine", "Kebos Swamp mine", false),
	CANIFIS__BANK(new WorldPoint(3503, 3483, 0), "Canifis bank", "Canifis bank", false),
	LLETYA(new WorldPoint(2318, 3268, 0), "Lletya", "Lletya", false),
	HOSIDIUS_MINE(new WorldPoint(1781, 3491, 0), "Hosidius mine", "Hosidius mine", false),
	PORT_PISCARILIUS_MINE(new WorldPoint(1765, 3707, 0), "Port Piscarilius mine in Kourend", "Piscarilius mine", false),
	LOVAKENGJ__BANK(new WorldPoint(1534, 3756, 0), "South Lovakengj bank", "S Lovakengj bank", false),
	ABANDONED_MINE(new WorldPoint(3452, 3240, 0), "Abandoned Mine west of Burgh", "Abandoned Mine", false),
	DESERT_QUARRY(new WorldPoint(3176, 2909, 0), "Desert Quarry mine", "Desert Quarry mine", false),
	NORTH_CRANDOR_MINE(new WorldPoint(2837, 3294, 0), "North Crandor", "North Crandor", false),
	NORTH_BRIMHAVEN_MINE(new WorldPoint(2733, 3220, 0), "Brimhaven northwest gold mine", "Brimhaven gold mine", false),
	LOVAKITE_MINE(new WorldPoint(1437, 3839, 0), "Lovakite mine", "Lovakite mine", false),
	ISLE_OF_SOULS_MINE(new WorldPoint(2201, 2791, 0), "Soul Wars south mine", "Soul Wars south mine", false),
	SOUTH_CRANDOR_MINE(new WorldPoint(2821, 3240, 0), "South Crandor", "South Crandor", false),
	WEST_FALADOR_MINE(new WorldPoint(2908, 3354, 0), "West Falador mine", "West Falador mine", false),
	DAEYALT_ESSENCE_MINE_ENTRANCE(new WorldPoint(3635, 3338, 0), "Darkmeyer ess. mine entrance", "Darkmeyer mine", false),
	VER_SINHAZA__BANK(new WorldPoint(3560, 3212, 0), "Theatre of Blood bank", "ToB bank", false),
	MISCELLANIA_MINE(new WorldPoint(2530, 3887, 0), "Miscellania mine (cip fairy ring)", "Miscellania mine", false),
	SOUTH_WEST_WILDERNESS_MINE(new WorldPoint(3019, 3593, 0), "Skeleton mine (lvl 10 Wildy)", "Skeleton mine", true),
	MOS_LEHARMLESS(new WorldPoint(3683, 2969, 0), "Mos Le'Harmless west bank", "Mos Le'Harmless", false),
	LUNAR_ISLE_MINE_ENTRANCE(new WorldPoint(2140, 3940, 0), "Lunar Isle mine entrance", "Lunar Isle", false),
	MINING_GUILD_ENTRANCE(new WorldPoint(3030, 3347, 0), "East Falador bank", "E Falador bank", false),
	VARLAMORE_SOUTH_EAST_MINE(new WorldPoint(1742, 2957, 0), "Varlamore South East mine", "SE Varlamore mine", false),
	VARLAMORE_COLOSSEUM_ENTRANCE_BANK(new WorldPoint(1771, 3107, 0), "Varlamore colosseum entrance bank", "Colosseum entrance", false),
	RALOS_RISE_MINING_SITE(new WorldPoint(1486, 3093, 0), "Mine northwest of hunter guild", "Ralos Rise Mining Site", false),
	PIRATES_HIDEOUT_M


 de.christinecoenen.code.zapp.R
import de.christinecoenen.code.zapp.app.mediathek.controller.downloads.IDownloadController
import de.christinecoenen.code.zapp.models.shows.DownloadStatus
import de.christinecoenen.code.zapp.models.shows.MediathekShow
import de.christinecoenen.code.zapp.models.shows.Quality
import de.christinecoenen.code.zapp.repositories.MediathekRepository
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.onStart

@OptIn(ExperimentalCoroutinesApi::class)
class ShowMenuHelperViewModel(
	private val mediathekRepository: MediathekRepository,
	private val downloadController: IDownloadController
) : ViewModel() {

	private val defaultMapping = mapOf(
		R.id.menu_share to true,
		R.id.menu_start_download to true,
		R.id.menu_remove_download to false,
		R.id.menu_cancel_download to false,
		R.id.menu_mark_unwatched to false,
		R.id.menu_add_bookmark to true,
		R.id.menu_remove_bookmark to false
	)

	/**
	 * This will only keep up to date if anyone is consuming
	 * getMenuItemsVisibility.
	 */
	var lastMapping = defaultMapping
		private set

	fun getMenuItemsVisibility(show: MediathekShow): Flow<Map<Int, Boolean>> {
		return mediathekRepository
			.getPersistedShowByApiId(show.apiId)
			.mapLatest {
				lastMapping = mapOf(
					R.id.menu_share to true,
					R.id.menu_start_download to
						(it.downloadStatus in listOf(
							DownloadStatus.NONE,
							DownloadStatus.DELETED,
							DownloadStatus.CANCELLED,
							DownloadStatus.REMOVED,
						) && show.hasAnyDownloadQuality()),
					R.id.menu_remove_download to
						(it.downloadStatus in listOf(
							DownloadStatus.FAILED,
							DownloadStatus.COMPLETED,
						)),
					R.id.menu_cancel_download to
						(it.downloadStatus in listOf(
							DownloadStatus.QUEUED,
							DownloadStatus.DOWNLOADING,
							DownloadStatus.PAUSED,
						)),
					R.id.menu_mark_unwatched to (it.playbackPosition > 0),
					R.id.menu_add_bookmark to !it.isBookmarked,
					R.id.menu_remove_bookmark to it.isBookmarked
				)
				lastMapping
			}
			.onStart {
				// for when the show has not yet been persisted
				emit(defaultMapping.toMutableMap().apply {
					this[R.id.menu_start_download] = show.hasAnyDownloadQuality()
				})
			}
			.distinctUntilChanged()
	}

	suspend fun deleteDownload(show: MediathekShow) {
		mediathekRepository
			.getPersistedShowByApiId(show.apiId)
			.firstOrNull()
			?.let {
				downloadController.deleteDownload(it.id)
			}
	}

	suspend fun cancelDownload(show: MediathekShow) {
		mediathekRepository
			.getPersistedShowByApiId(show.apiId)
			.firstOrNull()
			?.let {
				downloadController.stopDownload(it.id)
			}
	}

	suspend fun markUnwatched(show: MediathekShow) {
		mediathekRepository.resetPlaybackPosition(show.apiId)
	}

	suspend fun bookmark(show: MediathekShow) {
		// we need to persist this first, because it might not yet be persisted!
		mediathekRepository.pers


7_BitDecoder (CALLBACK_FUNC *callback, void *auxdata, UINT bufsize) : InputBitStream(callback, auxdata, bufsize) {};

    uint x;  // Temporary value used for storing first 9 bits of code

    // Decode next element and return true if it's a literal
    uint is_literal (void)
    {
        x = InputBitStream::getbits(9);
        return (x < 256);
    }
    // Decode literal
    uint getchar (void)
    {
        return x;
    }
    // Decode length (should be called before getdist!)
    uint getlen (const uint MINLEN)
    {
        uint lcode = (x>>5)-8;
        uint lbits = lc.extra_bits(lcode);
        uint lbase = lc.base_value(lcode);
        return MINLEN + lbase + InputBitStream::getbits(lbits);
    }
    // Decode distance
    uint getdist (void)
    {
        uint dcode = x & 31;
        uint dbits = dc.extra_bits(dcode);
        uint dbase = dc.base_value(dcode);
        return dbase + InputBitStream::getbits(dbits);
    }
};

// LZ77 literals/matches generic coder ************************************************************

// Amount of "repeat previous distance", length and distance codes
const int REPDIST_CODES = 4;
const int DIST_CODES = elements(extra_dbits)+REPDIST_CODES;
const int LEN_CODES  = elements(extra_lbits2);
// First code after regular ones - End Of Block
const int EOB_CODE = 256 + LEN_CODES*DIST_CODES;
// Another code - copy char at repdist0 distance
const int REPCHAR = EOB_CODE + 1;
// One more code - repeat both length & distance
const int REPBOTH = EOB_CODE + 2;
// Total amount of codes, including 7 spare ones
const int CODES   = EOB_CODE + 10;

// It's the coder
template <class Coder>
struct LZ77_Coder : public Coder
{
#ifdef STAT
    int chars, matches, rep0s, lencnt[LEN_CODES], distcnt[DIST_CODES]; // Encoding statistics
    int cnt[LEN_CODES][DIST_CODES];
#endif
    int prevdist3, prevdist2, prevdist1, prevdist0;  // last distances encoded so far

    // Init and finish encoder
    LZ77_Coder (int coder, CALLBACK_FUNC *callback, void *auxdata, UINT chunk, UINT pad);
    void finish();

    void before_shift(BYTE *p) {}                // Called prior to shifting buffer contents to the beginning
    void after_shift (BYTE *p) {prevdist0=-1;}   // The same, after shift. We need to invalidate prevdist0 in order to avoid adressing data shifted out when checking for REPCHAR

    // Writes match/literal into buffer. Returns 0 - literal encoded, 1 - match encoded
    int encode (int len, byte *current, byte *match, const int MINLEN)
    {
        // Encode a literal if match is too short
        if ((len-=MINLEN) < 0)  {
            if (*current == current[-prevdist0-1] && prevdist0>=0)
                 Coder::encode (REPCHAR),  stat_only (rep0s++), debug (printf (" REPCHAR: \n"));
            else Coder::encode (*current), stat_only (chars++);
            return 0;
        }

        // It's a match
        stat_only (matches++);
        encode_match (len, current-match-1);
        return 1;
    }
    // Writes match into buffer
    void encode_match (int len, int dist)
    {
        // Find dist code, checking first for "repeat previous distance" cases
        uint dcode, dbits, dbase, x,


= "Bounty2"
____exports.Rune.Bounty3 = RUNE_BOUNTY_3 or 4
____exports.Rune[____exports.Rune.Bounty3] = "Bounty3"
____exports.Rune.Bounty4 = RUNE_BOUNTY_4 or 5
____exports.Rune[____exports.Rune.Bounty4] = "Bounty4"
____exports.Shop = Shop or ({})
____exports.Shop.Home = SHOP_HOME or 0
____exports.Shop[____exports.Shop.Home] = "Home"
____exports.Shop.Side = SHOP_SIDE or 1
____exports.Shop[____exports.Shop.Side] = "Side"
____exports.Shop.Secret = SHOP_SECRET or 2
____exports.Shop[____exports.Shop.Secret] = "Secret"
____exports.Shop.Side2 = SHOP_SIDE2 or 4
____exports.Shop[____exports.Shop.Side2] = "Side2"
____exports.Shop.Secret2 = SHOP_SECRET2 or 5
____exports.Shop[____exports.Shop.Secret2] = "Secret2"
____exports.AttributeType = AttributeType or ({})
____exports.AttributeType.Strength = ATTRIBUTE_STRENGTH or 0
____exports.AttributeType[____exports.AttributeType.Strength] = "Strength"
____exports.AttributeType.Agility = ATTRIBUTE_AGILITY or 1
____exports.AttributeType[____exports.AttributeType.Agility] = "Agility"
____exports.AttributeType.Intellect = ATTRIBUTE_INTELLECT or 2
____exports.AttributeType[____exports.AttributeType.Intellect] = "Intellect"
____exports.AttributeType.All = ATTRIBUTE_ALL or 3
____exports.AttributeType[____exports.AttributeType.All] = "All"
____exports.AttributeType.Max = ATTRIBUTE_MAX or 4
____exports.AttributeType[____exports.AttributeType.Max] = "Max"
____exports.AttributeType.Invalid = ATTRIBUTE_INVALID or -1
____exports.AttributeType[____exports.AttributeType.Invalid] = "Invalid"
____exports.GameState = GameState or ({})
____exports.GameState.Init = GAME_STATE_INIT or 0
____exports.GameState[____exports.GameState.Init] = "Init"
____exports.GameState.WaitForPlayersToLoad = GAME_STATE_WAIT_FOR_MAP_TO_LOAD or 1
____exports.GameState[____exports.GameState.WaitForPlayersToLoad] = "WaitForPlayersToLoad"
____exports.GameState.CustomGameSetup = GAME_STATE_CUSTOM_GAME_SETUP or 2
____exports.GameState[____exports.GameState.CustomGameSetup] = "CustomGameSetup"
____exports.GameState.HeroSelection = GAME_STATE_HERO_SELECTION or 3
____exports.GameState[____exports.GameState.HeroSelection] = "HeroSelection"
____exports.GameState.StrategyTime = GAME_STATE_STRATEGY_TIME or 4
____exports.GameState[____exports.GameState.StrategyTime] = "StrategyTime"
____exports.GameState.TeamShowcase = GAME_STATE_TEAM_SHOWCASE or 5
____exports.GameState[____exports.GameState.TeamShowcase] = "TeamShowcase"
____exports.GameState.WaitForMapToLoad = GAME_STATE_WAIT_FOR_MAP_TO_LOAD or 6
____exports.GameState[____exports.GameState.WaitForMapToLoad] = "WaitForMapToLoad"
____exports.GameState.PreGame = GAME_STATE_PRE_GAME or 7
____exports.GameState[____exports.GameState.PreGame] = "PreGame"
____exports.GameState.GameInProgress = GAME_STATE_GAME_IN_PROGRESS or 8
____exports.


-p:74.7039% 0.158278 39.94703;--s:72.5375% 0.177654 2.72034;--a:71.2947% 0.166678 299.844533;--n:26% 0.019 237.69;--nc:70% 0.019 237.69;--b1:22% 0.019 237.69;--b2:20% 0.019 237.69;--b3:18% 0.019 237.69;--bc:77.3835% 0.043586 245.096534;--in:85.5596% 0.085271 206.015183;--su:85.5609% 0.08586 144.77874;--wa:85.5695% 0.084806 74.427797;--er:85.5116% 0.07889 16.886379;--rounded-box:1.2rem;--rounded-btn:0.8rem;--rounded-badge:0.4rem;--tab-radius:0.7rem}:root:has(input.theme-controller[value=sunset]:checked){color-scheme:dark;--pc:14.9408% 0.031656 39.94703;--sc:14.5075% 0.035531 2.72034;--ac:14.2589% 0.033336 299.844533;--inc:17.1119% 0.017054 206.015183;--suc:17.1122% 0.017172 144.77874;--wac:17.1139% 0.016961 74.427797;--erc:17.1023% 0.015778 16.886379;--animation-btn:0.25s;--animation-input:.2s;--btn-focus-scale:0.95;--border-btn:1px;--tab-border:1px;--p:74.7039% 0.158278 39.94703;--s:72.5375% 0.177654 2.72034;--a:71.2947% 0.166678 299.844533;--n:26% 0.019 237.69;--nc:70% 0.019 237.69;--b1:22% 0.019 237.69;--b2:20% 0.019 237.69;--b3:18% 0.019 237.69;--bc:77.3835% 0.043586 245.096534;--in:85.5596% 0.085271 206.015183;--su:85.5609% 0.08586 144.77874;--wa:85.5695% 0.084806 74.427797;--er:85.5116% 0.07889 16.886379;--rounded-box:1.2rem;--rounded-btn:0.8rem;--rounded-badge:0.4rem;--tab-radius:0.7rem}*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}::after,::before{--tw-content:''}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{


GettextCatalog.GetString ("(Custom)");
			else
				return " " + GettextCatalog.GetString ("(Custom {0})", n);
		}

		protected virtual void OnEntryModeNameChanged (object sender, System.EventArgs e)
		{
			buttonOk.Sensitive = entryModeName.Text.Length > 0;
			n


tera Faucesombría",
		[688] = "Basilisco Morropiedra",
		[11068] = "Betty Quin",
		[696] = "Lanzahachas Machacacráneos",
		[11196] = "Tamborilero Rompelanzas",
		[11260] = "Campesino de Villanorte",
		[11324] = "Brujo Hoja Abrasadora",
		[11388] = "Portavoz Secacorteza",
		[11452] = "Pícaro Mala Hierba",
		[11516] = "Depositario Fauces de Madera",
		[724] = "Trogg Comepiedras fornido",
		[728] = "Bhag'thera",
		[732] = "Rondador múrloc",
		[736] = "Pantera",
		[740] = "Cría adolescente",
		[744] = "Horrocrusto verde",
		[752] = "Oráculo de marisma",
		[756] = "Pantera Machacacráneos",
		[760] = "Habitabosta Perdido",
		[764] = "Caminalodo",
		[768] = "Pantera sombría",
		[772] = "Tigresa de Tuercespina",
		[780] = "Místico Machacacráneos",
		[784] = "Maestro de bestias Machacacráneos",
		[796] = "Joshua",
		[800] = "Kyle",
		[804] = "Dana",
		[808] = "Grik'nir el Frío",
		[812] = "Alma Jainrose",
		[13116] = "Guía espiritual de la Alianza",
		[13180] = "Comandante del aire Jeztor",
		[828] = "Vigía Petras",
		[832] = "Ciclón desatado",
		[836] = "Durnan Cortapieles",
		[840] = "Vigía Backus",
		[844] = "Antonio Perelli",
		[848] = "Madison",
		[856] = "Raptor colazote joven",
		[864] = "Orco de Rocal",
		[868] = "Chamán de Rocal",
		[876] = "Protector Leick",
		[880] = "Erlan Yermestia",
		[888] = "Vigía Dodds",
		[892] = "Capataz Puñastilla",
		[896] = "Veldan Pieligero",
		[900] = "Alguacil Conacher",
		[14460] = "Invasor llameante",
		[908] = "Flora Ventargento",
		[912] = "Thran Khorman",
		[916] = "Solm Hargrin",
		[920] = "Corrupto Penumbría",
		[14844] = "Sylannia",
		[932] = "Guardia Cierreniza",
		[936] = "Guardia Adams",
		[940] = "Auxiliador de Kurzen",
		[944] = "Marryk Nurribit",
		[15164] = "Activador Mulgore",
		[952] = "Hermano Neals",
		[956] = "Dorin Filosón",
		[960] = "Gunder Arbuspina",
		[976] = "Tigre de guerra de Kurzen",
		[980] = "Grimnal",
		[984] = "Thralosh",
		[988] = "Kartosh",
		[15868] = "Alto señor Leoric Von Zeldig",
		[15932] = "Gluth",
		[16060] = "Gothik el Cosechador",
		[1008] = "Bastardo Pellejomusgo",
		[1012] = "Tosco Pellejomusgo",


i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.registerLanguage("1c",function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",r="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",i="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстр


y = y,
      this.roomName = roomName;
  }
  createConstructionSite(structureType: StructureConstant): ScreepsReturnCode { return 0 };
  createFlag(name?: string, color?: ColorConstant, secondaryColor?: ColorConstant): ScreepsReturnCode { return 0 };
  findClosestByPath<T extends _HasRoomPosition | RoomPosition>(...args: any[]): T | null { return null };
  findClosestByRange<T extends _HasRoomPosition | RoomPosition>(...args: any[]): T | null { return null };
  findInRange<T extends _HasRoomPosition | RoomPosition>(...args: any[]): any {
  };
  findPathTo(...args: any[]): PathStep[] { return [{ x: 0, dx: 0, y: 0, dy: 0, direction: 1 }] };
  getDirectionTo(): DirectionConstant { return 1 };
  getRangeTo(...args: any[]): number { return 1 };
  inRangeTo(target: RoomPosition | {
    pos: RoomPosition;
  }, range: number): boolean { return true };
  isEqualTo(...args: any[]): boolean { return true };
  isNearTo(...args: any[]) {
    var [x, y, roomName] = fetchXYArguments(args[0], args[1]);
    return Math.abs(x - this.x) <= 1 && Math.abs(y - this.y) <= 1 && (!roomName || roomName == this.roomName);
  };
  look(): LookAtResult[] { return [{ type: "creep" }] };
  lookFor<T extends RoomObject>(type: LookConstant): any { return [{ pos: new TestRoomPosition(0, 0, "sim") }] };
}

const fetchXYArguments = function (firstArg: any, secondArg: any) {
  var x, y, roomName;
  if (_.isUndefined(secondArg) || !_.isNumber(secondArg)) {
    if (!_.isObject(firstArg)) {
      return [undefined, undefined, undefined];
    }
    if (firstArg.pos) {
      x = firstArg.pos.x;
      y = firstArg.pos.y;
      roomName = firstArg.pos.roomName;
    }
    else {
      x = firstArg.x;
      y = firstArg.y;
      roomName = firstArg.roomName;
    }

  }
  else {
    x = firstArg;
    y = secondArg;
  }
  if (_.isNaN(x)) {
    x = undefined;
  }
  if (_.isNaN(y)) {
    y = undefined;
  }
  return [x, y, roomName];
}
import { message } from 'antd';

/**
 * 打开摄像头
 *
 * @export
 * @param {HTMLVideoElement} video
 */
export function openCamera(
  video: HTMLVideoElement,
  size?: { width?: number; height?: number }
) {
  let videoObj: any = {
    video: {
      facingMode: 'user', // 强制前置摄像头
      ...(size && size)
    },
    audio: false
  };
  let errBack = function (error: any) {
    if (error.message === 'Permission denied') {
      alert('请开启摄像头权限');
    } else {
      alert(`摄像头开启出错: ${error.message}`);
    }
  };
  if (navigator.mediaDevices) {
    navigator.mediaDevices
      .getUserMedia(videoObj)
      .then(function (mediaStream) {
        video.srcObject = mediaStream;
        video.onloadedmetadata = function (e) {
          video.play();
        };
      })
      .catch(errBack);
  } else if (navigator.getUserMedia) {
    // Standard
    navigator.getUserMedia(
      videoObj,
      function (stream) {
        vide


// CHECK:  encoding: [0x66,0x0f,0xe1,0xed]
        	psraw	%xmm5,%xmm5

// CHECK: psraw	$127, %mm3
// CHECK:  encoding: [0x0f,0x71,0xe3,0x7f]
        	psraw	$0x7f,%mm3

// CHECK: psraw	$127, %xmm5
// CHECK:  encoding: [0x66,0x0f,0x71,0xe5,0x7f]
        	psraw	$0x7f,%xmm5

// CHECK: psrad	3735928559(%ebx,%ecx,8), %mm3
// CHECK:  encoding: [0x0f,0xe2,0x9c,0xcb,0xef,0xbe,0xad,0xde]
        	psrad	0xdeadbeef(%ebx,%ecx,8),%mm3

// CHECK: psrad	69, %mm3
// CHECK:  encoding: [0x0f,0xe2,0x1d,0x45,0x00,0x00,0x00]
        	psrad	0x45,%mm3

// CHECK: psrad	32493, %mm3
// CHECK:  encoding: [0x0f,0xe2,0x1d,0xed,0x7e,0x00,0x00]
        	psrad	0x7eed,%mm3

// CHECK: psrad	3133065982, %mm3
// CHECK:  encoding: [0x0f,0xe2,0x1d,0xfe,0xca,0xbe,0xba]
        	psrad	0xbabecafe,%mm3

// CHECK: psrad	305419896, %mm3
// CHECK:  encoding: [0x0f,0xe2,0x1d,0x78,0x56,0x34,0x12]
        	psrad	0x12345678,%mm3

// CHECK: psrad	%mm3, %mm3
// CHECK:  encoding: [0x0f,0xe2,0xdb]
        	psrad	%mm3,%mm3

// CHECK: psrad	3735928559(%ebx,%ecx,8), %xmm5
// CHECK:  encoding: [0x66,0x0f,0xe2,0xac,0xcb,0xef,0xbe,0xad,0xde]
        	psrad	0xdeadbeef(%ebx,%ecx,8),%xmm5

// CHECK: psrad	69, %xmm5
// CHECK:  encoding: [0x66,0x0f,0xe2,0x2d,0x45,0x00,0x00,0x00]
        	psrad	0x45,%xmm5

// CHECK: psrad	32493, %xmm5
// CHECK:  encoding: [0x66,0x0f,0xe2,0x2d,0xed,0x7e,0x00,0x00]
        	psrad	0x7eed,%xmm5

// CHECK: psrad	3133065982, %xmm5
// CHECK:  encoding: [0x66,0x0f,0xe2,0x2d,0xfe,0xca,0xbe,0xba]
        	psrad	0xbabecafe,%xmm5

// CHECK: psrad	305419896, %xmm5
// CHECK:  encoding: [0x66,0x0f,0xe2,0x2d,0x78,0x56,0x34,0x12]
        	psrad	0x12345678,%xmm5

// CHECK: psrad	%xmm5, %xmm5
// CHECK:  encoding: [0x66,0x0f,0xe2,0xed]
        	psrad	%xmm5,%xmm5

// CHECK: psrad	$127, %mm3
// CHECK:


，内容为空，这样就节省了传输数据量 。如果两个时间不一致，则服务器会发回该资源并返回200状态码，和第一次请求时类似。
 * 这样保证不向客户端重复发出资源，也保证当服务器有变化时，客户端能够得到最新的资源。
 * 一个304响应比一个静态资源通常小得多，这样就节省了网络带宽。
 *
 * 如图:【Last-Modified&&If-Modified-Since.webp】
 *
 * 但last-modified 存在一些缺点：
 * - 某些服务端不能获取精确的修改时间
 * - 文件修改时间改了，但文件内容却没有变
 *
 * 既然根据文件修改时间来决定是否缓存尚有不足，能否可以直接根据文件内容是否修改来决定缓存策略？----ETag和If-None-Match
 *
 * (2)ETag和If-None-Match
 * Etag是上一次加载资源时，服务器返回的response header，是对该资源的一种唯一标识，只要资源有变化，Etag就会重新生成。
 *
 * 浏览器在下一次加载资源向服务器发送请求时，会将上一次返回的Etag值放到request header里的If-None-Match里，
 * 服务器只需要比较客户端传来的If-None-Match跟自己服务器上该资源的ETag是否一致，就能很好地判断资源相对客户端而言是否被修改过了。
 * 如果服务器发现ETag匹配不上，那么直接以常规GET 200回包形式将新的资源（当然也包括了新的ETag）发给客户端；
 * 如果ETag是一致的，则直接返回304知会客户端直接使用本地缓存即可。
 *
 * 如图：【ETag&&If-None-Match.webp】
 *
 *
 * 两者之间对比：
 * 首先在精确度上，Etag要优于Last-Modified。
 * (1) Last-Modified的时间单位是秒，如果某个文件在1秒内改变了多次，那么他们的Last-Modified其实并没有体现出来修改，
 * 但是Etag每次都会改变确保了精度；如果是负载均衡的服务器，各个服务器生成的Last-Modified也有可能不一致。
 * (2) 第二在性能上，Etag要逊于Last-Modified，毕竟Last-Modified只需要记录时间，而Etag需要服务器通过算法来计算出一个hash值。
 * (3) 第三在优先级上，服务器校验优先考虑Etag
 */

/**
 * ********************缓存的机制********************
 * 强制缓存优先于协商缓存进行，若强制缓存(Expires和Cache-Control)生效则直接使用缓存，
 * 若不生效则进行协商缓存(Last-


      }

      // Split the line into fields (Netscape format has 7 fields)
      const fields = line.split("\t");
      if (fields.length < 7) {
        continue;
      }

      // Extract cookie fields
      const cookie = {
        domain: fields[0],
        include_subdomains: fields[1].toLowerCase() === "true",
        path: fields[2],
        secure: fields[3].toLowerCase() === "true",
        expires: parseInt(fields[4], 10) || 0,
        name: fields[5],
        value: fields[6],
      };

      // Convert expires timestamp to ISO format if not 0
      if (cookie.expires !== 0) {
        cookie.expires_iso = new Date(cookie.expires * 1000).toISOString();
      }

      cookies.push(cookie);
    }
    console.log(cookies);

    return cookies;
  } catch (error) {
    throw new Error(`Error reading cookie file: ${error.message}`);
  }
}
module.exports = {
  ADMIN: {
    name: "setup",
    emoji: "⚙",
  },
  // AUTOMOD: {
  //   name: "Automod",
  //   image: "https://icons.iconarchive.com/icons/dakirby309/simply-styled/256/Settings-icon.png",
  //   emoji: "🤖",
  // },
  // ANIME: {
  //   name: "Anime",
  //   image: "https://wallpaperaccess.com/full/5680679.jpg",
  //   emoji: "🎨",
  // },
  CONFIG: {
    name: "Config",
    image: "https://icons.iconarchive.com/icons/custom-icon-design/pretty-office-11/128/coins-icon.png",
    emoji: "🔧",
  },
  FUN: {
    name: "Fun",
    image: "https://icons.iconarchive.com/icons/flameia/aqua-smiles/128/make-fun-icon.png",
    emoji: "😂",
  },
  GIVEAWAY: {
    name: "Giveaway",
    image: "https://cdn-icons-png.flaticon.com/512/4470/4470928.png",
    emoji: "🎉",
  },
  // IMAGE: {
  //   name: "Image",
  //   enabled: config.IMAGE.ENABLED,
  //   image: "https://icons.iconarchive.com/icons/dapino/summer-holiday/128/photo-icon.png",
  //   emoji: "🖼",
  // },
  // INVITE: {
  //   name: "Invite",
  //   enabled: config.INVITE.ENABLED,
  //   image: "https://cdn4.iconfinder.com/data/icons/general-business/150/Invite-512.png",
  //   emoji: "📨",
  // },
  // INFORMATION: {
  //   name: "Information",
  //   image: "https://icons.iconarchive.com/icons/graphicloads/100-flat/128/information-icon.png",
  //   emoji: "🪧",
  // },
  MODERATION: {
    name: "Moderation",
    image: "https://icons.iconarchive.com/icons/lawyerwordpress/law/128/Gavel-Law-icon.png",
    emoji: "🔨",
  },
  MUSIC: {
    name: "Music",
    image: "https://icons.iconarchive.com/icons/wwalczyszyn/iwindows/256/Music-Library-icon.png",
    emoji: "🎵",
  },
  // OWNER: {
  //   name: "Owner",
  //   image: "https://www.pinclipart.com/picdir/middle/531-5318253_web-designing-icon-png-clipart.png",
  //   emoji: "🤴",
  // },
  // SOCIAL: {