 | undefined =
                this.loadYmlObject(path.join("scenarios", scenarioFile));
            if (scenario)
                return scenario.scenarios;
        });

        return scenarios.map((scenario) => {
            if (scenario[0]) {
                console.log(`loaded: ${scenario[0].name}`);
                return scenario[0];
            }
        });
    }

    /**
     * Load the config section of the tests. This section specifies attributes
     * related to the length of the tests and the different load phases
     * that would run.
     */
    private loadConfig(profile: string | undefined = undefined): ConfigObject {

        let config: ConfigObject | undefined = undefined

        if(!profile)
            config = this.loadYmlObject("config.yml");
        else
            config = this.loadYmlObject(`${profile}.yml`, "profiles");

        if (!config)
            throw new Error("unable to load config.yml file contents");

        return config.config;
    }

    /**
     * Helper method for loading yml files.
     * @param file yml filename
     */
    private loadYmlObject(file: string, profilePath: string | undefined = undefined): ConfigObject | undefined {

        let configPath: string = "";

        if(!profilePath)
            configPath = path.join(this.getTestFolderPath(), file);
        else
            configPath = path.join(this.getTestFolderPath(profilePath), file);

        if (!fs.existsSync(configPath))
            throw new Error(`${file} doesn't exist`);

        try {

            let obj = yml.safeLoad(
                fs.readFileSync(configPath, "utf8"));

            return obj as ConfigObject;

        } catch (e) {
            console.log(e);
        }

    }

    /**
     * Helper method for constructing the full test path, including subfolders
     * @param folderPath sub folders
     */
    private getTestFolderPath(folderPath: string = ""): string {
        return path.join(this.currentWorkingDir, this.config.testFolder, folderPath);
    }
}import { IModule } from '../interfaces/Module.interfaces'

class ModuleUtils {
    protected modules: IModule[] = []

    public addModule = (module: IModule) => {
        this.modules.push(module)
    }

    public getModules = () => {
        return this.modules
    }

    public getModuleById = (id: string): IModule | null => {
        for (const module of this.modules) {
            if (module.id === id) return module
        }

        return null
    }
}

export default new ModuleUtils()
import { ToggleButton } from "./toggleButton";

export type ToggleButtonGroupOption = {
    gap?: number,
    buttons: ToggleButton[],
    values: string[],
    defaultIndex?: number
}

export class ToggleButtonGroup extends PIXI.Container {
    buttons: ToggleButton[] = [];
    options: ToggleButtonGroupOption;
    selectedIndex: number;
    selectHandler;

    constructor(opt: ToggleButtonGroupOption) {
        super();
        this.options = opt;
        if (opt.buttons.length == 0) return;
        opt.gap = opt.gap || 0;
        let numButtons = opt.buttons.length;
        let buttonWidth = opt.buttons[0].width;
        let fullWidth = numButtons * (buttonWidth + opt.gap) - opt.gap;
        for (let i = 0; i < numButtons; i++) {
            let b = opt.buttons[i];
            b.x = i * (buttonWidth + opt.gap) + (buttonWidth - fullWidth) / 2;
            b['index'] = i;
            b['value'] = opt.values[i];
            b.clickHandler = () => {
                let idx = b['index']
                if (this.selectedIndex != idx)


    --chart-17: 238.7 83.5% 66.7%;
    --chart-18: 234.5 89.5% 73.9%;
    --chart-19: 229.7 93.5% 81.8%;
    --chart-20: 228 96.5% 88.8%;
    --chart-21: 226.5 100% 93.9%;
    --chart-22: 225.9 100% 96.7%;
    --chart-23: 243.8 47.1% 20%;
    --chart-24: 242.2 47.4% 34.3%;
    --chart-25: 243.7 54.5% 41.4%;
    --chart-26: 244.5 57.9% 50.6%;
    --chart-27: 243.4 75.4% 58.6%;
    --chart-28: 238.7 83.5% 66.7%;
    --chart-29: 234.5 89.5% 73.9%;
    --chart-30: 229.7 93.5% 81.8%;
    --chart-31: 228 96.5% 88.8%;
  }

  .dark {
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
    --chart-6: 220 70% 50%;
    --chart-7: 160 60% 45%;
    --chart-8: 30 80% 55%;
    --chart-9: 280 65% 60%;
    --chart-10: 340 75% 55%;
    --chart-11: 340 75% 55%;
    --chart-12: 220 70% 50%;
    --chart-13: 160 60% 45%;
    --chart-14: 30 80% 55%;
    --chart-15: 280 65% 60%;
    --chart-16: 340 75% 55%;
    --chart-17: 220 70% 50%;
    --chart-18: 160 60% 45%;
    --chart-19: 30 80% 55%;
    --chart-20: 280 65% 60%;
    --chart-21: : 340 75% 55%;
    --chart-22: : 340 75% 55%;
    --chart-23: 220 70% 50%;
    --chart-24: 160 60% 45%;
    --chart-25: 30 80% 55%;
    --chart-26: 280 65% 60%;
    --chart-27: 340 75% 55%;
    --chart-28: 220 70% 50%;
    --chart-29: 160 60% 45%;
    --chart-30: 30 80% 55%;
    --chart-31: 280 65% 60%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-feature-settings: "rlig" 1, "calt" 1;
  }
}
/* 页面布局 CSS 变量 */
:root {
  color-scheme: light;

  /* 头部高度 */
  --g-header-height: 60px;

  /* 侧边栏宽度 */
  --g-main-sidebar-width: 80px;
  --g-sub-sidebar-width: 220px;
  --g-sub-sidebar-collapse-width: 64px;

  /* 侧边栏 Logo 区域高度 */
  --g-sidebar-logo-height: 50px;

  /* 标签栏高度 */
  --g-tabbar-height: 50px;

  /* 工具栏高度 */
  --g-toolbar-height: 50px;

  /* 滚动条颜色 */
  --scrollbar-color: 240 5.9% 90%;

  &.dark {
    color-scheme: dark;

    --scrollbar-color: 240 3.7% 15.9%;
  }
}

/* 明暗模式 CSS 变量 */
::view-transition-old(root),
::view-transition-new(root) {
  mix-blend-mode: normal;
  animation: none;
}

::view-transition-old(root) {
  z-index: 0;
}

::view-transition-new(root) {
  z-index: 1;
}

.dark {
  &::view-transition-old(root) {
    z-index: 1;
  }

  &::view-transition-new(root) {


   url = "https://simplifier.net/packages/kbv.ita.erp/1.2.0/files/2777667"
)
internal object FhirMedicationPznConstants {
    const val MEDICATION_NORM_GROSSE = "http://fhir.de/StructureDefinition/normgroesse"
    const val MEDICATION_CATEGORY = "https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category"
    const val MEDICATION_VACCINE_EXTENSION = "https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine"
}
/*
 * Copyright (Change Date see Readme), gematik GmbH
 *
 * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the
 * European Commission – subsequent versions of the EUPL (the "Licence").
 * You may not use this work except in compliance with the Licence.
 *
 * You find a copy of the Licence in the "Licence" file or at
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.
 * In case of changes by gematik GmbH find details in the "Readme" file.
 *
 * See the Licence for the specific language governing permissions and limitations under the Licence.
 *
 * *******
 *
 * For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
 */

package de.gematik.ti.erp.app.fhir.constant.prescription.coverage

internal object FhirCoverageConstants {
    /**
     * Url for health insurance status used in the KBV FHIR profiles.
     *  1 = Mitglied | 3 = Familienversicherter | 5 = Rentner
     */
    const val TYPE_OF_INSURANCE_URL = "http://fhir.de/StructureDefinition/gkv/versichertenart"
}
/*
 * Copyright (Change Date see Readme), gematik GmbH
 *
 * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the
 * European Commission – subsequent versions of the EUPL (the "Licence").
 * You may not use this work except in compliance with the Licence.
 *
 * You find a copy of the Licence in the "Licence" file or at
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.
 * In case of changes by gematik GmbH find details in the "Readme" file.
 *
 * See the Licence for the specific language governing permissions and limitations under the Licence.
 *
 * *******
 *
 * For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
 */

package de.gematik.ti.erp.app.fhir.pkv.parser

import de.gematik.ti.erp.app.fhir.BundleParser
import de.gematik.ti.erp.app.fhir.FhirChargeItemEntryParserResultErpModel
import de.gematik.ti.erp.app.fhir.common.model.original.FhirBundle.Companion.getBundleEntries
import de.gematik.ti.erp.app.fhir.common.model.original.FhirBundle.Companion.getBundleLinks
import de.gematik.ti.erp.app.fhir.common.model.original.FhirBundleLink.Companion.firstPage
import de.gematik.ti.erp.app.fhir.common.model.original.FhirBundleLink.Companion.nextPage
import de.gematik.ti.erp.app.fhir.common.


 Clark et al. (2019) Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions, 2019.\n' +
      '* Clark et al. (2018) Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge, 2018.\n' +
      '* Computer (2023) Together Computer. Redpajama: an open dataset for training large language models, 2023. URL [https://github.com/togethercomputer/RedPajama-Data](https://github.com/togethercomputer/RedPajama-Data).\n' +
      '* Cossu et al. (2022) Andrea Cossu, Tinne Tuytelaars, Antonio Carta, Lucia Passaro, Vincenzo Lomonaco, and Davide Bacciu. Continual pre-training mitigates forgetting in language and vision, 2022. URL [https://arxiv.org/abs/2205.09357](https://arxiv.org/abs/2205.09357).\n' +
      '* Douillard et al. (2023) Arthur Douillard, Qixuan Feng, Andrei A Rusu, Rachita Chhaparia, Yani Donchev, Adhiguna Kuncoro, Marc\'Aurelio Ranzato, Arthur Szlam, and Jiajun Shen. Diloco: Distributed low-communication training of language models. _arXiv preprint arXiv:2311.08105_, 2023.\n' +
      '* French (1999) Robert M. French. Catastrophic forgetting in connectionist networks. _Trends in Cognitive Sciences_, 3(4):128-135, 1999. ISSN 13646613. doi: 10.1016/S1364-6613(99)01294-2. URL [https://www.sciencedirect.com/science/article/abs/pii/S1364661399012942](https://www.sciencedirect.com/science/article/abs/pii/S1364661399012942).\n' +
      '* Gao et al. (2020) Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, et al. The pile: An 800gb dataset of diverse text for language modeling. _arXiv preprint arXiv:2101.00027_, 2020.\n' +
      '* Team et al. (2024) Thomas Mesnard Gemma Team, Cassidy Hardin, Robert Dadashi, Surya Bhuptiraju, Laurent Sifre, Morgane Riviere, Mihir Sanjay Kale, Juliette Love, Pouya Tafti, Leonard Hussenot, and et al. Gemma: Open models based on gemini research and technology. 2024. URL [https://storage.googleapis.com/deepmind-media/gemma/gemma-report.pdf](https://storage.googleapis.com/deepmind-media/gemma/gemma-report.pdf).\n' +
      '* Gogoulou et al. (2023) Evangelia Gogoulou, Timothee Lesort, Magnus Boman, and Joakim Nivre. A study of continual learning under language shift. _CoRR_, abs/2311.01200, 2023. URL [https://doi.org/10.48550/arXiv.2311.01200](https://doi.org/10.48550/arXiv.2311.01200).\n' +
      '\n' +
      'Zheng Gong, Kun Zhou, Xin Zhao, Jing Sha, Shijin Wang, and Ji-Rong Wen. Continual pre-training of language models for math problem understanding with syntax-aware memory network, 2022. URL [https://aclanthology.org/2022.acl-long.408/](https://aclanthology.org/2022.acl-long.408/).\n' +
      '* Goyal et al. (2018) Priya Goyal, Piotr Dollar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch


(temp= ruleVariableDeclaration ) )* ) )? ) ) RCURLY ) | () ) )
            // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:546: temp= inPattern ( ( 'using' LCURLY ( ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? ) ) RCURLY ) | () )
            {
            pushFollow(FOLLOW_inPattern_in_createEqual1361);
            temp=inPattern();
            _fsp--;

            ei.set(ret, "inPattern", temp);
            // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:595: ( ( 'using' LCURLY ( ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? ) ) RCURLY ) | () )
            int alt30=2;
            int LA30_0 = input.LA(1);

            if ( (LA30_0==48) ) {
                alt30=1;
            }
            else if ( (LA30_0==RCURLY) ) {
                alt30=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("213:595: ( ( 'using' LCURLY ( ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? ) ) RCURLY ) | () )", 30, 0, input);

                throw nvae;
            }
            switch (alt30) {
                case 1 :
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:596: ( 'using' LCURLY ( ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? ) ) RCURLY )
                    {
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:596: ( 'using' LCURLY ( ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? ) ) RCURLY )
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:597: 'using' LCURLY ( ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? ) ) RCURLY
                    {
                    match(input,48,FOLLOW_48_in_createEqual1367);
                    match(input,LCURLY,FOLLOW_LCURLY_in_createEqual1369);
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:612: ( ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? ) )
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:613: ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? )
                    {
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:613: ( ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )? )
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:614: ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )?
                    {
                    // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:614: ( (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* ) )?
                    int alt29=2;
                    int LA29_0 = input.LA(1);

                    if ( (LA29_0==NAME) ) {
                        alt29=1;
                    }
                    switch (alt29) {
                        case 1 :
                            // C:\\dev\\runtime-workspaceEclipse3.4\\AML\\Syntax\\AML_ANTLR3.g:213:615: (temp= ruleVariableDeclaration ( (temp= ruleVariableDeclaration ) )* )
                            {
                            // C:\\dev\\runtime-workspace


�ミなどが入っていたりする。",
               footnote = "〜別冊ヨウィン・未知の知識を追え！〜",
            },
         },
      },
      trash_can = {
         name = "トラッシュカン",
         description = {
            main = {
               text = "カンを捨てる為の箱だ。",
               footnote = "〜鑑定報告書：＜遺物＞カテゴリ〜",
            },
            _0 = {
               text = "特定の廃棄物を納める為に作られた箱。サイバードームにあるこれに、特定のもの以外を入れると住人が嫌な顔をするという。",
               footnote = "〜別冊ヨウィン・未知の知識を追え！〜",
            },
            _2 = {
               text = "「さあさお立会い、手に入れてきたこの一品。そこいらのもんじゃないよ。まず色がいい、それにこの形。何やら楽しげだ。それにここだけの話、こいつには秘密があって…おっと、それは買ってからのお楽しみ」",
               footnote = "〜見世物屋の『モイアー』がガラクタを売り付ける際の口上〜",
            },
         },
      },
      chip = {
         name = "チップ",
         description = {
            main = {
               text = "何かの情報片だ。",
               footnote = "〜鑑定報告書：＜遺物＞カテゴリ〜",
            },
            _0 = {
               text = "規則性のある模様が刻み込まれた謎の小片。非常に美しく装飾品であると推定されるが、装備することはできない。",
               footnote = "〜別冊ヨウィン・未知の知識を追え！〜",
            },
         },
      },
      blank_disc = {
         name = "ブランクディスク",
         description = {
            main = {
               text = "データが入っていない円盤。使用することはできない。",
               footnote = "〜鑑定報告書：＜遺物＞カテゴリ〜",
            },
            _0 = {
               text = "未使用状態の円盤。使用することができないので何の価値も無い代物だが、稀に観光で訪れたヨウィンの農民が土産として買っていくという。",
               footnote = "〜別冊ヨウィン・未知の知識を追え！〜",
            },
         },
      },
      shot_gun = {
         name = "散弾銃",
         katakana_name = "ショットガン",
         description = {
            main = {
               text = "弾と共に使用する射撃武器。飛距離は殆どない。",
               footnote = "〜鑑定報告書：＜武器＞カテゴリ〜",
            },
            _0 = {
               text = "広域に飛散する弾を発射する為の銃器。近距離においては比類なき威力を発揮するが、離れるにつれその威力が加速度的に落ちるので扱いには注意が必要だ。",
               footnot


                                     Item = item.Item
                                                 }).
                                     ToArray();
            }
            else
            {
                items = Enumerable.Empty<CounterMetric.SetItem>();
            }

            return new CounterMetric
                     {
                       Name = source.Name,
                       Count = counterValue.Count,
                       Unit = source.Unit.Name,
                       Items = items,
                       Tags = source.Tags.ToDictionary()
                     };
        }

        public static CounterValueSource FromSerializableMetric(this CounterMetric source)
        {
            var items = source.Items.Select(i => new CounterValue.SetItem(i.Item, i.Count, i.Percent)).ToArray();
            var counterValue = new CounterValue(source.Count, items);

            return new CounterValueSource(
                source.Name,
                ConstantValue.Provider(counterValue),
                source.Unit,
                source.Tags.FromDictionary());
        }

        public static IEnumerable<CounterValueSource> FromSerializableMetric(this IEnumerable<CounterMetric> source)
        {
            return source.Select(x => x.FromSerializableMetric());
        }
    }
}


