to to pre-ignition level by dispatching repeated start/stop])
6. When RPM gets to 55%, request ground power OFF
--]]

local start_button_popup_timer = 0
function SetCommand(command,value)
	local rpm = sensor_data.getEngineLeftRPM()
    local throttle = sensor_data.getThrottleLeftPosition()

    if command==device_commands.push_starter_switch then
        if value==1 then
            if (engine_state==ENGINE_OFF) and get_elec_external_power() and EMER_FUEL_SHUTOFF == false then -- initiate ground start procedure
				 --dispatch_action(nil,iCommandEnginesStart)
				 efm_data_bus.fm_setBleedAir(1.0)
            elseif (engine_state==ENGINE_OFF) and rpm<50 and rpm>10 and get_elec_primary_ac_ok() and get_elec_primary_dc_ok() and throttle_state==THROTTLE_IGN  and EMER_FUEL_SHUTOFF == false  then -- initiate air start
                engine_state = ENGINE_STARTING
                dispatch_action(nil,iCommandEnginesStart)
				 efm_data_bus.fm_setBleedAir(1.0)
            else
                start_button_popup_timer = 0.3
            end
        end
        if value==0 then
			 efm_data_bus.fm_setBleedAir(0.0)
            if (engine_state==ENGINE_IGN or engine_state==ENGINE_STARTING) and rpm<50 and get_elec_external_power() then -- abort ground start procedure
                engine_state=ENGINE_OFF
                dispatch_action(nil,iCommandEnginesStop)
            end
        end
    elseif command==Keys.Engine_Start then
        Engine:performClickableAction(device_commands.push_starter_switch,1,false)
    elseif command==Keys.Engine_Stop then
        Engine:performClickableAction(device_commands.push_starter_switch,0,false)
        debug_print("engine has been turned off")
        throttle_state = THROTTLE_OFF
        engine_state = ENGINE_OFF
        dispatch_action(nil,iCommandEnginesStop)
        dev:performClickableAction(device_commands.throttle_click,-1,false)
        --elseif command==device_commands.throttle_axis then
        ---- value is -1 for throttle full forwards, 1 for throttle full back
        ----local throt = (2-(value+1))/2.0
        --local throt = value
        ----print_message_to_user("throt"..string.format("%.2f",throt))
        --dispatch_action(nil, iCommandPlaneThrustCommon, throt)
    elseif command==Keys.throttle_inc then
        dispatch_action(nil, iCommandPlaneThrustCommon, -2.0 * throttle + 1.0 - throttle_rate) -- normalise this transform for a percentage application to the -1 to 1 throttle axis
    elseif command==Keys.throttle_dec then
        dispatch_action(nil, iCommandPlaneThrustCommon, -2.0 * throttle + 1.0 + throttle_rate) -- normalise this transform for a percentage application to the -1 to 1 throttle axis
    elseif command==Keys.throttle_acc then
        throttle_accelerating = value
        if value == 0 then
            throttle_acceleration_rate = throttle_acceleration_default -- reset the rate to the default
            throttle_accelerating_duration = 0 -- reset the accelleration duration to 0
        end
    elseif command==device_commands.throttle_axis_slew then
        throttle_slew = value
    elseif command==device_commands.throttle_click then
        -- validate that throttle is not in adjust range
        if sensor_data.getThrottleLeftPosition() > 0.3 then
            return
        end
        if value==0 and throttle_state==THROTTLE_ADJUST and throttle<=0.01 then
            -- click to IGN from adjust
            throttle_state = T


            udfso.copyToHDFSFromLocal(false, file[0].getAbsolutePath(), hdfsJarPath);
            String datasetGroup = hdfsUsersBean.getHdfsGroupName(project, Settings.HOPS_TOUR_DATASET);
            String userHdfsName = hdfsUsersBean.getHdfsUserName(project, user);
            udfso.setPermission(new Path(hdfsJarPath), udfso.getParentPermission(new Path(hdfsJarPath)));
            udfso.setOwner(new Path("/" + Settings.DIR_ROOT + "/" + project.getName() + "/" + Settings.HOPS_TOUR_DATASET
                + "/spark-examples.jar"), userHdfsName, datasetGroup);

          } catch (IOException ex) {
            LOGGER.log(Level.SEVERE, "Something went wrong when adding the tour files to the project", ex);
            throw new AppException(Response.Status.INTERNAL_SERVER_ERROR.
                getStatusCode(),
                "Something went wrong when adding the tour files to the project");
          }
          break;
        case KAFKA:
          // Get the JAR from /user/<super user>
          String kafkaExampleSrc = "/user/" + settings.getSparkUser() + "/"
              + settings.getHopsExamplesFilename();
          String kafkaExampleDst = "/" + Settings.DIR_ROOT + "/" + project.getName()
              + "/" + Settings.HOPS_TOUR_DATASET + "/" + settings.getHopsExamplesFilename();
          try {
            udfso.copyInHdfs(new Path(kafkaExampleSrc), new Path(kafkaExampleDst));
            String datasetGroup = hdfsUsersBean.getHdfsGroupName(project, Settings.HOPS_TOUR_DATASET);
            String userHdfsName = hdfsUsersBean.getHdfsUserName(project, user);
            udfso.setPermission(new Path(kafkaExampleDst), udfso.getParentPermission(new Path(kafkaExampleDst)));
            udfso.setOwner(new Path(kafkaExampleDst), userHdfsName, datasetGroup);

          } catch (IOException ex) {
            LOGGER.log(Level.SEVERE, "Something went wrong when adding the tour files to the project", ex);
            throw new AppException(Response.Status.INTERNAL_SERVER_ERROR.
                getStatusCode(),
                "Something went wrong when adding the tour files to the project");
          }
          break;
        case TENSORFLOW:
        case DISTRIBUTED_TENSORFLOW:
          // Get the mnist.py and tfr records from /user/<super user>/tensorflow_demo
          //Depending on tour type, copy files
          String tensorflowDataSrc = "/user/" + settings.getHdfsSuperUser() + "/" + Settings.HOPS_TENSORFLOW_TOUR_DATA
              + "/*";
          String tensorflowDataDst = "/" + Settings.DIR_ROOT + "/" + project.getName() + "/"
              + Settings.HOPS_TOUR_DATASET;
          try {
            udfso.copyInHdfs(new Path(tensorflowDataSrc), new Path(tensorflowDataDst));
            String datasetGroup = hdfsUsersBean.getHdfsGroupName(project, Settings.HOPS_TOUR_DATASET);
            String userHdfsName = hdfsUsersBean.getHdfsUserName(project, user);
            Inode parent = inodes.getInodeAtPath(tensorflowDataDst);
            List<Inode> children = new ArrayList<>();
            inodes.getAllChildren(parent, children);
            for (Inode child : children) {
              if (child.getHdfsUser() != null && child.getHdfsUser().getName().equals(settings.getHdfsSuperUser())) {
                Path path = new Path(inodes.getPath(child));
                udfso.setPermission(path, udfso.getParentPermission(path));
                udfso.setOwner(path, userHdfsName, datasetGroup);
              }
            }
            /


主要变化(2.9.2)
* 4134190 fix: 分区移动失败继续运行 (#423)
* 66fa06f fix: 源动态禁止转发
* b1de122 fix: 验证码识别失败无限重试
* d3475a5 feat(notify.js): QYWX推送变为图文消息 (#416)

_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_

## 主要变化(2.9.1)
* 9b0f9bf fix: 仅屏蔽自动回复 (#401)
* 74337ca fix: 账号转发动态途中被系统强制登出，任务直接终止 (#392)
* 6c75d57 lint: eslint
* e723136 feat:  可自定义验证码识别API

_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_

## 主要变化(2.9.0)
* 1e7d8b2 feat: 动态详情新老api共存
* fc41750 fix: 源rid_str获取
* 1a08c0a fix: 话题uid动态获取使用老解析函数
* 666c057 feat: 使用新接口替换动态详情老接口 (#382)
* df3e97d ci: fix "an artifact with this name already exists on the workflow run"

_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_

## 主要变化(2.8.19)
* d9f6bf2 feat: 中奖检测屏蔽自动回复 (#381)
* ded981e fix: 动态卡片解析出错导致程序停止
* 93d3727 fix: searcher.js typo fix (#379)

_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_

## 主要变化(2.8.17)
* 60e211e fix: 读取uid出错 (#369)

_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_

## 主要变化(2.8.17)
* 5b33ae3 fix: 读取uid出错 (#369)
* 7e4650c feat: env可自定义UA (#371)

_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_

## 主要变化(2.8.16)
* 469a6dc fix: add getOneDynamicByDyid v1

_如果之前版本小于上一版本,请查看[CHANGELOG](https://github.com/shanmiteko/LotteryAutoScript/blob/main/CHANGELOG.md)变更说明_

## 主要变化(2.8.15)
* 7b6356a fix:  风控导致动态全为过时
* d337fb2 fix: 查询动态详情的接


    align-items: center;
    flex-wrap: wrap;
}

.flex-container>* {
    flex: 0 0 auto;
    margin: 10px;
}

.right-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap:20px;
}

#main-container {
    margin-top: 40px;
}

.qrcode {
    width: 270px;
    height: 270px;
    border-radius: 10px;
}

#qrcode-overlay {
    display: none;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    height: -webkit-fill-available;
    text-align: center;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    background: rgba(0,0,0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    color: white;
    letter-spacing: 1.8px;
    animation: fade-in 0.3s ease;
}

@keyframes qrcode-loading {
    0% {
        background-color: rgba(255, 255, 255, 0.1);
    }

    50% {
        background-color: rgba(255, 255, 255, 0.2);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 0.1;
    }

    20% {
        opacity: 0.2;
    }

    30% {
        opacity: 0.3;
    }

    40% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.5;
    }

    60% {
        opacity: 0.6;
    }

    70% {
        opacity: 0.7;
    }

    80% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.9;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }

    10% {
        opacity: 0.9;
    }

    20% {
        opacity: 0.8;
    }

    30% {
        opacity: 0.7;
    }

    40% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.5;
    }

    60% {
        opacity: 0.4;
    }

    70% {
        opacity: 0.3;
    }

    80% {
        opacity: 0.2;
    }

    90% {
        opacity: 0.1;
    }

    100% {
        opacity: 0;
    }
}

#short-another-button {
    background-color: #333;
    border: none;
    padding: 14px 30px;
    border-radius: 4px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
    transition: background-color 0.2s ease-in-out;
    margin-top: -15px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-family: inherit;
}

#short-another-button:hover {
    background-color: #555;
    background-color: rgba(255, 255, 255, 0.15);
}

#qr-code-button {
    background-color: #333;
    border: none


rb: {
      x: 50,
      y: 50,
    },
    origin: {
      x: 540,
      y: 484,
    },
  },
  {
    name: '아이스 에이지',
    location: 'assets/iceage.png',
    job: '썬콜',
    lt: {
      x: -750,
      y: -400,
    },
    rb: {
      x: 750,
      y: 300,
    },
    origin: {
      x: 741,
      y: 730,
    },
  },
  {
    name: '스피릿 오브 스노우',
    location: 'assets/spiritofsnow.png',
    job: '썬콜',
    lt: {
      x: -600,
      y: -600,
    },
    rb: {
      x: 600,
      y: 100,
    },
    origin: {
      x: 530,
      y: 776,
    },
  },
  {
    name: '빅뱅',
    location: 'assets/bigbang.png',
    job: '비숍',
    lt: {
      x: -300,
      y: -230,
    },
    rb: {
      x: 300,
      y: 160,
    },
    origin: {
      x: 194,
      y: 194,
    },
  },
  {
    name: '제네시스',
    location: 'assets/genesis.png',
    job: '비숍',
    lt: {
      x: -400,
      y: -350,
    },
    rb: {
      x: 400,
      y: 250,
    },
    origin: {
      x: 423,
      y: 478,
    },
  },
  {
    name: '헤븐즈 도어',
    location: 'assets/heavensdoor.png',
    job: '비숍',
    lt: {
      x: -550,
      y: -550,
    },
    rb: {
      x: 550,
      y: 130,
    },
    origin: {
      x: 606,
      y: 740,
    },
  },
  {
    name: '프레이',
    location: 'assets/pray.png',
    job: '비숍',
    lt: {
      x: -320,
      y: -300,
    },
    rb: {
      x: 320,
      y: 30,
    },
    origin: {
      x: 453,
      y: 288,
    },
  },
  {
    name: '피스메이커(접촉)',
    location: 'assets/peacemaker.png',
    job: '비숍',
    lt: {
      x: -75 - 220 / 2 - 600,
      y: -65 - 220 / 2,
    },
    rb: {
      x: -75 + 220 / 2,
      y: -65 + 220 / 2,
    },
    origin: {
      x: 122 + 75,
      y: 143 + 65,
    },
  },
  {
    name: '피스메이커(신성한 빛)',
    location: 'assets/peacemaker_final.png',
    job: '비숍',
    lt: {
      x: -350 - 75 - 600,
      y: -350 - 65,
    },
    rb: {
      x: 430 - 75 - 600,
      y: 300 - 65,
    },
    origin: {
      x: 590 + 75 + 600,
      y: 590 + 65,
    },
  },
  {
    name: '디�


.ui.utils.navigation.Screen.LibraryDetails
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.LimitResize
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.LoadNetImage
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.Main
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.MarkupLayers
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.MeshGradients
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.NoiseGeneration
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.PdfTools
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.PickColorFromImage
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.RecognizeText
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.ResizeAndConvert
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.ScanQrCode
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.Settings
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.SingleEdit
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.SvgMaker
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.WallpapersExport
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.Watermarking
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.WebpTools
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.WeightResize
import com.t8rin.imagetoolbox.core.ui.utils.navigation.Screen.Zip
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.descriptors.PrimitiveKind
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import android.net.Uri as AndroidUri

internal fun Screen.isBetaFeature(): Boolean = when (this) {
    is MarkupLayers -> true
    else -> false
}

internal fun Screen.simpleName(): String = when (this) {
    is ApngTools -> "APNG_Tools"
    is Cipher -> "Cipher"
    is Compare -> "Compare"
    is Crop -> "Crop"
    is DeleteExif -> "Delete_Exif"
    is Draw -> "Draw"
    is EasterEgg -> "Easter_Egg"
    is EraseBackground -> "Erase_Background"
    is Filter -> "Filter"
    is GeneratePalette -> "Generate_Palette"
    is GifTools -> "GIF_Tools"
    is GradientMaker -> "Gradient_Maker"
    is ImagePreview -> "Image_Preview"
    is ImageStitching -> "Image_Stitching"
    is JxlTools -> "JXL_Tools"
    is LimitResize -> "Limit_Resize"
    is LoadNetImage -> "Load_Net_Image"
    is Main -> "Main"
    is PdfTools -> "PDF_Tools"
    is PickColorFromImage -> "Pick_Color_From_Image"
    is RecognizeText -> "Recognize_Text"
    is ResizeAndConvert -> "Resize_And_Convert"
    is WeightResize -> "Resize_By_Bytes"
    is Settings -> "Settings"
    is SingleEdit -> "Single_Edit"
    is Watermarking -> "Watermarking"
    is Zip -> "Zip"
    is SvgMaker -> "Svg"
    is FormatConversion -> "Convert"
    is DocumentScanner -> "Document_Scann


iologo-pochvennyi institut DVO RAN, Vladivostok, Russia.\r\nPB  - ISiEZH SO RAN, Novosibirsk\r\nBT  - Guliaev, V.D. [Ed.]. [Parasitological research in Siberia and the Far East: materials of the first interregional scientific conference in memory of Professor A.A. Mozgovoi.] [Parazitologicheskie issledovaniya v Sibiri i na Dalnem Vostoke. Materialy pervogo mezhergionalnoi nauchnoi konferentsii, posvyashchennoi pamyati professora A.A. Mozgovogo.] ISiEZH SO RAN, Novosibirsk. 2002: 1-234. Chapter pagination: 214-218.\r\nLG  - Russian\r\nPT  - Book chapter\r\nPT  - Meeting paper\r\nBR  - Systematics\r\nBR  - General morphology\r\nBR  - Parasites diseases and disorders\r\nBR  - Parasites\r\nBR  - Hosts\r\nBR  - Land zones\r\nBR  - Palaearctic region\r\nBR  - Eurasia\r\nTN  - Arthropods\r\nTN  - Chordates\r\nTN  - Crustaceans\r\nTN  - Fish\r\nTN  - Invertebrates\r\nTN  - Vertebrates\r\nST  - Animalia\r\nST  - Arthropoda\r\nST  - Crustacea\r\nST  - Copepoda\r\nST  - Siphonostomatoida\r\nST  - Chordata\r\nST  - Vertebrata\r\nDE  - Pisces: Crustacean parasites, Salmincola & Tracheliastes, Parasite prevalence & distribution on host, Russia, Sakhalin Island, Crustacean parasite prevalence & distribution on host.\r\n\r\n      Salmincola californiensis, Salmincola edwardsii, Salmincola markewitschi, Salmincola stellatus, Tracheliastes sachalinensis: General morphology, Taxonomic significance, Piscean hosts, Parasite prevalence & distribution on host, Russia, Sakhalin Island, parasite prevalence & distribution.\r\nSY  - Salmincola californiensis, http://www.organismnames.com/namedetails.htm?lsid=62073, (Siphonostomatoida): Parasite\r\n\r\n      Salmincola edwardsii, http://www.organismnames.com/namedetails.htm?lsid=45149, (Siphonostomatoida): Parasite\r\n\r\n      Salmincola markewitschi, http://www.organismnames.com/namedetails.htm?lsid=1595526, (Siphonostomatoida): Parasite\r\n\r\n      Salmincola stellatus, http://www.organismnames.com/namedetails.htm?lsid=898989, (Siphonostomatoida): Parasite\r\n\r\n      Tracheliastes sachalinensis, http://www.organismnames.com/namedetails.htm?lsid=1920998, (Siphonostomatoida): Parasite\r\n\r\n      Pisces, http://www.organismnames.com/namedetails.htm?lsid=249, (Vertebrata): Host\r\nYR  - 2002\r\nDD  - 20090629\r\nUP  - 200700. Zoological Records Update: 200710.\r\nXL  - http://ovidsp.ovid.com/ovidweb.cgi?T=JS&CSC=Y&NEWS=N&PAGE=fulltext&D=zoor12&AN=ZOOR14310064653\r\nXL  - http://libraries.colorado.edu:4550/resserv?sid=OVID:zoordb&id=pmid:&id=doi:&issn=&isbn=&volume=&issue=&spage=214&pages=214-218&date=2002&title=&atitle=%5BParasitic+copepods+of+the+genera+Salmincola+and+Tracheliastes+%28Lernaeopodidae%29+from+freshwater+fish+of+the+Sakhalin+Island.%5D&aulast=Shedko&pid=%3Cauthor%3EShedko%2C+MB%3BVinogradov%2C+SA%3BShedko%2C+SV%3C%2Fauthor%3E%3CAN%3EZOOR14310064653%3C%2F


_CS_LB_CTM_0"},
        {602,   "EVT_LIND1_CS_LB_EXB_0"},
        {611,   "EVT_LIND1_CS_LB_GRM_0"},
        {613,   "EVT_LIND1_CS_LB_HAL_0"},
        {619,   "EVT_LIND1_CS_LB_HFC_0"},
        {607,   "EVT_LIND1_CS_LB_HNG_0"},
        {620,   "EVT_LIND1_CS_LB_LFT_0"},
        {603,   "EVT_LIND1_CS_LB_LLP_0"},
        {601,   "EVT_LIND1_CS_LB_LPF_0"},
        {616,   "EVT_LIND1_CS_LB_LPR_0"},
        {618,   "EVT_LIND1_CS_LB_MET_0"},
        {612,   "EVT_LIND1_CS_LB_MHW_0"},
        {615,   "EVT_LIND1_CS_LB_OBS_0"},
        {605,   "EVT_LIND1_CS_LB_PLA_0"},
        {604,   "EVT_LIND1_CS_LB_POT_0"},
        {608,   "EVT_LIND1_CS_LB_SHB_0"},
        {606,   "EVT_LIND1_CS_LB_TSP_0"},
        {617,   "EVT_LIND1_CS_LB_UHW_0"},
        {569,   "EVT_LIND1_TN_LB_AET_0"},
        {556,   "EVT_LIND1_TN_LB_ALY_0"},
        {564,   "EVT_LIND1_TN_LB_ATL_0"},
        {555,   "EVT_LIND1_TN_LB_BAZ_0"},
        {575,   "EVT_LIND1_TN_LB_CAG_0"},
        {560,   "EVT_LIND1_TN_LB_ECH_0"},
        {1170,  "EVT_LIND1_TN_LB_FHT_0"},
        {568,   "EVT_LIND1_TN_LB_FTH_0"},
        {572,   "EVT_LIND1_TN_LB_FTM_0"},
        {550,   "EVT_LIND1_TN_LB_GAT_0"},
        {567,   "EVT_LIND1_TN_LB_HIG_0"},
        {558,   "EVT_LIND1_TN_LB_HUS_0"},
        {553,   "EVT_LIND1_TN_LB_IN1_0"},
        {554,   "EVT_LIND1_TN_LB_IN2_0"},
        {561,   "EVT_LIND1_TN_LB_ITM_0"},
        {573,   "EVT_LIND1_TN_LB_LDH_0"},
        {552,   "EVT_LIND1_TN_LB_MST_0"},
        {551,   "EVT_LIND1_TN_LB_MTM_0"},
        {559,   "EVT_LIND1_TN_LB_PLZ_0"},
        {566,   "EVT_LIND1_TN_LB_RFS_0"},
        {570,   "EVT_LIND1_TN_LB_ROD_0"},
        {576,   "EVT_LIND1_TN_LB_SHT_0"},
        {571,   "EVT_LIND1_TN_LB_SLN_0"},
        {563,   "EVT_LIND1_TN_LB_STN_0"},
        {557,   "EVT_LIND1_TN_LB_TMP_0"},
        {565


0x000001FF
_021DF118: .word 0x04000018

	thumb_func_start ov05_021DF11C
ov05_021DF11C: ; 0x021DF11C
	push {r4, r5, r6, lr}
	sub sp, #0x18
	ldr r0, _021DF3BC ; =0x00000F58
	add r5, r1, #0
	add r2, r0, #0
	add r2, #0xa
	ldrh r2, [r5, r2]
	ldr r4, [r5, r0]
	cmp r2, #5
	bhi _021DF1EA
	add r2, r2, r2
	add r2, pc
	ldrh r2, [r2, #6]
	lsl r2, r2, #0x10
	asr r2, r2, #0x10
	add pc, r2
_021DF13C: ; jump table
	.short _021DF148 - _021DF13C - 2 ; case 0
	.short _021DF1B0 - _021DF13C - 2 ; case 1
	.short _021DF1FC - _021DF13C - 2 ; case 2
	.short _021DF270 - _021DF13C - 2 ; case 3
	.short _021DF2F8 - _021DF13C - 2 ; case 4
	.short _021DF348 - _021DF13C - 2 ; case 5
_021DF148:
	mov r0, #0xa
	str r0, [sp]
	mov r2, #1
	str r2, [sp, #4]
	sub r0, r2, #5
	str r0, [sp, #8]
	mov r0, #2
	str r0, [sp, #0xc]
	mov r0, #3
	str r0, [sp, #0x10]
	ldr r0, _021DF3C0 ; =ov05_021DF3E8
	mov r3, #0x1e
	str r0, [sp, #0x14]
	add r0, r4, #0
	bl ov05_021DD328
	ldr r0, _021DF3C4 ; =0x00006B6F
	mov r2, #0x41
	str r0, [sp]
	ldr r0, _021DF3C8 ; =0x00006318
	lsl r2, r2, #2
	str r0, [sp, #4]
	mov r0, #1
	str r0, [sp, #8]
	ldr r0, _021DF3CC ; =0x00000F64
	add r1, r4, #0
	ldrh r0, [r5, r0]
	add r1, #0x1c
	str r0, [sp, #0xc]
	ldr r3, [r5]
	add r0, r4, #0
	ldr r2, [r3, r2]
	add r0, #0x4c
	ldr r2, [r2, #0x44]
	mov r3, #3
	bl ov05_021DD420
	add r0, r4, #0
	mov r1, #0x10
	add r0, #0xb4
	str r1, [r0]
	add r0, r4, #0
	mov r1, #0
	add r0, #0xb8
	str r1, [r0]
	add r0, r4, #0
	add r0, #0xbc
	str r1, [r0]
	ldr r0, _021DF3D0 ; =0x00000F62
	mov r1, #1
	strh r1, [r5, r0]
	b _021DF366
_021DF1B0:
	add r0, r4, #0
	bl ov05_021DD35C
	add r6, r


  color = Color.White,
            modifier = Modifier.constrainAs(remainingTime) {
                top.linkTo(passedTime.top)
                bottom.linkTo(passedTime.bottom)
                end.linkTo(parent.end)
            })

        Icon(
            painterResource(id = R.drawable.ic_pause),
            "Pause",
            modifier = Modifier
                .size(32.dp)
                .constrainAs(pause) {
                    top.linkTo(progressBar.bottom, margin = 24.dp)
                    start.linkTo(parent.start)
                    end.linkTo(parent.end)
                },
            tint = Color.White
        )

        Icon(
            painterResource(id = R.drawable.ic_previous),
            "Previous",
            modifier = Modifier
                .size(32.dp)
                .constrainAs(previous) {
                    top.linkTo(pause.top)
                    bottom.linkTo(pause.bottom)
                    end.linkTo(pause.start, margin = 20.dp)
                },
            tint = Color.White
        )

        Icon(
            painterResource(id = R.drawable.ic_next),
            "Next",
            modifier = Modifier
                .size(32.dp)
                .constrainAs(next) {
                    top.linkTo(pause.top)
                    bottom.linkTo(pause.bottom)
                    start.linkTo(pause.end, margin = 20.dp)
                },
            tint = Color.White
        )

    }
}

@Preview(showBackground = true, backgroundColor = 0xFFFF0000)
@Composable
private fun MediaPlayerExpandedPreview() {
    MediaPlayerExpanded()
}
package com.whiplash.presentation.alarm

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.whiplash.presentation.R
import com.whiplash.presentation.databinding.ActivityAlarmCheckInSuccessBinding
import com.whiplash.presentation.main.MainActivity
import com.whiplash.presentation.util.ActivityUtils.navigateTo
import dagger.hilt.android.AndroidEntryPoint

/**
 * 장소 도착 인증 성공 시 이동하는 화면
 */
@AndroidEntryPoint
class AlarmCheckInSuccessActivity : AppCompatActivity() {

    private lateinit var binding: ActivityAlarmCheckInSuccessBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        binding = ActivityAlarmCheckInSuccessBinding.inflate(layoutInflater)
        setContentView(binding.root)
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.alarm_check_in_main)) { v, insets ->
            val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
            insets
        }

        binding.whCheckInSuccess.setTitle(getString(R.string.success_check_in_header))

        val address = intent.getStringExtra("address")
        binding.tvCheckInSuccessAddress.text = address

        binding.btnRegisterAddress.setOnClickListener {
            navigateTo<MainActivity> {
                finishCurrentActivity()
            }
        }
    }
}package com.whiplash.presentation.onboarding

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
import android


us_resistance_reduction	= self:GetAbility():GetSpecialValueFor("status_resistance_reduction") * (-1)
	self.magic_resistance_reduction		= self:GetAbility():GetSpecialValueFor("magic_resistance_reduction") * (-1)

	-- IMBAfication: Growing Discomfort
	self.discomfort_status_resistance_reduction_per_stack		= self:GetAbility():GetSpecialValueFor("discomfort_status_resistance_reduction_per_stack") * (-1)
	self.discomfort_magic_resistance_reduction_per_stack		= self:GetAbility():GetSpecialValueFor("discomfort_magic_resistance_reduction_per_stack") * (-1)

	-- IMBAfication: The Terror Within
	self.terror_night_vision_reduction_per_stack		= self:GetAbility():GetSpecialValueFor("terror_night_vision_reduction_per_stack") * (-1)

	self.total_status_resistance_reduction		= self.status_resistance_reduction + self.discomfort_status_resistance_reduction_per_stack * self:GetStackCount()
	self.total_magic_resistance_reduction		= self.magic_resistance_reduction + self.discomfort_magic_resistance_reduction_per_stack * self:GetStackCount()
	self.terror_night_vision_reduction			= self.terror_night_vision_reduction_per_stack * self:GetStackCount()
end

function modifier_imba_bane_enfeeble_723_effect:OnRefresh()
	self:OnCreated()

	if not IsServer() then return end

	self:IncrementStackCount()
end

function modifier_imba_bane_enfeeble_723_effect:DeclareFunctions()
	return {
		MODIFIER_PROPERTY_STATUS_RESISTANCE_STACKING,
		MODIFIER_PROPERTY_MAGICAL_RESISTANCE_BONUS,

		MODIFIER_PROPERTY_BONUS_NIGHT_VISION
	}
end

function modifier_imba_bane_enfeeble_723_effect:GetModifierStatusResistanceStacking()
	return self.total_status_resistance_reduction
end

function modifier_imba_bane_enfeeble_723_effect:GetModifierMagicalResistanceBonus()
	return self.total_magic_resistance_reduction
end

function modifier_imba_bane_enfeeble_723_effect:GetBonusNightVision()
	return self.terror_night_vision_reduction
end

--------------------------------------
---------    BRAIN SAP     -----------
--------------------------------------
LinkLuaModifier("modifier_imba_brain_sap_mana", "components/abilities/heroes/hero_bane", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_imba_brain_sap_baby_bane", "components/abilities/heroes/hero_bane", LUA_MODIFIER_MOTION_NONE)

-- Main Brain Sap casting
imba_bane_brain_sap = imba_bane_brain_sap or class({})

function imba_bane_brain_sap:GetCastPoint()
	if not self:GetCaster():HasScepter() then
		return self.BaseClass.GetCastPoint(self)
	else
		return self:GetSpecialValueFor("castpoint_scepter")
	end
end

-- Brain Sap Spell Cast
function imba_bane_brain_sap:OnSpellStart()
	if IsServer() then
		-- Ability properties
		local caster = self:GetCaster()
		local target = self:GetCursorTarget()

		local enfeeble_debuff =	target:FindModifierByName("modifier_imba_enfeeble_debuff")

		-- Ability paramaters
		local sapdamage = self:GetSpecialValueFor("brain_sap_damage")
		local sapduration =	self:GetSpecialValueFor("brain_sap_duration")
		local enfeeble_stack_to_damage =


                        onTap: () {
                          // Scaffold.of(context).openDrawer();
                          // _scaffoldKey.currentState!.openEndDrawer();
                        },
                        child: const Icon(Icons.mic, size: 30)),
                  ],
                ),
              ),
            ]
          : [],
    );
  }

  static AppBar getAdminAppBar({
    required BuildContext context,
    String? title = "",
  }) {
    return AppBar(
      title: Text("$title",
          style: appBarTextStyle, maxLines: 1, overflow: TextOverflow.ellipsis),
      iconTheme: const IconThemeData(color: Colors.black),
      // automaticallyImplyLeading: true,
      leading: Padding(
        padding: EdgeInsets.all(mq.width * .025).copyWith(right: 0),
        child: InkWell(
          onTap: () {},
          child: Image.asset(
            "assets/images/logo.png",
          ),
        ),
      ),
      backgroundColor: Colors.white,
      elevation: 2,
      actions: [
        TextButton(
            onPressed: () {},
            child: Text(
              "Admin",
              style: GlobalVariables.appBarTextStyle.copyWith(fontSize: 16),
            ))
      ],
    );
  }
}
import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:apidash/providers/providers.dart';
import 'package:apidash_core/models/models.dart';
import 'package:apidash/utils/utils.dart';
import 'envvar_indicator.dart';

class EnvironmentTriggerOptions extends ConsumerWidget {
  const EnvironmentTriggerOptions({
    super.key,
    required this.query,
    required this.onSuggestionTap,
  });

  final String query;
  final ValueSetter<EnvironmentVariableSuggestion> onSuggestionTap;

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final envMap = ref.watch(availableEnvironmentVariablesStateProvider);
    final activeEnvironmentId = ref.watch(activeEnvironmentIdStateProvider);
    final suggestions =
        getEnvironmentTriggerSuggestions(query, envMap, activeEnvironmentId);
    return suggestions == null || suggestions.isEmpty
        ? const SizedBox.shrink()
        : SuggestionsMenuBox(
            child: ListView.separated(
              shrinkWrap: true,
              itemCount: suggestions.length,
              separatorBuilder: (context, index) => const Divider(height: 2),
              itemBuilder: (context, index) {
                final suggestion = suggestions[index];
                return ListTile(
                  dense: true,
                  leading: EnvVarIndicator(suggestion: suggestion),
                  title: Text(suggestion.variable.key),
                  subtitle: Text(suggestion.variable.value),
                  onTap: () => onSuggestionTap(suggestion),
                );
              },
            ),
          );
  }
}
/*
 *   Webkul Software.
 *   @package Mobikul Application Code.
 *   @Category Mobikul
 *   @author Webkul <support@webkul.com>
 *   @Copyright (c) Webkul Software Private Limited (https://webkul.com)
 *   @license https://store.webkul.com/license.html
 *   @link https://store.webkul.com/license.html
 */

import 'package:bagisto_app_demo/screens/order_invoices/utils/index.dart';

class InvoiceScreen extends StatefulWidget {
  final OrderDetail? orderDetailsModel;
  const InvoiceScreen({this.orderDetailsModel, Key? key}) : super(key: key);

  @override
  State<InvoiceScreen> createState() => _InvoiceScreen


Z2Ftb3Q= 123235
KGhpZGRlbg== 123236
zKc= 123237
INC/0LvQtdGH 123238
IHNld2FnZQ== 123239
IGZ1b3Jp 123240
IFByZWNpbw== 123241
LnRhYmxlcw== 123242
IHZlcnRyYQ== 123243
Y2hhdWZm 123244
IGZlaXJh 123245
IGJ1bm55 123246
2LXYp9mE2KfYqg== 123247
IOCksOCkow== 123248
IHNjaWVudGlmaXF1ZXM= 123249
IMOnYWzEscWfYW4= 123250
INi32KjZgg== 123251
IGpy 123252
P+KAnA== 123253
INC80LDRlA== 123254
IHRvbmVy 123255
IGZvcnN0w6U= 123256
IGJyb25jaA== 123257
KGJpdA== 123258
IER1cGxpY2F0ZQ== 123259
UG96 123260
IHN1amV0bw== 123261
w6FzdGljb3M= 123262
c3RhbmRlcg== 123263
4paE 123264
ZWxpbmdz 123265
YW55YXJ3YW5kYQ== 123266
b3Njb3BpYw== 123267
IOWPpuexuw== 123268
4LSv4LWN 123269
IGRldXJlbg== 123270
IGVtcGU= 123271
INen16k= 123272
INW+1aHWgNW51aHVutWl1b8= 123273
ZW5hYXJz 123274
0LvQuNC60YI= 123275
IFBTT0U= 123276
aWNrYQ== 123277
IGJvdGxo 123278
INC30YM= 123279
xa9q 123280
IOCknOClguCkqA== 123281
J2FjaGF0 123282
INmC2YjYp9mG 123283
0KHQtdCz0L7QtNC90Y8= 123284
IFRlaWxuYWhtZQ== 123285
IGhpZHI= 123286
YnJldg== 123287
KSwKLy8= 123288
LkNvbnRyYWN0 123289
INin2YTYt9io2YrYudmK2Kk= 123290
5aSN5Yi2 123291
INC80LDSm9GB0LDRgg== 123292
ICjCow== 123293
INi52LHYqNmK 123294
IHNtYWs= 123295
INeR15zXkdeT 123296
6ZKx5oCO5LmI 123297
IElyZW5l 123298
IFVuZmFsbA== 123299
IGZpc2NhbGU= 123300
4oCZZXVyb3M= 123301
IFBsYXNtYQ== 123302
IOCkq+CljeCksg== 123303
ZW5ncg== 123304
IOihjA== 123305
Y2NjYw== 123306
77yI6K6w6ICF 123307
IEltcGxlbWVudHM= 123308
INCx0rHRgNGL0L0= 123309
bGFicw== 123310
IHNlY29uZGE= 123311
RGlyZWNjaW9u 123312
IEFsZ2VicmE= 123313
U29sdXRpb25z 123314
UmVzZWFyY2hlcnM= 123315
X3NwaW5uZXI= 123316
IHVuaXZlcnNpdGV0 123317
ZXJ2YXJpbmc= 123318
IEp1ZWdvcw== 123319
IG


,
    icon: [512, 512, [], "f192", "M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z"]
  };
  var faEdit = {
    prefix: 'far',
    iconName: 'edit',
    icon: [576, 512, [], "f044", "M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"]
  };
  var faEnvelope = {
    prefix: 'far',
    iconName: 'envelope',
    icon: [512, 512, [], "f0e0", "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"]
  };
  var faEnvelopeOpen = {
    prefix: 'far',
    iconName: 'envelope-open',
    icon: [512, 512, [], "f2b6", "M494.586 164.516c-4.697-3.883-111.723-89.95-135.251-108.657C


    f"  - Total Cost: ${total_cost:.4f}"
                    )
            except (TypeError, ValueError):
                pass
        await ui.info(MSG_SESSION_ENDED)

async def _offer_tutorial_if_appropriate(state_manager: StateManager) -> None:
    """Offer tutorial to first-time users if appropriate."""
    try:
        from tunacode.tutorial import TutorialManager

        tutorial_manager = TutorialManager(state_manager)

        # Check if we should offer tutorial
        if await tutorial_manager.should_offer_tutorial():
            # Offer tutorial to user
            accepted = await tutorial_manager.offer_tutorial()
            if accepted:
                # Run tutorial
                await tutorial_manager.run_tutorial()
    except ImportError:
        # Tutorial system not available, silently continue
        pass
    except Exception as e:
        # Don't let tutorial errors crash the REPL
        logger.warning(f"Tutorial offer failed: {e}")


some expression goes here' )`
			// that will read stdin. (The filename will come in as "dev/fd/63" or what have you.)
			// But this file _cannot_ be read twice. So, if doConstruct==false -- we're
			// on the first pass of the command-line parser -- don't bother to parse
			// the DSL-contents file.
			//
			// See also https://github.com/johnkerl/miller/issues/1515

			if doConstruct {
				theseDSLStrings, err := lib.LoadStringsFromFileOrDir(filename, ".mlr")
				if err != nil {
					fmt.Fprintf(os.Stderr, "%s %s: cannot load DSL expression from file \"%s\": ",
						"mlr", verb, filename)
					fmt.Println(err)
					os.Exit(1)
				}
				dslStrings = append(dslStrings, theseDSLStrings...)
			}
			haveDSLStringsHere = true

		} else if opt == "-e" {
			dslString := cli.VerbGetStringArgOrDie(verb, opt, args, &argi, argc)
			dslStrings = append(dslStrings, dslString)
			haveDSLStringsHere = true

		} else if opt == "-s" {
			// E.g.
			//   mlr put -s sum=0
			// is like
			//   mlr put -s 'begin {@sum = 0}'
			preset := cli.VerbGetStringArgOrDie(verb, opt, args, &argi, argc)
			presets = append(presets, preset)

		} else if opt == "-x" {
			invertFilter = true
		} else if opt == "-q" {
			suppressOutputRecord = true

		} else if opt == "-E" {
			echoDSLString = true
		} else if opt == "-p" {
			printASTAsTree = true
		} else if opt == "-v" {
			echoDSLString = true
			printASTAsTree = true
		} else if opt == "-d" {
			printASTMultiLine = true
		} else if opt == "-D" {
			printASTSingleLine = true
		} else if opt == "-X" {
			exitAfterParse = true
		} else if opt == "-w" {
			doWarnings = true
			warningsAreFatal = false
		} else if opt == "-z" {
			// TODO: perhaps doWarnings and warningsAreFatal as well.
			// But first I want to see what can be caught at runtime
			// without static analysis.
			strictMode = true
		} else if opt == "-W" {
			doWarnings = true
			warningsAreFatal = true

		} else if opt == "-S" {
			// TODO: this is a no-op in Miller 6 and above.
			// Comment this in more detail.

		} else if opt == "-F" {
			// TODO: this is a no-op in Miller 6 and above.
			// Comment this in more detail.

		} else {
			// This is inelegant. For error-proofing we advance argi already in our
			// loop (so individual if-statements don't need to). However,
			// ParseWriterOptions expects it unadvanced.
			largi := argi - 1
			if cli.FLAG_TABLE.Parse(args, argc, &largi, options) {
				// This lets mlr main and mlr put have different output formats.
				// Nothing else to handle here.
				argi = largi
			} else {
				transformerPutOrFilterUsage(os.Stderr, verb)
				os.Exit(1)
			}
		}
	}

	cli.FinalizeWriterOptions(&options.WriterOptions)

	// If they've used either of 'mlr put -f {filename}' or 'mlr put -e
	// {expression}' then that specifies their DSL expression. But if they've
	// done neither then we expect 'mlr put {expression}'.
	if


:= 30000
	maxPort := 40000
	for i := 1; i < 10; i++ {
		port = minPort + rand.IntN(maxPort-minPort+1)
		_, err := net.DialTimeout("tcp", net.JoinHostPort(ip, strconv.Itoa(port)), time.Second*2)
		if err != nil {
			// a failed connection indicates that the port is available for use
			break
		}
	}
	if port == 0 {
		t.Errorf("failed to find a free port between %d and %d", minPort, maxPort)
	}

	startTCP := func(int) (*Input, error) {
		cfg := NewConfigWithID("test_id")
		cfg.ListenAddress = net.JoinHostPort(ip, strconv.Itoa(port))
		set := componenttest.NewNopTelemetrySettings()
		op, err := cfg.Build(set)
		require.NoError(t, err)
		mockOutput := testutil.Operator{}
		tcpInput := op.(*Input)
		tcpInput.OutputOperators = []operator.Operator{&mockOutput}
		entryChan := make(chan *entry.Entry, 1)
		mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
			entryChan <- args.Get(1).(*entry.Entry)
		}).Return(nil)
		err = tcpInput.Start(testutil.NewUnscopedMockPersister())
		return tcpInput, err
	}

	first, err := startTCP(port)
	require.NoError(t, err, "expected first tcp operator to start")
	defer func() {
		require.NoError(t, first.Stop(), "expected to stop tcp input operator without error")
		require.NoError(t, first.Stop(), "expected stopping an already stopped operator to not return an error")
	}()
	_, err = startTCP(port)
	require.Error(t, err, "expected second tcp operator to fail to start")
}

