     * @return 格式化后的 JSON 字符串，如果解析失败则返回原始字符串。
     */
    fun String.toPrettyFormat(): String {
        return try {
            val parsedElement = Json.parseToJsonElement(this)
            val prettyJson = formatJsonElement(parsedElement)
            json.encodeToString(prettyJson)
        } catch (e: Exception) {
            e.printStackTrace()
            this
        }
    }

    /**
     * 从字符串中提取所有以 `.apk` 结尾的 URL 链接
     *
     * @return 返回一个包含所有提取到的 `.apk` 文件 URL 链接的列表如果未找到任何 `.apk` 链接，则返回 null
     */
    fun String.getAllAPKUrl(): List<String>? {
        val urlPattern =
            """(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))""".toRegex()
        val urls = urlPattern.findAll(this).map { it.value }.toList()
        val apkUrls = urls.filter { it.endsWith(".apk", ignoreCase = true) }.toSet().toList()
        return if (apkUrls.isEmpty()) null else apkUrls
    }

    /**
     * 格式化 Json 元素的私有方法
     * 此方法用于递归地格式化 Json 对象、数组和原始类型的元素
     * 对于字符串类型的 Json 原始元素，如果其内容本身就是有效的 Json，也会进行格式化
     *
     * @param element 要格式化的 Json 元素
     * @return 格式化后的 Json 元素
     */
    private fun formatJsonElement(element: JsonElement): JsonElement {
        return when (element) {
            is JsonObject -> JsonObject(element.entries.associate { (key, value) ->
                key to formatJsonElement(value)
            })

            is JsonArray -> JsonArray(element.map { formatJsonElement(it) })
            is JsonPrimitive -> if (element.isString && element.content.isJson()) formatJsonElement(
                Json.parseToJsonElement(element.content)
            ) else element
        }
    }

    /**
     * 判断字符串是否为 JSON 格式
     *
     * JSON(JavaScript Object Notation)是一种轻量级的数据交换格式，常见于 Web 服务和客户端之间的数据传输
     * 本函数通过检查字符串是否以左大括号'{'或左方括号'['开始，并以相应的右括号'}'或']'结束，
     * 来简单判断字符串是否为 JSON 格式。这种方法仅适用于格式非常标准且结构简单的JSON字符串的初步判断，
     * **对于复杂的 JSON 结构或包含转义字符的情况则不适用**。


/*
 * Copyright (C) Narf Industries <info@narfindustries.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <libcgc.h>
#include "libc.h"
#include "operation.h"
#include "service.h"

enum {
    MODE_BUILD = 13980,
    MODE_EXAMINE = 809110,
};

int main(void) {

    uint32_t mode[1] = {0};
    int ret = 0;

    while (1) {
        if ((ret = do_nonce()) == 0) {
            RECV(mode, sizeof(uint32_t));

            switch (mode[0]) {
                case MODE_BUILD:
                    ret = do_build();
                    break;
                case MODE_EXAMINE:
                    ret = do_examine();
                    break;
                default:
                    ret = ERR_INVALID_MODE;
            }
        }

        if (ret < 0) {
            SENDSI(ret);
            return ret;
        }
    }
    return ret;
}


#!/usr/bin/env python
# coding=utf-8

# probe on udp port 17185, VxWorks WDBRPC V1 & V2
# By dog2@404

import socket
import struct

def scanV1(host, port=17185, timeout=5):
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.settimeout(timeout)
    payload_hex = 'cc6ff7e2000000000000000255555555000000010000000100000000000000000000000000000000ffff2e700000003026b00001'
    try:
        sock.sendto(payload_hex.decode('hex'), (host, port))
        banner = sock.recv(65536)
    except socket.error as err:
        return None, ''

    return 'vxworks' in banner.lower(), banner

def scanV2(host, port=17185, timeout=5):
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.settimeout(timeout)
    connReq = ''.join([
        struct.pack('>I', 0),  # msgid
        '\x00' * 4,  # msgcall
        '\x00\x00\x00\x02',  # rpc version
        '\x55' * 4,  # wdb programe number
        '\x00\x00\x00\x01',  # programe version
        struct.pack('>I', 122),  # function number: WDB_TARGET_CONNECT2 = 122
        '\x00' * 16,
        '\x00' * 4,
        '\x00\x00\x00\x30',  # packet length
        struct.pack('>I', 0),  # msg seq
    ])

    try:
        sock.sendto(connReq, (host, port))
        resp1 = sock.recv(65536)
    except socket.error as err:
        return None, '', ''

    infoReq = ''.join([
        struct.pack('>I', 1),  # msgid
        '\x00' * 4,  # msgcall
        '\x00\x00\x00\x02',  # rpc version
        '\x55' * 4,  # wdb programe number
        '\x00\x00\x00\x01',  # programe version
        struct.pack('>I', 123),  # function number: WDB_TGT_INFO_GET = 123
        '\x00' * 16,
        '\x00' * 4,
        '\x00\x00\x00\x44',  # packet length
        struct.pack('>I', 1),  # msg seq
        '\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00',  # parameter
    ])
    try:
        sock.sendto(infoReq, (host, port))
        resp2 = sock.recv(65536)
    except socket.timeout as err:
        resp2 = ''

    return 'vxworks' in resp2.lower(), resp1, resp2

if __name__ == '__main__':
    import sys
    from pprint import pprint as pr

    pr(scanV1(sys.argv[1]))
    print
    pr(scanV2(sys.argv[2]))


Повторить")
            .description("Произошла ошибка")
            .build()
    }

    private val viewModel by viewModel<AuthOtpViewModel>()

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        viewLifecycleOwner.lifecycle.addObserver(viewModel)

        subscribeTo(viewModel.otpInfoData.filterNotNull()) {
            guidanceStylist.apply {
                titleView?.text = "Код: ${it.code}"
                descriptionView?.text = it.description
            }
        }

        subscribeTo(viewModel.state) {
            val primaryAction = when (it.buttonState) {
                AuthOtpViewModel.ButtonState.COMPLETE -> completeAction
                AuthOtpViewModel.ButtonState.EXPIRED -> expiredAction
                AuthOtpViewModel.ButtonState.REPEAT -> repeatAction
            }

            actions = if (it.error.isEmpty()) {
                listOf(primaryAction)
            } else {
                val errorAction = GuidedAction.Builder(requireContext())
                    .title("Ошибка")
                    .multilineDescription(true)
                    .description(it.error)
                    .infoOnly(true)
                    .focusable(false)
                    .build()
                listOf(primaryAction, errorAction)
            }
            primaryAction.updateProgress(it.progress)
        }
    }

    override fun onCreateGuidance(savedInstanceState: Bundle?): GuidanceStylist.Guidance =
        GuidanceStylist.Guidance(
            "Запрашивается код",
            "Запрашивается код",
            "Авторизация",
            null
        )

    override fun onCreateActionsStylist(): GuidedActionsStylist = GuidedProgressActionsStylist()

    override fun onGuidedActionClicked(action: GuidedAction) {
        when (action.id) {
            COMPLETE_ACTION_ID -> viewModel.onCompleteClick()
            EXPIRED_ACTION_ID -> viewModel.onExpiredClick()
            REPEAT_ACTION_ID -> viewModel.onRepeatClick()
        }
    }

    override fun onCreateActions(actions: MutableList<GuidedAction>, savedInstanceState: Bundle?) {
        super.onCreateActions(actions, savedInstanceState)
        actions.add(completeAction)
    }

    private fun GuidedProgressAction.updateProgress(progress: Boolean) {
        updateAction {
            showProgress = progress
            isEnabled = !progress
        }
    }

    private fun <T : GuidedAction> T.updateAction(block: T.() -> Unit) {
        findButtonActionById(id)?.apply {
            block()
            notifyButtonActionChanged(findButtonActionPositionById(id))
        }
        findActionById(id)?.apply {
            block()
            notifyActionChanged(findActionPositionById(id))
        }
    }
}package com.revolgenx.anilib.setting.ui.viewmodel

import androidx.lifecycle.viewModelScope
import com.revolgenx.anilib.common.data.store.AppPreferencesDataStore
import com.revolgenx.anilib.common.ui.viewmodel.ResourceViewModel
import com.revolgenx.anilib.setting.data.field.MediaListSettingsField
import com.revolgenx.anilib.setting.data.field.SaveMediaListSettingsField
import com.revolgenx.anilib.setting.data.service.SettingsService
import com.revolgenx.anilib.setting.ui.model.MediaListSettingsModel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach

class MediaListSettingsViewModel(
    val appPreferencesDataStore: AppPreferencesDataStore,
    private val settingsService: SettingsService
) :


// 参数模板ID
	TemplateId *int64 `json:"TemplateId,omitnil,omitempty" name:"TemplateId"`

	// 参数模板名称
	TemplateName *string `json:"TemplateName,omitnil,omitempty" name:"TemplateName"`

	// 参数模板描述
	TemplateDescription *string `json:"TemplateDescription,omitnil,omitempty" name:"TemplateDescription"`

	// 引擎版本
	EngineVersion *string `json:"EngineVersion,omitnil,omitempty" name:"EngineVersion"`

	// 参数总条数
	TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`

	// 参数列表
	Items []*ParamDetail `json:"Items,omitnil,omitempty" name:"Items"`

	// 数据库类型，可选值：NORMAL，SERVERLESS
	DbMode *string `json:"DbMode,omitnil,omitempty" name:"DbMode"`

	// 唯一请求 ID，由服务端生成，每次请求都会返回（若请求因其他原因未能抵达服务端，则该次请求不会获得 RequestId）。定位问题时需要提供该次请求的 RequestId。
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

type DescribeParamTemplateDetailResponse struct {
	*tchttp.BaseResponse
	Response *DescribeParamTemplateDetailResponseParams `json:"Response"`
}

func (r *DescribeParamTemplateDetailResponse) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeParamTemplateDetailResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeParamTemplatesRequestParams struct {
	// 数据库引擎版本号
	EngineVersions []*string `json:"EngineVersions,omitnil,omitempty" name:"EngineVersions"`

	// 模板名称
	TemplateNames []*string `json:"TemplateNames,omitnil,omitempty" name:"TemplateNames"`

	// 模板ID
	TemplateIds []*int64 `json:"TemplateIds,omitnil,omitempty" name:"TemplateIds"`

	// 数据库类型，可选值：NORMAL，SERVERLESS
	DbModes []*string `json:"DbModes,omitnil,omitempty" name:"DbModes"`

	// 查询偏移量
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`

	// 查询限制条数
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// 查询的模板对应的产品类型
	Products []*string `json:"Products,omitnil,omitempty" name:"Products"`

	// 模板类型
	TemplateTypes []*string `json:"TemplateTypes,omitnil,omitempty" name:"TemplateTypes"`

	// 版本类型
	EngineTypes []*string `json:"EngineTypes,omitnil,omitempty" name:"EngineTypes"`

	// 返回结果的排序字段
	OrderBy *string `json:"OrderBy,omitnil,omitempty" name:"OrderBy"`

	// 排序方式（asc、desc）
	OrderDirection *string `json:"OrderDirection,omitnil,omitempty" name:"OrderDirection"`
}

type DescribeParamTemplatesRequest struct {
	*tchttp.BaseRequest

	// 数据库引擎版本号
	EngineVersions []*string `json:"EngineVersions,omitnil,omitempty" name:"EngineVersions"`

	// 模板名称
	TemplateNames []*string `json:"TemplateNames,omitnil,omitempty" name:"TemplateNames"`

	// 模板ID
	TemplateIds []*int64 `json:"TemplateIds,omitnil,omitempty" name:"TemplateIds"`

	// 数据库类型，可选值：NORMAL


东西，在这个问题上我们吃了亏的。四九年，安子文一进城就搞这个东西。这个我们警惕性不高，他们注意了，安子文派人到全国各地，到太原、南京、上海、苏州、天津、北京、西安等地去调来档案销毁。太原陆军监狱的档案我们弄不到，就是安子文四九年派人到太原销毁了的。（当段建中谈到三人电话，四人声明时）

   关锋：当时我们知道后，就认为打回电话应以四个人名义发表，应该与袁振同志商量。

   康：四人声明和三人电话我们都接到了。

   段：袁振谈炮轰刘志兰是中央、是革命委员会扩大会议决定的。他让鲁克南这么说。

   康：接到一个条子，问“二月兵变”是怎么回事，上次在正式会议说过，这是没有的事，我简单地说说这个事：

   去年二月，有二个团要驻人大和北大，并看了房子，这件事中央军委也知道，以后没有去住。因是学校，又有许多女同学，不太方便，生活不一样，当时可能是去军训的。倒是经过彭真批准的，后来到了五、六月，彭真的问题被揭露，因为彭真曾要作北京军区政委，当然他是要篡党，篡政，篡军了。北大同学提出这样的问题。贴过大字报，师大抄了这张大字报。当时是刘邓的白色恐怖，孙有余工作组看了这张大字报，就利用这张大字报整造反派，在大会上说谭厚兰是挑动学生反对解放军。并制造流血事情，煽动一部分群众围攻，打了谭厚兰，实际上是孙有余挑动群众斗群众，听到这个事情，我到师大支持谭厚兰，反对孙有余工作组，因为他们是少数嘛。我说：“人家是反彭真嘛！为什么不可怀疑一下呢？这件事有的不是造谣，郭影秋你知道么！”这样一说，谭厚兰一派就贴大字报，说郭影秋是什么人，后来，人大揪郭影秋、邓小平、陶铸到人大，陶铸讲没有这个事情，实际上二月兵变是邓小平提出说“二月那有个兵变呀！”后来邓小平，陶铸揪出来后，群�


 platform with longer life span
  uint64_t longPatId = testHelper.addPlatform();

  // insert data points
  {
    simData::DataStore::Transaction t;
    simData::PlatformUpdate* u = ds->addPlatformUpdate(longPatId, &t);
    u->set_time(100.0);
    u->set_x(simCore::WGS_A + 10.0);
    u->set_y(11.0);
    u->set_z(0.0);
    t.commit();
  }

  {
    simData::DataStore::Transaction t;
    simData::PlatformUpdate* u = ds->addPlatformUpdate(longPatId, &t);
    u->set_time(200.0);
    u->set_x(simCore::WGS_A + 10.0);
    u->set_y(11.0);
    u->set_z(100.0);
    t.commit();
  }

  // insert platform with shorter life span
  uint64_t platId = testHelper.addPlatform();

  // turn off interpolation for an individual platform
  simData::PlatformPrefs prefs;
  prefs.set_interpolatepos(false);
  testHelper.updatePlatformPrefs(prefs, platId);

  // insert data points
  {
    simData::DataStore::Transaction t;
    simData::PlatformUpdate* u = ds->addPlatformUpdate(platId, &t);
    u->set_time(125);
    u->set_x(simCore::WGS_A + 10.0);
    u->set_y(11.0);
    u->set_z(0.0);
    t.commit();
  }

  {
    simData::DataStore::Transaction t;
    simData::PlatformUpdate* u = ds->addPlatformUpdate(platId, &t);
    u->set_time(150.0);
    u->set_x(simCore::WGS_A + 10.0);
    u->set_y(11.0);
    u->set_z(100.0);
    t.commit();
  }

  const auto* slice = ds->platformUpdateSlice(platId);
  assertTrue(slice != nullptr);

  // Should be no point
  ds->update(105);
  assertTrue(slice->current() == nullptr);

  // Should be the first point
  ds->update(126);
  assertTrue(slice->current() != nullptr);
  assertTrue(slice->current()->has_z());
  assertEquals(slice->current()->z(), 0.0);

  // Should be no point
  ds->update(151);
  assertTrue(slice->current() == nullptr);

  // Should be the first point
  ds->update(126);
  assertTrue(slice->current() != nullptr);
  assertTrue(slice->current()->has_z());
  assertEquals(slice->current()->z(), 0.0);

  return rv;
}

}

int TestInterpolation(int argc, char* argv[])
{
  simCore::checkVersionThrow();
  try
  {
    testInterpolation_enable();
    testInterpolation_nearest();
    testInterpolation_linear(simData::DataStore::InterpolatorState::EXTERNAL);
    testInterpolation_linear(simData::DataStore::InterpolatorState::INTERNAL);
    testInterpolation_linearAngle();
    testNoInterpolationForIndividualPlatform();
    testNoInterpolationLifeSpan();

    return 0;
  }
  catch (InterpAssertionException& e)
  {
    cout << e.what() << endl;
    return 1;
  }
}

/* -*- mode: c++ -*- */
/****************************************************************************
 *****                                                                  *****
 *****                   Classification: UNCLASSIFIED                   *****
 *****                    Classified By:                                *****
 *****                    Declassify On:                                *****
 *****                                                                  *****
 ****************************************************************************
 *
 *
 * Developed by: Naval Research Laboratory, Tactical E


 already networked on its own. So this guard statement
        // prevents triggering twice on the client.
        if (_timing.ApplyingState)
            return;

        _trigger.Trigger(ent.Owner, args.User, ent.Comp.KeyOut);
    }

    private void OnGotUnequipped(Entity<TriggerOnGotUnequippedHandComponent> ent, ref GotUnequippedHandEvent args)
    {
        if (_timing.ApplyingState)
            return;

        _trigger.Trigger(ent.Owner, args.User, ent.Comp.KeyOut);
    }

    private void OnDidEquip(Entity<TriggerOnDidEquipHandComponent> ent, ref DidEquipHandEvent args)
    {
        if (_timing.ApplyingState)
            return;

        _trigger.Trigger(ent.Owner, args.Equipped, ent.Comp.KeyOut);
    }

    private void OnDidUnequip(Entity<TriggerOnDidUnequipHandComponent> ent, ref DidUnequipHandEvent args)
    {
        if (_timing.ApplyingState)
            return;

        _trigger.Trigger(ent.Owner, args.Unequipped, ent.Comp.KeyOut);
    }

    private void OnDropped(Entity<TriggerOnDroppedComponent> ent, ref DroppedEvent args)
    {
        // We don't need the guard statement here because this one is not a container event, but raised directly when interacting.
        _trigger.Trigger(ent.Owner, args.User, ent.Comp.KeyOut);
    }
}


name: string | null = null;
    built: number | null = null;
    length: number | null = null;
    breadth: number | null = null;
    tonnage: number | null = null;
    mmsi: number | null = null;
    vessel_type: string | null = null;
    owner: number | null = null;
    former_names: string[] | null = null;

    private constructor() {}

    public static fromJson(jsonString: string): Vessel {
        const json = JSON.parse(jsonString)
        const builder = new this.Builder();
        return builder.setId(json["_id"] ?? null)
            .setImo(json["IMO"])
            .setFlag(json["Flag"] ?? null)
            .setName(json["Name"] ?? null)
            .setBuilt(json["Built"] ?? null)
            .setLength(json["Length"] ?? null)
            .setBreadth(json["Breadth"] ?? null)
            .setTonnage(json["Tonnage"] ?? null)
            .setMmsi(json["MMSI"] ?? null)
            .setVesselType(json["VesselType"] ?? null)
            .setOwner(json["Owner"] ?? null)
            .setFormerNames(json["FormerNames"] ?? null)
            .build();
    }

    private static Builder = class {

        private vessel: Vessel;

        constructor() {
            this.vessel = new Vessel();
        }

        setId(id: string) {
            this.vessel.id  = id;
            return this;
        }

        setImo(imo: number) {
            this.vessel.imo = imo;
            return this;
        }

        setFlag(flag: string) {
            this.vessel.flag = flag;
            return this;
        }

        setName(name: string) {
            this.vessel.name = name;
            return this;
        }

        setBuilt(built: number) {
            this.vessel.built = built;
            return this;
        }

        setLength(length: number) {
            this.vessel.length = length;
            return this;
        }

        setBreadth(breadth: number) {
            this.vessel.breadth = breadth;
            return this;
        }

        setTonnage(tonnage: number) {
            this.vessel.tonnage = tonnage;
            return this;
        }

        setMmsi(mmsi: number) {
            this.vessel.mmsi = mmsi;
            return this;
        }

        setVesselType(vesselType: string) {
            this.vessel.vessel_type = vesselType;
            return this;
        }

        setOwner(owner: number) {
            this.vessel.owner = owner;
            return this;
        }

        setFormerNames(formerNames: string[]) {
            this.vessel.former_names = formerNames;
            return this;
        }

        build() {
            const vessel = this.vessel;
            this.vessel = new Vessel();
            return vessel;
        }

    }
}
/**
 Do not return anything, modify nums in-place instead.
 */