/chart/common/selection_model/selection_model.dart';
import 'package:community_charts_common/src/common/material_palette.dart';
import 'package:community_charts_common/src/common/math.dart';
import 'package:community_charts_common/src/data/series.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';

class MockChart extends Mock implements CartesianChart {
  LifecycleListener lastListener;

  @override
  LifecycleListener addLifecycleListener(LifecycleListener listener) =>
      lastListener = listener;

  @override
  bool removeLifecycleListener(LifecycleListener listener) {
    expect(listener, equals(lastListener));
    lastListener = null;
    return true;
  }

  @override
  bool get vertical => true;
}

class MockSelectionModel extends Mock implements MutableSelectionModel {
  SelectionModelListener lastListener;

  @override
  void addSelectionChangedListener(SelectionModelListener listener) =>
      lastListener = listener;

  @override
  void removeSelectionChangedListener(SelectionModelListener listener) {
    expect(listener, equals(lastListener));
    lastListener = null;
  }
}

class MockNumericAxis extends Mock implements NumericAxis {
  @override
  double getLocation(num domain) {
    return 10.0;
  }
}

class MockSeriesRenderer<D> extends BaseSeriesRenderer<D> {
  MockSeriesRenderer() : super(rendererId: 'fake', layoutPaintOrder: 0);

  @override
  void update(_, __) {}

  @override
  void paint(_, __) {}

  @override
  List<DatumDetails<D>> getNearestDatumDetailPerSeries(
    Point<double> chartPoint,
    bool byDomain,
    Rectangle<int> boundsOverride, {
    selectOverlappingPoints = false,
    selectExactEventLocation = false,
  }) =>
      null;

  @override
  DatumDetails<D> addPositionToDetailsForSeriesDatum(
      DatumDetails<D> details, SeriesDatum<D> seriesDatum) {
    return DatumDetails.from(details, chartPosition: NullablePoint(0.0, 0.0));
  }
}

void main() {
  MockChart _chart;
  MockSelectionModel _selectionModel;
  MockSeriesRenderer _seriesRenderer;

  MutableSeries<int> _series1;
  final _s1D1 = MyRow(1, 11);
  final _s1D2 = MyRow(2, 12);
  final _s1D3 = MyRow(3, 13);

  MutableSeries<int> _series2;
  final _s2D1 = MyRow(4, 21);
  final _s2D2 = MyRow(5, 22);
  final _s2D3 = MyRow(6, 23);

  List<DatumDetails> _mockGetSelectedDatumDetails(List<SeriesDatum> selection) {
    final details = <DatumDetails>[];

    for (SeriesDatum seriesDatum in selection) {
      details.add(_seriesRenderer.getDetailsForSeriesDatum(seriesDatum));
    }

    return details;
  }

  void _setupSelection(List<SeriesDatum> selection) {
    final selected = <MyRow>[];

    for (var i = 0; i < selection.length; i++) {
      selected.add(selection[0].datum as MyRow);
    }

    for (int i = 0; i < _series1.data.length; i++) {
      when(_selectionModel.isDatumSelected(_series1, i))
          .thenReturn(selected.contains(_series1.data[i]));
    }
    for (int i = 0; i < _series2.data.length; i++) {
      when(_selectionModel.isDatumSelected(_series2, i))
          .thenReturn(selected.contains(_series2.data[i]));
    }

    when(_selectionModel.selectedDatum).thenReturn(selection);

    final selectedDetails = _mockGetSelectedDatumDetails(selection);

    when(_chart.getSelectedDatumDetails(SelectionModelType.info))
        .thenRe


Key.Down },
            { (int) SDL_Keycode.SDLK_LEFT, Key.Left },
            { (int) SDL_Keycode.SDLK_RIGHT, Key.Right },
            { (int) SDL_Keycode.SDLK_LALT, Key.LeftAlt },
            { (int) SDL_Keycode.SDLK_RALT, Key.RightAlt },
            { (int) SDL_Keycode.SDLK_LCTRL, Key.LeftCtrl },
            { (int) SDL_Keycode.SDLK_RCTRL, Key.RightCtrl },
            { (int) SDL_Keycode.SDLK_LGUI, Key.LWin },
            { (int) SDL_Keycode.SDLK_RGUI, Key.RWin },
            { (int) SDL_Keycode.SDLK_LSHIFT, Key.LeftShift },
            { (int) SDL_Keycode.SDLK_RSHIFT, Key.RightShift },
            { (int) SDL_Keycode.SDLK_APPLICATION, Key.Apps },
            { (int) SDL_Keycode.SDLK_SLASH, Key.OemQuestion },
            { (int) SDL_Keycode.SDLK_BACKSLASH, Key.Oem5 },
            { (int) SDL_Keycode.SDLK_LEFTBRACKET, Key.OemOpenBrackets },
            { (int) SDL_Keycode.SDLK_RIGHTBRACKET, Key.OemCloseBrackets },
            { (int) SDL_Keycode.SDLK_CAPSLOCK, Key.CapsLock },
            { (int) SDL_Keycode.SDLK_COMMA, Key.OemComma },
            { (int) SDL_Keycode.SDLK_DELETE, Key.Delete },
            { (int) SDL_Keycode.SDLK_END, Key.End },
            { (int) SDL_Keycode.SDLK_BACKSPACE, Key.Back },
            { (int) SDL_Keycode.SDLK_RETURN, Key.Enter },
            { (int) SDL_Keycode.SDLK_ESCAPE, Key.Escape },
            { (int) SDL_Keycode.SDLK_HOME, Key.Home },
            { (int) SDL_Keycode.SDLK_INSERT, Key.Insert },
            { (int) SDL_Keycode.SDLK_MINUS, Key.OemMinus },
            { (int) SDL_Keycode.SDLK_NUMLOCKCLEAR, Key.NumLock },
            { (int) SDL_Keycode.SDLK_PAGEUP, Key.PageUp },
            { (int) SDL_Keycode.SDLK_PAGEDOWN, Key.PageDown },
            { (int) SDL_Keycode.SDLK_PAUSE, Key.Pause },
            { (int) SDL_Keycode.SDLK_PERIOD, Key.OemPeriod },
            { (int) SDL_Keycode.SDLK_EQUALS, Key.OemPlus },
            { (int) SDL_Keycode.SDLK_PRINTSCREEN, Key.PrintScreen },
            { (int) SDL_Keycode.SDLK_QUOTE, Key.OemQuotes },
            { (int) SDL_Keycode.SDLK_SCROLLLOCK, Key.Scroll },
            { (int) SDL_Keycode.SDLK_SEMICOLON, Key.OemSemicolon },
            { (int) SDL_Keycode.SDLK_SLEEP, Key.Sleep },
            { (int) SDL_Keycode.SDLK_TAB, Key.Tab },
            { (int) SDL_Keycode.SDLK_BACKQUOTE, Key.OemTilde },
            { (int) SDL_Keycode.SDLK_VOLUMEUP, Key.VolumeUp },
            { (int) SDL_Keycode.SDLK_VOLUMEDOWN, Key.VolumeDown },
            { (int) SDL_Keycode.SDLK_AUDIONEXT, Key.MediaNextTrack },
            { (int) SDL_Keycode.SDLK


import android.content.Context
import android.provider.Settings
import com.x8bit.bitwarden.LEGACY_ACCESSIBILITY_SERVICE_NAME
import com.x8bit.bitwarden.LEGACY_SHORT_ACCESSIBILITY_SERVICE_NAME
import com.x8bit.bitwarden.data.autofill.accessibility.BitwardenAccessibilityService
import com.x8bit.bitwarden.data.autofill.util.containsAnyTerms

/**
 * Helper method to determine if the [BitwardenAccessibilityService] is enabled.
 */
val Context.isAccessibilityServiceEnabled: Boolean
    get() {
        val appContext = this.applicationContext
        val packageName = appContext.packageName
        val accessibilityServiceName = packageName?.let {
            "$it/$LEGACY_ACCESSIBILITY_SERVICE_NAME"
        }
        val shortAccessibilityServiceName = packageName.let {
            "$it/$LEGACY_SHORT_ACCESSIBILITY_SERVICE_NAME"
        }
        return Settings
            .Secure
            .getString(
                appContext.contentResolver,
                Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
            )
            ?.containsAnyTerms(
                terms = listOfNotNull(
                    accessibilityServiceName,
                    shortAccessibilityServiceName,
                ),
                ignoreCase = true,
            )
            ?: false
    }
package com.x8bit.bitwarden.data.autofill.accessibility.manager

import android.net.Uri
import android.view.accessibility.AccessibilityNodeInfo

/**
 * The default maximum recursive depth that the
 * [AccessibilityNodeInfoManager.findAccessibilityNodeInfoList] will go.
 */
const val DEFAULT_MAX_RECURSION_DEPTH: Int = 100

/**
 * A manager for finding fields that match particular characteristics.
 */
interface AccessibilityNodeInfoManager {
    /**
     * A helper function for retrieving the appropriate nodes based on the given [predicate].
     *
     * This function is recursive but will stop recurring if the depth it reaches is greater than
     * the [maxRecursionDepth].
     */
    fun findAccessibilityNodeInfoList(
        rootNode: AccessibilityNodeInfo,
        maxRecursionDepth: Int = DEFAULT_MAX_RECURSION_DEPTH,
        predicate: (AccessibilityNodeInfo) -> Boolean,
    ): List<AccessibilityNodeInfo>

    /**
     * Determines which [AccessibilityNodeInfo] is a username field.
     */
    fun findUsernameAccessibilityNodeInfo(
        uri: Uri,
        allNodes: List<AccessibilityNodeInfo>,
        passwordNodes: List<AccessibilityNodeInfo>,
    ): AccessibilityNodeInfo?
}
package com.x8bit.bitwarden.data.auth.util

import android.content.Intent
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import java.util.regex.Pattern

private const val YUBI_KEY_DATA_LENGTH: Int = 44
private const val YUBI_KEY_PATTERN: String = "^.*?([cbdefghijklnrtuv]{32,64})\$"
private val YubiKeyPattern: Pattern = Pattern.compile(YUBI_KEY_PATTERN)

/**
 * Retrieves an [YubiKeyResult] from an [Intent]. There are two possible cases.
 *
 * - `null`: Intent is not an Yubi key callback, or data is null or invalid.
 * - [YubiKeyResult]: Intent is the Yubi key callback with correct data.
 */
fun Intent.getYubiKeyResultOrNull(): YubiKeyResult? {
    val value = this.dataString ?: return null
    val otpMatch = YubiKeyPattern.matcher(value)
    return if (otpMatch.matches()) {
        otpMatch
            .group(1)
            ?.takeUnless { it.length != YUBI_KEY_DATA_LENGTH }
            ?.let { YubiKeyResult(it) }
    } else {
        null
    }
}

/**
 * Represents a Yubi Key result object with the necessary [token] to log in to the app.
 */
@Parcelize
data class YubiKeyResult(
    val token: String,
) : Parcelable
package com.x8bit.bitwarden.data.auth.manager

import com.bitwarden.core.KeyConnectorResponse
import com.bitwarden.core.data.util.flatMap
import com.bitwarden.crypt


 ArrayHashMap {
    // 初始化数组，包含 100 个桶
    private val buckets = arrayOfNulls<Pair>(100)

    /* 哈希函数 */
    fun hashFunc(key: Int): Int {
        val index = key % 100
        return index
    }

    /* 查询操作 */
    fun get(key: Int): String? {
        val index = hashFunc(key)
        val pair = buckets[index] ?: return null
        return pair._val
    }

    /* 添加操作 */
    fun put(key: Int, _val: String) {
        val pair = Pair(key, _val)
        val index = hashFunc(key)
        buckets[index] = pair
    }

    /* 删除操作 */
    fun remove(key: Int) {
        val index = hashFunc(key)
        // 置为 null ，代表删除
        buckets[index] = null
    }

    /* 获取所有键值对 */
    fun pairSet(): MutableList<Pair> {
        val pairSet = mutableListOf<Pair>()
        for (pair in buckets) {
            if (pair != null)
                pairSet.add(pair)
        }
        return pairSet
    }

    /* 获取所有键 */
    fun keySet(): MutableList<Int> {
        val keySet = mutableListOf<Int>()
        for (pair in buckets) {
            if (pair != null)
                keySet.add(pair.key)
        }
        return keySet
    }

    /* 获取所有值 */
    fun valueSet(): MutableList<String> {
        val valueSet = mutableListOf<String>()
        for (pair in buckets) {
            if (pair != null)
                valueSet.add(pair._val)
        }
        return valueSet
    }

    /* 打印哈希表 */
    fun print() {
        for (kv in pairSet()) {
            val key = kv.key
            val _val = kv._val
            println("$key -> $_val")
        }
    }
}

/* Driver Code */
fun main() {
    /* 初始化哈希表 */
    val map = ArrayHashMap()

    /* 添加操作 */
    // 在哈希表中添加键值对 (key, value)
    map.put(12836, "小哈")
    map.put(15937, "小啰")
    map.put(16750, "小算")
    map.put(13276, "小法")
    map.put(10583, "小鸭")
    println("\n添加完成后，哈希表为\nKey -> Value")
    map.print()

    /* 查询操作 */
    // 向哈希表中输入键 key ，得到值 value
    val name = map.get(15937)
    println("\n输入学号 15937 ，查询到姓名 $name")

    /* 删除操作 */
    // 在哈希表中删除键值对 (key, value)
    map.remove(10583)
    println("\n删除 10583 后，哈希表为\nKey -> Value")
    map.print()

    /* 遍历哈希表 */
    println("\n遍历键值对 Key -> Value")
    for (kv in map.pairSet()) {
        println("${kv.key} -> ${kv._val}")
    }
    println("\n单独遍历键 K


"button"
							class="button"
							onClick={() => {
								const message = __(
									'Are you sure you want to reset it to default setting?',
									'blocksy'
								)
								if (confirm(message) == true) {
									setValue({})
									handleSave({})
								}
							}}>
							{__('Reset to default', 'blocksy')}
						</button>

				</Fragment>
			) : (

							{__(
								'Please add some attributes in the Attributes tab to generate variations and save this product first.',
								'blocksy'
							)}

			)}
		</Fragment>
	)
}

