/xlink" width="48" height="48" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><g fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"><path d="M39 8H9a1 1 0 00-1 1v30a1 1 0 001 1h30a1 1 0 001-1V9a1 1 0 00-1-1ZM9 6a3 3 0 00-3 3v30a3 3 0 003 3h30a3 3 0 003-3V9a3 3 0 00-3-3H9Z"/><path d="M17 10a2 2 0 00-2 2v24a2 2 0 002 2h14a2 2 0 002-2V12a2 2 0 00-2-2H17Zm14 2H17v9h14v-9Zm-9.727 12.636a1.636 1.636 0 11-3.273 0 1.636 1.636 0 013.273 0ZM24 26.273A1.636 1.636 0 1024 23a1.636 1.636 0 000 3.273Zm6-1.637a1.636 1.636 0 11-3.273 0 1.636 1.636 0 013.273 0Zm-10.364 6a1.636 1.636 0 100-3.272 1.636 1.636 0 000 3.272Zm6-1.636a1.636 1.636 0 11-3.273 0 1.636 1.636 0 013.273 0Zm2.728 1.636a1.636 1.636 0 100-3.272 1.636 1.636 0 000 3.272ZM30 33.364a1.636 1.636 0 11-3.273 0 1.636 1.636 0 013.273 0Zm-10.364-1.637a1.636 1.636 0 100 3.273H24a1.636 1.636 0 000-3.273h-4.364Z"/></g></svg>';
  static const String fingerprint =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><path fill="currentColor" fill-rule="evenodd" d="M10 18c0-7.732 6.268-14 14-14s14 6.268 14 14v12c0 7.732-6.268 14-14 14s-14-6.268-14-14V18Zm14 0a1 1 0 011 1v9.787c0 2.258.548 3.766 1.468 4.713.914.942 2.36 1.5 4.532 1.5a1 1 0 110 2c-2.495 0-4.549-.645-5.968-2.107C23.62 33.437 23 31.338 23 28.787V19a1 1 0 011-1Zm0-9c-4.986 0-10 3.765-10 9.235v12.549c0 1.245.184 2.53.575 3.664.387 1.12 1.01 2.182 1.956 2.852a1 1 0 101.157-1.631c-.48-.34-.911-.974-1.223-1.874-.306-.888-.465-1.948-.465-3.012V18.236C16 14.123 19.847 11 24 11c4.153 0 8 3.123 8 7.235v10.309c0 .661-.134 1.171-.334 1.482-.165.258-.383.407-.775.407-.417 0-.732-.174-.968-.48-.251-.325-.423-.82-.423-1.41v-9.306a5.68 5.68 0 00-1.602-3.964A5.442 5.442 0 0024 13.62a5.442 5.442 0 00-3.898 1.654 5.68 5.68 0 00-1.602 3.964v11.616c0


ic.Circle({
      left: position.x,
      top: position.y,
      originX: 'left',
      originY: 'top',
      radius: 0,
      angle: 0,
      fill: '',
      stroke: this.toolSetting.color,
      strokeWidth: this.toolSetting.strokeWidth,
    });
    this.canvas.add(this.drawingObj);
  }

  public drawing(currentPointer: ClientXY): void {
    let radiusVal = Math.max(Math.abs(this.startPointer.y - currentPointer.y), Math.abs(this.startPointer.x - currentPointer.x)) / 2;
    if (radiusVal > this.drawingObj.strokeWidth) {
      radiusVal -= this.drawingObj.strokeWidth / 2;
    }
    this.drawingObj.set({ radius: radiusVal });

    if (this.startPointer.x > currentPointer.x) {
      this.drawingObj.set({ originX: 'right' });
    } else {
      this.drawingObj.set({ originX: 'left' });
    }

    if (this.startPointer.y > currentPointer.y) {
      this.drawingObj.set({ originY: 'bottom' });
    } else {
      this.drawingObj.set({ originY: 'top' });
    }

    this.canvas.renderAll();
  }
}

class Rectangle extends ShapesProvider {
  private startPointer: ClientXY;
  public preDraw(position: ClientXY) {
    this.startPointer = position;

    this.drawingObj = new fabric.Rect({
      left: position.x,
      top: position.y,
      width: 0,
      height: 0,
      stroke: this.toolSetting.color,
      strokeWidth: this.toolSetting.strokeWidth,
      fill: ''
    });

    this.canvas.add(this.drawingObj);
  }

  public drawing(currentPointer: ClientXY): void {
    if (this.startPointer.x > currentPointer.x) {
      this.drawingObj.set({ left: Math.abs(currentPointer.x) });
    }
    if (this.startPointer.y > currentPointer.y) {
      this.drawingObj.set({ top: Math.abs(currentPointer.y) });
    }

    this.drawingObj.set({ width: Math.abs(this.startPointer.x - currentPointer.x) });
    this.drawingObj.set({ height: Math.abs(this.startPointer.y - currentPointer.y) });

    this.canvas.renderAll();
  }
}
import fs from 'fs'
import path from 'path'
import dotenv from 'dotenv'

const envPath = path.resolve(__dirname, '../.env')

export function saveToEnv(vars: { [key: string]: string }) {
  let current: { [key: string]: string }
  try {
    current = dotenv.parse(fs.readFileSync(envPath))
  } catch (e) {
    current = {}
  }
  Object.assign(current, vars)
  const serlized = Object.entries(current)
    .map(([key, value]) => `${key}=${value}`)
    .join(`\n`)
  fs.writeFileSync(envPath, serlized)
}
import mysql, { Connection, QueryOptions } from 'mysql'
import { Config } from '@common/type/config'
import { inProduction } from '@common/util/env2'
import { getConfig, registerObjectCloser, registerObjectFactory } from '../../oman/oman'

registerObjectFactory('DB', async () => {
  const db = DB.from(getConfig())
  await db.createDatabase()
  registerObjectCloser(async () => {
    await db.close()
  })
  return db
})

export class DB {

  readonly dbName: string
  readonly conn: Connection

  static from(config: Config) {
    return new DB(config)
  }

  private constructor(config: Config) {
    this


n user.permissions.contains(permission)
    }

    /**
     * 检查用户是否可以管理POS机
     * @param user 用户信息
     * @return 是否可以管理
     */
    fun canManagePOSMachines(user: User): Boolean {
        return user.canManagePOS
    }

    /**
     * 检查用户是否已验证
     * @param user 用户信息
     * @return 是否已验证
     */
    fun isUserVerified(user: User): Boolean {
        return user.isVerified
    }

    /**
     * 获取用户显示名称
     * @param user 用户信息
     * @return 显示名称
     */
    fun getUserDisplayName(user: User): String {
        return user.displayName
    }

    /**
     * 检查用户是否为管理员
     * @param user 用户信息
     * @return 是否为管理员
     */
    fun isAdmin(user: User): Boolean {
        return user.role == UserRole.ADMIN || user.role == UserRole.SUPER_ADMIN
    }

    /**
     * 检查用户是否为商户
     * @param user 用户信息
     * @return 是否为商户
     */
    fun isMerchant(user: User): Boolean {
        return user.role == UserRole.MERCHANT
    }

    /**
     * 检查用户是否活跃
     * @param user 用户信息
     * @return 是否活跃
     */
    fun isUserActive(user: User): Boolean {
        return user.status == UserStatus.ACTIVE
    }
}package com.paymentsmaps.android.data.remote

import com.paymentsmaps.android.BuildConfig
import io.github.jan.supabase.SupabaseClient
import io.github.jan.supabase.createSupabaseClient
import io.github.jan.supabase.gotrue.Auth
import io.github.jan.supabase.postgrest.Postgrest
import io.github.jan.supabase.realtime.Realtime
import io.github.jan.supabase.storage.Storage
import javax.inject.Singleton

/**
 * Supabase配置类
 * 提供Supabase客户端实例和相关配置
 */
@Singleton
object SupabaseConfig {

    /**
     * Supabase客户端实例
     */
    val client: SupabaseClient by lazy {
        createSupabaseClient(
            supabaseUrl = BuildConfig.SUPABASE_URL,
            supabaseKey = BuildConfig.SUPABASE_ANON_KEY
        ) {
            // 安装Auth模块用于身份验证
            install(Auth)

            // 安装Postgrest模块用于数据库操作
            install(Postgrest)

            // 安装Storage模块用于文件存储
            install(Storage)

            // 安装Realtime模块用于实时订阅
            install(Realtime)
        }
    }

    /**
     * 数据库表名常量
     */
    object Tables {
        const val POS_MACHINES = "pos_machines"
        const val MERCHANTS = "merchants"
        const val TRANSACTIONS = "transactions"
        const val USERS = "users"
        const val USER_PROFILES = "user_profiles"
        const val MERCHANT_CONTACTS = "merchant_contacts"
        const val OPERATING_HOURS = "operating_hours"
        const val TRANSACTION_FEES = "transaction_fees"
        const val DEVICE_INFO = "device_info"
        const val COMPLIANCE


e object is
     *     byte[]
     */
    byte[] getY();

    /**
     * Sets the value of the y property.
     *
     * @param value
     *     allowed object is
     *     byte[]
     */
    void setY(byte[] value);

    /**
     * Gets the value of the pgenCounter property.
     *
     * @return
     *     possible object is
     *     byte[]
     */
    byte[] getPgenCounter();

    /**
     * Sets the value of the pgenCounter property.
     *
     * @param value
     *     allowed object is
     *     byte[]
     */
    void setPgenCounter(byte[] value);

    /**
     * Gets the value of the j property.
     *
     * @return
     *     possible object is
     *     byte[]
     */
    byte[] getJ();