func BenchmarkTCPInput(b *testing.B) {
	cfg := NewConfigWithID("test_id")
	cfg.ListenAddress = ":0"

	set := componenttest.NewNopTelemetrySettings()
	op, err := cfg.Build(set)
	require.NoError(b, err)

	fakeOutput := testutil.NewFakeOutput(b)
	tcpInput := op.(*Input)
	tcpInput.OutputOperators = []operator.Operator{fakeOutput}

	err = tcpInput.Start(testutil.NewUnscopedMockPersister())
	require.NoError(b, err)

	done := make(chan struct{})
	go func() {
		conn, err := net.Dial("tcp", tcpInput.listener.Addr().String())
		assert.NoError(b, err)
		defer func() {
			err := tcpInput.Stop()
			assert.NoError(b, err, "expected to stop tcp input operator without error")

			err = conn.Close()
			assert.NoError(b, err, "expected to close connection without error")
		}()
		message := []byte("message\n")
		for {
			select {
			case <-done:
				return
			default:
				_, err := conn.Write(message)
				assert.NoError(b, err)
			}
		}
	}()

	for b.Loop() {
		<-fakeOutput.Received
	}

	close(done)
}
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package jsonarray // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/jsonarray"

import (
	"context"
	"errors"
	"fmt"

	"github.com/valyala/fastjson"

	"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry"


ols .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-image-tools .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-image-tools .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-image-tools .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#000;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:0 -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(32,122,183,.5);border-color:rgba(32,122,183,.5)}.tox .tox-insert-table-picker__label{color:#fff;display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#2b3b4e;border:1px solid #000;border-radius:3px;box-shadow:0 4px 8px 0 rgba(42,55,70,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:4px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:4px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url(\"data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E\") left 0 top 0 #222f3e;background-color:#222f3e;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 4px 0 4px}.tox


_matrix, eigvals_only=True), 2).sum()

    # calculate laplacian centrality
    laplace_centralities_dict = {}
    for i, node in enumerate(nodelist):
        # remove row and col i from lap_matrix
        all_but_i = list(np.arange(lap_matrix.shape[0]))
        all_but_i.remove(i)
        A_2 = lap_matrix[all_but_i, :][:, all_but_i]

        # Adjust diagonal for removed row
        new_diag = lap_matrix.diagonal() - abs(lap_matrix[:, i])
        np.fill_diagonal(A_2, new_diag[all_but_i])

        if len(all_but_i) > 0:  # catches degenerate case of single node
            new_energy = np.power(sp.linalg.eigh(A_2, eigvals_only=True), 2).sum()
        else:
            new_energy = 0.0

        lapl_cent = full_energy - new_energy
        if normalized:
            lapl_cent = lapl_cent / full_energy

        laplace_centralities_dict[node] = lapl_cent

    return laplace_centralities_dict