export default ManageAttributeOption
import { createElement, Component, useContext } from '@wordpress/element'
import DashboardContext from './context'
import { sprintf, __ } from 'ct-i18n'
import ctEvents from 'ct-events'

const Heading = () => {
	const { theme_name, theme_custom_description, dashboard_has_heading } =
		useContext(DashboardContext)
	let afterContent = { content: null }
	ctEvents.trigger('ct:dashboard:heading:after', afterContent)

	return (

					e.shiftKey &&
					ctEvents.trigger('ct:dashboard:heading:advanced-click')
				}>
				{dashboard_has_heading === 'yes' && (
					<svg width="35" height="35" viewBox="0 0 35 35">
						<path
							fill="#1e1e1e"
							d="M35,17.5C35,7.8,27.2,0,17.5,0C7.8,0,0,7.8,0,17.5C0,27.2,7.8,35,17.5,35C27.2,35,35,27.2,35,17.5z"
						/>
						<path
							fill="#ffffff"
							d="M16.3,13.7h3.9c0.5,0,0.9,0.4,0.9,1c0,0.5-0.4,1-1,1h-3.1L16.3,13.7z M24.2,17.6c0.6-0.8,1-1.9,1-3c0-1.1-0.4-2.1-1-2.9c-0.9-1.2-2.3-2-3.9-2.1c0,0-0.1,0-0.1,0v0h-9.4c-0.2,0-0.4,0.3-0.3,0.5l2.3,5.5h-1.9c-0.2,0-0.4,0.3-0.3,0.5l3.9,9.5h5.8c2.7,0,5-2.2,5-5C25.2,19.5,24.8,18.5,24.2,17.6C24.2,17.6,24.2,17.6,24.2,17.6zM16.3,19.6h3.9c0.5,0,0.9,0.4,0.9,1c0,0.5-0.4,1-1,1h-3.1L16.3,19.6z"
						/>
						/>
					</svg>
				)}

				{theme_name}
				{dashboard_has_heading === 'yes' && afterContent.content}

				{theme_custom_description ||
					__(
						'The most innovative, intuitive and lightning fast WordPress theme. Build your next web project visually, in no time.',
						'blocksy'
					)}

	)
}

export default Heading
import { createElement, useState, useEffect } from '@wordpress/element'
import { dateI18n } from '@wordpress/date'
import { __, sprintf } from 'ct-i18n'
import classnames from 'classnames'
import { Transition, animated } from 'react-spring/renderprops'

const encodedStr = (rawStr) =>
	rawStr.replace(/[\u00A0-\u9999<>\&]/g, (i) => '&#' + i.charCodeAt(0) + ';')

let changelog_cache =


ows GeneralSecurityException
    {

        Vector _vec = new Vector();
        _vec.addElement(trustedCRL);

        for (int i = 0; i < _strs.length; i++)
        {
            if (_strs[i].startsWith("MIIC"))
            {
                _vec.addElement(fact
                        .generateCertificate(new ByteArrayInputStream(Base64
                                .decode(_strs[i]))));
            }
            else if (_strs[i].startsWith("MIIB"))
            {
                _vec.addElement(fact.generateCRL(new ByteArrayInputStream(
                        Base64.decode(_strs[i]))));
            }
            else
            {
                throw new IllegalArgumentException("Invalid certificate or crl");
            }
        }

        // Insert elements backwards to muck up forward ordering dependency
        Vector _vec2 = new Vector();
        for (int i = _vec.size() - 1; i >= 0; i--)
        {
            _vec2.add(_vec.elementAt(i));
        }

        return CertStore.getInstance("Collection",
                new CollectionCertStoreParameters(_vec2), "BC");
    }

    private void test(String _name, String[] _data, boolean _accept,
            boolean _debug)
    {

        test(_name, _data, null, false, _accept, _debug);
    }

    private void test(String _name, String[] _data, boolean _explicit,
            boolean _accept, boolean _debug)
    {

        test(_name, _data, null, _explicit, _accept, _debug);
    }

    private void test(String _name, String[] _data, Set _ipolset,
            boolean _explicit, boolean _accept, boolean _debug)
    {

        testCount++;
        boolean _pass = true;

        try
        {
            CertPathBuilder _cpb = CertPathBuilder.getInstance("PKIX", "BC");
            X509Certificate _ee = decodeCertificate(_data[_data.length - 1]);
            X509CertSelector _select = new X509CertSelector();
            _select.setSubject(PrincipalUtil.getSubjectX509Principal(_ee).getEncoded());

            PKIXBuilderParameters _param = new PKIXBuilderParameters(
                    trustedSet, _select);
            _param.setExplicitPolicyRequired(_explicit);
            _param.addCertStore(makeCertStore(_data));
            _param.setRevocationEnabled(true);
            if (_ipolset != null)
            {
                _param.setInitialPolicies(_ipolset);
            }

            CertPathBuilderResult _result = _cpb.build(_param);

            if (!_accept)
            {
                System.out.println("Accept when it should reject");
                _pass = false;
                testFail.addElement(_name);
            }
        }
        catch (Exception ex)
        {
            if (_accept)
            {
                System.out.println("Reject when it should accept");
                _pass = false;
                testFail.addElement(_name);
            }
        }

        resultBuf.append("NISTCertPathTest -- ").append(_name).append(": ")
                .append(_pass ? "\n" : "Failed.\n");
    }

    public static void main(
        String[]    args)
    {
        Security.addProvider(new BouncyCastleProvider());

        runTest(new NISTCertPathTest());
    }

    /*
     *  Trust Anchor
     *
     */
    public static final String Trust_Anchor_CP_01_01_crt =
        "MIICbDCCAdWgAwIBAgIDAYafMA0GCSqGSIb3DQEBBQUAMF4xCzAJBgNVBAYTAlVTMRgwFg" +
        "YDVQQKEw9VLlMuIEdvdmVybm1lbnQxDDAKBgNVBAsTA0RvRDEQMA4GA1UECxMHVGVzdGlu" +
        "ZzEVMBMGA1UEAxMMVHJ


"com.google.firebase:firebase-crashlytics-ktx:18.6.2")

    testImplementation("junit:junit:4.13.2")
    testImplementation("org.robolectric:robolectric:4.9")
}

if(includeFirebase) {
    plugins {
        id("com.google.gms.google-services")
        id("com.google.firebase.crashlytics")
    }
}package com.phlox.tvwebbrowser.activity

import android.app.AlertDialog
import android.os.Bundle
import android.util.Log
import com.phlox.tvwebbrowser.R
import com.phlox.tvwebbrowser.TVBro
import com.phlox.tvwebbrowser.activity.main.MainActivity

//Same as MainActivity but runs in separate process
//and store all WebView data separately
class IncognitoModeMainActivity: MainActivity() {
    companion object {
        private val TAG = MainActivity::class.java.simpleName
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        Log.d(TAG, "onCreate")
        super.onCreate(savedInstanceState)
        if (!config.incognitoModeHintSuppress) {
            showIncognitoModeHintDialog()
        }
    }

    override fun onDestroy() {
        if (isFinishing) {
            TVBro.instance.needToExitProcessAfterMainActivityFinish = true
        }
        super.onDestroy()
    }

    private fun showIncognitoModeHintDialog() {
        AlertDialog.Builder(this)
            .setTitle(R.string.incognito_mode)
            .setIcon(R.drawable.ic_incognito)
            .setMessage(R.string.incognito_mode_hint)
            .setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() }
            .setNeutralButton(R.string.don_t_show_again) { dialog, _ ->
                config.incognitoModeHintSuppress = true
                dialog.dismiss()
            }
            .show()
    }
}package com.phlox.tvwebbrowser.utils.activemodel

import android.app.Activity
import android.app.Application
import android.os.Bundle
import androidx.annotation.MainThread
import kotlin.reflect.KClass

object ActiveModelsRepository {
  private val holdersMap = HashMap<String, StateModelHolder>()

  private class StateModelHolder(val activeModel: ActiveModel) {
    val users = ArrayList<Any>()
  }

