id);
          expect(proposalDetailsAt0[1]).to.be.deep.equal(this.proposal.targets);
          expect(proposalDetailsAt0[2].map(x => x.toString())).to.be.deep.equal(this.proposal.values);
          expect(proposalDetailsAt0[3]).to.be.deep.equal(this.proposal.fulldata);
          expect(proposalDetailsAt0[4]).to.be.equal(this.proposal.descriptionHash);

          const proposalDetailsForId = await this.mock.proposalDetails(this.proposal.id);
          expect(proposalDetailsForId[0]).to.be.deep.equal(this.proposal.targets);
          expect(proposalDetailsForId[1].map(x => x.toString())).to.be.deep.equal(this.proposal.values);
          expect(proposalDetailsForId[2]).to.be.deep.equal(this.proposal.fulldata);
          expect(proposalDetailsForId[3]).to.be.equal(this.proposal.descriptionHash);
        });
      });

      it('queue and execute by id', async function () {
        await this.helper.propose();
        await this.helper.waitForSnapshot();
        await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 });
        await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 });
        await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 });
        await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 });
        await this.helper.waitForDeadline();
        const txQueue = await this.mock.queue(this.proposal.id);
        await this.helper.waitForEta();
        const txExecute = await this.mock.execute(this.proposal.id);

        expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id });
        await expectEvent.inTransaction(txQueue.tx, this.timelock, 'CallScheduled', { id: this.proposal.timelockid });
        await expectEvent.inTransaction(txQueue.tx, this.timelock, 'CallSalt', {
          id: this.proposal.timelockid,
        });

        expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id });
        await expectEvent.inTransaction(txExecute.tx, this.timelock, 'CallExecuted', { id: this.proposal.timelockid });
        await expectEvent.inTransaction(txExecute.tx, this.receiver, 'MockFunctionCalled');
      });

      it('cancel by id', async function () {
        await this.helper.propose();
        const txCancel = await this.mock.cancel(this.proposal.id);
        expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id });
      });
    });
  }
});
const { expectEvent, time } = require('@openzeppelin/test-helpers');
const { expect } = require('chai');

const Enums = require('../../helpers/enums');
const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance');
const { expectRevertCustomError } = require('../../helpers/customError');
const { clockFromReceipt } = require('../../helpers/time');
const { selector } = require('../../helpers/methods');

const AccessManager = artifacts.require('$AccessManager');
const Governor = artifacts.require('$GovernorTimelockAccessMock');
const AccessManagedTarget = artifacts.require('$AccessManagedTarget');