    /**
     * Sets the value of the j property.
     *
     * @param value
     *     allowed object is
     *     byte[]
     */
    void setJ(byte[] value);

}
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.11 at 10:34:07 AM PDT
//

package com.sun.identity.saml2.jaxb.xmlsig;

/**
 * Java content class for KeyName element declaration.
 *
The following schema fragment specifies the expected content contained within this java content object. (defined at file:/Users/allan/A-SVN/trunk/opensso/products/federation/library/xsd/saml2/xmldsig-core-schema.xsd line 162)
 *

 *

 * <element name="KeyName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *

 *
 */
public interface KeyNameElement
    extends javax.xml.bind.Element
{

    /**
     * Gets the value of the value property.
     *
     * @return
     *     possible object is
     *     {@link java.lang.String}
     */
    java.lang.String getValue();

    /**
     * Sets the value of the value property.
     *
     * @param value
     *     allowed object is
     *     {@link java.lang.String}
     */
    void setValue(java.lang.String value);

}
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.11 at 10:34:07 AM PDT
//

package com.sun.identity.saml2.jaxb.metadataextquery;

/**
 * Java content class for AttributeQueryDescriptorType complex type.
 *
The following schema fragment specifies the expected content contained within this java content object. (defined at file:/Users/allan/A-SVN/trunk/opensso/products/federation/library/xsd/saml2/sstc-saml-metadata-ext-query.xsd line 73)
 *

 *

 * <complexType name="AttributeQueryDescriptorType">
 *   <complexContent>
 *     <extension base="{urn:oasis:names:tc:SAML:metadata:ext:query}QueryDescriptorType">
 *       <sequence>
 *         <element ref="{urn


    "yaoIndex": "0",
      "gender": "0",
      "yaoName": "卦辞",
      "sentence": "否之匪人，不利，君子贞；大往",
      "annotation": "彖象",
      "futureGua": "否"
    },
    {
      "currentGua": "否",
      "yaoIndex": "1",
      "gender": "6",
      "yaoName": "初六",
      "sentence": "拔茅茹，以其汇，贞",
      "annotation": "彖象",
      "futureGua": "无妄"
    },
    {
      "currentGua": "否",
      "yaoIndex": "2",
      "gender": "6",
      "yaoName": "六二",
      "sentence": "包承，小人吉；大人",
      "annotation": "彖象",
      "futureGua": "讼"
    },
    {
      "currentGua": "否",
      "yaoIndex": "3",
      "gender": "6",
      "yaoName": "六三",
      "sentence": "包羞。",
      "annotation": "彖象",
      "futureGua": "遁"
    },
    {
      "currentGua": "否",
      "yaoIndex": "4",
      "gender": "9",
      "yaoName": "九四",
      "sentence": "有命，无咎，畴尚祉",
      "annotation": "彖象",
      "futureGua": "观"
    },
    {
      "currentGua": "否",
      "yaoIndex": "5",
      "gender": "9",
      "yaoName": "九五",
      "sentence": "休否，大人吉；其亡",
      "annotation": "彖象",
      "futureGua": "晋"
    },
    {
      "currentGua": "否",
      "yaoIndex": "6",
      "gender": "9",
      "yaoName": "上九",
      "sentence": "倾否；先否后喜。",
      "annotation": "彖象",
      "futureGua": "萃"
    },
    {
      "currentGua": "同人",
      "yaoIndex": "0",
      "gender": "0",
      "yaoName": "卦辞",
      "sentence": "同人于野，亨，利涉大川，",
      "annotation": "彖象",
      "futureGua": "同人"
    },
    {
      "currentGua": "同人",
      "yaoIndex": "1",
      "gender": "9",
      "yaoName": "初九",
      "sentence": "同人于门，无咎。",
      "annotation": "彖象",
      "futureGua": "遁"
    },
    {
      "currentGua": "同人",
      "yaoIndex": "2",
      "gender": "6",
      "yaoName": "六二",
      "sentence": "同人于宗，吝。",
      "annotation": "彖象",
      "futureGua": "乾"
    },
    {
      "currentGua": "同人",
      "yaoIndex": "3",
      "gender": "9",
      "yaoName": "九三",
      "sentence": "伏戎于莽，升其高",
      "annotation": "彖象",
      "futureGua": "无妄"
    },
    {
      "currentGua": "同人",
      "yaoIndex": "4",
      "gender": "9",
      "


 _data = JSON.parse(data)
                $.zhidao.isSignSuc = true
                $.zhidao.signNo = _data.errorNo
                $.zhidao.signMsg = _data.errorMsg
            } catch (e) {
                $.zhidao.isSignSuc = false
                $.zhidao.signNo = null
                $.zhidao.signMsg = e
                $.logErr(e, resp)
            } finally {
                resove()
            }
        })
    })
}

function barWrapper(bar) {
    return { id: bar.forum_id, name: bar.forum_name, exp: bar.user_exp, level: bar.user_level, isSign: bar.is_sign === 1 }
}

function showmsg() {
    return new Promise((resolve) => {
        // 数据: 签到数量
        const allbarCnt = $.bars.length
        let allsignCnt = 0
        let cursignCnt = 0
        let curfailCnt = 0
        $.bars.filter((bar) => bar.isSign).forEach((bar) => (allsignCnt += 1))
        $.bars.filter((bar) => bar.iscurSign && bar.issignSuc).forEach((bar) => (cursignCnt += 1))
        $.bars.filter((bar) => bar.iscurSign && !bar.issignSuc).forEach((bar) => (curfailCnt += 1))
        $.bars = [true, 'true'].includes($.CFG_isOrderBars) ? $.bars.sort((a, b) => b.contsignCnt - a.contsignCnt) : $.bars
        allsignCnt += cursignCnt
        // 通知: 副标题
        let tiebasubt = '百度贴吧: '
        if (allbarCnt == allsignCnt) tiebasubt += '成功'
        else if (allbarCnt == curfailCnt) tiebasubt += '失败'
        else tiebasubt += '部分签到成功'
        let zhidaosubt = '百度知道: '
        if ($.zhidao.isSignSuc && $.zhidao.signNo === 0) zhidaosubt += '成功'
        else if ($.zhidao.isSignSuc && $.zhidao.signNo === 2) zhidaosubt += '重复'
        else zhidaosubt += '失败'
        // 通知: 详情
        let _curPage = 1
        const _totalPage = Math.ceil(allbarCnt / $.CFG_maxShowBars)

        $.desc = []
        $.bars.forEach((bar, index) => {
            const barno = index + 1
            //const signbar = `${bar.isSign || bar.issignSuc ? '🟢' : '🔴'} [${barno}]【${bar.name}】排名: ${bar.signRank}`
            const signbar = `${bar.isSign || bar.issignSuc ? '🟢' : '🔴'} [${barno}]【${bar.name}】`
            const signlevel = `等级: ${bar.level}`
            const signexp = `经验: ${bar.exp}`
            const signcnt = `连签: ${bar.contsignCnt}/${bar.totalsignCnt}天`
            const signmsg = `${bar.isSign || bar.issignSuc ? '' : `失败原因: ${bar.signMsg}\n`}`
            $.desc.push(`${signbar}`)
            //$.desc.push(`${signlevel}, ${signexp}, ${signcnt}`)
            $.desc.push(`${signlevel}, ${signexp}`)
            $.desc.push(`${signmsg}`)
            if (barno % $.CFG_maxShowBars === 0 || barno === allbarCnt) {
                const _descinfo = []
                _descinfo.push(`共


ShowTips(str)
                else
                    CSAPI.OpenView(key)
                end
            end
        end
    end
end

function RefreshPanel()
    -- head
    UIUtil:AddHeadFrame(headParent, 1)
    -- player
    SetLv()
    SetPlayerDetail()
    -- ad
    SetAD()
    -- lock
    SetLocks()
    -- red
    SetReds()
    --
    UIUtil:AddTitle(titleParent, 1)
    --问卷
    SetQuestionnaire()
end

function SetQuestionnaire()
    CSAPI.SetGOActive(btnQuestionnaire,QuestionnaireMgr:IsShowEnter())
end

function SetDayPower()
    local curTime = TimeUtil:GetTime()
    CSAPI.SetText(txtDay, os.date("%Y/%m/%d", curTime))
    CSAPI.SetText(txtTime, os.date("%H:%M %p", curTime))
    --
    local cur = CSAPI.GetElectricQuantity()
    cur = cur and math.ceil(math.abs(cur) * 100) or 100
    CSAPI.SetText(txtPower, cur .. "%")
    fill_power.fillAmount = cur / 100
end

-- 设置等级
function SetLv()
    -- lv
    local curLv = PlayerClient:GetLv()
    local maxLv = PlayerClient:GetMaxLv()
    CSAPI.SetText(txtLv1, string.format("%d", curLv))

    -- exp
    if curLv == maxLv then
        LanguageMgr:SetText(txtExp1, 34004)
        CSAPI.SetText(txtExp2, "/" .. LanguageMgr:GetByID(34004))
        fill_lv.fillAmount = 1
        return
    end

    local curExp = PlayerClient:GetExp()
    local maxExp = GetMaxExp(curLv)
    CSAPI.SetText(txtExp1, curExp .. "")
    CSAPI.SetText(txtExp2, "/" .. maxExp)
    fill_lv.fillAmount = curExp / maxExp
end
function GetMaxExp(lv)
    local cfg = Cfgs.CfgPlrUpgrade:GetByID(lv)
    return cfg and cfg.nNextExp or 0
end

function SetPlayerDetail()
    CSAPI.SetText(txtName, PlayerClient:GetName())
    CSAPI.SetText(txtUID, "UID:" .. PlayerClient:GetUid())
    --
    barValue = fill_lv.fillAmount
    barTime = 0
end

function SetAD()
    if (isSetAD == nil) then
        isSetAD = 1
        ResUtil:CreateUIGO("Menu/MenuAD", objAD.transform)
    end
end

function SetLocks()
    lockDatasDic = {}
    for i, v in ipairs(views) do
        local isOpen, str = MenuMgr:CheckModelOpen(OpenViewType.main, v)
        if (not isOpen) then
            lockDatasDic[v] = 1
        end
        if (v ~= "PlayerView") then
            local obj = this["btn" .. v]
            UIUtil:SetLockPoint(obj, not isOpen, 0, 0)
            CSAPI.SetGOAlpha(obj, isOpen and 1 or 0.5)
        end
    end
end

function SetReds()
    for i, v in ipairs(views) do
        local isNew = false
        local isRed = false
        if (not lockDatasDic[v]) then
            if (redsRef[v]) then
                local _data = RedPointMgr:GetData(redsRef[v])
                isRed = _data ~= nil
            elseif (v == "PlayerView") then
                local _pData = RedPointMgr:GetData(RedPointType.HeadFrame)
                local _pData2 = RedPointMgr:GetData(RedPointType.Head)
                local _pData3 = RedPointMgr:GetData(RedPointType.Badge)


// <auto-generated>
//  automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>

namespace MyGame.Example
{

[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum Any : byte
{
  NONE = 0,
  Monster = 1,
  TestSimpleTableWithEnum = 2,
  MyGame_Example2_Monster = 3,
};

public class AnyUnion {
  public Any Type { get; set; }
  public object Value { get; set; }

  public AnyUnion() {
    this.Type = Any.NONE;
    this.Value = null;
  }

  public T As<T>() where T : class { return this.Value as T; }
  public MyGame.Example.MonsterT AsMonster() { return this.As<MyGame.Example.MonsterT>(); }
  public static AnyUnion FromMonster(MyGame.Example.MonsterT _monster) { return new AnyUnion{ Type = Any.Monster, Value = _monster }; }
  internal MyGame.Example.TestSimpleTableWithEnumT AsTestSimpleTableWithEnum() { return this.As<MyGame.Example.TestSimpleTableWithEnumT>(); }
  internal static AnyUnion FromTestSimpleTableWithEnum(MyGame.Example.TestSimpleTableWithEnumT _testsimpletablewithenum) { return new AnyUnion{ Type = Any.TestSimpleTableWithEnum, Value = _testsimpletablewithenum }; }
  public MyGame.Example2.MonsterT AsMyGame_Example2_Monster() { return this.As<MyGame.Example2.MonsterT>(); }
  public static AnyUnion FromMyGame_Example2_Monster(MyGame.Example2.MonsterT _mygame_example2_monster) { return new AnyUnion{ Type = Any.MyGame_Example2_Monster, Value = _mygame_example2_monster }; }

  public static int Pack(Google.FlatBuffers.FlatBufferBuilder builder, AnyUnion _o) {
    switch (_o.Type) {
      default: return 0;
      case Any.Monster: return MyGame.Example.Monster.Pack(builder, _o.AsMonster()).Value;
      case Any.TestSimpleTableWithEnum: return MyGame.Example.TestSimpleTableWithEnum.Pack(builder, _o.AsTestSimpleTableWithEnum()).Value;
      case Any.MyGame_Example2_Monster: return MyGame.Example2.Monster.Pack(builder, _o.AsMyGame_Example2_Monster()).Value;
    }
  }
}

public class AnyUnion_JsonConverter : Newtonsoft.Json.JsonConverter {
  public override bool CanConvert(System.Type objectType) {
    return objectType == typeof(AnyUnion) || objectType == typeof(System.Collections.Generic.List<AnyUnion>);
  }
  public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Js


){.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .Wy8MpEhEoRSejVLxAbmA .IN_6y9aGjElxCK5rye3r button._1s4CKH28I4rvqlB8XbX{width:175px}}.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .Wy8MpEhEoRSejVLxAbmA .IN_6y9aGjElxCK5rye3r button._1s4CKH28I4rvqlB8XbX:hover{background:#edf8ff}.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .Wy8MpEhEoRSejVLxAbmA .IN_6y9aGjElxCK5rye3r button._1s4CKH28I4rvqlB8XbX.active{background:#edf8ff;border:1px solid #bce3ec;box-shadow:0 4px 6px rgba(0,0,0,.1);color:#4695a6}.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .Wy8MpEhEoRSejVLxAbmA .kqakqSOa_06YdJCtqSFM{align-items:center;display:flex;justify-content:center;margin-bottom:50px}.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .NeXHjQmizMoCnHJ59BFW{align-items:center;border-top:1px solid #dee2e6;display:flex;flex-direction:column;gap:8px;justify-content:space-around;margin:0 16px;padding:16px;width:90%}.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .NeXHjQmizMoCnHJ59BFW p{font-size:14px;font-weight:600;margin:0 0 2px}.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .NeXHjQmizMoCnHJ59BFW a,.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .NeXHjQmizMoCnHJ59BFW button,.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .NeXHjQmizMoCnHJ59BFW.edLwenSXDULgSStcKaQr button{width:100%}.zp25CN3EDtkBO0TEzDW_ .Iy9RShOHXbpScyCIqdkk .NeXHjQmizMoCnHJ59BFW button{height:34px}.q-forum-modal .close{z-index:999}.q-forum-modal .modal-body h2{margin:0}.q-forum-modal .modal-body .q-forum-modal-img{display:none;margin-bottom:40px}@media(min-width:992px){.q-forum-modal .modal-body .q-forum-modal-img{display:block}}.q-forum-modal .modal-body .q-forum-modal-subtitle{display:block;margin-bottom:24px;margin-top:8px}.q-forum-modal .modal-body .q-forum-modal-root{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:24px;text-align:center}@media(min-width


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.
 */
/*-------------------------------------------------------------------------
*
* pg_appendonly_alter_column.h
*	  Internal specifications of the pg_appendonly_alter_column relation storage.
*
*-------------------------------------------------------------------------
*/
#ifndef PG_APPENDONLY_ALTER_COLUMN_H
#define PG_APPENDONLY_ALTER_COLUMN_H

#include "catalog/genbki.h"
/*
 * pg_appendonly_alter_column definition.
 */

/* TIDYCAT_BEGINFAKEDEF

   CREATE TABLE pg_appendonly_alter_column
   with (camelcase=AppendOnlyAlterColumn, oid=false, relid=6110, reltype_oid=6437)
   (
   relid             oid,
   changenum         integer,
   segfilenums       integer[],
   highwaterrownums  bytea
   );

   create unique index on pg_appendonly_alter_column(relid, changenum) with (indexid=5031, CamelCase=AppendOnlyAlterColumnRelid);

   alter table pg_appendonly_alter_column add fk relid on pg_class(oid);

   TIDYCAT_ENDFAKEDEF
*/

#define AppendOnlyAlterColumnRelationId  6110

CATALOG(pg_appendonly_alter_column,6110) BKI_WITHOUT_OIDS
{
	Oid			relid;		/* relation id */

	/*
	 * The change number for the ALTER TABLE ADD/DROP
	 * COLUMN operation.  Starts at 1.
	 */
	int4		changenum;

	/*
	 * THE REST OF THESE ARE VARIABLE LENGTH FIELDS.
	 * They cannot be accessed as C struct entries; you have to use
	 * the full field access machinery (heap_getattr) for them.  We declare
	 * them here for the catalog machinery.
	 */

	/* The array of int4 segment file numbers for the highwater row numbers. */
	int4		segfilenums[1];

	/*
	 * The array of int64 row numbers that are the logical end of the segment
	 * files. Unfortunately, we cannot properly represent it as an array of
	 * int8 or float8, so we use raw bytes.
	 */
	bytea		highwaterrownums;
} FormData_pg_appendonly_alter_column;

/* ----------------
*		Form_pg_appendonly corresponds to a pointer to a tuple with
*		the format of pg_appendonly relation.
* ----------------
*/
typedef FormData_pg_appendonly_alter_column *Form_pg_appendonly_alter_column;

#define Natts_pg_appendonly_alter_column					4
#define Anum_pg_appendonly_alter_column_relid				1
#define Anum_pg_appendonly_alter_column_changenum			2
#define Anum_pg_appendonly_alter_column_segfilenums			3
#define Anum_pg_appendonly_alter_column_highwaterrownums	4

#endif   /* PG_APPENDONLY_ALTER_COLUMN_H */


record_input"] = []interface{}{UnifiedAgentOpenmetricsParserRecordToMap(v.RecordInput)}
		}
	case oci_logging.UnifiedAgentRegexParser:
		result["parser_type"] = "REGEXP"
		if v.FieldTimeKey != nil {
			result["field_time_key"] = v.FieldTimeKey
		}
		if v.IsEstimateCurrentEvent != nil {
			result["is_estimate_current_event"] = bool(*v.IsEstimateCurrentEvent)
		}
		if v.IsKeepTimeKey != nil {
			result["is_keep_time_key"] = bool(*v.IsKeepTimeKey)
		}
		if v.IsNullEmptyString != nil {
			result["is_null_empty_string"] = bool(*v.IsNullEmptyString)
		}
		if v.NullValuePattern != nil {
			result["null_value_pattern"] = v.NullValuePattern
		}
		if v.TimeoutInMilliseconds != nil {
			result["timeout_in_milliseconds"] = int(*v.TimeoutInMilliseconds)
		}
		if v.Types != nil {
			result["types"] = tfresource.StringMapToObjectMap(v.Types)
		}

		if v.Expression != nil {
			result["expression"] = string(*v.Expression)
		}

		if v.TimeFormat != nil {
			result["time_format"] = string(*v.TimeFormat)
		}
	case oci_logging.UnifiedAgentSyslogParser:
		result["parser_type"] = "SYSLOG"
		if v.FieldTimeKey != nil {
			result["field_time_key"] = v.FieldTimeKey
		}
		if v.IsEstimateCurrentEvent != nil {
			result["is_estimate_current_event"] = bool(*v.IsEstimateCurrentEvent)
		}
		if v.IsKeepTimeKey != nil {
			result["is_keep_time_key"] = bool(*v.IsKeepTimeKey)
		}
		if v.IsNullEmptyString != nil {
			result["is_null_empty_string"] = bool(*v.IsNullEmptyString)
		}
		if v.NullValuePattern != nil {
			result["null_value_pattern"] = v.NullValuePattern
		}
		if v.TimeoutInMilliseconds != nil {
			result["timeout_in_milliseconds"] = int(*v.TimeoutInMilliseconds)
		}
		if v.Types != nil {
			result["types"] = tfresource.StringMapToObjectMap(v.Types)
		}

		if v.IsSupportColonlessIdent != nil {
			result["is_support_colonless_ident"] = bool(*v.IsSupportColonlessIdent)
		}

		if v.IsWithPriority != nil {
			result["is_with_priority"] = bool(*v.IsWithPriority)
		}

		result["message_format"] = string(v.MessageFormat)

		if v.Rfc5424TimeFormat != nil {
			result["rfc5424time_format"] = string(*v.Rfc5424TimeFormat)
		}

		result["syslog_parser_type"] = string(v.SyslogParserType)

		if v.TimeFormat != nil {
			result["time_format"] = string(*v.TimeFormat)
		}
	case oci_logging.UnifiedAgentTsvParser:
		result["parser_type"] = "TSV"
		if v.FieldTimeKey != nil {
			result["field_time_key"] = v.FieldTimeKey
		}
		if v.IsEstimateCurrentEvent != nil {
			result["is_estimate_current_event"] = bool(*v.IsEstimateCurrentEvent)
		}
		if v.IsKeepTimeKey != nil {
			result["is_keep_time_key"] = bool(*v.IsKeepTimeKey)
		}
		if v.IsNullEmptyString != nil {
			result["is_null_empty_string"] = bool(*v.IsNullEmptyString)
		}
		if v.NullValuePattern != nil {
			result["null_value_pattern"] = v.NullValuePattern
		}
		if v.TimeoutInMilliseconds != nil {
			result["timeout_in_milliseconds"] = int(*v.TimeoutInMilliseconds)
		}
		if v.Types != nil {
			result["types"] = tfresource.StringMapToObjectMap(v.Types)
		}
		if v.Delimiter != nil {
			result["d


utSlotXName, kInputSlotXName, SlotType.Input, m_Value));
            AddSlot(new Vector1MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, 0));
            RemoveSlotsNameNotMatching(new[] { OutputSlotId, InputSlotXId });
        }

        public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode)
        {
            var inputValue = GetSlotValue(InputSlotXId, generationMode);
            sb.AppendLine(string.Format("$precision {0} = {1};", GetVariableNameForSlot(OutputSlotId), inputValue));
        }

        public AbstractShaderProperty AsShaderProperty()
        {
            var slot = FindInputSlot<Vector1MaterialSlot>(InputSlotXId);
            return new Vector1ShaderProperty { value = slot.value };
        }

        int IPropertyFromNode.outputSlotId { get { return OutputSlotId; } }
    }
}


 " InputFileLow=\""  << sys.GetInputFileLow()  << "\" "
	<< " HistoNameLow=\""  << sys.GetHistoNameLow()  << "\" "
	<< " HistoPathLow=\""  << sys.GetHistoPathLow()  << "\" "

	<< " InputFileHigh=\""  << sys.GetInputFileHigh()  << "\" "
	<< " HistoNameHigh=\""  << sys.GetHistoNameHigh()  << "\" "
	<< " HistoPathHigh=\""  << sys.GetHistoPathHigh()  << "\" "
	<< "  /> " << std::endl;
    */
  }
  for( unsigned int i = 0; i < fShapeSysList.size(); ++i ) {
    RooStats::HistFactory::ShapeSys sys = fShapeSysList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <ShapeSys Name=\"" << sys.GetName() << "\" "

	<< " InputFile=\""  << sys.GetInputFile()  << "\" "
	<< " HistoName=\""  << sys.GetHistoName()  << "\" "
	<< " HistoPath=\""  << sys.GetHistoPath()  << "\" "
	<< " ConstraintType=\"" << std::string(Constraint::Name(sys.GetConstraintType())) << "\" "
	<< "  /> " << std::endl;
    */
  }
  for( unsigned int i = 0; i < fShapeFactorList.size(); ++i ) {
    RooStats::HistFactory::ShapeFactor sys = fShapeFactorList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <ShapeFactor Name=\"" << sys.GetName() << "\" "
	<< "  /> " << std::endl;
    */
  }

  // Finally, close the tag
  xml << "    </Sample>" << std::endl;

}