  private val activityLifecycleCallbacks = object: Application.ActivityLifecycleCallbacks {
    override fun onActivityCreated(p0: Activity, p1: Bundle?) {
    }

    override fun onActivityStarted(p0: Activity) {
    }

    override fun onActivityResumed(p0: Activity) {
    }

    override fun onActivityPaused(p0: Activity) {
    }

    override fun onActivityStopped(p0: Activity) {
    }

    override fun onActivitySaveInstanceState(p0: Activity, p1: Bundle) {
    }

    override fun onActivityDestroyed(activity: Activity) {
      if (activity.isFinishing) {
        markAsNeedlessAllModelsUsedBy(activity)
      }
    }
  }

  fun init(app: Application){
    app.registerActivityLifecycleCallbacks(activityLifecycleCallbacks)
  }

  /**
   * Get active model from repository. If your user is not Activity then make sure that you manually marked as needless
   * (@see com.phlox.tvwebbrowser.utils.statemodel.ActiveModelsRepository#markAsNeedless())
   * all your "active models" when they are not needed (on your component onDestroy(), clear(), finalize() or similar)
   */
  @Suppress("UNCHECKED_CAST")
  @MainThread
  fun <T: ActiveModel>get(clazz: KClass<T>, user: Any): T {
    val className = clazz.qualifiedName ?: throw IllegalStateException("clazz


d *, int);
extern void _cgo_allocate(void *, int);
extern void _cgo_panic(void *, int);
#ifdef __cplusplus
}
#endif

static void *_swig_goallocate(size_t len) {
  struct {
    size_t len;
    void *ret;
  } a;
  a.len = len;
  crosscall2(_cgo_allocate, &a, (int) sizeof a);
  return a.ret;
}

static void _swig_gopanic(const char *p) {
  struct {
    const char *p;
  } a;
  a.p = p;
  crosscall2(_cgo_panic, &a, (int) sizeof a);
}

static _gostring_ _swig_makegostring(const char *p, size_t l) {
  _gostring_ ret;
  ret.p = (char*)_swig_goallocate(l + 1);
  memcpy(ret.p, p, l);
  ret.n = l;
  return ret;
}

#define SWIG_contract_assert(expr, msg) \
  if (!(expr)) { _swig_gopanic(msg); } else

#define SWIG_exception(code, msg) _swig_gopanic(msg)

#include "webp/decode.h"
#include "webp/encode.h"

#ifdef __cplusplus
extern "C" {
#endif

void
_wrap_WebPGetDecoderVersion(void *swig_v)
{
  int result;

  struct swigargs {
    long : 0;
    intgo result;
  } *swig_a = (struct swigargs *) swig_v;

  result = (int)WebPGetDecoderVersion();
  swig_a->result = result;
}

void
_wrap_wrapped_WebPGetInfo(void *swig_v)
{
  uint8_t *arg1 = (uint8_t *) 0 ;
  size_t arg2 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int temp3 ;
  int temp4 ;
  int result;

  struct swigargs {
    _gostring_ arg1;
    _goslice_ arg3;
    _goslice_ arg4;
    long : 0;
    intgo result;
  } *swig_a = (struct swigargs *) swig_v;

  arg1 = (uint8_t *)swig_a->arg1.p;
  arg2 = (size_t)swig_a->arg1.n;

  {
    if (swig_a->arg3.len == 0) {
      _swig_gopanic("array must contain at least 1 element");
    }
    arg3 = &temp3;
  }
  {
    if (swig_a->arg4.len == 0) {
      _swig_gopanic("array must contain at least 1 element");
    }
    arg4 = &temp4;
  }

  result = (int)WebPGetInfo((uint8_t const *)arg1,arg2,arg3,arg4);
  swig_a->result = result;
  {
    int* a = (int *) swig_a->arg3.array;
    a[0] = temp3;
  }
  {
    int* a = (int *) swig_a->arg4.array;
    a[0] = temp4;
  }

}

#ifdef __cplusplus
}
#endif


er(pointstr) then --if the points entered are a number, just return that number
		return tonumber(pointstr);
	else --if it's entered as a percentage, fetch the current DKP, and return the corresponding percentage
		local matches = {string.match(pointstr,"^([%d%.]+)%%$")};
		if matches then
			local percent = GRSSNumNilZero(matches[1])/100;
			local current = GRSSLookupPlayerDKP(playername,sys);
			return current * percent;
		else
			return 0;
		end
	end
end

function GRSSGetPlayerDKP(players)
	local dkp = {};
	for sys in pairs(GRSS_Systems) do
		for i,v in pairs(GRSS_Full_DKP[sys]) do
			for name in string.gmatch(players,"([%S,]+)") do
				if string.lower(v.name)==string.lower(name) then
					local total;
					if GRSS_Divide[sys] == nil then
						total = GRSSNumNilZero(v.earned) + GRSSNumNilZero(v.adj) - GRSSNumNilZero(v.spent)
					else
						total = GRSSNumNilZero(v.earned) / GRSSNumNilOne(v.spent);
					end
					--total = GRSSNumNilZero(v.earned) + GRSSNumNilZero(v.adj) - GRSSNumNilZero(v.spent);
					table.insert(dkp,"("..sys..") "..name.."("..v.class.."): "..total);
				end
			end
		end
	end
	return dkp;
end

function GRSS_CompareVersions()
	if not GRSSNewVersionPrinted then
		if GRSSNewestVersion then
			if GRSSNewestVersion~=GRSSVersion then
				GRSSNewVersionPrinted = true;
				GRSSPrint("|c00ff0000There is a newer version of the GuildRaidSnapShot mod ("..GRSSNewestVersion..") available.  Please download the newest version from www.dkpsystem.com|r");
			end
		end
	end
end

function GuildRaidSnapShot_SlashHandler(msg)
	local newboss;
	msglower = string.lower(msg);
	if msglower=="" or msglower=="help" or msglower=="?" then
		for i,v in pairs(GRSSUsage) do
			DEFAULT_CHAT_FRAME:AddMessage(v);
		end
		for i,v in pairs(GRSSHelpMsg) do
			local tellcolor = "|c00ffff00";
			local endcolor = "|r";
			v = string.gsub(v,"^(.+) = (.+)",tellcolor.."%1"..endcolor.." = %2");
			DEFAULT_CHAT_FRAME:AddMessage(v);
		end
	elseif msglower=="reset" or msglower=="purge" then
		GuildRaidSnapShot_SnapShots = {};
		GuildRaidSnapShot_Loot = {};
		GuildRaidSnapShot_Adj = {};
		GRSSPrint("Snapshots Purged");
	elseif msglower == "noauto" then
		GRSS_Auto = 0;
		GRSSPrint("Auto Snapshots Disabled");
	elseif msglower == "yesauto" then
		GRSS_Auto = 1;
		GRSSPrint("Auto Snapshots Enabled");
	elseif msglower == "yesloot" then
		GRSS_LootCap = 1;
		GRSSPrint("Looting will now result in popups prompting for points");
	elseif msglower == "noloot" then
		GRSS_LootCap = 0;
		GRSSPrint("Looting will no longer result in popups prompting for points");
	elseif msglower == "yessnapshotpopup" or msglower == "yessnapshotpopups" or


{font-family:'Roboto',Segoe UI,Helvetica Neue,Ubuntu,Arial;font-size:13px;color:rgba(0,0,0,.87)}.e-gantt .e-search .e-ejinputtext::selection,.e-ganttdialog .e-ejinputtext::selection{background:#ff4081;color:#fff}.e-gantt .e-toolbar>.e-horizontal.e-ul:first-child{padding-left:20px;box-sizing:border-box;margin-top:0 !important}.e-ganttdialog .e-ejinputtext{border-width:0 0 1px 0;color:rgba(0,0,0,.87)}.e-ganttdialog .e-ejinputtext:focus{box-shadow:none;border-width:0 0 2px 0;border-color:#ff4081}.e-ganttdialog .e-titlebar.e-dialog{background:#3f51b5;color:#fff;font-family:'Roboto',Segoe UI,Helvetica Neue,Ubuntu,Arial}.e-ganttdialog .e-dialog-icon:before,.e-ganttdialog .e-tab .e-header.e-addborderbottom .e-active .e-link{color:#fff}.e-ganttdialog .e-dialog-icon:hover{background:none}.e-ganttdialog .e-dialog-icon:before:hover{background:transparent;color:#000}.e-ganttdialog .e-addborderbottom.e-header{background:#3f51b5}.e-ganttdialog .e-tab .e-header li a,.e-ganttdialog .e-tab .e-header li a:hover{color:rgba(255,255,255,.7)}.e-ganttdialog .e-tab.e-js .e-header>.e-item:hover{background:none}.e-ganttdialog .e-general-edit-div{font-family:'Roboto',Segoe UI,Helvetica Neue,Ubuntu,Arial;font-size:13px;color:rgba(0,0,0,.38)}.e-ganttdialog .e-editform-btn .e-btn.e-select,.e-ganttdialog .e-editform-btn .e-btn.e-select:hover,.e-ganttdialog .e-editform-btn .e-btn.e-select:active{color:#ff4081;border-width:0}.e-ganttdialog .e-editform-btn .e-btn.e-select,.e-ganttdialog .e-editform-btn .e-btn.e-select:hover{background:none;box-shadow:none}.e-ganttdialog .e-editform-btn .e-btn.e-select:hover{background:rgba(0,0,0,.12)}.e-ganttdialog .e-editform-btn .e-btn.e-select:active{box-shadow:none;background:rgba(255,64,129,.12)}.e-gantt .e-gantt-search-container{margin-top:0 !important}.e-gantt .e-ganttpopup .e-popupcontent{background-color:#fff;border-color:#e0e0e0}.e-gantt .e-ganttpopup span:hover,.e-gantt .e-ganttpopup .e-spanclicked{border-color:#424242}.e-gantt .e-ganttpopup .e-downtail:before,.e-gantt .e-ganttpopup .e-downtail{border-top-color:#e0e0e0}.e-gantt .e-ganttpopup .e-downtail:after{border-top-color:#fff}.e-content-area{background-color:#fff;color:#111;border-color:#e0e0e0;font-family:'Roboto',Segoe UI,Helvetica Neue,Ubuntu,Arial}.e-rangeScroll-select{fill:whitesmoke;stroke:#e0e0e0}.e-rangeScroll-select:hover{fill:#e0e0e0;stroke:#e0e0e0}.e-rangeScroll-select:active{fill:#e0e0e0;stroke:#e0e0e0}.e-rangeScroll-select-hover{fill:#e0e0e0;stroke:#e0e0e0}.e-rangeScr


@include foundation-close-button;
// @include foundation-drilldown-menu;
// @include foundation-dropdown;
// @include foundation-dropdown-menu;
// @include foundation-flex-video;
@include foundation-label;
// @include foundation-media-object;
// @include foundation-menu;
// @include foundation-off-canvas;
// @include foundation-orbit;
// @include foundation-pagination;
// @include foundation-progress-bar;
// @include foundation-slider;
// @include foundation-sticky;
// @include foundation-reveal;
// @include foundation-switch;
@include foundation-table;
// @include foundation-tabs;
// @include foundation-thumbnail;
// @include foundation-title-bar;
// @include foundation-tooltip;
// @include foundation-top-bar;
/*

Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/

*/

.hljs {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  background: #23241f;
}

.hljs,
.hljs-tag,
.hljs-subst {
  color: #f8f8f2;
}

.hljs-strong,
.hljs-emphasis {
  color: #a8a8a2;
}

.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
  color: #ae81ff;
}

.hljs-code,
.hljs-title,
.hljs-section,
.hljs-selector-class {
  color: #a6e22e;
}

.hljs-strong {
  font-weight: bold;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-attr {
  color: #f92672;
}

.hljs-symbol,
.hljs-attribute {
  color: #66d9ef;
}

.hljs-params,
.hljs-class .hljs-title {
  color: #f8f8f2;
}

.hljs-string,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-variable {
  color: #e6db74;
}

.hljs-comment,
.hljs-deletion,
.hljs-meta {
  color: #75715e;
}
@charset "UTF-8";
/**
 * Foundation for Sites by ZURB
 * Version 6.4.1
 * foundation.zurb.com
 * Licensed under MIT Open Source
 */
#spectacle {
  /*

Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/

*/ }
  #spectacle .swagger-operation-path:before {
    content: "Path";
    display: block;
    margin-bottom: 0.5em;
    color: #f68b1f;
    text-transform: uppercase;
    font-size: 0.9rem; }
  #spectacle .swagger-operation-description:before {
    content: "Description";
    display: block;
    margin-bottom: 0.5em;
    color: #f68b1f;
    text-transform: uppercase;
    font-size: 0.9rem; }
  #spectacle .swagger-request-params:before {
    content: "Request parameters";
    display: block;
    margin-bottom: 0.5em;
    color: #f68b1f;
    text-transform: uppercase;
    font-size: 0.9rem; }
  #spectacle .swagger-request-body:before {
    content: "Request body";
    display: block;
    margin-bottom: 0.5em;
    color:


kkorde, die über Minuten konstant gehalten werden. Dieser Ansatz unterschied sich radikal von klassischem Metal. Die Musik verlor an Geschwindigkeit, gewann aber an emotionaler Tiefe und neuer Räumlichkeit.