all remaining gas and doesn't check for result
someAddress.call.value(100)(bytes4(sha3('deposit()'))); // if deposit throws an exception, the raw call() will only return false and transaction will NOT be reverted

(bool success, ) = someAddress.call.value(55)("");
if(!success) {
    // handle failure code
}

ExternalContract(someAddress).deposit.value(100)();
```

#### Ưu tiên pull hơn là push cho các lời gọi ngoài

Các lời gọi từ bên ngoài có thể thất bại một cách vô tình hoặc cố ý. Để giảm thiểu rủi ro từ các lỗi đó gây ra, tốt hơn hết là chia từng lời gọi thành các lời gọi nhỏ hơn. Điều này đặc biệt phù hợp với các giao dịch thanh toán, trong đó cho phép người dùng rút tiền sẽ tốt hơn là tự động chuyển tiền cho họ. (Điều này cũng làm giảm khả năng xảy ra sự cố với gasLimit.) và tránh việc thực hiện cùng một lúc nhiều hàm transfer() trong một giao dịch.

```javascript
// bad
contract auction {
    address highestBidder;
    uint highestBid;

    function bid() payable {
        require(msg.value >= highestBid);

        if (highestBidder != address(0)) {
            (bool success, ) = highestBidder.call.value(highestBid)("");
            require(success); // if this call consistently fails, no one else can bid
        }

       highestBidder = msg.sender;
       highestBid = msg.value;
    }
}