function moveZeroes(nums: number[]): void {
    let i = 0;
    for (let j = 0; j < nums.length; j++) {
        if (nums[j] !== 0) {
            let temp = nums[j];
            nums[j] = nums[i];
            nums[i++] = temp;
        }
    }
};import { execa } from "execa";

const PRODUCTION_BRANCHES = ["master", "main", "prod", "production"];

export function ensureGit(options: { anyBranch?: boolean; cwd?: string } = {}) {
  options = options || {};
  const anyBranch = options.anyBranch;
  const cwd = options.cwd || process.cwd();

  const actions = [
    // Check local worki


 dwFlags: DWORD) -> LSTATUS;
    pub fn RegRestoreKeyW(hKey: HKEY, lpFile: LPCWSTR, dwFlags: DWORD) -> LSTATUS;
    pub fn RegRenameKey(hKey: HKEY, lpSubKeyName: LPCWSTR, lpNewKeyName: LPCWSTR) -> LSTATUS;
    pub fn RegSaveKeyA(
        hKey: HKEY,
        lpFile: LPCSTR,
        lpSecurityAttributes: LPSECURITY_ATTRIBUTES,
    ) -> LSTATUS;
    pub fn RegSaveKeyW(
        hKey: HKEY,
        lpFile: LPCWSTR,
        lpSecurityAttributes: LPSECURITY_ATTRIBUTES,
    ) -> LSTATUS;
    pub fn RegSetKeySecurity(
        hKey: HKEY,
        SecurityInformation: SECURITY_INFORMATION,
        pSecurityDescriptor: PSECURITY_DESCRIPTOR,
    ) -> LSTATUS;
    pub fn RegSetValueA(
        hKey: HKEY,
        lpSubKey: LPCSTR,
        dwType: DWORD,
        lpData: LPCSTR,
        cbData: DWORD,
    ) -> LSTATUS;
    pub fn RegSetValueW(
        hKey: HKEY,
        lpSubKey: LPCWSTR,
        dwType: DWORD,
        lpData: LPCWSTR,
        cbData: DWORD,
    ) -> LSTATUS;
    pub fn RegSetValueExA(
        hKey: HKEY,
        lpValueName: LPCSTR,
        Reserved: DWORD,
        dwType: DWORD,
        lpData: *const BYTE,
        cbData: DWORD,
    ) -> LSTATUS;
    pub fn RegSetValueExW(
        hKey: HKEY,
        lpValueName: LPCWSTR,
        Reserved: DWORD,
        dwType: DWORD,
        lpData: *const BYTE,
        cbData: DWORD,
    ) -> LSTATUS;
    pub fn RegUnLoadKeyA(hKey: HKEY, lpSubKey: LPCSTR) -> LSTATUS;
    pub fn RegUnLoadKeyW(hKey: HKEY, lpSubKey: LPCWSTR) -> LSTATUS;
    pub fn RegDeleteKeyValueA(hKey: HKEY, lpSubKey: LPCSTR, lpValueName: LPCSTR) -> LSTATUS;
    pub fn RegDeleteKeyValueW(hKey: HKEY, lpSubKey: LPCWSTR, lpValueName: LPCWSTR) -> LSTATUS;
    pub fn RegSetKeyValueA(
        hKey: HKEY,
        lpSubKey: LPCSTR,
        lpValueName: LPCSTR,
        dwType: DWORD,
        lpData: LPCVOID,
        cbData: DWORD,
    ) -> LSTATUS;
    pub fn RegSetKeyValueW(
        hKey: HKEY,
        lpSubKey: LPCWSTR,
        lpValueName: LPCWSTR,
        dwType: DWORD,
        lpData: LPCVOID,
        cbData: DWORD,
    ) -> LSTATUS;
    pub fn RegDeleteTreeA(hKey: HKEY, lpSubKey: LPCSTR) -> LSTATUS;
    pub fn RegDeleteTreeW(hKey: HKEY, lpSubKey: LPCWSTR) -> LSTATUS;
    pub fn RegCopyTreeA(hKeySrc: HKEY, lpSubKey: LPCSTR, hKeyDest: HKEY) -> LSTATUS;
    pub fn RegGetValueA(
        hkey: HKEY,
        lpSubKey: LPCSTR,
        lpValue: LPCSTR,
        dwFlags: DWORD,
        pdwType: LPDWORD,
        pvData: PVOID,
        pcbData: LPDWORD,
    ) -> LSTATUS;
    pub fn RegGetValueW(
        hkey: HKEY,
        lpSubKey: LPCWSTR,
        lpValue: LPCWSTR,
        dwFlags: DWORD,
        pdwType: LPDWORD,
        pvData: PVOID,
        pcbData: LPDWORD,
    ) -> LSTATUS;


7-17.4-10.9-25.7-4.9zm-6.3 139.4c26.3 43.1 15.1 100-26.3 129.1-17.4 12.3-37.1 17.7-56.9 17.1-12 47.1-69.4 64.6-105.1 32.6-1.1.9-2.6 1.7-3.7 2.9-39.1 27.1-92.3 17.4-119.4-22.3-9.7-14.3-14.6-30.6-15.1-46.9-65.4-10.9-90-94-41.1-139.7-28.3-46.9.6-107.4 53.4-114.9C151.6 70 234.1 38.6 290.1 82c67.4-22.3 136.3 29.4 130.9 101.1 41.1 12.6 52.8 66.9 19.7 95.2zm-70 74.3c-3.1-20.6-40.9-4.6-43.1-27.1-3.1-32 43.7-101.1 40-128-3.4-24-19.4-29.1-33.4-29.4-13.4-.3-16.9 2-21.4 4.6-2.9 1.7-6.6 4.9-11.7-.3-6.3-6-11.1-11.7-19.4-12.9-12.3-2-17.7 2-26.6 9.7-3.4 2.9-12 12.9-20 9.1-3.4-1.7-15.4-7.7-24-11.4-16.3-7.1-40 4.6-48.6 20-12.9 22.9-38 113.1-41.7 125.1-8.6 26.6 10.9 48.6 36.9 47.1 11.1-.6 18.3-4.6 25.4-17.4 4-7.4 41.7-107.7 44.6-112.6 2-3.4 8.9-8 14.6-5.1 5.7 3.1 6.9 9.4 6 15.1-1.1 9.7-28 70.9-28.9 77.7-3.4 22.9 26.9 26.6 38.6 4 3.7-7.1 45.7-92.6 49.4-98.3 4.3-6.3 7.4-8.3 11.7-8 3.1 0 8.3.9 7.1 10.9-1.4 9.4-35.1 72.3-38.9 87.7-4.6 20.6 6.6 41.4 24.9 50.6 11.4 5.7 62.5 15.7 58.5-11.1zm5.7 92.3c-10.3 7.4-12.9 22-5.7 32.6 7.1 10.6 21.4 13.1 32 6 10.6-7.4 13.1-22 6-32.6-7.4-10.6-21.7-13.5-32.3-6z"],megaport:[496,512,[],"f5a3","M248 8C111.04 8 0 119.04 0 256c0 136.97 111.04 248 248 248 136.96 0 248-111.03 248-248C496 119.04 384.96 8 248 8zm85.46 267.67l59.66 59.67v87.05l-26.07 19.23L341 422.39v-65.46l-33.44-33.44-33.44 33.44v65.46L248 441.62l-26.12-19.23v-65.46l-33.44-33.44L155 356.92v65.46l-26.07 19


ardPoolGet(t *testing.T) {
	ctx, tk, _ := testkeeper.NewTestSetup(t)
	items := createNRewardPool(tk.RewardKeeper, ctx, 10)
	for _, item := range items {
		rst, found := tk.RewardKeeper.GetRewardPool(ctx,
			item.LaunchID,
		)
		require.True(t, found)
		require.Equal(t,
			nullify.Fill(&item),
			nullify.Fill(&rst),
		)
	}
}

func TestRewardPoolRemove(t *testing.T) {
	ctx, tk, _ := testkeeper.NewTestSetup(t)
	items := createNRewardPool(tk.RewardKeeper, ctx, 10)
	for _, item := range items {
		tk.RewardKeeper.RemoveRewardPool(ctx,
			item.LaunchID,
		)
		_, found := tk.RewardKeeper.GetRewardPool(ctx,
			item.LaunchID,
		)
		require.False(t, found)
	}
}

func TestRewardPoolGetAll(t *testing.T) {
	ctx, tk, _ := testkeeper.NewTestSetup(t)
	items := createNRewardPool(tk.RewardKeeper, ctx, 10)
	require.ElementsMatch(t,
		nullify.Fill(items),
		nullify.Fill(tk.RewardKeeper.GetAllRewardPool(ctx)),
	)
}
package keeper_test

import (
	"testing"

	sdkmath "cosmossdk.io/math"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/stretchr/testify/require"

	testkeeper "github.com/tendermint/spn/testutil/keeper"
	"github.com/tendermint/spn/testutil/sample"
	"github.com/tendermint/spn/x/reward/keeper"
	"github.com/tendermint/spn/x/reward/types"
)

func TestInsufficientRewardsBalanceInvariant(t *testing.T) {
	t.Run("should allow valid case", func(t *testing.T) {
		ctx, tk, _ := testkeeper.NewTestSetup(t)
		denoms := []string{sample.AlphaString(r, 5), sample.AlphaString(r, 5), sample.AlphaString(r, 5)}
		for i := uint64(0); i < uint64(10); i++ {
			pool := sample.RewardPoolWithCoinsRangeAmount(r, i, denoms[0], denoms[1], denoms[2], 1, 10000)
			tk.MintModule(ctx, types.ModuleName, pool.RemainingCoins)
			tk.RewardKeeper.SetRewardPool(ctx, pool)
		}
		msg, broken := keeper.InsufficientRewardsBalanceInvariant(*tk.RewardKeeper)(ctx)
		require.False(t, broken, msg)
	})

	t.Run("should prevent case with invalid coins", func(t *testing.T) {
		ctx, tk, _ := testkeeper.NewTestSetup(t)
		// add some valid pools
		denoms := []string{sample.AlphaString(r, 5), sample.AlphaString(r, 5), sample.AlphaString(r, 5)}
		for i := uint64(0); i < uint64(10); i++ {
			pool := sample.RewardPoolWithCoinsRangeAmount(r, i, denoms[0], denoms[1], denoms[2], 1, 10000)
			tk.MintModule(ctx, types.ModuleName, pool.RemainingCoins)
			tk.RewardKeeper.SetRewardPool(ctx, pool)
		}
		// add some invalid pools - mint a bit less for some coins
		for i := uint64(10); i < uint64(20); i++ {
			pool := sample.RewardPoolWithCoinsRangeAmount(r, i, denoms[0], denoms[1], denoms[2], 1, 10000)
			mintCoins := pool.RemainingCoins


,]+]], i8** [[BP2]]
    // CK29-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]]
    // CK29-DAG: [[CBPVAL2]] = bitcast double*** [[VAR1]] to i8*
    // CK29-DAG: [[CPVAL2]] = bitcast double** [[VAR2:%.+]] to i8*
    // CK29-DAG: [[VAR2]] = load double**, double*** [[VAR22:%.+]],
    // CK29-DAG: [[VAR22]] = getelementptr inbounds [[SSA]], [[SSA]]* %{{.+}}, i32 0, i32 1

    // CK29-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3
    // CK29-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3
    // CK29-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]]
    // CK29-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]]
    // CK29-DAG: [[CBPVAL3]] = bitcast double** [[VAR2]] to i8*
    // CK29-DAG: [[CPVAL3]] = bitcast double* [[VAR3:%.+]] to i8*
    // CK29-DAG: [[VAR3]] = getelementptr inbounds double, double* [[VAR33:%.+]], i{{.+}} 0
    // CK29-DAG: [[VAR33]] = load double*, double** %{{.+}},

    // CK29: call void [[CALL00:@.+]]([[SSB]]* {{[^,]+}})
    #pragma omp target map(p->pr[:10])
    {
      p->pr++;
    }

    // Region 01
    // CK29-DAG: call i32 @__tgt_target(i32 {{[^,]+}}, i8* {{[^,]+}}, i32 4, i8** [[GEPBP:%.+]], i8** [[GEPP:%.+]], {{.+}}getelementptr {{.+}}[4 x i{{.+}}]* [[SIZE01]], {{.+}}getelementptr {{.+}}[4 x i{{.+}}]* [[MTYPE01]]{{.+}})

    // CK29-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]]
    // CK29-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]]

    // CK29-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0
    // CK29-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0
    // CK29-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]]
    // CK29-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]]
    // CK29-DAG: [[CBPVAL0]] = bitcast [[SSB]]* [[VAR0:%.+]] to i8*
    // CK29-DAG: [[CPVAL0]] = bitcast [[SSA]]*** [[VAR00:%.+]] to i8*
    // CK29-DAG: [[VAR00]] = getelementptr inbounds [[SSB]], [[SSB]]* [[VAR0]], i32 0, i32 1

    // CK29-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1
    // CK29-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1
    // CK29-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]]
    // CK29


ceptionTest4(){
        CosIdException cosIdException=new CosIdException("cosId exception",new Throwable(),true,true);
        Assertions.assertEquals(cosIdException.getMessage(),"cosId exception");
    }
}
/*
 * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].
 * 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 me.ahoo.cosid.segment;

import static me.ahoo.cosid.segment.IdSegment.TIME_TO_LIVE_FOREVER;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;

import me.ahoo.cosid.segment.concurrent.PrefetchWorkerExecutorService;
import me.ahoo.cosid.test.ConcurrentGenerateSpec;
import me.ahoo.cosid.test.ConcurrentGenerateStingSpec;
import me.ahoo.cosid.test.ModSpec;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.util.Arrays;
import java.util.List;

/**
 * @author ahoo wang
 */
class SegmentChainIdTest {

    @Test
    void sort() {
        IdSegmentDistributor idSegmentDistributor = new IdSegmentDistributor.Atomic();
        IdSegmentChain idSegmentChain1 = idSegmentDistributor.nextIdSegmentChain(IdSegmentChain.newRoot(false));
        IdSegmentChain idSegmentChain2 = idSegmentDistributor.nextIdSegmentChain(IdSegmentChain.newRoot(false));
        IdSegmentChain idSegmentChain3 = idSegmentDistributor.nextIdSegmentChain(IdSegmentChain.newRoot(false));
        List<IdSegmentChain> chainList = Arrays.asList(idSegmentChain2, idSegmentChain1, idSegmentChain3);
        chainList.sort(null);
        Assertions.assertEquals(idSegmentChain1, chainList.get(0));
        Assertions.assertEquals(idSegmentChain2, chainList.get(1));
        Assertions.assertEquals(idSegmentChain3, chainList.get(2));
    }

    @Test
    void current() {
        SegmentChainId segmentChainId = new SegmentChainId(TIME_TO_LIVE_FOREVER, 10, new IdSegmentDistributor.Atomic(2), PrefetchWorkerExecutorService.DEFAULT);
        assertThat(segmentChainId.current().isAvailable(), equalTo(false));
    }

    @Test
    void nextIdSegmentsChain() {
        IdSegmentDistributor idSegmentDistributor = new IdSegmentDistributor.Atomic();
        IdSegmentChain rootChain = idSegmentDistributor.nextIdSegmentChain(IdSegmentChain.newRoot(true), 3, TIME_TO_LIVE_FOREVER);
        Assertions.assertEquals(0, rootChain.getVersion());
        Assertions.assertEquals(0, rootChain.getIdSegment().getOffset());
        Assertions.assertEquals(30, rootChain.getStep());
        Assertions.assertEquals(30, rootChain.getMaxId());
    }

    @Test
    void generate() {
        SegmentChainId segmentChainId = new SegmentChainId(TIME_TO_LIVE_FOREVER, 10, new IdSegmentDistributor.Atomic(2), PrefetchWorkerExecutorService.DEFAULT);
        segmentChainId.generate();
        segmentChainId.generate();
        segmentChainId.generate();
    }

    @Test
    public void concurrent_generate() {
        SegmentChainId segmentChainId = new SegmentChainId(new IdSegmentDistributor.Mock());

        new ConcurrentGenerateSpec(segmentChainId


store, []byte(prefix), page, limit)
	} else {
		iterator = sdk.KVStorePrefixIteratorPaginated(store, []byte(prefix), page, limit)
	}
	defer iterator.Close()

	keyValues := types.QueryResultKeyValues{UUID: UUID, KeyValues: make([]types.KeyValue, 0)}

	keyValuesSize := uint64(0)

	for ; iterator.Valid(); iterator.Next() {
		var bz = store.Get(iterator.Key())
		var value types.BLZValue
		k.cdc.MustUnmarshalBinaryBare(bz, &value)

		if owner == nil || value.Owner.Equals(owner) {
			key := string(iterator.Key())[len(UUID) + 1:]
			keyValuesSize = keyValuesSize + uint64(len(key)) + uint64(len(value.Value))

			if ctx.GasMeter().IsPastLimit() {
				return types.QueryResultKeyValues{UUID: UUID, KeyValues: make([]types.KeyValue, 0)}
			}

			if keyValuesSize < k.mks.MaxKeyValuesSize {
				keyValues.KeyValues = append(keyValues.KeyValues, types.KeyValue{
					Key:   key,
					Value: value.Value,
				})
			} else {
				return keyValues
			}
		}
	}
	return keyValues
}

func (k Keeper) GetKeyValues(ctx sdk.Context, store sdk.KVStore, UUID string, owner sdk.AccAddress) types.QueryResultKeyValues {
	prefix := UUID + "\x00"
	iterator := sdk.KVStorePrefixIterator(store, []byte(prefix))
	defer iterator.Close()

	keyValues := types.QueryResultKeyValues{UUID: UUID, KeyValues: make([]types.KeyValue, 0)}

	keyValuesSize := uint64(0)
	for ; iterator.Valid(); iterator.Next() {
		var bz = store.Get(iterator.Key())
		var value types.BLZValue
		k.cdc.MustUnmarshalBinaryBare(bz, &value)

		if owner == nil || value.Owner.Equals(owner) {
			key := string(iterator.Key())[len(prefix):]
			keyValuesSize = keyValuesSize + uint64(len(key)) + uint64(len(value.Value))

			if ctx.GasMeter().IsPastLimit() {
				return types.QueryResultKeyValues{UUID: UUID, KeyValues: make([]types.KeyValue, 0)}
			}

			if keyValuesSize < k.mks.MaxKeyValuesSize {
				keyValues.KeyValues = append(keyValues.KeyValues, types.KeyValue{
					Key:   key,
					Value: value.Value,
				})
			} else {
				return keyValues
			}
		}
	}
	return keyValues
}

func (k Keeper) GetCount(_ sdk.Context, store sdk.KVStore, UUID string, owner sdk.AccAddress) types.QueryResultCount {
	prefix := UUID + "\x00"
	iterator := sdk.KVStorePrefixIterator(store, []byte(prefix))
	defer iterator.Close()
	count := types.QueryResultCount{UUID: UUID}

	for ; iterator.Valid(); iterator.Next() {
		if (owner == nil) || func() bool {
			var bz = store.Get(iterator.Key())
			var value types.BLZValue
			k.cdc.MustUnmarshalBinaryBare(bz, &value)
			return value.Owner.Equals(owner)
		}() {
			count.Count += 1
		}
	}
	return count
}

func (k Keeper) DeleteAll(ctx sdk.Context, store sdk.KVStore, leaseStore sdk.KVStore, ownerStore sdk.KVStore, UUID string, owner sdk.AccAddress) {
	myKeys := k.GetMyKeys(ctx, ownerStore, UUID, owner)
	for _, key := range myKeys.Keys {
		k.


import json
import os
import re
import argparse
import sys
from SimaiParser import SimaiChart
from tqdm import tqdm
from wcwidth import wcswidth

from util import ljust_cjk

def find_chart_files(data_directory):
    """
    遍历指定目录，返回所有maidata.txt文件的路径列表。

    Args:
        data_directory (str): 包含谱面数据的根目录。

    Returns:
        list: maidata.txt 文件的完整路径列表。
    """
    chart_files = []
    print(f"开始扫描目录: {data_directory}")
    for partition in os.listdir(data_directory):
        partition_path = os.path.join(data_directory, partition)
        if not os.path.isdir(partition_path):
            continue

        for song_folder in os.listdir(partition_path):
            song_path = os.path.join(partition_path, song_folder)
            chart_file_path = os.path.join(song_path, 'maidata.txt')

            if os.path.isfile(chart_file_path):
                chart_files.append(chart_file_path)
    return chart_files

def format_ms_to_mmss(ms):
    if ms < 0:
        return "00:00"
    total_seconds = int(ms / 1000)
    minutes = total_seconds // 60
    seconds = total_seconds % 60
    return f"{minutes:02d}:{seconds:02d}"

def find_densest_segment(note_times, window_ms=30000):
    if not note_times or len(note_times) <= 1:
        return "N/A"

    max_notes_in_window = 0
    best_window_start_time = -1
    left = 0

    for right in range(len(note_times)):
        while note_times[right] - note_times[left] > window_ms:
            left += 1

        notes_in_window = right - left + 1

        if notes_in_window > max_notes_in_window:
            max_notes_in_window = notes_in_window
            best_window_start_time = note_times[left]

    if max_notes_in_window <= 1:
        return "N/A"

    start_str = format_ms_to_mmss(best_window_start_time)
    end_str = format_ms_to_mmss(best_window_start_time + window_ms)

    return f"({start_str}~{end_str})"

def process_chart_file(chart_file_path):
    """
    分析单个谱面文件，统计“跳拍段”和最密集片段，并返回结果。

    Args:
        chart_file_path (str): maidata.txt 文件的路径。

    Returns:
        list: 包含该文件各难度谱面分析结果的字典列表。
    """
    song_folder = os.path.basename(os.path.dirname(chart_file_path))
    match = re.match(r'^(\d+)', song_folder)
    song_id = match.group(1) if match else 'N/A'

    fumen_results = []

    try:
        with open(chart_file_path, 'r', encoding='utf-8') as f:
            content = f.read()

        chart = SimaiChart()
        chart.load_from_text(content)

        song_title = chart.metadata.get("title", "未知标题")

        for fumen in chart.processed_fumens_data:
            if not fumen.get("note_events") and not fumen.get("level_info"):
                continue

            difficulty_index = fumen.get("difficulty_index", -1)

            # 步骤 1: 提取所有唯一的音符时间点并排序
            note_times = set()
            for note_event in fumen.get("note_events", []):
                if note_event.get("notes"):
                    note_times.add(note_event.get("time"))

            if len(note_times) < 3:
                continue

            sorted_times = sorted(list(note_times))

            # ▼▼▼ 核心分析逻辑：统计跳拍段 ▼▼▼
            bpm_for_threshold = 160.0
            y_threshold = (60 * 1000) / bpm_for_threshold / 2

            syncopated_time_points = set()
            time = 0
            prev_next = None

            for i in range(1, len(sorted_times) - 1):
                t_prev = sorted_times[i - 1]
                t_curr = sorted_times[i]
                t_next = sorted_times[i + 1]

                x = t_curr - t_prev
                y = t_next - t_curr

                if 0 < y < y_threshold and 1.99 * y < x < 2.21 * y:
                    if prev_next is not None and t_prev == prev_next:
                        syncopated_time_points.add(t_prev)
                        syncopated_time_points.add(t_curr)
                        time += t_next - t_prev

                    prev_next = t_next

            if not syncopated_time_points:
                continue

            segment_lengths = []
            current_length = 0

            for time_point in sorted_times:
                if time_point in syncopated_time_points:
                    current_length += 1
                else:
                    if current_length > 4:
                        segment_lengths.append(current_length)
                    current_length = 0

            if current_length > 4:
                segment_lengths.append(current_length)

            total = max(sorted_times) * 1000

            sorte


imgloaddisabledla{position:absolute;z-index:-1;top:0;left:0}.expht .exphd .br5{margin:5px 0 0 21.2%}.expht .exphd .br5 .richtext p{background:transparent url(../../i/11/999518480e3c07301320f84f4bd855.png) no-repeat scroll 0 0;padding-left:20px;margin:0}.thumb_h ul{padding-left:0;width:100%;height:6.2em;margin:0}.thumb_h ul li{background-color:#f1f1f1;margin:3px 2px 0 0;list-style:none;width:23%;float:left;padding:.44em;min-height:60px}.thumb_h ul .last{margin-right:0}.thumb_h a p{margin:0;height:5em}.thumb_h a img{float:left;margin-right:10px}.thumb_h ul li.selected{border:1px solid #009ad9;border-top-width:3px;margin-top:0;height:4.9em;background-color:#fff}.tfh .scp1 .npane li img{padding-bottom:8px}.tfh .scp1 .npane ul li{margin:3px 9px 0 0}.tfh .scp1 .npane ul .last{margin-right:0}.tfh .scp1 .npane ul a{font-size:1.2em;font-weight:bold;padding-bottom:1px}.tfh .scp1 .headline ul{padding-left:1.6em}.tfh .scp1 .npane,.tfh .scp1 .linkedimg{text-align:center}.tfh .co1b1{min-height:191px}.thumb_h ul li a{height:5em;display:block;color:#666}.thumb_h ul li.selected a{color:#333}.thumb_h ul li.selected a:hover span,.thumb_h ul li.selected a:hover{text-decoration:none}.thumb_v{float:left;margin-right:.75em}.thumb_v ul{padding:0;margin:0;width:100%}.thumb_v ul li{list-style:none;height:5em;min-height:60px;margin:0 0 1px 2px;background:#f1f1f1;width:17.9em;border:1px solid #f1f1f1}.thumb_v ul li a{height:5em;display:block;color:#666}.thumb_v ul li a span{display:block;padding-top:1.1em}.thumb_v ul li.selected a:hover span,.thumb_v ul li.selected a:hover{text-decoration:none}.thumb_v ul li.selected a{color:#333}.thumb_v ul .selected{border:1px solid #009ad9;border-left-width:3px;margin-left:0;background-color:#fff}.thumb_v ul li img{float:left;margin-right:.75em}.tfv .scp1 .npane li img{padding-bottom:8px}.tfv .scp1 .npane ul li{margin-right:10px}.tfv .scp1 .npane ul .last{margin-right:0}.tfv .scp1 .npane ul a{font-size:1.2em;font-weight:bold;text-align:left}.tfv .scp1 .headline ul{padding-left:20.6em}.tfv .scp1 .linkedimg .richtext{margin-bottom:3px}.tfv .scp1 .npane.n3{text-align:left}.tfv .scp1 .headline li{padding-top:0}.tfv .scp1 .linkedimg{margin-left:19em}#wrapper #content .cogr{margin:.6em 0 1.2em .4em}.tfv .headline div a,.tfh .headline div a{float:left}.tfv .headline div p a,.tfh .headline div p a{float:none


e D / U line
1:
	mcr	p15, 0, r0, c7, c6, 1		@ invalidate D / U line
	add	r0, r0, r2
	cmp	r0, r1
	blo	1b
	dsb
	mov	pc, lr
ENDPROC(v7_dma_inv_range)

/*
 *	v7_dma_clean_range(start,end)
 *	- start   - virtual start address of region
 *	- end     - virtual end address of region
 */
v7_dma_clean_range:
	dcache_line_size r2, r3
	sub	r3, r2, #1
	bic	r0, r0, r3
#ifdef CONFIG_ARM_ERRATA_764369
	ALT_SMP(W(dsb))
	ALT_UP(W(nop))
#endif
1:
	mcr	p15, 0, r0, c7, c10, 1		@ clean D / U line
	add	r0, r0, r2
	cmp	r0, r1
	blo	1b
	dsb
	mov	pc, lr
ENDPROC(v7_dma_clean_range)

/*
 *	v7_dma_flush_range(start,end)
 *	- start   - virtual start address of region
 *	- end     - virtual end address of region
 */
ENTRY(v7_dma_flush_range)
	dcache_line_size r2, r3
	sub	r3, r2, #1
	bic	r0, r0, r3
#ifdef CONFIG_ARM_ERRATA_764369
	ALT_SMP(W(dsb))
	ALT_UP(W(nop))
#endif
1:
	mcr	p15, 0, r0, c7, c14, 1		@ clean & invalidate D / U line
	add	r0, r0, r2
	cmp	r0, r1
	blo	1b
	dsb
	mov	pc, lr
ENDPROC(v7_dma_flush_range)

/*
 *	dma_map_area(start, size, dir)
 *	- start	- kernel virtual start address
 *	- size	- size of region
 *	- dir	- DMA direction
 */
ENTRY(v7_dma_map_area)
	add	r1, r1, r0
	teq	r2, #DMA_FROM_DEVICE
	beq	v7_dma_inv_range
	b	v7_dma_clean_range
ENDPROC(v7_dma_map_area)

/*
 *	dma_unmap_area(start, size, dir)
 *	- start	- kernel virtual start address
 *	- size	- size of region
 *	- dir	- DMA direction
 */
ENTRY(v7_dma_unmap_area)
	add	r1, r1, r0
	teq	r2, #DMA_TO_DEVICE
	bne	v7_dma_inv_range
	mov	pc, lr
ENDPROC(v7_dma_unmap_area)

	__INITDATA

	@ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S)
	define_cache_functions v7


         FskFdev, FskModParams, FskPulseShape, GenericPacketParams, HeaderType, Irq, Ocp,
///         PaConfig, PacketType, PreambleDetection, RampTime, RegMode, RfFreq, StandbyClk, SubGhz,
///         TcxoMode, TcxoTrim, Timeout, TxParams,
///     },
/// };
///
/// const IRQ_CFG: CfgIrq = CfgIrq::new()
///     .irq_enable_all(Irq::RxDone)
///     .irq_enable_all(Irq::Timeout)
///     .irq_enable_all(Irq::TxDone)
///     .irq_enable_all(Irq::Err);
///
/// const PREAMBLE_LEN: u16 = 5 * 8;
/// const RF_FREQ: RfFreq = RfFreq::from_frequency(434_000_000);
/// const SYNC_WORD: [u8; 8] = [0x79, 0x80, 0x0C, 0xC0, 0x29, 0x95, 0xF8, 0x4A];
/// const SYNC_WORD_LEN: u8 = SYNC_WORD.len() as u8;
/// const SYNC_WORD_LEN_BITS: u8 = SYNC_WORD_LEN * 8;
/// const TX_BUF_OFFSET: u8 = 0;
/// const RX_BUF_OFFSET: u8 = 128;
///
/// const FSK_PACKET_PARAMS: GenericPacketParams = GenericPacketParams::new()
///     .set_preamble_len(PREAMBLE_LEN)
///     .set_preamble_detection(PreambleDetection::Bit8)
///     .set_sync_word_len(SYNC_WORD_LEN_BITS)
///     .set_addr_comp(AddrComp::Disabled)
///     .set_header_type(HeaderType::Variable)
///     .set_payload_len(128)
///     .set_crc_type(CrcType::Byte2)
///     .set_whitening_enable(true);
///
/// const FSK_MOD_PARAMS: FskModParams = FskModParams::new()
///     .set_bitrate(FskBitrate::from_bps(20_000))
///     .set_pulse_shape(FskPulseShape::Bt03)
///     .set_bandwidth(FskBandwidth::Bw58)
///     .set_fdev(FskFdev::from_hertz(10_000));
///
/// sa::const_assert!(FSK_MOD_PARAMS.is_valid_worst_case());
///
/// const PA_CONFIG: PaConfig = PaConfig::LP_10;
/// const TX_PARAMS: TxParams = TxParams::LP_10.set_ramp_time(RampTime::Micros40);
///
/// const TCXO_MODE: TcxoMode = TcxoMode::new()
///     .set_txco_trim(TcxoTrim::Volts1pt7)
///     .set_timeout(Timeout::from_millis_sat(10));
///
/// let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
///
/// let dma: AllDma = AllDma::split(dp.DMAMUX, dp.DMA1, dp.DMA2, &mut dp.RCC);
/// let mut sg: SubGhz<Dma1Ch1, Dma1Ch2> =
///     SubGhz::new_with_dma(dp.SPI3, dma.d1.c1, dma.d1.c2, &mut dp.RCC);
///
/// sg.set_standby(StandbyClk::Rc)?;
/// sg.set_tcxo_mode(&TCXO_MODE)?;
/// sg.set_tx_rx_fallback_mode(FallbackMode::Standby)?;
/// sg.set_regulator_mode(RegMode::Ldo)?;
/// sg.set_buffer_base_address(TX_BUF_OFFSET, RX_BUF_OFFSET)?;
/// sg.set_pa_config(&PA_CONFIG)?;
/// sg.set_pa_ocp(Ocp::Max60m)?;
/// sg.set_tx_params(&TX_PARAMS)?;
/// sg.set_packet_type(PacketType::Fsk)?;
/// sg.set_sync_word(&SYNC_WORD)?;
/// sg.set_fsk_mod_


e
     *  X(B) = bx/bz
     *  X(Q) = (t3+t4)/(t3-t4)
     * clobbers t1 and t2, preserves t3 and t4  */
    private static void mont_dbl(long10 t1, long10 t2, long10 t3, long10 t4,long10 bx, long10 bz) {
        sqr(t1, t3);
        sqr(t2, t4);
        mul(bx, t1, t2);
        sub(t2, t1, t2);
        mul_small(bz, t2, 121665);
        add(t1, t1, bz);
        mul(bz, t1, t2);
    }

    /* Y^2 = X^3 + 486662 X^2 + X
     * t is a temporary  */
    private static void x_to_y2(long10 t, long10 y2, long10 x) {
        sqr(t, x);
        mul_small(y2, x, 486662);
        add(t, t, y2);
        t._0++;
        mul(y2, t, x);
    }

    /* P = kG   and  s = sign(P)/k  */
    private static void core(byte[] Px, byte[] s, byte[] k, byte[] Gx) {
        long10
                dx=new long10(),
                t1=new long10(),
                t2=new long10(),
                t3=new long10(),
                t4=new long10();
        long10[]
                x=new long10[]{new long10(),new long10()},
                z=new long10[]{new long10(),new long10()};
        int i, j;

        /* unpack the base */
        if (Gx!=null)
            unpack(dx, Gx);
        else
            set(dx, 9);

        /* 0G = point-at-infinity */
        set(x[0], 1);
        set(z[0], 0);

        /* 1G = G */
        cpy(x[1], dx);
        set(z[1], 1);

        for (i = 32; i--!=0; ) {
            if (i==0) {
                i=0;
            }
            for (j = 8; j--!=0; ) {
                /* swap arguments depending on bit */
                int bit1 = (k[i] & 0xFF) >> j & 1;
                int bit0 = ~(k[i] & 0xFF) >> j & 1;
                long10 ax = x[bit0];
                long10 az = z[bit0];
                long10 bx = x[bit1];
                long10 bz = z[bit1];

                /* a' = a + b	*/
                /* b' = 2 b	*/
                mont_prep(t1, t2, ax, az);
                mont_prep(t3, t4, bx, bz);
                mont_add(t1, t2, t3, t4, ax, az, dx);
                mont_dbl(t1, t2, t3, t4, bx, bz);
            }
        }

        recip(t1, z[0], 0);
        mul(dx, x[0], t1);
        pack(dx, Px);

        /* calculate s such that s abs(P) = G  .. assumes G is std base point */
        if (s!=null) {
            x_to_y2(t2, t1, dx);	/* t1 = Py^2  */
            recip(t3, z[1], 0);	/* where Q=P+G ... */
            mul(t2,


-child,.ui.action.input:not([class*="left action"])>.buttons:last-child>.button,.ui.action.input:not([class*="left action"])>.dropdown:last-child{border-radius:0 .28571429rem .28571429rem 0}.ui.action.input:not([class*="left action"]) input:focus{border-right-color:#85b7d9!important}.ui[class*="left action"].input>input{border-top-left-radius:0!important;border-bottom-left-radius:0!important;border-left-color:transparent!important}.ui[class*="left action"].input>.button,.ui[class*="left action"].input>.buttons>.button,.ui[class*="left action"].input>.dropdown{border-radius:0}.ui[class*="left action"].input>.button:first-child,.ui[class*="left action"].input>.buttons:first-child>.button,.ui[class*="left action"].input>.dropdown:first-child{border-radius:.28571429rem 0 0 .28571429rem}.ui[class*="left action"].input>input:focus{border-left-color:#85b7d9!important}.ui.inverted.input input{border:none}.ui.fluid.input{display:-webkit-box;display:-ms-flexbox;display:flex}.ui.fluid.input>input{width:0!important}.ui.mini.input{font-size:.78571429em}.ui.small.input{font-size:.92857143em}.ui.input{font-size:1em}.ui.large.input{font-size:1.14285714em}.ui.big.input{font-size:1.28571429em}.ui.huge.input{font-size:1.42857143em}.ui.massive.input{font-size:1.71428571em}/*!
 * # Semantic UI 2.2.12 - Label
 * http://github.com/semantic-org/semantic-ui/
 *
 *
 * Released under the MIT license
 * http://opensource.org/licenses/MIT
 *
 */.ui.label{display:inline-block;line-height:1;vertical-align:baseline;margin:0 .14285714em;background-color:#e8e8e8;background-image:none;padding:.5833em .833em;color:rgba(0,0,0,.6);text-transform:none;font-weight:700;border:0 solid transparent;border-radius:.28571429rem;-webkit-transition:background .1s ease;transition:background .1s ease}.ui.label:first-child{margin-left:0}.ui.label:last-child{margin-right:0}a.ui.label{cursor:pointer}.ui.label>a{cursor:pointer;color:inherit;opacity:.5;-webkit-transition:.1s opacity ease;transition:.1s opacity ease}.ui.label>a:hover{opacity:1}.ui.label>img{width:auto!important;vertical-align:middle;height:2.1666em!important}.ui.label>.icon{width:auto;margin:0 .75em 0 0}.ui.label>.detail{display:inline-block;vertical-align:top;font-weight:700;margin-left:1em;opacity:.8}.ui.label>.detail .icon{margin:0 .25em 0 0}.ui.label>.close.icon,.ui.label>.delete.icon{cursor:pointer;margin-right:0;margin-left:.5em;font-size:.92857143em;opacity:.5;-webkit-transition:background .1s ease;transition:background .1s ease}.ui.label>.delete.icon:hover{opacity:1}.ui.labels>.label{margin:0 .5em .5em 0}.ui.header>.ui.label{margin-top:-.29165em}.ui.attached.segment>.ui.top.left.attached.label,.ui.bottom.attached.segment>.ui.top.left.attached.label{border-top-left-radius:0}.ui.attached.segment>.ui.top.right.attached.label,.ui.bottom.attached.segme


label = "";
    }
    if (display == Display.BOTH) {
      label = getName() + "  " + (getValue() == null ? "" : getValue().toString());
    }

    FontMetrics fontMetrics = g2d.getFontMetrics();
    Rectangle2D textRect = fontMetrics.getStringBounds(label, g2d);
    Rectangle shapeRect = null;;
    for (int i = 0; i < 3; i++)
      if (body[i] != null) {
        Rectangle bounds = body[i].getBounds();
        if (shapeRect == null)
          shapeRect = bounds;
        else
          shapeRect = shapeRect.union(bounds);
      }

    if (getMoveLabel()) {
      StringUtils.drawCenteredText(g2d, label, controlPoints[3].getX(), controlPoints[3].getY(), flip == SymbolFlipping.X ? HorizontalAlignment.RIGHT
              : HorizontalAlignment.CENTER, VerticalAlignment.CENTER);
    } else {
      StringUtils.drawCenteredText(g2d, label, getLabelX(shapeRect, textRect, fontMetrics, outlineMode),
          getLabelY(shapeRect, textRect, fontMetrics, outlineMode), flip == SymbolFlipping.X ? HorizontalAlignment.RIGHT
              : HorizontalAlignment.LEFT, VerticalAlignment.CENTER);
    }
  }

  @Override
  public Point2D getControlPoint(int index) {
    return getControlPoints()[index];
  }

  @Override
  public int getControlPointCount() {
    return getControlPoints().length;
  }

  protected double getLabelX(Rectangle2D shapeRect, Rectangle2D textRect, FontMetrics fontMetrics, boolean outlineMode) {
    int f = flip == SymbolFlipping.X ? -1 : 1;
    int d = flip == SymbolFlipping.X ? (int) PIN_SPACING.convertToPixels() / 2 : 0;
    return getControlPoints()[0].getX() + f * (int) (PIN_SPACING.convertToPixels() * 1.5 + d);
  }

  protected double getLabelY(Rectangle2D shapeRect, Rectangle2D textRect, FontMetrics fontMetrics, boolean outlineMode) {
    return getControlPoints()[0].getY();
  }

  protected void setDefaultPointLocations(Point2D[] controlPoints, int pinSpacing, double x, double y) {
    controlPoints[1].setLocation(x + pinSpacing * 2, y - pinSpacing * 2);
    controlPoints[2].setLocation(x + pinSpacing * 2, y + pinSpacing * 2);
    controlPoints[3].setLocation(x + pinSpacing * 2, y);
  }

  protected void updateControlPoints() {
    int pinSpacing = (int) PIN_SPACING.convertToPixels();
    Point2D[] controlPoints = getControlPoints();

    double x = controlPoints[0].getX();
    double y = controlPoints[0].getY();

    setDefaultPointLocations(controlPoints, pinSpacing, x, y);

    // apply rotation if needed
    if (getOrientation() != Orientation.DEFAULT)
    {
      Point2D first = controlPoints[0];
      double angle = Double.parseDouble(getOrientation().name().replace("_", ""));
      AffineTransform rotate = AffineTransform.getRotateInstance(Math.toRadians(angle), first.getX(), first.getY());
      for (int i = 1; i < controlPoints.length; i++) {
        rotate.transform(controlPoints[i], controlPoints[i]);
      }
    }

    // flip at the end
    if (flip == SymbolFlipping.X) {
      controlPoints[1].setLocation(controlPoints[0].getX() - (controlPoints[1].getX() - controlPoints[0].getX()), controlPoints[1].getY());
      controlPoints[2].setLocation(controlPoints[0].getX() - (controlPoints[2].getX() - controlPoints[0].getX()), controlPoints[2].getY());
      controlPoints[3]


mini-batch tensor. *shakeshaketable.lua* contains the method used for CIFAR-100 since the ResNeXt code uses a table implementation instead of a module version.

## Reimplementations

*Pytorch*
https://github.com/hysts/pytorch_shake_shake

*Tensorflow*
https://github.com/tensorflow/models/blob/master/research/autoaugment/
https://github.com/tensorflow/tensor2tensor

## Contact
xgastaldi.mba2011 at london.edu
Any discussions, suggestions and questions are welcome!

## References
(1) Ekin D. Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V. Le. AutoAugment: Learning Augmentation Policies from Data. In arXiv:1805.09501, May 2018.
# Detection in Crowded Scenes: One Proposal, Multiple Predictions

This is the pytorch implementation of our paper "[Detection in Crowded Scenes: One Proposal, Multiple Predictions](https://openaccess.thecvf.com/content_CVPR_2020/html/Chu_Detection_in_Crowded_Scenes_One_Proposal_Multiple_Predictions_CVPR_2020_paper.html)", https://arxiv.org/abs/2003.09163, published in CVPR 2020.

Our method aiming at detecting highly-overlapped instances in crowded scenes.

The key of our approach is to let each proposal predict a set of instances that might be highly overlapped rather than a single one in previous proposal-based frameworks. With this scheme, the predictions of nearby proposals are expected to infer the **same set** of instances, rather than **distinguishing individuals**, which is much easy to be learned. Equipped with new techniques such as EMD Loss and Set NMS, our detector can effectively handle the difficulty of detecting highly overlapped objects.

The network structure and results are shown here:

# Citation

If you use the code in your research, please cite:
```
@InProceedings{Chu_2020_CVPR,
author = {Chu, Xuangeng and Zheng, Anlin and Zhang, Xiangyu and Sun, Jian},
title = {Detection in Crowded Scenes: One Proposal, Multiple Predictions},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020}
}
```

# Run
1) Setup environment by docker
   - Requirements: Install [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker)
   - Create docker image:
   ```shell
   sudo docker build . -t crowddet
   ```
   - Run docker image:
   ```shell
   sudo docker run --gpus all --shm-size=8g -it --rm crowddet
   ```

2. CrowdHuman data:
    * CrowdHuman is a benchmark dataset to better evaluate detectors in crowd scenarios. The dataset can be downloaded from http://www.crowdhuman.org/. The path of the dataset is set in `config.py`.

3. Steps to run:
    * Step1:  training. More training and testing settings can be set in `config.py`.
	```
	cd tools
	python3 train.py -md rcnn_fpn_baseline
	```

	* Step2:  testing. If you have four GPUs, you can use ` -d 0-3 ` to use all of your GPUs.


files/noto-sans-kr-7-700-normal.woff2",
    $range: (U+d3bf-d3c7, U+d3ca-d3cf, U+d3d1-d3eb, U+d3ee-d3ef, U+d3f1-d3f3, U+d3f5-d3fb, U+d3fd-d400, U+d402-d45b, U+d45d-d463)
);

/* noto-sans-kr-[8]-700-normal */
@include font.face(
    $family: $krFamily,
    $weight: 700,
    $url: "~@fontsource/noto-sans-kr/files/noto-sans-kr-8-700-normal.woff2",
    $range: (U+d2ff, U+d302-d304, U+d306-d30b, U+d30f, U+d311-d313, U+d315-d31b, U+d31e, U+d322-d324, U+d326-d327, U+d32a-d32b, U+d32d-d32f, U+d331-d337, U+d339-d33c, U+d33e-d37b, U+d37e-d37f, U+d381-d383, U+d385-d38b, U+d38e-d390, U+d392-d397, U+d39a-d39b, U+d39d-d39f, U+d3a1-d3a7, U+d3a9-d3aa, U+d3ac, U+d3ae-d3b3, U+d3b5-d3b7, U+d3b9-d3bb, U+d3bd-d3be)
);

/* noto-sans-kr-[9]-700-normal */
@include font.face(
    $family: $krFamily,
    $weight: 700,
    $url: "~@fontsource/noto-sans-kr/files/noto-sans-kr-9-700-normal.woff2",
    $range: (U+d257-d27f, U+d281-d29b, U+d29d-d29f, U+d2a1-d2ab, U+d2ad-d2b7, U+d2ba-d2bb, U+d2bd-d2bf, U+d2c1-d2c7, U+d2c9-d2ef, U+d2f2-d2f3, U+d2f5-d2f7, U+d2f9-d2fe)
);

/* noto-sans-kr-[10]-700-normal */
@include font.face(
    $family: $krFamily,
    $weight: 700,
    $url: "~@fontsource/noto-sans-kr/files/noto-sans-kr-10-700-normal.woff2",
    $range: (U+d1b4, U+d1b6-d1f3, U+d1f5-d22b, U+d22e-d22f, U+d231-d233, U+d235-d23b, U+d23d-d240, U+d242-d256)
);

/* noto-sans-kr-[11]-700-normal */
@include font.face(
    $family: $krFamily,
    $weight: 700,
    $url: "~@fontsource/noto-sans-kr/files/noto-sans-kr-11-700-normal.woff2",
    $range: (U+d105-d12f, U+d132-d133, U+d135-d137, U+d139-d13f, U+d141-d142, U+d144, U+d146-d14b, U+d14e-d14f, U+d151-d


lections::HashMap::reserve`
    Reserve {
        /// Reserve `n` capacity elements
        n: usize,
    },
    /// This operation triggers `std::collections::HashMap::insert`
    Insert {
        /// The key to be inserted
        k: K,
        /// The value to be inserted
        v: V,
    },
    /// This operation triggers `std::collections::HashMap::remove`
    Remove {
        /// The key to be removed
        k: K,
    },
    /// This operation triggers `std::collections::HashMap::get`
    Get {
        /// The key to be removed
        k: K,
    },
}

impl<K, V> Arbitrary for Op<K, V>
where
    K: Clone + Send + Arbitrary,
    V: Clone + Send + Arbitrary,
{
    fn arbitrary<U>(u: &mut U) -> Result<Self, U::Error>
    where
        U: Unstructured + ?Sized,
    {
        // ================ WARNING ================
        //
        // `total_enum_fields` is a goofy annoyance but it should match
        // _exactly_ the number of fields available in `Op<K, V>`. If it
        // does not then we'll fail to generate `Op` variants for use in our
        // QC tests.
        let total_enum_fields = 6;
        let variant: u8 = Arbitrary::arbitrary(u)?;
        let op = match variant % total_enum_fields {
            0 => {
                let k: K = Arbitrary::arbitrary(u)?;
                let v: V = Arbitrary::arbitrary(u)?;
                Op::Insert { k, v }
            }
            1 => {
                let k: K = Arbitrary::arbitrary(u)?;
                Op::Remove { k }
            }
            2 => {
                let k: K = Arbitrary::arbitrary(u)?;
                Op::Get { k }
            }
            3 => Op::ShrinkToFit,
            4 => Op::Clear,
            5 => {
                let n: usize = Arbitrary::arbitrary(u)?;
                Op::Reserve { n }
            }
            _ => unreachable!(),
        };
        Ok(op)
    }
}
<reponame>Eric-Arellano/rust
// run-pass
// Test method calls with self as an argument

#![feature(box_syntax)]

static mut COUNT: u64 = 1;

#[derive(Copy, Clone)]
struct Foo;

trait Bar : Sized {
    fn foo1(&self);
    fn foo2(self);
    fn foo3(self: Box<Self>);

    fn bar1(&self) {
        unsafe { COUNT *= 7; }
    }
    fn bar2(self) {
        unsafe { COUNT *= 11; }
    }
    fn bar3(self: Box<Self>) {
        unsafe { COUNT *= 13; }
    }
}

impl Bar for Foo {
    fn foo1(&self) {
        unsafe { COUNT *= 2; }
    }

    fn foo2(self) {
        unsafe { COUNT *= 3; }
    }

    fn foo3(self: Box<Foo>) {
        unsafe { COUNT *= 5; }
    }
}

impl Foo {
    fn baz(self) {
        unsafe { COUNT *= 17; }
        // Test internal call.
        Bar::foo1(&self);
        Bar::foo2(self);
        Bar::foo3(box self);

        Bar::bar1(&self);
        Bar::bar2(self);
        Bar::bar3(box self);
    }
}

fn main() {
    let x = Foo;
    // Test external call.
    Bar::foo1(&x);
    Bar::foo2(x);
    Bar::foo3(box x);

    Bar::bar1(&x);
    Bar::bar2(x);
    Bar::bar3(box x);

    x.baz();

    unsafe { assert_eq!(COUNT, 2*2*3*3*5*5*7*7*11*11*13*13*17); }
}
<gh_stars>1-10
//! Tokenizer
//!
//! The tokenizer takes in lexemes and turns them into machine readable tokens,
//! which


جاح."
GROUP_DELETION_CANCELLED = "تم إلغاء حذف المجموعة."
NO_PERMISSION = "عذرًا، ليس لديك صلاحية للقيام بهذا الإجراء."
RETURN_TO_MAIN_MENU = "العودة"
# Error messages
USER_NOT_FOUND_ERROR = "لم يتم العثور على المستخدم. الرجاء المحاولة مرة أخرى."
SUBJECT_NOT_FOUND_ERROR = "لم يتم العثور على المادة."
GENERAL_ERROR_MESSAGE = "عذرًا، حدث خطأ غير متوقع. يرجى المحاولة مرة أخرى لاحقًا."
DATABASE_ERROR_MESSAGE = "عذرًا، حدث خطأ في قاعدة البيانات. يرجى المحاولة مرة أخرى لاحقًا."
TELEGRAM_API_ERROR_MESSAGE = "عذرًا، حدث خطأ في واجهة برمجة تطبيقات تيليجرام. يرجى المحاولة مرة أخرى لاحقًا."


8, 0 ]
      }
    }
  )pb");
  VarDomination var_dom;
  Model model;
  PresolveContext context(&model, &model_proto, nullptr);
  context.InitializeNewDomains();
  context.ReadObjectiveFromProto();
  ScanModelForDominanceDetection(context, &var_dom);

  const IntegerVariable X = VarDomination::RefToIntegerVariable(0);
  const IntegerVariable Y = VarDomination::RefToIntegerVariable(1);
  const IntegerVariable Z = VarDomination::RefToIntegerVariable(2);
  EXPECT_THAT(var_dom.DominatingVariables(X), UnorderedElementsAre(Y, Z));
  EXPECT_THAT(var_dom.DominatingVariables(Y), UnorderedElementsAre(Z));
  EXPECT_THAT(var_dom.DominatingVariables(Z), IsEmpty());
}

TEST(DualBoundReductionTest, FixVariableToDomainBound) {
  CpModelProto model_proto = ParseTestProto(R"pb(
    variables { domain: [ -10, 10 ] }
    variables { domain: [ -10, 10 ] }
    constraints {
      linear {
        vars: [ 0 ]
        coeffs: [ 1 ]
        domain: [ -15, 0 ]
      }
    }
    constraints {
      linear {
        vars: [ 1 ]
        coeffs: [ 1 ]
        domain: [ 0, 15 ]
      }
    }
    solution_hint {
      vars: [ 0, 1 ]
      values: [ -5, 5 ]
    }
  )pb");
  DualBoundStrengthening dual_bound_strengthening;
  Model model;
  PresolveContext context(&model, &model_proto, nullptr);
  context.InitializeNewDomains();
  context.LoadSolutionHint();
  context.ReadObjectiveFromProto();
  ScanModelForDualBoundStrengthening(context, &dual_bound_strengthening);

  EXPECT_TRUE(dual_bound_strengthening.Strengthen(&context));

  EXPECT_EQ(context.DomainOf(0).ToString(), "[-10]");
  EXPECT_EQ(context.DomainOf(1).ToString(), "[10]");
  EXPECT_EQ(context.solution_crush().GetVarValues()[0], -10);
  EXPECT_EQ(context.solution_crush().GetVarValues()[1], 10);
}

// Bound propagation see nothing, but if we can remove feasible solution, from
// this constraint point of view, all variables can freely increase or decrease
// until zero (because the constraint is trivial above/below).
//
// -20 <= X + Y + Z <= 20
TEST(DualBoundReductionTest, BasicTest) {
  CpModelProto model_proto = ParseTestProto(R"pb(
    variables { domain: [ -10, 10 ] }
    variables { domain: [ -10, 10 ] }
    variables { domain: [ -10, 10 ] }
    constraints {
      linear {
        vars: [ 0, 1, 2 ]
        coeffs: [ 1, 1, 1 ]
        domain: [ -20, 20 ]
      }
    }
    solution_hint {
      vars: [ 0, 1, 2 ]
      values: [ 3, 4, 5 ]
    }
  )pb");
  DualBoundStrengthening dual_bound_strengthening;
  Model model;
  PresolveContext context(&model, &model_proto, nullptr);
  context.InitializeNewDomains();
  context.LoadSolutionHint();
  context.ReadObjectiveFromProto();
  ScanModelForDualBoundStrengthening(context, &dual_bound_strengthening);

  EXPECT_TRUE(dual_bound_strengthening.Strengthen(&context));

  EXPECT_EQ(context.DomainOf(0).ToString(), "[0]");
  EXPECT_EQ(context.DomainOf(1).ToString(), "[0]");
  EXPECT_EQ(context.DomainOf(2).ToString(), "[


attrs.ValueEqual("executable", false)
		attrs.Path("$.cozyMetadata.uploadedAt").NotEqual(uploadedAt1)

		buf, err = readFile(storage, "/willbemodified")
		assert.NoError(t, err)
		assert.Equal(t, newContent, string(buf))
		fileInfo, err = storage.FileByPath("/willbemodified")
		assert.NoError(t, err)
		assert.Equal(t, fileInfo.Mode().String(), "-rw-r--r--")

		e.PUT("/files/"+fileID).
			WithHeader("Date", "Mon, 02 Jan 2006 15:04:05 MST").
			WithHeader("Content-Type", "what/ever").
			WithHeader("Authorization", "Bearer "+token).
			WithBytes([]byte("")).
			Expect().Status(200).
			JSON(httpexpect.ContentOpts{MediaType: "application/vnd.api+json"}).
			Object().
			Path("$.data.attributes.updated_at").Equal("2006-01-02T15:04:05Z")

		newContent = "encryptedcontent"

		e.PUT("/files/"+fileID).
			WithQuery("Encrypted", true).
			WithHeader("Date", "Mon, 02 Jan 2006 15:04:05 MST").
			WithHeader("Content-Type", "audio/mp3").
			WithHeader("Authorization", "Bearer "+token).
			WithBytes([]byte(newContent)).
			Expect().Status(200).
			JSON(httpexpect.ContentOpts{MediaType: "application/vnd.api+json"}).
			Object().
			Path("$.data.attributes.encrypted").Equal(true)
	})

	t.Run("ModifyContentWithSourceAccount", func(t *testing.T) {
		e := testutils.CreateTestClient(t, ts.URL)

		fileID = e.POST("/files/").
			WithQuery("Name", "old-file-to-migrate").
			WithQuery("Type", "file").
			WithHeader("Content-Type", "text/plain").
			WithHeader("Content-MD5", "rL0Y20zC+Fzt72VPzMSk2A==").
			WithHeader("Authorization", "Bearer "+token).
			WithBytes([]byte("foo")).
			Expect().Status(201).
			JSON(httpexpect.ContentOpts{MediaType: "application/vnd.api+json"}).
			Object().
			Path("$.data.id").String().NotEmpty().Raw()

		account := "0c5a0a1e-8eb1-11e9-93f3-934f3a2c181d"
		identifier := "11f68e48"
		newContent := "updated by a konnector to add the sourceAccount"

		obj := e.PUT("/files/"+fileID).
			WithQuery("Name", "old-file-to-migrate").
			WithQuery("SourceAccount", account).
			WithQuery("SourceAccountIdentifier", identifier).
			WithQuery("Type", "file").
			WithHeader("Content-Type", "text/plain").
			WithHeader("Authorization", "Bearer "+token).
			WithBytes([]byte(newContent)).
			Expect().Status(200).
			JSON(httpexpect.ContentOpts{MediaType: "application/vnd.api+json"}).
			Object()

		fcm := obj.Path("$.data.attributes.cozyMetadata").Object()
		fcm.ValueEqual("sourceAccount", account)
		fcm.ValueEqual("sourceAccountIdentifier", identifier)
	})

	t.Run("ModifyContentWithCreatedAt", func(t *testing.T) {
		e := testutils.CreateTestClient(t, ts.URL)

		obj := e.POST("/files/").
			WithQuery("Name", "old-file-with-c").
			WithQuery("Type", "file").
			WithHeader("Content-Type", "text/plain").
			WithHeader("Content-MD5", "rL0Y20zC+Fzt72VPzMSk2A==").
			WithHeader("Authorization", "Bearer "+token).
			WithBytes([]


GoogleCloudPlatform/cloud-foundation-fabric/pull/2590)] Fix permadiff on iap attribute in net-lb-app-int module ([eliamaldini](https://github.com/eliamaldini)) <!-- 2024-09-20 11:35:18+00:00 -->
- [[#2565](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2565)] New looker core module ([simonebruzzechesse](https://github.com/simonebruzzechesse)) <!-- 2024-09-20 10:12:09+00:00 -->
- [[#2587](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2587)] Project Module CMEK: added CloudRun ([artemBogdantsev](https://github.com/artemBogdantsev)) <!-- 2024-09-20 08:30:06+00:00 -->
- [[#2586](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2586)] Add location for each SSM IAM resource ([lnesteroff](https://github.com/lnesteroff)) <!-- 2024-09-20 07:30:46+00:00 -->
- [[#2569](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2569)] Secure source manager ([apichick](https://github.com/apichick)) <!-- 2024-09-19 10:29:01+00:00 -->
- [[#2570](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2570)] Bigquery dataset routines ([apichick](https://github.com/apichick)) <!-- 2024-09-19 09:13:32+00:00 -->
- [[#2583](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2583)] **incompatible change:** Support secret-level expire time in secret manager module ([ludoo](https://github.com/ludoo)) <!-- 2024-09-19 08:35:44+00:00 -->
- [[#2559](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2559)] Fix e2e tests for cloud run ([wiktorn](https://github.com/wiktorn)) <!-- 2024-09-10 10:04:40+00:00 -->
- [[#2536](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2536)] **incompatible change:** Add support for google provider 6.x ([sruffilli](https://github.com/sruffilli)) <!-- 2024-09-05 10:35:59+00:00 -->

### TOOLS

- [[#2536](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2536)] **incompatible change:** Add support for google provider 6.x ([sruffilli](https://github.com/sruffilli)) <!-- 2024-09-05 10:35:59+00:00 -->

## [34.1.0] - 2024-09-05
<!-- 2024-09-05 10:07:19+00:00 < 2024-08-30 08:18:13+00:00 -->

### BLUEPRINTS

- [[#2557](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2557)] Bump provider to 5.43.1 ahead of next release ([juliocc](https://github.com/juliocc)) <!-- 2024-09-04 17:58:07+00:00 -->

### FAST

- [[#2545](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2545)] Add documentation instructions for potential issues in cicd-github and bootstrap stages ([ludoo](https://github.com/ludoo)) <!-- 2024-08-30 12:04:44+00:00 -->

### MODULES

- [[#2557](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/pull/2557)] Bump provider to 5.43.1 ahead of next release ([juliocc](https://github.com/juliocc)) <!-- 2024-09-04 17:


ed 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 prometheus

// Untyped is a Metric that represents a single numerical value that can
// arbitrarily go up and down.
//
// An Untyped metric works the same as a Gauge. The only difference is that to
// no type information is implied.
//
// To create Untyped instances, use NewUntyped.
//
// Deprecated: The Untyped type is deprecated because it doesn't make sense in
// direct instrumentation. If you need to mirror an external metric of unknown
// type (usually while writing exporters), Use MustNewConstMetric to create an
// untyped metric instance on the fly.
type Untyped interface {
	Metric
	Collector

	// Set sets the Untyped metric to an arbitrary value.
	Set(float64)
	// Inc increments the Untyped metric by 1.
	Inc()
	// Dec decrements the Untyped metric by 1.
	Dec()
	// Add adds the given value to the Untyped metric. (The value can be
	// negative, resulting in a decrease.)
	Add(float64)
	// Sub subtracts the given value from the Untyped metric. (The value can
	// be negative, resulting in an increase.)
	Sub(float64)
}

// UntypedOpts is an alias for Opts. See there for doc comments.
type UntypedOpts Opts

// NewUntyped creates a new Untyped metric from the provided UntypedOpts.
func NewUntyped(opts UntypedOpts) Untyped {
	return newValue(NewDesc(
		BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
		opts.Help,
		nil,
		opts.ConstLabels,
	), UntypedValue, 0)
}

// UntypedVec is a Collector that bundles a set of Untyped metrics that all
// share the same Desc, but have different values for their variable
// labels. This is used if you want to count the same thing partitioned by
// various dimensions. Create instances with NewUntypedVec.
type UntypedVec struct {
	*MetricVec
}

// NewUntypedVec creates a new UntypedVec based on the provided UntypedOpts and
// partitioned by the given label names. At least one label name must be
// provided.
func NewUntypedVec(opts UntypedOpts, labelNames []string) *UntypedVec {
	desc := NewDesc(
		BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
		opts.Help,
		labelNames,
		opts.ConstLabels,
	)
	return &UntypedVec{
		MetricVec: newMetricVec(desc, func(lvs ...string) Metric {
			return newValue(desc, UntypedValue, 0, lvs...)
		}),
	}
}

// GetMetricWithLabelValues replaces the method of the same name in
// MetricVec. The difference is that this method returns an Untyped and not a
// Metric so that no type conversion is required.
func (m *UntypedVec) GetMetricWithLabelValues(lvs ...string) (Untyped, error) {
	metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...)
	if metric != nil {
		return metric.(Untyped), err
	}
	return nil, err
}

// GetMetricWith replaces the method of the same name in MetricVec. The
// difference is that this method returns an Untyped and not a Metric so that no
// type conversion is required.
func (m *UntypedVec) GetMetricWith(labels Labels) (Untyped, error) {
	metric, err := m.MetricVec.GetMetricWith(labels)
	if metric != nil {


ode = { "i", "n" } },
            ["<c-d>"] = { "preview_scroll_down", mode = { "i", "n" } },
            ["<a-k>"] = { "list_scroll_up", mode = { "i", "n" } },
          },
        },
      },
    },
    image = {
      enabled = true,
      doc = {
        inline = false,
      },
    },
    scroll = {
      animate = {
        duration = { step = 10, total = 100 },
      },
    },
  },
  -- stylua: ignore
  keys = {
    { "<leader>fz", function() Snacks.picker.zoxide({
      finder = "files_zoxide",
      format = "file",
      -- confirm = "load_session" -- Disable loading session by default.
      confirm = function(picker, item)
        picker:close()
        if item then
          Snacks.picker.files({ cwd = item.text })
        end
        local dir = item.file
        vim.fn.chdir(dir)
      end,
      win = {
        preview = {
          minimal = true,
        },
      },
    }) end, desc = "Zoxide" },
    { "<leader>gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
    { "<leader>,", function() Snacks.picker.buffers({
      on_show = function()
        vim.cmd.stopinsert()
      end,
      current = false,
      sort_lastused = true,
    }) end, desc = "Buffers" },
    { "<leader>go", function() Snacks.gitbrowse() end, desc = "Git Open Line" },
  },
}


            .split { title }.match(regex).into("title", "year")
            .parse()
        split.schema().print()
        split["title"].hasNulls shouldBe false
        split["year"].type shouldBe typeOf<Int>()
    }

    @Test
    fun `split into columns`() {
        val df = dataFrameOf("a", "b", "c")(
            1, 2, 3,
            1, 4, 5,
            2, 3, 4,
            3, 6, 7,
        )
        val res = df
            .groupBy("a").updateGroups { it.remove("a") }.into("g")
            .update("g").at(1).with { DataFrame.empty() }
            .update("g").at(2).withNull()
            .split { "g"<AnyFrame>() }.intoColumns()
            .ungroup("g")
        res shouldBe dataFrameOf("a", "b", "c")(
            1, listOf(2, 4), listOf(3, 5),
            2, emptyList<Int>(), emptyList<Int>(),
            3, emptyList<Int>(), emptyList<Int>(),
        )
    }

    @Test
    fun `split string by delimiter inward`() {
        val res = stringPairDf.split("first", "second").by("-").inward("left", "right")

        res shouldBe dataFrameOf(
            columnOf(columnOf("22") named "left", columnOf("65") named "right") named "first",
            columnOf(columnOf("22") named "left", columnOf("66") named "right") named "second",
        )
    }

    @Test
    fun `split string by delimiter into columns with suffixes`() {
        val res = stringPairDf.split("first", "second").by("-").into("left", "right")

        res shouldBe dataFrameOf(
            columnOf("22") named "left",
            columnOf("65") named "right",
            columnOf("22") named "left1",
            columnOf("66") named "right1",
        )
    }

    @Test
    fun `split list inward with autogenerated names`() {
        val res = listPairDf.split { "first"<List<String>>() and "second"<List<String>>() }.inward()

        res shouldBe dataFrameOf(
            columnOf(columnOf("22") named "split1", columnOf("65") named "split2") named "first",
            columnOf(columnOf("22") named "split1", columnOf("66") named "split2") named "second",
        )
    }

    @Test
    fun `split list into with autogenerated names`() {
        val res = listPairDf.split { "first"<List<String>>() and "second"<List<String>>() }.into()

        res shouldBe dataFrameOf(
            columnOf("22") named "split1",
            columnOf("65") named "split2",
            columnOf("22") named "split3",
            columnOf("66") named "split4",
        )
    }

    @Test
    fun `sequence of splits with autogenerated names`() {
        var res = listPairDf.split { "first"<List<String>>() }.into()
        res = res.split { "second"<List<String>>() }.into()

        res shouldBe dataFrameOf(
            columnOf("22") named "split1",
            columnOf("65") named "split2",
            columnOf("22") named "split3",
            columnOf("66") named "split4",
        )
    }

    @Test
    fun `split column group inward`() {
        val df = stringPairDf.group("first", "second").into("group")

        // Note: this operation replaces original columns in group so there is no name conflict
        val res = df
            .split { "group"<DataRowImpl<*>>() }
            .by { it -> listOf(it[1], it[0]) } // swap columns


/* Copyright (C) 2021 Free Software Foundation, Inc.
   Contributed by Oracle.

   This file is part of GNU Binutils.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, 51 Franklin Street - Fifth Floor, Boston,
   MA 02110-1301, USA.  */

#ifndef _ABS_H
#define _ABS_H

/*
 * Apropos Backtracking Scheme definitions.
 * Class: com_sun_forte_st_mpmt_timeline_HWCEvent
 */

/* ABS failure codes */
typedef enum
{
  ABS_NULL          = 0x00,     /* undefined/disabled/inactive */
  ABS_UNSUPPORTED   = 0x01,     /* inappropriate HWC event type */
  ABS_BLOCKED       = 0x02,     /* runtime backtrack blocker reached */
  ABS_INCOMPLETE    = 0x03,     /* runtime backtrack limit reached */
  ABS_REG_LOSS      = 0x04,     /* address register contaminated */
  ABS_INVALID_EA    = 0x05,     /* invalid effective address value */
  ABS_NO_CTI_INFO   = 0x10,     /* no AnalyzerInfo for validation */
  ABS_INFO_FAILED   = 0x20,     /* info failed to validate backtrack */
  ABS_CTI_TARGET    = 0x30,     /* CTI target invalidated backtrack */
  ABS_CODE_RANGE    = 0xFF      /* reserved ABS code range in Vaddr */
} ABS_code;

enum {
  NUM_ABS_RT_CODES = 7,
  NUM_ABS_PP_CODES = 5
};

extern const char *ABS_RT_CODES[NUM_ABS_RT_CODES];
extern char *ABS_PP_CODES[NUM_ABS_PP_CODES];

/* libcollector will mark HWC overflow values that appear to be invalid */
/* dbe should check HWC values for errors */
#define HWCVAL_ERR_FLAG         (1ULL<<63)
#define HWCVAL_SET_ERR(ctr)     ((ctr) | HWCVAL_ERR_FLAG)
#define HWCVAL_HAS_ERR(ctr)     ((ctr) & HWCVAL_ERR_FLAG ? 1 : 0)
#define HWCVAL_CLR_ERR(ctr)     ((ctr) & ~HWCVAL_ERR_FLAG)

#define ABS_GET_RT_CODE(EA)     ((EA) & 0x0FLL)
#define ABS_GET_PP_CODE(EA)     (((EA) & 0xF0LL) / 0xF)

#endif /* _ABS_H */


} else {
		return nil, fmt.Errorf("not found %v", countKey)
	}
	var zoneName string
	if zoneName = r.FormValue(zoneNameKey); zoneName == "" {
		zoneName = DefaultZoneName
	}
	params[zoneNameKey] = zoneName

	if value = r.FormValue(idKey); value != "" {
		nodesetId := uint64(0)
		nodesetId, err = strconv.ParseUint(value, 10, 64)
		if err != nil {
			err = unmatchedKey(idKey)
			return
		}
		params[idKey] = nodesetId
	} else {
		return nil, fmt.Errorf("not found %v", idKey)
	}

	log.LogInfof("action[parseAndExtractSetNodeSetInfoParams]%v,%v,%v", params[zoneNameKey], params[idKey], params[countKey])

	return
}

func parseAndExtractSetNodeInfoParams(r *http.Request) (params map[string]interface{}, err error) {
	if err = r.ParseForm(); err != nil {
		return
	}
	var value string
	noParams := true
	params = make(map[string]interface{})
	if value = r.FormValue(nodeDeleteBatchCountKey); value != "" {
		noParams = false
		batchCount := uint64(0)
		batchCount, err = strconv.ParseUint(value, 10, 64)
		if err != nil {
			err = unmatchedKey(nodeDeleteBatchCountKey)
			return
		}
		params[nodeDeleteBatchCountKey] = batchCount
	}

	if value = r.FormValue(nodeMarkDeleteRateKey); value != "" {
		noParams = false
		val := uint64(0)
		val, err = strconv.ParseUint(value, 10, 64)
		if err != nil {
			err = unmatchedKey(nodeMarkDeleteRateKey)
			return
		}
		params[nodeMarkDeleteRateKey] = val
	}

	if value = r.FormValue(nodeAutoRepairRateKey); value != "" {
		noParams = false
		val := uint64(0)
		val, err = strconv.ParseUint(value, 10, 64)
		if err != nil {
			err = unmatchedKey(nodeAutoRepairRateKey)
			return
		}
		params[nodeAutoRepairRateKey] = val
	}

	if value = r.FormValue(nodeDeleteWorkerSleepMs); value != "" {
		noParams = false
		val := uint64(0)
		val, err = strconv.ParseUint(value, 10, 64)
		if err != nil {
			err = unmatchedKey(nodeMarkDeleteRateKey)
			return
		}
		params[nodeDeleteWorkerSleepMs] = val
	}

	if value = r.FormValue(clusterLoadFactorKey); value != "" {
		noParams = false
		valF, err := strconv.ParseFloat(value, 64)
		if err != nil || valF < 0 {
			err = unmatchedKey(clusterLoadFactorKey)
			return params, err
		}

		params[clusterLoadFactorKey] = float32(valF)
	}

	if value = r.FormValue(maxDpCntLimitKey); value != "" {
		noParams = false
		val := uint64(0)
		val, err = strconv.ParseUint(value, 10, 64)
		if err != nil {
			err = unmatchedKey(maxDpCntLimitKey)
			return
		}
		params[maxDpCntLimitKey] = val
	}

	if value = r.FormValue(maxMpCntLimitKey); value != "" {
		noParams = false
		val := uint64(0)
		val, err = strconv.ParseUint(value, 10, 64)
		if err != nil {
			err = unmatchedKey(maxMpCntLimitKey)
			return
		}
		params[maxMpCntLimitKey] = val
	}

	if value = r.FormValue(nodeDpRepairTimeOutKey); value != "" {
		noParams = false
		va


******* Eutanasia tool
******* This program convert the "buged" version of PREVIEW1.MED to
******* a error free version with the same header but with correct fast
******* blocks.
*******           91 10 28 Mndag 20:05

                lea     A+4(pc),a0
                lea     B(pc),a1

.LOOP_A


QEMf%2FTpw2aVo17dAKVMGJobSDLSdhaYUi2khVpaiZou5O85pEce3o2akViaETK1uFBCM7GytfAwlGFr4DA%2BfXK6ioUgQFiVh%2B73f23f%2Fu3fMLALJewMLVr4VXwhbK%2BCacg22tCufx2OoL21i23gkXsGR9Ep7Dcq4kPI9nudfCRTzMbwiXmJ8LL6BlPxEuY8V%2BK7yIiv1RuIJywRJegV1YF15FpdDgqiy7xNalqTBjC2v4IpxD0SoK59G21oVtPLBeChdw3%2FogPMfPvwrP4yJ3T7iIRu6zcAmN%2FFPhBVzm3wiX8ci%2BEF4E2e%2BFK1izrzVXUCwsCa%2BCChtoIsIYU2gM0ccACQhbOME2zzV4qPJF6LIH4Qg%2B%2B%2FXNqIxnkznAOVva2Jt8H7IVGr0RWy1MOFqxl8vWHs8Bzz%2BzxcZSPGcamVKPPdGMxlM97A8S2jrZpppXrVJ3Ske%2B7vtaJdT0g3OlE9qkQxXq4Yhak64KXNoLAjJhMWkVK32ueizWRoczE48%2B1zLhCrIVoN3Zo47fnQQ%2BG%2Fvch4BzYz8KeDxgM%2BTysjlbsuLwXb6vpG4KOT%2BCr3zq3DaH2%2BZIA%2BssF4XJQaT7inaJ00pWJ8vFT%2BqeU3V4jXXM0McvscCxaVvM7czqJc7mcs7swrHS8TAKqep6nvf7ym1WTk3TNPuGnGNsepFt89Bsm893Yt722PfMKGZbHuH0L3wsaKuUOtoP43HEOz2MyadE%2Bz115usRRaczPwbcsQTMSPDv9WedTQ87%2F8PZ9HbucDZTc7lca40%2Fx4TXMuY8Lq8y4nHCdSJNU9evOcl0rNyTyJ2MbkbFTAP2uyUmTgej65A%2F%2BBO4PYRuHJrrYDIh3wFkEkHMAAAAeJxjYGIAg%2F8rGH4BKUYGdMALFmViEGYQYRBlEGMQZ5BgkGSQYpBmkAEAkCYDoAAAeJxlU8lOAlEQLNxYZRMBN0QERAYUNahREwyBk4kkHow3vZoYD4pHE29eTfwBP8HEC%2BEyn%2BAvWW%2BmeQ68TJiartc13V3NDAALQ%2FiwhinLN0QOSfVg86HC3zJSiAAIWDbWDSZvMBtkSmNMAfuo855BTJhNXjnGcQSFKeIUeyhjReeU0MERaqyZEqZs5Gwhy9M4K43eU8HFhGobPbTRpG7EVFl7iVFUqyz25%2FY8L0yNsZoroZm6odphFaWJaWZXq0IOA5u2qleveuyYMphpg5nBIVsocLzRqLMcYZyZc%2BxQuoQwfsPWAO1oO7rR8EGc4YA2%2FatCholhXE9YFpGMAPtwmXmuLIe0Z%2FiokxP25MSYpeI5zcSl4%2F9JE8aak3jHIy7JFoRZwANu0KXhOWFS%2BMEnnnCFhjCLxnrSnLQ5NmmGk1f5l03r6lkcc2lFj6tLzCiMdbhsrHnF8HDVmGKNtS3PvviFNWi13xoA%2Be7rfbYzxDe37HtWBy5%2BKOwLT8wrfBniy4vM%2B2XX6txWyLglmNfxiYO2YIv9anR0504cF7wVbAn2FPZVPRehkPXvBN8E1Yfl1mmLXuEf3HGH4gAA) format("woff");
  font-weight: bold;
}

/*
 * magna-charta example stylesheet
 * https://github.com/alphagov/magna-charta
 *
 * Author: Tim Paul
 * Licensed under the MIT license.
 */

// DEFAULT CHART STYLES

$label-width: 40%;          // Horizontal width taken up by the bar labels
$label-align: right;        // Label alignment
$base-unit: 16px;           // For font sizes and related spacing
$compact-font-size: 12px;   // For the 'compact' bar style
$bar-p


.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}

.cm-s-base16-light span.cm-comment {color: #8f5536;}
.cm-s-base16-light span.cm-atom {color: #aa759f;}
.cm-s-base16-light span.cm-number {color: #aa759f;}

.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}
.cm-s-base16-light span.cm-keyword {color: #ac4142;}
.cm-s-base16-light span.cm-string {color: #f4bf75;}

.cm-s-base16-light span.cm-variable {color: #90a959;}
.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}
.cm-s-base16-light span.cm-def {color: #d28445;}
.cm-s-base16-light span.cm-bracket {color: #202020;}
.cm-s-base16-light span.cm-tag {color: #ac4142;}
.cm-s-base16-light span.cm-link {color: #aa759f;}
.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}

.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}
.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
/*

    Name:       Tomorrow Night - Eighties
    Author:     Chris Kempson

    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)

*/

.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}
.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}

.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;}
.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;}
.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;}

.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;}
.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;}
.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;}

.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;}
.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;}
.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;}
.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;}
.cm-s-tomorrow-night-eighties span.cm-tag {color: #f27


THE AUTHOR OR CONTRIBUTORS BE LIABLE
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
; SUCH DAMAGE.
;
; This file is part of the Contiki operating system.
;
; Author: Greg King <gregdk@users.sf.net>
;
;---------------------------------------------------------------------
	.importzp	sp, sreg, ptr1, ptr2, ptr3
	.import		popax, incsp6
	.import		cmdc, flags

	.export		_pfs_seek
;---------------------------------------------------------------------
.proc	_pfs_seek
	lda	#<-1		; seek not implemented
	tax
	stx	sreg		; return long data type
	stx	sreg+1
	jmp	incsp6		; drop int and long arguments from stack
.endproc


veDef === "'" + t.charAt(0) || " " === a.getTest.call(c, e).match.nativeDef && (a.getTest.call(c, e + 1).match.nativeDef === t.charAt(0) || !0 === a.getTest.call(c, e + 1).match.static && a.getTest.call(c, e + 1).match.nativeDef === "'" + t.charAt(0)));
                                if (!o && n > 0 && !r.isMask.call(c, e, !1, !0)) {
                                    var s = r.seekNext.call(c, e);
                                    c.caretPos.begin < s && (c.caretPos = {
                                        begin: s
                                    });
                                }
                                return o;
                            }(m, v) ? (g = l.EventHandlers.keypressEvent.call(c, n, !0, !1, i, c.caretPos.begin)) && (m = c.caretPos.begin + 1,
                            v = "") : g = l.EventHandlers.keypressEvent.call(c, n, !0, !1, i, o + 1), g ? (void 0 !== g.pos && u.validPositions[g.pos] && !0 === u.validPositions[g.pos].match.static && void 0 === u.validPositions[g.pos].alternation && (k.push(g.pos),
                            c.isRTL || (g.forwardPosition = g.pos + 1)), d.call(c, void 0, r.getBuffer.call(c), g.forwardPosition, n, !1),
                            c.caretPos = {
                                begin: g.forwardPosition,
                                end: g.forwardPosition
                            }, b = c.caretPos) : void 0 === u.validPositions[t] && h[t] === a.getPlaceholder.call(c, t) && r.isMask.call(c, t, !0) ? c.caretPos.begin++ : c.caretPos = b;
                        }
                    })), k.length > 0) {
                        var x, P, w = r.seekNext.call(c, -1, void 0, !1);
                        if (!o.isComplete.call(c, r.getBuffer.call(c)) && k.length <= w || o.isComplete.call(c, r.getBuffer.call(c)) && k.length > 0 && k.length !== w && 0 === k[0]) for (var S = w; void 0 !== (x = k.shift()); ) {
                            var M = new p.Event("_checkval");
                            if ((P = u.validPositions[x]).generatedInput = !0, M.key = P.input, (g = l.EventHandlers.keypressEvent.call(c, M, !0, !1, i, S)) && void 0 !== g.pos && g.pos !== x && u.validPositions[g.pos] && !0 === u.validPositions[g.pos].match.static) k.push(g.pos); else if (!g) break;
                            S++;
                        }
                    }
                    t && d.call(c, e, r.getBuffer.call(c), g ? g.forwardPosition : c.caretPos.begin, s || new p.Event("checkval"), s && ("input" === s.type && c.undoValue !== r.getBuffer.call(c).join("") || "paste" === s.type)),
                    f.skipOptionalPartCharacter = y;
                }
                function d(e, t, i, a, s) {
                    var l = e ? e.inputmask : this, c = l.opts, u = l.dependencyLib;
                    if (a && "function" == typeof c.onBeforeWrite) {
                        var f = c.onBeforeWrite.call(l, a, t, i, c);
                        if (f) {
                            if (f.refreshFromBuffer) {
                                var d = f.refreshFromBuffer;
                                o.refreshFromBuffer.call(l


 "var2": var2, "refId": refId});

    // handle native call

    // convert native result to dart side object
    if (result == null) {
      return null;
    } else {

      return result;
    }
  }

  Future<int> getFBOTextureId() async {
    // print log
    if (fluttifyLogEnabled) {
      print('fluttify-dart: com.autonavi.ae.gmap.gloverlay.GLCrossVector@$refId::getFBOTextureId([])');
    }

    // invoke native method
    final result = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.autonavi.ae.gmap.gloverlay.GLCrossVector::getFBOTextureId', {"refId": refId});

    // handle native call

    // convert native result to dart side object
    if (result == null) {
      return null;
    } else {

      return result;
    }
  }

  Future<void> initFBOTexture(int var1, int var2) async {
    // print log
    if (fluttifyLogEnabled) {
      print('fluttify-dart: com.autonavi.ae.gmap.gloverlay.GLCrossVector@$refId::initFBOTexture([\'var1\':$var1, \'var2\':$var2])');
    }

    // invoke native method
    final result = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.autonavi.ae.gmap.gloverlay.GLCrossVector::initFBOTexture', {"var1": var1, "var2": var2, "refId": refId});

    // handle native call

    // convert native result to dart side object
    if (result == null) {
      return null;
    } else {

      return result;
    }
  }

  //endregion
}

extension com_autonavi_ae_gmap_gloverlay_GLCrossVector_Batch on List<com_autonavi_ae_gmap_gloverlay_GLCrossVector> {
  //region getters

  //endregion

  //region setters

  //endregion

  //region methods
  Future<List<int>> addVectorItem_batch(List<com_autonavi_ae_gmap_gloverlay_GLCrossVector_AVectorCrossAttr> var1, List<Uint8List> var2, List<int> var3) async {
    if (var1.length != var2.length || var2.length != var3.length) {
      return Future.error('all args must have same length!');
    }

    // invoke native method
    final resultBatch = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.autonavi.ae.gmap.gloverlay.GLCrossVector::addVectorItem_batch', [for (int i = 0; i < this.length; i++) {"var1": var1[i].refId, "var2": var2[i], "var3": var3[i], "refId": this[i].refId}]);

    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).map((result) => result).toList();

      return typedResult;
    }
  }

  Future<void> addVectorRemainDis_batch(List<int> var1) async {
    if (false) {
      return Future.error('all args must have same length!');
    }

    // invoke native method
    final resultBatch = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.autonavi.ae.gmap.gloverlay.GLCrossVector::addVectorRemainDis_batch', [for (int i = 0; i < this.length; i++)


1CF4C378CC
      L3_2 = L3_2.SB9BC4C6F16AEEF64
      L4_2 = E366415E12D9CEAB1
      L4_2 = L4_2.BATTLE
      L3_2 = L3_2(L4_2)
      if not L3_2 then
        break
      end
      L3_2 = C1DB14DCC9D7634FA
      L3_2 = L3_2.S760DAE4C5371A78E
      L3_2()
    end
  end
  L4_2 = A0_2