Diese Experimente waren zu Beginn ein Nischenphänomen, fanden jedoch schnell Anhänger in einem Umfeld, das sich nach neuen Ausdrucksformen sehnte. So entstand schon vor der Jahrtausendwende ein Bewusstsein dafür, dass Brachialität und Sanftmut keine Gegensätze sein müssen. Wer genau hinhörte, entdeckte in dieser Stilrichtung eine rohe Poesie aus Lautstärke, Stille und der stets präsenten Dunkelheit.

### Die Stunde der Klangarchitekten: Neue Wege zur Jahrtausendwende

Anfang der **2000er Jahre** gelangen zentrale Durchbrüche. Besonders die Veröffentlichungen von **Isis** und **Cult of Luna** sorgten dafür, dass die Grenzen zwischen Metal, Ambient und zeitgenössischem Post-Rock immer weiter verschwammen. Die Musik dieser Bands ließ sich nicht mehr klar in eine Schublade stecken. In ihren Werken wurden dissonante Gitarrenwände mit fast schon tranceartigen Soundflächen kombiniert.

Zu dieser Phase griffen immer mehr Musikerinnen und Musiker auf moderne Studiotechnik zurück. Effektgeräte, Looper und digitale Bearbeitungswerkzeuge ermöglichten es, den Gitarrensound nahezu endlos zu verwandeln. Stücke wie „Celestial“ oder „Somewhere Along the Highway“ erschienen wie akustische Expeditionen durch sich ständig verändernde Klanglandschaften. Diese Offenheit für technische Innovation spiegelt sich noch heute im Genre wider.

Mit dem Durchbruch von **Jesu** und **Pelican** in den **2000er Jahren** erlebte die Szene einen weiteren Entwicklungsschub. Beide Bands setzten auf eine noch stärkere Fokussierung atmosphärischer Elemente. Schräge Melodien, ruhige Momente und wuchtige Klangwände liefen nicht mehr gegeneinander, sondern verschmolzen zu einem Ganzen. Schlagzeugrhythmen rückten in den Hintergrund, während Loop-basierte Strukturen und sich langsam aufbauende Songs das neue Gesicht des Ambient Metal prägten.

### Die globale Expansion: Austausch über Ländergrenzen hinweg

Mit der rasanten Entwicklung der Kommunikationstechnologien ab etwa **2005** wurde Ambient Metal zu einem weltweiten Phänomen. Nicht länger konzentrierte sich die Szene nur auf Europa und Nordamerika. Dank des Internets und sozialer Plattformen erreichten neue Einflüsse auch Asien, Ozeanien und Südamerika. Bands wie **Mono** aus Japan oder **Russian Circles** aus den USA erweiterten die stilistischen Möglichkeiten nochmals entscheidend.

Regionale Eigenheiten prägten die Entwicklung des Genres. In Skandinavien mischten etwa schwedische Bands eisige Klangfarben in ihre Musik, während Gruppen aus Großbritannien wie **Bossk** verstärkt auf minimalistische Strukturen und fließende Übergänge setzten. In Australien wiederum arbeiteten Musiker verstärkt mit Field Recordings, also Originalaufnahmen von Natur- und Stadtgeräuschen, die in den Sound integriert wurden.

Diese weltweite Vernetzung führte dazu, dass Ambient Metal heute kaum noch regionale Grenzen kennt. Musikalische Ideen und Produktionswe


vInit();
}

struct BurnDriver BurnDrvKarnovj = {
	"karnovj", "karnov", NULL, NULL, "1987",
	"Karnov (Japan)\0", NULL, "Data East Corporation", "Miscellaneous",
	NULL, NULL, NULL, NULL,
	BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_PREFIX_DATAEAST, GBF_PLATFORM | GBF_HORSHOOT, 0,
	NULL, karnovjRomInfo, karnovjRomName, NULL, NULL, KarnovInputInfo, KarnovDIPInfo,
	KarnovjInit, DrvExit, DrvFrame, DrvDraw, DrvScan,
	&DrvRecalc, 0x300, 256, 248, 4, 3
};

// Wonder Planet (Japan)

static struct BurnRomInfo wndrplntRomDesc[] = {
	{ "ea08.bin",		0x10000, 0xb0578a14, 1 | BRF_PRG | BRF_ESS }, //  0 68k Code
	{ "ea11.bin",		0x10000, 0x271edc6c, 1 | BRF_PRG | BRF_ESS }, //  1
	{ "ea07.bin",		0x10000, 0x7095a7d5, 1 | BRF_PRG | BRF_ESS }, //  2
	{ "ea10.bin",		0x10000, 0x81a96475, 1 | BRF_PRG | BRF_ESS }, //  3
	{ "ea06.bin",		0x10000, 0x5951add3, 1 | BRF_PRG | BRF_ESS }, //  4
	{ "ea09.bin",		0x10000, 0xc4b3cb1e, 1 | BRF_PRG | BRF_ESS }, //  5

	{ "ea05.bin",		0x08000, 0x8dbb6231, 2 | BRF_PRG | BRF_ESS }, //  6 m6502 Code

	{ "ea00.bin",		0x08000, 0x9f3cac4c, 3 | BRF_GRA},            //  7 Characters

	{ "ea04.bin",		0x10000, 0x7d701344, 4 | BRF_GRA},            //  8 Tiles
	{ "ea01.bin",		0x10000, 0x18df55fb, 4 | BRF_GRA},            //  9
	{ "ea03.bin",		0x10000, 0x922ef050, 4 | BRF_GRA},            // 10
	{ "ea02.bin",		0x10000, 0x700fde70, 4 | BRF_GRA},            // 11

	{ "ea12.bin",		0x10000, 0xa6d4e99d, 5 | BRF_GRA},            // 12 Sprites
	{ "ea14.bin",		0x10000, 0x915ffdc9, 5 | BRF_GRA},            // 13
	{ "ea13.bin",		0x10000, 0xcd839f3a, 5 | BRF_GRA},            // 14
	{ "ea15.bin",		0x10000, 0xa1f14f16, 5 | BRF_GRA},            // 15
	{ "ea16.bin",		0x10000, 0x7a1d8a9c, 5 | BRF_GRA},            // 16
	{ "ea17.bin",		0x10000, 0x21a3223d, 5 | BRF_GRA},            // 17
	{ "ea18.bin",		0x10000, 0x3fb2cec7, 5 | BRF_GRA},            // 18
	{ "ea19.bin",		0x10000, 0x87cf03b5, 5 | BRF_GRA},            // 19

	{ "ea21.prm",		0x00400, 0xc8beab49, 6 | BRF_GRA


.length - 1; index > -1; -- index) {

					let value = map[index];
					let tile_x = (index % map_columns) * tile_size;
					let tile_y = Math.floor(index / map_columns) * tile_size;

					buffer.drawImage(tile_set, value * tile_size, 0, tile_size, tile_size, tile_x, tile_y, tile_size, tile_size);

				}

				for (let index = players.length - 1; index > -1; -- index) {

					let player = players[index];

					player.behave();

					// Added Math.round after video
					buffer.drawImage(tile_set, player.source_x, 0, tile_size, tile_size, Math.round(player.x), Math.round(player.y), tile_size, tile_size);

				}

				pointer.down = false;

				context.drawImage(buffer.canvas, 0, 0, buffer.canvas.width, buffer.canvas.height, 0, 0, context.canvas.width, context.canvas.height);

			}

			buffer.canvas.height = map_rows * tile_size;
			buffer.canvas.width = map_columns * tile_size;

			tile_set.addEventListener("load", (event) => { loop(); });
			tile_set.src = "platformer-ai.png";

			context.canvas.addEventListener("click", (event) => {

				var rectangle = event.target.getBoundingClientRect();

				pointer.x = (event.pageX - rectangle.left) / map_scale;
				pointer.y = (event.pageY - rectangle.top) / map_scale;
				pointer.down = true;

			});

		</script>

<!DOCTYPE html>

    <link href = "pre-scale-performance.css" rel = "stylesheet" type = "text/css">

    <meta name = "viewport" content = "width=device-width">
    <meta name = "description" content = "Tests two methods for scaling graphics with HTML5 canvas. Find out which is faster!">

    <title>PoP Vlog - Pre-Scale Performance</title>

PoP Vlog
Pre-Scale Performance

    <canvas></canvas>

      + 100method: scale- 100

This application compares the rendering speed of three drawing methods: scale,
      pre-scale, and pre-scaled-sheet. Scale draws graphics from the source image
      to a buffer, which is then scaled and drawn to the screen. Pre-scale creates
      individual scaled canvas elements for each sprite in the source image and then
      draws them directly to the screen. Pre-scaled-sheet draws the source image to
      a larger canvas element, and then those scaled graphics are drawn directly to
      the screen.

<!DOCTYPE html>

    <meta name = "viewport" content = "width=device-width">


per.onDestroyView()
        lifecycleSubject.onNext(FragmentEvent.DESTROY_VIEW)
    }

    override fun onDestroy() {
        super.onDestroy()
        lifecycleSubject.onNext(FragmentEvent.DESTROY)
        childFragmentManager.removeOnBackStackChangedListener(backStackChangeListener)
    }

    override fun onDetach() {
        super.onDetach()
        lifecycleSubject.onNext(FragmentEvent.DETACH)
        childBackPressedCallback.isEnabled = false
        childBackPressedCallback.remove()
    }

    fun addFragmentPageToChildStack(
        fragment: Fragment,
        addToBackstack: Boolean,
        @IdRes containerId: Int = 0,
    ) {
        if (!fragment.lifecycle.currentState.isAtLeast(Lifecycle.State.CREATED)) {
            return
        }
        val containerViewId = if (containerId != 0 && containerId != View.NO_ID) {
            containerId
        }
        else if (view != null) {
            if (requireView().id == View.NO_ID) {
                requireView().id = View.generateViewId()
            }
            requireView().id
        }
        else {
            return
        }
        val tag = "${fragment.javaClass.getSimpleName()}#${fragment.hashCode()}"
        val transaction = getChildFragmentManager().beginTransaction()
        if (fragment.isAdded) {
            transaction.remove(fragment)
        }
        transaction.add(containerViewId, fragment, tag)
        if (addToBackstack) {
            transaction.addToBackStack(tag)
        }
        transaction.commitAllowingStateLoss()
    }

    fun addFragmentPageToParentStack(
        fragment: Fragment,
        addToBackstack: Boolean,
        @IdRes containerId: Int = 0,
    ) {
        if (activity == null || !requireActivity().lifecycle.currentState.isAtLeast(Lifecycle.State.INITIALIZED)) {
            return
        }
        val containerViewId = if (containerId != 0 && containerId != View.NO_ID) {
            containerId
        } else if (requireActivity().findViewById<View>(android.R.id.content) != null) {
            android.R.id.content
        } else {
            return
        }
        val tag = fragment.javaClass.getSimpleName() + fragment.hashCode()
        val transaction = parentFragmentManager.beginTransaction()
        if (fragment.isAdded) {
            transaction.remove(fragment)
        }
        transaction.add(containerViewId, fragment, tag)
        if (addToBackstack) {
            transaction.addToBackStack(tag)
        }
        transaction.commitAllowingStateLoss()
    }

    fun popAllChildFragmentPages() {
        for (i in 0 until childFragmentManager.backStackEntryCount) {
            getChildFragmentManager().popBackStack()
        }
    }

    fun popSelf() {
        parentFragmentManager.beginTransaction()
        .remove(this)
        .commitAllowingStateLoss()
    }

    /**
     * 设置当前页面内的fragment栈是否允许通过系统back键回退
     * 通常在一个Activity内存在多个fragment tab，其中某一个tab的fragment栈与activity的整个回退栈出现冲突时使用
     * 比如首页某个tab fragment拥有回退栈，但在其他tab时不需要回退栈生效，避免出现点击back无响应的情况
     */
    fun setChildBackPressedCallbackEnabled(enabled: Boolean) {
        childBackPressedEnabled = enabled
        childBackPressedCallback.isEnabled =
            childBackPressedEnabled && childFragmentManager.backStackEntryCount > 0
    }
}
/*
 *  Copyright 2011 Yuri Kanivets
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software


    internal UniquePSObjectHelper(PSObject o, int notePropertyCount)
            {
                WrittenObject = o;
                this.notePropertyCount = notePropertyCount;
            }
            internal readonly PSObject WrittenObject;
            internal int NotePropertyCount
            {
                get { return notePropertyCount; }
            }
            private int notePropertyCount;
        }

        #endregion
    }
}


	%s
	],
	zInv: %s
}
`

var rcTemplate = `{
	blockNum: %d,
	subId: %d,
	callbackGasLimit: %d,
	numWords: %d,
	sender: %s,
	extraArgs: %s
}
`

func generateProofForV2Plus(e helpers.Environment) {
	deployCmd := flag.NewFlagSet("generate-proof-v2-plus", flag.ExitOnError)

	keyHashString := deployCmd.String("key-hash", "", "key hash for VRF request")
	preSeedString := deployCmd.String("pre-seed", "", "pre-seed for VRF request")
	blockhashString := deployCmd.String("block-hash", "", "blockhash of VRF request")
	blockNum := deployCmd.Uint64("block-num", 0, "block number of VRF request")
	senderString := deployCmd.String("sender", "", "requestor of VRF request")
	secretKeyString := deployCmd.String("secret-key", "10", "secret key for VRF V2Key")
	subId := deployCmd.String("sub-id", "1", "subscription Id for VRF request")
	callbackGasLimit := deployCmd.Uint64("gas-limit", 1_000_000, "callback gas limit for VRF request")
	numWords := deployCmd.Uint64("num-words", 1, "number of words for VRF request")
	nativePayment := deployCmd.Bool("native-payment", false, "requestor of VRF request")

	helpers.ParseArgs(
		deployCmd, os.Args[2:], "key-hash", "pre-seed", "block-hash", "block-num", "sender",
	)

	// Generate V2Key from secret key.
	secretKey := decimal.RequireFromString(*secretKeyString).BigInt()
	key := vrfkey.MustNewV2XXXTestingOnly(secretKey)
	uncompressed, err := key.PublicKey.StringUncompressed()
	if err != nil {
		panic(err)
	}
	pk := key.PublicKey
	pkh := pk.MustHash()
	fmt.Println("Compressed: ", pk.String())
	fmt.Println("Uncompressed: ", uncompressed)
	fmt.Println("Hash: ", pkh.String())

	// Parse big ints and hexes.
	requestKeyHash := common.HexToHash(*keyHashString)
	requestPreSeed := decimal.RequireFromString(*preSeedString).BigInt()
	sender := common.HexToAddress(*senderString)
	blockHash := common.HexToHash(*blockhashString)

	// Ensure that the provided keyhash of the request matches the keyhash of the secret key.
	if !bytes.Equal(requestKeyHash[:], pkh[:]) {
		helpers.PanicErr(errors.New("invalid key hash"))
	}

	// Generate proof.
	preSeed, err := proof.BigToSeed(requestPreSeed)
	if err != nil {
		helpers.PanicErr(fmt.Errorf("unable to parse preseed: %w", err))
	}

	parsedSubId, ok := new(big.Int).SetString(*subId, 10)
	if !ok {
		helpers.PanicErr(fmt.Errorf("unable to parse subID: %s %w", *subId, err))
	}
	extraArgs, err := extraargs.EncodeV1(*nativePayment)
	helpers.PanicErr(err)
	preSeedData := proof.PreSeedDataV2Plus{
		PreSeed:          preSeed,
		BlockHash:        blockHash,
		BlockNum:         *blockNum,
		SubId:            parsedSubId,
		CallbackGasLimit: uint32(*callbackGasLimit),
		NumWords:         uint32(*numWords),
		Sender:           sender,
		ExtraArgs:        extraArgs,
	}
	finalSeed := proof.FinalSeedV2


bj.vm, //主版本号用于分类

        /*--2019-06-11新增--*/
        uvId: that.getUvId(), //uv版本号
        vcname: params["vcname"], //端上版本号
        cuid: params["cuid"],
        sdkVersion: "_sdkVersion_", //上报sdk版本号

        /**--2019-07-08新增运行环境--*/
        jre: that.getJRE(params),
        cname: params["province"]
      };
      rtObj = this.assign(rtObj, that.getBI());
      if (
        assignObj &&
        Object.prototype.toString.call(assignObj) === "[object Object]"
      ) {
        rtObj["extColumn"] = assignObj;
      }
      return rtObj;
    },

    /**
     * 客户端检测（浏览器，操作系统，平台）
     * @author duankai
     */
    client() {},
    /**
     * 获取dom样式
     * @param element
     * @param att
     */
    getStyle(element, att) {
      //特性侦测
      if (window.getComputedStyle) {
        //优先使用W3C规范
        return window.getComputedStyle(element)[att];
      } else {
        //针对IE9以下兼容
        return element.currentStyle[att];
      }
    },
    /**
     * onReady
     * @param cb
     */
    onReady(cb) {
      if (this.hasReady) {
        cb && cb();
        return;
      }
      if (doc.readyState === "complete") {
        cb && cb();
      } else {
        this.on(win, "load", () => {
          this.hasReady = true;
          cb && cb();
        });
      }
    },
    /**
     * on事件
     */
    on: (function() {
      if (win.addEventListener) {
        return function(ele, type, fun) {
          ele.addEventListener(type, fun, !0);
        };
      } else if ("attachEvent" in win) {
        return function(ele, type, fun) {
          ele.attachEvent("on" + type, fun);
        };
      }
    })(),
    /**
     * off事件
     */
    off: (function() {
      if (win.removeEventListener) {
        return function(ele, type, fun) {
          ele.removeEventListener(type, fun, !0);
        };
      } else if ("detachEvent" in win) {
        return function(ele, type, fun) {
          ele.detachEvent("on" + type, fun);
        };
      }
    })()
  };
})();