// good
contract auction {
    address highestBidder;
    uint highestBid;
    mapping(address => uint) refunds;

    function bid() payable external {
        require(msg.value >= highestBid);

        if (highestBidder != address(0)) {
            refunds[highestBidder] += highestBid; // record the refund that this user can claim
        }

        highestBidder = msg.sender;
        highestBid = msg.value;
    }

    function withdrawRefund() external {
        uint refund = refunds[msg.sender];
        refunds[msg.sender] = 0;
        (bool success, ) = msg.sender.call.value(refund)("");
        require(success);
    }
}
```

#### Không nên dùng delegatecall với đoạn mã không được tin cậy

Hàm `delegatecall` được sử dụng để gọi các hàm từ các hợp đồng khác như thể chúng thuộc về hợp đồng của ngư�


app.model.HeraProjectGroupUser;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.*;
import java.util.stream.Collectors;

/**
 * @date 2023/6/2 11:24 AM
 */
@Service
@Slf4j
public class HeraProjectGroupService {

    @Autowired
    HeraProjectGroupDao projectGroupDao;

    @Autowired
    HeraProjectGroupUserDao groupUserDao;

    @Autowired
    HeraProjectGroupAppDao projectGroupAppDao;

    @Autowired
    HeraBaseInfoDao heraBaseInfoDao;

    public Result create(HeraProjectGroupDataRequest request){

        Integer parentGroupId = request.getParentGroupId();
        if(parentGroupId != -1){
            List<HeraProjectGroupModel> heraProjectGroupModels = projectGroupDao.listByIds(Lists.newArrayList(parentGroupId), request.getType(), null,null);
            if(heraProjectGroupModels != null && heraProjectGroupModels.size() < 1){
                return Result.fail(-1,"there is no data  which project group  id is "+parentGroupId);
            }
        }

        HeraProjectGroupModel projectGroup = new HeraProjectGroupModel();
        projectGroup.setRelationObjectId(request.getRelationObjectId());
        projectGroup.setType(request.getType());
        List<HeraProjectGroupModel> search = projectGroupDao.search(projectGroup, null, null);
        if(!CollectionUtils.isEmpty(search)){
            Result<Object> fail = Result.fail(-1, "the data relationObjectId: " + request.getRelationObjectId() + " has exist!  projectGroupId:" + search.get(0).getId() + "parentGroupId:" + search.get(0).getParentGroupId());
            //将projectGroupId直接放到data上
            fail.setData(search.get(0).getId());
            return fail;
        }

        HeraProjectGroup group = new HeraProjectGroup();
        BeanUtils.copyProperties(request,group);
        Integer groupId = projectGroupDao.create(group);

        if(!CollectionUtils.isEmpty(request.getUsers())){
            List<HeraProjectGroupUser> toCreateUsers = new ArrayList<>();
            request.getUsers().forEach(t -> {
                HeraProjectGroupUser user = new HeraProjectGroupUser();
                user.setProjectGroupId(groupId);
                user.setUser(t);
                user.setStatus(0);
                user.setCreateTime(new Date());
                user.setUpdateTime(new Date());
                toCreateUsers.add(user);
            });

            groupUserDao.batchInsert(toCreateUsers);
        }

        if(!CollectionUtils.isEmpty(request.getApps())){

            List<HeraProjectGroupApp> toCreateApps = new ArrayList<>();
            for(HeraProjectGroupAppRequest app : request.getApps()){
                if(app.getAppId() == null || app.getPlatFormType() == null){
                    log.error("create project group param app is error! request:{}",request.toString());
                    continue;
                }

                Integer baseInfoId = heraBaseInfoDao.idByBindIdsAndPlat(String.valueOf(app.getAppId()), app.getPlatFormType());
                HeraProjectGroupApp groupApp = new HeraProjectGroupApp();
                groupApp.setProjectGroupId(groupId);
                groupApp.setAppBaseInfoId(baseInfoId);
                groupApp.setStatus(0);
                groupApp.setCreateTime(new Date());
                groupApp.setUpdateTime(new Date());
                toCreateApps.add(groupApp);
            }

            projectGroupAppDao.batchInsert(toCreateApps);
        }

        return Result.success(groupId);

    }

    public Re


/*
Copyright (c) Meta Platforms, Inc. and affiliates.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
#pragma once

#include <string>
#include <vector>

#include "thirdparty/nlohmann/json.hpp"

namespace dipcc {

enum class Power {
  NONE,
  AUSTRIA,
  ENGLAND,
  FRANCE,
  GERMANY,
  ITALY,
  RUSSIA,
  TURKEY,
};
enum class PowerOrAll {
  NONE,
  AUSTRIA,
  ENGLAND,
  FRANCE,
  GERMANY,
  ITALY,
  RUSSIA,
  TURKEY,
  ALL,
};

static constexpr int NUM_POWERS = 7;
const Power POWERS[NUM_POWERS] = {Power::AUSTRIA, Power::ENGLAND, Power::FRANCE,
                                  Power::GERMANY, Power::ITALY,   Power::RUSSIA,
                                  Power::TURKEY};
static constexpr int NUM_POWERS_OR_ALL = 8;
const PowerOrAll POWERS_OR_ALL[NUM_POWERS_OR_ALL] = {
    PowerOrAll::AUSTRIA, PowerOrAll::ENGLAND, PowerOrAll::FRANCE,
    PowerOrAll::GERMANY, PowerOrAll::ITALY,   PowerOrAll::RUSSIA,
    PowerOrAll::TURKEY,  PowerOrAll::ALL};

const std::vector<std::string> POWERS_STR{
    "AUSTRIA", "ENGLAND", "FRANCE", "GERMANY", "ITALY", "RUSSIA", "TURKEY",
};
const std::vector<std::string> POWERS_OR_ALL_STR{
    "AUSTRIA", "ENGLAND", "FRANCE", "GERMANY",
    "ITALY",   "RUSSIA",  "TURKEY", "ALL",
};

std::string power_str(const Power &power);
std::string power_or_all_str(const PowerOrAll &power_or_all);
Power power_from_str(const std::string &s);
PowerOrAll power_or_all_from_str(const std::string &s);

NLOHMANN_JSON_SERIALIZE_ENUM(Power, {{Power::AUSTRIA, "AUSTRIA"},
                                     {Power::ENGLAND, "ENGLAND"},
                                     {Power::FRANCE, "FRANCE"},
                                     {Power::GERMANY, "GERMANY"},
                                     {Power::ITALY, "ITALY"},
                                     {Power::RUSSIA, "RUSSIA"},
                                     {Power::TURKEY, "TURKEY"}})

NLOHMANN_JSON_SERIALIZE_ENUM(PowerOrAll, {{PowerOrAll::AUSTRIA, "AUSTRIA"},
                                          {PowerOrAll::ENGLAND, "ENGLAND"},
                                          {PowerOrAll::FRANCE, "FRANCE"},
                                          {PowerOrAll::GERMANY, "GERMANY"},
                                          {PowerOrAll::ITALY, "ITALY"},
                                          {PowerOrAll::RUSSIA, "RUSSIA"},
                                          {PowerOrAll::TURKEY, "TURKEY"},
                                          {PowerOrAll::ALL, "ALL"}})

} // namespace dipcc


_all_details">Show all details</button> / <button id="hide_all_details">Hide all details</button>

          Result
          Test
          Duration
          Links

    <div id="data-container" data-jsonblob="{"environment": {"Python": "3.13.7", "Platform": "macOS-15.6.1-arm64-arm-64bit-Mach-O", "Packages": {"pytest": "7.2.2", "pluggy": "1.6.0"}, "Plugins": {"asyncio": "0.23.8", "html": "4.1.1", "xdist": "3.8.0", "mock": "3.15.0", "json-report": "1.5.0", "metadata": "3.1.1", "anyio": "4.10.0", "Faker": "37.6.0", "tavern": "2.17.0", "cov": "7.0.0"}}, "tests": {"test_content_update.py::TestContentUpdate::test_update_single_slide_content_success": [{"extras": [], "result": "Passed", "testId": "test_content_update.py::TestContentUpdate::test_update_single_slide_content_success", "duration": "23 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">test_content_update.py::TestContentUpdate::test_update_single_slide_content_success</td>", "<td class=\"col-duration\">23 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "test_content_update.py::TestContentUpdate::test_update_slide_with_invalid_slide_number": [{"extras": [], "result": "Passed", "testId": "test_content_update.py::TestContentUpdate::test_update_slide_with_invalid_slide_number", "duration": "1 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">test_content_update.py::TestContentUpdate::test_update_slide_with_invalid_slide_number</td>", "<td class=\"col-duration\">1 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "test_content_update.py::TestContentUpdate::test_update_slide_preserves_other_fields": [{"extras": [], "result": "Passed", "testId": "test


    color: #fff;
}

#topnav li#nav1 a:hover {
    background-position: -200px -33px;
}

#topnav li#nav5 a:hover {
    background-position: -476px -33px;
}

#google_ad_header {
    width: 728px;
    height: 90px;
    margin: 5px auto 17px;
    border: 1px solid #909;
}

#page {
    background-color: #000;
    text-align: left;
    min-height: 640px;
    margin: 0;
    padding: 19px 0;
    border: 1px solid #688FD3;
    vertical-align: top;
    -moz-box-shadow: 0 0 15px #81a3e2;
    -webkit-box-shadow: 0 0 15px #81a3e2;
    box-shadow: 0 0 15px #81a3e2;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
}

#subnav ul {
    display: block;
    border: 1px solid #43577b;
    height: 32px;
    margin: 0 18px 20px 20px;
    padding: 0;
    background: -moz-linear-gradient(90deg, hsl(218, 20%, 10%) 0%, hsl(218, 15%, 24%) 60%, hsl(218, 15%, 30%) 60%, hsl(218, 15%, 51%) 100%) #000;
    background: -webkit-gradient(linear, left bottom, left top, from(hsl(218, 15%, 10%)), color-stop(0.6, hsl(218, 15%, 24%)), color-stop(0.6, hsl(218, 15%, 32%)), to(hsl(218, 15%, 25%))) #000;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#334455', endColorstr='#000000', GradientType=0);
        /* IE6-9 */
    _background: #345 url('../chrome/button_bkgd.jpg') repeat-x;
}

#subnav a.active {
    color: #fff;
}

#subnav ul li {
    float: left;
    padding: 0;
    text-align: left;
    list-style-type: none;
}

#subnav ul li a {
    display: inline;
    padding: 0 10px;
    line-height: 32px;
    color: #ec0;
    font-weight: bold;
}

#subnav ul li a:hover {
    background: none;
    color: #ffec00;
}

body #subnav ul {
    display: none;
}

body#home #subnav .nav_dashboard,
body#friendsmanager .nav_dashboard,
body#groupsmanager .nav_dashboard,
body#awardsmanager .nav_dashboard,
body#collectionsmanager .nav_dashboard,
body#everyones #subnav .nav_games,
body#members #subnav .nav_members,
body#creators #subnav .nav_creators {
    display: block;
}

#content {
    display: inline;
    float: left;
    margin: 0 10px 20px 20px;
    width: 570px;
}

#admin #content {
    width: 745px;
    margin: 0 10px 20px 20px;
}

#sidebar {
    display: inline;
    float: left;
    width: 302px;
    padding: 0;
    margin: 0 0 20px 20px;
}

#sidebar h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

#footer {
    clear: both;
    margin: 25px 20px 0 20px !important;
}

.advert {
    font-family: Verdana, Helvetica, arial, sans-serif;
    font-size: 11px;
}

#bottomnav {
    margin: 0 auto -40px


    if (b is BoxDecoration) return BoxDecoration.lerp(this, b, t);
    return super.lerpTo(b, t) as BoxDecoration?;
  }

  /// Linearly interpolate between two box decorations.
  ///
  /// Interpolates each parameter of the box decoration separately.
  ///
  /// The [shape] is not interpolated. To interpolate the shape, consider using
  /// a [ShapeDecoration] with different border shapes.
  ///
  /// If both values are null, this returns null. Otherwise, it returns a
  /// non-null value. If one of the values is null, then the result is obtained
  /// by applying [scale] to the other value. If neither value is null and `t ==
  /// 0.0`, then `a` is returned unmodified; if `t == 1.0` then `b` is returned
  /// unmodified. Otherwise, the values are computed by interpolating the
  /// properties appropriately.
  ///
  /// {@macro dart.ui.shadow.lerp}
  ///
  /// See also:
  ///
  ///  * [Decoration.lerp], which can interpolate between any two types of
  ///    [Decoration]s, not just [BoxDecoration]s.
  ///  * [lerpFrom] and [lerpTo], which are used to implement [Decoration.lerp]
  ///    and which use [BoxDecoration.lerp] when interpolating two
  ///    [BoxDecoration]s or a [BoxDecoration] to or from null.
  static BoxDecoration? lerp(BoxDecoration? a, BoxDecoration? b, double t) {
    if (a == null && b == null) {
      return null;
    }
    if (a == null) {
      return b!.scale(t);
    }
    if (b == null) {
      return a.scale(1.0 - t);
    }
    if (t == 0.0) {
      return a;
    }
    if (t == 1.0) {
      return b;
    }
    return BoxDecoration(
      color: Color.lerp(a.color, b.color, t),
      image: t < 0.5 ? a.image : b.image, // TODO(ianh): cross-fade the image
      border: BoxBorder.lerp(a.border, b.border, t),
      borderRadius: BorderRadiusGeometry.lerp(
        a.borderRadius,
        b.borderRadius,
        t,
      ),
      boxShadow: BoxShadow.lerpList(
        a.boxShadow as List<BoxShadow>,
        b.boxShadow as List<BoxShadow>,
        t,
      ),
      gradient: Gradient.lerp(a.gradient, b.gradient, t),
      shape: t < 0.5 ? a.shape : b.shape,
    );
  }

  @override
  BoxPainter createBoxPainter([VoidCallback? onChanged]) {
    assert(onChanged != null || image == null);
    return _InsetBoxDecorationPainter(this, onChanged);
  }
}