// Some helper functions
// (Not strictly necessary because
//  methods are publicly accessable)

void RooStats::HistFactory::Sample::ActivateStatError() {

  fStatError.Activate( true );
  fStatError.SetUseHisto( false );

}

void RooStats::HistFactory::Sample::ActivateStatError( std::string StatHistoName, std::string StatInputFile, std::string StatHistoPath ) {

  fStatError.Activate( true );
  fStatError.SetUseHisto( true );

  fStatError.SetInputFile( StatInputFile );
  fStatError.SetHistoName( StatHistoName );
  fStatError.SetHistoPath( StatHistoPath );

}

void RooStats::HistFactory::Sample::AddOverallSys( std::string SysName, Double_t SysLow, Double_t SysHigh ) {

  RooStats::HistFactory::OverallSys sys;
  sys.SetName( SysName );
  sys.SetLow( SysLow );
  sys.SetHigh( SysHigh );

  fOverallSysList.push_back( sys );

}

void RooStats::HistFactory::Sample::AddOverallSys( const OverallSys& Sys ) {
  fOverallSysList.push_back(Sys);
}

void RooStats::HistFactory::Sample::AddNormFactor( std::string SysName, Double_t SysVal, Double_t SysLow, Double_t SysHigh, bool SysConst ) {

  RooStats::HistFactory::NormFactor norm;

  norm.SetName( SysName );
  norm.SetVal( SysVal );
  norm.SetLow( SysLow );
  norm.SetHigh( SysHigh );
  norm.SetConst( SysConst );

  fNormFactorList.push_back( norm );

}

void RooStats::HistFactory::Sample::AddNormFactor( const NormFactor& Factor ) {
  fNormFactorList.push_back( Factor );
}

void RooStats::HistFactory::Sample::AddHistoSys( std::string SysName,
std::string SysHistoNameLow,  std::string SysHistoFileLow,  std::string SysHistoPathLow,
						 std::string SysHistoNameHigh, std::string SysHistoFileHigh, std::string SysHistoPathHigh ) {

  RooStats::HistFactory::HistoSys sys;
  sys.SetName( SysName );


d] -> checkInfeasibility (info),
		//infeas = objectOrig [(*j) -> objIndex_] -> infeasibility (info, way),
		value  = computeUsefulness (MAXMIN_CRITERION,
					    upMultiplier, downMultiplier, infeas,
					    objectOrig [objInd], objInd,
					    newValue); // output parameter (ignored)

	      if (value < minValue) minValue = infeas;
	      if (value > maxValue) maxValue = infeas;

	      //printf ("%d(x%d,%d,%g(%g)) ", objInd, *j, pri, infeas, value); fflush (stdout);

	      struct objStrongPri *obj = new struct objStrongPri;

	      obj -> objIndex_ = objInd;
	      obj -> priority_ = pri;
	      obj -> value_    = infeas;

	      orbitObj. push_back (obj);
	    }

	  // If minPri < maxPri (unlikely in orbits), sort objects so
	  // scan below is straightforward

	  if (minPri < maxPri)
	    std::sort (orbitObj.begin (), orbitObj.end (), compStrongPri);

	  // Scan objects in non-decreasing order of priority. Store
	  // in objects (the array of real objects) the one with null
	  // infeasibility and minimum priority.

	  for (std::vector <struct objStrongPri *>::iterator j = orbitObj. begin ();
	       j != orbitObj. end (); ++j) {

	    //printf ("checking object (%d,%d) --> %e\n", (*j) -> objIndex_, (*j) -> priority_, (*j) -> value_);

	    if ((*j) -> value_ > COUENNE_EPS) {

	      // Found object of this orbit that is good enough (and
	      // has highest priority)

	      objectInd.push_back ((*j) -> objIndex_);
	      break;
	    }
	  }

	  for (std::vector <struct objStrongPri *>::iterator j = orbitObj. begin ();
	       j != orbitObj. end (); ++j)
	    delete (*j);
	}

	numberObjects = objectInd.size ();

	// printf ("there are in total %d objects\n", numberObjects);

	// for (int i=0; i<numberObjects; i++) {

	//   printf ("obj %d [%d]: ", i, objectInd [i]); fflush (stdout);

	//   OsiObject *obj = info -> solver_ -> objects () [objectInd [i]];
	//   //int way;

	//   printf ("x%d [%g,%g] %g\n",
	// 	  obj -> columnNumber (),
	// 	  info -> lower_ [obj -> columnNumber ()],
	// 	  info -> upper_ [obj -> columnNumber ()],
	// 	  obj -> checkInfeasibility (info));
	// 	  //obj -> infeasibility (info,way));
	// }

	delete [] varObj;
      }
    }