const TOKENS = [
  { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' },
  { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' },
];

const hashOperation = (caller, target, data) =>
  web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [c


tps://www.jianshu.com/u/130f76596b02)

强化学习（RL）如今是机器学习的一大令人激动的领域，也是最老的领域之一。自从 1950 年被发明出来后，它被用于一些有趣的应用，尤其是在游戏（例如 TD-Gammon，一个西洋双陆棋程序）和机器控制领域，但是从未弄出什么大新闻。直到 2013 年一个革命性的发展：来自英国的研究者发起了 Deepmind 项目，这个项目可以学习去玩任何从头开始的 Atari 游戏，在多数游戏中，比人类玩的还好，它仅使用像素作为输入而没有使用游戏规则的任何先验知识。这是一系列令人惊叹的壮举中的第一个，并在 2016 年 3 月以他们的系统 AlphaGo 战胜了世界围棋冠军李世石而告终。从未有程序能勉强打败这个游戏的大师，更不用说世界冠军了。今天，RL 的整个领域正在沸腾着新的想法，其都具有广泛的应用范围。DeepMind 在 2014 被谷歌以超过 5 亿美元收购。

DeepMind 是怎么做到的呢？事后看来，原理似乎相当简单：他们将深度学习运用到强化学习领域，结果却超越了他们最疯狂的设想。在本章中，我们将首先解释强化学习是什么，以及它擅长于什么，然后我们将介绍两个在深度强化学习领域最重要的技术：策略梯度和深度 Q 网络（DQN），包括讨论马尔可夫决策过程（MDP）。我们将使用这些技术来训练一个模型来平衡移动车上的杆子；然后，我会介绍 TF-Agents 库，这个库利用先进的算法，可以大大简化创建 RL 系统，然后我们会用这个系统来玩 Breakout，一个著名的 Atari 游戏。本章最后，会介绍强化学习领域的最新进展。

## 学习优化奖励

在强化学习中，智能体在环境（environment）中观察（observation）并且做出决策（action），随后它会得到奖励（reward）。它的目标是去学习如何行动能最大化**期望奖励**。如果你不在意拟人化的话，可以认为正奖励是愉快，负奖励是痛苦（这样的话奖励一词就有点误导了）。总之，智能体在环境中行动，并且在实验和错误中去学习最大化它的愉快，最小化它的痛苦。

这是一个相当广泛的设置，可以适用于各种各样的任务。以下是几个例子（详见图 16-1）：

1.  智能体可以是控制一个机器人的程序。在此例中，环境就是真实的世界，智能体通过许多的传感器例如摄像机或者触觉传感器来观察，它可以通过给电机发送信号来行动。它可以被编程设置为如果到达了目的地就得到正奖励，如果浪费时间，或者走错方向，或摔倒了就得到负奖励。

2.  智能体可以是控制 Ms.Pac-Man 的程序。在此例中，环境是 Atari 游戏的模拟器，行为是 9 个操纵杆位（上下左右中间等等），观察是屏幕，回报就是游


"""
Visualization data creation and formatting.
"""

from typing import Dict, List
from ..core.world_spec import WorldSpec
from ..visualization.color_schemes import _get_building_color, _get_feature_color, _get_terrain_color_map

def _create_visualization_data(world_spec: WorldSpec) -> Dict:
    """Create visualization metadata for the world"""

    return {
        "2d_layout": {
            "image_path": f"layouts/{world_spec.theme}_{len(world_spec.buildings)}_buildings.png",
            "width": world_spec.size[0],
            "height": world_spec.size[1]
        },
        "building_markers": [
            {
                "id": b["id"],
                "x": b["position"]["x"],
                "y": b["position"]["y"],
                "type": b["type"],
                "importance": b["properties"].get("importance", "normal"),
                "color": _get_building_color(b["type"]),
                "size": b["scale"]
            }
            for b in world_spec.buildings
        ],
        "path_lines": [
            {
                "id": p["id"],
                "start": [p["start"]["x"], p["start"]["y"]],
                "end": [p["end"]["x"], p["end"]["y"]],
                "width": p["width"],
                "color": "#8B4513" if p["surface_type"] == "dirt" else "#696969",
                "type": p["properties"]["type"]
            }
            for p in world_spec.paths
        ],
        "natural_features": [
            {
                "id": f["id"],
                "x": f["position"]["x"],
                "y": f["position"]["y"],
                "type": f["type"],
                "color": _get_feature_color(f["type"]),
                "interactive": f["properties"].get("interactive", False)
            }
            for f in world_spec.natural_features
        ],
        "spawn_points": [
            {
                "x": sp["x"],
                "y": sp["y"],
                "type": sp["type"],
                "color": "#00FF00"
            }
            for sp in world_spec.spawn_points
        ],
        "terrain_colors": _get_terrain_color_map(world_spec.theme),
        "legend": _create_visualization_legend(world_spec)
    }

def _create_visualization_legend(world_spec: WorldSpec) -> Dict:
    """Create legend for visualization"""
    return {
        "buildings": list(set(b["type"] for b in world_spec.buildings)),
        "features": list(set(f["type"] for f in world_spec.natural_features)),
        "terrain": list(set(t for row in world_spec.terrain_map for t in row)),
        "theme": world_spec.theme,
        "scale": "1 unit = 1 meter"
    }

def _calculate_complexity(buildings: List[Dict], paths: List[Dict]) -> float:
    """Calculate design complexity score"""
    building_score = len(buildings) * 1.0
    path_score = len(paths) * 0.5

    # Bonus for variety
    building_types = len(set(b["type"] for b in buildings))
    variety_bonus = building_types * 0.3

    return building_score + path_score + variety_bonus


cing: 0.544px;visibility: visible;">未公开

危害描述：攻击者可通过诱导用户打开恶意链接来利用此漏洞，从而获取敏感信息或代码执行。

**0****1**

**漏洞详情**

**>**
**>**
**>**
**>**

**影响组件**

Chrome是一款由Google公司开发的免费的、快速的互联网浏览器软件，目标是为使用者提供稳定、安全、高效的网络浏览体验。Google Chrome基于更强大的JavaScript V8引擎，提升浏览器的处理速度。支持多标签浏览，每个标签页面都在独立的“沙箱”内运行。libvpx是开源的视频编解码器库，可以同时支持VP8和VP9视频编码。

**>**
**>**
**>**
**>**

**漏洞描述**

近日，奇安信CERT监测到Google 发布公告称**Google Chrome V8类型混淆漏洞(CVE-2024-4947)**存在在野利用，远程攻击者可通过诱导用户打开恶意链接来利用此漏洞，从而获取敏感信息或代码执行。**目前，此漏洞已检测到在野利用。**
**鉴于此漏洞影响范围较大，建议客户尽快做好自查及防护。**
****

**02**

**影响范围**

**>**
**>**
**>**
**>**

**影响版本**

Google Chrome(Windows/Mac) < 125.0.6422.60/.61

Google Chrome(Linux) < 125.0.6422.60

**>**
**>**
**>**
**>**

**其他受影响组件**

无

**03**

**处置建议**

**>**
**>**
**>**
**>**

**安全更新


>            android:configChanges=\"orientation|screenSize|screenLayout|keyboardHidden|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|layoutDirection|locale|mcc|navigation|smallestScreenSize|touchscreen|uiMode\"
            android:exported=\"true\">
            <intent-filter>
                <action android:name=\"android.intent.action.MAIN\" />

                <category android:name=\"android.intent.category.LAUNCHER\" />
            </intent-filter>
        </activity>
    </application>

</manifest>
\n
Desktop
\n
In the desktopMain source set, update\u00a0main.kt:
\n
// composeApp/src/desktopMain/kotlin/main.kt
import androidx.compose.ui.window.application

fun main() = application {
    initKoin()
    App()
}
\n
iOS
\n
In the iosMain source set, configure Koin in MainViewController.kt:
\n
// composeApp/src/iosMain/kotlin/MainViewController.kt
import androidx.compose.ui.platform.ComposeUIViewController

fun MainViewController() = ComposeUIViewController(
    configure = {
        initKoin()
    }
) {
    App()
}
\n
Step 5: Initialize ViewModel in Compose Using\u00a0Koin
\n
To connect the ViewModel with your UI, use koinViewModelto inject the ViewModel. Update App.kt in the commonMain source set to initialize the CounterViewModel and set up the UI with a text view, increment, and decrement buttons and Finally we need to wrap our composable screens within KoinContext composable.
\n
// composeApp/src/commonMain/kotlin/App.kt
import androidx.compose.runtime.Composable
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.collectAsState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import org.koin.compose.KoinContext
import org.koin.compose.viewmodel.koinViewModel

@Composable
fun App() {
    KoinContext {
        val viewModel = koinViewModel<CounterViewModel>()

        val counterValueState by viewModel.counter.collectAsState()

        Column(
            modifier = Modifier.fillMaxSize(),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Center
        ) {
            Text(text = \"Counter: ${'$'}counterValueState\")

            Spacer(modifier = Modifier.height(16.dp))

            Row {
                Button(onClick = { viewModel.increment() }) {
                    Text(text = \"Increment\")
                }

                Spacer(modifier = Modifier.width(16.dp))

                Button(onClick = { viewModel.decrement() }) {
                    Text(text = \"Decrement\")


HE USE OR OTHER DEALINGS IN THE
SOFTWARE.
]]

--
-- Our Namespace object
--
local namespace = {}

--
-- Our NamespaceMetatable
--
local NamespaceMetatable = {}

--
-- NamespaceMetatable __index
--
function NamespaceMetatable:__index(KEY)
    if KEY == '_keys' then
        return rawget(self, '_keys')
    end

    if type(rawget(self, '_keys')[KEY]) == 'function' then
        return rawget(self, '_keys')[KEY]
    elseif package.loaded[rawget(self, '_keys')[KEY]] ~= nil then
        return package.loaded[rawget(self, '_keys')[KEY]]
    else
        return require(rawget(self, '_keys')[KEY])
    end
end

--
-- NamespaceMetatable __newindex
--
function NamespaceMetatable:__newindex(KEY, VALUE)
    rawget(self, '_keys')[KEY] = VALUE
end

--
-- NamespaceMetatable __call
--
function NamespaceMetatable:__call()
    local instance = {_keys = {}}
    setmetatable(instance, NamespaceMetatable)
    return instance
end

--
-- Set NamespaceObject Metatable
--
setmetatable(namespace, NamespaceMetatable)

--
-- Return Namespace
--
return namespace


-应用-preview)
    - [ChatGPT 学术优化](#chatgpt-学术优化)
    - [ChatGPT - Genie AI](#chatgpt---genie-ai)
    - [Interactive Simulacra of Human Behavior](#interactive-simulacra-of-human-behavior)
  - [申请 API key](#申请-api-key)
  - [使用 OpenAI API](#使用-openai-api)
    - [VScode: ChatGPT-Genie](#vscode-chatgpt-genie)
    - [Android: Alissu GPT](#android-alissu-gpt)
- [高阶：Azure OpenAI](#高阶azure-openai)
  - [Azure 学生认证](#azure-学生认证)
  - [申请 Azure GPT-3.5 API](#申请-azure-gpt-35-api)
  - [部署 Azure OpenAI 服务](#部署-azure-openai-服务)
  - [部署 Azure OpenAI 模型](#部署-azure-openai-模型)
  - [获取 Azure OpenAI API key](#获取-azure-openai-api-key)
  - [用 VScode Genie 调用 Azure OpenAI API](#用-vscode-genie-调用-azure-openai-api)
- [高阶：部署墙内可用的 ChatGPT 网站](#高阶部署墙内可用的-chatgpt-网站)
  - [部署服务](#部署服务)
  - [绑定域名](#绑定域名)
- [Bonus：GitHub Copilot](#bonusgithub-copilot)
  - [Host 代理引发的错误](#host-代理引发的错误)

# 前言

标题有点水，但请相信我，文章内容足够硬核，流程足够详细，绝对值得一看。本文将分几个部分向墙内用户介绍 OpenAI LLMs 服务：

- 前言中将介绍国内用户使用 OpenAI 产品的几个须知
- 初阶难度将介绍 ChatGPT 的注册和使用
- 中阶难度将举例介绍使用 OpenAI API 的两种方式
- 高阶难度将介绍两种免翻墙使用 OpenAI API 的方法
- Bonus parts 则是 ChatGPT 以外的相关内容

希望能帮到各位，~~点赞关注收藏不迷路~~如果你有什么特别想看的部分或提建议或也欢迎在评论区提 issue 或 pull request

## GFW 与 CloseAI：墙内之痛

先放几张国内用户一眼血压升高的图片：

![can not reach page](resource/can%20not%20reach.png)
_Can not Reach Page. 你被 GFW 拦住了。这里不作赘述_ **_so fuck you GFW : )_**

![checking browser](resource/checking%20browser.png)
_Checking Browser. 验证你是否为爬虫，或者从浏览器 cookies 等蛛丝马迹中判断你是否在不支持 OpenAI 服务的地区_

![access denied](resource/denied.png)
_Access Denied_

![Unavailable in Your Country](resource/country.png)
_Service Unavailable in Your Country_ **_so fuck you CloseAI : )_**

![API failed](resource/api%20failed.png)
_gpt API 网络请求失败_

对翻墙技术不够熟悉，你就很难通过 CloseAI 堪比 Netflix 的 ip 封锁以及额外的浏览器检测。因此，不翻墙使用 gpt 服务变得吃香，部分商家利用信息差向不提供 OpenAI 服务的地区高价兜售 OpenAI 服务


 *
 * See the LICENSE file for licensing information.
 */

package com.clustercontrol.nodemap.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;

import com.clustercontrol.composite.FacilityTreeComposite;
import com.clustercontrol.nodemap.bean.ReservedFacilityIdConstant;
import com.clustercontrol.nodemap.composite.ScopeComposite;
import com.clustercontrol.nodemap.view.EventViewM;
import com.clustercontrol.nodemap.view.NodeListView;
import com.clustercontrol.nodemap.view.NodeMapView;
import com.clustercontrol.nodemap.view.ScopeTreeView;
import com.clustercontrol.nodemap.view.StatusViewM;
import com.clustercontrol.repository.util.FacilityTreeItemResponse;
import com.clustercontrol.util.Messages;
import com.clustercontrol.view.CommonViewPart;

/**
 * ビュー連携を図るユーティリティクラス。
 *
 * 「複数」のビューにまたがる処理は、このクラスで処理する事。
 * @since 1.0.0
 */
public class RelationViewController {

	// ログ
	private static Log m_log = LogFactory.getLog( RelationViewController.class );

	/**
	 * イベントビューとステータスビューの表示を変更する。
	 * 引数のファシリティID配下のイベント履歴やステータス履歴が表示されるようになる。
	 * @param facilityId
	 * @param selectItem	nullの場合、イベントビューの「スコープ：」という箇所の表示が微妙におかしくなる。
	 * 						(スコープツリービューが存在しない場合は、selectItemがnullになる。)
	 */
	public static void updateStatusEventView(String parentId, String facilityId) {
		if (facilityId == null) {
			m_log.warn("updateStatusEventView(), RelationViewController updateStatusEventView facility Id is null");
			return;
		}
		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		if (page == null) {
			m_log.warn("updateStatusEventView(), updateScopeTreeView page is null");
			return;
		}
		IWorkbenchPart activePart = page.getActivePart();
		if (activePart == null) {
			m_log.warn("updateStatusEventView(), updateScopeTreeView ActivePart is null");
			return;
		}
		m_log.debug("ActivePart-class is " + activePart.getClass().getSimpleName() +
				", " + activePart.getTitle());
		if (!(activePart instanceof NodeMapView)) {
			m_log.debug("RelationViewController this class is not NodeMapView-class");
			return;
		} else {
			NodeMapView view = (NodeMapView)activePart;
			if (!view.getMode().equals(NodeMapView.Mode.FIXED_MODE) &&
					!view.getMode().equals(NodeMapView.Mode.LIST_MODE)) {
				m_log.debug("not view-relation causes FIXED_MODE,LIST_MODE");
				return;
			}
		}
		IViewPart viewPart = null;
		IViewReference viewReference = null;

		try {
			viewReference = page.findViewReference(StatusViewM.ID);
			if (viewReference == null)


me", "Ops", "Time(us)", "Time(%)", "Start Time", \
                    "End Time", "Shape", "Inputs", "Outputs"]
        lines = ["---------", "---", "--------", "-------", "----------", \
                    "--------", "-----", "------", "-------"]
        eid = 0
        data = []
        total_time = sum(time[0] for time in self._time_list)
        for node, time in zip(self._nodes_list, self._time_list):
            num_outputs = self.get_graph_node_output_num(node)
            for j in range(num_outputs):
                op = node['op']
                if node['op'] == 'param':
                    continue
                name = node['name']
                shape = str(self._output_tensor_list[eid].shape)
                time_us = round(time[0] * 1000000, 2)
                time_percent = round(((time[0] / total_time) * 100), 2)
                inputs = str(node['attrs']['num_inputs'])
                outputs = str(node['attrs']['num_outputs'])
                node_data = [name, op, time_us, time_percent, str(time[1]), str(time[2]), \
                             shape, inputs, outputs]
                data.append(node_data)
                eid += 1
        fmt = ""
        for i, _ in enumerate(header):
            max_len = len(header[i])
            for j, _ in enumerate(data):
                item_len = len(str(data[j][i]))
                if item_len > max_len:
                    max_len = item_len
            fmt = fmt + "{:<" + str(max_len + 2) + "}"
        print(fmt.format(*header))
        print(fmt.format(*lines))
        for row in data:
            print(fmt.format(*row))

def save_tensors(params):
    """Save parameter dictionary to binary bytes.

    The result binary bytes can be loaded by the
    GraphModule with API "load_params".

    Parameters
    ----------
    params : dict of str to NDArray
        The parameter dictionary.

    Returns
    -------
    param_bytes: bytearray
        Serialized parameters.
    """
    _save_tensors = tvm.get_global_func("_save_param_dict")

    args = []
    for k, v in params.items():
        args.append(k)
        args.append(tvm.nd.array(v))
    return _save_tensors(*args)


  return null;
        }

        const time = item.time._nanoISO;
        return {
            date: (new Date(time)),
            priceKW: item.kw,
            priceMW: item.mw,
            priceCYMKW: item.kwCM,
            priceCYMMW: item.mwCM
        }
    };

    public async getHistorical(fromDate:Date = null, toDate:Date = null): Promise<REEParsedResult[]>
    {
        const queryBuilder = new this.queryBuilder

        if (fromDate) {
            queryBuilder.and.field('time').gte.value(fromDate.toISOString())
        }

        if (toDate) {
            queryBuilder.and.field('time').lte.value(toDate.toISOString())
        }

        //Remove first "and"
        const qbClause = queryBuilder.toString().slice(4)
        const whereClause = qbClause.length ? `where ${qbClause}` : ''

        const query = `SELECT "kw", "kwCM", "mw", "mwCM" FROM "price" ${whereClause} ORDER BY time DESC`
        const resultQuery = await this.influx.query(query);
        return resultQuery.map(InfluxManager.#lineParser)
    }

    public async getLastPoint(): Promise<REEParsedResult>
    {
        const query = `SELECT "kw", "kwCM", "mw", "mwCM" FROM "price" ORDER BY DESC LIMIT 1`
        const resultQuery = await this.influx.query(query)

        return InfluxManager.#lineParser(resultQuery[0]);
    }

    public async getLastDay ()  {
        const query = `SELECT "kw", "kwCM", "mw", "mwCM" FROM "price" ORDER BY time DESC LIMIT 24`
        const resultQuery = await this.influx.query(query)

        return resultQuery.map(InfluxManager.#lineParser)
    }

    private static createPoints(points: REEParsedResult[]): IPoint[]
    {
        return points.map(point => ({
            'measurement': 'price',
            fields: {
                mw: point.priceMW,
                mwCM: point.priceCYMMW,
                kw: point.priceKW,
                kwCM: point.priceCYMKW
            },
            timestamp: point.date
        }))
    }

    public async save(point: REEParsedResult|REEParsedResult[])
    {
        if (!Array.isArray(point)) {
            point = [point]
        }

        const points = InfluxManager.createPoints(point)

        await this.influx
            .writePoints(points, {
                precision: "s"
            })
    }
}

export default InfluxManager
/**
 * Handle a {@link Rule} definition with rule type {@link RuleType.Count}. This function ensures that the user
 *  has permission to read at least one resource of the given type, as count resolvers should only be returning the
 *  count of resources the user has permission to read (as well as match their supplied filter).
 *
 *  The user must have {@link AbilityAction.Filter} permission on the field being filtered by. The user's
 *  ability to read the individual field(s) being filtered is not currently taken into account. As such, it is
 *  possible for a user to infer some information about fields which they cannot read as long as they have
 *  permission to filter by them. With complex and combinations of filters, the user may be able to decipher the
 *  value completely.
 *
 *  Currently, filtering permissions cannot have conditions applied to them. It is expected that any sorting or
 *  filtering permissions that the user has, do not have conditions applied. If they do, the conditions will
 *  currently be ignored and the user will be able to sort or filter by the field regardless of the conditions.
 *
 *  The current user's permissions are determined by the {@link Express.Request#permissions} property within the
 *  current NestJS execution context. The {@link CaslInterceptor} is expected to have already


 clusterName, addonTemplateName, addonTemplateSpecHash string) *addonapiv1alpha1.ManagedClusterAddOn {
	addon := &addonapiv1alpha1.ManagedClusterAddOn{
		TypeMeta: metav1.TypeMeta{},
		ObjectMeta: metav1.ObjectMeta{
			Name:      name,
			Namespace: clusterName,
		},
		Spec:   addonapiv1alpha1.ManagedClusterAddOnSpec{},
		Status: addonapiv1alpha1.ManagedClusterAddOnStatus{},
	}

	if addonTemplateName != "" {
		addon.Status.ConfigReferences = []addonapiv1alpha1.ConfigReference{
			{
				ConfigGroupResource: addonapiv1alpha1.ConfigGroupResource{
					Group:    "addon.open-cluster-management.io",
					Resource: "addontemplates",
				},
				ConfigReferent: addonapiv1alpha1.ConfigReferent{
					Name: addonTemplateName,
				},
				DesiredConfig: &addonapiv1alpha1.ConfigSpecHash{
					ConfigReferent: addonapiv1alpha1.ConfigReferent{
						Name: addonTemplateName,
					},
					SpecHash: addonTemplateSpecHash,
				},
			},
		}
	}
	return addon
}

func NewFakeAddonTemplate(name string,
	registrationSpec []addonapiv1alpha1.RegistrationSpec) *addonapiv1alpha1.AddOnTemplate {
	return &addonapiv1alpha1.AddOnTemplate{
		TypeMeta: metav1.TypeMeta{},
		ObjectMeta: metav1.ObjectMeta{
			Name: name,
		},
		Spec: addonapiv1alpha1.AddOnTemplateSpec{
			Registration: registrationSpec,
		},
	}
}

func NewFakeRoleBinding(addonName, namespace string, subject []rbacv1.Subject, roleRef rbacv1.RoleRef,
	owner metav1.OwnerReference) *rbacv1.RoleBinding {
	return &rbacv1.RoleBinding{
		ObjectMeta: metav1.ObjectMeta{
			Name: fmt.Sprintf("open-cluster-management:%s:%s:agent",
				addonName, strings.ToLower(roleRef.Kind)),
			Namespace:       namespace,
			OwnerReferences: []metav1.OwnerReference{owner},
			Labels: map[string]string{
				addonapiv1alpha1.AddonLabelKey: addonName,
			},
		},
		RoleRef:  roleRef,
		Subjects: subject,
	}
}

func TestTemplatePermissionConfigFunc(t *testing.T) {
	cases := []struct {
		name                   string
		cluster                *clusterv1.ManagedCluster
		addon                  *addonapiv1alpha1.ManagedClusterAddOn
		template               *addonapiv1alpha1.AddOnTemplate
		rolebinding            *rbacv1.RoleBinding
		expectedErr            error
		validatePermissionFunc func(*testing.T, kubernetes.Interface)
	}{
		{
			name:    "kubeclient current cluster binding, rolebinding not exist",
			cluster: NewFakeManagedCluster("cluster1"),
			template: NewFakeAddonTemplate("template1", []addonapiv1alpha1.RegistrationSpec{
				{
					Type: addonapiv1alpha1.RegistrationTypeKubeClient,
					KubeClient: &addonapiv1alpha1.KubeClientRegistrationConfig{
						HubPermissions: []addonapiv1alpha1.HubPermissionConfig{
							{
								Type: addonapiv1alpha1.HubPermissionsBindingCurrentCluster,
								CurrentCluster: &addonapiv1alpha1.CurrentClusterBindingConfig{
									ClusterRoleName: "test",
								},
							},
						},
					},
				},
			}),
			addon:       NewFakeTemplateManagedClusterAddon("addon1", "cluster1", "template1", "fakehash"),
			expectedErr: nil,
			validatePermissionFunc: func(t *testing.T, kubeClient kubernetes.


ime.RFC3339, v)
		if err != nil {
			return reconcile.Result{}, fmt.Errorf("failed parsing timestamp %q on ShootState object: %w", v, err)
		}
		lastBackup = lastBackup.UTC()
	}

	if nextBackupDue := lastBackup.Add(r.Config.SyncPeriod.Duration); nextBackupDue.Before(r.Clock.Now().UTC()) {
		log.Info("Performing periodic ShootState backup", "lastBackup", lastBackup.Round(time.Minute), "nextBackupDue", nextBackupDue.Round(time.Minute))
		if err := shootstate.Deploy(ctx, r.Clock, r.GardenClient, r.SeedClient, shoot, true); err != nil {
			return reconcile.Result{}, fmt.Errorf("failed performing periodic ShootState backup: %w", err)
		}
		lastBackup = r.Clock.Now()
	} else {
		log.Info("No need to perform periodic ShootState backup yet", "lastBackup", lastBackup.Round(time.Minute), "syncPeriod", r.Config.SyncPeriod.Duration)
	}

	requeueAfter, nextBackup := r.requeueAfter(lastBackup)
	log.Info("Scheduled next periodic ShootState backup for Shoot", "duration", requeueAfter.Round(time.Minute), "nextBackup", nextBackup.Round(time.Minute))
	return reconcile.Result{RequeueAfter: requeueAfter}, nil
}

func (r *Reconciler) requeueAfter(lastBackup time.Time) (time.Duration, time.Time) {
	var (
		nextRegularBackup = lastBackup.Add(r.Config.SyncPeriod.Duration)
		randomDuration    = utils.RandomDuration(JitterDuration)

		nextBackup              = nextRegularBackup.Add(-JitterDuration / 2).Add(randomDuration)
		durationUntilNextBackup = nextBackup.UTC().Sub(r.Clock.Now().UTC())
	)

	return durationUntilNextBackup, nextBackup
}

func shootCreatedSuccessfully(status gardencorev1beta1.ShootStatus) bool {
	return status.LastOperation != nil &&
		((status.LastOperation.Type == gardencorev1beta1.LastOperationTypeCreate && status.LastOperation.State == gardencorev1beta1.LastOperationStateSucceeded) ||
			status.LastOperation.Type != gardencorev1beta1.LastOperationTypeCreate)
}

func shootInMigration(status gardencorev1beta1.ShootStatus) bool {
	return status.LastOperation != nil &&
		((status.LastOperation.Type == gardencorev1beta1.LastOperationTypeMigrate) ||
			(status.LastOperation.Type == gardencorev1beta1.LastOperationTypeRestore && status.LastOperation.State != gardencorev1beta1.LastOperationStateSucceeded))
}
// SPDX-FileCopyrightText: SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0

package care

import (
	"context"
	"fmt"
	"strings"

	"github.com/go-logr/logr"
	admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/selection"
	"k8s.io/apimachinery/pkg/util/sets"
	"k8s.io/utils/ptr"
	"sigs.k8s.io/controller-runtime/pkg/client"

	gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
	v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants"
	resourcesv1alpha1 "github.com/gardener/gardener/pkg/apis/resources/v1alpha1"
	webhookmatchers "github.com/gardener


or(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
    // $ANTLR end "rule__ElkEdgeSection__Group_4_0_2__1__Impl"

    // $ANTLR start "rule__ElkEdgeSection__Group_4_0_2__2"
    // InternalElkGraph.g:3934:1: rule__ElkEdgeSection__Group_4_0_2__2 : rule__ElkEdgeSection__Group_4_0_2__2__Impl rule__ElkEdgeSection__Group_4_0_2__3 ;
    public final void rule__ElkEdgeSection__Group_4_0_2__2() throws RecognitionException {

        		int stackSize = keepStackSize();

        try {
            // InternalElkGraph.g:3938:1: ( rule__ElkEdgeSection__Group_4_0_2__2__Impl rule__ElkEdgeSection__Group_4_0_2__3 )
            // InternalElkGraph.g:3939:2: rule__ElkEdgeSection__Group_4_0_2__2__Impl rule__ElkEdgeSection__Group_4_0_2__3
            {
            pushFollow(FOLLOW_18);
            rule__ElkEdgeSection__Group_4_0_2__2__Impl();

            state._fsp--;

            pushFollow(FOLLOW_2);
            rule__ElkEdgeSection__Group_4_0_2__3();

            state._fsp--;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
    // $ANTLR end "rule__ElkEdgeSection__Group_4_0_2__2"

    // $ANTLR start "rule__ElkEdgeSection__Group_4_0_2__2__Impl"
    // InternalElkGraph.g:3946:1: rule__ElkEdgeSection__Group_4_0_2__2__Impl : ( ( rule__ElkEdgeSection__StartXAssignment_4_0_2_2 ) ) ;
    public final void rule__ElkEdgeSection__Group_4_0_2__2__Impl() throws RecognitionException {

        		int stackSize = keepStackSize();

        try {
            // InternalElkGraph.g:3950:1: ( ( ( rule__ElkEdgeSection__StartXAssignment_4_0_2_2 ) ) )
            // InternalElkGraph.g:3951:1: ( ( rule__ElkEdgeSection__StartXAssignment_4_0_2_2 ) )
            {
            // InternalElkGraph.g:3951:1: ( ( rule__ElkEdgeSection__StartXAssignment_4_0_2_2 ) )
            // InternalElkGraph.g:3952:2: ( rule__ElkEdgeSection__StartXAssignment_4_0_2_2 )
            {
             before(grammarAccess.getElkEdgeSectionAccess().getStartXAssignment_4_0_2_2());
            // InternalElkGraph.g:3953:2: ( rule__ElkEdgeSection__StartXAssignment_4_0_2_2 )
            // InternalElkGraph.g:3953:3: rule__ElkEdgeSection__StartXAssignment_4_0_2_2
            {
            pushFollow(FOLLOW_2);
            rule__ElkEdgeSection__StartXAssignment_4_0_2_2();

            state._fsp--;

            }

             after(grammarAccess.getElkEdgeSectionAccess().getStartXAssignment_4_0_2_2());

            }

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
    // $ANTLR end "rule__ElkEdgeSection__Group_4_0_


ated natively into the Nextcloud core (you just need to enable it in the admin settings)**\n\nThis app allows you to customize your share tokens, so your links can be like https://your-nextcloud.com/s/mysharedlink instead of https://your-nextcloud.com/s/qPv1SwbU5M2YEoJZ. Just share a file or folder normally and customize the link in the sharerenamer tab in the sidebar.\n\nPlease be aware that this is a potential security risk: links could be guessed! We discourage using this app on large instances that host sensitive data! We also encourage you to password protect such shared links." : "**POZNÁMKA: Tuto aplikaci po aktualizaci na Nextcloud 31 (Hub 10) již nepotřebujete, protože funkce přejmenování sdílení je nyní nativně integrovaná do jádra Nextcloud (tuto funkci jen musíte povolit v nastavení pro správce).**\n\nTato aplikace vám umožňuje přizpůsobit tokeny pro sdílení, takže vaše odkazy mohou vypadat například takto: https://vas-nextcloud.cz/s/mujsdilenyodkaz namísto https://vas-nextcloud.cz/s/qPv1SwbU5M2YEoJZ. Jednoduše nasdílejte soubor nebo složku tak jako obvykle a přizpůsobte si odkaz v záložce \"sharerenamer\" v postranní liště.\n\nProsím, mějte na paměti, že si sdílením pojmenovaných odkazů můžete vytvořit bezpečnostní riziko, jelikož jsou odkazy odhadnutelné! Nedoporučujeme tuto aplikaci používat na velkých instancích, která hostují citlivá data! Můžete se chránit tím, že na pojmenovaných odkazech nastavíte přístupové heslo.",
    "Could not change link token" : "Nedaří se změnit token odkazu",
    "Error" : "Chyba",
    "No link shares to rename" : "Žádná sdílení odkazem k přejmenování",
    "You can create link shares in the shares tab" : "Sdílení odkazem je možné vytvořit na kartě sdílení",
    "Link token" : "Token odkazu",
    "Change link token" : "Změnit token odkazu",
    "Share Rename" : "Přejmenovat sdílení"
},
"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;");
OC.L10N.register(
    "sharerenamer",
    {
    "ShareRenamer" : "Μετονομασία συνδέσμου",
    "A simple app that lets you customize file/folder share links" : "Μια απλή εφαρμογή που σας επιτρέπει να προσαρμόσετε τους συνδέσμους κοινής χρήσης αρχείων/φακέλων",
    "**NOTE: You don't need this app anymore after updating to Nextcloud 31 (Hub 10) as the share renaming feature is now integrated natively into the Nextcloud core (you just need to enable it in the


税率

                    <input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>

                开户行

                    <input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>

                账号

                    <input name="accountNumber" id="accountNumber" class="easyui-validatebox"
                           style="width: 160px;height: 20px"/>

                地址

                    <input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>

                备注

                    <textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>

    </form>

    保存
    取消

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><title>Console plugin - Mailing Lists</title><link rel="stylesheet" href="./style/print.css" type="text/css" media="print"></link><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>
Console plugin

                	Last published: 14 February 2006
                  | Doc for 0.1-1.5rc3

TRIEMAX JalopyOverview of projects

Project Documentation

About Console plugin

Downloads

Project Info

Mailing Lists

Project Team

Dependencies

Issue Tracking
<


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

//! # Synopsis
//! This sub-module implements the necessary APIs to establish a TLS session.
//! All the APIs are compatible to their OpenSSL counterparts.
//!
//! # Usage
//! The first step is to create a `SSL_CTX` object with `SSL_CTX_new`.
//!
//! Then `SSL_CTX_use_certificate_chain_file` and `SSL_CTX_use_PrivateKey_file`
//! must be called to set up the certificate and private key if the context is
//! to be used in a TLS server.
//!
//! When a TCP socket has been created, an `SSL` object can be created with
//! `SSL_new`. Afterwards, the socket can be assigned to the `SSL` object with
//! `SSL_set_fd`.
//!
//! Then the TLS handshake is performed using `SSL_connect` or `SSL_accept` for
//! a client or a server respectively. `SSL_read` and `SSL_write` are used to
//! read and write data on the TLS connection. Finally, `SSL_shutdown` can be
//! used to shut down the connection.

// Module imports

use super::err::{Error, ErrorCode, InnerResult};
use super::safestack::STACK_X509;
use super::x509::X509;
use super::{SslSessionCacheModes, SSL_ERROR, SSL_FAILURE, SSL_SUCCESS};
use crate::error_san::*;
use crate::libcrypto::evp::EVP_PKEY;
use crate::{OpaquePointerGuard, MAGIC, MAGIC_SIZE};

use rustls::client::{ClientSessionMemoryCache, NoClientSessionStorage};
use rustls::client::{ServerCertVerified, ServerCertVerifier, WebPkiVerifier};
use rustls::server::{AllowAnyAnonymousOrAuthenticatedClient, AllowAnyAuthenticatedClient};
use rustls::server::{
    NoServerSessionStorage, ResolvesServerCertUsingSni, ServerSessionMemoryCache,
};
use rustls::version::{TLS12, TLS13};
use rustls::{Certificate, PrivateKey, RootCertStore, ServerName};
use rustls::{ClientConfig, OwnedTrustAnchor, ServerConfig};
use rustls::{ClientConnection, Connection, ServerConnection, Stream};
use rustls::{SupportedCipherSuite, SupportedProtocolVersion};

use libc::{c_char, c_int, c_long, c_uchar, c_void, size_t};
use std::convert::TryFrom;
use std::io::{Read, Write};
use std::sync::Arc;
use std::{ffi, fs, io, net, path, ptr, slice};

// Trait imports
#[cfg(unix)]
use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd};
#[cfg(windows)]
use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket};

const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: usize = 256; // Default value used by rustls

#[cfg(not(feature = "error_strings"))]
const CONST_NOTBUILTIN_STR: &'static [u8] = b"(Ciphersuite string not built-in)\0";

/// An OpenSSL Cipher object
#[allow(non_camel_case_types)]
pub struct CIPHER {
    magic: [u8; MAGIC_SIZE],
    ciphersuite: SupportedCipherSuite,
}

impl OpaquePointerGuard for CIPHER {
    fn check_magic(&self) -> bool {
        self.magic == *MAGIC
    }
}

impl CIPHER {
    fn new(ciphersuite: SupportedCipherSuite) -> CIPHER {
        CIPHER {
            magic: *MAGIC,
            ciphersuite,
        }
    }
}

/// A dispatch structure


/*
 Copyright (C) 2016-2017 Alexander Borisov

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

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

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

 Author: lex.borisov@gmail.com (Alexander Borisov)
*/

#include "modest/node/node.h"
#include "modest/style/sheet.h"

modest_node_t * modest_node_create(modest_t* modest)
{
    modest_node_t* mnode = (modest_node_t*)mcobject_async_malloc(modest->mnode_obj, modest->mnode_node_id, NULL);

    if(mnode == NULL)
        return NULL;

    memset(mnode, 0, sizeof(modest_node_t));

    return mnode;
}

mystatus_t modest_node_init(modest_t* modest, modest_node_t *mnode)
{
    mnode->stylesheet = modest_style_sheet_create(modest);
    if(mnode->stylesheet == NULL)
        return MODEST_STATUS_ERROR_MEMORY_ALLOCATION;

    mystatus_t status = modest_style_sheet_init(modest, mnode->stylesheet);
    if(status)
        return MODEST_STATUS_ERROR;

    return MODEST_STATUS_OK;
}

#ifdef MODEST_NODE_FULL_RAW

mycss_declaration_entry_t * modest_node_declaration_by_type(modest_t* modest, modest_node_t *mnode, mycss_property_type_t type)
{
    if(mnode->raw_declaration[ type ])
        return mnode->raw_declaration[ type ]->declaration;

    return NULL;
}

modest_style_raw_declaration_t * modest_node_raw_declaration_by_type(modest_t* modest, modest_node_t *mnode, mycss_property_type_t type)
{
    return mnode->raw_declaration[ type ];
}

void modest_node_raw_declaration_set_by_type(modest_t* modest, modest_node_t *mnode, mycss_property_type_t type, modest_style_raw_declaration_t *raw_declr)
{
    mnode->raw_declaration[ type ] = raw_declr;
}

#else

mycss_declaration_entry_t * modest_node_declaration_by_type(modest_t* modest, modest_node_t *mnode, mycss_property_type_t type)
{
    mycore_utils_avl_tree_node_t *find_node = mycore_utils_avl_tree_search_by_type(modest->style_avl_tree, mnode->avl_tree_node, type);

    if(find_node)
        return ((modest_style_raw_declaration_t*)find_node->value)->declaration;

    return NULL;
}

modest_style_raw_declaration_t * modest_node_raw_declaration_by_type(modest_t* modest, modest_node_t *mnode, mycss_property_type_t type)
{
    mycore_utils_avl_tree_node_t *find_node = mycore_utils_avl_tree_search_by_type(modest->style_avl_tree, mnode->avl_tree_node, type);
    return (find_node ? find_node->value : NULL);
}

void modest_node_raw_declaration_set_by_type(modest_t* modest, modest_node_t *mnode, mycss_property_type_t type, modest_style_raw_declaration_t *raw_declr)
{
    mycore_utils_avl_tree_add(modest->style_avl_tree, &mnode->avl_tree_node, type, raw_declr);
}

#endif /* MODEST_NODE_FULL_RAW */


Name != 'svg')
      .map((DomElement element) => _tagToViewMarker[element.tagName.toLowerCase()]!)
      .toList();

  expect(sceneElements, expectedMarkers, reason: reason);
}
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:test/bootstrap/browser.dart';
import 'package:test/test.dart';
import 'package:ui/src/engine.dart';
import 'package:ui/ui.dart';

import 'package:web_engine_tester/golden_tester.dart';

import '../common/test_initialization.dart';

const Color _kShadowColor = Color.fromARGB(255, 0, 0, 0);

void main() {
  internalBootstrapBrowserTest(() => testMain);
}

Future<void> testMain() async {
  const Rect region = Rect.fromLTWH(0, 0, 550, 300);

  late SurfaceSceneBuilder builder;

  setUpUnitTests(
    emulateTesterEnvironment: false,
    setUpTestViewDimensions: false,
  );

  setUp(() {
    builder = SurfaceSceneBuilder();
  });

  void paintShapeOutline() {
    final EnginePictureRecorder recorder = EnginePictureRecorder();
    final RecordingCanvas canvas = recorder.beginRecording(Rect.largest);
    canvas.drawRect(
      const Rect.fromLTRB(0.0, 0.0, 20.0, 20.0),
      SurfacePaint()
        ..color = const Color.fromARGB(255, 0, 0, 255)
        ..style = PaintingStyle.stroke
        ..strokeWidth = 1.0,
    );
    builder.addPicture(Offset.zero, recorder.endRecording());
  }

  void paintShadowBounds(SurfacePath path, double elevation) {
    final Rect shadowBounds =
        computePenumbraBounds(path.getBounds(), elevation);
    final EnginePictureRecorder recorder = EnginePictureRecorder();
    final RecordingCanvas canvas = recorder.beginRecording(Rect.largest);
    canvas.drawRect(
      shadowBounds,
      SurfacePaint()
        ..color = const Color.fromARGB(255, 0, 255, 0)
        ..style = PaintingStyle.stroke
        ..strokeWidth = 1.0,
    );
    builder.addPicture(Offset.zero, recorder.endRecording());
  }

  void paintBitmapCanvasShadow(
      double elevation, Offset offset, bool transparentOccluder) {
    final SurfacePath path = SurfacePath()
      ..addRect(const Rect.fromLTRB(0, 0, 20, 20));
    builder.pushOffset(offset.dx, offset.dy);

    final EnginePictureRecorder recorder = EnginePictureRecorder();
    final RecordingCanvas canvas = recorder.beginRecording(Rect.largest);
    canvas
        .debugEnforceArbitraryPaint(); // make sure DOM canvas doesn't take over
    canvas.drawShadow(
      path,
      _kShadowColor,
      elevation,
      transparentOccluder,
    );
    builder.addPicture(Offset.zero, recorder.endRecording());
    paintShapeOutline();
    paintShadowBounds(path, elevation);

    builder.pop(); // offset
  }

  void paintBitmapCanvasComplexPathShadow(double elevation, Offset offset) {
    final SurfacePath path = SurfacePath()
      ..moveTo(10, 0)
      ..lineTo(20, 10)
      ..lineTo(10, 20)
      ..lineTo(0, 10)
      ..close();
    builder.pushOffset(offset.dx, offset.dy);

    final EnginePictureRecorder recorder = EnginePictureRecorder();
    final RecordingCanvas canvas = recorder.beginRecording(Rect.largest);
    canvas
        .debugEnforceArbitraryPaint(); // make sure DOM canvas doesn't take over
    canvas.drawShadow(
      path,
      _kShadowColor,
      elevation,


apmeH QulmeH, QulwI', Qulbogh, QulwI' QulmeH je ghom QIpyuS neH ghomvam. 'e' vItbe'chu', QIpyuS laH tlhoS Hoch DaqmeyDaq, Qapla' wIbuSmeH Hoch Qu'mey vIchenmoHlaH. ngoqvamDaq QIpyuS vIlo'chugh, QIpyuS 'oH Qav Qapla' meH Qul.

ghomwI' lo'laHghach 'oHbogh, ghomvam chenmoHbogh, tlhoblaHbogh (customers, users, decision-makers je) Hoch Qelbogh lo'wI' QaptaH. 'ach ghomwI' Hoch SovlaHbe'. mIw, 'ej tu'lu' 'e' vItlu'. vIt Sovmo' SuvrupnISlu', 'ej vIt SovQo' QaptaHvIS, vIt SovnISlu'. vIt wovbe' Qapbe'nISlu', 'ach Qav Sov je rurlu'.

## QIpyuS ghom vIghro' rur {#scrum-in-a-nutshell}

QIpyuS 'oH mIw'e' malja' Qulchu'bogh, ghot Sov neH not yap, 'ej ngoD qelDI' poH juS, rurchuq 'oH. QIpyuS Hoch malja' yInDaj vItlhutlh: chenmoH, choH, pol, leH, SIp, QI'tu', bup, Qav je. QIpyuS ghotpu', ghom, 'ej yejmeH mIw leH, choH QorghmeH, lo'laHghach chenmoHmeH.

QIpyuS QorghmeH ghomwI' Sovchu', vaj 'oHvaD lo'laHbe' Sov Qorgh. QIpyuS meqmey chu' je 'angmeH, narghmoHghach SIQbe'meH, je SIQchoHlu'meH Qapla' vIneH. ghom Qorgh 'e' QaH QIpyuS, Qapchu'choH.

Qob 'oH Dochmeyvetlh'e' ngaSbogh ngoDmey, vaj 'oHvaD wanI'mey QaD vIlo'. Qob 'oH 'ach leSpoHmeH, pagh Sovlu'. Qob chuq laH Qorgh QIpyuS: malja' Qob, De' HaqlaHbe', pat choHbe'chu', SIgh, HevwI' chutmey, lughbe'ghach SeH, je. QIpyuS lo'taHvIS, Qob SuvwI'pu' tIbachHa'.

QIpyuS QorghwI' je SuvwI' Daq ghorgh SIQ, lugh Qapla' luwIv je.

ngoqvam vItlhutlh:

1. QorghwI'pu', vaj Supporters ponglu', QIpyuS QorghmeH Qapchu' QutlhnIS, QIpyuS DevwI'vaD SuvwI' Qorgh je.
2. malja' laHchugh QorghwI', malja' ngoQ wIv.
3. QIpyuS ghom le' (49), Qu'mey wIv, QIj, je lo'laHghach chenmoH.
4. QIpyuS ghom je QorghwI' DuHmey SuvmeH SprintDaq ghu' SIQ je choH.
5. Supporters QIpyuS ghom Qapchu'meH boQ.
6. _chegh._

HInob: chu' veb pagh QIpyuS QorghwI'vam wIv,


TE_Diag=0, TTE_Soft=0,
        TTE_L=0, TTE_CP=1, TTE_CV=1, TTE_E=0, TTE_P=0, TTE_W=1
        }

.text
.global main
main:
	clr	%l0

	th_fork(th_main,%l0)

! this thread modfifies the code
!===============================
th_main_0:

!--------------------------------------------------------------------
	setx 	exit_code1,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop1, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code2,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop2, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code3,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop3, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code4,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop4, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code5,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop5, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code6,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop6, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code7,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop7, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code8,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop8, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store the jump
!--------------------------------------------------------------------
	setx 	exit_code9,%l0, %l1	! pointers...
	ld	[%l1], %o6		!
	ld	[%l1+4], %o7		!
	setx 	wait_loop9, %l0, %l3	!
	st	%o6, [%l3 + 8]		! modify the code.
	st	%o7, [%l3 + 4]		! store


,
	{["name"]="999,999 Premium Points", ["offsets"]={0xC48,0xC54}, ["file"]="DATA.BIN", ["value"]=0xF423F, ["size"]=4}
}


}

#highlighter-nodeinfobar-container[position="top"] > #highlighter-nodeinfobar,
#highlighter-nodeinfobar-container[position="overlap"] > #highlighter-nodeinfobar {
  box-shadow: 0 1px 0 hsla(0, 0%, 100%, .1) inset;
}

#highlighter-nodeinfobar-container[hide-arrow] > #highlighter-nodeinfobar {
  margin: 7px 0;
}

#full-screen-warning-message {
  background-color: hsl(0,0%,15%);
  color: white;
  font-size: 32px;
  border-radius: 8px;
  margin-top: 30px;
  padding: 30px 50px;
  box-shadow: 0 0 2px white;
}

#full-screen-warning-container[obscure-browser] {
  background-color: rgba(0,0,0,0.75);
}

#full-screen-warning-container[stop-obscuring-browser] {
  -moz-transition-property: background-color;
  -moz-transition-duration: 500ms;
  background-color: rgba(0,0,0,0);
}

/* Highlighter toolbar - breadcrumbs */

#inspector-breadcrumbs {
  padding: 0 6px;
  /* A fake 1px-shadow is included in the border-images of the
     inspector-breadcrumbs-buttons, to match toolbar-buttons style.
     This negative margin compensate the extra row of pixels created
     by the shadow.*/
  margin-bottom: -1px;
}

.inspector-breadcrumbs-button {
  -moz-appearance: none;
  background-color: transparent;
  border-width: 1px 13px 2px 13px;
  color: hsl(210,30%,85%);
  max-width: 85px;
  /* The content of the button can be larger than the button */
  overflow: hidden;
  min-height: 25px;

  margin: 0 -11px 0 0;
  padding: 0 9px;
}

.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-tag {
  color: hsl(208,100%,60%);
}

.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-id {
  color: hsl(205,100%,70%);
}

.inspector-breadcrumbs-id,
.inspector-breadcrumbs-classes {
  color: #8d99a6;
}

/* Highlighter toolbar - breadcrumbs - LTR */

.inspector-breadcrumbs-button:-moz-locale-dir(ltr):first-of-type {
  margin-left: 0;
}

.inspector-breadcrumbs-button {
  -moz-border-image: url("chrome://browser/skin/devtools/breadcrumbs/ltr-middle.png") 1 13 2 13 stretch;
}

.inspector-breadcrumbs-button[siblings-menu-open]:not([checked]),
.inspector-breadcrumbs-button:not([checked]):hover:active {
  -moz-border-image: url("chrome://browser/skin/devtools/breadcrumbs/ltr-middle-pressed.png") 1 13 2 13 stretch;
}

.inspector-breadcrumbs-button[checked] {
  -moz-border-image: url("chrome://browser/skin/devtools/breadcrumbs/ltr-middle-selected.png") 1 13 2 13 stretch;
}

.inspector-breadcrumbs-button[checked][siblings-menu-open],
.inspector-breadcrumbs-button[checked]:hover:active {
  -moz-border-image: url("chrome://browser/skin/devtools/breadcrumbs/ltr-middle-selected-pressed.png") 1 13 2 13 stretch;
}

.inspector-breadcrumbs-button:first-of-type {
  -m


_used)|process_(cpu_seconds_total|resident_memory_bytes)|rest_client_(request_duration_seconds_bucket|requests_total)|storage_operation_(duration_seconds_bucket|duration_seconds_count|errors_total)|up|volume_manager_total_volumes')"
  kube_state_relabel_filter:
    type: filter
    inputs:
    - kube_state_metrics
    condition: "!match(string!(.name), r'kube_endpoint_address_not_ready|kube_endpoint_address_available')"
  common_relabel_config:
    type: remap
    inputs:
    - cadvisor_relabel_filter
    - kubelet_relabel_filter
    - kube_state_relabel_filter
    source: |-
      if !is_null(.tags) && is_string(.tags.metrics_endpoint) {
      .tags.metrics_path = parse_regex!(.tags.metrics_endpoint, r'https?:\/\/[^\/]+(?<path>\/.*)$').path
      }
sinks:
  prometheus_remote_write:
    type: prometheus_remote_write
    inputs:
    - common_relabel_config
    endpoint: http://127.0.0.1:38086/api/v1/prometheus
    healthcheck:
      enabled: false

```

scrape kubernentes logs (capture DeepFlow Pod logs as example, if other Pod logs is required, update `extra_label_selector` add custom filters)
```yaml
data_dir: /vector-log-checkpoint
sources:
  kubernetes_logs:
    self_node_name: ${K8S_NODE_NAME_FOR_DEEPFLOW}
    type: kubernetes_logs
    namespace_annotation_fields:
      namespace_labels: ""
    node_annotation_fields:
      node_labels: ""
    pod_annotation_fields:
      pod_annotations: ""
      pod_labels: ""
    extra_label_selector: "app=deepflow,component!=front-end"
  kubernetes_logs_frontend:
    self_node_name: ${K8S_NODE_NAME_FOR_DEEPFLOW}
    type: kubernetes_logs
    namespace_annotation_fields:
      namespace_labels: ""
    node_annotation_fields:
      node_labels: ""
    pod_annotation_fields:
      pod_annotations: ""
      pod_labels: ""
    extra_label_selector: "app=deepflow,component=front-end"
transforms:
  multiline_kubernetes_logs:
    type: reduce
    inputs:
      - kubernetes_logs
    group_by:
      - file
      - stream
    merge_strategies:
      message: concat_newline
    starts_when: match(string!(.message), r'^(.+=|\[|\[?\u001B\[[0-9;]*m|\[mysql\]\s|\{\".+\"|(::ffff:)?([0-9]{1,3}.){3}[0-9]{1,3}[\s\-]+(\[)?)?\d{4}[-\/\.]?\d{2}[-\/\.]?\d{2}[T\s]?\d{2}:\d{2}:\d{2}')
    expire_after_ms: 2000
    flush_period_ms: 500
  flush_kubernetes_logs:
   type: remap
   inputs:
     - multiline_kubernetes_logs
   source: |-
       .message = replace(string!(.message), r'\u001B\[([0-9]{1,3}(;[0-9]{1,3})*)?m', "")
  remap_kubernetes_logs:
    type: remap
    inputs:
    - flush_kubernetes_logs
    - kubernetes_logs_frontend
    source: |-
        if is_string(.message) && is_json(string!(.message)) {
            tags = parse_json(.message) ?? {}
            ._df_log_type = tags._df_log_type
            .org_id = to_int(tags.org_id) ?? 0
            .user_id = to_int(tags.user_id) ?? 0
            .message = tags.message || tags.msg
            del(tags


}

        if (allDeleted) {
            clearTargetLanguageTag()
        }

        return allDeleted
    }
}
/*
 * Copyright (Change Date see Readme), gematik GmbH
 *
 * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the
 * European Commission – subsequent versions of the EUPL (the "Licence").
 * You may not use this work except in compliance with the Licence.
 *
 * You find a copy of the Licence in the "Licence" file or at
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.
 * In case of changes by gematik GmbH find details in the "Readme" file.
 *
 * See the Licence for the specific language governing permissions and limitations under the Licence.
 *
 * *******
 *
 * For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
 */

package de.gematik.ti.erp.app.mlkitscanner.usecase

import de.gematik.ti.erp.app.mlkitscanner.model.CardScannerData.ScanRegion
import de.gematik.ti.erp.app.mlkitscanner.model.CardScannerData.ScanRegionParams
import de.gematik.ti.erp.app.theme.SizeDefaults
import io.github.aakira.napier.Napier

class CalculateScanRegionUseCase {

    companion object {
        private const val PADDING_PERCENT = 0.1f
    }

    operator fun invoke(params: ScanRegionParams): ScanRegion? {
        return try {
            with(params.density) {
                val previewWidth = params.previewView.width
                val previewHeight = params.previewView.height

                if (previewWidth <= 0 || previewHeight <= 0) {
                    return null
                }

                val baseRegion = calculateBaseScanRegion(
                    params = params,
                    containerWidth = previewWidth,
                    containerHeight = previewHeight
                )

                applyPaddingToRegion(baseRegion)
            }
        } catch (e: Exception) {
            Napier.e("CalculateScanRegionUseCase error: ${e.message}")
            null
        }
    }

    fun calculateWithScreenCoordinates(
        params: ScanRegionParams,
        screenWidth: Int,
        screenHeight: Int
    ): ScanRegion? {
        return try {
            if (screenWidth <= 0 || screenHeight <= 0) {
                return null
            }

            calculateBaseScanRegion(
                params = params,
                containerWidth = screenWidth,
                containerHeight = screenHeight
            )
        } catch (e: Exception) {
            Napier.e("CalculateScanRegionUseCase error: ${e.message}")
            null
        }
    }

    private fun calculateBaseScanRegion(
        params: ScanRegionParams,
        containerWidth: Int,
        containerHeight: Int
    ): ScanRegion {
        return with(params.density) {
            val cardWidth = SizeDefaults.fortyfold.toPx()
            val cardHeight = SizeDefaults.twentyfivefold.toPx()

            val cardLeft = (containerWidth - cardWidth) / 2
            val cardTop = (containerHeight - cardHeight) / 2

            val imageWidth = params.imageProxy.width
            val imageHeight = params.imageProxy.height

            val scaleX = imageWidth.toFloat() / containerWidth.toFloat()
            val scaleY = imageHeight.toFloat() / containerHeight.toFloat()

            val scaledLeft = (cardLeft * scaleX)


_child_copy (*_extra_xml);
	}

	if (!skip_saving_automation) {
		XMLNode& automation = Automatable::get_automation_xml_state();
		if (!automation.children().empty() || !automation.properties().empty()) {
			node->add_child_nocopy (automation);
		} else {
			delete &automation;
		}
	}

	Latent::add_state (node);

	return *node;
}

int
Processor::set_state_2X (const XMLNode & node, int /*version*/)
{
	XMLProperty const * prop;

	XMLNodeList children = node.children ();

	for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {

		if ((*i)->name() == X_("IO")) {

			if ((prop = (*i)->property ("name")) != 0) {
				set_name (prop->value ());
			}

			set_id (**i);

			//note:  in A2, active state was stored in the Redirect node, not the child IO node
			/*
			 * if ((prop = (*i)->property ("active")) != 0) {
				bool const a = string_is_affirmative (prop->value ());
				if (_active != a) {
					if (a) {
						activate ();
					} else {
						deactivate ();
					}
				}
			}*/

		}
	}

	return 0;
}

int
Processor::set_state (const XMLNode& node, int version)
{
	if (version < 3000) {
		return set_state_2X (node, version);
	}

	bool ignore_name;
	// Only testing for the presence of the property not value
	if (!node.get_property("ignore-name", ignore_name)) {
		string name;
		// may not exist for legacy 3.0 sessions
		if (node.get_property ("name", name)) {
			/* don't let derived classes have a crack at set_name,
			   as some (like Send) will screw with the one we suggest.
			*/
			Processor::set_name (name);
		}

		set_id (node);
	}

	XMLNodeList nlist = node.children();
	XMLNodeIterator niter;

	Stateful::save_extra_xml (node);

	XMLProperty const * prop = 0;
	XMLProperty const * legacy_active = 0;

	for (niter = nlist.begin(); niter != nlist.end(); ++niter) {

		if ((*niter)->name() == X_("Automation")) {

			if ((prop = (*niter)->property ("path")) != 0) {
				old_set_automation_state (*(*niter));
			} else {
				set_automation_xml_state (*(*niter), Evoral::Parameter(PluginAutomation));
			}

		} else if ((*niter)->name() == "Redirect") {
			if ( !(legacy_active = (*niter)->property("active"))) {
				error << string_compose(_("No %1 property flag in element %2"), "active", (*niter)->name()) << endl;
			}
		}
	}

	if ((prop = node.property ("active")) == 0) {
		if (legacy_active) {
			prop = legacy_active;
		} else {
			error << _("No child node with active property") << endmsg;
			return -1;
		}
	}

	bool const a = string_to<bool> (prop->value ()) && !_session.get_bypass_all_loaded_plugins();
	if (_active != a) {
		if (a) {
			activate ();
		} else {
			deactivate ();
		}
	}

	Latent::set_state (node, version);

	return 0;
}

/** @pre Caller must hold process lock */
bool
Processor::configure_io (ChanCount in, ChanCount out)
{
	/* This class assumes 1:1 input:output.static output stream count.
	   Derived classes must override and set _configured_output appropriately


	pub keys_and_signatures: Vec<PublicKeyAndSignature>,
}

impl<BlockNumber> Default for OffchainSignedProposals<BlockNumber> {
	fn default() -> Self {
		Self { proposals: Vec::default() }
	}
}

pub mod offchain_crypto {
	use sp_core::sr25519::Signature as Sr25519Signature;
	use sp_runtime::{
		app_crypto::{app_crypto, sr25519},
		key_types::ACCOUNT,
		traits::Verify,
		MultiSignature, MultiSigner,
	};
	app_crypto!(sr25519, ACCOUNT);

	pub struct OffchainAuthId;

	impl frame_system::offchain::AppCrypto<MultiSigner, MultiSignature> for OffchainAuthId {
		type RuntimeAppPublic = Public;
		type GenericSignature = sp_core::sr25519::Signature;
		type GenericPublic = sp_core::sr25519::Public;
	}

	impl frame_system::offchain::AppCrypto<<Sr25519Signature as Verify>::Signer, Sr25519Signature>
		for OffchainAuthId
	{
		type RuntimeAppPublic = Public;
		type GenericSignature = sp_core::sr25519::Signature;
		type GenericPublic = sp_core::sr25519::Public;
	}
}

pub mod crypto {
	use sp_application_crypto::{app_crypto, ecdsa};
	use sp_runtime::{traits::Verify, MultiSignature, MultiSigner};
	app_crypto!(ecdsa, crate::KEY_TYPE);

	/// Identity of a DKG authority using ECDSA as its crypto.
	pub type AuthorityId = Public;

	/// Signature for a DKG authority using ECDSA as its crypto.
	pub type AuthoritySignature = Signature;
}

pub type AuthoritySetId = u64;

#[derive(Decode, Encode, Debug, PartialEq, Clone, TypeInfo)]
pub struct AuthoritySet<AuthorityId> {
	/// Public keys of the validator set elements
	pub authorities: Vec<AuthorityId>,
	/// Identifier of the validator set
	pub id: AuthoritySetId,
}

impl Default for AuthoritySet<AuthorityId> {
	fn default() -> Self {
		Self { authorities: vec![], id: Default::default() }
	}
}

impl<AuthorityId> AuthoritySet<AuthorityId> {
	/// Return an empty validator set with id of 0.
	pub fn empty() -> Self {
		Self { authorities: vec![], id: Default::default() }
	}
}

pub enum DKGReport {
	KeygenMisbehavior { offender: AuthorityId },
	SigningMisbehavior { offender: AuthorityId },
}

#[derive(Clone, Debug, PartialEq, Eq, codec::Encode, codec::Decode)]
pub struct Commitment<TBlockNumber, TPayload> {
	pub payload: TPayload,
	pub block_number: TBlockNumber,
	pub validator_set_id: AuthoritySetId,
}

pub type AuthorityIndex = u32;

#[derive(Decode, Encode)]
pub enum ConsensusLog<AuthorityId: Codec> {
	/// The authorities have changed.
	#[codec(index = 1)]
	AuthoritiesChange {
		next_authorities: AuthoritySet<AuthorityId>,
		next_queued_authorities: AuthoritySet<AuthorityId>,
	},
	/// Disable the authority with given index.
	#[codec(index = 2)]
	OnDisabled(AuthorityIndex),
	/// MMR root hash.
	#[codec(index = 3)]
	MmrRoot(MmrRootHash),
	/// The authority keys have changed
	#[codec(index = 4)]
	KeyRefresh { old_public_key: Vec<u8>, new_public_key: Vec<u8>, new_key_signature: Vec<u8> },
}

type AccountId = <<MultiSignature as Verify>::Sign


---@class snacks.notifier.Config
---@field enabled? boolean
---@field keep? fun(notif: snacks.notifier.Notif): boolean # global keep function
---@field filter? fun(notif: snacks.notifier.Notif): boolean # filter our unwanted notifications (return false to hide)
return {
	timeout = 4000, -- default timeout in ms
	width = { min = 40, max = 0.4 },
	height = { min = 1, max = 0.6 },
	-- editor margin to keep free. tabline and statusline are taken into account automatically
	margin = { top = 0, right = 1, bottom = 0 },
	padding = true, -- add 1 cell of left/right padding to the notification window
	sort = { "level", "added" }, -- sort by level and time
	-- minimum log


		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof PostgreSQLParserListener ) ((PostgreSQLParserListener)listener).exitB_expr(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof PostgreSQLParserVisitor ) return ((PostgreSQLParserVisitor<? extends T>)visitor).visitB_expr(this);
			else return visitor.visitChildren(this);
		}
	}

	public final B_exprContext b_expr() throws RecognitionException {
		return b_expr(0);
	}

	private B_exprContext b_expr(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		B_exprContext _localctx = new B_exprContext(_ctx, _parentState);
		B_exprContext _prevctx = _localctx;
		int _startState = 1204;
		enterRecursionRule(_localctx, 1204, RULE_b_expr, _p);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(8981);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,570,_ctx) ) {
			case 1:
				{
				setState(8975);
				c_expr();
				}
				break;
			case 2:
				{
				setState(8976);
				_la = _input.LA(1);
				if ( !(_la==PLUS || _la==MINUS) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(8977);
				b_expr(9);
				}
				break;
			case 3:
				{
				setState(8978);
				qual_op();
				setState(8979);
				b_expr(3);
				}
				break;
			}
			_ctx.stop = _input.LT(-1);
			setState(9022);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,574,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					setState(9020);
					_errHandler.sync(this);
					switch ( getInterpreter().adaptivePredict(_input,573,_ctx) ) {
					case 1:
						{
						_localctx = new B_exprContext(_parentctx, _parentState);
						pushNewRecursionContext(_localctx, _startState, RULE_b_expr);
						setState(8983);
						if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
						setState(8984);
						match(CARET);
						setState(8985);
						b_expr(9);
						}
						break;
					case 2:
						{
						_localctx = new B_exprContext(_parentctx, _parentState);
						pushNewRecursionContext(_localctx, _startState, RULE_b_expr);
						setState(8986);
						if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
						setState(8987);
						_la = _input.LA(1);
						if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 134234624L) != 0) ) {
						_errHandler.recoverInline(this);
						}
						else {
							if ( _input.LA(1)==Token.EOF ) matchedEOF = true;


ED_NON_NULLABLE_INSTANCE_FIELD
  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
  // [cfe] Field 'a' should be initialized because its type 'T' doesn't allow null.
}
// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// VMOptions=
// VMOptions=--stress_write_barrier_elimination

import "dart:async";
import "package:expect/async_helper.dart";
import "package:expect/expect.dart";

class Trace {
  String trace = "";
  record(x) {
    trace += x.toString();
  }

  toString() => trace;
}

Stream makeMeAStream() {
  return timedCounter(5);
}

Trace t1 = new Trace();

Future consumeOne() async {
  // Equivalent to await for (x in makeMeAStream()) { ... }
  var s = makeMeAStream();
  var it = new StreamIterator(s);
  while (await it.moveNext()) {
    var x = it.current;
    t1.record(x);
  }
  t1.record("X");
}

Trace t2 = new Trace();

Future consumeTwo() async {
  await for (var x in makeMeAStream()) {
    t2.record(x);
  }
  t2.record("Y");
}

Trace t3 = new Trace();

Future consumeNested() async {
  await for (var x in makeMeAStream()) {
    t3.record(x);
    await for (var y in makeMeAStream()) {
      t3.record(y);
    }
    t3.record("|");
  }
  t3.record("Z");
}

Trace t4 = new Trace();

Future consumeSomeOfInfinite() async {
  int i = 0;
  await for (var x in infiniteStream()) {
    i++;
    if (i > 10) break;
    t4.record(x);
  }
  t4.record("U");
}

main() {
  var f1 = consumeOne();
  t1.record("T1:");

  var f2 = consumeTwo();
  t2.record("T2:");

  var f3 = consumeNested();
  t3.record("T3:");

  var f4 = consumeSomeOfInfinite();
  t4.record("T4:");

  asyncStart();
  Future.wait([f1, f2, f3, f4]).then((_) {
    Expect.equals("T1:12345X", t1.toString());
    Expect.equals("T2:12345Y", t2.toString());
    Expect.equals("T3:112345|212345|312345|412345|512345|Z", t3.toString());
    Expect.equals("T4:12345678910U", t4.toString());
    asyncEnd();
  });
}

// Create a stream that produces numbers [1, 2, ... maxCount]
Stream timedCounter(int maxCount) {
  late StreamController controller;
  Timer? timer;
  int counter = 0;

  void tick(_) {
    counter++;
    controller.add(counter); // Ask stream to send counter values as event.
    if (counter >= maxCount) {
      timer!.cancel();
      controller.close(); //    Ask stream to shut down and tell listeners.
    }
  }

  void startTimer() {
    timer = new Timer.periodic(const Duration(milliseconds: 10), tick);
  }

  void stopTimer() {
    timer?.cancel();
    timer = null;
  }

  controller = new StreamController(
    onListen: startTimer,
    onPause: stopTimer,
    on


 GlError {
    fn from(e: errors::XLibError) -> Self {
        GlError::CreationFailed(CreationFailedError::X11Error(e))
    }
}

// See https://www.khronos.org/registry/OpenGL/extensions/ARB/GLX_ARB_create_context.txt

type GlXCreateContextAttribsARB = unsafe extern "C" fn(
    dpy: *mut xlib::Display,
    fbc: glx::GLXFBConfig,
    share_context: glx::GLXContext,
    direct: xlib::Bool,
    attribs: *const c_int,
) -> glx::GLXContext;

// See https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_swap_control.txt

type GlXSwapIntervalEXT =
    unsafe extern "C" fn(dpy: *mut xlib::Display, drawable: glx::GLXDrawable, interval: i32);

// See https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_framebuffer_sRGB.txt

const GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB: i32 = 0x20B2;

fn get_proc_address(symbol: &str) -> *const c_void {
    let symbol = CString::new(symbol).unwrap();
    unsafe { glx::glXGetProcAddress(symbol.as_ptr() as *const u8).unwrap() as *const c_void }
}

pub struct GlContext {
    window: c_ulong,
    display: *mut xlib::_XDisplay,
    context: glx::GLXContext,
}

/// The frame buffer configuration along with the general OpenGL configuration to somewhat minimize
/// misuse.
pub struct FbConfig {
    gl_config: GlConfig,
    fb_config: *mut glx::__GLXFBConfigRec,
}

/// The configuration a window should be created with after calling
/// [GlContext::get_fb_config_and_visual].
pub struct WindowConfig {
    pub depth: u8,
    pub visual: u32,
}

impl GlContext {
    /// Creating an OpenGL context under X11 works slightly different. Different OpenGL
    /// configurations require different framebuffer configurations, and to be able to use that
    /// context with a window the window needs to be created with a matching visual. This means that
    /// you need to decide on the framebuffer config before creating the window, ask the X11 server
    /// for a matching visual for that framebuffer config, crate the window with that visual, and
    /// only then create the OpenGL context.
    ///
    /// Use [Self::get_fb_config_and_visual] to create both of these things.
    pub unsafe fn create(
        parent: &impl HasRawWindowHandle, config: FbConfig,
    ) -> Result<GlContext, GlError> {
        let handle = if let RawWindowHandle::Xlib(handle) = parent.raw_window_handle() {
            handle
        } else {
            return Err(GlError::InvalidWindowHandle);
        };

        if handle.display.is_null() {
            return Err(GlError::InvalidWindowHandle);
        }

        let display = handle.display as *mut xlib::_XDisplay;

        errors::XErrorHandler::handle(display, |error_handler| {
            #[allow(non_snake_case)]
            let glXCreateContextAttribsARB: GlXCreateContextAttribsARB = {
                let addr = get_proc_address("glXCreateContextAttribsARB");
                if addr.is_null() {
                    return Err(GlError::CreationFailed(CreationFailedError::GetProcAddressFailed));
                } else {
                    std::mem::transmute(addr)
                }
            };

            #[allow(non_snake_case)]
            let glXSwapIntervalEXT: GlXSwapIntervalEXT = {
                let addr = get_proc_address("glXSwapIntervalEXT");
                if addr.is_null() {
                    return Err(GlError::CreationFailed(CreationFailedEr


YMid meet" viewBox="0 0 576 512"><path fill="currentColor" d="M301.1 34.8C312.6 40 320 51.4 320 64v384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64v-64c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3zM425 167l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"/></svg>';
  static const String vr_cardboard =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="640" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 640 512"><path fill="currentColor" d="M576 64H64C28.7 64 0 92.7 0 128v256c0 35.3 28.7 64 64 64h120.4c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4H576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zM224 240c0 35.3-28.7 64-64 64s-64-28.7-64-64 28.7-64 64-64 64 28.7 64 64zm256 64c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z"/></svg>';
  static const String w =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="576" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 576 512"><path fill="currentColor" d="M20.8 34c16.5-6.2 35 2.2 41.2 18.7l110.2 294L257.3 55c4-13.7 16.5-23 30.7-23s26.7 9.4 30.7 23l85.1 291.7L514 52.8c6.2-16.5 24.6-24.9 41.2-18.7s24.9 24.7 18.7 41.2l-144 384c-4.8 12.9-17.4 21.3-31.2 20.7s-25.7-9.8-29.5-23L288 178.3 206.7 457c-3.9 13.2-15.8 22.5-29.5 23s-26.3-7.8-31.2-20.7L2 75.2c-6.2-16.5 2.2-35 18.8-41.2z"/></svg>';
  static const String walkie_talkie =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="384" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 384 512"><


hedule, %function
schedule:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	push	{r7}
	sub	sp, sp, #12
	add	r7, sp, #0
	ldr	r3, .L56
	str	r3, [r7, #4]
	ldr	r3, [r7, #4]
	ldr	r3, [r3]
	orr	r2, r3, #268435456
	ldr	r3, [r7, #4]
	str	r2, [r3]
	nop
	adds	r7, r7, #12
	mov	sp, r7
	@ sp needed
	pop	{r7}
	bx	lr
.L57:
	.align	2
.L56:
	.word	-536810236
	.size	schedule, .-schedule
	.align	1
	.global	task_delay
	.syntax unified
	.thumb
	.thumb_func
	.type	task_delay, %function
task_delay:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r7, lr}
	sub	sp, sp, #8
	add	r7, sp, #0
	str	r0, [r7, #4]
	.syntax unified
@ 234 "main.c" 1
	MOV R0,#0x1
@ 0 "" 2
@ 234 "main.c" 1
	MSR PRIMASK,R0
@ 0 "" 2
	.thumb
	.syntax unified
	ldr	r3, .L60
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L59
	ldr	r3, .L60+4
	ldr	r2, [r3]
	ldr	r3, .L60
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, [r7, #4]
	add	r2, r2, r3
	ldr	r1, .L60+8
	lsls	r3, r0, #4
	add	r3, r3, r1
	adds	r3, r3, #4
	str	r2, [r3]
	ldr	r3, .L60
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r2, .L60+8
	lsls	r3, r3, #4
	add	r3, r3, r2
	adds	r3, r3, #8
	movs	r2, #255
	strb	r2, [r3]
	bl	schedule
.L59:
	.syntax unified
@ 243 "main.c" 1
	MOV R0,#0x0
@ 0 "" 2
@ 243 "main.c" 1
	MSR PRIMASK,R0
@ 0 "" 2
	.thumb
	.syntax unified
	nop
	adds	r7, r7, #8
	mov	sp, r7
	@ sp needed
	pop	{r7, pc}
.L61:
	.align	2
.L60:
	.word	current_task
	.word	g_tick_count
	.word	user_tasks
	.size	task_delay, .-task_delay
	.align	1
	.global	PendSV_Handler
	.syntax unified
	.thumb
	.thumb_func
	.type	PendSV_Handler, %function
PendSV_Handler:
	@ Naked Function: prologue


程序是什么，主要面向居民，以及各种关于社区社会公众权利、义务、天灾等与公共安全有关的信息、户口、各种证件和规章的管理服务等。政府对居民提供的服务包括信息服务、户籍管理服务、医疗、警察、消防和税务等。企业对政府（B2G）

4)企业对政府（B2G）
企业向政府的活动包括企业应向政府提供的各种税收和费用，按政府要求应提交报告的各种统计信息和报表、参加政府工程项目的竞标、向政府提供商品和服务，以及政府如何知道企业的政府经营管理状况，如如何由企业发展事业单位业务范围和希望，提出政府的管理意见和服务。企业对政府的活动范围包括税收、投标、商品和服务等。

5)居民对政府（G2C）
居民对政府的活动包括个人向政府缴纳的各种税种和费用，按政府要求应提交报告的各种信息和报表，以及缴纳各种税费等，主要是居民了解居民信息、议政的途径，使政府的项目工作不能得到议政和完善。政府需要个人渠道来了解需求，征求群体意见，以便更好地为学生服务。此外，根据服务（盗版、医疗、急救、火警等）和征税条款范围不属于居民或政府报告并要求政府提供的服务，也属于这个范围。

**正确答案（问题1）：B**
**正确答案（问题2）：A**
**正确答案（问题3）：D**
**正确答案（问题4）：C**
</details>

---

## 第22-23题
软件文档是影响软件可维护性的决定因素。软件的文档可以分为用户文档和（问题1）两类。其中，用户文档主要描述（问题2）和使用方法，并不关心这些功能是怎样实现的。

问题1：
> A. 系统文档
> B. 需求文档
> C. 标准文档
> D. 实现文档

问题2：
> A. 系统实现
> B. 系统设计
> C. 系统功能
> D. 系统测试

---
### 答案
**问题1：A**
**问题2：C**

### 解析
<details>
<summary>查看解析</summary>

本题考查软件文档的相关知识。

软件文档是影响软件可维护性的决定因素。根据文档内容，软件文档又可分为用户文档和系统文档两类。其中，用户文档主要描述系统功能


modal.style.display = 'none';
                }
            };
        });
    </script>
    {% endblock scripts %}
    {% endblock content %}<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tower of Pizza</title>
    <link rel="stylesheet" href="styles.css">

Tower of Pizza

    Home
    Menu
    Accommodation
    About Us
    Contact

Welcome to the Tower of Pizza!

Slide 1

Text for the first slide.

Slide 2

Text for the second slide.

Slide 2

Text for the second slide.

Slide 2

Text for the second slide.

Menu

Check out our delicious menu items.

Accommodation

Explore our comfortable accommodations.

About Us

Learn more about the history and values of Tower of Pizza.

Contact

Reach out to us for reservations and inquiries.

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>MAD9011 Deliverables | MAD9011 - W2024</title>
    <meta name="generator" content="VuePress 1.9.7">

    <meta name="description" content="Mobile Design Fundamentals">

    <link rel="preload" href="/w2024/assets/css/0.styles.d25ff888.css" as="style"><link rel="preload" href="/w2024/assets/js/app.90b83012.js" as="script"><link rel="preload" href="/w2024/assets/js/2.04729d03.js" as="script"><link rel="preload" href="/w2024/assets/js/40.419d8904.js" as="script"><link rel="preload" href="/w2024/assets/js/27.986b9829.js" as="script"><link rel="preload" href="/w2024/assets/js/20.f6d7dc20.js" as="script"><link rel="prefetch" href="/w2024/assets/js/10.757f401a.js"><link rel="prefetch" href="/w2024/assets/js/11.ea0fe0d8.js"><link rel="prefetch" href="/w2024/assets/js/12.428a2304.js"><link rel="prefetch" href="/w2024/assets/js/13.24ee4687.js"><link rel="prefetch" href="/w2024/assets/js/14.b94ccc88.js"><link rel="prefetch" href="/w2024/assets/js/15.67267630.js"><


t) {
   let buffer;
   let is_string = 0;
   if (event.data instanceof ArrayBuffer) {
    buffer = new Uint8Array(event.data);
   } else if (event.data instanceof Blob) {
    GodotRuntime.error("Blob type not supported");
    return;
   } else if (typeof event.data === "string") {
    is_string = 1;
    const enc = new TextEncoder("utf-8");
    buffer = new Uint8Array(enc.encode(event.data));
   } else {
    GodotRuntime.error("Unknown message type");
    return;
   }
   const len = buffer.length * buffer.BYTES_PER_ELEMENT;
   const out = GodotRuntime.malloc(len);
   GROWABLE_HEAP_U8().set(buffer, out);
   p_on_message(out, len, is_string);
   GodotRuntime.free(out);
  };
 },
 close: function(p_id) {
  const ref = IDHandler.get(p_id);
  if (!ref) {
   return;
  }
  ref.onopen = null;
  ref.onmessage = null;
  ref.onerror = null;
  ref.onclose = null;
  ref.close();
 },
 get_prop: function(p_id, p_prop, p_def) {
  const ref = IDHandler.get(p_id);
  return ref && ref[p_prop] !== undefined ? ref[p_prop] : p_def;
 }
};

function _godot_js_rtc_datachannel_close(p_id) {
 if (ENVIRONMENT_IS_PTHREAD) return proxyToMainThread(121, 1, p_id);
 const ref = IDHandler.get(p_id);
 if (!ref) {
  return;
 }
 GodotRTCDataChannel.close(p_id);
}

function _godot_js_rtc_datachannel_connect(p_id, p_ref, p_on_open, p_on_message, p_on_error, p_on_close) {
 if (ENVIRONMENT_IS_PTHREAD) return proxyToMainThread(122, 1, p_id, p_ref, p_on_open, p_on_message, p_on_error, p_on_close);
 const onopen = GodotRuntime.get_func(p_on_open).bind(null, p_ref);
 const onmessage = GodotRuntime.get_func(p_on_message).bind(null, p_ref);
 const onerror = GodotRuntime.get_func(p_on_error).bind(null, p_ref);
 const onclose = GodotRuntime.get_func(p_on_close).bind(null, p_ref);
 GodotRTCDataChannel.connect(p_id, onopen, onmessage, onerror, onclose);
}

function _godot_js_rtc_datachannel_destroy(p_id) {
 if (ENVIRONMENT_IS_PTHREAD) return proxyToMainThread(123, 1, p_id);
 GodotRTCDataChannel.close(p_id);
 IDHandler.remove(p_id);
}

function _godot_js_rtc_datachannel_get_buffered_amount(p_id) {
 if (ENVIRONMENT_IS_PTHREAD) return proxyToMainThread(124, 1, p_id);
 return GodotRTCDataChannel.get_prop(p_id, "bufferedAmount", 0);
}

function _godot_js_rtc_datachannel_id_get(p_id) {
 if (ENVIRONMENT_IS_PTHREAD) return proxyToMainThread(125, 1, p_id);
 return GodotRTCDataChannel.get_prop(p_id, "id", 65535);
}

function _godot_js_rtc_datachannel_is_negotiated(p_id) {
 if (ENVIRONMENT_IS_PTHREAD) return proxyToMainThread(126, 1, p_id);
 return GodotRTCDataChannel.get_prop(p_id, "negotiated", 65535);
}


Config.SmileyPath	= FCKConfig.BasePath + 'images/smiley/msn/' ;
FCKConfig.SmileyImages	= ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;
FCKConfig.SmileyColumns = 8 ;
FCKConfig.SmileyWindowWidth		= 320 ;
FCKConfig.SmileyWindowHeight	= 210 ;

FCKConfig.BackgroundBlockerColor = '#ffffff' ;
FCKConfig.BackgroundBlockerOpacity = 0.50 ;
// CalendarDateSelect version 1.16.1 - a prototype based date picker
// Questions, comments, bugs? - see the project page: http://code.google.com/p/calendardateselect
if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required.  If using earlier version of prototype, please use calendar_date_select version 1.8.3");

Element.addMethods({
  purgeChildren: function(element) { $A(element.childNodes).each(function(e){$(e).remove();}); },
  build: function(element, type, options, style) {
    var newElement = Element.buildAndAppend(type, options, style);
    element.appendChild(newElement);
    return newElement;
  }
});

Element.buildAndAppend = function(type, options, style)
{
  var e = $(document.createElement(type));
  $H(options).each(function(pair) { e[pair.key] = pair.value });
  if (style) e.setStyle(style);
  return e;
};
nil = null;

Date.one_day = 24*60*60*1000;
Date.weekdays = $w("S M T W T F S");
Date.first_day_of_week = 0;
Date.months = $w("January February March April May June July August September October November December" );
Date.padded2 = function(hour) { var padded2 = parseInt(hour, 10); if (hour < 10) padded2 = "0" + padded2; return padded2; }
Date.prototype.getPaddedMinutes = function() { return Date.padded2(this.getMinutes()); }
Date.prototype.getAMPMHour = function() { var hour = this.getHours(); return (hour == 0) ? 12 : (hour > 12 ? hour - 12 : hour ) }
Date.prototype.getAMPM = function() { return (this.getHours() < 12) ? "AM" : "PM"; }
Date.prototype.stripTime = function() { return new Date(this.getFullYear(), this.getMonth(), this.getDate());};
Date.prototype.daysDistance = function(compare_date) { return Math.round((compare_date - this) / Date.one_day); };
Date.prototype.toFormattedString = function(include_time){
  var hour, str;
  str = Date.months[this.getMonth()] + " " + this.getDate() + ", " + this.getFullYear();

  if (include_time) { hour = this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() + " " + this.getAMPM() }
  return str;
}
Date.parseFormattedString = function(string) { return new Date(string);}
Math.floor_to_interval = function(n


	}

	.main-navigation .menu-item-has-children > a {
		padding-right: 34px;
	}

	.main-navigation .menu-item-description {
		line-height: 1.4583;
		margin-top: 0.25em;
	}

	.dropdown-toggle-button {
		height: 28px;
		width: 28px;
	}

	.dropdown-toggle-button:after {
		line-height: 28px;
		width: 28px;
	}

	.social-navigation ul {
		margin-bottom: -1.4706em;
	}

	.social-navigation li {
		width: 20%;
	}

	.social-navigation a {
		height: 2.8824em;
	}

	.post-password-form label,
	.post-navigation .meta-nav,
	.comment-navigation,
	.image-navigation,
	.author-heading,
	.author-bio,
	.entry-footer,
	.page-links a,
	.page-links span,
	.comment-metadata,
	.pingback .edit-link,
	.comment-list .reply,
	.comment-notes,
	.comment-awaiting-moderation,
	.logged-in-as,
	.comment-form label,
	.form-allowed-tags,
	.site-info,
	.wp-caption-text,
	.gallery-caption,
	.entry-caption,
	.widecolumn label,
	.widecolumn .mu_register label {
		font-size: 14px;
		font-size: 1.4rem;
	}

	.pagination .nav-links {
		min-height: 3.2941em;
	}

	.pagination .page-numbers {
		line-height: 3.2941em;
		padding: 0 0.8235em;
	}

	.pagination .prev,
	.pagination .next {
		height: 56px;
		padding: 0;
		width: 56px;
	}

	.pagination .prev:before,
	.pagination .next:before {
		height: 56px;
		line-height: 56px;
		width: 56px;
	}

	.image-navigation .nav-previous a:before,
	.image-navigation .nav-next a:after,
	.comment-navigation .nav-previous a:before,
	.comment-navigation .nav-next a:after {
		top: 2px;
	}

	blockquote.alignleft,
	.wp-caption.alignleft,
	img.alignleft {
		margin: 0.4118em 1.6471em 1.6471em 0;
	}

	blockquote.alignright,
	.wp-caption.alignright,
	img.alignright {
		margin: 0.4118em 0 1.6471em 1.6471em;
	}

	blockquote.aligncenter,
	.wp-caption.aligncenter,
	img.aligncenter {
		margin-top: 0.4118em;
		margin-bottom: 1.6471em;
	}

	.wp-caption.alignleft,
	.wp-caption.alignright,
	.wp-caption.aligncenter {
		margin-bottom: 1.2353em;
	}

	.site-title {
		font-size: 24px;
		font-size: 2.4rem;
		line-height: 1.1667;
	}

	.site-description {
		font-size: 14px;
		font-size: 1.4rem;
	}

	.widget {
		font-size: 14px;
		font-size: 1.4rem;
	}

	.widget blockquote {
		font-size: 14px;
		font-size: 1.4rem;
		padding-left: 1.2143em;
	}

	.widget button,
	.widget input,
	.widget select,
	.widget textarea {


iovcnt);
		if (rc != len) {
			printf("Read error: %s rc = %d\n", strerror(errno), rc);
			rc = 1;
			goto out;
		}

		/* It should return zeroed buf if the read hits hole.*/
		if (((act & ACT_READHOLE) || (act & ACT_VERIFY)) &&
		    data_verify(iov, iovcnt, pad)) {
			rc = 1;
			goto out;
		}

		if (act & ACT_OUTPUT) {
			rc = writev(out_fd, iov, iovcnt);
			if (rc != len) {
				printf("write error: %s rc = %d\n",
				       strerror(errno), rc);
				rc = 1;
				goto out;
			}
		}
	}

	rc = 0;
out:
	if (iov)
		free(iov);
	if (out_fd >= 0)
		close(out_fd);
	return rc;
}


een And The Depth Buffer
        GL11.glLoadIdentity();                                  // Reset The View

        GL11.glTranslatef(0.0f,0.0f,-12.0f);

        GL11.glRotatef(xrot,1.0f,0.0f,0.0f);
        GL11.glRotatef(yrot,0.0f,1.0f,0.0f);
        GL11.glRotatef(zrot,0.0f,0.0f,1.0f);

        GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture[0]);

        GL11.glBegin(GL11.GL_QUADS);
        for( x = 0; x < 44; x++ ) {
            for( y = 0; y < 44; y++ ) {
                float_x = (float)(x)/44.0f;
                float_y = (float)(y)/44.0f;
                float_xb = (float)(x+1)/44.0f;
                float_yb = (float)(y+1)/44.0f;

                GL11.glTexCoord2f( float_x, float_y);
                GL11.glVertex3f( points[x][y][0], points[x][y][1], points[x][y][2] );

                GL11.glTexCoord2f( float_x, float_yb );
                GL11.glVertex3f( points[x][y+1][0], points[x][y+1][1], points[x][y+1][2] );

                GL11.glTexCoord2f( float_xb, float_yb );
                GL11.glVertex3f( points[x+1][y+1][0], points[x+1][y+1][1], points[x+1][y+1][2] );

                GL11.glTexCoord2f( float_xb, float_y );
                GL11.glVertex3f( points[x+1][y][0], points[x+1][y][1], points[x+1][y][2] );
            }
        }
        GL11.glEnd();

        if( wiggle_count == 2 ) {
            for( y = 0; y < 45; y++ ) {
                hold=points[0][y][2];
                for( x = 0; x < 44; x++) {
                    points[x][y][2] = points[x+1][y][2];
                }
                points[44][y][2]=hold;
            }
            wiggle_count = 0;
        }

        wiggle_count++;

        xrot+=0.3f;
        yrot+=0.2f;
        zrot+=0.4f;
    }
    private void createWindow() throws Exception {
        Display.setFullscreen(fullscreen);
        DisplayMode d[] = Display.getAvailableDisplayModes();
        for (int i = 0; i < d.length; i++) {
            if (d[i].getWidth() == 640
                && d[i].getHeight() == 480
                && d[i].getBitsPerPixel() == 32) {
                displayMode = d[i];
                break;
            }
        }
        Display.setDisplayMode(displayMode);
        Display.setTitle(windowTitle);
        Display.create();
    }
    private void init() throws Exception {
        createWindow();
        IL.create();

        loadTextures();
        initGL();

        for(int x=0; x<45; x++) {
            for(int y=0; y<45; y++) {
                points[x][y][0]=(float)x/5.0f-4.5f;
                points[x][y][1]=(float)y/5.0f-4.5f;
                points[x][y][2]=(float)(Math.sin(((((double)x/5.0)*40.0)/360.0)*Math.PI*2.0));
            }
        }
    }

    private void loadTextures() {
        texture = loadTexture("Data/Tim.bmp");
    }
    private void initGL() {
        GL11.glEnable(GL11.GL_TEXTURE_2D);                                  // Enable Texture Mapping
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE);                    // Set The Blending Function For Translucency
        GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);                          // This Will Clear The Background Color To Black
        GL


 = uci:get("accelerator", typ, "state")
    -- check state
    local state_text = "None"
    if state == nil or state == '0' then
    elseif state == '1' then
      state_text = translate("Acc Catalog Started")
    elseif state == '2' then
      state_text = translate("Acc Catalog Stopped")
    elseif state == '3' then
      state_text = translate("Acc Catalog Paused")
    end
    -- store text
    resp.state[translate(typ .. "_Catalog")] = state_text
  end
  luci.http.prepare_content("application/json")
  luci.http.write_json(resp)
end

-- start_acc_service
function start_acc_service()
  -- util module
  local util      = require "luci.util"
  util.exec("/etc/init.d/acc restart")
  local resp = {}
  resp.result = "OK"
  luci.http.prepare_content("application/json")
  luci.http.write_json(resp)
end

-- start_acc_service
function stop_acc_service()
  -- util module
  local util      = require "luci.util"
  util.exec("/etc/init.d/acc stop")
  local resp = {}
  resp.result = "OK"
  luci.http.prepare_content("application/json")
  luci.http.write_json(resp)
end

-- logs
function get_log()
    local log_file = "/tmp/acc/acc-gw.log-*"
    local tmpfile = os.tmpname()

    os.execute("cat " .. log_file .. " > " .. tmpfile .. " 2>/dev/null")

    local f = io.open(tmpfile, "r")
    if not f then
        print("Content-Type: text/plain\n")
        print("没有任何日志信息")
        return
    end

    local content = f:read("*a")
    f:close()
    os.remove(tmpfile)

    if #content == 0 then
        print("Content-Type: text/plain\n")
        print("没有任何日志信息")
    else
        print("Content-Type: text/plain\n")
        print(content)
    end
end


,0 14,8.402 5.598,0 0,5.602 8.398,14 0,22.398 5.598,28 14,19.598 22.398,28 28,22.398 19.594,14 Z";
}
.header.title .iconbox .warning-icon.icon {
    -fx-pref-width: 0.333em;
}
.description { -fx-padding: 0 0 0.5em 0; }
.buttons {
    -fx-alignment: center;
    -fx-padding: 1em 0.5em 0.5em 0.5em;
}
.button { -fx-content-display: text-only; }
.filefind .button,
.toolbar.buttons .button,
.form .filefind .button { -fx-content-display: graphic-only; }
.form .buttons {
    -fx-alignment: center-left;
    -fx-padding: 0.5em 0.5em 0.5em 1em;
}
.form.textentry .buttons {
    -fx-alignment: center-left;
    -fx-padding: 0.5em 0.5em 0.5em 0em;
}
.delete .buttons {
    -fx-aligment: center;
    -fx-padding: 1em 0.5em 0.5em 0;
}
.error .header > .iconbox .icon {
    -fx-pref-width: 0.333em;
}
.form.textentry .items { -fx-padding: 0; }
.form.textentry .items .control { -fx-padding: 0 0 0.5em 0; }

.popupviewer .qpopup
{
    -fx-border-width: 0;
}

.timer .button.start
{
    -fx-content-display: graphic-only;
}

.qpopup .header .iconbox .icon.important-icon
{
    -fx-pref-width: 0.333em;
}

.qpopup .form.content .errors
{
    -fx-padding: 0 0 0.5em 0;
}
.qpopup .header .iconbox .icon.chaptericonsexample-icon,
.qpopup .header .iconbox .icon.editpositionexample-icon,
.qpopup .header .iconbox .icon.compresschaptercontextexample-icon
{
    -fx-pref-height: 0.888em;
    -fx-shape: "m 20,12.016 a 4,4 0 0 1 -4,4 4,4 0 0 1 -4,-4 A 4,4 0 0 1 16,8.0159998 4,4 0 0 1 20,12.016 M 16,0 C 7.164,0 0,11.844 0,11.844 0,11.844 7.164,24 16,24 24.836,24 32,11.844 32,11.844 32,11.844 24.836,0 16,0 Z m 0,20 c -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 0,4.418 -3.582,8 -8,8 z";
    -fx-background-color: -qw-icon-color;
}

.qpopup .content ul
{
    -fx-padding: 0.5em 0 0.5em 0.5em;
}
/*
 * Base styles applicable to all instances of com.quollwriter.ui.fx.components.Form
 */
 .form:stacked .label
 {
     -fx-padding: 0 0 0.3em 0;
     -fx-font-style: italic;
     /*-fx-text-overrun: clip;*/
 }

 .form:stacked .control
 {
     -fx-padding: 0 0 0.5em 1em;
 }

 .form:column .label
 {
     -fx-alignment: top-right;
     -fx-padding: 0 0.25em 0.5em 0;
 }

 .form:column .control
 {
     -fx-padding: 0 0 0.5e


ons and
limitations under the License.
*/
// Package bitmap implements bitmap indexes for low-cardinality columns.
//
// The bitmap index functionality is implemented and integrated with the storage engine
// to provide efficient filtering for low-cardinality columns. This includes automatic
// creation and update of bitmap indexes during data insertion, as well as their use
// in query filtering through the FilteredScanner.
package bitmap

import (
	"crypto/md5"
	"errors"
	"fmt"
	"log"
	"os"
	"path/filepath"
	"strconv"
	"strings"
	"sync"
	"time"

	"github.com/stoolap/stoolap/internal/storage"
	"github.com/stoolap/stoolap/internal/storage/binser"
)

// Index represents a bitmap index for one or more columns
type Index struct {
	// columnNames are the names of the columns this index is for
	columnNames []string
	// valueMap maps values to their corresponding bitmaps
	valueMap map[string]*Bitmap
	// rowCount is the number of rows in the column
	rowCount int64
	// dataTypes are the data types of the columns
	dataTypes []storage.DataType
	// mutex protects concurrent access to the bitmap index
	mutex sync.RWMutex
}

// NewIndex creates a new bitmap index for one or more columns
func NewIndex(columnNames []string, dataTypes []storage.DataType, rowCount int64) *Index {
	return &Index{
		columnNames: columnNames,
		valueMap:    make(map[string]*Bitmap),
		rowCount:    rowCount,
		dataTypes:   dataTypes,
	}
}

// NewSingleColumnIndex creates a new bitmap index for a single column
func NewSingleColumnIndex(columnName string, dataType storage.DataType, rowCount int64) *Index {
	return NewIndex([]string{columnName}, []storage.DataType{dataType}, rowCount)
}

// ColumnNames returns the column names this index is for
func (idx *Index) ColumnNames() []string {
	return idx.columnNames
}

// DataTypes returns the data types of the columns
func (idx *Index) DataTypes() []storage.DataType {
	return idx.dataTypes
}

// RowCount returns the number of rows in the index
func (idx *Index) RowCount() int64 {
	idx.mutex.RLock()
	defer idx.mutex.RUnlock()
	return idx.rowCount
}

// Clone creates a copy of the bitmap index
func (idx *Index) Clone() (*Index, error) {
	idx.mutex.RLock()
	defer idx.mutex.RUnlock()

	newIdx := &Index{
		columnNames: make([]string, len(idx.columnNames)),
		valueMap:    make(map[string]*Bitmap, len(idx.valueMap)),
		rowCount:    idx.rowCount,
		dataTypes:   make([]storage.DataType, len(idx.dataTypes)),
	}

	copy(newIdx.columnNames, idx.columnNames)
	copy(newIdx.dataTypes, idx.dataTypes)

	for value, bitmap := range idx.valueMap {
		newIdx.valueMap[value] = bitmap.Clone()
	}

	return newIdx, nil
}

// AddValue adds a value at a specific position
func (idx *Index) AddValue(value interface{}, pos int64) error {
	if pos < 0 {
		return fmt.Errorf("position cannot be negative: %d", pos)
	}

	idx.mutex.Lock()
	defer idx.mutex.Unlock()

	// Convert the value to a string representation
	strValue := storage.ConvertValueToString(value)

	// Get or create the bitmap for this value
	bitmap, exists := idx.valueMap[strValue]
	if !exists {
		bitmap = New(idx.rowCount)
		idx.valueMap[strValue] = bitmap
	}

	// Ensure the bitmap is