/// An object that paints a [BoxDecoration] or an [InsetBoxDecoration] into a canvas.
class _InsetBoxDecorationPainter extends BoxPainter {
  _InsetBoxDecorationPainter(
    this._decoration,
    VoidCallback? onChanged,
  ) : super(onChanged);

  final BoxDecoration _decoration;

  Paint? _cachedBackgroundPaint;
  Rect? _rectForCachedBackgroundPaint;
  Paint _getBackgroundPaint(Rect rect, TextDirection? textDirection) {
    assert(
        _decoration.gradient != null || _rectForCachedBackgroundPaint == null);

    if (_cachedBackgroundPaint == null ||
        (_decoration.gradient != null &&
            _rectForCachedBackgroundPaint != rect)) {
      final Paint paint = Paint();
      if (_decoration.backgroundBlendMode != null) {
        paint.blendMode = _decoration.backgroundBlendMode!;
      }
      if (_decoration.color != null) paint.color = _decoration.color!;
      if (_decoration.gradient != null) {
        paint.shader =


ted events
    final listener = track.createListener()
      ..on<InternalTrackMuteUpdatedEvent>((event) => _onTrackMuteUpdatedEvent(event));
    // dispose listener when the track is disposed
    track.onDispose(() => listener.dispose());
  }

  void _onTrackMuteUpdatedEvent(InternalTrackMuteUpdatedEvent event) {
    // send signal to server (if mute initiated by local user)
    if (event.shouldSendSignal) {
      logger.fine(
          '${this} Sending mute signal... sid:${sid}, muted:${event.muted}');
      participant.room.engine.signalClient.sendMuteTrack(sid, event.muted);
    }
    _metadataMuted = event.muted;
    // emit events
    final newEvent = event.muted
        ? TrackMutedEvent(participant: participant, publication: this)
        : TrackUnmutedEvent(participant: participant, publication: this);
    [participant.events, participant.room.events].emit(newEvent);
  }

  @override
  String toString() => '${runtimeType}(sid: ${sid}, source: ${source})';
}
// Copyright 2024 LiveKit, Inc.
//
// 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.

import '../support/disposable.dart';
import 'websocket/io.dart' if (dart.library.js_interop) 'websocket/web.dart';

class WebSocketException implements Exception {
  final String message;
  final dynamic error;
  const WebSocketException(this.message, [this.error]);
}

typedef WebSocketOnData = Function(dynamic data);
typedef WebSocketOnError = Function(dynamic error);
typedef WebSocketOnDispose = Function();

class WebSocketEventHandlers {
  final WebSocketOnData? onData;
  final WebSocketOnError? onError;
  final WebSocketOnDispose? onDispose;

  const WebSocketEventHandlers({
    this.onData,
    this.onError,
    this.onDispose,
  });
}

typedef WebSocketConnector = Future<LiveKitWebSocket> Function(Uri uri,
    [WebSocketEventHandlers? options]);

abstract class LiveKitWebSocket extends Disposable {
  void send(List<int> data);

  static Future<LiveKitWebSocket> connect(Uri uri,
          [WebSocketEventHandlers? options]) =>
      lkWebSocketConnect(uri, options);
}
// Copyright 2024 LiveKit, Inc.
//
// 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.

import 'platform/io.dart' if (dart.library.js_interop) 'platform/web.dart';

// Returns the current platform which works for both web and devices.
PlatformType lkPlatform() => lkPlatformImplementation();

bool lkPlatformIs(PlatformType type) => lkPlatform() == type;

bool lkPlatformIsMobile() =>
    [PlatformType.iOS, PlatformType.android].contains(lkPlatform());

bool lkPlatformIsWebMobile() => lk


): Isaac Gym comand line arguments. If None get_args() will be called. Defaults to None.
            train_cfg (Dict, optional): Training config file. If None 'name' will be used to get the config file. Defaults to None.
            log_root (str, optional): Logging directory for Tensorboard. Set to 'None' to avoid logging (at test time for example).
                                      Logs will be saved in <log_root>/<date_time>_<run_name>. Defaults to "default"=<path_to_LEGGED_GYM>/logs/<experiment_name>.