export default tools;
import { NextFunction, Request, Response } from "express";
import { get, omit } from "lodash";
import log from "../logger";
import { ChatRoomDocument } from "../model/chatroom.model";
import { addMessageInChatRoom, addUserInChatRoom, createChatRoom, findChatRoomById } from "../service/chatroom.service";
import { addChatInUsers } from "./user.controller";

//Validates Chat if there is no chat
//then creates one with 2 person i.e. Sender and Receiver
export async function validateChatRoomHandler(req: Request, res: Response, next: NextFunction) {
	// log.info("Validating Chat");
	const chat = await findChatRoomById(req.body.message.chatId);
	if (!chat) {
		req.body.message.chatId = await createChatRoom(req.body.message);
		req.body.message.chatId = req.body.message.chatId._id;
		await addUserInChatRoom(req.body.message.chatId, req.body.message.receiver);
		await addUserInChatRoom(req.body.


/pkg/runtime/schema"
	"k8s.io/client-go/informers"
	coreinformers "k8s.io/client-go/informers/core/v1"
	"k8s.io/client-go/kubernetes/fake"
	core "k8s.io/client-go/testing"
	api "k8s.io/kubernetes/pkg/apis/core"
)

func init() {
	spew.Config.DisableMethods = true
}

func newTokenCleaner() (*TokenCleaner, *fake.Clientset, coreinformers.SecretInformer, error) {
	options := DefaultTokenCleanerOptions()
	cl := fake.NewSimpleClientset()
	informerFactory := informers.NewSharedInformerFactory(cl, options.SecretResync)
	secrets := informerFactory.Core().V1().Secrets()
	tcc, err := NewTokenCleaner(cl, secrets, options)
	if err != nil {
		return nil, nil, nil, err
	}
	return tcc, cl, secrets, nil
}

func TestCleanerNoExpiration(t *testing.T) {
	cleaner, cl, secrets, err := newTokenCleaner()
	if err != nil {
		t.Fatalf("error creating TokenCleaner: %v", err)
	}

	secret := newTokenSecret("tokenID", "tokenSecret")
	secrets.Informer().GetIndexer().Add(secret)

	cleaner.evalSecret(secret)

	expected := []core.Action{}

	verifyActions(t, expected, cl.Actions())
}

func TestCleanerExpired(t *testing.T) {
	cleaner, cl, secrets, err := newTokenCleaner()
	if err != nil {
		t.Fatalf("error creating TokenCleaner: %v", err)
	}

	secret := newTokenSecret("tokenID", "tokenSecret")
	addSecretExpiration(secret, timeString(-time.Hour))
	secrets.Informer().GetIndexer().Add(secret)

	cleaner.evalSecret(secret)

	expected := []core.Action{
		core.NewDeleteAction(
			schema.GroupVersionResource{Version: "v1", Resource: "secrets"},
			api.NamespaceSystem,
			secret.ObjectMeta.Name),
	}

	verifyActions(t, expected, cl.Actions())
}

func TestCleanerNotExpired(t *testing.T) {
	cleaner, cl, secrets, err := newTokenCleaner()
	if err != nil {
		t.Fatalf("error creating TokenCleaner: %v", err)
	}

	secret := newTokenSecret("tokenID", "tokenSecret")
	addSecretExpiration(secret, timeString(time.Hour))
	secrets.Informer().GetIndexer().Add(secret)

	cleaner.evalSecret(secret)

	expected := []core.Action{}

	verifyActions(t, expected, cl.Actions())
}
/*
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package replication

import (
	"reflect"
	"testing"

	"k8s.io/api/core/v1"
)

var (
	imagePullBackOff v1.ReplicationControllerConditionType = "ImagePullBackOff"

	condImagePullBackOff = func() v1.ReplicationControllerCondition {
		return v1.ReplicationControllerCondition{
			Type:   imagePullBackOff,
			Status: v1.ConditionTrue,
			Reason: "NonExistentImage",
		}
	}

	condReplicaFailure = func() v1.ReplicationControllerCondition {
		return v1.ReplicationControllerCondition{
			Type:   v1.ReplicationControllerReplicaFailure,
			Status: v1


.  If not, see <https://www.gnu.org/licenses/>.
 */

package com.itsaky.androidide.inflater.utils

import com.android.aaptcompiler.AaptResourceType
import com.android.aaptcompiler.ResourceFile.Type.ProtoXml
import com.android.aaptcompiler.XmlProcessor
import com.android.aaptcompiler.extractPathData
import com.itsaky.androidide.aapt.logging.IDELogger
import com.itsaky.androidide.inflater.IAttribute
import com.itsaky.androidide.inflater.IComponentFactory
import com.itsaky.androidide.inflater.ILayoutInflater
import com.itsaky.androidide.inflater.ILayoutInflater.Companion
import com.itsaky.androidide.inflater.INamespace
import com.itsaky.androidide.inflater.IView
import com.itsaky.androidide.inflater.InflateException
import com.itsaky.androidide.inflater.internal.AttributeImpl
import com.itsaky.androidide.lookup.Lookup
import com.itsaky.androidide.projects.IProjectManager
import com.itsaky.androidide.projects.android.AndroidModule
import java.io.File

/** Get the [ILayoutInflater] registered with [Lookup]. */
fun lookupLayoutInflater(): ILayoutInflater? {
  return Lookup.getDefault().lookup(Companion.LOOKUP_KEY)
}

/** Get the [IComponentFactory] registered with [Lookup]. */
fun lookupComponentFactory(): IComponentFactory? {
  return Lookup.getDefault().lookup(IComponentFactory.LAYOUT_INFLATER_COMPONENT_FACTORY_KEY)
}

@JvmOverloads
fun newAttribute(
  view: IView? = null,
  attribute: IAttribute,
  namespace: INamespace? = null,
  name: String? = null,
  value: String? = null
): IAttribute {
  return newAttribute(
    view = view,
    namespace = namespace ?: attribute.namespace,
    name = name ?: attribute.name,
    value = value ?: attribute.value
  )
}

@JvmOverloads
fun newAttribute(
  view: IView? = null,
  namespace: INamespace? = INamespace.ANDROID,
  name: String,
  value: String
): IAttribute {
  val componentFactory = lookupComponentFactory()
  if (componentFactory != null && view != null) {
    return componentFactory.createAttr(view, namespace, name, value)
  }
  return AttributeImpl(namespace, name, value)
}

/**
 * Processes the XML file using [XmlProcessor].
 *
 * @param file The file to process.
 * @param expectedType The expected [type][AaptResourceType] for the XML file.
 * @return The pair of [XmlProcessor] (processed) instance and the [AndroidModule] instance for the
 *   given file.
 */
fun processXmlFile(file: File, expectedType: com.android.aaptcompiler.AaptResourceType): Pair<XmlProcessor, AndroidModule> {
  val pathData = extractPathData(file)
  if (pathData.type != expectedType) {
    throw InflateException("File is not a layout file.")
  }

  if (IProjectManager.getInstance().getWorkspace() == null) {
    throw InflateException("GradleProject is not initialized!")
  }

  val module =
    IProjectManager.getInstance().getWorkspace()?.findModuleForFile(file, false) as? AndroidModule
      ?: throw InflateException("Cannot find module for given file. Is the project initialized?")
  val resFile =
    com.android.aaptcompiler.ResourceFile(
      com.android.aaptcompiler.ResourceName(module.namespace, pathData.type!!, pathData.name),
      pathData.config,
      pathData.source,
      ProtoXml
    )

  val processor = XmlProcessor(pathData.source, com.android.aaptcompiler.BlameLogger(IDELogger))
  processor.process(resFile, file.inputStream())
  return processor to module
}
/*
 *  This file is part of AndroidIDE.
 *
 *  AndroidIDE is free software: you can redistribute it and


)
    fun `test cordapp configuration`() {
        val configProvider = MockCordappConfigProvider()
        configProvider.cordappConfigs["corda-finance-contracts"] = ConfigFactory.parseString("key=value")
        val provider = newCordappProvider(setOf(currentFinanceContractsJar), cordappConfigProvider = configProvider)

        val expected = provider.getAppContext(provider.cordapps.first()).config

        assertThat(expected.getString("key")).isEqualTo("value")
    }

    @Test(timeout=300_000)
    fun getCordappForFlow() {
        val provider = newCordappProvider(setOf(currentFinanceWorkflowsJar))
        val cashIssueFlow = CashIssueFlow(10.DOLLARS, OpaqueBytes.of(0x00), TestIdentity(ALICE_NAME).party)
        assertThat(provider.getCordappForFlow(cashIssueFlow)?.jarPath?.toPath()).isEqualTo(currentFinanceWorkflowsJar)
    }

    @Test(timeout=300_000)
    fun `does not load the same flow across different CorDapps`() {
        val unsignedJar = tempFolder.newFile("duplicate.jar").toPath()
        currentFinanceWorkflowsJar.copyTo(unsignedJar, overwrite = true)
        // We just need to change the file's hash and thus avoid the duplicate CorDapp check
        unsignedJar.unsignJar()
        assertThat(unsignedJar.hash).isNotEqualTo(currentFinanceWorkflowsJar.hash)
        assertFailsWith<MultipleCordappsForFlowException> {
            newCordappProvider(setOf(currentFinanceWorkflowsJar, unsignedJar))
        }
    }

    @Test(timeout=300_000)
    fun `retrieving legacy attachment for contract on network that does not support pre-412 `() {
        val provider = newCordappProvider(setOf(currentFinanceContractsJar), setOf(legacyFinanceContractsJar))
        val (current, legacy) = provider.getContractAttachments(Cash::class.java.name, PlatformVersionSwitches.LEGACY_ATTACHMENTS)!!
        assertThat(current.id).isEqualTo(currentFinanceContractsJar.hash)
        assertThat(legacy?.id).isNull()
        // getContractAttachmentID should always return the non-legacy attachment ID
        assertThat(provider.getContractAttachmentID(Cash::class.java.name)).isEqualTo(currentFinanceContractsJar.hash)
    }

    @Test(timeout = 300_000)
    fun `retrieving legacy attachment for contract on mixed network of versions`() {
        val provider = newCordappProvider(setOf(currentFinanceContractsJar), setOf(legacyFinanceContractsJar))
        val (current, legacy) = provider.getContractAttachments(Cash::class.java.name, PlatformVersionSwitches.LEGACY_ATTACHMENTS - 1)!!
        assertThat(current.id).isEqualTo(currentFinanceContractsJar.hash)
        assertThat(legacy?.id).isEqualTo(legacyFinanceContractsJar.hash)
        // getContractAttachmentID should always return the non-legacy attachment ID
        assertThat(provider.getContractAttachmentID(Cash::class.java.name)).isEqualTo(currentFinanceContractsJar.hash)
    }

    @Test(timeout=300_000)
	fun `test fixup rule that adds attachment`() {
        val fixupJar = File.createTempFile("fixup", ".jar")
            .writeFixupRules("$ID1 => $ID2, $ID3")
        val fixedIDs = with(newCordappProvider(setOf(fixupJar.toPath()))) {
            attachmentFixups.fixupAttachmentIds(listOf(ID1))
        }
        assertThat(fixedIDs).containsExactly(ID2, ID3)
    }

    @Test(timeout=300_000)
	fun `test fixup rule that deletes attachmen


) {
    if base.is_empty() {
        return;
    }
    // note about times: the first markdown template expansion (whatever it is)
    // costs a lot when there's a filtering. I don't know exactly why.
    let lines = &base.lines;
    for field in &printer.fields.0 {
        match field {
            Field::Dates => {
                let histogram = Histogram::from(base);
                time!(
                    "histogram printing",
                    histogram.print(printer),
                );
            }
            Field::Methods => {
                time!(
                    "print_methods",
                    methods::print_methods(lines, printer, trend_computer),
                );
            }
            Field::Status => {
                time!(
                    "print_status_codes",
                    status::print_status_codes(lines, printer, trend_computer),
                );
            }
            Field::Ip => {
                time!(
                    "print_remote_addresses",
                    addr::print_remote_addresses(lines, printer, trend_computer),
                );
            }
            Field::Referers => {
                time!(
                    "print_referers",
                    referers::print_referers(lines, printer, trend_computer),
                );
            }
            Field::Paths => {
                time!(
                    "print_paths",
                    paths::print_paths(lines, printer, trend_computer),
                );
            }
        }
    }
}
<reponame>petrosagg/differential-dataflow<filename>server/src/lib.rs
extern crate libloading;
extern crate timely;
extern crate differential_dataflow;

use std::any::Any;
use std::rc::Rc;
use std::collections::HashMap;
use std::time::Instant;

use libloading::Library;

use timely::communication::Allocator;
use timely::worker::Worker;
use timely::dataflow::scopes::Child;
use timely::dataflow::operators::probe::Handle as ProbeHandle;

// stuff for talking about shared trace types ...
use differential_dataflow::operators::arrange::TraceAgent;
use differential_dataflow::trace::implementations::spine_fueled::Spine;
use differential_dataflow::trace::implementations::ord::OrdValBatch;

// These are all defined here so that users can be assured a common layout.
pub type RootTime = usize;
type TraceBatch = OrdValBatch<usize, usize, RootTime, isize>;
type TraceSpine = Spine<usize, usize, RootTime, isize, Rc<TraceBatch>>;
pub type TraceHandle = TraceAgent<usize, usize, RootTime, isize, TraceSpine>;

/// Arguments provided to each shared library to help build their dataflows and register their results.
pub type Environment<'a, 'b> = (
    &'a mut Child<'b, Worker<Allocator>,usize>,
    &'a mut TraceHandler,
    &'a mut ProbeHandle<RootTime>,
    &'a Instant,
    &'a [String]
);

/// A wrapper around types that keep their source libraries alive.
///
/// This type is meant to be a smart pointer for a type `T` that needs to keep
/// a `Library` alive, perhaps because its methods would call in to the library.
/// The type should have a specified drop order (viz RFC 1857) which guarentees
/// that the shared library reference drops only after the element itself is
/// dropped. It also implements `Deref` and `DerefMut` to provide the e


tyleContext, ref num);
					styleContext.StyleOnCell = false;
					RenderSharedStyle(rPLHeaderFooter, elementProps, definition, definition.SharedStyle, header, definition.ID, styleContext, ref num);
					RPLItemMeasurement[] children = rPLHeaderFooter.Children;
					if (children != null)
					{
						for (int i = 0; i < children.Length; i++)
						{
							RenderStylesOnlyRecursive(children[i], new StyleContext());
						}
					}
					header.Element = null;
				}
				RPLItemMeasurement footer = m_rplReportSection.Footer;
				if (footer != null)
				{
					RPLHeaderFooter rPLHeaderFooter2 = (RPLHeaderFooter)footer.Element;
					RPLElementProps elementProps2 = rPLHeaderFooter2.ElementProps;
					RPLElementPropsDef definition2 = elementProps2.Definition;
					styleContext.StyleOnCell = true;
					RenderSharedStyle(rPLHeaderFooter2, elementProps2, definition2, definition2.SharedStyle, footer, definition2.ID + "c", styleContext, ref num);
					styleContext.StyleOnCell = false;
					RenderSharedStyle(rPLHeaderFooter2, elementProps2, definition2, definition2.SharedStyle, footer, definition2.ID, styleContext, ref num);
					RPLItemMeasurement[] children2 = rPLHeaderFooter2.Children;
					if (children2 != null)
					{
						for (int j = 0; j < children2.Length; j++)
						{
							RenderStylesOnlyRecursive(children2[j], new StyleContext());
						}
					}
					footer.Element = null;
				}
				RPLItemMeasurement rPLItemMeasurement = new RPLItemMeasurement();
				rPLItemMeasurement.Width = m_pageContent.MaxSectionWidth;
				rPLItemMeasurement.Height = m_rplReportSection.BodyArea.Height;
				RPLItemMeasurement rPLItemMeasurement2 = m_rplReportSection.Columns[0];
				RPLBody rPLBody = (RPLBody)m_rplReportSection.Columns[0].Element;
				RPLElementProps elementProps3 = rPLBody.ElementProps;
				RPLElementPropsDef definition3 = elementProps3.Definition;
				RenderSharedStyle(rPLBody, elementProps3, definition3, definition3.SharedStyle, rPLItemMeasurement, definition3.ID, styleContext, ref num);
				RPLItemMeasurement[] children3 = rPLBody.Children;
				if (children3 != null && children3.Length != 0)
				{
					for (int k = 0; k < children3.Length; k++)
					{
						RenderStylesOnlyRecursive(children3[k], new StyleContext());
					}
				}
				rPLItemMeasurement2.Element = null;
			}
			m_styleStream.Flush();
		}

		internal void RenderStylesOnlyRecursive(RPLItemMeasurement measurement, StyleContext styleContext)
		{
			int borderContext = 0;
			RPLElement element = measurement.Element;
			RPLElementProps elementProps = element.ElementProps;
			RPLElementPropsDef definition = elementProps.Definition;
			RPLStyleProps sharedStyle = definition.SharedStyle;
			string iD = definition.ID;
			object obj = elementProps.Style[26];
			if (element is RPLTextBox)
			{
				RPLTextBoxPropsDef rPLTextBoxPropsDef = (RPLTextBoxPropsDef)definition;
				bool ignoreVerticalAlign = styleContext.IgnoreVerticalAlign;
				if (rPLTextBoxPropsDef.CanSort && !m_usedStyles.ContainsKey(iD + "p"))
				{
					if (rPLTextBoxPropsDef.CanGrow || rPLTextBoxPropsDef.CanShrink)
					{
						styleContext.StyleOnCell = true;
					}
					if (!rPLTextBoxPropsDef.CanGrow && rPLTextBoxPropsDef.CanShrink)
					{
						styleContext.IgnoreVerticalAlign = true


ort { StoreData } from '../src/types/shims';

/** 都道府県IDの最大値。47都道府県 */
const prefMax = 47;
const inputFilenamePrefix = './tmp/01/challenge_yurika_map01_.json';
const outputFilenamePrefix = './tmp/02/challenge_yurika_map01_.json';

(async () => {
  try {
    const storeDataList: StoreData[] = require(path.resolve(`${inputFilenamePrefix}`));

    const result: [string, string | number][] = [['都道府県', '回数']];
    let tokyo23 = 0;
    for (let prefId = 1; prefId <= prefMax; prefId++) {
      // 一つの県に絞り込む
      const prefData = storeDataList.filter(data => data.prefId === prefId);
      if (prefData.length === 0) {
        if (prefId === 9 && tokyo23 !== 0) {
          result.push(['東京', tokyo23]);
        }
        continue;
      }

      let count = prefId === 9 ? tokyo23 : 0;
      prefData.map(data => {
        count += data.eventList.length;
      });

      if (prefId !== 8) {
        result.push([prefData[0].prefName.replace(/[県府区23]/g, '').replace('東京都', '東京'), count]);
      } else {
        tokyo23 = count;
      }
    }
    fs.writeFileSync(`${outputFilenamePrefix}`, JSON.stringify(result, null, '  '));
  } catch (e) {
    console.log(e);
  }
})();
import { State } from "../state/State";
import { CameraControls } from "./enums/CameraControls";

export function cameraControlsToState(cameraControls: CameraControls): State {
    switch (cameraControls) {
        case CameraControls.Custom:
            return State.Custom;
        case CameraControls.Earth:
            return State.Earth;
        case CameraControls.Gravity:
            return State.GravityTraversing;
        case CameraControls.Street:
            return State.Traversing;
        default:
            return null;
    }
}
function add(n1: number, n2: number): number {
  const result = n1 + n2;
  return result;
}

function printResult(n1: number): void {
  console.log(n1);
}

let combineValue: (a: number, b: number) => number;

combineValue = add;

console.log(combineValue(10, 10));
import Game from '../classes/Game';
import _ from 'lodash';
import SocketEvent from '../helpers/SocketEvent';
import Action from '../helpers/Action';

class ConversationStateJustSayNo {
  actionTarget: string;
  count: number;

  constructor(actionTarget: string) {
    this.actionTarget = actionTarget;
    this.count = 0;
  }
}

export function fromClientTargetResponseJustSayNo(
  socket: SocketIO.Socket,
  game: Game,
  cardId: number,
  refreshGameState: () => void
) {
  const player = game.players.filter((p) => p.id === socket.id)[0];
  // If player doesn't have the Just Say No card, stop.
  if (player.hand.filter((c) => c.id === cardId).length === 0) return;

  // Discard the Just Say No card that was just played.
  const discardedCard = _.remove(
    game.players.filter((p) => p.name === player.name)[0].hand,
    (c) => c.id === cardId
  )[0];
  game.discard.push(discardedCard);

  let to = '';
  if (player.id !== game.players[game.currentPlayer].id) {
    // Target just played a Just Say No (1st or 3rd pass).
    to = game.players[game.currentPlayer].id;
  } else {
    // Actor just played a Just Say No (2nd pass).
    // At this point, we have a currentJSNEventHandler, which stores the value needed.
    to = game.currentJSNEventHandler.actionTarget;
  }

  socket
    .to(to)
    .emit(SocketEvent


Prefix) {
		return 0, fmt.Errorf("denom does not start with the cl token prefix")
	}
	parts := strings.Split(denom, "/")
	if len(parts) != 3 {
		return 0, fmt.Errorf("cl token denom does not have the correct number of parts")
	}
	poolIdStr := parts[2]
	poolId, err := strconv.Atoi(poolIdStr)
	if err != nil {
		return 0, fmt.Errorf("failed to convert poolIdStr to integer: %v", err)
	}
	return uint64(poolId), nil
}

func MustGetPoolIdFromShareDenom(denom string) uint64 {
	poolId, err := GetPoolIdFromShareDenom(denom)
	if err != nil {
		panic(err)
	}
	return poolId
}

func GetDenomPrefix(denom string) []byte {
	return append(KeyTotalLiquidity, []byte(denom)...)
}

// CL Hook Keys

// GetPoolPrefixStore returns a unique key for each combination of poolID and prefix
func GetPoolPrefixStoreKey(poolID uint64) []byte {
	return []byte(fmt.Sprintf("%s%d%s", KeyContractHookPrefix, poolID, KeySeparator))
}
package swapstrategy

import (
	"fmt"

	"cosmossdk.io/store/prefix"
	dbm "github.com/cosmos/cosmos-db"
	sdk "github.com/cosmos/cosmos-sdk/types"

	"github.com/osmosis-labs/osmosis/osmomath"
	"github.com/osmosis-labs/osmosis/v30/x/concentrated-liquidity/math"
	"github.com/osmosis-labs/osmosis/v30/x/concentrated-liquidity/types"

	storetypes "cosmossdk.io/store/types"
)

// zeroForOneStrategy implements the swapStrategy interface.
// This implementation assumes that we are swapping token 0 for
// token 1 and performs calculations accordingly.
//
// With this strategy, we are moving to the left of the current
// tick index and square root price.
type zeroForOneStrategy struct {
	sqrtPriceLimit osmomath.BigDec
	storeKey       storetypes.StoreKey
	spreadFactor   osmomath.Dec

	// oneMinusSpreadFactor is 1 - spreadFactor
	oneMinusSpreadFactor osmomath.Dec
	// spfOverOneMinusSpf is spreadFactor / (1 - spreadFactor)
	spfOverOneMinusSpf osmomath.Dec
}

var _ SwapStrategy = (*zeroForOneStrategy)(nil)

func (s zeroForOneStrategy) ZeroForOne() bool { return true }

// GetSqrtTargetPrice returns the target square root price given the next tick square root price.
// If the given nextTickSqrtPrice is less than the sqrt price limit, the sqrt price limit is returned.
// Otherwise, the input nextTickSqrtPrice is returned.
func (s zeroForOneStrategy) GetSqrtTargetPrice(nextTickSqrtPrice osmomath.BigDec) osmomath.BigDec {
	if nextTickSqrtPrice.LT(s.sqrtPriceLimit) {
		return s.sqrtPriceLimit
	}
	return nextTickSqrtPrice
}

// ComputeSwapWithinBucketOutGivenIn calculates the next sqrt price, the amount of token in consumed, the amount out to return to the user, and total spread reward charge on token in.
// Parameters:
//   - sqrtPriceCurrent is the current sqrt price.
//   - sqrtPriceTarget is the target sqrt price computed with GetSqrtTargetPrice(). It must be one of:
//     1. Next tick sqrt price.
//     2. Sqrt price limit representing price impact protection.
//   - liquidity is the amount of liquidity between the sqrt price current and sqrt price target.
//   - amountZeroInRemaining is the amount of token zero in remaining to be swapped. This amount is fully consumed
//     if sqrt price target is not reached. In that case, the returned amountZeroIn is the amount remaining given.
//     Otherwise, the returned amountIn will be smaller than amountZeroInRemaining given.
//
// Returns:
//   - sqrtPriceNext is the next sqrt price. It equals sqrt price target if target is reached. Otherwise, it is in-between sqrt price current and target.
//   - amountZeroIn


local BaseEvent = require("scripts/event-lua/__BasePQ")

-- 配置事件参数
local config = {
    name = "DollHouse",
    instanceName = "DollHouse_",
    minPlayers = 1,
    maxPlayers = 1,
    minLevel = 1,
    maxLevel = 200,
    entryMap = 922000010,
    exitMap = 221024400,
    exitPortal = 4,
    recruitMap = 221024400,
    clearMap = 221024400,
    minMapId = 922000010,
    maxMapId = 922000010,
    eventTime = 10,
    maxLobbies = 1,

    -- 重置地图配置
    resetReactorMaps = { 922000010 },

    -- 任务特有道具
    eventItems = { 4031094 }
}

-- 创建自定义事件
local DollHouse = BaseEvent:extend()

function DollHouse:init()
    em:setProperty("noEntry", "false")
end

function DollHouse:playerEntry(eim, player)
    BaseEvent.playerEn


(t: Any): SMTF = newSMTF { formula mod t }

  fun toInt() = toString().toIntOrNull()
  override fun toString() = formula.toString()
  override fun hashCode() = formula.hashCode()
  override fun equals(other: Any?) =
    other is SMTF && other.formula == this.formula ||
      other is IntegerFormula && formula == other
}package ai.hypergraph.kaliningraph.types

import kotlin.test.Test
import kotlin.time.*

class TypeSystemTests {
  val max = 8

  @Test
  @ExperimentalTime
  fun benchmark() =
    listOf(
      BaseType(
        max = max,
        one = 1,
        nil = 0,
        plus = { a, b -> a + b },
        minus = { a, b -> a - b },
        times = { a, b -> a * b },
        div = { a, b -> a / b },
      ),
      BaseType(
        max = max.toDouble(),
        one = 1.0,
        nil = 0.0,
        plus = { a, b -> a + b },
        minus = { a, b -> a - b },
        times = { a, b -> a * b },
        div = { a, b -> a / b },
      ),
      BaseType(
        max = max.toLong(), one = 1L, nil = 0L,
        plus = { a, b -> a + b }, minus = { a, b -> a - b },
        times = { a, b -> a * b }, div = { a, b -> a / b },
      ),
      BaseType(
        max = max.toFloat(), one = 1f, nil = 0f,
        plus = { a, b -> a + b }, minus = { a, b -> a - b },
        times = { a, b -> a * b }, div = { a, b -> a / b },
      ),
      BaseType(
        max = Rational(max.toInt()),
        nil = Rational.ZERO, one = Rational.ONE,
        plus = { a, b -> a + b }, times = { a, b -> a * b },
        div = { a, b -> a / b }, minus = { a, b -> a - b }
      )
    ) // Benchmark all (types x algebras)
      .forEach { baseType ->
        baseType.algebras().forEach {
          it.benchmark(baseType.max)
        }
      }

  @Test
  fun vectorFieldTest() =
    VectorField.of(f = Field.of(
      nil = 0L,
      one = 1L,
      plus = { a, b -> a + b },
      times = { a, b -> a * b },
      div = { a, b -> a / b },
      minus = { a, b -> a - b }
    )).run {
      println(1L dot Vector.of(0L, 1L))
      println(Vector.of(0L, 1L) + Vector.of(1L, 1L))
    }

  fun <T> BaseType<T>.algebras(): List<Nat<T>> = listOf(
    Nat.of(
      nil = nil,
      vnext = { this + one }
    ),
    Group.of(
      nil = nil, one = one,
      plus = { a, b -> a + b }
    ),
    Ring.of(
      nil = nil, one = one,
      plus = { a, b -> a + b },
      times = { a, b -> a * b }
    ),
    Field.of(
      nil = nil, one = one,
      plus = { a, b -> a + b },
      times = { a, b -> a * b },
      div = { a, b -> a / b },
      minus = { a, b -> a - b }
    )
  )

  data class BaseType<T>(
    val max: T, val one: T, val nil: T,
    val plus: (T, T) -> T,
    val times: (T, T) -> T,


);A=0;va(486,a+4|0,d|0);s=A;A=0;if(!(s&1)){VW(d);break a}s=xb()|0;VW(d);Db(s|0)}case 6:{BB(m,29904,3);A=0;va(486,a+4|0,m|0);s=A;A=0;if(!(s&1)){VW(m);break a}s=xb()|0;VW(m);Db(s|0)}case 0:{BB(c,29856,5);A=0;va(486,a+4|0,c|0);s=A;A=0;if(!(s&1)){VW(c);break a}s=xb()|0;VW(c);Db(s|0)}case 4:{BB(j,29888,3);A=0;va(486,a+4|0,j|0);s=A;A=0;if(!(s&1)){VW(j);break a}s=xb()|0;VW(j);Db(s|0)}case 9:{BB(p,29928,3);A=0;va(486,a+4|0,p|0);s=A;A=0;if(!(s&1)){VW(p);break a}s=xb()|0;VW(p);Db(s|0)}case 8:{BB(o,29920,3);A=0;va(486,a+4|0,o|0);s=A;A=0;if(!(s&1)){VW(o);break a}s=xb()|0;VW(o);Db(s|0)}case 3:{BB(i,29880,4);A=0;va(486,a+4|0,i|0);s=A;A=0;if(!(s&1)){VW(i);break a}s=xb()|0;VW(i);Db(s|0)}case 5:{BB(l,29896,4);A=0;va(486,a+4|0,l|0);s=A;A=0;if(!(s&1)){VW(l);break a}s=xb()|0;VW(l);Db(s|0)}case 7:{BB(n,29912,4);A=0;va(486,a+4|0,n|0);s=A;A=0;if(!(s&1)){VW(n);break a}s=xb()|0;VW(n);Db(s|0)}case 11:{BB(f,29944,1);A=0;va(486,a+4|0,f|0);s=A;A=0;if(!(s&1)){VW(f);break a}s=xb()|0;VW(f);Db(s|0)}case 10:{BB(e,29936,3);A=0;va(486,a+4|0,e|0);s=A;A=0;if(!(s&1)){VW(e);break a}s=xb()|0;VW(e);Db(s|0)}case 12:{BB(g,29952,3);A=0;va(486,a+4|0,g|0);s=A;A=0;if(!(s&1)){VW(g);break a}s=xb()|0;VW(g);Db(s|0)}case 2:{BB(h,29872,4);A=0;va(486,a+4|0,h|0);s=A;A=0;if(!(s&1)){VW(h);break a}s=xb()|0;VW(h);Db(s|0)}default:{}}while(0);s=k[b+68>>2]|0;dd[


networks
*   1 layer-normalized feed-forward cell
*   1 treebank for training
*   1 treebank for tuning
*   1 DRAGNN framework cooking dish (non-stick)
*   1 TensorFlow™ non-convex, stochastic oven (ADAM configuration)
*   Generous helpings of CPU time

## Directions

_First, assemble your network inside your DRAGNN dish:_

*   Put the first LSTM directly on top of your treebank's characters. Use a
    spatula to mark the word boundaries for the rest of the model.
*   Next, lay the second LSTM backwards across the top of the first. Don't
    forget to project the hidden layer down by 1/4 with each LSTM you add to the
    pan. Remember, you only need to put an LSTM cell down just once for each
    word you marked in the previous step.
*   Now lay down your final LSTM running in the forwards direction. Sprinkle
    with POS tags at a ratio of 1:8.
*   Finally, gently put the feed-forward cell down on top. Carefully braid the
    three inputs of the feed-forward layer into the topmost two LSTMs in the
    pan. You'll need to follow the dependency arcs laid out in your training
    treebank to get it just right. (Don't worry -- once baked, your model will
    be able to do this part itself.)
*   Use a good pair of L2-norm scissors to clip any gradients you find that have
    greater than unit norm. (Your gradients should all fit inside the L2 unit
    ball.)
*   Always double check your work before baking!

_Baking instructions:_

*   Prepare your TensorFlow™ brand ADAM-style oven: set temperature to
    beta1=0.9, beta2=0.9, eps=0.0001, and learning rate of 0.001.
*   Par-bake your LSTM crust: Place your assembled dish inside your oven. Bake
    only with POS tags for 10K iterations.
*   Finish cooking the top layers: Next bake for at least 100-200K iterations,
    up to about ~900K iterations for parsing.
*   To speed up convergence, group your training examples into minibatches of
    size 4, and put 4 of them in the oven at a time.
*   Pull your dish out of the oven when you notice holdout set accuracy is no
    longer increasing. Your parser is now ready to serve!

## General cooking tips

Sometimes your dish just doesn't come out right. If this happens to you, just
change your oven's random seed and try again. Usually just one or two restarts
is enough.

Automated Global Analysis of Experimental Dynamics through Low-Dimensional Linear Embeddings

[Sam Moore](https://samavmoore.github.io/), [Brian Mann](https://mems.duke.edu/people/brian-mann/), [Boyuan Chen](http://boyuanchen.com/)

Duke University

[arXiv](https://arxiv.org/abs/2411.00989)
[Project Page](http://generalroboticslab.com/AutomatedGlobalAnalysis)
[Video](https://www.youtube.com/watch?v=8Q5NQegHz50)

## Overview
Dynamical systems theory has long provided a foundation for understanding evolving phenomena across scientific domains. Yet, the application of this theory to complex real-world systems remains challenging due to issues in mathematical modeling, nonlinearity, and high dimensionality. In this work, we introduce a data-driven computational framework to derive low-dimensional linear models for nonlinear dynamical systems directly from raw experimental data. This framework enables global stability analysis through interpretable linear models that capture the underlying system structure. Our approach employs time-delay embedding, physics-informed deep autoencoders, and annealing-based regularization to identify novel low-dimensional coordinate representations, unlocking insights across a variety of simulated and previously unstudied experimental dynamical systems. These new coordinate representations enable accurate long-horizon predictions and automatic identification of intricate invaria