vec.addAll(insidePoints(sw, ne, maxPoints).values());
        return vec;
    }

    /**
     * Query all samples within a given distance
     * @param loc A location
     * @param distance A distance, in meters
     * @param maxPoints Maximum number of samples to return
     * @return Samples lying in the circle centered in loc and radius of distance, together with their locations
     */
    @SuppressWarnings("unchecked")
    public LinkedHashMap<LocationType, T> pointsWithin(LocationType loc, double distance, int maxPoints) {
        double[] pivot = loc.getOffsetFrom(center);
        double[] coord = loc.getOffsetFrom(center);

        if (roundCoordinates) {
            coord[0] = Math.round(coord[0]);
            coord[1] = Math.round(coord[1]);
        }
        Vector<Pair<double[], Object>> points = data.nearestNPoints(coord, maxPoints);
        LinkedHashMap<LocationType, T> ret = new LinkedHashMap<>();
        for (Pair<double[], Object> p : points) {
            double dist = Point2D.distance(pivot[0], pivot[1], p.first[0], p.first[1]);
            if (dist < distance) {
                LocationType l = new LocationType(center);
                l.translatePosition(p.first);
                l.convertToAbsoluteLatLonDepth();
                ret.put(l, (T)p.second);
            }
        }
        return ret;
    }

    /**
     * Return N nearest samples of given location
     * @param numberOfPoints The maximum number of samples to return
     * @param loc The location where to search from
     * @return N samples which are closest to given location, together with their actual locations
     */
    @SuppressWarnings("unchecked")
    public LinkedHashMap<LocationType, T> nearestNPoints(int numberOfPoints, LocationType loc) {

        Vector<Pair<double[], Object>> res = data.nearestNPoints(loc.getOffsetFrom(center), numberOfPoints);
        LinkedHashMap<LocationType, T> ret = new LinkedHashMap<>();
        for (Pair<double[], Object> pair : res) {
            LocationType l = new LocationType(center);
            l.translatePosition(pair.first);
            ret.put(l, (T)pair.second);
        }
        return ret;
    }

    public static void main(String[] args) {

        Random r = new Random(System.currentTimeMillis());
        GeoCollection.Double col = new GeoCollection.Double();
        long start = System.currentTimeMillis();
        for (double i = 0; i < 1000000; i++) {
            double val = 40.5 + r.nextDouble();
            col.add(new LocationType(val, r.nextDouble()-8.5), val * 10);
        }
        System.out.println("Insertion took "+(System.currentTimeMillis()-start)+" milliseconds");
        start = System.currentTimeMillis();
        System.out.println(col.valueAt(new LocationType(41.23, -8)));
        System.out.println("Calculation took "+(System.currentTimeMillis()-start)+" milliseconds");

        GeoCollection.VectorialDouble col2 = new GeoCollection.VectorialDouble();
        start = System.currentTimeMillis();
        for (double i = 0; i < 1E6; i++) {
            double val = 40.5 + r.nextDouble();
            double val1 = 0.5 + 0.3 * r.nextDouble();
            double val2 = 90 + 90 * r.nextDouble();
            Vector<java.lang.Double> vals = new Vector<java.lang.Double>();
            vals.add(val1);
            vals.add(val2);
            col2.add(new LocationType(val, r.nextDouble()-8.5), vals);
        }
        System.out.println("Insertion took "+(System.currentTimeMilli


进行面对面的社交活动，减少上网时间。我们在下面的全球 API 流量图表上标注了常见的节假日和促销活动。请注意，在黑色星期五和网络星期一期间，当人们在线购物时，流量会在+10%的水平左右达到高峰，但在圣诞节和元旦期间，流量出现下降。

这种模式与我们在常规 HTTP 流量中观察到的模式非常相似。显然，API 不再是专属于自动化过程的领域，而是与人类行为和社会趋势密切相关。

建议

全面的 API 安全并没有万能的解决方案。为了达到最佳效果，Cloudflare 推荐四种策略来改善 API 的安全态势：

通过统一的控制平面将 API 应用开发、可见性、性能和安全性结合起来，维护一个最新的 API 清单。

通过利用机器学习技术的安全工具，释放人力资源并减少成本。

采用正面安全模式来保护 API（参见下文有关正面和负面安全模式的解释）。

随着时间的推移，衡量并改善组织的 API 成熟度级别（参见下文关于 API 成熟度级别的解释）。

我们所说的“正面”或“负面”安全模式是什么意思？在负面模式中，安全工具寻找已知的攻击迹象并采取行动阻止这些攻击。在正面模式中，安全工具寻找已知的合法请求并只允许这些请求通过，阻止所有其他请求。API 通常采取结构化方式，采用正面安全模式以达到最高级别的安全性合情合理。您也可以结合使用不同的安全模式，比如以负面模式使用 WAF（Web 应用程序防火墙），并以正面模式使用 API 模式验证。

这里


local _, addonTbl = ...
local L = addonTbl.API:NewLocale("BigWigs: Common", "zhCN")
if not L then return end

-- Prototype.lua common words
L.you = "你：%s"
L.you_icon = "|T13700%2$d:0|t你：%1$s"
L.underyou = "%s在你脚下"
L.aboveyou = "%s在你面前"
L.other = "%s：%s"
L.onboss = "首领：%s"
L.buff_boss = "首领增益：%s"
L.buff_other = "%s获得增益：%s"
L.magic_buff_boss = "首领魔法增益: %s" -- Magic buff on BOSS: SPELL_NAME
L.magic_buff_other = "%s获得魔法增益: %s" -- Magic buff on NPC_NAME: SPELL_NAME
L.on = "%s：%s"
L.stack = "%3$s：%1$d层%2$s" -- "5x SPELL_NAME on PLAYER_OR_NPC" showing how many stacks of a buff/debuff are on a player or NPC
L.stackyou = "你：%d层%s" -- "5x SPELL_NAME on YOU" showing how many stacks of a buff/debuff are on you
L.stackboss = "首领：%d层%s" -- "5x SPELL_NAME on BOSS" showing how many stacks of a buff/debuff are on the boss
L.stack_gained = "获得 %d层" -- "Gained 5x" for situations where we show how many stacks of a buff were gained since last time a message showed
L.cast = "<施放：%s>"
L.casting = "正在施放：%s"
L.soon = "即将：%s"
L.count = "%s（%d）"
L.count_amount = "%s（%d/%d）"
L.count_icon = "%s（%d|T13700%d:0|t）"
L.count_rticon = "%s（%d{rt%d}）"
L.rticon = "%s（{rt%d}）"
L.near = "%s在你附近"
L.on_group = "队伍：%s" -- spell on group
L.boss = "首领"
L.plus = "%s + %s" -- Spell 1 + Spell 2
L.extra = "%s（%s）" -- SPELL_NAME (short spell name or extra information)

L.phase = "阶段：%d"
L.stage = "阶段：%d"
L.wave = "第%d波" -- e.g. "Wave 1" (Waves of adds)
L.wave_count = "第%d波，共%d波" -- Wave 1 of 3 (Usually waves of adds)
L.normal = "普通模式"
L.heroic = "英雄模式"
L.mythic = "史诗模式"
L.hard = "困难模式"
L.active = "激活" -- When a boss becomes active, after speech finishes
L.ready = "就绪" -- When a player is ready to do something
L.dead = "死亡" -- When a player is dead
L.general = "通用" -- General settings, i.e. things that apply to normal, heroic and mythic mode.
L.health = "血量" -- The health of an NPC
L.health_percent = "%d%% 血量" -- "10% Health" The health percentage of an NPC
L.energy = "能量"
L.energy_percent = "%d%% 能量" -- "80% Energy" The energy percentage of an NPC
L.door_open = "开门" -- When a door is open, usually after a speech from an NPC
L.gate_open = "开门" -- When a gate is open, usually after a speech f


ik abspielen
                    sound_manager.set_volume(0.5)  # Lautstärke auf Standard zurücksetzen
                    player = Player(50, screen_height - 100 - player_size, player_size, speed, gravity, ui)
                    obstacles = ObstacleManager(screen_width, player_size, obstacle_speed, ui)
                    score = 0
                    active = True

        if active:
            score += obstacles.move_obstacles(active)

            if obstacles.check_collision(player.get_rect()):
                sound_manager.stop_music()  # Musik stoppen
                sound_manager.play_death_sound()  # Tod-Sound abspielen
                print("Kollision erkannt, stoppe Musik")  # Debugging
                if score > highscore_value:
                    highscore_value = score
                    save_highscore(highscore_value, ui)
                active = False
                # Beim Spielende zurück zur Hauptmusik
                print("Spiel vorbei: Zurück zur Hauptmusik (nguu.ogg)")  # Debugging
                sound_manager.play_music("nguu.ogg", volume=0.5)  # Hauptmusik zurücksetzen
                sound_manager.set_volume(0.5)  # Lautstärke zurück auf Standard

            if score >= last_speed_increase + 10:
                obstacles.speed += 0.5
                last_speed_increase = score

        screen.blit(player.image, (player.x, player.y - player_size))
        ui.manager.draw_ui(screen)

        pygame.display.flip()
        await asyncio.sleep(0)

    pygame.quit()

# Nur ausführen, wenn direkt gestartet
if __name__ == "__main__":
    asyncio.run(main())


  );
    const relationshipB = await Friend.findOneAndRemove(
        { requester: req.body.UserB, receiver: req.body.UserA },
    );
    await User.findOneAndUpdate(
        { _id: req.body.UserA },
        { $pull: { friends: relationshipA._id } }
    )
    await User.findOneAndUpdate(
        { _id: req.body.UserB },
        { $pull: { friends: relationshipB._id } }
    )
    res.status(200).send("friend reject");
});

router.post('/all', async (req, res) => {
    let friendslist = req.body.array;
    let docfriends = await Friend.find(
        { '_id': { $in: friendslist } })
        .populate('receiver', '_id username email info')
        .populate('requester', '_id username email info');
    res.json(docfriends);
});

router.post('/find', async (req, res) => {
    let relationship = await Friend.findOne(
        {requester: req.body.UserA , receiver: req.body.UserB}
    );
    if(!relationship){
        relationship = await Friend.findOne(
            {requester: req.body.UserB , receiver: req.body.UserA}
        );
    }
   res.json(relationship);
});

export { router };import { Request, Response } from 'express'
import { Symptom } from './symptom.model'
import mongoose from 'mongoose'

import * as helpers from '../../helpers'
import * as _ from 'lodash'

export const addSymptom = async (req: Request, res: Response) => {
   const { data: symptom } = req.body

   if (_.isEmpty(symptom)) res.status(400).json('Unble to Proccess Request')

   symptom.date = helpers.stringToDate(symptom.date)

   try {
      const newSymptom = new Symptom({
         author: {
            uid: req.user?.uid,
            displayName: req.user?.displayName
         },
         symptom
      })
      const savedSymptom = await newSymptom.save()
      res.json({
         symptom: savedSymptom.sanitizeObject(),
         message: 'Symptom Added Successfully'
      })
   } catch (err) {
      console.log(err.stack)
      res.status(500).json('There was an error while adding symptom')
   }
}