        Raises:
            ValueError: Error if neither 'name' or 'train_cfg' are provided
            Warning: If both 'name' or 'train_cfg' are provided 'name' is ignored

        Returns:
            PPO: The created algorithm
            Dict: the corresponding config file
        """
        # if no args passed get command line arguments
        if args is None:
            args = get_args()
        # if config files are passed use them, otherwise load from the name
        if train_cfg is None:
            if name is None:
                raise ValueError("Either 'name' or 'train_cfg' must be not None")
            # load config files
            _, train_cfg = self.get_cfgs(name)
        else:
            if name is not None:
                print(f"'train_cfg' provided -> Ignoring 'name={name}'")
        # override cfg from args (if specified)
        _, train_cfg = update_cfg_from_args(None, train_cfg, args)

        if log_root == "default":
            log_root = os.path.join(LEGGED_GYM_ROOT_DIR, 'logs', train_cfg.runner.experiment_name)
            log_dir = os.path.join(log_root, datetime.now().strftime('%b%d_%H-%M-%S') + '_' + train_cfg.runner.run_name)
        elif log_root is None:
            log_dir = None
        else:
            log_dir = os.path.join(log_root, datetime.now().strftime('%b%d_%H-%M-%S') + '_' + train_cfg.runner.run_name)

        train_cfg_dict = class_to_dict(train_cfg)
        runner = runner_class(env, train_cfg_dict, log_dir, device=args.rl_device)
        # save resume path before creating a new log_dir
        resume = train_cfg.runner.resume
        if resume:
            try:
                # load previously trained model
                resume_path = get_load_path(log_root,
                    load_run=train_cfg.runner.load_run, checkpoint=train_cfg.runner.checkpoint)
                print(f"Loading model from: {resume_path}")
                runner.load(resume_path)
            except:
                print(f"Loading model failed!!!")
        return runner, train_cfg

# make global task registry
task_registry = TaskRegistry()


    push    r9
    push    r8
    push    rdi
    push    rsi
    push    rbp
    push    rbx
    push    rdx
    push    rcx
    push    rax

    mov     rdi, rsp
    call    x86_trap_handler

    pop     rax
    pop     rcx
    pop     rdx
    pop     rbx
    pop     rbp
    pop     rsi
    pop     rdi
    pop     r8
    pop     r9
    pop     r10
    pop     r11
    pop     r12
    pop     r13
    pop     r14
    pop     r15

    test    byte ptr [rsp + 3 * 8], 3   # swap GS back if return to user space
    jz      2f
    swapgs
2:
    add     rsp, 16                     # pop vector, error_code
    iretq

.section .rodata
.global trap_handler_table
trap_handler_table:
.set i, 0
.rept NUM_INT
    DEF_TABLE_ENTRY %i
    .set i, i + 1
.endr


 //          group to design your FaceShape.
        // TODO #3: Ensure at least one shape is filled with the
        //          FaceShape's tone Color property. (Requirement A2!)
        let temp: Text = new Text("PS05: Emoji!");
        temp.textAnchor = "middle";
        temp.fill = this.tone;
        shapes.add(temp);

        return shapes;
    }

}

// TODO: Eye class

// TODO: Mouth class

// TODO: Emoji classimport Phaser from "phaser";
import ProgressBar from "../objects/ProgressBar";

// 也可以使用这样方式，就不用提示用this.addImage
import phaserLogo from "../assets/images/phaser-logo.png";

export default class extends Phaser.Scene {
  private progressBar: ProgressBar;

  constructor() {
    super({ key: 'PreloadScene' });
  }

  preload() {
    this.addProgressBar();

    // 加载图片方法一 import  缺点，头部一大堆的import
    this.load.image("phaser-logo-i", phaserLogo);
    // 加载图片方法二 require, 缺点, 文件夹下不被使用的图片，也会被打包
    this.addImage(`phaser-logo`, 'phaser-logo.png');

    for (let i = 0; i < 10; i++) {
      this.addImage(`phaser-logo-${i + 1}`, 'phaser-logo.png');
    }
  }

  addImage(key: string | Phaser.Types.Loader.FileTypes.ImageFileConfig | Phaser.Types.Loader.FileTypes.ImageFileConfig[], url?: string | string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject) {
    if (!Array.isArray(url)) {
      return this.load.image(key, require(`../assets/images/${url}`), xhrSettings);
    }

    url.forEach(u => {
      this.load.image(key, require(`../assets/images/${u}`), xhrSettings);
    });
  }

  addProgressBar() {
    console.time("preload-time");
    this.progressBar = new ProgressBar(this);

    this.load.on('progress', value => {
      this.progressBar.setProgress(value);
    });

    this.load.on('fileprogress', file => {
      this.progressBar.setFileProgress(file.key);
    });

    this.load.on('complete', () => {
      this.progressBar.destroy();
      console.timeEnd("preload-time");
      this.scene.start('MainScene');
    });
  }

  create() {
    /**
     * This is how you would dynamically import the mainScene class (with code splitting),
     * add the mainScene to the Scene Manager
     * and start the scene.
     * The name of the chunk would be 'mainScene.chunk.js
     * Find more about code splitting here: https://webpack.js.org/guides/code-splitting/
     */
    // let someCondition = true
    // if (someCondition)
    //   import(/* webpackChunkName: "mainScene" */ './mainScene').then(mainScene => {
    //     this.scene.add('MainScene', mainScene.default, true)
    //   })
    // else console.log('The mainScene class will not even be loaded by the browser');
  }
}
/* eslint-disable */
export function debounce(fn: Function, delay: number) {
  if (typeof fn !== 'function') {
    // 参数类型为函数
    throw new TypeError('fn is not a function');
  }
  let timer: number | null; // 维护一个 timer
  return function () {
    let args = arguments;
    if (timer) {
      clearTimeout(timer);
    }
    // @ts-ignore
    timer = setTimeout( ()=> {
      // @ts-ignore
      fn.apply(this, args); // 用apply指向调用debounce的对象，相当于_this.fn(args);
    }, delay);
  };
}

export function throttle(fn: Function, delay: number) {
  if (typeof fn !== 'function') {
    // 参数类


         .into_iter()
                .collect();

            assert_eq!(
                result,
                // This result is found by just running the same code through TeX.
                // We want to ensure that the dimensions are literally the exact
                // same as what TeX gives.
                "2877216447828127431Aa Gg Zz3276800Aa Gg Zz2752512Aa Gg Zz\n"
            );
        },
    );
}

/// This test ensures that we pass the stage #3 goals.
#[test]
fn it_parses_vertical_boxes() {
    with_parser(
        &[
            r"a\par",
            r"b\vskip1pt",
            r"\indent c\par",
            r"\noindent d\par",
            r"\hbox{e}",
            r"\setbox0=\vbox{",
            r"    \indent f\par",
            r"    g\vskip1pt",
            r"    \indent h\par",
            r"    \noindent i\par",
            r"    \hbox{j}",
            r"}",
            r"\noindent \number\ht0 \number\dp0 \par",
            r"\box0",
            r"\end",
        ],
        |parser| {
            let result: String = parser
                .parse_outer_vertical_box()
                .to_chars()
                .into_iter()
                .collect();

            assert_eq!(
                result,
                " a
 b
 c
d
e
3666375127431
 f
 g
 h
i
j

"
            );
        },
    );
}

/// This test ensure that we pass the stage #4 goals.
#[test]
fn it_matches_real_tex_output() {
    let dvitest_contents = include_str!("../examples/dvitest.tex");
    let lines = dvitest_contents.split('\n').collect::<Vec<&str>>();

    let mut file_writer = DVIFileWriter::new();
    file_writer.start(
        (25400000, 473628672),
        1000,
        b"Made by XymosTeX".to_vec(),
    );

    with_parser(&lines[..], |parser| {
        let page = parser.parse_outer_vertical_box();
        file_writer.add_page(&page.list, &None, [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
    });

    file_writer.end();

    let test_file = file_writer.to_file();
    let test_pages = interpret_dvi_file(test_file);

    let real_dvi: &[u8] = include_bytes!("../examples/dvitest.dvi");
    let real_file = DVIFile::new(real_dvi).unwrap();
    let real_pages = interpret_dvi_file(real_file);

    assert_eq!(test_pages, real_pages);
}
<gh_stars>100-1000
use std::convert::Infallible;
use std::fmt::Display;
use std::fmt::Formatter;

use nom;
use serde_json;

#[derive(Debug)]
pub struct Error(pub ErrorKind);

impl Error {
    pub fn new(kind: ErrorKind) -> Error {
        Error(kind)
    }
}

fn error_kind_msg(kind: &ErrorKind) -> String {
    match kind {
        ErrorKind::JsonError(err) => {
            format!("Error parsing incoming JSON context {}", err)
        },

        ErrorKind::YamlError(err) => {
            format!("Error parsing incoming YAML context {}", err)
        },

        ErrorKind::FormatError(fmt) => {
            format!("Formatting error when writing {}", fmt)
        },

        ErrorKind


0,N)});var Le=Se(0),Ae=[Le,Le],De=L?0:1,Pe=_?0:1,ge=0,Fe=0,ce=0,Ze=0,ct,pt,Wt,st,lt;function Gt(cn,yn){if(cn!==void 0){var Mn=me(cn);return Mn[0]=Math.round(Mn[0]),Mn[1]=Math.round(Mn[1]),Mn[2]=Math.round(Mn[2]),ge+=yn,Fe+=Mn[0]*yn,ce+=Mn[1]*yn,Ze+=Mn[2]*yn,Mn}return[0,0,0,0]}function Nt(cn,yn,Mn,Ba){var la=cn[Mn.bin0];if(la===void 0)return Gt(void 0,1);var ma=cn[Mn.bin1],Wa=yn[Mn.bin0],Fa=yn[Mn.bin1],Wo=ma-la||0,da=Wa-la||0,Wn;return ma===void 0?Fa===void 0?Wn=0:Wa===void 0?Wn=2*(Fa-la):Wn=(2*Fa-Wa-la)*2/3:Fa===void 0?Wa===void 0?Wn=0:Wn=(2*la-ma-Wa)*2/3:Wa===void 0?Wn=(2*Fa-ma-la)*2/3:Wn=Fa+la-ma-Wa,Gt(la+Mn.frac*Wo+Ba.frac*(da+Mn.frac*Wn))}if(G!=="default"){var $t=0,sr;try{sr=new Uint8Array(oe*_e*4)}catch(cn){sr=new Array(oe*_e*4)}if(G==="smooth"){var wr=x||d,ur=b||v,Qe=new Array(wr.length),Et=new Array(ur.length),er=new Array(H),Ut=x?j_e:H_e,Ft=b?j_e:H_e,bt,yt,Yt;for(z=0;z<wr.length;z++)Qe[z]=Math.round(i.c2p(wr[z])-k);for(z=0;z<ur.length;z++)Et[z]=Math.round(a.c2p(ur[z])-P);for(z=0;z<H;z++)er[z]=Ut(z,Qe);for(O=0;O<N;O++)for(bt=Ft(O,Et),yt=h[bt.bin0],Yt=h[bt.bin1],z=0;z<H;z++,$t+=4)lt=Nt(yt,Yt,er[z],bt),W_e(sr,$t,lt)}else for(O=0;O<E;O++)for(st=h[O],Ae=Se(O),z=0;z<A;z++)lt=Gt(st[z],1),$t=(Ae*A+ie(z))*4,W_e(sr,$t,lt);var lr=ke.createImageData(oe,_e);try{lr.data.set(sr)}catch(cn){var Tr=lr.data,Rr=Tr.length;for(O=0;O<Rr;O++)Tr[O]=sr[O]}ke.putImageData(lr,0,0)}else{var ei=Math.floor(c/2),Wr=Math.floor(f/2);for(O=0;O<E;O++)if(st=h[O],Ae.reverse(),Ae[Pe]=Se(O+1),!(Ae[0]===Ae[1]||Ae[0]===void 0||Ae[1]===void 0))for(pt=ie(0),ct=[pt,pt],z=0;z<A;z++)ct.reverse(),ct[De]=ie(z+1),!(ct[0]===ct[1]||ct[0]===void 0||ct[1]===void 0)&&(Wt=st[z],lt=Gt(Wt,(ct[1]-ct[0])*(Ae[1]-Ae[0])),ke.fillStyle="rgba("+lt.join(",")+")",ke.fillRect(ct[0]+ei,Ae[0]


cc	%icc,%l0
	subcc	%g6,TRAP_TAKEN,%g0
	tne	T_BAD_TRAP
	subcc	%g5,TRAP_TAKEN,%g0
	tne	T_BAD_TRAP

    	ta	T_CHANGE_PRIV
!$EV error(0,expr(@VA(.MAIN.RS1_ce_wrpr1),16,16),1,IRF, CE,2,x, x,x,x, x,x,x)
	EXPECT_ERR_ASI(IRF_CE_BIT_2, IRF_CE_W0_L0)
	add	%g0,5,%l0
	add	%g0,1,PRIV_TRAP_REG ! let handler know priv trap expected
	nop
	nop
	nop
RS1_ce_wrpr1:
	wrpr	%l0,%l1,%cansave    ! error status reg contains PRIV bit
	rdpr	%cansave,%i0
	cmp	%l0,%i0
	tne	T_BAD_TRAP
	subcc	%g5,TRAP_TAKEN,%g0
	tne	T_BAD_TRAP
	add	%g0,0,PRIV_TRAP_REG
    	ta	T_CHANGE_NONPRIV

	!*************************************************
	! Misc ops and the ECC bits themselves being wrong
	!*************************************************
	ta	T_CHANGE_PRIV
!$EV error(0,expr(@VA(.MAIN.RS1_ce_wrpr2),16,16),1,IRF, CE,064,x, x,x,x, x,x,x)
	EXPECT_ERR_ASI(IRF_CE_BIT_64, IRF_CE_W0_L0)
	add	%g0,5,%l0
	add	%g0,1,PRIV_TRAP_REG ! let handler know priv trap expected
	nop
	nop
	nop
	nop
RS1_ce_wrpr2:
	wrpr	%l0,%l1,%cansave
	rdpr	%cansave,%i0
	cmp	%l0,%i0
	tne	T_BAD_TRAP
	subcc	%g5,TRAP_TAKEN,%g0
	tne	T_BAD_TRAP
    	ta	T_CHANGE_NONPRIV
	add	%g0,0,PRIV_TRAP_REG

!$EV error(0,expr(@VA(.MAIN.RS1_ce_wr),16,16),1,IRF, CE,065,x, x,x,x, x,x,x)
	EXPECT_ERR_ASI(IRF_CE_BIT_65, IRF_CE_W0_I1)
RS1_ce_wr:
	wr	%i1,%l1,%y
	rd	%y,%l0
	subcc	%i1,%l0,%g0
	tne	T_BAD_TRAP
	subcc	%g5,TRAP_TAKEN,%g0
	tne	T_BAD_TRAP

!$EV error(0,expr(@VA(.MAIN.RS1_ce_save),16,16),1,IRF, CE,066,x, x,x,x, x,x,x)
	EXPECT_ERR_ASI(IRF_CE_BIT_66, IRF_CE_GL0_G1)
	mova	%icc,%l5,%g1
	mova	%icc,%l2,%g2
	add	%l5,%l2,%l0
	nop
	nop
RS1_ce_save:
	save	%g1,%g2,%g3
	restore %g0,%g0,%g0
    	cmp	%l0,%g3
	tne	T_BAD_TRAP
	subcc	%g5,TRAP_TAKEN,%g0
	tne	T_BAD_TRAP

!$EV error(0,expr


; i++) {
        if ( ! cidIsRequest(i) &&
             TIMER_RUNNING(timers_[i]) ) {
            TIMER_COUNTDOWN(timers_[i]);
        }
    }

    TIMER_TICK( timeout_timer_ );
}

void GSwifi::dump () {
    // GSLOG_PRINT(P("joined_:"));            GSLOG_PRINTLN(joined_);
    // GSLOG_PRINT(P("did_timeout_:"));       GSLOG_PRINTLN(did_timeout_);
    // GSLOG_PRINT(P("gs_response_lines_:")); GSLOG_PRINTLN(gs_response_lines_);
    // GSLOG_PRINT(P("gs_mode_:"));           GSLOG_PRINTLN(gs_mode_);
    // GSLOG_PRINT(P("timeout_timer_:"));     GSLOG_PRINTLN(timeout_timer_);
    // for (uint8_t i=0; i<GS_MAX_ROUTES; i++) {
    //     GSLOG_PRINTLN(routes_[i].method);
    //     GSLOG_PRINTLN(routes_[i].path);
    // }
}
/*---------------------------------------------------------------------------------------------------------------------------------------------------
 * IRFeedbackLED.hpp - Arduino extensions for IR feedback LED handling
 *
 * Copyright (c) 2020-2021 Armin Joachimsmeyer
 *
 * This file is part of IRMP https://github.com/IRMP-org/IRMP.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *---------------------------------------------------------------------------------------------------------------------------------------------------
 */

#ifndef _IR_FEEDBACK_LED_HPP
#define _IR_FEEDBACK_LED_HPP

#if defined(ARDUINO)

#include "IRFeedbackLED.h"

#if defined(NO_LED_FEEDBACK_CODE)
// dummy void function in this case
void irmp_irsnd_LEDFeedback(bool aEnableBlinkLed)
{
    (void)aEnableBlinkLed;
}
#else // defined(NO_LED_FEEDBACK_CODE)

static bool irmp_irsnd_LedFeedbackEnabled;

#if defined(IRMP_IRSND_ALLOW_DYNAMIC_PINS)
// global variable to hold feedback led pin number. Set to 0 to not activating feedback LED by default.
uint_fast8_t irmp_irsnd_LedFeedbackPin = 0;
#  if defined(FEEDBACK_LED_IS_ACTIVE_LOW)
bool irmp_irsnd_LedFeedbackPinIsActiveLow = true; // global variable to hold feedback led polarity.
#  else
bool irmp_irsnd_LedFeedbackPinIsActiveLow = false; // global variable to hold feedback led polarity.
#  endif
#endif

/*
 * Enable/disable echoing the input signal to the built in (or specified) LED.
 */
void irmp_irsnd_LEDFeedback(bool aEnableBlinkLed)
{
#if defined(IRMP_FEEDBACK_LED_PIN) || defined(IRMP_IRSND_ALLOW_DYNAMIC_PINS)
    irmp_irsnd_LedFeedbackEnabled = aEnableBlinkLed;
    if (aEnableBlinkLed)
    {
#  if defined(IRMP_IRSND_ALLOW_DYNAMIC_PINS)
        pinMode(irmp_irsnd_LedFeedbackPin, OUTPUT);
        if (irmp_irsnd_LedFeedbackPinIsActiveLow)
        {
            digitalWrite(irmp_irsnd_LedFeedbackPin, HIGH);
        }
        else
        {
            digitalWrite(irmp_irsnd_LedFeedbackPin, LOW);
        }

#  elif defined(IRMP_FEEDBACK_LED_PIN)
        pinModeFast(IRMP_FEEDBACK_LED


vw r0, r5, r3
/* 8018A858 001864B8  7F 64 07 35 */	extsh. r4, r27
/* 8018A85C 001864BC  7C 00 19 D6 */	mullw r0, r0, r3
/* 8018A860 001864C0  7C 00 28 50 */	subf r0, r0, r5
/* 8018A864 001864C4  54 05 06 3E */	clrlwi r5, r0, 0x18
/* 8018A868 001864C8  41 82 00 54 */	beq lbl_8018A8BC
/* 8018A86C 001864CC  1C 78 00 64 */	mulli r3, r24, 0x64
/* 8018A870 001864D0  38 00 00 FF */	li r0, 0xff
/* 8018A874 001864D4  7C 03 03 D6 */	divw r0, r3, r0
/* 8018A878 001864D8  7C 04 02 14 */	add r0, r4, r0
/* 8018A87C 001864DC  7C 00 28 00 */	cmpw r0, r5
/* 8018A880 001864E0  40 81 00 3C */	ble lbl_8018A8BC
/* 8018A884 001864E4  38 A0 00 00 */	li r5, 0
/* 8018A888 001864E8  38 60 00 00 */	li r3, 0
/* 8018A88C 001864EC  48 00 00 1C */	b lbl_8018A8A8
lbl_8018A890:
/* 8018A890 001864F0  54 A0 15 BA */	rlwinm r0, r5, 2, 0x16, 0x1d
/* 8018A894 001864F4  7C 93 00 2E */	lwzx r4, r19, r0
/* 8018A898 001864F8  2C 04 00 00 */	cmpwi r4, 0
/* 8018A89C 001864FC  41 82 00 08 */	beq lbl_8018A8A4
/* 8018A8A0 00186500  98 64 08 4C */	stb r3, 0x84c(r4)
lbl_8018A8A4:
/* 8018A8A4 00186504  38 A5 00 01 */	addi r5, r5, 1
lbl_8018A8A8:
/* 8018A8A8 00186508  54 A0 06 3E */	clrlwi r0, r5, 0x18
/* 8018A8AC 0018650C  7C 00 A0 00 */	cmpw r0, r20
/* 8018A8B0 00186510  41 80 FF E0 */	blt lbl_8018A890
/* 8018A8B4 00186514  38 60 00 01 */	li r3, 1
/* 8018A8B8 00186518  48 00 00 08 */	b lbl_8018A8C0
lbl_8018A8BC:
/* 8018A8BC 0018651C  38 60 00 00 */	li r3, 0
lbl_8018A8C0:
/* 8018A8C0 00186520  39 61 0B A0 */	addi r11, r1, 0xba0
/* 8018A8C4 00186524  48 03 C8 7D */	bl __restore_gpr
/* 8018A8C8 00186528  80 01 0B A4 */	lwz r0, 0xba4(r1)
/* 8018A8CC 0018652C  7C 08 03 A6 */	mtlr r0
/* 8018A8D0 00186530  38 21 0B A0 */	addi r1, r1, 0xba0
/* 8018A8D4 00186534  4E 80 00 20 */	blr

.global func_8018A8D8
func_8018A8D8:
/* 8018A8D8 00186538  2C 03 00 00


.Log("Traffic stopped")
				verifyNoPacketLoss(t, ate, allFlows)
			})

			statePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp()
			nbrPath := statePath.Neighbor(ateDst.IPv4)
			t.Logf("VerifyBGPNOTEstablished")
			t.Log("Waiting for BGP neighbor to Not be in Established state after applying ACL DENY policy..")
			_, ok := gnmi.Watch(t, dut, nbrPath.SessionState().State(), 2*time.Minute, func(val *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState]) bool {
				currState, ok := val.Val()
				return ok && currState != oc.Bgp_Neighbor_SessionState_ESTABLISHED
			}).Await(t)
			if !ok {
				fptest.LogQuery(t, "BGP reported state", nbrPath.State(), gnmi.Get(t, dut, nbrPath.State()))
				t.Errorf("BGP session did not go Down as expected")
			}

			t.Log("Wait till LLGR/Stale timer expires to delete long live routes.....")
			time.Sleep(time.Second * grRestartTime)
			time.Sleep(time.Second * grStaleRouteTime)

			t.Run("VerifyTrafficFailureAfterGRexpired", func(t *testing.T) {
				t.Log("Send Traffic Again after GR timer has expired. This traffic should fail!")
				sendTraffic(t, ate, allFlows, trafficDuration)
				confirmPacketLoss(t, ate, allFlows)
			})

			t.Logf("RemoveAclInterface")
			t.Log("Removing Acl on the interface to restore BGP GR. Traffic should now pass!")
			gnmi.Replace(t, dut, gnmi.OC().Acl().AclSet(aclName, oc.Acl_ACL_TYPE_ACL_IPV4).Config(), configAdmitAllACL(d, aclName))
			aclPath := configACLInterface(t, iFace, ifName)
			gnmi.Replace(t, dut, aclPath.Config(), iFace)

			t.Logf("VerifyBGPEstablished")
			t.Logf("Waiting for BGP neighbor to establish...")
			_, ok = gnmi.Watch(t, dut, nbrPath.SessionState().State(), 2*time.Minute, func(val *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState]) bool {
				currState, ok := val.Val()
				return ok && currState == oc.Bgp_Neighbor_SessionState_ESTABLISHED
			}).Await(t)
			if !ok {
				fptest.LogQuery(t, "BGP reported state", nbrPath.State(), gnmi.Get(t, dut, nbrPath.State()))
				t.Errorf("BGP session not Established as expected")
			}

			t.Run("VerifyTrafficPassBGPRestored", func(t *testing.T) {
				status := gnmi.Get(t, dut, nbrPath.SessionState().State())
				if want := oc.Bgp_Neighbor_SessionState_ESTABLISHED; status != want {
					t.Errorf("Get(BGP peer %s status): got %d, want %d", ateDst.IPv4, status, want)
				}
				sendTraffic(t, ate, allFlows, trafficDuration)
				verifyNoPacketLoss(t, ate, allFlows)
			})
		})
		bgpClearConfig(t, dut)
	}
}
// Copyright 2023 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
//
//


}
            self.amt += n as u64;

            // Unlike above, we don't handle `WouldBlock` specially, because
            // that would play into the logic mentioned above (tracking read
            // rates and write rates), so we just ferry along that error for
            // now.
            let m = (&*self.writer).write(&buffer[..n])?;
            assert_eq!(n, m);
        }
    }
}

fn other(desc: &str) -> io::Error {
    io::Error::new(io::ErrorKind::Other, desc)
}

enum UrlHost {
    Name(Name, u16),
    Addr(SocketAddr),
}

// Extracts the name and port from addr_buf and returns them, converting
// the name to the form that the trust-dns client can use. If the original
// name can be parsed as an IP address, makes a SocketAddr from that
// address and the port and returns it; we skip DNS resolution in that
// case.
fn name_port(addr_buf: &[u8]) -> io::Result<UrlHost> {
    // The last two bytes of the buffer are the port, and the other parts of it
    // are the hostname.
    let hostname = &addr_buf[..addr_buf.len() - 2];
    let hostname = str::from_utf8(hostname).map_err(|_e| {
        other("hostname buffer provided was not valid utf-8")
    })?;
    let pos = addr_buf.len() - 2;
    let port = ((addr_buf[pos] as u16) << 8) | (addr_buf[pos + 1] as u16);

    if let Ok(ip) = hostname.parse() {
        return Ok(UrlHost::Addr(SocketAddr::new(ip, port)))
    }
    let name = Name::parse(hostname, Some(&Name::root())).map_err(|e| {
        io::Error::new(io::ErrorKind::Other, e.to_string())
    })?;
    Ok(UrlHost::Name(name, port))
}

// Extracts the first IP address from the response.
fn get_addr(response: Message, port: u16) -> io::Result<SocketAddr> {
    if response.get_response_code() != ResponseCode::NoError {
        return Err(other("resolution failed"));
    }
    let addr = response.get_answers().iter().filter_map(|ans| {
        match *ans.get_rdata() {
            RData::A(addr) => Some(IpAddr::V4(addr)),
            RData::AAAA(addr) => Some(IpAddr::V6(addr)),
            _ => None,
        }
    }).next();

    match addr {
        Some(addr) => Ok(SocketAddr::new(addr, port)),
        None => Err(other("no address records in response")),
    }
}

// Various constants associated with the SOCKS protocol

pub mod v5 {
    pub const VERSION: u8 = 5;

    pub const METH_NO_AUTH: u8 = 0;
    pub const METH_GSSAPI: u8 = 1;
    pub const METH_USER_PASS: u8 = 2;

    pub const CMD_CONNECT: u8 = 1;
    pub const CMD_BIND: u8 = 2;
    pub const CMD_UDP_ASSOCIATE: u8 = 3;

    pub const ATYP_IPV4: u8 = 1;
    pub const ATYP_IPV6: u8 = 4;
    pub const ATYP_DOMAIN: u8 = 3;
}

pub mod v4 {
    pub const VERSION: u8 = 4;

    pub const CMD_CONNECT: u8 = 1;
    pub const CMD_BIND: u8 = 2;
}
pub const SUBINCLUDE: &str = file!();
<reponame>fengjixuchui/blazefox
/* Copyright 2018 Mozilla Foundation
 *
 * 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
 *


ue)
    }

var JComboBox<*>.listDataListenerList: EventListenerList?
    get() {
        val model = this.model
        val listenerListField = model.getFieldDeeply("listenerList")
        return listenerListField.get(model) as EventListenerList
    }
    set(value) {
        val model = this.model
        val listenerListField = model.getFieldDeeply("listenerList")
        listenerListField.set(model, value)
    }

fun <E> JComboBox<E>.withAllListenerDisabled(action: JComboBox<E>.() -> Unit) {
    val listDataListenerListCopy = listDataListenerList
    val itemListenerListCopy = itemListenerList
    val propertyChangeListenerListCopy = propertyChangeListenerList
    val isEditableCopy = isEditable
    listDataListenerList = EventListenerList()
    itemListenerList = EventListenerList()
    propertyChangeListenerList = null
    action.invoke(this)
    listDataListenerList = listDataListenerListCopy
    itemListenerList = itemListenerListCopy
    propertyChangeListenerList = propertyChangeListenerListCopy
    isEditable = isEditableCopy
}

fun <T> List<T>.contentEquals(target: List<T>): Boolean {
    if (this.size != target.size) {
        return false
    }
    for (i in this.indices) {
        if (this[i] != target[i]) {
            return false
        }
    }
    return true
}

open class DefaultListDataListener: ListDataListener {
    override fun intervalAdded(e: ListDataEvent) {
        // do nothing
    }

    override fun intervalRemoved(e: ListDataEvent) {
        // do nothing
    }

    override fun contentsChanged(e: ListDataEvent) {
        // do nothing
    }

}package me.gegenbauer.catspy.utils.file

import me.gegenbauer.catspy.glog.GLog
import org.w3c.dom.Document
import org.w3c.dom.Element
import org.w3c.dom.Node
import org.w3c.dom.NodeList
import org.xml.sax.InputSource
import java.io.StringReader
import java.io.StringWriter
import javax.xml.parsers.DocumentBuilderFactory
import javax.xml.transform.OutputKeys
import javax.xml.transform.TransformerFactory
import javax.xml.transform.dom.DOMSource
import javax.xml.transform.stream.StreamResult

class XMLFileManager : KeyValuesFileManager() {

    override val fileExtension: String = FILE_EXTENSION

    @Suppress("UNCHECKED_CAST")
    override fun deserialize(raw: String): Map<String, Any?> {
        val resultMap = HashMap<String, Any>()
        if (raw.isEmpty()) return resultMap

        // Create a DocumentBuilderFactory
        val factory = DocumentBuilderFactory.newInstance()
        factory.isNamespaceAware = true

        // Create a DocumentBuilder
        val builder = factory.newDocumentBuilder()

        // Parse the XML string into a Document
        val document: Document = builder.parse(InputSource(StringReader(raw)))

        // Normalize the XML structure
        document.documentElement.normalize()

        // Get the root element
        val root: Element = document.documentElement

        // Traverse the document and extract elements into the map
        val nodeList: NodeList = root.childNodes
        for (i in 0 until nodeList.length) {
            val node: Node = nodeList.item(i)
            if (node.nodeType == Node.ELEMENT_NODE) {
                val element = node as Element
                val tagName = element.tagName
                if (!isValidXmlKey(tagName)) continue
                val textContent = element.textContent

                if (resultMap.containsKey(tagName)) {
                    val existingValue = resultMap[tagName]


Fackel 8 Säcke Korn aus Fernhain verbrennt."}},
[11914] = {"Das Geheimnis hüten", nil, {"Bibliothekarin Serrah im Transitusschild möchte, dass Ihr arkane Schlangen in der Nähe des Nexus tötet und 5 Nexusmanaessenzen sammelt."}},
[11915] = {"Spiel mit dem Feuer", nil, {"Sprecht mit einem Feuerschluckmeister in einer der Hauptstädte."}},
[11916] = {"Höllschreis Champion", nil, {"Geht nach Taunka'le und sucht Häuptling Orkan auf."}},
[11917] = {"Zurückschlagen", nil, nil},
[11918] = {"Grundausbildung", nil, {"Raelorasz im Transitusschild möchte, dass Ihr 10 Spruchwirker von Kaltarra tötet."}},
[11919] = {"Drachenjagd", nil, {"Raelorasz möchte, dass Ihr mithilfe von Raelorasz' Speer ein Nexusdrachenjunges bändigt und es anschließend zu ihm zurückbringt. Er befindet sich im Transitusschild."}},
[11920] = {"Kultisten unter uns", nil, {"Sprecht mit Kapitän \"Linksdatsch\" Gaffelsegel an Deck der Sturmbrecher in der Valianzfeste."}},
[11921] = {"Noch einmal Fackeln werfen", nil, {"Gewinnt das Fackelwurfspiel und sprecht anschließend mit dem Feuerschluckmeister."}},
[11922] = {"Fackelwurf", nil, {"Gewinnt das Fackelwurfspiel und sprecht anschließend mit dem Feuerschluckmeister des Sonnenwendfests."}},
[11923] = {"Fackeln fangen", nil, {"Fangt nacheinander 4 Fackeln und sprecht anschließend mit dem Feuerschluckmeister."}},
[11924] = {"Noch einmal Fackeln fangen", nil, {"Fangt nacheinander 10 Fackeln und sprecht anschließend mit dem Feuerschluckmeister."}},
[11925] = {"Noch einmal Fackeln fangen", nil, {"Fangt nacheinander 10 Fackeln und sprecht anschließend mit dem Feuerschluckmeister."}},
[11926] = {"Noch einmal Fackeln werfen", nil, {"Gewinnt das Fackelwurfspiel und sprecht anschließend mit dem Feuerschluckmeister."}},
[11927] = {"Man munkelt", nil, {"Geht zum Gasthaus in der Valianzfeste und sucht Leryssa auf."}},
[11928] = {"Fernhain", nil, {"Reist nach Fernhain in der boreanischen Tundra und sprecht mit Gerald Grün."}},
[11929] = {"Taunka'les Untergang", nil, {"Sprecht mit Mutter Tauranook außerhalb von Taunka'le."}},
[11930] = {"Quer durch Transborea", nil, {"Eskortiert die Evakuierten aus Taunka'le durch die Transborea bis zu Wartuk Eiskind in der Drachenöde."}},
[11931] = {"Den Code entziffern", nil, {"Raelorasz im Transitusschild möchte, dass Ihr den azurblauen Kodex von Inquisitor Caleras besorgt und 3 schimmernde Runen seiner Zauberbindern von Kaltarra besorgt."}},
[11932] = {"Feiglinge und Dummköpfe", nil, {"Sprecht mit Ataika in Kaskala nordöstlich der Valianzfeste."}},
[11933] = {"Raubt die Flamme der Exodar", nil, {"Bringt die Flamme der Exodar zum Geschichtenerzähler."}},
[11935] =


r3}
	mov r8, r3
	pop {r4, r5, r6, r7}
	pop {r0}
	bx r0
	.align 2, 0
_0200723C: .4byte gUnknown_020203D4

	thumb_func_start sub_02007240
sub_02007240: @ 0x02007240
	push {r4, r5, r6, lr}
	adds r4, r0, #0
	ldr r1, _02007268 @ =gUnknown_03003330
	ldrb r2, [r1, #0xf]
	movs r3, #0x10
	adds r0, r3, #0
	ands r0, r2
	adds r6, r1, #0
	cmp r0, #0
	beq _02007256
	b _02007396
_02007256:
	ldr r0, _0200726C @ =gUnknown_0300152E
	ldrb r0, [r0]
	cmp r0, #0
	bne _02007270
	adds r0, r4, #0
	bl sub_02000ed4
	b _02007396
	.align 2, 0
_02007268: .4byte gUnknown_03003330
_0200726C: .4byte gUnknown_0300152E
_02007270:
	ldrb r1, [r4, #0x1b]
	lsls r0, r1, #3
	adds r0, r0, r1
	lsls r0, r0, #2
	ldr r1, _020072A0 @ =gUnknown_03004400
	adds r5, r0, r1
	movs r0, #0x80
	ands r0, r2
	lsls r0, r0, #0x18
	lsrs r0, r0, #0x18
	cmp r0, #0
	beq _0200728A
	b _02007384
_0200728A:
	strb r0, [r4, #0x17]
	ldrb r0, [r5, #7]
	movs r1, #0x78
	ands r1, r0
	cmp r1, #0x10
	beq _020072B8
	cmp r1, #0x10
	bgt _020072A4
	cmp r1, #8
	beq _020072C6
	b _020072AC
	.align 2, 0
_020072A0: .4byte gUnknown_03004400
_020072A4:
	cmp r1, #0x20
	beq _020072B4
	cmp r1, #0x40
	beq _020072B0
_020072AC:
	movs r1, #0
	b _0200730C
_020072B0:
	movs r1, #1
	b _0200730C
_020072B4:
	movs r1, #2
	b _0200730C
_020072B8:
	ldr r0, [r6, #8]
	ands r0, r3
	movs r1, #4
	cmp r0, #0
	beq _0200730C
	movs r1, #3
	b _0200730C
_020072C6:
	ldr r0, _020072DC @ =gUnknown_03001510
	ldr r0, [r0]
	ldrb r0, [r0, #0x17]
	cmp r0, #0x3d
	bne _020072E0
	movs r0, #0x1e
	ldrsb r0, [r5, r0]
	cmp r0, #0
	bne _020072FE
	b _020072FC
	.align 2, 0
_