#endif

    bool firstPass = false; // not important; useful for making two
                            // passes, picking different objects

    OsiObject **object = info -> solver_ -> objects ();

    while (numberOnList_ == 0) { // FIXME: add iteration limit

      for (unsigned int i = 0; i < numberObjects; i++) {

	int indexObj = ((objectInd.size () > 0) && (i < objectInd.size ())) ? objectInd [i] : i;

	int way;
	//double value = object [indexObj] -> checkInfeasibility (info);
	double value = object [indexObj] -> infeasibility (info, way);

	//printf ("object %d[%d]: %g\n", i, indexObj, value);

#ifdef FM_SORT_STRONG
	infeasVal[i] = value;
#endif

	double lbForInfeas = 0.0;
	if(value > lbForInfeas) {
	  numberUnsatisfied_++;
	  if(value >= 1e50) {
	    // infeasible
	    feasible=false;
	    break;
	  }
	  int priorityLevel = object[indexObj]->priority();

#ifdef FM_SORT_


tox .tox-statusbar__branding a:focus:not(:disabled):not([aria-disabled=true]) svg,.tox .tox-statusbar__branding a:hover:not(:disabled):not([aria-disabled=true]) svg{fill:#222f3e}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-8px;padding-bottom:3px;padding-left:1ch;padding-right:3px}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,.5)}.tox .tox-statusbar__resize-handle:focus svg{background-color:#dee0e2;border-radius:1px 1px 5px 1px;box-shadow:0 0 0 2px #dee0e2}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:2ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:6px 1px 5px 0;outline:0;overflow:hidden;padding:0;text-transform:none;width:34px}.tox .tox-tbtn svg{display:block;fill:#222f3e}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#cce2fa;border:0;box-shadow:none}.tox .tox-tbtn:hover{background:#cce2fa;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled .tox-tbtn--enabled svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn--enabled.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg{fill:rgba(34,47,62,.5)


/**
 * fido-crt0.S -- Simple startup code
 *
 * Copyright (c) 1995, 1996, 1998 Cygnus Support
 *
 * The authors hereby grant permission to use, copy, modify, distribute,
 * and license this software and its documentation for any purpose, provided
 * that existing copyright notices are retained in all copies and that this
 * notice is included verbatim in any distributions. No written agreement,
 * license, or royalty fee is required for any of the authorized uses.
 * Modifications to this software may be copyrighted by their authors
 * and need not follow the licensing terms described here, provided that
 * the new terms are clearly indicated on the first page of each file where
 * they apply.
 *
 * Copyright 2006 Innovasic Semiconductor, All Rights Reserved.
 * Part of the fido Realtime Support Library
 *
 * Description:
 *   This routine performs initializations assuming a Fido
 *   development board.  In order, the following functions are performed:
 *
 *     -- memory offset register initialization
 *     -- chip select register initialization for external memory
 *     -- SDRAM ctrl register initialization for external memory
 *     -- in line test of external SRAM
 *     -- sets user SP for MasterContext0 (main)
 *     -- copies the bss section to RAM
 *     -- transfers control to MasterContext0 (main)
 *
 */

#include "asm.h"
#include "fido.h"

.title "fido-crt0.S for Fido"

/*----------------------------------------------------------------------------*/
//--------- 66 MHz values --------
// set up CS0 for flash
#define CS0_CTRL_VAL         0x0000024A
#define CS0_TIMING_VAL       0x01000000

// set up CS1 for SDRAM
#define CS1_CTRL_VAL         0x0200030A   /* selects SDRAM ctrl instead of CS1 */
#define CS1_TIMING_VAL       0x00000000   /* N/A for SDRAM operation */
#define SDRAM_TIMING_0_VAL   0x00022522   /* TRP=0x2, TRCD=0x2, TRF=0x5, TWR=0x5 TCL=0x5 */
#define SDRAM_TIMING_1_VAL   0x00120407   /* INI_PREC=0x1, INI_REFT=0x2, REF_INTV=0x407 */
#define SDRAM_CONFIG_0_VAL   0x00002113   /* MA2T=0, DDW=x16device=0x2, dsz=64MBit, mbw=16bit, bnksz=8Mbyte */
#define SDRAM_CONFIG_1_VAL   0x00000000   /* IPREC=0, IREF=0, ISMR=0, PWDN=0, SREF=0 */
#define SDRAM_EXT_BANK_1_VAL 0x00001020   /* SDRAM memory bank 0 at addr 0x0200_0000 */

// set up CS2 for SRAM
#define CS2_CTRL_VAL         0x03000267
#define CS2_TIMING_VAL       0x08400000
/*----------------------------------------------------------------------------*/

#define EXT_SRAM_END_ADDR  0x30FFFFC /* 1 MB of ext. SRAM (2-512Kx8 chips) */
#define PERP_PWRUP_MASK    0x0000       /* turn on all peripherals */

/*
 * Define an empty environment.
 */
    .data  2
    .align 2
SYM (environ):
    .long 0

 	.align	2
	.text   2

/*
 * These symbols are defined in C code, so they need to always be
 * named with SYM because of the


fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin;
import com.fs.starfarer.api.util.Misc;
import com.fs.starfarer.api.util.WeightedRandomPicker;
import exerelin.campaign.econ.EconomyInfoHelper;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

// Blocks some factions like derelicts; deliveries increase commodity availability
@Deprecated
public class Nex_ProcurementMissionIntel extends ProcurementMissionIntel {

	public static final Set<String> DISALLOWED_FACTIONS = new HashSet<>(Arrays.asList(new String[]{
		Factions.DERELICT, Factions.REMNANTS, "templars", "nex_derelict"
	}));
	public static final float TRADE_MULT = 0.5f;

	public static boolean isFactionAllowed(String factionId) {
		return !DISALLOWED_FACTIONS.contains(factionId);
	}

	// Same as vanilla, but avoids commodities that are not being produced anywhere
	@Override
	protected String pickCommodity() {
		Global.getSettings().profilerBegin(this.getClass().getSimpleName() + ".pickCommodity()");
		EconomyAPI economy = Global.getSector().getEconomy();
		WeightedRandomPicker<String> picker = new WeightedRandomPicker<String>();

		for (String curr : economy.getAllCommodityIds()) {
			CommoditySpecAPI spec = economy.getCommoditySpec(curr);
			if (spec.isMeta()) continue;
			if (spec.hasTag(Commodities.TAG_CREW)) continue;
			if (spec.hasTag(Commodities.TAG_MARINES)) continue;
			if (spec.hasTag(Commodities.TAG_NON_ECONOMIC)) continue;
//			if (spec.getId().equals(Commodities.SUPPLIES)) continue;
//			if (spec.getId().equals(Commodities.FUEL)) continue;

			// MODIFIED
			EconomyInfoHelper eih = EconomyInfoHelper.getInstance();
			if (eih != null && eih.getProducersByCommodity(curr).isEmpty())
				continue;

			//float weight = spec.getBasePrice();
			float weight = 1f;
			picker.add(curr, weight);
		}
		Global.getSettings().profilerEnd();
		return picker.pick();
	}

	// same as vanilla, but excludes some factions
	@Override
	protected MarketAPI pickMarket(String commodityId, float quantity, float illegalMult, float min) {
//		if (true) {
//			return Global.getSector().getEconomy().getMarket("jangala");
//		}
		Global.getSettings().profilerBegin(this.getClass().getSimpleName() + ".pickMarket()");
		EconomyAPI economy = Global.getSector().getEconomy();

		WeightedRandomPicker<MarketAPI> picker = new WeightedRandomPicker<MarketAPI>();

		for (MarketAPI market : economy.getMarketsCopy()) {
			if (market.isHidden()) continue;
			if (market.isPlayerOwned()) continue;
			if (!isFactionAllowed(market.getFactionId())) continue;

			//CommodityOnMarketAPI com = market.getCommodityData(commodityId);

			boolean illegal = market.isIllegal(commodityId);
			float test = getQuantityAdjustedForMarket(commodityId, quantity, illegalMult, min, market);
			if (illegal) {
				test *= illegalMult;
				if (test < min) test = min;
			}
			//if (com.getAverageStockpileAfterDemand() >= minQty) continue;
			// don't filter on dema


rmat.
          let prefix =
            info &&
            ((info.isMariaDB() && info.hasMinVersion(10, 1, 4)) || (!info.isMariaDB() && info.hasMinVersion(5, 7, 6)))
              ? 'ST_'
              : '';
          switch (value.type) {
            case 'Point':
              return prefix + "PointFromText('POINT(" + TextEncoder.geoPointToString(value.coordinates) + ")')";

            case 'LineString':
              return (
                prefix + "LineFromText('LINESTRING(" + TextEncoder.geoArrayPointToString(value.coordinates) + ")')"
              );

            case 'Polygon':
              return (
                prefix + "PolygonFromText('POLYGON(" + TextEncoder.geoMultiArrayPointToString(value.coordinates) + ")')"
              );

            case 'MultiPoint':
              return (
                prefix +
                "MULTIPOINTFROMTEXT('MULTIPOINT(" +
                TextEncoder.geoArrayPointToString(value.coordinates) +
                ")')"
              );

            case 'MultiLineString':
              return (
                prefix +
                "MLineFromText('MULTILINESTRING(" +
                TextEncoder.geoMultiArrayPointToString(value.coordinates) +
                ")')"
              );

            case 'MultiPolygon':
              return (
                prefix + "MPolyFromText('MULTIPOLYGON(" + TextEncoder.geoMultiPolygonToString(value.coordinates) + ")')"
              );

            case 'GeometryCollection':
              return (
                prefix +
                "GeomCollFromText('GEOMETRYCOLLECTION(" +
                TextEncoder.geometricCollectionToString(value.geometries) +
                ")')"
              );
          }
        } else {
          if (opts.permitSetMultiParamEntries) {
            let out = '';
            let first = true;
            for (let key in value) {
              const val = value[key];
              if (typeof val === 'function') continue;
              if (first) {
                first = false;
              } else {
                out += ',';
              }
              out += '`' + key + '`=';
              out += this.escape(val);
            }
            if (out === '') return "'" + escapeString(JSON.stringify(value)) + "'";
            return out;
          } else {
            return "'" + escapeString(JSON.stringify(value)) + "'";
          }
        }
      }
    default:
      return "'" + escapeString(value) + "'";
  }
}

// see https://mariadb.com/kb/en/library/string-literals/
const LITTERAL_ESCAPE = {
  '\u0000': '\\0',
  "'": "\\'",
  '"': '\\"',
  '\b': '\\b',
  '\n': '\\n',
  '\r': '\\r',
  '\t': '\\t',
  '\u001A': '\\Z',
  '\\': '\\\\'
};

const CHARS_GLOBAL_REGEXP = /[\000\032"'\\\b\n\r\t]/g;

const escapeString = (val) => {
  let offset = 0;
  let escaped = '';
  let match;

  while ((match = CHARS_GLOBAL_REGEXP.exec(val))) {
    escaped += val.substring(offset, match.index);
    escaped += LITTERAL_ESCAPE[match[0]];
    offset = CHARS_GLOBAL_REGEXP.lastIndex;
  }

  if (offset === 0) {
    return val;
  }

  if (offset < val.length) {
    escaped += val.substring(offset);
  }

  return escaped;
};

export { log, toHexString, escapeId, escapeParameters as escape };
//  SPDX-License-Identifier:


 {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_google_ads_googleads_v1_enums_age_range_type_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*AgeRangeTypeEnum); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_google_ads_googleads_v1_enums_age_range_type_proto_rawDesc,
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_ads_googleads_v1_enums_age_range_type_proto_goTypes,
		DependencyIndexes: file_google_ads_googleads_v1_enums_age_range_type_proto_depIdxs,
		EnumInfos:         file_google_ads_googleads_v1_enums_age_range_type_proto_enumTypes,
		MessageInfos:      file_google_ads_googleads_v1_enums_age_range_type_proto_msgTypes,
	}.Build()
	File_google_ads_googleads_v1_enums_age_range_type_proto = out.File
	file_google_ads_googleads_v1_enums_age_range_type_proto_rawDesc = nil
	file_google_ads_googleads_v1_enums_age_range_type_proto_goTypes = nil
	file_google_ads_googleads_v1_enums_age_range_type_proto_depIdxs = nil
}
// Copyright 2020 Google LLC
//
// 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.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.22.0
// 	protoc        v3.12.3
// source: google/ads/googleads/v1/enums/policy_review_status.proto

package enums

import (
	reflect "reflect"
	sync "sync"

	proto "github.com/golang/protobuf/proto"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4

// The possible policy review statuses.
type PolicyReviewStatusEnum_PolicyReviewStatus int32

const (
	// No value has been specified.
	PolicyReviewStatusEnum_UNSPECIFIED PolicyReviewStatusEnum_PolicyReviewStatus = 0
	// The received value is not known in this version.
	//
	// This is a response-only value.
	PolicyReviewS


अर्डर गरेकै दिन डेलिभरी गर्ने सुविधा\"]],[1,\"अर्डर गरेकै दिन डेलिभरी गर्ने सुविधा\",\"अर्डर गरेकै दिन डेलिभरी गर्ने सुविधा\",\"अर्डर गरेकै दिन डेलिभरी गर्ने सुविधा छ\"]],null,[117],0]]],[\"accessibility\",\"पहुँच\",[[\"/geo/type/establishment_poi/has_wheelchair_accessible_parking\",\"ह्विलचेयरबाट जान मिल्ने पार्किङ स्थल\",[1,[[1,\"ह्विलचेयरबाट जान मिल्ने पार्किङ स्थल\"]],[1,\"ह्विलचेयरबाट जान मिल्ने पार्किङ स्थल\",\"ह्विलचेयरबाट जान मिल्ने पार्किङ स्थल\",\"ह्विलचेयरबाट जान मिल्ने पार्किङ स्थल छ\"]],null,[4],0],[\"/geo/type/establishment_poi/has_wheelchair_accessible_entrance\",\"ह्विलचेयरबाट जान मिल्ने प्रवेशद्वार\",[1,[[1,\"ह्विलचेयरबाट जान मिल्ने प्रवेशद्वार\"]],[1,\"ह्विलचेयरबाट जान मिल्ने प्रवेशद्वार\",\"ह्विलचेयरबाट जान मिल्ने प्रवेशद्वार\",\"ह्विलचेयरबाट जान मिल्ने प्रवेशद्वारको व्यवस्था छ\"]],null,[4],0],[\"/geo/type/establishment_poi/has_wheelchair_accessible_restroom\",\"ह्विलचेयरबाट जान मिल्ने शौचालय\",[1,[[1,\"ह्विलचेयरबाट जान मिल्ने शौचालय\"]],[1,\"ह्विलचेयरबाट जान मिल्ने शौचालय\",\"ह्विलचेयरबाट जान मिल्ने शौचालय\",\"ह्विलचेयरबाट जान मिल्ने शौचालय छ\"]],null,[4],0],[\"/geo/type/establishment_poi/has_wheelchair_accessible_seating\",\"ह्विलचेयरबाट पुग्न सकिने बस्ने ठाउँ\",[1,[[0,\"ह्विलचेयरबाट पुग्न सकिने बस्ने ठाउँ छैन\"]],[0,\"ह्विलचेयरबाट पुग्न सकिने


org/doc/html/rfc3447#page-8>
  ///
  static BigInt osp2i(Iterable<int> bytes, {Endian endian = Endian.big}) {
    var result = BigInt.from(0);
    if (endian == Endian.little) {
      bytes = bytes.toList().reversed;
    }

    for (var byte in bytes) {
      result = result << 8;
      result |= BigInt.from(byte);
    }

    return result;
  }

  ///
  /// Conversion of integer to bytes according to RFC 3447 at <https://datatracker.ietf.org/doc/html/rfc3447#page-8>
  ///
  static Uint8List i2osp(BigInt number,
      {int? outLen, Endian endian = Endian.big}) {
    var size = (number.bitLength + 7) >> 3;
    if (outLen == null) {
      outLen = size;
    } else if (outLen < size) {
      throw Exception('Number too large');
    }
    final result = Uint8List(outLen);
    var pos = endian == Endian.big ? outLen - 1 : 0;
    for (var i = 0; i < size; i++) {
      result[pos] = (number & _byteMask).toInt();
      if (endian == Endian.big) {
        pos -= 1;
      } else {
        pos += 1;
      }
      number = number >> 8;
    }
    return result;
  }

  ///
  /// Signing the given [dataToSign] with the given [privateKey] and the given [salt].
  ///
  /// The default [algorithm] used is **SHA-256/PSS**. All supported algorihms are :
  ///
  /// * MD2/PSS
  /// * MD4/PSS
  /// * MD5/PSS
  /// * RIPEMD-128/PSS
  /// * RIPEMD-160/PSS
  /// * RIPEMD-256/PSS
  /// * SHA-1/PSS
  /// * SHA-224/PSS
  /// * SHA-256/PSS
  /// * SHA-384/PSS
  /// * SHA-512/PSS
  ///
  static Uint8List rsaPssSign(
      RSAPrivateKey privateKey, Uint8List dataToSign, Uint8List salt,
      {String algorithm = 'SHA-256/PSS'}) {
    //var signer = Signer(algorithm) as PSSSigner;
    var digestName = algorithm.substring(0, algorithm.indexOf('/'));
    var signer =
        LocalPSSSigner(RSAEngine(), Digest(digestName), Digest(digestName));
    signer.init(
        true,
        ParametersWithSalt(
            PrivateKeyParameter<RSAPrivateKey>(privateKey), salt));

    var sig = signer.generateSignature(dataToSign);

    return sig.bytes;
  }

  ///
  /// Adds a PKCS7 / PKCS5 padding to the given [bytes] and [blockSizeBytes]
  ///
  static Uint8List addPKCS7Padding(Uint8List bytes, int blockSizeBytes) {
    final padLength = blockSizeBytes - (bytes.length % blockSizeBytes);

    final padded = Uint8List(bytes.length + padLength)..setAll(0, bytes);
    PKCS7Padding().addPadding(padded, bytes.length);

    return padded;
  }

  ///
  /// Revomes the PKCS7 / PKCS5 padding from the [padded] bytes
  ///
  static Uint8List removePKCS7Padding(Uint8List padded) =>
      padded.sublist(0, padded.length - PKCS7Padding().padCount(padded));

  ///
  /// Encode a private ECDSA key to PKCS8 format
  ///
  static String encodePrivateEcdsaKeyToPkcs8(ECPrivateKey privateKey) {
    final privateKeyPem = CryptoUtils.encodeEcPrivateKeyToPem(privateKey);
    final base64Encoded =
        base64.encode(ASN1PrivateKeyInfo.fromEccPem(privateKeyPem).encode());
    final base64Formatted = base64Encoded.replaceAllMapped(
        RegExp(r".{64}")


iangle (%i, %i, %i)\n", v0, v1, v2);

	gSPTriangle( v0, v1, v2);
	gSPFlushTriangles();
}

void gSP2Triangles(const u32 v00, const u32 v01, const u32 v02, const u32 flag0,
				   const u32 v10, const u32 v11, const u32 v12, const u32 flag1 )
{
	DebugMsg(DEBUG_NORMAL, "gSP2Triangle (%i, %i, %i)-(%i, %i, %i)\n", v00, v01, v02, v10, v11, v12);

	gSPTriangle( v00, v01, v02);
	gSPTriangle( v10, v11, v12);
	gSPFlushTriangles();
}

void gSP4Triangles(const u32 v00, const u32 v01, const u32 v02,
				   const u32 v10, const u32 v11, const u32 v12,
				   const u32 v20, const u32 v21, const u32 v22,
				   const u32 v30, const u32 v31, const u32 v32 )
{
	DebugMsg(DEBUG_NORMAL, "gSP4Triangle (%i, %i, %i)-(%i, %i, %i)-(%i, %i, %i)-(%i, %i, %i)\n",
			 v00, v01, v02, v10, v11, v12, v20, v21, v22, v30, v31, v32);

	gSPTriangle(v00, v01, v02);
	gSPTriangle(v10, v11, v12);
	gSPTriangle(v20, v21, v22);
	gSPTriangle(v30, v31, v32);
	gSPFlushTriangles();
}

gSPInfo gSP;

static
f32 identityMatrix[4][4] =
{
	{ 1.0f, 0.0f, 0.0f, 0.0f },
	{ 0.0f, 1.0f, 0.0f, 0.0f },
	{ 0.0f, 0.0f, 1.0f, 0.0f },
	{ 0.0f, 0.0f, 0.0f, 1.0f }
};

void gSPLoadUcodeEx( u32 uc_start, u32 uc_dstart, u16 uc_dsize )
{
	gSP.matrix.modelViewi = 0;
	gSP.status[0] = gSP.status[1] = gSP.status[2] = gSP.status[3] = 0;
	gSP.fog.multiplier = gSP.fog.offset = 0;
	gSP.fog.multiplierf = gSP.fog.offsetf = 0.0f;
	gSP.geometryMode = 0U;
	gSP.changed |= CHANGED_MATRIX | CHANGED_LIGHT | CHANGED_LOOKAT | CHANGED_GEOMETRYMODE;

	if ((((uc_start & 0x1FFFFFFF) + 4096) > RDRAMSize) || (((uc_dstart & 0x1FFFFFFF) + uc_dsize) > RDRAMSize)) {
		DebugMsg(DEBUG_NORMAL|DEBUG_ERROR, "gSPLoadUcodeEx out of RDRAM\n");
		return;
	}

	GBI.loadMicrocode(uc_start, uc_dstart, uc_dsize);
	RSP.uc_start = uc_start;
	RSP.uc_dstart = uc_dstart;

	DebugMsg(DEBUG_NORMAL, "gSPLoadUcodeEx type: %d\n", GBI.getMicrocodeType());
}

void gSPNoOp()
{
	gSPFlushTriangles();
	DebugMsg(DEBUG_NORMAL | DEBUG_IGNORED, "gSPNoOp();\n");
}

void gSPMatrix( u32 matrix, u8 param )
{

	f32 mtx[4][4];
	u32 address = RSP_SegmentToPhysical( matrix );

	if (address + 64 > RDRAMSize) {
		DebugMsg(DEBUG_NORMAL |


import br.com.colman.petals.R.string.month
import br.com.colman.petals.R.string.week
import br.com.colman.petals.R.string.year
import br.com.colman.petals.settings.SettingsRepository
import br.com.colman.petals.use.repository.Use
import br.com.colman.petals.use.repository.totalCost
import br.com.colman.petals.use.repository.totalGrams
import compose.icons.TablerIcons
import compose.icons.tablericons.CalendarStats
import compose.icons.tablericons.ChartPie
import compose.icons.tablericons.Scale
import me.moallemi.tools.daterange.localdate.LocalDateRange
import me.moallemi.tools.daterange.localdate.rangeTo
import org.koin.compose.koinInject
import java.math.BigDecimal
import java.time.LocalDate.now

@Preview
@Composable
fun AverageUseCardPreview() {
  val hoursInDay = (0..23).toList()
  val minutesInHour = (0..59).toList()
  val uses = List(293) {
    Use(
      now().minusDays(it.toLong()).atTime(hoursInDay.random(), minutesInHour.random()),
      "3.37".toBigDecimal(),
      (it % 4).toBigDecimal()
    )
  }

  AverageUseCard(uses, LocalDateRange(now().minusDays(293L), now()))
}

@Composable
fun AverageUseCard(uses: List<Use>, period: LocalDateRange) {
  if (uses.isEmpty()) return

  Card(Modifier.padding(8.dp).fillMaxWidth().horizontalScroll(rememberScrollState()).width(Max)) {
    Column(Modifier.padding(8.dp).fillMaxWidth().width(Max), spacedBy(8.dp)) {
      AverageUseCardTitle(uses.count(), uses.totalGrams, period)
      AverageUseList(uses, period)
    }
  }
}

@Preview
@Composable
private fun AverageUseCardTitlePreview() {
  val now = now()
  Column {
    AverageUseCardTitle(1, 1.toBigDecimal(), now..now)
    AverageUseCardTitle(5, 5.toBigDecimal(), now.minusDays(1L)..now)
    AverageUseCardTitle(32, 32.25.toBigDecimal(), now.minusDays(3L)..now)
  }
}

@Composable
private fun AverageUseCardTitle(uses: Int, grams: BigDecimal, period: LocalDateRange) {
  val amountDays = period.count()

  Row(Modifier.fillMaxWidth(), Arrangement.spacedBy(16.dp), CenterVertically) {
    IconText(TablerIcons.ChartPie, pluralStringResource(amount_uses, uses, uses))
    IconText(TablerIcons.Scale, stringResource(amount_grams, "%.2f".format(grams)))
    IconText(TablerIcons.CalendarStats, pluralStringResource(amount_days, amountDays, amountDays))
  }
}

@Preview
@Composable
private fun IconTextPreview() {
  IconText(TablerIcons.ChartPie, "25 uses")
}

@Composable
private fun IconText(icon: ImageVector, text: String) {
  Row(Modifier, spacedBy(8.dp), CenterVertically) {
    Icon(icon, text)
    Text(text)
  }
}

@Composable
private fun AverageUseList(uses: List<Use>, period: LocalDateRange) {
  val totalGrams = uses.totalGrams.toDouble()
  val totalCost = uses.totalCost.toDouble()

  val days = period.count().toDouble()
  val weeks = days / 7.0
  val months = days / 30.0
  val years = days / 365.25

  @Composable
  fun AverageListItem(label: String, value: Double) {
    if (value >= 1.0) {
      AverageListItem(label, totalGrams / value, totalCost / value, uses.size / value)
    }
  }

  AverageListItem(stringResource(day), days)
  AverageListItem(stringResource(week), weeks)
  AverageListItem(stringResource(mon


placeholder';

/**
 * @description Fields used in setAttribute() and removeAttribute() for modifying a HostedFields instance's attributes.
 */
export interface HostedFieldAttributeOptions {
    field: HostedFieldsHostedFieldsFieldName;
    attribute: HostedFieldAttributeName;
    value?: string | boolean;
}

/**
 * @description Fields used in setMessage() for modifying a HostedFields instance's visually hidden message.
 */
export interface HostedFieldMessageOptions {
    field: HostedFieldsHostedFieldsFieldName;
    message: string;
}

export interface HostedFields {
    /**
     * An object that represents CSS that will be applied in each hosted field. This object looks similar to CSS.
     * Typically, these styles involve fonts (such as `font-family` or `color`).
     *
     * These are the CSS properties that Hosted Fields supports. Any other CSS should be specified on your
     * page and outside of any Braintree configuration. Trying to set unsupported properties will fail and put
     * a warning in the console.
     *
     * Supported CSS properties are:
     * `color`
     * `font-family`
     * `font-size-adjust`
     * `font-size`
     * `font-stretch`
     * `font-style`
     * `font-variant-alternates`
     * `font-variant-caps`
     * `font-variant-east-asian`
     * `font-variant-ligatures`
     * `font-variant-numeric`
     * `font-variant`
     * `font-weight`
     * `font`
     * `letter-spacing`
     * `line-height`
     * `opacity`
     * `outline`
     * `text-shadow`
     * `transition`
     * `-moz-osx-font-smoothing`
     * `-moz-tap-highlight-color`
     * `-moz-transition`
     * `-webkit-font-smoothing`
     * `-webkit-tap-highlight-color`
     * `-webkit-transition`
     */
    styleOptions: any;

    on<EventType extends HostedFieldEventType>(
        event: EventType,
        handler: (event: HostedFieldsEventTypeMap[EventType]) => void,
    ): void;
    off<EventType extends HostedFieldEventType>(
        event: EventType,
        handler: (event: HostedFieldsEventTypeMap[EventType]) => void,
    ): void;

    teardown(callback?: callback): void;
    teardown(): Promise<void>;

    /**
     * Tokenizes fields and returns a nonce payload.     * @example
Tokenize a card

     * hostedFieldsInstance.tokenize(function (tokenizeErr, payload) {
     *   if (tokenizeErr) {
     *     switch (tokenizeErr.code) {
     *       case 'HOSTED_FIELDS_FIELDS_EMPTY':
     *         console.error('All fields are empty! Please fill out the form.');
     *         break;
     *       case 'HOSTED_FIELDS_FIELDS_INVALID':
     *         console.error('Some fields are invalid:', tokenizeErr.details.invalidFieldKeys);
     *         break;
     *       case 'HOSTED_FIELDS_FAILED_TOKENIZATION':
     *         console.error('Tokenization failed server side. Is the card valid?');
     *         break;
     *       case 'HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR':
     *         console.error('Network error occurred when tokenizing.');
     *         break;
     *       default:
     *         console.error('Something bad happened!', tokenizeErr);
     *     }
     *   } else {
     *     console.log('Got nonce:', payload.nonce);
     *   }
     * });
     * @example
Tokenize and vault a card

     * hostedFieldsInstance.tokenize({
     *   vault: true
     * }, function (tokenizeErr, payload) {
     *   if (tokenizeErr) {
     *     console.error(tokenizeErr);
     *


ldx ptr_destination+1
	bcc UnpackEndLoopSkip
	inc ptr_destination+1
UnpackEndLoopSkip
	cpx ptr_destination_end+1
	bcc UnpackLoop
	cmp ptr_destination_end
	bcc UnpackLoop
UnpackEnd
	rts

UnpackCopyBlock

//BreakPoint jmp BreakPoint
	// Copy a number of bytes from the already unpacked stream
	// Here we know that y is null. So no need for clearing it.
	// Just be sure it's still null at the end.
	// At this point, the source pointer points to a two byte
	// value that actually contains a 4 bits counter, and a
	// 12 bit offset to point back into the depacked stream.
	// The counter is in the 4 high order bits.
	clc
	lda (ptr_source),y
	adc #1
	sta offset
	iny
	lda (ptr_source),y
	tax
	adc #0
	and #$0f
	sta offset+1

	txa
	lsr
	lsr
	lsr
	lsr
	clc
	adc #3
	sta nb_dst

	sec
	lda ptr_destination
	sbc offset
	sta ptr_source_back
	lda ptr_destination+1
	sbc offset+1
	sta ptr_source_b


_RR_OP(rem, x31, x30, x29, 0x0, 0x0, -0xb504, x8, 234*XLEN/8, x9)

inst_516:
// rs1_val==0 and rs2_val==46340,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0xb504
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0xb504, x8, 235*XLEN/8, x9)

inst_517:
// rs1_val==0 and rs2_val==2,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0x2
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0x2, x8, 236*XLEN/8, x9)

inst_518:
// rs1_val==0 and rs2_val==1431655764,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0x55555554
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0x55555554, x8, 237*XLEN/8, x9)

inst_519:
// rs1_val==0 and rs2_val==858993458,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0x33333332
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0x33333332, x8, 238*XLEN/8, x9)

inst_520:
// rs1_val==0 and rs2_val==1717986917,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0x66666665
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0x66666665, x8, 239*XLEN/8, x9)

inst_521:
// rs1_val==0 and rs2_val==0,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0x0
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0x0, x8, 240*XLEN/8, x9)

inst_522:
// rs1_val==0 and rs2_val==46339,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0xb503
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0xb503, x8, 241*XLEN/8, x9)

inst_523:
// rs1_val==0 and rs2_val==4,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0x4
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0x4, x8, 242*XLEN/8, x9)

inst_524:
// rs1_val==0 and rs2_val==1431655766,
// opcode: rem ; op1:x30; op2:x29; dest:x31; op1val:0x0;  op2val:0x55555556
TEST_RR_OP(rem, x31, x30, x29, 0x0, 0x0, 0x55555556, x


n… See the full description on the dataset page: https://huggingface.co/datasets/junidude14/korean_roleplay_dataset_for_chat_game_2.","first_N":5,"first_N_keywords":["text-generation","Korean","mit","10K - 100K","parquet"],"keywords_longer_than_N":true},
	{"name":"korean_roleplay_dataset_for_chat_game_2","keyword":"chat","license":"MIT License","license_url":"https://choosealicense.com/licenses/mit/","language":"en","dataset_url":"https://huggingface.co/datasets/junidude14/korean_roleplay_dataset_for_chat_game_2","creator_name":"Seung Jun Lee","creator_url":"https://huggingface.co/junidude14","description":"\n\t\n\t\t\n\t\tKorean Roleplay Enhanced Conversations Dataset (v3)\n\t\n\n\n  \n  \n  \n  \n\n\n\n\t\n\t\t\n\t\t📋 Dataset Description\n\t\n\nThis is the third version of our enhanced Korean roleplay conversation dataset, specifically designed for training conversational AI models in visual novel/dating simulation contexts. This version significantly expands the dataset with more diverse multi-turn conversations and improved context awareness.\n\n\t\n\t\t\n\t\t🎯 Key Features\n\t\n\n\nLarge Scale: 25,568 high-quality conversation… See the full description on the dataset page: https://huggingface.co/datasets/junidude14/korean_roleplay_dataset_for_chat_game_2.","first_N":5,"first_N_keywords":["text-generation","Korean","mit","10K - 100K","parquet"],"keywords_longer_than_N":true},
	{"name":"cot_data_slow_thinking_conversations","keyword":"conversations","license":"Apache License 2.0","license_url":"https://choosealicense.com/licenses/apache-2.0/","language":"en","dataset_url":"https://huggingface.co/datasets/Jianyuan1/cot_data_slow_thinking_conversations","creator_name":"Zhong","creator_url":"https://huggingface.co/Jianyuan1","description":"\n\t\n\t\t\n\t\tcot_data_slow_thinking_conversations\n\t\n\nThis dataset contains chain-of-thought reasoning data with slow thinking patterns.\n\n\t\n\t\t\n\t\tDataset Structure\n\t\n\n\nFormat: JSONL (JSON Lines) with Hugging Face conversations format\nSize: 1113.88 MB\nTotal examples: Approximately 156,268 examples\n\nEach line contains a JSON object with a \"conversations\" key containing a list of messages with user queries about mathematical reasoning steps and assistant responses with thinking patterns.\n\n\t\n\t\t\n\t\tExample… See the full description on the dataset page: https://huggingface.co/datasets/Jianyuan1/cot_data_slow_thinking_conversations.","first_N":5,"first_N_keywords":["text-generation","English","apache-2.0","100K - 1M","json"],"keywords_longer_than_N":true},
	{"name":"saasst.new","keyword":"conversational-ai","license":"Apache License 2.0","license_url":"https://choosealicense.com/licenses/apache-2.0/","language":"en","dataset_url":"https://huggingface.co/datasets/7lyoi/saasst.new","creator_name":"salama","creator_url":"https://huggingface.co/7lyoi","description":"7lyoi/saasst.new dataset hosted on Hugging Face and contributed by the HF Datasets community","first_N":5,"first_N_keywords":["question-answering","English","apache-2.0","


);
        page.setCookie(cookieParam);
        List<Cookie> cookies = page.cookies();
        for (Cookie cookie : cookies) {
            System.out.println("cookie: " + cookie);
        }
        Thread.sleep(2000);
        browser.close();
    }

    @Test
    public void test4() throws Exception {
        Browser browser = Puppeteer.launch(LAUNCHOPTIONS);
        //打开一个页面
        Page page = browser.newPage();
        //监听浏览器控制台输出
        page.on(PageEvents.Console, (Consumer<ConsoleMessage>) consoleMessage -> System.out.println("consoleMessage: " + consoleMessage.text()));
        page.setContent("<!DOCTYPE html>\n" +
                "\n" +
                "\n" +
                "\n" +
                "    <meta charset=\"UTF-8\">\n" +
                "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" +
                "    <title>Button Example</title>\n" +
                "    \n" +
                "\n" +
                "\n" +
                "\n" +
                "
\n" +
                "        \n" +
                "        <button  draggable=\"true\" class=\"button-class\">按钮1</button>\n" +
                "        <button class=\"button-class2\">按钮2</button>\n" +
                "        <button class=\"button-class3\">按钮3</button>\n" +
                "
\n" +
                "\n" +
                "
\n" +
                "\n" +
                "\n" +
                "");
        ElementHandle button1 = page.$(".button-class");
        ElementHandle button2 = page.$(".button-class2");
        ElementHandle button3 = page.$(".button-class3");
        System.out.println("第一次点击...");
        button1.click();
        button2.click();
        button3.click();
        FrameAddScriptTagOptions options = new FrameAddScriptTagOptions();
        options.setId("myjs");

        options.setContent(" // 通过类名选择所有按钮并添加点击事件监听器\n" +
                "        document.querySelectorAll('.button-class').forEach(function (button) {\n" +
                "            button.addEventListener('touchstart', function () {\n" +
                "                console.log(\"按钮1 touchStart...\")\n" +
                "            });\n" +
                "            button.addEventListener('touchmove',function(){\n" +
                "                console.log('按钮1 touchmove...')\n" +
                "            });\n" +
                "            button.addEventListener('touchend',function(){\n" +
                "


g/documentation/apidoc/ibmq_provider.html'
  },
  image: '/images/overview/hardware/quantum-computer.png'
}

const TABLE_OF_CONTENTS: TableOfContentEntry[] = [
  {
    label: 'Write Quantum Code'
  },
  RESEARCH_APPS_IN_MENU,
  ALGORITHMS_COLLECTION_IN_MENU,
  EXPERIMENTALIST_TOOLBOX_IN_MENU,
  CIRCUITS_IN_MENU,
  {
    label: 'Run Quantum Code'
  },
  SIMULATORS_IN_MENU,
  HARDWARE_IN_MENU
]

const CONTENT_SECTIONS: OverviewSection[] = [
  RESEARCH_APPS,
  ALGORITHMS_COLLECTION,
  EXPERIMENTALIST_TOOLBOX,
  CIRCUITS,
  SIMULATORS,
  HARDWARE
]

export {
  TableOfContentEntry,
  OverviewSection,
  OverviewSubSection,
  TABLE_OF_CONTENTS,
  CONTENT_SECTIONS
}
// import { Directive, ElementRef, Renderer, EventEmitter, OnInit, OnDestroy } from '@angular/core';

// interface FuguTouches {
//     "touchstart": { "x": number, "y": number },
//     "touchmove": { "x": number, "y": number },
//     "touchend": boolean,
//     "direction": string
// }

// @Directive({
//     selector: '[autofocus]'
// })
// export class TouchMove implements OnInit, OnDestroy {

//     swipeFn: any;
//     private touchstartFn: Function;
//     private touchmoveFn: Function
//     private touchendFn: Function
//     public direction: EventEmitter<string> = new EventEmitter();

//     constructor(private el: ElementRef, private renderer: Renderer) {
//         this.swipeFn = {
//             "touchstart": { "x": -1, "y": -1 },
//             "touchmove": { "x": -1, "y": -1 },
//             "touchend": false,
//             "direction": ""
//         }

//     }

//     ngOnInit() {
//         this.initTouchMove();
//     }

//     initTouchMove() {
//         this.touchstartFn = this.renderer.listen('document', 'touchstart', this.onTouchEvent)
//         this.touchmoveFn = this.renderer.listen('document', 'touchmove', this.onTouchEvent)
//         // this.touchendFn = this.renderer.listen('document', 'touchend', this.onTouchEvent)

//     }

//     onTouchEvent(event: TouchEvent) {
//         var touch;
//         if (typeof event !== 'undefined') {
//             event.preventDefault();
//             if (typeof event.touches !== 'undefined') {
//                 touch = event.touches[0];
//                 switch (event.type) {
//                     case 'touchstart':
//                     case 'touchmove':
//                         this.swipeFn[event.type].x = touch.pageX;
//                         this.swipeFn[event.type].y = touch.pageY;
//                     case 'touchend':
//                         this.swipeFn[event.type] = true;
//                         if (this.swipeFn.touchstart.x > -1 && this.swipeFn.touchmove.x > -1) {
//                             this.swipeFn.direction = this.swipeFn.touchstart.x < this.swipeFn.touchmove.x ? "right" : "left";
//                             this.direction.emit(this.swipeFn.direction);
//                             // DO STUFF HERE
//                             console.log({ e: event, direction: this.swipeFn.direction });
//                         }
//                         else if (this.swipeFn.touchstart.y > -1 && this.swipeFn.touchmove.y > -1) {
//                             this.swipeFn.direction = this.swipeFn.touchstart.y < this.swipeFn.touchmove.y ? "down" : "up";
//                             this.direction.emit(this.swipeFn.direction);
//                             // DO STUFF HERE
//                             console.log({ event: event, direction: this


(),
										},
										value_when_not_allowed: null,
									}
								),
							};

							defaultPolicy = new Policies.Public();
						})(),
					};
				},
			async ({ app }) => {
				const task = await app.collections.tasks.create(
					new Context(app, new Date().getTime(), null, null),
					{ title: "" }
				);
				assert.strictEqual(task.get("done"), false);
			}
		));
});
export interface BaseObjectTree {
    children: BaseObjectTree[];
}

export class ObjectTreeAlg {
    public static getFlatSubtree<T extends BaseObjectTree>(
        subtree: T[]
    ): T[] {
        if (subtree.length === 0) {
            return subtree;
        }
        const flattened: T[] = [];
        for (const st of subtree) {
            ObjectTreeAlg.flatten(flattened, st);
        }
        return flattened;
    }

    private static flatten<T extends BaseObjectTree>(
        acc: T[],
        subtree: T
    ) {
        acc.push(subtree);
        for (const st of subtree.children) {
            ObjectTreeAlg.flatten(acc, st);
        }
    }
}
import {
  ElementRef,
  OnDestroy,
} from '@angular/core';
import {
  MDCSelectHelperTextFoundation,
  MDCSelectHelperTextAdapter
} from '@material/select';
import {MDCComponent} from '@angular-mdc/web/base';

export class MdcSelectHelperTextFoundation extends MDCComponent<MDCSelectHelperTextFoundation>
  implements OnDestroy {
  private _initialized: boolean = false;

  _helperLineElement?: HTMLElement;

  get foundation(): MDCSelectHelperTextFoundation {
    return this._foundation;
  }

  constructor(
    public _hostElement: ElementRef<HTMLElement>,
    private _document: Document) {
    super(_hostElement);
  }

  getDefaultFoundation() {
    const adapter: MDCSelectHelperTextAdapter = {
      addClass: (className: string) => this._helperLineElement!.classList.add(className),
      removeClass: (className: string) => this._helperLineElement!.classList.remove(className),
      hasClass: (className: string) => this._helperLineElement!.classList.contains(className),
      setAttr: (attr: string, value: string) => this._helperLineElement!.setAttribute(attr, value),
      removeAttr: (attr: string) => this._helperLineElement!.removeAttribute(attr),
      setContent: (content: string) => this._helperLineElement!.textContent = content,
    };
    return new MDCSelectHelperTextFoundation(adapter);
  }

  /** Sets the persistency of the helper text. */
  setPersistent(isPersistent: boolean) {
    this._foundation.setValidationMsgPersistent(isPersistent);
  }

  /** True to make the helper text act as an error validation message. */
  setValidation(isValidation: boolean) {
    this._foundation.setValidationMsgPersistent(isValidation);
  }

  /** Sets the validity of the helper text based on inputIsValid. */
  setValidity(inputIsValid: boolean): void {
    this._foundation.setValidity(inputIsValid);
  }

  /** Makes the helper text visible to the screen reader. */
  showToScreenReader(): void {
    this._foundation.showToScreenReader();
  }

  /** Sets the content of the helper text. */
  setContent(content: string) {
    this._foundation.setContent(content);
  }

  /** Initializes the foundation. */
  init() {
    if (this._initial


  position: absolute;
  top: 4px;
  width: 10px;
}
.glue-carousel__navigation
  .glue-pagination-page-list
  .glue-pagination__button:focus {
  background: #f1f3f4;
}
.glue-carousel__navigation
  .glue-pagination-page-list
  .active
  .glue-pagination__button:before {
  background: #202124;
}
@media screen and (-ms-high-contrast: active) {
  .glue-carousel__navigation
    .glue-pagination-page-list
    .active
    .glue-pagination__button:before {
    background: buttonText;
  }
}
.glue-carousel--detailed .glue-carousel__navigation {
  display: flex;
  font-size: 14px;
  letter-spacing: 0.25px;
  padding: 0 16px;
}
.glue-carousel--detailed .glue-carousel__paginate-labelled {
  display: none;
  flex: 1 1 0;
  font-family: 'Google Sans', 'Roboto', Arial, Helvetica, sans-serif;
  font-weight: 500;
  letter-spacing: 0.75px;
}
[lang='ja'] .glue-carousel--detailed .glue-carousel__paginate-labelled {
  font-family: 'Google Sans', 'Roboto', 'Noto Sans JP', 'Noto Sans CJK JP',
    Arial, Helvetica, sans-serif;
}
[lang='ko'] .glue-carousel--detailed .glue-carousel__paginate-labelled {
  font-family: 'Google Sans', 'Roboto', 'Noto Sans KR', 'Noto Sans CJK KR',
    Arial, Helvetica, sans-serif;
}
[lang='zh-CN'] .glue-carousel--detailed .glue-carousel__paginate-labelled {
  font-family: 'Google Sans', 'Roboto', 'Noto Sans SC', 'Noto Sans CJK SC',
    Arial, Helvetica, sans-serif;
}
[lang='zh-TW'] .glue-carousel--detailed .glue-carousel__paginate-labelled {
  font-family: 'Google Sans', 'Roboto', 'Noto Sans TC', 'Noto Sans CJK TC',
    Arial, Helvetica, sans-serif;
}
@media (min-width: 1024px) {
  .glue-carousel--detailed .glue-carousel__paginate-labelled {
    letter-spacing: 0.5px;
  }
}
.glue-carousel--detailed .glue-carousel__paginate-labelled svg {
  flex-shrink: 0;
  stroke: #414141;
}
@media screen and (-ms-high-contrast: active) {
  .glue-carousel--detailed .glue-carousel__paginate-labelled svg {
    stroke: buttonText;
  }
}
.glue-carousel--detailed
  .glue-carousel__paginate-labelled
  .glue-pagination__button {
  align-items: center;
  border-radius: 0;
  color: #202124;
  display: flex;
  letter-spacing: inherit;
  padding: 10px;
}
.glue-carousel--detailed
  .glue-carousel__paginate-labelled
  .glue-pagination__button:hover,
.glue-carousel--detailed
  .glue-carousel__paginate-labelled
  .glue-pagination__button:focus {
  color: #174ea6;
}
.glue-carousel--detailed
  .glue-carousel__paginate-labelled
  .glue-pagination__button:hover
  svg,
.glue-carousel--detailed
  .glue-carousel__paginate-labelled
  .glue-pagination__button:focus
  svg {
  stroke: #174ea6;
}
.glue-caro


_ = 0;
    $101 = $100&1;
    if ($101) {
     label = 28;
     break;
    } else {
     $$0$i$i51 = $99;
    }
   } else {
    $102 = load1($92);
    $103 = $102&255;
    $$0$i$i51 = $103;
   }
   $104 = $$0$i$i51&255;
   $105 = load1($7);
   $106 = (__ZNSt3__29__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_($104,$14,$$125,$10,$13,$105,$8,$11,$12,$6)|0);
   $107 = ($106|0)==(0);
   if (!($107)) {
    $$2 = $$125;$$pre$i3$i$i = $167;
    label = 38;
    break;
   }
   $108 = load4($91);
   $109 = load4($93);
   $110 = ($108|0)==($109|0);
   if ($110) {
    $111 = load4($$pre$i$i$i);
    $112 = ((($111)) + 40|0);
    $113 = load4($112);
    __THREW__ = 0;
    (invoke_ii($113|0,($$pre$i$i$i|0))|0);
    $114 = __THREW__; __THREW__ = 0;
    $115 = $114&1;
    if ($115) {
     label = 28;
     break;
    } else {
     $$024 = $$125;$$pre$i$i$i31 = $$pre$i$i$i;
     continue;
    }
   } else {
    $116 = ((($108)) + 1|0);
    store4($91,$116);
    $$024 = $$125;$$pre$i$i$i31 = $$pre$i$i$i;
    continue;
   }
  }
  if ((label|0) == 28) {
   $85 = ___cxa_find_matching_catch_2()|0;
   $86 = tempRet0;
   $$sink$index = $85;$$sink$index3 = $86;
  }
  else if ((label|0) == 30) {
   $89 = ___cxa_find_matching_catch_2()|0;
   $90 = tempRet0;
   $$sink$index = $89;$$sink$index3 = $90;
  }
  else if ((label|0) == 38) {
   $117 = ((($8)) + 11|0);
   $118 = load1($117);
   $119 = ($118<<24>>24)<(0);
   $120 = ((($8)) + 4|0);
   $121 = load4($120);
   $122 = $118&255;
   $123 = $119 ? $121 : $122;
   $124 = ($123|0)==(0);
   if (!($124)) {
    $125 = load4($12);
    $126 = $125;
    $127 = $11;
    $128 = (($126) - ($127))|0;
    $129 = ($128|0)<(160);
    if ($129) {
     $130 = load4($13);
     $131 = ((($125)) + 4|0);
     store4($12,$131);
     store4($125,$130);
    }
   }
   $132 = load4($10);
   __THREW__ = 0;
   $133 = (invoke_iiiii(391,($$2|0),($132|0),($4|0),($14|0))|0);
   $134 = __THREW__; __THREW__ = 0;
   $135 = $134&1;
   L54: do {
    if (!($135)) {
     store2($


meUsedIn("secret-name", &gwapi.Gateway{
		ObjectMeta: metav1.ObjectMeta{Name: "gw-1", Namespace: gen.DefaultTestNamespace, UID: "gw-1"},
		Spec: gwapi.GatewaySpec{Listeners: []gwapi.Listener{
			{TLS: nil},
			{TLS: &gwapi.ListenerTLSConfig{CertificateRefs: nil}},
		}},
	})
	assert.Equal(t, false, got)
}

func buildIngressInDeletion(ingress *networkingv1.Ingress, deletionTimestamp *metav1.Time, finalizers []string) *networkingv1.Ingress {
	if ingress == nil {
		ingress = buildIngress("test-ingress", gen.DefaultTestNamespace, nil)
	}

	ingress.SetDeletionTimestamp(deletionTimestamp)
	ingress.SetFinalizers(finalizers)
	return ingress
}

func buildGatewayInDeletion(gateway *gwapi.Gateway, deletionTimestamp *metav1.Time, finalizers []string) *gwapi.Gateway {
	if gateway == nil {
		gateway = buildGateway("test-gw", gen.DefaultTestNamespace, nil)
	}

	gateway.SetDeletionTimestamp(deletionTimestamp)
	gateway.SetFinalizers(finalizers)
	return gateway
}

func Test_isDeletedInForeground(t *testing.T) {
	type testT struct {
		DeletionTimestamp *metav1.Time
		Finalizers        []string
		SkipSync          bool
	}

	tests := []testT{
		{DeletionTimestamp: nil, Finalizers: nil, SkipSync: false},
		{DeletionTimestamp: nil, Finalizers: []string{}, SkipSync: false},
		{DeletionTimestamp: nil, Finalizers: []string{"cert-lock"}, SkipSync: false},
		{DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"cert-lock"}, SkipSync: true},
		{DeletionTimestamp: &metav1.Time{}, Finalizers: nil, SkipSync: true},
		{DeletionTimestamp: &metav1.Time{}, Finalizers: []string{}, SkipSync: true},
		{DeletionTimestamp: nil, Finalizers: []string{metav1.FinalizerDeleteDependents}, SkipSync: true},
		{DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"cert-lock", metav1.FinalizerDeleteDependents}, SkipSync: true},
	}

	t.Run("should skip ingress sync if being deleted in foreground", func(t *testing.T) {
		for _, test := range tests {
			skipIngressSync := isDeletedInForeground(buildIngressInDeletion(nil, test.DeletionTimestamp, test.Finalizers))
			if skipIngressSync != test.SkipSync {
				t.Errorf("Expected skipIngressSync=%v for deletionTimestamp %#v, finalizers %#v", test.SkipSync, test.DeletionTimestamp, test.Finalizers)
			}
		}
	})

	t.Run("should skip gateway sync if being deleted in foreground", func(t *testing.T) {
		for _, test := range tests {
			skipGatewaySync := isDeletedInForeground(buildGatewayInDeletion(nil, test.DeletionTimestamp, test.Finalizers))
			if skipGatewaySync != test.SkipSync {
				t.Errorf("Expected skipGatewaySync=%v for deletionTimestamp %#v, finalizers %#v", test.SkipSync, test.DeletionTimestamp, test.Finalizers)
			}
		}
	})
}

func TestMergeAnnotations(t *testing.T) {
	tests := []struct {
		name     string
		existing map[string]string
		update   map[string]string
		expected map[string]string
	}{
		{
			name: "No conflicts, simple merge",
			existing: map[string]string{
				"env":  "prod",
				"team": "alpha",
			},
			update: map


tor3.new(0.585091829, 0.622839987, 0.584051371)
p23.BottomSurface = Enum.SurfaceType.Smooth
p23.TopSurface = Enum.SurfaceType.Smooth
b23 = Instance.new("SpecialMesh", p23)
b23.MeshId = "http://www.roblox.com/asset/?id=3270017"
b23.TextureId = ""
b23.MeshType = Enum.MeshType.FileMesh
b23.Name = "Mesh"
b23.Scale = Vector3.new(0.585091829, 0.622839928, 0.301983595)
p24 = Instance.new("Part", m2)
p24.BrickColor = BrickColor.new("Lime green")
p24.Material = Enum.Material.SmoothPlastic
p24.Reflectance = 0.30000001192093
p24.CFrame = CFrame.new(29.3303471, 25.702631, 26.2719078, -0.573576272, 0.280164808, 0.76975143, -7.04498234e-007, -0.939690709, 0.342021465, 0.819151461, 0.196174651, 0.538986087)
p24.CanCollide = false
p24.FormFactor = Enum.FormFactor.Custom
p24.Size = Vector3.new(0.584050655, 0.584051132, 0.584051371)
p24.BottomSurface = Enum.SurfaceType.Smooth
p24.TopSurface = Enum.SurfaceType.Smooth
b24 = Instance.new("SpecialMesh", p24)
b24.MeshId = "http://www.roblox.com/asset/?id=3270017"
b24.TextureId = ""
b24.MeshType = Enum.MeshType.FileMesh
b24.Name = "Mesh"
b24.Scale = Vector3.new(0.283109009, 0.283109039, 0.283109665)
p25 = Instance.new("Part", m2)
p25.BrickColor = BrickColor.new("Lime green")
p25.Material = Enum.Material.SmoothPlastic
p25.Reflectance = 0.30000001192093
p25.CFrame = CFrame.new(29.7788715, 24.6493816, 26.5859661, -0.573576331, 0.212010548, 0.791240335, -7.63082312e-007, -0.965923905, 0.258820742, 0.819151402, 0.14845252, 0.554032862)
p25.CanCollide = false
p25.FormFactor = Enum.FormFactor.Custom
p25.Size = Vector3.new(0.585091829, 0.622839987, 0.584051371)
p25.BottomSurface = Enum.SurfaceType.Smooth
p25.TopSurface = Enum.SurfaceType.Smooth
b25 = Instance.new("SpecialMesh", p25)
b25.MeshId = "http://www.roblox.com/asset/?id=3270017"
b25.TextureId = ""
b25.MeshType = Enum.MeshType.FileMesh
b25.Name = "Mesh"
b25.Scale = Vector3.new(0.585091829, 0.622839928, 0.301983595)
p26 = Instance.new("Part", m2)
p26.BrickColor = BrickColor.new("Lime green")
p26.Material = Enum.Material.SmoothPlastic
p26.Reflectance = 0.30000001192093
p26.CFrame = CFrame.new(29.450201, 25.7558823, 26.3558235, -0.573576331, 0.280164748, 0.769751668, -7.91352306e-007, -0.93969059, 0.342021525, 0.819151402, 0.196174681, 0.538986146)


							Designed By HTML Codex

                                Home
                                Cookies
                                Help
                                FQAs

<!DOCTYPE html>

<!DOCTYPE html>

    <title>Flaticon WebFont</title>
    <link href="http://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="flaticon.css">
    <meta charset="UTF-8">


 -1)
        {
            RCLCPP_ERROR(this->get_logger(), "Couldn't read file target.pcd");
        }
        RCLCPP_INFO(this->get_logger(), "Loaded %d data points from target.pcd", target_cloud_->width * target_cloud_->height);

        // downsample the target cloud
        pcl::VoxelGrid<pcl::PointXYZ> sor_map;
        sor_map.setInputCloud(target_cloud_);
        sor_map.setLeafSize(map_voxel_leaf_size, map_voxel_leaf_size, map_voxel_leaf_size);
        sor_map.filter(*target_cloud_);
        RCLCPP_INFO(this->get_logger(), "Downsampled target cloud to %d data points", target_cloud_->width * target_cloud_->height);
        // Publish the downsampled target cloud

        pcl::toROSMsg(*target_cloud_, target_cloud_msg);
        target_cloud_msg.header.stamp = this->now();
        target_cloud_msg.header.frame_id = map_frame;
        map_pub_->publish(target_cloud_msg);
    }

private:
    void cloud_callback(const sensor_msgs::msg::PointCloud2::SharedPtr msg)
    {
        // Convert the incoming point cloud to PCL format
        pcl::PointCloud<pcl::PointXYZ>::Ptr input_cloud(new pcl::PointCloud<pcl::PointXYZ>);
        pcl::fromROSMsg(*msg, *input_cloud);

        // Downsample the input cloud
        pcl::VoxelGrid<pcl::PointXYZ> sor_scan;
        sor_scan.setInputCloud(input_cloud);
        sor_scan.setLeafSize(cloud_voxel_leaf_size, cloud_voxel_leaf_size, cloud_voxel_leaf_size);
        sor_scan.filter(*input_cloud);
        RCLCPP_INFO(this->get_logger(), "Downsampled input cloud to %d data points", input_cloud->width * input_cloud->height);

        // Rotate pcl alone x axis for 180 degree
        // Eigen::Matrix4f rotation = Eigen::Matrix4f::Identity();
        // rotation(1, 1) = -1;
        // rotation(2, 2) = -1;
        // pcl::transformPointCloud(*input_cloud, *input_cloud, rotation);

        // Perform ICP alignment
        pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp;
        icp.setInputSource(input_cloud);
        icp.setInputTarget(target_cloud_);
        icp.setMaximumIterations(solver_max_iter);
        // icp.setTransformationEpsilon(1e-8);
        icp.setMaxCorrespondenceDistance(max_correspondence_distance);
        icp.setRANSACOutlierRejectionThreshold(RANSAC_outlier_rejection_threshold);
        // icp.setRANSACIterations(100);
        pcl::PointCloud<pcl::PointXYZ> final_cloud;
        icp.align(final_cloud, initGuess);

        // Get fitness score
        double fitness_score = icp.getFitnessScore();
        RCLCPP_INFO(this->get_logger(), "ICP fitness score: %f", fitness_score);

        if (fitness_score < fitness_score_thre && icp.hasConverged())
        {
            converged_count++;
            RCLCPP_INFO(this->get_logger(), "ICP converged, count: %d", converged_count);
            if(converged_count < converged_count_thre)
            {
                RCLCPP_INFO(this->get_logger(), "ICP converged, but not enough count, no pose is published");
                return;
            }
            // Convert the transformation_result result to a PoseWithCovarianceStamped message and publish it
            Eigen::Matrix4f transformation_result = icp.getFinalTransformation();
            geometry_msgs::msg::PoseWithCovarianceStamped pose_msg;
            pose_msg.header.stam


 所有批次失败，使用代理下载
        Log.e(TAG, "All version URL requests failed, attempting proxy download")
        val result = DownGithubPrivate.download(activity, VERSION_URL)
        if (result.isSuccess) {
            val body = result.getOrThrow()
            try {
                val release = gson.fromJson(body, ReleaseResponse::class.java)
                sharedPrefs.edit()
                    .putString("cached_release", body)
                    .putLong("cached_release_time", System.currentTimeMillis())
                    .putString("successful_proxy_prefix", "proxy")
                    .commit()
                Log.i(TAG, "Fetched release via proxy: version=${release.version_name}")
                return release
            } catch (e: JsonParseException) {
                Log.e(TAG, "Gson parse error for proxy response: ${e.message}, body: ${body.take(100)}")
            }
        }
        Log.e(TAG, "Proxy download failed")
        return null
    }

    fun checkAndUpdate(isAutoCheck: Boolean = false) {
        Log.i(TAG, "checkAndUpdate, isAutoCheck=$isAutoCheck")
        CoroutineScope(Dispatchers.Main).launch {
            // 手动检查时显示加载对话框
            var loadingDialog: AlertDialog? = null
            if (!isAutoCheck) {
                loadingDialog = AlertDialog.Builder(activity)
                    .setMessage(activity.getString(R.string.checking_version))
                    .setCancelable(false)
                    .create()
                try {
                    loadingDialog.show()
                    loadingDialog.window?.let {
                        val params = it.attributes
                        params.width = (activity.resources.displayMetrics.widthPixels / 3)
                        params.gravity = android.view.Gravity.CENTER
                        it.attributes = params
                        it.setBackgroundDrawableResource(android.R.color.transparent)
                    }
                } catch (e: Exception) {
                    Log.e(TAG, "Failed to show loading dialog: ${e.message}")
                    loadingDialog?.dismiss()
                }
            }

            try {
                release = getRelease() // 网络请求
                val versionCodeFromRelease = release?.version_code
                val versionNameFromRelease = release?.version_name
                // 关闭加载对话框
                loadingDialog?.dismiss()

                Log.i(TAG, "versionCodeFromRelease:$versionCodeFromRelease, versionCode:$versionCode ")
                if (versionCodeFromRelease != null && versionNameFromRelease != null) {
                    if (versionCodeFromRelease > versionCode) {
                        Log.i(TAG, "versionCodeFromRelease:$versionCodeFromRelease, versionCode:$versionCode ")
                        // 有新版本，显示更新提示
                        updateUI(
                            text = activity.getString(R.string.latest_version, versionNameFromRelease),
                            update = true,
                            rightButtonAction = { showInstallOptions() },
                            defaultFocusOnLeft = false
                        )
                    } else if (!isAutoCheck) {
                        // 手动检查且无新版本，显示“已是最新版本”
                        updateUI(
                            text = activity.getString(R.string.already_latest),
                            update = false,
                            leftButtonText = "",
                            rightButtonText = activity.getString(R.string.confirm),
                            rightButtonAction = { /* 关闭对话框 */ },
                            defaultFocusOnLeft = false
                        )
                    } else {
                        // 自动检查且无新版本，静默结束
                        Log.i(TAG, "No new version available, versionCode=$versionCode, remote=$versionCodeFromRelease")
                    }
                } else if (!isAutoCheck) {
                    // 手动检查且版本信息无效，显示错误提示
                    updateUI(
                        text = activity.ge


e {
    /// Queued transitions have been received from the user but have not been
    /// processed yet. They are in the queue.
    ///
    Queued,

    /// Committed transitions have not yet been applied to the state machine but
    /// have already been replicated across the cluster such that they are
    /// guaranteed to be present in the log of all future cluster leaders.
    Committed,

    /// Applied transitions have been replicated across the cluster and have
    /// been applied to the local state machine.
    Applied,

    /// Abandoned transitions have been ignored by the replica.
    Abandoned(TransitionAbandonedReason),
}

#[derive(Clone, Debug, PartialEq)]
pub enum TransitionAbandonedReason {
    // NotLeader transitions have been abandoned because the replica is not
    // the cluster leader.
    NotLeader,
}

/// StateMachineTransition describes a user-defined transition that can be
/// applied to the state machine replicated by Raft.
pub trait StateMachineTransition: Clone + Debug {
    /// TransitionID is used to identify the transition.
    type TransitionID: Eq;

    /// get_id is used by the Replica to identify the transition to be able to
    /// call register_transition_state.
    fn get_id(&self) -> Self::TransitionID;
}

/// StateMachine describes a user-defined state machine that is replicated
/// across the cluster. Raft can Replica whatever distributed state machine can
/// implement this trait.
pub trait StateMachine<T>
where
    T: StateMachineTransition,
{
    /// This is a hook that the local Replica will call each time the state of a
    /// particular transition changes. It is up to the user what to do with that
    /// information.
    fn register_transition_state(&mut self, transition_id: T::TransitionID, state: TransitionState);

    /// When a particular transition is ready to be applied, the Replica will
    /// call apply_transition to apply said transition to the local state
    /// machine.
    fn apply_transition(&mut self, transition: T);

    /// This function is used to receive transitions from the user that need to
    /// be applied to the replicated state machine. Note that only the Leader
    /// Replica processes transitions and only when notified via the
    /// recv_transition channel. All other Replicas poll for transitions and
    /// discard them. get_pending_transitions must not return the same
    /// transition twice.
    fn get_pending_transitions(&mut self) -> Vec<T>;
}
<filename>examples/tor.rs
extern crate electrum_client;

use electrum_client::{Client, ConfigBuilder, ElectrumApi, Socks5Config};

fn main() {
    // NOTE: This assumes Tor is running localy, with an unauthenticated Socks5 listening at
    // localhost:9050
    let proxy = Socks5Config::new("127.0.0.1:9050");
    let config = ConfigBuilder::new().socks5(Some(proxy)).unwrap().build();

    let client = Client::from_config("tcp://explorernuoc63nb.onion:110", config.clone()).unwrap();
    let res = client.server_features();
    println!("{:#?}", res);

    // works both with onion v2/v3 (if your Tor supports them)
    let client = Client::from_config(
        "tcp://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion:110",
        config,
    )
    .unwrap();
    let res = client.server_features();
    println!("{:#?}", res);
}
<reponame>billmcchesney1/cargo-audit
//! `cargo audit` subcommands

mod audit;

use self::audit::AuditCommand;
use crate::config::AuditConfig;
use abscissa_core::{config::Override, Command, Configurable, FrameworkError, Options, Runnable};
use std::{ops::Deref, path::PathBuf};

/// Name of the configuration file (located in `~/.cargo`)
///
/// This file allows setting some default auditing options.
pub const CONFIG