export const getSymptoms = async (req: Request, res: Response) => {
   const { startAt, endAt } = req.query
   const { timezone } = req.user
   if (!startAt || !endAt)
      return res.status(400).json('Unable To Proccess Request')

   try {
      const start = helpers.getStartDayDate(startAt as string, timezone)
      const end = helpers.getEndDayDate(endAt as string, timezone)

      const symptoms = await Symptom.aggregate([
         {
            $match: {
               $and: [
                  {
                     'symptom.date': { $gte: start, $lte: end }
                  },
                  { 'author.uid': req.user?.uid }
               ]
            }
         },
         { $sort: { 'symptom.date': 1 } },
         {
            $group: {
               _id: {
                  $dateToString: {
                     format: '%d/%m/%Y',
                     date: '$symptom.date',
                     timezone: req.user.timezone
                  }
               },
               symptoms: { $push: { symptom: '$symptom', id: '$_id' } }
            }
         },
         { $sort: { 'symptoms.symptom.date': -1 } }
      ])

      return res.json(symptoms)
   } catch (err) {
      console


_not_found))
                findNavController().popBackStack()
            }
        } catch (e: Exception) {
            Logger.e("Failed to load asset data", e)
            ToastUtils.error(getString(R.string.asset_load_failed))
            findNavController().popBackStack()
        }
    }

    /**
     * 设置新资产的默认值
     */
    private fun setupNewAsset() {
        currentAsset = AssetsModel().apply {
            type = AssetsType.NORMAL
            currency = Currency.CNY
        }

        // 设置默认UI显示
        binding.assetTypeAutoComplete.setText(getString(R.string.type_normal), false)
        binding.currencyAutoComplete.setText(Currency.CNY.name(requireContext()), false)
    }

    /**
     * 处理图标选择
     */
    private fun onIconSelected(icon: AssetsModel) {
        selectedIcon = icon
        binding.selectedIconImageView.setAssetIcon(icon)
        binding.assetNameInputLayout.editText?.setText(icon.name)
    }

    /**
     * 根据资产类型更新图标列表
     */
    private fun updateIconsByAssetType() {
        // 直接根据资产类型过滤图标
        filteredIcons = allIcons.filter { it.type == currentAsset.type }
        iconAdapter.updateItems(filteredIcons)

        // 如果当前选中的图标不在过滤后的列表中，选择第一个可用图标
        if (selectedIcon != null && !filteredIcons.contains(selectedIcon)) {
            selectedIcon = null
        }

        // 设置默认选中第一个图标
        if (filteredIcons.isNotEmpty() && selectedIcon == null) {
            onIconSelected(filteredIcons.first())
        }
    }

    /**
     * 执行搜索（带防抖）
     */
    private fun performSearch(query: String) {
        searchJob?.cancel()

        if (query.isEmpty()) {
            // 搜索为空时，显示根据资产类型过滤的图标
            iconAdapter.updateItems(filteredIcons)
            return
        }

        searchJob = launch {
            delay(300) // 防抖延迟

            // 在已过滤的图标中进行搜索
            val searchResults = filteredIcons.filter { icon ->
                icon.name.contains(query, ignoreCase = true)
            }

            iconAdapter.replaceItems(searchResults)
        }
    }

    /**
     * 保存资产
     */
    private fun saveAsset() {
        val assetName = binding.assetNameEditText.text?.toString()?.trim()

        // 验证输入
        if (assetName.isNullOrEmpty()) {
            ToastUtils.error(getString(R.string.asset_name_empty))
            return
        }

        if (selectedIcon == null) {
            ToastUtils.error(getString(R.string.asset_icon_empty))
            return
        }

        // 更新资产信息
        currentAsset.apply {
            name = assetName
            icon = selectedIcon?.icon ?: ""
        }

        // 保存资产
        lifecycleScope.launch {
            try {
                val savedId = AssetsAPI.save(currentAsset)
                if (savedId > 0) {
                    ToastUtils.info(getString(R.string.save_asset_success))
                    findNavController().popBackStack()
                } else {
                    ToastUtils.error(getString(R.string.save_failed))
                }
            } catch (e: Exception) {
                Logger.e("Failed to sav


。
- **额外过滤**：移除含马赛克或模糊人脸的图像（避免隐私问题并提升鲁棒性）。

---

##### **阶段7：均衡多尺度训练（Balanced Multi-Scale Training）**

- **多分辨率训练**：联合训练640×640与1328×1328像素图像。
- **严格分辨率阈值问题**：若强制1328p分辨率，会损失大量数据并扭曲分布。
- **解决方案**：
  - 设计**层级分类系统**（受WordNet启发），按类别保留最高质量、最具美学价值的图像。
  - 采用**专门的重采样策略**，平衡文本渲染数据的长尾分布（低频字符问题）。
  - 通过多尺度训练，模型在适应高分辨率输入的同时，保留先前学习的通用知识，确保稳定收敛，提升细节生成能力且不牺牲泛化性。

---

我们继续翻译 **3.3 数据标注（Data Annotation）** 与 **3.4 数据合成（Data Synthesis）** 的完整内容。

---

### **3.3 数据标注（Data Annotation）**

在我们的数据标注流水线中，我们使用一个强大的图像字幕生成器（如 Qwen2.5-VL），不仅生成全面的图像描述，还同时生成**结构化元数据**，用于捕获图像的关键属性与质量信息。

与传统方法将字幕生成与元数据提取视为两个独立任务不同，我们设计了一个统一的标注框架，使得字幕生成器**在一次前向过程中**即可完成以下任务：

- **生成详细图像描述**（自然语言形式）
- **提取结构化元数据**（JSON格式）

#### **标注框架细节**

- **字幕生成要求**：
  1. 使用自然、描述性语言，不使用结构化格式或富文本。
  2. 丰富细节：包括物体属性、物体间视觉关系、环境背景。
  3. **识别并引用图像中可见的文本**，用引号标注，**不进行翻译或解释**。
  4. 保持真实性与准确性，避免泛泛而谈。

- **结构化元数据提取**：
  1. **图像类型识别**：根据来源与用途返回图像类型。
  2. **图像风格识别**：根据整体视觉特征返回风格描述。
  3. **水印检测**：以列表形式返回检测到的水印。
  4. **异常元素检测**：检查是否存在影响观看的元素（如二维码、马赛克等），返回“是/否”。

#### **示例输出格式（JSON）**

```json
{
  "Caption": "A vintage wooden table supports an antique typewriter...",
  "Imag


import org.http4k.connect.kafka.schemaregistry.SchemaRegistryMoshi.auto
import org.http4k.connect.kafka.schemaregistry.action.PostedSchema
import org.http4k.connect.kafka.schemaregistry.action.RegisteredSchemaVersion
import org.http4k.connect.kafka.schemaregistry.model.SchemaId
import org.http4k.connect.kafka.schemaregistry.model.Subject
import org.http4k.connect.kafka.schemaregistry.model.Version
import org.http4k.connect.storage.Storage
import org.http4k.core.Body
import org.http4k.core.ContentType
import org.http4k.core.Method.POST
import org.http4k.core.Request
import org.http4k.core.Response
import org.http4k.core.SCHEMA_REGISTRY
import org.http4k.core.Status.Companion.NOT_FOUND
import org.http4k.core.Status.Companion.OK
import org.http4k.core.with
import org.http4k.lens.Path
import org.http4k.routing.bind
import kotlin.math.absoluteValue

fun checkSchemaRegistered(schemas: Storage<Schema>, mode: SchemaRegistrationMode) = "/subjects/{subject}" bind POST to
    { req: Request ->
        val subject = Path.of("subject")(req)

        val posted = Body.auto<PostedSchema>().toLens()(req).schema

        when (schemas.keySet().firstOrNull { schemas[it] == posted }) {
            null -> when (mode) {
                auto -> {
                    schemas["$subject:${posted.toString().hashCode()}"] = posted
                    ok(subject, posted)
                }

                manual -> Response(NOT_FOUND)
            }

            else -> ok(subject, posted)
        }
    }

private fun ok(subject: String, schema: Schema) =
    Response(OK).with(
        Body.auto<RegisteredSchemaVersion>(contentType = ContentType.SCHEMA_REGISTRY)
            .toLens() of RegisteredSchemaVersion(
            Subject.of(subject),
            SchemaId.of(schema.toString().hashCode().absoluteValue),
            Version.of(schema.toString().hashCode().absoluteValue),
            schema
        )
    )
package org.http4k.connect.plugin

import com.google.devtools.ksp.getAllSuperTypes
import com.google.devtools.ksp.symbol.KSAnnotated
import com.google.devtools.ksp.symbol.KSClassDeclaration
import com.google.devtools.ksp.symbol.KSNode
import com.google.devtools.ksp.symbol.KSType
import com.google.devtools.ksp.symbol.KSTypeReference
import com.google.devtools.ksp.visitor.KSEmptyVisitor
import com.squareup.kotlinpoet.FileSpec
import com.squareup.kotlinpoet.ksp.toClassName
import com.squareup.kotlinpoet.ksp.toTypeName
import java.util.Locale
import java.util.Locale.ROOT

class Http4kConnectApiClientVisitor(private val log: (Any?) -> Unit) :
    KSEmptyVisitor<List<KSAnnotated>, List<FileSpec>>() {
    override fun visitClassDeclaration(classDeclaration: KSClassDeclaration, data: List<KSAnnotated>) =
        classDeclaration.http4kConnectActionTypes.map(KSTypeReference::resolve).map {
            log(
                "Processing http4k-connect adapter: " + classDeclaration.simpleName.asString() +
                    " with action type: $it"
            )
            FileSpec.builder(
                it.declaration.packageName.asString(),
                classDeclaration.simpleName.asString().lowercase(ROOT) + "Extensions"
            )
                .apply {
                    data.filterForActionsOf(it)
                        .flatMap { it.accept(Http4kConnectActionVisitor(log), classDeclaration) }


.vol=0;a.m=0;a.monitor=0;a.t2=0;a.t3=0;a.t4=0;a.cl=0;",frame_eqs_str:"a.vol=8*a.bass+5*a.mid+3*a.treb;a.m=.97*a.m+.08*a.vol;a.monitor=a.vol;a.beat=above(a.vol,a.res)*above(a.vol,a.m)*above(a.vol,16);a.diff=(1-a.beat)*a.diff+a.beat*(a.vol-a.res);a.res=a.beat*(a.vol+.04*a.m)+(1-a.beat)*(a.res-div(60*(.1+.02*a.diff),a.fps));a.res=Math.max(0,a.res);a.b=a.beat;a.g=1-a.beat;",point_eqs_str:"a.tt3=.6*a.tt3+1*a.value1;a.tt2=.7*a.tt2+.2*a.tt3;a.tt1=.8*a.tt1+.1*a.tt2;a.d=.9*a.d+.2*a.tt1;a.y=.5+a.d*a.sample*(1-a.sample)*4;a.x=-.05+1.1*a.sample;"},{baseVals:{enabled:0}},{baseVals:{enabled:0}},{baseVals:{enabled:0}}],init_eqs_str:"a.x1=.9;a.y1=.5;a.x2=.5;a.y2=.5;a.x3=.5;a.y3=.5;a.x4=.5;a.y4=.5;",frame_eqs_str:"a.wave_a=0;a.zoom=.996;a.warp=.18-.15*(a.bass-a.treb);",pixel_eqs_str:"",pixel_eqs:"",warp:" shader_body { \n  vec2 uv1_1;\n  vec3 ret_2;\n  ret_2.yz = (texture (sampler_main, uv).xyz - 0.08).yz;\n  vec2 tmpvar_3;\n  tmpvar_3 = (texsize.zw * 4.0);\n  vec3 tmpvar_4;\n  tmpvar_4 = (((texture (sampler_blur1, \n    (uv + (vec2(1.0, 0.0) * tmpvar_3))\n  ).xyz * scale1) + bias1) - ((texture (sampler_blur1, \n    (uv - (vec2(1.0, 0.0) * tmpvar_3))\n  ).xyz * scale1) + bias1));\n  vec3 tmpvar_5;\n  tmpvar_5 = (((texture (sampler_blur1, \n    (uv + (vec2(0.0, 1.0) * tmpvar_3))\n  ).xyz * scale1) + bias1) - ((texture (sampler_blur1, \n    (uv - (vec2(0.0, 1.0) * tmpvar_3))\n  ).xyz * scale1) + bias1));\n  vec2 tmpvar_6;\n  tmpvar_6.x = tmpvar_4.x;\n  tmpvar_6.y = tmpvar_5.x;\n  uv1_1 = (uv + (tmpvar_3 * (tmpvar_6 * 0.4)));\n  ret_2.x = texture (sampler_fc_main, uv1_1).x;\n  ret_2.x = (ret_2.x - ((\n    (((texture (sampler_blur1, uv1_1).xyz * scale1) + bias1).x - ret_2.x)\n   * 0.05) + 0.004));\n  vec2 tmpvar_7;\n  tmpvar_7.x = tmpvar_4.x;\n  tmpvar_7.y = tmpvar_5.x;\n  vec2 tmpvar_8;\n  tmpvar_8.x = tmpvar_4.z;\n  tmpvar_8.y = tmpvar_5.z;\n  ret_2.z = (max ((\n    sq


8_result, lte_64_success_result};
use utils::{
    test_from_file, test_from_file_custom_prelude, test_from_file_self_contained,
    test_from_files_with_lhs_termname,
};

#[test]
fn test_iadds() {
    test_from_file_custom_prelude(
        "./tests/code/selfcontained/simple_prelude.isle",
        "./tests/code/selfcontained/simple_iadd.isle",
        lte_64_success_result(),
    );

    test_from_file_custom_prelude(
        "./tests/code/selfcontained/simple_prelude.isle",
        "./tests/code/selfcontained/iadd_to_sub.isle",
        lte_64_success_result(),
    );
}

#[test]
fn test_implicit_conversions() {
    test_from_file_custom_prelude(
        "./tests/code/selfcontained/prelude.isle",
        "./tests/code/selfcontained/simple_iadd_implicit_conv.isle",
        lte_64_success_result(),
    );

    test_from_file_custom_prelude(
        "./tests/code/selfcontained/prelude.isle",
        "./tests/code/selfcontained/iadd_to_sub_implicit_conv.isle",
        lte_64_success_result(),
    );
}

#[test]
fn test_iadd_from_file() {
    test_from_file("./examples/iadd.isle", lte_64_success_result())
}

#[test]
fn test_chained_iadd_from_file() {
    test_from_file(
        "./examples/iadd-two-rule-chain.isle",
        lte_64_success_result(),
    )
}

#[test]
fn test_ineg() {
    test_from_file("./examples/ineg.isle", lte_64_success_result())
}

#[test]
fn test_rotl_from_file() {
    let files = vec![
        "../../../codegen/src/isa/aarch64/inst.isle",
        "../../../codegen/src/isa/aarch64/lower.isle",
    ];
    // TODO: enable once this works
    // test_from_files_with_lhs_termname(files, "rotl", just_8_result());
}

#[test]
fn test_let() {
    test_from_file_self_contained("./tests/code/selfcontained/let.isle", just_8_result());
}
<reponame>ccie18473/raycaster_textured
use crate::prelude::*;

pub struct Ray {
    pub buffer: Vec<u8>,
}
impl Ray {
    pub fn new(player: &Player, map: &Map, width: i32, height: i32) -> Ray {
        let mut buffer = vec![0_u8; width as usize * height as usize * 4];

        for x in 0..width {
            //calculate ray position and direction
            let camera_x = (2 * x) as f64 / (width as f64) - 1.0;
            let ray_dir_x = player.dir_x + player.plane_x * camera_x;
            let ray_dir_y = player.dir_y + player.plane_y * camera_x;
            //which box of the map we're in
            let mut map_x = player.pos_x as isize;
            let mut map_y = player.pos_y as isize;
            //length of ray from current position to next x or y-side
            let mut side_dist_x: f64;
            let mut side_dist_y: f64;
            //length of ray from one x or y-side to next x or y-side
            //these are derived as:
            //deltaDistX = sqrt(1 + (rayDirY * rayDirY) / (rayDirX * rayDirX))
            //deltaDistY = sqrt(1 + (rayDirX * rayDirX) / (rayDirY * rayDirY))
            //which can be simplified to abs(|rayDir| / rayDirX) and abs(|rayDir| / rayDirY)
            //where |rayDir| is the length of the vector (ray


peer)

			// Normalize the capitalization of the OS, because some are capitalized but some aren't.
			osName := peer.OS
			switch osName {
			case "android":
				osName = "Android"
			case "windows":
				osName = "Windows"
			case "linux":
				osName = "Linux"
			}

			items = append(items, &ui.LabeledSubmenuItem{
				Label:           peerName,
				AdditionalLabel: osName,
				OnActivate: func() tea.Msg {
					err := clipboard.WriteString(peer.TailscaleIPs[0].String())
					if err != nil {
						return errorMsg(err)
					}
					return successMsg(fmt.Sprintf("Copied IP address of %s.", peerName))
				},
				IsDim: false,
			})
		}
	}

	return items
}

// Update all of the menu UIs from the current state.
func (m *model) updateMenus() {
	if m.state.BackendState == ipn.Running {
		// Update the device info submenu.
		{
			submenuItems := []ui.SubmenuItem{
				&ui.TitleSubmenuItem{Label: "Name"},
				&ui.LabeledSubmenuItem{
					Label: m.state.Self.DNSName[:len(m.state.Self.DNSName)-1], // Remove the trailing dot.
					OnActivate: func() tea.Msg {
						err := clipboard.WriteString(m.state.Self.DNSName[:len(m.state.Self.DNSName)-1])
						if err != nil {
							return errorMsg(err)
						}
						return successMsg("Copied full domain to clipboard.")
					},
				},
				&ui.SpacerSubmenuItem{},
				&ui.TitleSubmenuItem{Label: "IPs"},
			}

			for _, addr := range m.state.Self.TailscaleIPs {
				submenuItems = append(submenuItems, &ui.LabeledSubmenuItem{
					Label: addr.String(),
					OnActivate: func() tea.Msg {
						err := clipboard.WriteString(addr.String())
						if err != nil {
							return errorMsg(err)
						}

						var versionName string
						if addr.Is4() {
							versionName = "IPv4"
						} else {
							versionName = "IPv6"
						}

						return successMsg(fmt.Sprintf("Copied %s address to clipboard.", versionName))
					},
				})
			}

			submenuItems = append(submenuItems,
				&ui.SpacerSubmenuItem{},
				&ui.TitleSubmenuItem{Label: "Debug Info"},
				&ui.LabeledSubmenuItem{
					Label: fmt.Sprintf("ID: %s", m.state.Self.ID),
					OnActivate: func() tea.Msg {
						err := clipboard.WriteString(string(m.state.Self.ID))
						if err != nil {
							return errorMsg(err)
						}
						return successMsg("Copied Tailscale node ID to clipboard.")
					},
				},
				&ui.LabeledSubmenuItem{
					Label: m.state.Self.PublicKey.String(),
					OnActivate: func() tea.Msg {
						err := clipboard.WriteString(m.state.Self.PublicKey.String())
						if err != nil {
							return errorMsg(err)
						}
						return successMsg("Copied node key to clipboard.")
					},
				},
			)

			if m.state.LockKey != nil {
				statusText := "Online"
				if m.state.IsLockedOut {
					statusText = "Locked Out"
				}

				submenuItems = append(submenuItems,
					&ui.SpacerSubmenuItem{},
					&ui.TitleSubmenuItem{Label: "Tailnet Lock: " + statusText},
					&ui.LabeledSubmenuItem{
						Label: m.state.LockKey.CLIString(),
						On


["E.DODG"] = 30,
      ["E.HEAL"] = 0,
      ["E.HIT"] = 20.8,
      ["E.HP"] = 1731,
      ["E.HPS"] = 620,
      ["E.INT"] = 402.2,
      ["E.LFS"] = 75,
      ["E.MCRIT"] = 0,
      ["E.MIMU"] = 0,
      ["E.MP"] = 0,
      ["E.MPS"] = 299,
      ["E.MR"] = 20,
      ["E.MRI"] = 0,
      ["E.PIMU"] = 0,
      ["E.SILR"] = 0,
      ["E.SKL"] = 0,
      ["E.STR"] = 453.2,
      ["GS"] = 2926.5,
      ["HEAL"] = 0,
      ["HIT"] = 12,
      ["HP"] = 1610,
      ["HPS"] = 620,
      ["ID"] = 16,
      ["INT"] = 389,
      ["LFS"] = 75,
      ["MCRIT"] = 0,
      ["MIMU"] = 0,
      ["MP"] = 0,
      ["MPS"] = 299,
      ["MR"] = 20,
      ["MRI"] = 0,
      ["Name"] = "Med",
      ["NameRank"] = "Med12",
      ["PIMU"] = 0,
      ["Rank"] = 12,
      ["serial number"] = 191,
      ["SILR"] = 0,
      ["SKL"] = 0,
      ["STR"] = 440,
      ["Type"] = "AGI"
    }
  },
  [17] = {
    [1] = {
      ["+AGI"] = 0,
      ["+INT"] = 0,
      ["+STR"] = 0,
      ["AD"] = 0,
      ["AGI"] = 0,
      ["AP"] = 0,
      ["ARM"] = 0,
      ["ARMP"] = 0,
      ["CDR"] = 0,
      ["CRIT"] = 0,
      ["DODG"] = 0,
      ["E.AD"] = 0,
      ["E.AGI"] = 0,
      ["E.AP"] = 0,
      ["E.ARM"] = 0,
      ["E.ARMP"] = 0,
      ["E.CDR"] = 0,
      ["E.CRIT"] = 0,
      ["E.DODG"] = 0,
      ["E.HEAL"] = 0,
      ["E.HIT"] = 0,
      ["E.HP"] = 0,
      ["E.HPS"] = 0,
      ["E.INT"] = 0,
      ["E.LFS"] = 0,
      ["E.MCRIT"] = 0,
      ["E.MIMU"] = 0,
      ["E.MP"] = 0,
      ["E.MPS"] = 0,
      ["E.MR"] = 0,
      ["E.MRI"] = 0,
      ["E.PIMU"] = 0,
      ["E.SILR"] = 0,
      ["E.SKL"] = 0,
      ["E.STR"] = 0,
      ["GS"] = 0,
      ["HEAL"] = 0,
      ["HIT"] = 0,
      ["HP"] = 0,
      ["HPS"] = 0,
      ["ID"] = 17,
      ["INT"] = 0,
      ["LFS"] = 0,
      ["MCRIT"] = 0,
      ["MIMU"] = 0,
      ["MP"] = 0,
      ["MPS"] = 0,
      ["MR"] = 0,
      ["MRI"] = 0,
      ["Name"] = "Bone",
      ["NameRank"] = "Bone1",
      ["PIMU"] = 0,
      ["Rank"] = 1,
      ["serial number"] = 192,
      ["SILR"] = 0,
      ["SKL"] = 0,
      ["STR"] = 0,
      ["Type"] = "AGI"
    }


  is_mtls = authed_http.configure_mtls_channel()

        assert not is_mtls
        mock_get_client_cert_and_key.assert_called_once()
        mock_make_mutual_tls_http.assert_not_called()

    @mock.patch(
        "google.auth.transport._mtls_helper.get_client_cert_and_key", autospec=True
    )
    def test_configure_mtls_channel_exceptions(self, mock_get_client_cert_and_key):
        authed_http = google.auth.transport.urllib3.AuthorizedHttp(
            credentials=mock.Mock()
        )

        mock_get_client_cert_and_key.side_effect = exceptions.ClientCertError()
        with pytest.raises(exceptions.MutualTLSChannelError):
            with mock.patch.dict(
                os.environ, {environment_vars.GOOGLE_API_USE_CLIENT_CERTIFICATE: "true"}
            ):
                authed_http.configure_mtls_channel()

        mock_get_client_cert_and_key.return_value = (False, None, None)
        with mock.patch.dict("sys.modules"):
            sys.modules["OpenSSL"] = None
            with pytest.raises(exceptions.MutualTLSChannelError):
                with mock.patch.dict(
                    os.environ,
                    {environment_vars.GOOGLE_API_USE_CLIENT_CERTIFICATE: "true"},
                ):
                    authed_http.configure_mtls_channel()

    @mock.patch(
        "google.auth.transport._mtls_helper.get_client_cert_and_key", autospec=True
    )
    def test_configure_mtls_channel_without_client_cert_env(
        self, get_client_cert_and_key
    ):
        callback = mock.Mock()

        authed_http = google.auth.transport.urllib3.AuthorizedHttp(
            credentials=mock.Mock(), http=mock.Mock()
        )

        # Test the callback is not called if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set.
        is_mtls = authed_http.configure_mtls_channel(callback)
        assert not is_mtls
        callback.assert_not_called()

        # Test ADC client cert is not used if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set.
        is_mtls = authed_http.configure_mtls_channel(callback)
        assert not is_mtls
        get_client_cert_and_key.assert_not_called()

    def test_clear_pool_on_del(self):
        http = mock.create_autospec(urllib3.PoolManager)
        authed_http = google.auth.transport.urllib3.AuthorizedHttp(
            mock.sentinel.credentials, http=http
        )
        authed_http.__del__()
        http.clear.assert_called_with()

        authed_http.http = None
        authed_http.__del__()
        # Expect it to not crash


 context)
    {
        return Initialize<SearchPartViewModel>(GetEditorShapeType(context), viewModel =>
        {
            viewModel.Placeholder = part.Placeholder;
            viewModel.IndexName = part.IndexName;
        }).Location("Content");
    }

    public override async Task<IDisplayResult> UpdateAsync(SearchFormPart part, UpdatePartEditorContext context)
    {
        var model = new SearchPartViewModel();

        await context.Updater.TryUpdateModelAsync(model, Prefix);

        part.Placeholder = model.Placeholder;
        part.IndexName = string.IsNullOrWhiteSpace(model.IndexName) ? null : model.IndexName.Trim();

        return Edit(part, context);
    }
}


ext_lora_denoiser_fused_multi(self):
        super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3)

    def test_simple_inference_with_text_denoiser_lora_unfused(self):
        super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3)

    # TODO(aryan): Fix the following test
    @unittest.skip("This test fails with an error I haven't been able to debug yet.")
    def test_simple_inference_save_pretrained(self):
        pass

    @unittest.skip("Not supported in HunyuanVideo.")
    def test_simple_inference_with_text_denoiser_block_scale(self):
        pass

    @unittest.skip("Not supported in HunyuanVideo.")
    def test_simple_inference_with_text_denoiser_block_scale_for_all_dict_options(self):
        pass

    @unittest.skip("Not supported in HunyuanVideo.")
    def test_modify_padding_mode(self):
        pass

    @unittest.skip("Text encoder LoRA is not supported in HunyuanVideo.")
    def test_simple_inference_with_partial_text_lora(self):
        pass

    @unittest.skip("Text encoder LoRA is not supported in HunyuanVideo.")
    def test_simple_inference_with_text_lora(self):
        pass

    @unittest.skip("Text encoder LoRA is not supported in HunyuanVideo.")
    def test_simple_inference_with_text_lora_and_scale(self):
        pass

    @unittest.skip("Text encoder LoRA is not supported in HunyuanVideo.")
    def test_simple_inference_with_text_lora_fused(self):
        pass

    @unittest.skip("Text encoder LoRA is not supported in HunyuanVideo.")
    def test_simple_inference_with_text_lora_save_load(self):
        pass


signature FROM Int TO Int
            {
              CUP$result = new symbol(/*var_expr*/50);
               classFile.addVar((/*soff*/(int_token)CUP$stack.elementAt(CUP$top-2)).int_val, (/*eoff*/(int_token)CUP$stack.elementAt(CUP$top-0)).int_val, (/*name*/(str_token)CUP$stack.elementAt(CUP$top-6)).str_val,
                            (/*desc*/(str_token)CUP$stack.elementAt(CUP$top-5)).str_val, (/*sign*/(str_token)CUP$stack.elementAt(CUP$top-4)).str_val, (/*reg*/(int_token)CUP$stack.elementAt(CUP$top-8)).int_val);
            }
          return CUP$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 181: // var_expr ::= Int IS Word Word optional_signature
            {
              CUP$result = new symbol(/*var_expr*/50);
               classFile.addVar(null, null, (/*name*/(str_token)CUP$stack.elementAt(CUP$top-2)).str_val, (/*desc*/(str_token)CUP$stack.elementAt(CUP$top-1)).str_val,
                            (/*sign*/(str_token)CUP$stack.elementAt(CUP$top-0)).str_val,  (/*reg*/(int_token)CUP$stack.elementAt(CUP$top-4)).int_val);
            }
          return CUP$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 180: // var_expr ::= Int IS Word Word optional_signature FROM Word TO Word
            {
              CUP$result = new symbol(/*var_expr*/50);
               classFile.addVar((/*slab*/(str_token)CUP$stack.elementAt(CUP$top-2)).str_val, (/*elab*/(str_token)CUP$stack.elementAt(CUP$top-0)).str_val, (/*name*/(str_token)CUP$stack.elementAt(CUP$top-6)).str_val,
                            (/*desc*/(str_token)CUP$stack.elementAt(CUP$top-5)).str_val, (/*sign*/(str_token)CUP$stack.elementAt(CUP$top-4)).str_val, (/*reg*/(int_token)CUP$stack.elementAt(CUP$top-8)).int_val);
            }
          return CUP$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 179: // endstack ::= DEND STACK
            {
              CUP$result = new symbol(/*endstack*/96);
               classFile.endStack();
            }
          return CUP$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 178: // stack_item_expr ::= STACK Word Int
            {
              CUP$result = new symbol(/*stack_item_expr*/100);
               classFile.plantStackStack((/*w*/(str_token)CUP$stack.elementAt(CUP$top-1)).str_val, String.valueOf((/*n*/(int_token)CUP$stack.elementAt(CUP$top-0)).int_val));
            }
          return CUP$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 177: // stack_item_expr ::= STACK Word Word
            {
              CUP$result = new symbol(/*stack_item_expr*/100);
               classFile.plantStackStack((/*w*/(str_token)CUP$stack.elementAt(CUP$top-1)).str_val, (/*val*/(str_token)CUP$stack.elementAt(CUP$top-0)).str_val);
            }
          return CUP$result;

          /*. . . . . . . . . . . . . . . . . . . .*/


        double top = 0;
        double right = indexBarWidth + 8;
        if (value == null) {
          resultWidget = const SizedBox.shrink();
        } else {
          double titleSize = 80;
          top = value.offset.dy - titleSize * 0.5;
          resultWidget = AzListCursor(size: titleSize, title: value.title);
        }
        resultWidget = Positioned(
          top: top,
          right: right,
          child: resultWidget,
        );
        return resultWidget;
      },
    );
  }

  Widget _buildIndexBar() {
    return Container(
      key: indexBarContainerKey,
      width: indexBarWidth,
      alignment: Alignment.center,
      child: AzListIndexBar(
        parentKey: indexBarContainerKey,
        symbols: symbols,
        onSelectionUpdate: (index, cursorOffset) {
          cursorInfo.value = AzListCursorInfoModel(
            title: symbols[index],
            offset: cursorOffset,
          );
          final sliverContext = sliverContextMap[index];
          if (sliverContext == null) return;
          observerController.jumpTo(
            index: 0,
            sliverContext: sliverContext,
          );
        },
        onSelectionEnd: () {
          cursorInfo.value = null;
        },
      ),
    );
  }

  Widget _buildSliver({
    required int index,
    required AzListContactModel model,
  }) {
    final names = model.names;
    if (names.isEmpty) return const SliverToBoxAdapter();
    Widget resultWidget = isShowListMode
        ? SliverList(
            delegate: SliverChildBuilderDelegate(
              (context, itemIndex) {
                if (sliverContextMap[index] == null) {
                  sliverContextMap[index] = context;
                }
                return AzListItemView(name: names[itemIndex]);
              },
              childCount: names.length,
            ),
          )
        : SliverGrid(
            gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
              crossAxisCount: 2, //Grid按两列显示
              mainAxisSpacing: 10.0,
              crossAxisSpacing: 10.0,
              childAspectRatio: 2.0,
            ),
            delegate: SliverChildBuilderDelegate(
              (BuildContext context, int itemIndex) {
                if (sliverContextMap[index] == null) {
                  sliverContextMap[index] = context;
                }
                return AzListItemView(
                  name: names[itemIndex],
                  isShowSeparator: false,
                );
              },
              childCount: names.length,
            ),
          );
    resultWidget = SliverStickyHeader(
      header: Container(
        height: 44.0,
        color: const Color.fromARGB(255, 243, 244, 246),
        padding: const EdgeInsets.symmetric(horizontal: 16.0),
        alignment: Alignment.centerLeft,
        child: Text(
          model.section,
          style: const TextStyle(color: Colors.black54),
        ),
      ),
      sliver: resultWidget,
    );
    return resultWidget;
  }
}
/*
 * @Author: LinXunFeng linxunfeng@yeah.net
 * @Repo: https://github.com/fluttercandies/flutter_scrollview_observer
 * @Date: 2025-08-02 20:03:56
 */

import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';
import 'package:scrollview_observer/scrollview_observer.dart';
import 'package:scrollview_observer_example/features/scene/detail/header/detail_header.dart';
import 'package:scrollview_observer_example/features/scene/detail/logic/detail_logic_list_view.dart';
import 'package:scrollview_observer_example/features/scene/detail/state/detail_state.dart';
import 'package:scrollview_observer_example/features/scene/d


 v < VertexCount; v++) {

		float	  interpolant, alpha;
		Vector3 n, color;

		n = Normalize (VertexArray [v]);
		interpolant = Vector3::Dot_Product (WarmDirection, n);
		if (interpolant < 0.0f) interpolant = 0.0f;
		if (v % (RowCount + 1) < RowCount) {
			Vector3::Lerp (coldcloudcolor, warmcloudcolor, interpolant, &color);
			alpha = Alpha;
		} else {
			Vector3::Lerp (coldhorizoncolor, warmhorizoncolor, interpolant, &color);
			alpha = 0.0f;
		}
		DiffuseArray [v] = DX8Wrapper::Convert_Color (color, alpha);
	}

	// Optimization: If alpha is zero then cloud layer is invisible.
	Set_Visibility (Alpha > 0.0f);
}

/***********************************************************************************************
 * CloudLayerClass::Render --																						  *
 *                                                                                *
 * INPUT:                                                                                *
 *                                                                                *
 * OUTPUT:                                                                                *
 *                                                                                *
 * WARNINGS:                                                                                *
 *                                                                                *
 * HISTORY:                                                                                *
 *   09/15/00    IML : Created.                                                                *
 *=============================================================================================*/
void CloudLayerClass::Render()
{
	const float wraplimit = 8.0f;

	Vector2 offset;

	offset = (WW3D::Get_Frame_Time() * 0.001f) * Velocity;

	// Keep the texture coordinates within certain bounds to avoid floating point overflow
	// and to avoid potential hardware problems associated with large +ve/-ve coordinates.
	// NOTE: Wrap limit has been chosen arbitrarily to allow for enough texture wrapping.
	if (TexCoordArray [0].X < -wraplimit) {
		offset.X += wraplimit;
	} else {
		if (TexCoordArray [0].X > wraplimit) {
			offset.X -= wraplimit;
		}
	}
	if (TexCoordArray [0].Y < -wraplimit) {
		offset.Y += wraplimit;
	} else {
		if (TexCoordArray [0].Y > wraplimit) {
			offset.Y -= wraplimit;
		}
	}

	for (unsigned v = 0; v < VertexCount; v++) {
		TexCoordArray [v] += offset;
	}

	if (Is_Visible()) {

		// Copy the vertices into the dynamic vertex buffer.
		// NOTE: Vertex normals and stage 1 UV's are uninitialized.
		DynamicVBAccessClass dynamicvb (BUFFER_TYPE_DYNAMIC_DX8, dynamic_fvf_type, VertexCount);
		{
			DynamicVBAccessClass::WriteLockClass lock (&dynamicvb);
			VertexFormatXYZNDUV2 *vertex = lock.Get_Formatted_Vertex_Array();

			for (unsigned v = 0; v < VertexCount; v++) {
				vertex->x = VertexArray [v].X;
				vertex->y = VertexArray [v].Y;
				vertex->z = VertexArray [v].Z;
				vertex->diffuse = DiffuseArray [v];
				vertex->u1 = TexCoordArray [v].X;
				vertex->v1 = TexCoordArray [v].Y;
				vertex++;
			}
		}

		DX8Wrapper::Set_Texture (0, Texture);
		DX8Wrapper::Set_Material (Material);
		DX8Wrapper::Set_Shader (Shader);
		DX8Wrapper::Set_Index_Buffer (IndexBuffer, 0);
		DX8Wrapper::Set_Vertex_Buffer (dynamicvb);
		DX8Wrapper::Draw_Triangles (0, TriangleCount, 0, VertexCount);
	}
}

/***********************************************************************************************
 * SkyGlowClass::SkyGlowClass -- Constructor																	  *
 *


 found.  "public" is the
         * Java keyword.
         */
        {ErrorMsg.METHOD_NOT_FOUND_ERR,
        "\u627E\u4E0D\u5230\u5916\u90E8\u65B9\u6CD5 ''{0}'' (\u5FC5\u987B\u4E3A public)\u3002"},

        /*
         * Note to translators:  The word "method" here refers to a Java method.
         * Processing the stylesheet required a reference to the method named by
         * the substitution text, but no method with the required types of
         * arguments or return type could be found.
         */
        {ErrorMsg.ARGUMENT_CONVERSION_ERR,
        "\u65E0\u6CD5\u5728\u8C03\u7528\u65B9\u6CD5 ''{0}'' \u65F6\u8F6C\u6362\u53C2\u6570/\u8FD4\u56DE\u7C7B\u578B"},

        /*
         * Note to translators:  The file or URI named in the substitution text
         * is missing.
         */
        {ErrorMsg.FILE_NOT_FOUND_ERR,
        "\u627E\u4E0D\u5230\u6587\u4EF6\u6216 URI ''{0}''\u3002"},

        /*
         * Note to translators:  This message is displayed when the URI
         * mentioned in the substitution text is not well-formed syntactically.
         */
        {ErrorMsg.INVALID_URI_ERR,
        "URI ''{0}'' \u65E0\u6548\u3002"},

        /*
         * Note to translators:  The file or URI named in the substitution text
         * exists but could not be opened.
         */
        {ErrorMsg.FILE_ACCESS_ERR,
        "\u65E0\u6CD5\u6253\u5F00\u6587\u4EF6\u6216 URI ''{0}''\u3002"},

        /*
         * Note to translators: <xsl:stylesheet> and <xsl:transform> are
         * keywords that should not be translated.
         */
        {ErrorMsg.MISSING_ROOT_ERR,
        "\u9700\u8981 <xsl:stylesheet> \u6216 <xsl:transform> \u5143\u7D20\u3002"},

        /*
         * Note to translators:  The stylesheet contained a reference to a
         * namespace prefix that was undefined.  The value of the substitution
         * text is the name of the prefix.
         */
        {ErrorMsg.NAMESPACE_UNDEF_ERR,
        "\u672A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 ''{0}''\u3002"},

        /*
         * Note to translators:  The Java function named in the stylesheet could
         * not be found.
         */
        {ErrorMsg.FUNCTION_RESOLVE_ERR,
        "\u65E0\u6CD5\u89E3\u6790\u5BF9\u51FD\u6570 ''{0}'' \u7684\u8C03\u7528\u3002"},

        /*
         * Note to translators:  The substitution text is the name of a
         * function.  A literal string here means a constant string value.
         */
        {ErrorMsg.NEED_LITERAL_ERR,
        "''{0}'' \u7684\u53C2\u6570\u5FC5\u987B\u662F\u6587\u5B57\u5B57\u7B26\u4E32\u3002"},

        /*
         * Note to translators:  This message indicates there was a syntactic
         * error in the form of an XPath expression.  The substitution text is
         * the expression.
         */
        {ErrorMsg.XPATH_PARSER_ERR,
        "\u89E3\u6790 XPath \u8868\u8FBE\u5F0F ''{0}'' \u65F6\u51FA\u


IRBuffer;
            break;

        default:
            ShiWarning("Bad color mode");
    }
}

BOOL ColorBankClass::IsValidColorIndex(int i)
{
    return (i < nColors + MAX_VERTS_PER_POLYGON + MAX_CLIP_VERTS);
}
/***************************************************************************\
    ObjectInstance.cpp
    Scott Randolph
    February 9, 1998

    Provides structures and definitions for 3D objects.
\***************************************************************************/
#include <cISO646>
#include "stdafx.h"
#include "StateStack.h"
#include "ObjectInstance.h"

#ifdef USE_SH_POOLS
extern MEM_POOL gBSPLibMemPool;
#endif

ObjectInstance::ObjectInstance(int tid)
{
    id = tid;

    ShiAssert(TheObjectList);
    ShiAssert(id < TheObjectListLength); // Make sure the requested object ID is in
    ShiAssert(TheObjectList[tid].nLODs); // the current object set (IDS.TXT, etc).

    ParentObject = &TheObjectList[tid];

    /***** BEGIN HACK HACK HACK HACK - Billy forced me to do it :-) -RH *****/
    if
    ( // F16c
        (tid == 1052) or
        (tid == 564) or
        (tid == 563) or
        (tid == 562) or
        (tid == 5)
    )
    {
        ParentObject->radius = 40.0;
    }

    if (tid == 1329) // B1
    {
        ParentObject->radius = 100.0;
    }

    /***** END HACK HACK HACK HACK - Billy forced me to do it :-) -RH *****/

    ParentObject->Reference();

    if (ParentObject->nSwitches == 0)
    {
        SwitchValues = NULL;
    }
    else
    {
#ifdef USE_SH_POOLS
        SwitchValues = (DWORD *)MemAllocPtr(gBSPLibMemPool, sizeof(DWORD) * (ParentObject->nSwitches), 0);
#else
        SwitchValues = new DWORD[ParentObject->nSwitches];
#endif
        memset(SwitchValues, 0, sizeof(*SwitchValues)*ParentObject->nSwitches);
    }

    if (ParentObject->nDOFs == 0)
    {
        DOFValues = NULL;
    }
    else
    {
#ifdef USE_SH_POOLS
        DOFValues = (DOFvalue *)MemAllocPtr(gBSPLibMemPool, sizeof(DOFvalue) * (ParentObject->nDOFs), 0);
#else
        DOFValues = new DOFvalue[ParentObject->nDOFs];
#endif
        memset(DOFValues, 0, sizeof(*DOFValues)*ParentObject->nDOFs);
    }

    if (ParentObject->nSlots == 0)
    {
        SlotChildren = NULL;
    }
    else
    {
#ifdef USE_SH_POOLS
        SlotChildren = (ObjectInstance **)MemAllocPtr(gBSPLibMemPool, sizeof(ObjectInstance *) * (ParentObject->nSlots), 0);
#else
        SlotChildren = new ObjectInstance*[ParentObject->nSlots];
#endif
        memset(SlotChildren, 0, sizeof(*SlotChildren)*ParentObject->nSlots);
    }

    if ((ParentObject->nDynamicCoords == 0) or (ParentObject->nDynamicCoords > 10))
    {
        DynamicCoords = NULL;
    }
    else
    {
#ifdef USE_SH_POOLS
        DynamicCoords = (Ppoint *)MemAllocPtr(gBSPLibMemPool, sizeof(Ppoint) * (ParentObject->nDynamicCoords), 0);
#else
        DynamicCoords = new Ppoint[ParentObject->nDynamicCoords];
#endif
        memcpy(DynamicCoords,
               ParentObject->pSlotAndDynamicPositions + Parent


chedulerConfiguration.INTRAQUEUE_PREEMPTION_MAX_ALLOWABLE_LIMIT,
        (float) 0.5);

    String labelsConfig = "=100,true;";
    String nodesConfig = // n1 has no label
        "n1= res=100";
    String queuesConfig =
        // guaranteed,max,used,pending,reserved
        "root(=[100 100 80 60 0]);" + // root
            "-a(=[100 100 80 60 0])"; // b

    String appsConfig =
    // queueName\t(priority,resource,host,expression,#repeat,reserved,pending,user)
        "a\t" // app1 in a
            + "(3,1,n1,,30,false,30,user1);" + // app1 a
            "a\t" // app2 in a
            + "(1,1,n1,,20,false,20,user2);" + "a\t" // app3 in a
            + "(4,1,n1,,30,false,0,user1);" + "a\t" // app4 in a
            + "(1,1,n1,,0,false,10,user2)";

    buildEnv(labelsConfig, nodesConfig, queuesConfig, appsConfig);
    policy.editSchedule();

    // app2/app4 needs more resource and its well under its user-limit. Hence
    // preempt resources from app1 (compare to app3, app1 has low priority).
    verify(eventHandler, times(9)).handle(argThat(
        new TestProportionalCapacityPreemptionPolicy.IsPreemptionRequestFor(
            getAppAttemptId(1))));
  }

  @Test
  public void testIntraQueuePreemptionOfUserLimitInTwoQueues()
      throws IOException {
    /**
     * Queue structure is:
     *
     * <pre>
     *       root
     *      /   \
     *     a     b
     * </pre>
     *
     * Guaranteed resource of a/b are 40:60 Total cluster resource = 100
     * maxIntraQueuePreemptableLimit by default is 50%. This test is to verify
     * that intra-queue preemption could occur in two queues when user-limit
     * irreuglarity is present in queue.
     */

    // Set max preemption limit as 50%.
    conf.setFloat(CapacitySchedulerConfiguration.
            INTRAQUEUE_PREEMPTION_MAX_ALLOWABLE_LIMIT,
        (float) 0.5);

    String labelsConfig = "=100,true;";
    String nodesConfig = // n1 has no label
        "n1= res=100";
    String queuesConfig =
        // guaranteed,max,used,pending,reserved
        "root(=[100 100 90 80 0]);" + // root
            "-a(=[60 100 55 60 0]);" + // a
            "-b(=[40 100 35 20 0])"; // b

    String appsConfig =
    // queueName\t(priority,resource,host,expression,#repeat,reserved,pending,user)
        "a\t" // app1 in a
            + "(3,1,n1,,20,false,30,user1);" + // app1 a
            "a\t" // app2 in a
            + "(1,1,n1,,20,false,20,user2);" +
            "a\t" // app3 in a
            + "(4,1,n1,,15,false,0,user1);" +
            "a\t" // app4 in a
            + "(1,1,n1,,0,false,10,user2);" +
            "b\t" // app5 in b
            + "(3,1,n1,,25,false,10,user1);" +
            "b\t" // app6 in b
            + "(1,1,n1,,10,false,10,user2)";

    buildEnv(labelsConfig, nodesConfig, queuesConfig, appsConfig);
    policy.editSchedule();

    // app2/app4 needs more resource and its well under its user-limit. Hence
    // preempt resources from app1 (compare to app3, app1 has low priority).
    verify(eventHandler, times(4)).handle(argThat(
        new TestProportionalCapacityPreemptionPolicy.IsPreemptionRequestFor(


之中的，而这些单例在常驻内存的程序中很容易引起副作用。
举个简单的例子，Laravel的auth组件就是一个典型的单例服务，在用户完成登录后会将当前的User对象保存在一个成员变量中，
那么下一个请求在调用auth组件时，获得的User对象还是上一个请求保存的，这样就会引起用户身份错乱。清理Laravel容器里面的对象，
我们只需要将其配置到配置文件的`abstracts`数组中即可。默认情况下，Shadowfax会清理以下对象，你可以根据自己项目的实际情况进行调整：

```yaml
abstracts:
  - cookie
  - session
  - session.store
  - redirect
  - auth
  - auth.driver
  - Illuminate\Session\Middleware\StartSession
```

## 清理控制器

Laravel在dispatch路由时会将其控制器的实例缓存到当前Route中（闭包类型的除外）。在Swoole环境下，再次访问该路由时就不需要再次实例化控制器了。
这样虽然性能好，但在Swoole环境下容易出问题。比如开发者在Controller中保存了一些数据，或者注入了一些有“副作用”的服务，都有可能对下一个请求造成影响。
所有需要将这些控制器实例从Route中清理掉，以便每次dispatch路由时生成新的控制器实例。

Shadowfax提供了一个`controllers`配置来帮助开发者自定义需要清理的控制器：

```yaml
controllers:
  - App\Http\Controllers\FooController
  - App\Http\Controllers\BarController
```

如果配置为`*`表示清除所有控制器实例（默认）：

```yaml
controllers:
  - "*"
```

## 自定义Cleaner

如果只清理Laravel容器里面的对象，肯定是不能满足需求的，Shadowfax还可以通过创建Cleaner来自定义清理逻辑。

### 创建Cleaner

可以使用Artisan命令`shadowfax:cleaner`来快速创建一个Cleaner：

```shell
php artisan shadowfax:cleaner FooCleaner
```

上述命令会在`app/Cleaners/`目录下创建一个名为FooCleaner的类，你只需要在其`clean`方法里面写入自定义的清理逻辑即可。
当然，你也可以手动地在任意位置创建Cleaner，不过手动创建的Cleaner类必须实现`HuangYi\Shadowfax\Contracts\Cleaner`接口，例如：

```php
<?php

namespace CustomNamespace;

use HuangYi\Shadowfax\Contracts\Cleaner;
use Illuminate\Contracts\Container\Container;

class FooCleaner implements Cleaner
{
    /**
     * Clean something.
     *
     * @param  \Illuminate\Contracts\Container\Container  $app
     * @return void
     */
    public function clean(Container $app)
    {
        // Clean polluted data.
    }
}
```

默认地，Cleaners会在请求结束后执行，如果你想让Cleaner在请求之前


.alpha != 0){
			obj.alpha = 1;
		}
	}
	public static MovieEffect(type){
			var taget = App.Instance.Stage;
			var w = App.Instance.Width;
			var h = App.Instance.Height;
			//新建一个group
			var loadTxGrp = new eui.Group();
			loadTxGrp.width = w;
			loadTxGrp.height = h;
			taget.addChild(loadTxGrp)
			//循环创建多个截图bitmap 这里num自由设置
			var tx1Number = 20;
			//每个横着的数量
			var Xnumber = 5;
			//高数量自动计算
			var Ynumber = tx1Number / Xnumber;
			var upNumber = 0;
			function onComplete(evt: Comment) {
				upNumber++
				if (upNumber == tx1Number) {
					taget.removeChild(loadTxGrp)
				}
        	}
			for (var i = 0; i < tx1Number; i++) {
					//计算每个的XY及宽高
					var _mcW = w / Xnumber;
					var _mcH = h / Ynumber;
					var _mcX = i % Xnumber * _mcW;
					var _mcY = Math.floor(i / Xnumber) * _mcH;

					var renderTexture: egret.RenderTexture = new egret.RenderTexture();
					var mypic = renderTexture.drawToTexture(taget, new egret.Rectangle(_mcX, _mcY, _mcW, _mcH));
					var bmp = new egret.Bitmap;
					bmp.texture = renderTexture;
					bmp.anchorOffsetX = _mcW / 2
					bmp.anchorOffsetY = _mcH / 2
					bmp.x = _mcX + _mcW / 2;
					bmp.y = _mcY + _mcH / 2;
					loadTxGrp.addChild(bmp);
					if (type == 5) {
						type = Math.ceil(Math.random() * 4)
					}
					//开始特效
					switch (type) {
						case 1:
							var tw = egret.Tween.get(bmp);
							tw.to({ scaleX: 0, scaleY: 0, alpha: 0, rotation: 359 }, 800, egret.Ease.circIn).call(onComplete, this);
							break;
						case 2:
							var my_x = -w
							if (!(i % 2)) {
								my_x = w * 2
							}
							var tw = egret.Tween.get(bmp);
							tw.to({ x: my_x, alpha: 0 }, 800, egret.Ease.circIn).call(onComplete, this);
							break;
						case 3:
							var tw = egret.Tween.get(bmp);
							tw.to({ scaleX: 0.2, scaleY: 1, alpha: 0, blurFliter: 0 }, 800, egret.Ease.backInOut).call(onComplete, this);
							break;
						case 4:
							var tw = egret.Tween.get(bmp);
							tw.to({ alpha: 0}, 900, egret.Ease.circIn).call(onComplete, this)
							break;
						default:
							var tw = egret.Tween.get(bmp);
							tw.to({ scaleX: 1, scaleY: 0, alpha: 0 }, 800, egret.Ease.circIn).call(onComplete, this);
					}
        }
	}

}export class ModelComponent {
    protected _name: string;
    protected _properties: {[name: string]: string} = {};
    protected _dependencies: string[] = [];

    constructor(name: string, properties: any = {}, dependencies: string[] = []) {
        this._name = name;
        this._properties = properties;
        this._dependencies = dependencies;
    }

    get name(): string {
        return this._name;
    }
    get properties(): any {
        return this._properties;
    }

    get dependencies() {
        return this._dependencies;
    }
}import { Component, OnInit, Input, Output, EventEmitter } f


.Value, opts encOpts) {
	b := e.AvailableBuffer()
	b = mayAppendQuote(b, opts.quoted)
	b = strconv.AppendUint(b, v.Uint(), 10)
	b = mayAppendQuote(b, opts.quoted)
	e.Write(b)
}

type floatEncoder int // number of bits

func (bits floatEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
	f := v.Float()
	if math.IsInf(f, 0) || math.IsNaN(f) {
		e.error(&UnsupportedValueError{v, strconv.FormatFloat(f, 'g', -1, int(bits))})
	}

	// Convert as if by ES6 number to string conversion.
	// This matches most other JSON generators.
	// See golang.org/issue/6384 and golang.org/issue/14135.
	// Like fmt %g, but the exponent cutoffs are different
	// and exponents themselves are not padded to two digits.
	b := e.AvailableBuffer()
	b = mayAppendQuote(b, opts.quoted)
	abs := math.Abs(f)
	fmt := byte('f')
	// Note: Must use float32 comparisons for underlying float32 value to get precise cutoffs right.
	if abs != 0 {
		if bits == 64 && (abs < 1e-6 || abs >= 1e21) || bits == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) {
			fmt = 'e'
		}
	}
	b = strconv.AppendFloat(b, f, fmt, -1, int(bits))
	if fmt == 'e' {
		// clean up e-09 to e-9
		n := len(b)
		if n >= 4 && b[n-4] == 'e' && b[n-3] == '-' && b[n-2] == '0' {
			b[n-2] = b[n-1]
			b = b[:n-1]
		}
	}
	b = mayAppendQuote(b, opts.quoted)
	e.Write(b)
}

var (
	float32Encoder = (floatEncoder(32)).encode
	float64Encoder = (floatEncoder(64)).encode
)

func stringEncoder(e *encodeState, v reflect.Value, opts encOpts) {
	if v.Type() == numberType {
		numStr := v.String()
		// In Go1.5 the empty string encodes to "0", while this is not a valid number literal
		// we keep compatibility so check validity after this.
		if numStr == "" {
			numStr = "0" // Number's zero-val
		}
		if !isValidNumber(numStr) {
			e.error(fmt.Errorf("json: invalid number literal %q", numStr))
		}
		b := e.AvailableBuffer()
		b = mayAppendQuote(b, opts.quoted)
		b = append(b, numStr...)
		b = mayAppendQuote(b, opts.quoted)
		e.Write(b)
		return
	}
	if opts.quoted {
		b := appendString(nil, v.String(), opts.escapeHTML)
		e.Write(appendString(e.AvailableBuffer(), b, false)) // no need to escape again since it is already escaped
	} else {
		e.Write(appendString(e.AvailableBuffer(), v.String(), opts.escapeHTML))
	}
}

// isValidNumber reports whether s is a valid JSON number literal.
func isValidNumber(s string) bool {
	// This function implements the JSON numbers grammar.
	// See https://tools.ietf.org/html/rfc7159#section-6
	// and https://www.json.org/img/number.png

	if s == "" {
		return false
	}

	// Optional -
	if s[0] == '-' {
		s = s[1:]
		if s == "" {
			return false
		}
	}

	// Digits
	switch


rFormMasterElementRadioSelected.
Setting this will set the checked text color for each radio button.

```kotlin
segmented<ListItem>(1) {
    checkedTextColor = Color.WHITE
}
```

## Corner Radius

By default this is the value of R.dimen.elementRadioCornerRadius.
Setting this will set the corner radius for each radio button.

```kotlin
segmented<ListItem>(1) {
    cornerRadius = 5f
}
```

## Text Size

By default this is the value of R.dimen.elementTextValueSize.
Setting this will set the text size (In SP) for each radio button.

```kotlin
segmented<ListItem>(1) {
    textSize = 12f
}
```

## Radio Button Padding

By default this is the value of R.dimen.elementRadioPadding.
Setting this will set the padding for each radio button.

```kotlin
segmented<ListItem>(1) {
    radioButtonPadding = 5
}
```

## Radio Group Wrap Content

By default this is false.
Enable to set the radio group layout_width to "wrap_content"

```kotlin
segmented<ListItem>(1) {
    radioGroupWrapContent = true
}
```

## Width of each radio button

By default, this is null which does not set the width.

```kotlin
segmented<ListItem>(1) {
    radioButtonWidth = 180
}
```

## Height of each radio button

By default, this is null which does not set the height.

```kotlin
segmented<ListItem>(1) {
    radioButtonHeight = 240
}
```

## Example

### Kotlin

```kotlin
segmented<ListItem>(1) {
    options = listOf(ListItem(id = 1, name = "Banana"),
                     ListItem(id = 2, name = "Orange"))
    value = ListItem(id = 1, name = "Banana")
}
```

### Java

```java
List<BaseFormElement<?>> elements = new ArrayList<>();
FormSegmentedElement<ListItem> segmented = new FormSegmentedElement<>(1);
segmented.setOptions(Arrays.asList(new ListItem(1L, "Banana"),
    new ListItem(2L, "Orange")));
segmented.setValue(new ListItem(1L, "Banana"));
elements.add(segmented);
```
# Trippanion
The Selfhosted Trip-Planning-Companion application.

You and your family / friends go on a trip.

_While planning the trip_
You have a central place to store all information coming out of the booking mails rather than having some of them in your own mailbox / app, and others in the mailbox or apps of your spouse / co planner(s).

_During the trip,_
this app allows you to share all the details of the trip with the people going on the trip with you and that just were not that involved in the planning. It is the app in which you answer questions like: what time do we have to be at the airport? Do we have an active day in nature, or do we have a cultural day with museumsvitis? etc.

_After the trip_
the app provides you the option to export the itinerary and all the content you added as a memory.

_The application also has the following features:_
- :globe_with_meridians:  Show a map of the trip itinerary and show a map with the points of interest for one particular day.
- :moneybag:  Add expenses and keep a simple overview of who owes and who gets. Including currency conversion.
- :heavy_check_mark:  Keep a check/pack/wishlist.
- :camera:  Each traveller on the trip can add personal logentries and photos.
- :link:  Add documents for easy access like hotelreservations, flightconfirmations, but also copy of your passport or medical documents.
- :game_die:  You can also entertain your fellow travellers by geting them involved in (road)tripbingo and let them win fancy badges.

_Integrations with other selfhosted apps:_
Add a Dawarich api key and see your tracks - did you go where you planned you would go


ADO)

// Algoritmo para garantizar la palabra
let palabraEntra = true;
for (let i = 0; i < PALABRA.length; i++) {
if (DIRECCION === "horizontal" && (columnaInicial + i >= LADO)) {
palabraEntra = false
break;
} else if (DIRECCION === "vertical" && (filaInicial + i >= LADO)) {
palabraEntra = false
break;
} else if (DIRECCION === "diagonalDerecha" && (filaInicial + i >= LADO || columnaInicial + i >= LADO)) {
palabraEntra = false
break;
} else if (DIRECCION === "diagonalIzquierda" && (filaInicial + i >= LADO || columnaInicial - i < 0)) {
palabraEntra = false
break;
}
}

// Si la palabra entra, agregar a la sopa de letras
if (palabraEntra) {
for (let i = 0; i < PALABRA.length; i++) {
if (DIRECCION === "horizontal") {
sopaDeLetras[filaInicial][columnaInicial + i] = PALABRA.charAt(i)
} else if (DIRECCION === "vertical") {
sopaDeLetras[filaInicial + i][columnaInicial] = PALABRA.charAt(i)
} else if (DIRECCION === "diagonalDerecha") {
sopaDeLetras[filaInicial + i][columnaInicial + i] = PALABRA.charAt(i)
} else {
sopaDeLetras[filaInicial + i][columnaInicial - i] = PALABRA.charAt(i)
}
}
palabraAgregada = true;
}
}

// Diseño
const LETRAS_POSIBLES = "ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓜⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ"
const numerosUni = ["⓿", "❶", "❷", "❸", "❹", "❺", "❻", "❼", "❽", "❾", "❿", "⓫", "⓬", "⓭", "⓮", "⓯", "⓰", "⓱", "⓲", "⓳", "⓴"]
let sopaDeLetrasConBordes = ""
sopaDeLetrasConBordes += "     " + [...Array(LADO).keys()].map(num => numerosUni[num]).join(" ") + "\n"
//sopaDeLetrasConBordes += "   *╭" + "┄".repeat(LADO) + '┄┄' + "╮*\n"

for (let i = 0; i < LADO; i++) {
let fila = numerosUni[i] + " "

for (let j = 0; j < LADO; j++) {
if (sopaDeLetras[i][j]) {
fila += sopaDeLetras[i][j] + " "
} else {
let letraAleatoria = LETRAS_POSIBLES.charAt(Math.floor(Math.random() * LETRAS_POSIBLES.length))
fila += letraAleatoria + " "
}
}
fila += ""
sopaDeLetrasConBordes += fila + "\n"
}
//sopaDeLetrasConBordes += "   *╰" + "┄".repeat(LADO) + '┄┄' + "╯*"
sopaDeLetrasConBordes = sopaDeLetrasConBordes.replace(/[a-zA-Z]/g, letra => LETRAS_POSIBLES[letra.charCodeAt() - 65] || letra)

await m.reply(`☁�


TAG-TEXT-BLACK: rgba(0, 0, 0, .5);--weui-TAG-BACKGROUND-BLACK: rgba(0, 0, 0, .05);--weui-WHITE: #FFFFFF;--weui-BG: #FFFFFF;--weui-FG: #000;--weui-FG-5: rgba(0, 0, 0, .05);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1)}@media (prefers-color-scheme: dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BG-0: #111111;--weui-BG-1: #1E1E1E;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2C2C2C;--weui-BLUE-100: #10AEFF;--weui-BLUE-120: #0C8BCC;--weui-BLUE-170: #04344D;--weui-BLUE-80: #3FBEFF;--weui-BLUE-90: #28B6FF;--weui-BLUE-BG-100: #48A6E2;--weui-BLUE-BG-110: #4095CB;--weui-BLUE-BG-130: #32749E;--weui-BLUE-BG-90: #5AAFE4;--weui-BRAND-100: #07C160;--weui-BRAND-120: #059A4C;--weui-BRAND-170: #023A1C;--weui-BRAND-80: #38CD7F;--weui-BRAND-90: #20C770;--weui-BRAND-BG-100: #2AAE67;--weui-BRAND-BG-110: #259C5C;--weui-BRAND-BG-130: #1D7A48;--weui-BRAND-BG-90: #3EB575;--weui-FG-0: rgba(255, 255, 255, .8);--weui-FG-0_5: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, 255, .3);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-GLYPH-0: rgba(255, 255, 255, .8);--weui-GLYPH-1: rgba(255, 255, 255, .5);--weui-GLYPH-2: rgba(255, 255, 255, .3);--weui-GLYPH-WHITE-0: rgba(255, 255, 255, .8);--weui-GLYPH-WHITE-1: rgba(255, 255, 255, .5);--weui-GLYPH-WHITE-2: rgba(255, 255, 255, .3);--weui-GLYPH-WHITE-3: #FFFFFF;--weui-GREEN-100: #74A800;--weui-GREEN-120: #5C8600;--weui-GREEN-170: #233200;--weui-GREEN-80: #8FB933;--weui-GREEN-90: #82B01A;--weui-GREEN-BG-100: #789833;--weui-GREEN-BG-110: #6B882D;--weui-GRE


height="20" src="/assets/images/pages/organizer/google.svg">

			`)
	} else {
		qw422016.N().S(`

				Google Finance

			`)
	}
	qw422016.N().S(`

					Other links

				Whois

				SimilarWeb

			`)
	if company.OttaProfileSlug == "" {
		qw422016.N().S(`

				Otta

			`)
	} else {
		qw422016.N().S(`

				Otta

			`)
	}
	qw422016.N().S(`

				<img class="card__links-icon" alt="x


t => {
                if(element.active&&element.getComponent('touchobj') instanceof TouchOne){
                    r.push(element.getComponent('touchobj'));
                }else if(element.childrenCount > 0){
                    c(element)
                }
            });
        }

        c(this.node);
        return r;
    }

    /** 根据位置获取触摸点 */
    getTouchNodesByPos(pos: cc.Vec2, ninclude: TouchOne):TouchOne{
        var nodes = this.getTouchNodes();
        for(let i = 0, bb; i< nodes.length; i++){
            bb = nodes[i].getBoundingBox();
            if(cc.rectContainsPoint(bb, pos)&&ninclude!==nodes[i]){
                return nodes[i];
            }
        }
        return null;
    }

    /** 开启触摸 */
    enable(){
        this.touchAble = true;
    }

    /** 关闭触摸 */
    disable(){
        this.touchAble = false;
    }

    //开始触摸
    onTouchStart(event){
        this.iniTouchNodes();
        if(this.touchAble&&(this.touchId===event.getID()||this.touchId===undefined)){
            let pos = event.getLocation();
            var touchNodes = this.getTouchNodes();
            for(let i = 0, bb; i< touchNodes.length; i++){
                bb = touchNodes[i].getBoundingBox();
                if(cc.rectContainsPoint(bb, pos)){
                    if(this.cTouchNode){
                        this.cTouchNode.restoreState();
                        this.touchId = undefined;
                    }
                    if(touchNodes[i].canTouch()){
                        this.cTouchNode = touchNodes[i];
                        this.cTouchNode.saveState(pos);
                        this.touchId = event.getID();
                        this.touchAMT = 0;
                    }
                    break;
                }
            }
        }
    }

    //触摸移动
    onTouchMove(event){
        if(this.touchAble&&this.touchId===event.getID()&&this.cTouchNode){
            this.touchId = event.getID();
            let pos = event.getLocation();
            var bb = cc.rect(0, -30, cc.winSize.width, cc.winSize.height+30);
            if(!cc.rectContainsRect(bb, this.dragoption.getBoundingBoxToWorld())){
                this.cTouchNode.restoreState();
                this.touchId = undefined;
                this.cTouchNode = null;
            }else if(this._isInUnTouchArea(this.dragoption.getBoundingBoxToWorld())){
                this.cTouchNode.restoreState();
                this.touchId = undefined;
                this.cTouchNode = null;
            }else{
                this.cTouchNode.move(pos);
                this.touchAMT = 0;
            }
            this.game.eventBus.dispatchEvent('handled', null);
        }
    }

    //触摸截止
    onTouchEnd(event){
        if(this.touchAble&&this.touchId===event.getID()&&this.cTouchNode){
            this.touchId = undefined;
            let pos = event.getLocation();
            var target = this.cTouchNode.isToTarget(pos)
            if(target){
                this.cTouchNode.dropAction(target);
                this.cTouchNode = null;
            }else{
                 this.cTouchNode.restoreState();
                 this.cTouchNode = null;
            }
        }
    }

    //触摸取消
    onTouchCancle(event){
        if(this.touchAble&&this.touchId===event.getID()


SFindPrinter,
                          bNavigateToResults, bDefaultFocusCtl);

#else  __PSEARCH_BANDDLG__

    HRESULT hr = E_FAIL;
    ASSERT(BandSite());

    IShellDispatch2* psd2;
    if (SUCCEEDED((hr = CoCreateInstance(CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, IID_IShellDispatch2, (void**)&psd2))))
    {
        hr = psd2->FindPrinter(NULL, NULL, NULL);
        psd2->Release();
    }
    return hr;

#endif __PSEARCH_BANDDLG__

}

STDMETHODIMP CFileSearchBand::FindPeople(
    BOOL bNavigateToResults,
    BOOL bDefaultFocusCtl)
{
    HRESULT hr = E_FAIL;

    IObjectWithSite* pows;
    if (SUCCEEDED((hr = CoCreateInstance(CLSID_SearchAssistantOC, NULL, CLSCTX_INPROC_SERVER, IID_IObjectWithSite, (void**)&pows))))
    {
        if (SUCCEEDED((hr = pows->SetSite(BandSite()))))
        {
            ISearchAssistantOC* psaoc;
            if (SUCCEEDED((hr = pows->QueryInterface(IID_ISearchAssistantOC, (void**)&psaoc))))
            {
                hr = psaoc->FindPeople();
                psaoc->Release();
            }
        }
        pows->Release();
    }
    return hr;
}

STDMETHODIMP CFileSearchBand::FindOnWeb(
    BOOL bNavigateToResults,
    BOOL bDefaultFocusCtl)
{
    HRESULT hr = E_FAIL;

    IObjectWithSite* pows;
    if (SUCCEEDED((hr = CoCreateInstance(CLSID_SearchAssistantOC, NULL, CLSCTX_INPROC_SERVER, IID_IObjectWithSite, (void**)&pows))))
    {
        if (SUCCEEDED((hr = pows->SetSite(BandSite()))))
        {
            ISearchAssistantOC* psaoc;
            if (SUCCEEDED((hr = pows->QueryInterface(IID_ISearchAssistantOC, (void**)&psaoc))))
            {
                hr = psaoc->FindOnWeb();
                psaoc->Release();
            }
        }
        pows->Release();
    }
    return hr;
}

//  Make ourself available to clients of IWebBrowser2 by assigning
//  a VT_UNKNOWN property to the browser.
HRESULT CFileSearchBand::AdvertiseBand(BOOL bAdvertise)
{
    if (!BandSite())
        return E_UNEXPECTED;

    HRESULT hr = E_FAIL;
    IShellBrowser* psb = GetTopLevelBrowser();
    if (psb)
    {
        IWebBrowser2* pwb;
        if (SUCCEEDED((hr = IUnknown_QueryService(psb, SID_SWebBrowserApp, IID_IWebBrowser2, (void**)&pwb))))
        {
            VARIANT var;
            VariantInit(&var);
            WCHAR   wszProperty[GUIDSTR_MAX + 1];

            //  property name: value of CLSID_FileSearchBand.
            EVAL(SUCCEEDED(SHStringFromGUIDW(CLSID_FileSearchBand, wszProperty, ARRAYSIZE(wszProperty))));

            if (bAdvertise)
            {
                if (SUCCEEDED((hr = ((IFileSearchBand*)this)->QueryInterface(IID_IUnknown, (void**)&var.punkVal))))
                {
                    var.vt = VT_UNKNOWN;

                    BSTR bstrProperty;
                    if (NULL == (bstrProperty = SysAllocString(wszProperty)))
                        hr = E_OUTOFMEMORY;
                    else
                    {
                        hr = pwb->PutProperty(bstrProperty, var);
                        SysFreeString(bstrProperty);
                        VariantClear(&var);
                    }
                }
            }


nfigs/rotate/tools/prepare_data.py \
    --input_dirs ${DOTA_ROOT}/train/ ${DOTA_ROOT}/val/ \
    --output_dir ${OUTPUT_DIR}/trainval1024/ \
    --coco_json_file DOTA_trainval1024.json \
    --subsize 1024 \
    --gap 200 \
    --rates 1.0

# 对于无标注的数据进行切图需要设置--image_only
python configs/rotate/tools/prepare_data.py \
    --input_dirs ${DOTA_ROOT}/test/ \
    --output_dir ${OUTPUT_DIR}/test1024/ \
    --coco_json_file DOTA_test1024.json \
    --subsize 1024 \
    --gap 200 \
    --rates 1.0 \
    --image_only

```

### 多尺度切图
使用多尺度进行切图可以使用以下命令：
``` bash
# 对于有标注的数据进行切图
python configs/rotate/tools/prepare_data.py \
    --input_dirs ${DOTA_ROOT}/train/ ${DOTA_ROOT}/val/ \
    --output_dir ${OUTPUT_DIR}/trainval/ \
    --coco_json_file DOTA_trainval1024.json \
    --subsize 1024 \
    --gap 500 \
    --rates 0.5 1.0 1.5

# 对于无标注的数据进行切图需要设置--image_only
python configs/rotate/tools/prepare_data.py \
    --input_dirs ${DOTA_ROOT}/test/ \
    --output_dir ${OUTPUT_DIR}/test1024/ \
    --coco_json_file DOTA_test1024.json \
    --subsize 1024 \
    --gap 500 \
    --rates 0.5 1.0 1.5 \
    --image_only
```

## 安装依赖
旋转框检测模型需要依赖外部算子进行训练，评估等。Linux环境下，你可以执行以下命令进行编译安装
```
cd ppdet/ext_op
python setup.py install
```
Windows环境请按照如下步骤安装：

（1）准备Visual Studio (版本需要>=Visual Studio 2015 update3)，这里以VS2017为例；

（2）点击开始-->Visual Studio 2017-->适用于 VS 2017 的x64本机工具命令提示；

（3）设置环境变量：`set DISTUTILS_USE_SDK=1`

（4）进入`PaddleDetection/ppdet/ext_op`目录，通过`python setup.py install`命令进行安装。

安装完成后，可以执行`ppdet/ext_op/unittest`下的单测验证外部op是否正确安装
# Distillation(蒸馏)

## YOLOv3模型蒸馏
以YOLOv3-MobileNetV1为例，使用YOLOv3-ResNet34作为蒸馏训练的teacher网络, 对YOLOv3-MobileNetV1结构的student网络进行蒸馏。
COCO数据集作为目标检测任务


         "simulation": True,
            "puzzle_id": puzzle_id,
            "guess": guess_request.guess,
            **result
        }

    except ValueError as e:
        raise HTTPException(status_code=400, detail=str(e))
    except ItemNotFoundError as e:
        raise HTTPException(status_code=404, detail=str(e))
    except Exception as e:
        logger.error(f"Error simulating guess: {e}")
        raise HTTPException(status_code=500, detail="Internal server error")

# Health check endpoint
@router.get("/health")
async def health_check():
    """Health check endpoint for the game API"""
    return {
        "status": "healthy",
        "service": "game-api",
        "timestamp": puzzle_service.get_today_date()
    }


 v1.V4S(), 6))
TEST_NEON(rshrn2_2, rshrn2(v0.V4S(), v1.V2D(), 12))
TEST_NEON(rsubhn_0, rsubhn(v0.V8B(), v1.V8H(), v2.V8H()))
TEST_NEON(rsubhn_1, rsubhn(v0.V4H(), v1.V4S(), v2.V4S()))
TEST_NEON(rsubhn_2, rsubhn(v0.V2S(), v1.V2D(), v2.V2D()))
TEST_NEON(rsubhn2_0, rsubhn2(v0.V16B(), v1.V8H(), v2.V8H()))
TEST_NEON(rsubhn2_1, rsubhn2(v0.V8H(), v1.V4S(), v2.V4S()))
TEST_NEON(rsubhn2_2, rsubhn2(v0.V4S(), v1.V2D(), v2.V2D()))
TEST_NEON(sabal_0, sabal(v0.V8H(), v1.V8B(), v2.V8B()))
TEST_NEON(sabal_1, sabal(v0.V4S(), v1.V4H(), v2.V4H()))
TEST_NEON(sabal_2, sabal(v0.V2D(), v1.V2S(), v2.V2S()))
TEST_NEON(sabal2_0, sabal2(v0.V8H(), v1.V16B(), v2.V16B()))
TEST_NEON(sabal2_1, sabal2(v0.V4S(), v1.V8H(), v2.V8H()))
TEST_NEON(sabal2_2, sabal2(v0.V2D(), v1.V4S(), v2.V4S()))
TEST_NEON(saba_0, saba(v0.V8B(), v1.V8B(), v2.V8B()))
TEST_NEON(saba_1, saba(v0.V16B(), v1.V16B(), v2.V16B()))
TEST_NEON(saba_2, saba(v0.V4H(), v1.V4H(), v2.V4H()))
TEST_NEON(saba_3, saba(v0.V8H(), v1.V8H(), v2.V8H()))
TEST_NEON(saba_4, saba(v0.V2S(), v1.V2S(), v2.V2S()))
TEST_NEON(saba_5, saba(v0.V4S(), v1.V4S(), v2.V4S()))
TEST_NEON(sabdl_0, sabdl(v0.V8H(), v1.V8B(), v2.V8B()))
TEST_NEON(sabdl_1, sabdl(v0.V4S(), v1.V4H(), v2.V4H()))
TEST_NEON(sabdl_2, sabdl(v0.V2D(), v1.V2S(), v2.V2S()))
TEST_NEON(sabdl2_0, sabdl2(v0.V8H(), v1.V16B(), v2.V16B()))
TEST_NEON(sabdl2_1, sabdl2(v0.V4S(), v1.V8H(), v2.V8H()))
TEST_NEON(sabdl2_2, sabdl2(v0.V2D(), v1.V4S(), v2.V4S()))
TEST_NEON(sabd_0, sabd(v0.V8B(), v1.V8B(), v2.V8B()))
TEST_NEON(sabd_1, sabd(v0.V16B(), v1.V16B(), v2.V16B()))
TEST_NEON(sabd_2, sabd(v0.


 从body中清除字段
 * @param keys 字段列表
 */
function paramClean(keys: string[]): RequestHandler {
    const km = {};
    for (let k of keys) {
        km[k] = true;
    }
    return function(req, res, next) {
        for (let k in req.body) {
            if (!km[k]) {
                delete req.body[k];
            }
        }
        next();
    };
}

/**
 * 生成参数验证函数
 * @param k 参数key
 * @param param
 */
function paramCheck(k: string, param: GreenParam): RequestHandler {
    let { need, def, enum: enu, type: typ, opts } = param;
    if (need || def || param.len || param.range || param.reg || enu || typ || opts) {
        let lbl = param.lbl || param.rem;
        const name = lbl || k;
        let len = param.len ? (Array.isArray(param.len) ? param.len : [param.len]) : null;
        let range = param.range ? (Array.isArray(param.range) ? param.range : [param.range]) : null;
        let reg: RegExp;
        if (param.reg) {
            try {
                reg = new RegExp(param.reg);
            } catch (error) {
                devLogger.error(`parse param.${k}.reg error: ${error}`);
            }
        }

        function checkFn(body: { [x: string]: any }) {
            let value = body[k];
            if (def != null && value == null) {
                body[k] = def;
                return;
            }
            if (value == null || value === "") {
                if (need instanceof Array) {
                    for (let i = 0; i < need.length; i++) {
                        if (body[need[i]] == null)
                            return `${name}是必填项`;
                    }
                }
                else if (typeof need === "string" ? body[need] == null : need)
                    return `${name}是必填项`;
            } else {
                if (typ && value != null) {
                    switch (typ) {
                        case "int":
                            if (value == 'true') value = 1;
                            else if (value == 'false') value = 0;
                            value = +value;
                            if (isNaN(value)) return `${name}必须是整数`;
                            body[k] = Math.floor(value);
                            break;
                        case "float":
                            value = +value;
                            if (isNaN(value)) return `${name}必须是数字`;
                            body[k] = value;
                            break;
                        case "array":
                            if (typeof value !== "object") {
                                try {
                                    value = body[k] = JSON.parse(value);
                                } catch (error) {
                                    return `${name}类型必须是array`;
                                }
                            }
                            if (!(value instanceof Array)) return `${name}必须是数组`;
                            break;
                        case "str":
                            if (value && typeof value !== "string") {
                                body[k] = JSON.stringify(value);
                            }
                            break;
                        case "json":
                            if (typeof value !== "object") {
                                try {
                                    value = body[k] = JSON.parse(value);
                                } catch (error) {
                                    return `${name}类型必须是json`;


'<gv', vim.tbl_extend('force', opts, { desc = '向左缩进' }))
keymap.set('v', '>', '>gv', vim.tbl_extend('force', opts, { desc = '向右缩进' }))

-- 将 C-[ 映射为 Esc 并退出终端
keymap.set('i', '<C-[>', '<Esc>', vim.tbl_extend('force', opts, { desc = '在插入模式下使用 C-[ 替代 Esc' }))
keymap.set('v', '<C-[>', '<Esc>', vim.tbl_extend('force', opts, { desc = '在可视模式下使用 C-[ 替代 Esc' }))
keymap.set('n', '<C-[>', '<Esc>', vim.tbl_extend('force', opts, { desc = '在普通模式下使用 C-[ 替代 Esc' }))

vim.keymap.set('n', '<leader>t', ':ToggleTerm<CR>', {
  noremap = true,
  silent = true,
  desc = "打开/关闭终端"
})
vim.keymap.set('t', '<C-.>', [[<C-\><C-n>]], { silent = true ,desc="终端模式切换到normal模式"})

local map = vim.api.nvim_set_keymap

map('n', '<c-2>', '<Plug>(cokeline-switch-prev)', vim.tbl_extend('force', opts, {
    desc = '将标签页向右移动'
}))

-- 将当前标签页 (buffer) 向左移动
map('n', '<c-1>', '<Plug>(cokeline-switch-next)', vim.tbl_extend('force', opts, {
    desc = '将标签页向左移动'
}))

map("n", "<S-Tab>", "<Plug>(cokeline-focus-prev)", { silent = true })
map("n", "<Tab>", "<Plug>(cokeline-focus-next)", { silent = true })

for i = 1, 9 do
  map(
    "n",
    ("<F%s>"):format(i),
    ("<Plug>(cokeline-focus-%s)"):format(i),
    { silent = true }
  )
  map(
    "n",
    ("<Leader>%s"):format(i),
    ("<Plug>(cokeline-switch-%s)"):format(i),
    { silent = true }
  )
end

-- 运行 / 用例 / 下载（全部以 <leader>c 开头）
vim.keymap.set('n', '<leader>r',  '<cmd>CompetiTest run<cr>',              opts) -- 编译+运行全部测试
vim.keymap.set('n', '<leader>c',  '<cmd>CompetiTest run_no_compile<cr>',   opts) -- 仅运行
vim.keymap.set('n', '<leader>a',  '<cmd>CompetiTest add_testcase<cr>',     opts) -- 添加用例
vim.keymap.set('n', '<leader>ea',  '<cmd>CompetiTest edit_testcase<cr>',    opts) -- 编辑用例
vim.keymap.set('n', '<leader>da',  '<cmd>CompetiTest delete_testcase<cr>',  opts) -- 删除用例
vim.keymap.set('n', '<leader>cp',  '<cmd>CompetiTest receive problem<cr>',  opts) -- 下载单题
vim.keymap.set


50bb, U+50bd, U+50c0, U+50c2-50c4, U+50c7, U+50c9-50ca, U+50cc, U+50ce, U+50d0-50d1, U+50d3-50d4, U+50d6, U+50d8-50d9, U+50dc;
}

/* [50] */
@font-face {
    font-family: 'GenJyuuGothicX';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(./GenJyuuGothicX-Regular-7e9696c772dbd2be53fce44190368ec7877ee7b4f2fd72e6dc2cc2820d4bd4cb-50.woff2) format('woff2');
    unicode-range: U+4093, U+4103, U+4105, U+4148, U+414f, U+4163, U+41b4, U+41bf, U+41e6, U+41ee, U+41f3, U+4207, U+420e, U+4264, U+4293, U+42c6, U+42d6, U+42dd, U+4302, U+432b, U+4343, U+43ee, U+43f0, U+4408, U+440c, U+4417, U+441c, U+4422, U+4453, U+445b, U+4476, U+447a, U+4491, U+44b3, U+44be, U+44d4, U+4508, U+450d, U+4525, U+4543, U+457a, U+459d, U+45b8, U+45be, U+45e5, U+45ea, U+460f-4610, U+4641, U+4665, U+46a1, U+46ae-46af, U+470c, U+471f, U+4764, U+47e6, U+47fd, U+4816, U+481e, U+4844, U+484e, U+48b5, U+49b0, U+49e7, U+49fa, U+4a04, U+4a29, U+4abc, U+4b38, U+4b3b, U+4b7e, U+4bc2, U+4bca, U+4bd2, U+4be8, U+4c17, U+4c20, U+4c38, U+4cc4, U+4cd1, U+4ce1, U+4d07, U+4d77, U+4e02, U+4e04-4e05, U+4e0c, U+4e0f-4e12, U+4e15, U+4e17, U+4e19, U+4e1e-4e1f, U+4e23-4e24, U+4e28-4e2c, U+4e2e-4e31, U+4e35-4e37, U+4e3f-4e42, U+4e44, U+4e47-4e48, U+4e4d-4e4e, U+4e51, U+4e55-4e56, U+4e58, U+4e5a-4e5c, U+4e62-4e63, U+4e68-4e69, U+4e74-4e75, U+4e79, U+4e7f, U+4e82, U+4e85, U+4e8a, U+4e8d-4e8e, U+4e96-4e99, U+4e9d-4ea0, U+4ea2, U+4ea5-4ea6, U+4ea8, U+4eaf-4eb0, U+4eb3, U+4eb6, U+4eb9, U+4ebb-4ebc, U+4ec2-4ec4, U+4ec6-4ec8, U+4ecd,


),
          OnBuilder.data(
            listenTo: computedCounter,
            builder: (_) => Text('rebuilder :${computedCounter.state}'),
          ),
        ],
      ),
    );
  }
}

class CounterApp1 extends StatelessWidget {
  const CounterApp1({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Directionality(
      textDirection: TextDirection.ltr,
      child: Column(
        children: [
          //this is an example fo a computed counter the depends on another computed counter
          OnBuilder.orElse(
            listenTo: anOtherComputedCounter,
            onWaiting: () => Text('Waiting...'),
            onError: (e, _) => Text(e.message),
            orElse: (_) {
              computedCounterNbrOfRebuilds++;
              return Text(anOtherComputedCounter.state);
            },
          ),
        ],
      ),
    );
  }
}

void main() {
  setUp(() {
    counter1NbrOfRebuilds = 0;
    counter2NbrOfRebuilds = 0;
    computedCounterNbrOfRebuilds = 0;
    counter1.injectMock(() => Counter1(incrementBy: 2));
    counter2.injectMock(() => Counter2());
  });

  testWidgets('initial state ', (tester) async {
    await tester.pumpWidget(CounterApp());
    //
    expect(find.text('counter1 :0'), findsNWidgets(1));
    expect(find.text('Idle'), findsNWidgets(1));
    expect(find.text('computedCounter :0'), findsNWidgets(1));
    //
    expect(counter1NbrOfRebuilds, 1);
    expect(counter2NbrOfRebuilds, 0);
    expect(computedCounterNbrOfRebuilds, 1);
  });

  testWidgets('increment one counter, change the computed counter',
      (tester) async {
    await tester.pumpWidget(CounterApp());
    //
    counter1.setState((s) => s.increment());
    await tester.pump();
    expect(find.text('counter1 :2'), findsNWidgets(1));
    expect(find.text('Idle'), findsNWidgets(1));
    expect(find.text('computedCounter :0'), findsNWidgets(1));
    expect(counter1NbrOfRebuilds, 2);
    expect(counter2NbrOfRebuilds, 0);
    //computed counter did not change (1*0 =0) so its listeners are not rebuilt.
    expect(computedCounterNbrOfRebuilds, 1);
    //
    counter2.setState((s) => s.increment());
    await tester.pump();
    expect(find.text('counter1 :2'), findsNWidgets(1));
    //both counter 2 and computed counter are waiting
    expect(find.text('Waiting...'), findsNWidgets(2));
    expect(counter1NbrOfRebuilds, 2);
    expect(counter2NbrOfRebuilds, 0);
    expect(computedCounterNbrOfRebuilds, 1);
    //
    await tester.pump(Duration(seconds: 1));
    expect(find.text('counter1 :2'), findsNWidgets(1));
    expect(find.text('counter2 :1'), findsNWidgets(1));
    expect(find.text('computedCounter :2'), findsNWidgets(1));
    expect(counter1NbrOfRebuilds, 2);
    expect(counter2NbrOfRebuilds, 1);
    expect(computedCounterNbrOfRebuilds, 2);
  });

  testWidgets('counter2 throws error', (tester) async {
    counter2.injectMock(() => Counter2(shouldThrow: true));

    await tester.pumpWidget(CounterApp());
    expect(find.text('rebuilder :0'), findsNWidgets(1));

    //
    cou


 "水", "sc": 11, "l": 5, "f": 3263},
  {"h": "尧", "p": "yáo", "sp": "yao", "r": "儿", "sc": 6, "l": 5, "f": 3264},
  {"h": "蕊", "p": "ruǐ", "sp": "rui", "r": "艸", "sc": 15, "l": 5, "f": 3265},
  {"h": "烘", "p": "hōng", "sp": "hong", "r": "火", "sc": 10, "l": 5, "f": 3266},
  {
    "h": "璋",
    "p": "zhāng",
    "sp": "zhang",
    "r": "玉",
    "sc": 15,
    "l": 5,
    "f": 3267
  },
  {"h": "亢", "p": "kàng", "sp": "kang", "r": "亠", "sc": 4, "l": 5, "f": 3268},
  {"h": "轧", "p": "yà", "sp": "ya", "r": "車", "sc": 5, "l": 5, "f": 3269},
  {"h": "赂", "p": "lù", "sp": "lu", "r": "貝", "sc": 10, "l": 5, "f": 3270},
  {
    "h": "蝗",
    "p": "huáng",
    "sp": "huang",
    "r": "虫",
    "sc": 15,
    "l": 5,
    "f": 3271
  },
  {"h": "榆", "p": "yú", "sp": "yu", "r": "木", "sc": 13, "l": 5, "f": 3272},
  {"h": "骏", "p": "jùn", "sp": "jun", "r": "馬", "sc": 10, "l": 5, "f": 3273},
  {"h": "诛", "p": "zhū", "sp": "zhu", "r": "言", "sc": 8, "l": 5, "f": 3274},
  {"h": "勺", "p": "sháo", "sp": "shao", "r": "勹", "sc": 3, "l": 5, "f": 3275},
  {"h": "梵", "p": "fàn", "sp": "fan", "r": "木", "sc": 11, "l": 5, "f": 3276},
  {"h": "炽", "p": "chì", "sp": "chi", "r": "火", "sc": 9, "l": 5, "f": 3277},
  {"h": "笠", "p": "lì", "sp": "li", "r": "竹", "sc": 11, "l": 5, "f": 3278},
  {"h": "颌", "p": "hé", "sp": "he", "r": "頁", "sc": 12, "l": 5, "f": 3279},
  {"h": "闸", "p": "zhá", "sp": "zha", "r": "門", "sc": 8, "l": 5, "f": 3280},
  {"h": "狒", "p": "fèi", "sp": "fei", "r": "犬", "sc": 8, "l": 5, "f": 3281},
  {"h": "樊", "p": "fán", "sp": "fan", "r": "木", "sc": 15, "l": 5, "f": 3282},
  {"h": "镕", "p": "róng", "sp": "rong", "r": "金", "sc": 15, "l": 5, "f": 3283},
  {"h": "垢", "p": "gòu", "sp


new System.Windows.Forms.Panel();
         this._labelTestProgressInfo = new System.Windows.Forms.Label();
         this._labelNewOldErrors = new System.Windows.Forms.Label();
         this._progressBarTest = new System.Windows.Forms.ProgressBar();
         this._labelTestErrorWarning = new System.Windows.Forms.Label();
         this._label4 = new System.Windows.Forms.Label();
         this._labelTestInformation = new System.Windows.Forms.Label();
         this._linkLogFile = new System.Windows.Forms.LinkLabel();
         this._linkLogDir = new System.Windows.Forms.LinkLabel();
         this._groupBoxBackground = new System.Windows.Forms.GroupBox();
         this._groupBox3.SuspendLayout();
         this._groupBox2.SuspendLayout();
         this._panel2.SuspendLayout();
         this._groupBoxBackground.SuspendLayout();
         this.SuspendLayout();
         //
         // mainMenu1
         //
         this._mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this._menuItemFile,
            this._menuItemTest,
            this._menuItemHelp});
         //
         // menuItemFile
         //
         this._menuItemFile.Index = 0;
         this._menuItemFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this._miOptions,
            this._miLaunchRTFXAMLVIEW,
            this._miLaunchWord,
            this._menuItem10,
            this._menuItem7});
         this._menuItemFile.Text = "&File";
         //
         // miOptions
         //
         this._miOptions.Index = 0;
         this._miOptions.Text = "&Options";
         this._miOptions.Click += new System.EventHandler(this.menuItem2_Click);
         //
         // miLaunchRTFXAMLVIEW
         //
         this._miLaunchRTFXAMLVIEW.Index = 1;
         this._miLaunchRTFXAMLVIEW.Text = "Launch RtfXamlView";
         //
         // miLaunchWord
         //
         this._miLaunchWord.Index = 2;
         this._miLaunchWord.Text = "Launch Word";
         //
         // menuItem10
         //
         this._menuItem10.Index = 3;
         this._menuItem10.Text = "-";
         //
         // menuItem7
         //
         this._menuItem7.Index = 4;
         this._menuItem7.Text = "&Close";
         this._menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
         //
         // menuItemTest
         //
         this._menuItemTest.Index = 1;
         this._menuItemTest.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this._miRtfXamlBVT,
            this._miRTXamlBVT,
            this._miRTRtfBVT,
            this._miOldBVT});
         this._menuItemTest.Text = "&Test";
         //
         // miRtfXamlBVT
         //
         this._miRtfXamlBVT.Index = 0;
         this._miRtfXamlBVT.Text = "Rtf to Xaml bvt";
         this._miRtfXamlBVT.Click += new System.EventHandler(this.menuItem9_Click);
         //
         // miRTXamlBVT
         //
         this._miRTXamlBVT.Index = 1;
         this._miRTXamlBVT.Text = "Xaml to Xaml BVT";
         this._miRTXamlBVT.Click += new System.EventHandler(this.menuItem11_Click);
         //
         // miRTRtfBVT
         //
         this._miRTRtfBVT.Index = 2;
         this._miRTRtfBVT.Text = "Rtf To Rtf BVT";
         //
         // miOldBVT
         //
         this._miOldBVT.Index = 3;


	cl := membership.NewCluster("")
	cl.SetStore(store.New())
	for i := 1; i <= 3; i++ {
		cl.AddMember(&membership.Member{ID: types.ID(i)})
	}
	srv := &EtcdServer{
		id: 1,
		r: raftNode{
			Node:      newNodeNop(),
			transport: rafthttp.NewNopTransporter(),
		},
		cluster: cl,
	}
	cc := raftpb.ConfChange{
		Type:   raftpb.ConfChangeRemoveNode,
		NodeID: 2,
	}
	// remove non-local member
	shouldStop, err := srv.applyConfChange(cc, &raftpb.ConfState{})
	if err != nil {
		t.Fatalf("unexpected error %v", err)
	}
	if shouldStop {
		t.Errorf("shouldStop = %t, want %t", shouldStop, false)
	}

	// remove local member
	cc.NodeID = 1
	shouldStop, err = srv.applyConfChange(cc, &raftpb.ConfState{})
	if err != nil {
		t.Fatalf("unexpected error %v", err)
	}
	if !shouldStop {
		t.Errorf("shouldStop = %t, want %t", shouldStop, true)
	}
}

// TestApplyMultiConfChangeShouldStop ensures that apply will return shouldStop
// if the local member is removed along with other conf updates.
func TestApplyMultiConfChangeShouldStop(t *testing.T) {
	cl := membership.NewCluster("")
	cl.SetStore(store.New())
	for i := 1; i <= 5; i++ {
		cl.AddMember(&membership.Member{ID: types.ID(i)})
	}
	srv := &EtcdServer{
		id: 2,
		r: raftNode{
			Node:      newNodeNop(),
			transport: rafthttp.NewNopTransporter(),
		},
		cluster: cl,
		w:       wait.New(),
	}
	ents := []raftpb.Entry{}
	for i := 1; i <= 4; i++ {
		ent := raftpb.Entry{
			Term:  1,
			Index: uint64(i),
			Type:  raftpb.EntryConfChange,
			Data: pbutil.MustMarshal(
				&raftpb.ConfChange{
					Type:   raftpb.ConfChangeRemoveNode,
					NodeID: uint64(i)}),
		}
		ents = append(ents, ent)
	}

	_, _, shouldStop := srv.apply(ents, &raftpb.ConfState{})
	if !shouldStop {
		t.Errorf("shouldStop = %t, want %t", shouldStop, true)
	}
}

func TestDoProposal(t *testing.T) {
	tests := []pb.Request{
		{Method: "POST", ID: 1},
		{Method: "PUT", ID: 1},
		{Method: "DELETE", ID: 1},
		{Method: "GET", ID: 1, Quorum: true},
	}
	for i, tt := range tests {
		st := mockstore.NewRecorder()
		srv := &EtcdServer{
			Cfg: &ServerConfig{TickMs: 1},
			r: raftNode{
				Node:        newNodeCommitter(),
				storage:     mockstorage.NewStorageRecorder(""),
				raftStorage: raft.NewMemoryStorage(),
				transport:   rafthttp.NewNopTransporter(),
			},
			store:    st,
			reqIDGen: idutil.NewGenerator(0, time.Time{}),
		}
		srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
		srv.start()
		resp, err := srv.Do(context.Background(), tt)
		srv.Stop()

		action := st.Action()
		if len(action) != 1 {
			t.Err


7.3em;
  }

  100% {
    top: 7.3em;
  }
}

@-moz-keyframes shape_bars {
  0% {
    top: -20em;
  }

  10% {
    top: -16em;
  }

  82% {
    top: 7.3em;
  }

  100% {
    top: 7.3em;
  }
}

@keyframes shape_bars {
  0% {
    top: -20em;
  }

  10% {
    top: -16em;
  }

  82% {
    top: 7.3em;
  }

  100% {
    top: 7.3em;
  }
}

@-webkit-keyframes shape_bars_rotate {
  0% {
    bottom: -20em;
  }

  10% {
    bottom: -16em;
  }

  82% {
    bottom: 7.3em;
  }

  100% {
    bottom: 7.3em;
  }
}

@-moz-keyframes shape_bars_rotate {
  0% {
    bottom: -20em;
  }

  10% {
    bottom: -16em;
  }

  82% {
    bottom: 7.3em;
  }

  100% {
    bottom: 7.3em;
  }
}

@keyframes shape_bars_rotate {
  0% {
    bottom: -20em;
  }

  10% {
    bottom: -16em;
  }

  82% {
    bottom: 7.3em;
  }

  100% {
    bottom: 7.3em;
  }
}

@-webkit-keyframes text_large {
  0% {
    color: #9f0200;
    text-shadow: 0 0 .3em rgba(159,2,0,.1),.1em .1em .3em rgba(159,2,0,.1),-.1em .1em .3em rgba(159,2,0,.1),-.1em -.1em .3em rgba(159,2,0,.1),.1em -.1em .3em rgba(159,2,0,.1),.1em 0 .3em rgba(159,2,0,.1),-.1em 0 .3em rgba(159,2,0,.1),0 .1em .3em rgba(159,2,0,.1),0 -.1em .3em rgba(159,2,0,.1);
  }

  10% {
    text-shadow: 0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0);
  }

  65.9% {
    color: #9f0200;
    text-shadow: 0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0),0 0 0 rgba(159,2,0,0);
  }

  66% {
    color: #cd3d07;
    text-shadow: 0 0 1em rgba(159,2,0,.9),.5em .5em 1em rgba(159,2,0,.9),-.5em .5em 1em rgba(159,2,0,.9),-.5em -.5em 1em rgba(159,2,0,.9),.5em -.5em 1em rgba(159,2,0,.9),.5em 0 1em rgba(159,2,0,.9),-.5em 0 1em rgba(159,2,0,.9),0 .5em 1em rgba(159,2,0,.9),0 -.5em 1em rgba(159,2,0,.9);
  }

  75% {
    color: #cd3d07;
  }

  100% {
    color: #9f0200;
    text-shadow: 0 0 .3em rgba(159,2,0,.1),.1em .1em .3em rgba(159,2