 the client.
pub(crate) fn encode(mut stream: impl Write, op: ClientOp<'_>) -> io::Result<()> {
    match &op {
        ClientOp::Connect(connect_info) => {
            let op = format!(
                "CONNECT {}\r\n",
                connect_info.dump().ok_or_else(|| Error::new(
                    ErrorKind::InvalidData,
                    "cannot serialize connect info"
                ))?
            );
            stream.write_all(op.as_bytes())?;
        }

        ClientOp::Pub {
            subject,
            reply_to,
            payload,
        } => {
            stream.write_all(b"PUB ")?;
            stream.write_all(subject.as_bytes())?;
            stream.write_all(b" ")?;

            if let Some(reply_to) = reply_to {
                stream.write_all(reply_to.as_bytes())?;
                stream.write_all(b" ")?;
            }

            let mut buf = itoa::Buffer::new();
            stream.write_all(buf.format(payload.len()).as_bytes())?;
            stream.write_all(b"\r\n")?;

            stream.write_all(payload)?;
            stream.write_all(b"\r\n")?;
        }

        ClientOp::Hpub {
            subject,
            reply_to,
            headers,
            payload,
        } => {
            stream.write_all(b"HPUB ")?;
            stream.write_all(subject.as_bytes())?;
            stream.write_all(b" ")?;

            if let Some(reply_to) = reply_to {
                stream.write_all(reply_to.as_bytes())?;
                stream.write_all(b" ")?;
            }

            let header_bytes = headers.to_bytes();

            let header_len = header_bytes.len();
            let total_len = header_len + payload.len();

            let mut hlen_buf = itoa::Buffer::new();
            stream.write_all(hlen_buf.format(header_len).as_bytes())?;

            stream.write_all(b" ")?;

            let mut tlen_buf = itoa::Buffer::new();
            stream.write_all(tlen_buf.format(total_len).as_bytes())?;

            stream.write_all(b"\r\n")?;

            stream.write_all(&header_bytes)?;
            stream.write_all(payload)?;
            stream.write_all(b"\r\n")?;
        }

        ClientOp::Sub {
            subject,
            queue_group,
            sid,
        } => {
            let op = if let Some(queue_group) = queue_group {
                format!("SUB {} {} {}\r\n", subject, queue_group, sid)
            } else {
                format!("SUB {} {}\r\n", subject, sid)
            };
            stream.write_all(op.as_bytes())?;
        }

        ClientOp::Unsub { sid, max_msgs } => {
            let op = if let Some(max_msgs) = max_msgs {
                format!("UNSUB {} {}\r\n", sid, max_msgs)
            } else {
                format!("UNSUB {}\r\n", sid)
            };
            stream.write_all(op.as_bytes())?;
        }

        ClientOp::Ping => {
            stream.write_all(b"PING\r\n")?;
        }

        ClientOp::Pong => {
            stream.write_all(b"PONG\r\n")?;
        }
    }

    Ok(())
}
use super::*;
use ic_types::crypto::{AlgorithmId, CryptoError};
use std::convert::{From, TryFrom};

impl Into<String> for SecretKeyBytes {
    fn into(self) -> String {
        base64::encode(&self.0[


				args: ["lab(50% 2.5 0)", "lab(50% 3.2592 0.3350)"],
					expect: 1.0,
				},
				// from "Improvement to industrial colour-difference
				// evaluation. Vienna: CIE Publication No. 142-2001
				{
					name: "Sharma test 25: CIE Publication No. 142",
					args: ["lab(60.2574% -34.0099 36.2677)", "lab(60.4626% -34.1751 39.4387)"],
					expect: 1.2644,
				},
				{
					name: "Sharma test 26: CIE Publication No. 142",
					args: ["lab(63.0109% -31.0961 -5.8663)", "lab(62.8187% -29.7946 -4.0864)"],
					expect: 1.263,
				},
				{
					name: "Sharma test 27: CIE Publication No. 142",
					args: ["lab(61.2901% 3.7196 -5.3901)", "lab(61.4292% 2.2480 -4.9620)"],
					expect: 1.8731,
				},
				{
					name: "Sharma test 28: CIE Publication No. 142",
					args: ["lab(35.0831% -44.1164 3.7933)", "lab(35.0232% -40.0716 1.5901)"],
					expect: 1.8645,
				},
				{
					name: "Sharma test 29: CIE Publication No. 142",
					args: ["lab(22.7233% 20.0904 -46.6940)", "lab(23.0331% 14.9730 -42.5619)"],
					expect: 2.0373,
				},
				{
					name: "Sharma test 30: CIE Publication No. 142",
					args: ["lab(36.4612% 47.8580 18.3852)", "lab(36.2715% 50.5065 21.2231)"],
					expect: 1.4146,
				},
				{
					name: "Sharma test 31: CIE Publication No. 142",
					args: ["lab(90.8027% -2.0831 1.4410)", "lab(91.1528% -1.6435 0.0447)"],
					expect: 1.4441,
				},
				{
					name: "Sharma test 32: CIE Publication No. 142",
					args: ["lab(90.9257% -0.5406 -0.9208)", "lab(88.6381% -0.8985 -0.7239)"],
					expect: 1.5381,
				},
				{
					name: "Sharma test 33: CIE Publication No. 142",
					args: ["lab(6.7747% -0.2908 -2.4247)", "lab(5.8714% -0.0985 -2.2286)"],
					expect: 0.6377,
				},
				{
					name: "Sharma test 34: CIE Publication No. 142",
					args: ["lab(2.0776% 0.0795 -1.1350)", "lab(0.9033% -0.0636 -0.5514)"],
					expect: 0.9082,
				},
				{
					name: "Brilliant Yellow with Hue error",
					args: ["lab(84.25% 5.74 96.00)", "lab(84.46% 8.88 96.49)"],
					expect: 1.6364,
				},
				{
					name: "Brilliant Yellow with low Chroma error",
					args: ["lab(84.25% 5.74 96.00)", "lab(84.52% 5.75 93.09)"],
					expect: 0.5887,
				},
				{
					name: "Brilliant Yellow with high Chroma error",
					args: ["lab(84.25% 5.74 96.00)", "lab(84.37% 5.86 99.42)"],
					expect: 0.6395,
				},
			],
		},
		{
			name: "DeltaE Jz",
			data: { method: "Jz" },
			tests: [


Req {
        RepReq(Arc::new(ReqData {
            settings: self.settings,
            method: self.method,
            path: self.path,
            host: self.host,
            headers: self.headers,
            addr: self.addr,
            request_id: self.request_id,
            body: body,
        }))
    }
}
impl RepReq {
    pub fn encode<S>(&self, mut e: Encoder<S>, dest: &Arc<Destination>)
        -> EncoderDone<S>
    {
        let ref r = *self.0;
        if r.settings.destination.path == "/" {
            e.request_line(&r.method, &r.path, Version::Http11);
        } else {
            e.request_line(&r.method,
                &format!("{}{}", r.settings.destination.path, r.path),
                Version::Http11);
        }

        // Spec doesn't mandate, but recomments it to be first
        if let Some(ref header) = dest.override_host_header {
            e.add_header("Host", header).unwrap();
        } else {
            e.add_header("Host", &r.host).unwrap();
        }
        if let Some(ref h) = r.settings.ip_header {
            // NOTE: this can duplicate header value.
            e.format_header(h, r.addr.ip()).unwrap();
        }
        if let Some(ref h) = dest.request_id_header {
            // NOTE: this can duplicate header value.
            e.format_header(h, r.request_id).unwrap();
        }

        for &(ref k, ref v) in &r.headers {
            e.add_header(k, v).unwrap();
        }
        e.add_length(r.body.len() as u64).unwrap();
        e.done_headers().unwrap();
        if r.body.len() != 0 {
            e.write_body(&r.body);
        }
        return e.done();
    }
}
crate::use_native_or_external!(List);
crate::use_native_or_external!(SharedByteList);

use super::DecodedInput;
use crate::source::SourceLine;

impl DecodedInput {
    /// Populates `Input` with a given byte array
    pub fn update_bytes(&mut self, bytes: List<u8>) {
        let mut line = SourceLine::new(0, 0, true);
        let mut lines = list![];

        for (idx, c) in bytes.iter().enumerate() {
            line.set_end(idx + 1);
            if *c == b'\n' {
                line.set_ends_with_eof(false);
                lines.push(line);
                line = SourceLine::new(idx + 1, 0, true)
            }
        }
        line.set_end(bytes.len());
        line.set_ends_with_eof(true);
        lines.push(line);

        self.set_bytes(bytes);
        self.set_lines(lines);
    }

    /// Returns (line, col) pair for a given byte offset.
    ///
    /// Returns None if given offset is out of range.
    pub fn line_col_for_pos(&self, mut pos: usize) -> Option<(usize, usize)> {
        if pos == self.len() {
            // EOF loc
            let last_line = self.lines().last()?;
            return Some((self.lines().len() - 1, last_line.len()));
        }

        for (lineno, line) in self.lines().iter().enumerate() {
            if line.len() > pos {
                return Some((lineno, pos));
            } else {
                pos -= line.len()
            }
        }

        None
    }

    pub(crate) fn line_at(&self, idx: usize) -> &Sourc


/JInternalFrame.html#maximizable" title="class or interface in javax.swing" class="external-link">maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY

Fields inherited from class javax.swing.JComponent

listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, <a href="https://docs.oracle.com/en/java/javase/17/docs/api


function sync() {
  var params = init();
  console.log('Sync generating ' + params.bits + '-bit key-pair...');
  var start = +new Date();
  var keypair = forge.pki.rsa.generateKeyPair(params.bits);
  var dt = +new Date() - start;

  $('#time').text(dt + 'ms');
  $('#private').text(forge.pki.privateKeyToPem(keypair.privateKey));
  $('#public').text(forge.pki.publicKeyToPem(keypair.publicKey));

  console.log('Key-pair created in ' + dt + 'ms.');
  console.log('private', forge.pki.privateKeyToPem(keypair.privateKey));
  console.log('public', forge.pki.publicKeyToPem(keypair.publicKey));
}
</script>

   Forge Tests /
   Legacy /
   KeyGen

KeyGen Tests

<fieldset class="section">

Test Forge key generation.

See JavaScript console for additional output.

</fieldset>

<fieldset class="section">
<legend>Control</legend>
   <button onclick="async()">Async Generate Key</button>
   <button onclick="sync()">Sync Generate Key</button>

   <input id="purejs" type="checkbox" />Pure JavaScript

   <input id="workers" value="-1"/>workers (-1 for auto, if applicable)

   <input id="bits" value="2048"/>bits (1024, 2048, 4096, etc)
</fieldset>

<fieldset class="section">
<legend>Output</legend>

Creation Time

Private

Public

</fieldset>

<!DOCTYPE html>

      <title>Forge Form Test</title>

      <link type="text/css" rel="stylesheet" media="all" href="/tests.css" />

   Forge Tests /
   Legacy /
   Form

Form Tests

<form id="form-1" class="ajax standard" method="post" action="">
   <fieldset>
      <legend>Text</legend>

         <input name="text1" type="text" value="value1" />
         <input name="text2.sub1" type="text" value="value2" />
         <input name="text2.sub2[]" type="text" value="value3" />
         <input name="text2.sub2[]" type="text" value="value4" />
         <input name="text2.sub3[0]" type="text" value="value5" />
         <input name="text2.sub4[0][0]" type="text" value="value6" />
         <input name="text2.sub4[0][]" type="text" value="value7" />
         <input name="text2.sub5[foo][]" type="text" value=


eturn null;
            }
            // If the process completes without being canceled, inform the user.
            if(!GeneralToolkit.progressBarCanceled)
            {
                Debug.Log(GeneralToolkit.FormatScriptMessage(typeof(Acquisition), "Successfully acquired scene data."));
                Debug.Log(GeneralToolkit.FormatScriptMessage(typeof(Acquisition), "Data can be found in directory: " + dataHandler.dataDirectory + "."));
            }
            // Reset displayed information.
            GeneralToolkit.ResetCancelableProgressBar(false, false);
            // Reset the preview camera's pose.
            cameraSetup.previewIndex = initialPreviewIndex;
            UpdatePreviewCameraModel(false);
            UnityEditorInternal.InternalEditorUtility.RepaintAllViews();
        }

#endregion //METHODS

#endif //UNITY_EDITOR

    }

}


 #3C802C;
}
.constant.character.entity, .constant-character-entity {
	font-style: normal;
}
.constant {
	color: blue;
}
.entity.name.function, .entity.name.type, .entity-name-function, .entity-name-type {
	font-weight: bold;
}
.entity.name.tag, .entity-name-tag {
	color: #CC4C07;
}
.entity.other.attribute.name, .entity-other-attribute-name {
	color: #3C802C;
}
.entity {
	color: #3f7f7f;
}
.invalid.illegal, .invalid-illegal {
	color: white;
	background-color: red;
}
.invalid.deprecated, .invalid-deprecated {
	text-decoration: line-through;
}
.invalid {
	color: red;
	font-weight: bold;
}
.keyword.other.documentation.markup {
	color: #7F7F9F;
}
.keyword.other.documentation {
	color: #7F9FBF;
}
.keyword.operator, .keyword-operator {
	color: #ddd;
}
.keyword {
	color: #CC4C07;
	font-weight: bold;
}
.markup.heading, .markup-heading {
	font-weight: bold;
}
.markup.quote, .markup-quote {
	font-style: italic;
}
.meta.annotation.currentLine {
	background-color: #EAF2FE;
}
.meta.tag {
	color: #3f7f7f;
}
.punctuation.definition.comment, .punctuation-definition-comment {
	color: #3f5fbf;
}
.punctuation.definition.string, .punctuation-definition-string {
	color: blue;
}
.punctuation.separator.space {

	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABVJREFUCNdj3L17938GBgYGJgYoAAAxOAM004kASgAAAABJRU5ErkJggg==");
	background-repeat: no-repeat;
	background-position: center center;
}
.punctuation.separator.tab {

	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAFCAYAAABmWJ3mAAAAAXNSR0IArs4c6QAAABtJREFUCNdj2L17938GKEBmYwgQJ0m8IAMDAwDemh/hgxuOkwAAAABJRU5ErkJggg==");
	background-repeat: no-repeat;
	background-position: left center;
}
.storage {
	color: #7F0055;
}
.string {
	color: #446fbd;
}
.support {
	color: #21439c;
}
.variable.parameter, .variable-parameter {
	color: black;
}
.variable.language, .variable-language {
	color: #7F0055;
	font-weight: bold;
}
.variable {
	color: #0000c0;
}
.cm-meta { color: #00008F; }
.cm-keyword { font-weight: bold; color: #7F0055; }
.cm-atom { color: #21439c; }
.cm-number { color: black; }
.cm-def { color:


return
    end
    self.parent.UIView:OpenSelectItemNum(self.data_.itemId, self.data_.selectNum, self.uiBinder.node_pad, self.data_.isLimit)
  end)
end

function BagSelectPackLoopItem:changeUseNum(num)
  if self.data_.isHave then
    return
  end
  local newCount = self.data_.selectNum + num
  if newCount < 0 then
    return
  end
  if 1 < newCount and self.data_.isLimit then
    Z.VMMgr.GetVM("all_tips").OpenMessageView({configId = 122013})
    return
  end
  self.parent.UIView:ChangeSelectItemNum(self.data_.itemId, newCount)
end

function BagSelectPackLoopItem:refreshUseNum()
  self.uiBinder.lab_num.text = tostring(self.data_.selectNum)
end

function BagSelectPackLoopItem:refreshBtnState()
  if self.data_.selectNum == 0 then
    self.uiBinder.btn_reduce_alpha.alpha = 0.3
  else
    self.uiBinder.btn_reduce_alpha.alpha = 1
  end
  if self.parent.UIView:IsCanAddNum() then
    self.uiBinder.btn_add_alpha.alpha = 1
  else
    self.uiBinder.btn_add_alpha.alpha = 0.3
  end
  if self.data_.isHave then
    self.uiBinder.btn_reduce_alpha.alpha = 0.3
    self.uiBinder.btn_add_alpha.alpha = 0.3
  end
end

function BagSelectPackLoopItem:refreshItemLimit()
  self.uiBinder.btn_add.IsDisabled = self.data_.isHave
  self.uiBinder.btn_reduce.IsDisabled = self.data_.isHave
  self.uiBinder.btn_num.IsDisabled = self.data_.isHave
end

return BagSelectPackLoopItem


�染的次数

- 可以在高频渲染节点的 `render` 函数中打点统计。
- 使用 `shouldComponentUpdate`、`PureComponent` 等优化重复渲染。

#### 3. 节点优化：节点合并，扁平化（触发 Hippy 引擎优化）

- 减少冗余事件挂载。

#### 4. 圆角、裁剪、描边等渲染性能较差，尽量减少使用

#### 5. 减少过度绘制

- 移除重复的背景色。
- 减少图层覆盖。

#### 6. ListView

- 尽量使用 `ListView` 代替 `ScrollView`，`ListView` 通过 View 的缓存与重用大大提升渲染性能。
- 使用 `getRowType`，将 item 按类型合理拆分，同一类型的 item 的 `RowType` 相同，可复用。
- 严格保持 `ListView` item 的 DOM 结构一致：
  - **hippy-vue**：item 中的节点可以用 `v-show`，不要用 `v-if`。
  - **hippy-react**：item 中的节点尽量不要用 `if` 条件来改变节点结构。

#### 7. ViewPager

- `ViewPager` 的子节点尽量不要全加载，实现懒加载。

#### 8. Image

- 图片压缩。
- 图片按需加载。
- 避免同时使用 `src` 和 `background`。
- 大图放 CDN。
- 减少 base64 图片使用。
- 图片缓存（内存缓存、磁盘缓存）。

    代码示例：在自定义ImageLoader中实现自己的缓存逻辑，也可使用第三方图片加载库，如 slide 等。

``` javascript
HippyEngine.EngineInitParams initParams = new HippyEngine.EngineInitParams();
// 必须：宿主（Hippy的使用者）的Context
// 若存在多个Activity加载多个业务jsbundle的情况，则这里初始化引擎时建议使用Application的Context
initParams.context = this;
...
// 必须：图片加载器
initParams.imageLoader = new MyImageLoader(this.getApplicationContext());
```

### **12.**     **业务逻辑执行优化**

此外，也要检查业务代码自身的耗时，并做针对性优化。

            1.     防抖节流：对滚动事件、数据上报等进行防抖节流，避免频繁触发计算

            2.     耗时逻辑检查是否可以放在首屏后执行

### **13.**     **交互优化**

除了上面的优化手段，交互优化在一些场景也是十分重要的，可以提升打开体验，让页面视觉上更流畅。

            1.     骨架屏优化

            2.     Loading

            3.     切换动画

## **总结：**

优化总结、是否需要 终端/前端 同学支持。

| 优化方案             | 方案介绍                       | 接入成本 | 优化效果   | 终端/前端工作  |
| -------------------- | ------------------------------ | -------- | ---------- | -------------- |
| 预加载               | 优化 JS Bundle包加载


layerGUID = itr->first;
        BattlegroundScore* score = itr->second;

        data->WriteBit(0);              // Unk 1
        data->WriteBit(0);              // Unk 2
        data->WriteBit(playerGUID[2]);
        data->WriteBit(!isArena);
        data->WriteBit(0);              // Unk 4
        data->WriteBit(0);              // Unk 5
        data->WriteBit(0);              // Unk 6
        data->WriteBit(playerGUID[3]);
        data->WriteBit(playerGUID[0]);
        data->WriteBit(playerGUID[5]);
        data->WriteBit(playerGUID[1]);
        data->WriteBit(playerGUID[6]);
        data->WriteBit(team == HORDE ? 0 : 1);
        data->WriteBit(playerGUID[7]);

        buff << uint32(score->HealingDone);             // healing done
        buff << uint32(score->DamageDone);              // damage done

        if (!isArena)
        {
            buff << uint32(score->BonusHonor / 100);
            buff << uint32(score->Deaths);
            buff << uint32(score->HonorableKills);
        }

        buff.WriteByteSeq(playerGUID[4]);
        buff << uint32(score->KillingBlows);
        // if (unk 5) << uint32() unk
        buff.WriteByteSeq(playerGUID[5]);
        // if (unk 6) << uint32() unk
        // if (unk 2) << uint32() unk
        buff.WriteByteSeq(playerGUID[1]);
        buff.WriteByteSeq(playerGUID[6]);

        buff << int32(primaryTree);

        switch (bg->GetTypeID(true))                             // Custom values
        {
            case BATTLEGROUND_RB:
                switch (bg->GetMapId())
                {
                    case 489:
                        data->WriteBits(0x00000002, 24);
                        buff << uint32(((BattlegroundWGScore*)score)->FlagCaptures);        // flag captures
                        buff << uint32(((BattlegroundWGScore*)score)->FlagReturns);         // flag returns
                        break;
                    case 566:
                        data->WriteBits(0x00000001, 24);
                        buff << uint32(((BattlegroundEYScore*)score)->FlagCaptures);        // flag captures
                        break;
                    case 529:
                        data->WriteBits(0x00000002, 24);
                        buff << uint32(((BattlegroundABScore*)score)->BasesAssaulted);      // bases assaulted
                        buff << uint32(((BattlegroundABScore*)score)->BasesDefended);       // bases defended
                        break;
                    case 30:
                        data->WriteBits(0x00000005, 24);
                        buff << uint32(((BattlegroundAVScore*)score)->GraveyardsAssaulted); // GraveyardsAssaulted
                        buff << uint32(((BattlegroundAVScore*)score)->GraveyardsDefended);  // GraveyardsDefended
                        buff << uint32(((BattlegroundAVScore*)score)->TowersAssaulted);     // TowersAssaulted
                        buff << uint32(((BattlegroundAVScore*)score)->TowersDefended);      // TowersDefended
                        buff << uint32(((BattlegroundAVScore*)score)->MinesCaptured);       // MinesCaptured
                        break;
                    case 607:
                        data->WriteBits(0x00000002, 24);
                        buff << uint32(((BattlegroundSAScore*)score)->demolishers_destroyed);
                        buff << uint32(((BattlegroundSAScore*)score)->gates_destroyed);
                        break;
                    case 628:                                   // IC
                        data->WriteBits(0x00000002, 24);
                        buff << uint32(((Battle


return wasmTable.get(set)(obj,value,closure)}descr_set_trampoline_call.sig="iiiii";function descr_get_trampoline_call(get,obj,closure){return wasmTable.get(get)(obj,closure)}descr_get_trampoline_call.sig="iiii";function _PyCFunctionWithKeywords_TrampolineCall(func,self,args,kw){return wasmTable.get(func)(self,args,kw)}_PyCFunctionWithKeywords_TrampolineCall.sig="iiiii";function _PyImport_InitFunc_TrampolineCall(func){return wasmTable.get(func)()}_PyImport_InitFunc_TrampolineCall.sig="ii";function _Py_emscripten_runtime(){var info;if(typeof navigator=="object"){info=navigator.userAgent}else if(typeof process=="object"){info="Node.js ".concat(process.version)}else{info="UNKNOWN"}var len=lengthBytesUTF8(info)+1;var res=_malloc(len);if(res)stringToUTF8(info,res,len);return res}_Py_emscripten_runtime.sig="i";function _Py_CheckEmscriptenSignals_Helper(){if(!Module.Py_EmscriptenSignalBuffer){return 0}try{let result=Module.Py_EmscriptenSignalBuffer[0];Module.Py_EmscriptenSignalBuffer[0]=0;return result}catch(e){return 0}}_Py_CheckEmscriptenSignals_Helper.sig="i";function unbox_small_structs(type_ptr){var type_id=HEAPU16[(type_ptr+6>>1)+0];while(type_id===13){var elements=HEAPU32[(type_ptr+8>>2)+0];var first_element=HEAPU32[(elements>>2)+0];if(first_element===0){type_id=0;break}else if(HEAPU32[(elements>>2)+1]===0){type_ptr=first_element;type_id=HEAPU16[(first_element+6>>1)+0]}else{break}}return[type_ptr,type_id]}function ffi_call_js(cif,fn,rvalue,avalue){var abi=HEAPU32[(cif>>2)+0];var nargs=HEAPU32[(cif>>2)+1];var nfixedargs=HEAPU32[(cif>>2)+6];var arg_types_ptr=HEAPU32[(cif>>2)+2];var rtype_unboxed=unbox_small_structs(HEAPU32[(cif>>2)+3]);var rtype_ptr=rtype_unboxed[0];var rtype_id=rtype_unboxed[1];var orig_stack_ptr=stackSave();var cur_stack_ptr=orig_stack_ptr;var args=[];var ret_by_arg=false;if(rtype_id===15){throw new Error("complex ret marshalling nyi")}if(rtype_id<0||rtype_id>15){throw new Error("Unexpected rtype "+rtype_id)}if(rtype_id===4||rtype_id===13){args.push(rvalue);ret_by_arg=true}for(var i=0;i<nfixedargs;i++){var arg_ptr=HEAPU32[(avalue>>2)+i];var arg_unboxed=unbox_small_structs(HEAPU32[(arg_types_ptr>>2)+i]);var arg_type_ptr=arg_unboxed[0];var arg_type_id=arg_unboxed[1];switch(arg_type_id){case 1:case 10:case 9:case 14:args.push(HEAPU32[(arg_ptr>>2)+0]);break;case 2:args.push(HEAPF32[(arg_ptr>>2)+0]);break;case 3:args.push(HEAPF64[(arg_ptr>>3)+0]);break;case 5:args.push(HEAPU8[arg_ptr+0]);break;case 6:args.push(HEAP8[arg_ptr+0]);break;case 7:args.push(HEAPU16[(arg_ptr>>1)+0]);break;case 8:args.push(HEAP16[(arg_ptr>>1)+0]);break;case 11:case 12:args.push(HEAPU64[(arg_ptr>>3)+0]);break;case 4:args.push(HEAPU64[(arg_ptr>>3)+0]);args.push(HEAPU64[(arg_ptr>>3)+1]);break;case 13


s, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types

const ChapterPageIndexSchema = Schema(
  name: r'ChapterPageIndex',
  id: 4458288720043056373,
  properties: {
    r'chapterId': PropertySchema(
      id: 0,
      name: r'chapterId',
      type: IsarType.long,
    ),
    r'index': PropertySchema(
      id: 1,
      name: r'index',
      type: IsarType.long,
    )
  },
  estimateSize: _chapterPageIndexEstimateSize,
  serialize: _chapterPageIndexSerialize,
  deserialize: _chapterPageIndexDeserialize,
  deserializeProp: _chapterPageIndexDeserializeProp,
);

int _chapterPageIndexEstimateSize(
  ChapterPageIndex object,
  List<int> offsets,
  Map<Type, List<int>> allOffsets,
) {
  var bytesCount = offsets.last;
  return bytesCount;
}

void _chapterPageIndexSerialize(
  ChapterPageIndex object,
  IsarWriter writer,
  List<int> offsets,
  Map<Type, List<int>> allOffsets,
) {
  writer.writeLong(offsets[0], object.chapterId);
  writer.writeLong(offsets[1], object.index);
}

ChapterPageIndex _chapterPageIndexDeserialize(
  Id id,
  IsarReader reader,
  List<int> offsets,
  Map<Type, List<int>> allOffsets,
) {
  final object = ChapterPageIndex(
    chapterId: reader.readLongOrNull(offsets[0]),
    index: reader.readLongOrNull(offsets[1]),
  );
  return object;
}

P _chapterPageIndexDeserializeProp<P>(
  IsarReader reader,
  int propertyId,
  int offset,
  Map<Type, List<int>> allOffsets,
) {
  switch (propertyId) {
    case 0:
      return (reader.readLongOrNull(offset)) as P;
    case 1:
      return (reader.readLongOrNull(offset)) as P;
    default:
      throw IsarError('Unknown property with id $propertyId');
  }
}

extension ChapterPageIndexQueryFilter
    on QueryBuilder<ChapterPageIndex, ChapterPageIndex, QFilterCondition> {
  QueryBuilder<ChapterPageIndex, ChapterPageIndex, QAfterFilterCondition>
      chapterIdIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const FilterCondition.isNull(
        property: r'chapterId',
      ));
    });
  }

  QueryBuilder<ChapterPageIndex, ChapterPageIndex, QAfterFilterCondition>
      chapterIdIsNotNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const FilterCondition.isNotNull(
        property: r'chapterId',
      ));
    });
  }

  QueryBuilder<ChapterPageIndex, ChapterPageIndex, QAfterFilterCondition>
      chapterIdEqualTo(int? value) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(FilterCondition.equalTo(
        property: r'chapterId',
        value: value,
      ));
    });
  }

  QueryBuilder<ChapterPageIndex, ChapterPageIndex, QAfterFilterCondition>
      chapterIdGreaterThan(
    int? value, {
    bool include = false,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(FilterCondition.greaterThan(
        include: include,
        property: r'chapterId',
        value: value,
      ));
    });
  }

  QueryBuilder<ChapterPageIndex, ChapterPageIndex, QAfterFilterCondition>
      chapterIdLessThan(
    int? value, {
    bool include = false,


 determine the math variant.

  // Deal with the \textit, \textbf, etc., functions.
  if (style.fontFamily === "texttt") {
    return "monospace"
  } else if (style.fontFamily === "textsc") {
    return "normal"; // handled via character substitution in symbolsOrd.js.
  } else if (style.fontFamily === "textsf") {
    if (style.fontShape === "textit" && style.fontWeight === "textbf") {
      return "sans-serif-bold-italic"
    } else if (style.fontShape === "textit") {
      return "sans-serif-italic"
    } else if (style.fontWeight === "textbf") {
      return "sans-serif-bold"
    } else {
      return "sans-serif"
    }
  } else if (style.fontShape === "textit" && style.fontWeight === "textbf") {
    return "bold-italic"
  } else if (style.fontShape === "textit") {
    return "italic"
  } else if (style.fontWeight === "textbf") {
    return "bold"
  }

  // Deal with the \mathit, mathbf, etc, functions.
  const font = style.font;
  if (!font || font === "mathnormal") {
    return null
  }

  const mode = group.mode;
  switch (font) {
    case "mathit":
      return "italic"
    case "mathrm": {
      const codePoint = group.text.codePointAt(0);
      // LaTeX \mathrm returns italic for Greek characters.
      return  (0x03ab < codePoint && codePoint < 0x03cf) ? "italic" : "normal"
    }
    case "greekItalic":
      return "italic"
    case "up@greek":
      return "normal"
    case "boldsymbol":
    case "mathboldsymbol":
      return "bold-italic"
    case "mathbf":
      return "bold"
    case "mathbb":
      return "double-struck"
    case "mathfrak":
      return "fraktur"
    case "mathscr":
    case "mathcal":
      return "script"
    case "mathsf":
      return "sans-serif"
    case "mathsfit":
      return "sans-serif-italic"
    case "mathtt":
      return "monospace"
  }

  let text = group.text;
  if (symbols[mode][text] && symbols[mode][text].replace) {
    text = symbols[mode][text].replace;
  }

  return Object.prototype.hasOwnProperty.call(fontMap, font) ? fontMap[font] : null
};

// Chromium does not support the MathML `mathvariant` attribute.
// Instead, we replace ASCII characters with Unicode characters that
// are defined in the font as bold, italic, double-struck, etc.
// This module identifies those Unicode code points.

// First, a few helpers.
const script = Object.freeze({
  B: 0x20EA, // Offset from ASCII B to Unicode script B
  E: 0x20EB,
  F: 0x20EB,
  H: 0x20C3,
  I: 0x20C7,
  L: 0x20C6,
  M: 0x20E6,
  R: 0x20C9,
  e: 0x20CA,
  g: 0x20A3,
  o: 0x20C5
});

const frak = Object.freeze({
  C: 0x20EA,
  H: 0x20C4,
  I: 0x20


e values
.dodiv:
	CALL	.divu16
	RET	C		; Exit if divide by zero
	;; Negate quotient if it is negative
	LD	A,(.squot)
	AND	#0x80
	jp	Z,.dorem	; Jump if quotient is positive
	SUB	A		; Substract quotient from 0
	SUB	C
	LD	C,A
	SBC	A		; Propagate borrow (A=0xFF if borrow)
	SUB	B
	LD	B,A
.dorem:
	;; Negate remainder if it is negative
	LD	A,(.srem)
	AND	#0x80
	RET	Z		; Return if remainder is positive
	SUB	A		; Substract remainder from 0
	SUB	E
	LD	E,A
	SBC	A		; Propagate remainder (A=0xFF if borrow)
	SUB	D
	LD	D,A
	RET

.divu8::
.modu8::
	LD	B,#0x00
	LD	D,B
	; Fall through to divu16

.divu16::
.modu16::
	;; Check for division by zero
	LD	A,E
	OR	D
	jp	NZ,.divide	; Branch if divisor is non-zero
	LD	BC,#0x00	; Divide by zero error
	LD	D,B
	LD	E,C
	SCF			; Set carry, invalid result
	RET
.divide:
	ld	hl,#0
;	LD	L,C		; L = low byte of dividend/quotient
;	LD	H,B		; H = high byte of dividend/quotient
;	LD	BC,#0x00	; BC = remainder
	OR	A		; Clear carry to start
	ex	af,af
	LD	A,#16		; 16 bits in dividend
.dvloop:
	;; Shift next bit of quotient into bit 0 of dividend
	;; Shift next MSB of dividend into LSB of remainder
	;; BC holds both dividend and quotient. While we shift a bit from
	;;  MSB of dividend, we shift next bit of quotient in from carry
	;; HL holds remainder
	;; Do a 32-bit left shift, shifting carry to L, L to H,
	;;  H to C, C to B
	ex	af,af'
	RL	C		; Carry (next bit of quotient) to bit 0
	RL	B		; Clears carry since BC was 0
	adc	hl,hl

	;; If remainder is >= divisor, next bit of quotient is 1. This
	;;  bit goes to carry
	PUSH	HL		; Save current remainder
	sbc	hl,de
;	LD	A,C		; Substract divisor from remainder
;	SBC	E
;	LD	C,A
;	LD	A,B
;	SBC	D
;	LD	B,A
	CCF			; Complement borrow so 1 indicates a
				;  successful substraction (this is the
				;  next bit of quotient)
	jp	C,.drop		; Jump if remainder is >= dividend
	POP	HL		; Otherwise, restore remainder
	jp	.nodrop
.drop:
	INC	SP
	INC	SP
.nodrop:
	ex	af,af'
	DEC	A		; DEC does not affect carry flag
	jp	NZ,.dvloop
	ex	af,af'
	;; Shift last carry bit into quotient
	LD	D,H		; DE = remainder
	LD	E,L
	RL	C		; Carry to L
;	LD	C,L		; C = low byte of quotient
	RL	B
;	LD	B,H		; B = high byte of quotient
	OR	A		; Clear carry, valid result
	RET

	.area	_BSS

.


UV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "EMPTY_CURRENCY" ]
};
      defs["Element"] = {
  "title" : "",
  "type" : "object",
  "properties" : {
    "ValidationErrors" : {
      "type" : "array",
      "description" : "Array of Validation Error message",
      "items" : {
        "$ref" : "#/components/schemas/ValidationError"
      }
    },
    "BatchPaymentID" : {
      "type" : "string",
      "description" : "Unique ID for batch payment object with validation error",
      "format" : "uuid"
    },
    "BankTransactionID" : {
      "type" : "string",
      "format" : "uuid"
    },
    "CreditNoteID" : {
      "type" : "string",
      "format" : "uuid"
    },
    "ContactID" : {
      "type" : "string",
      "format" : "uuid"
    },
    "InvoiceID" : {
      "type" : "string",
      "format" : "uuid"
    },
    "ItemID" : {
      "type" : "string",
      "format" : "uuid"
    },
    "PurchaseOrderID" : {
      "type" : "string",
      "format" : "uuid"
    }
  },
  "description" : "",
  "externalDocs" : {
    "url" : "https://developer.xero.com/documentation/api/http-response-codes"
  }
};
      defs["Employee"] = {
  "title" : "",
  "type" : "object",
  "properties" : {
    "EmployeeID" : {
      "type" : "string",
      "description" : "The Xero identifier for an employee e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9",
      "format" : "uuid"
    },
    "Status" : {
      "type" : "string",
      "description" : "Current status of an employee – see contact status types",
      "enum" : [ "ACTIVE", "ARCHIVED", "GDPRREQUEST", "DELETED" ]
    },
    "FirstName" : {
      "maxLength" : 255,
      "type" : "string",
      "description" : "First name of an employee (max length = 255)"
    },
    "LastName" : {
      "maxLength" : 255,
      "type" : "string",
      "description" : "Last name of an employee (max length = 255)"
    },
    "ExternalLink" : {
      "$ref" : "#/components/schemas/ExternalLink"
    },
    "UpdatedDateUTC" : {
      "type" : "string",
      "readOnly" : true,
      "example" : "/Date(1573755038314)/",
      "x-is-msdate-time" : true
    },
    "StatusAttributeString" : {
      "type" : "string",
      "description" : "A string to indicate if a invoice status",
      "example" : "ERROR"
    },
    "ValidationErrors" : {
      "type" : "array",
      "description" : "Displays array of validation error messages from the API",
      "items" : {
        "$ref" : "#/components/schemas/ValidationError"
      }
    }
  },
  "description" : "",
  "externalDocs" : {
    "url" : "http://developer.xero.com/documentation/api/employees/"
  }
};
      defs["Employees"] = {
  "title" : "",
  "type" : "object",
  "properties" : {
    "Employees" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/components/schemas/Employee"
      }
    }
  },
  "desc


22sLskw
      |XBHq/XlkLWkqoLrQtNOPvLoDO80TKUORVsP1y7OyUPHqUumxj9Mn/QtsZjNCPyKN
      |ds7P2OLD/Jxq1o1ckzG3uzv8Vb6sqYUPmRvlXyD7/s/FURA1GetBiQEdRM34xbrB
      |
      |"""
        .trimMargin()

    val reader = stanza.byteInputStream().buffered()
    val ageStanza = AgeStanza.parse(reader)

    val outputStream = ByteArrayOutputStream()
    outputStream.bufferedWriter().use { writer -> AgeStanza.writeBody(writer, ageStanza.body) }
    val output = outputStream.toByteArray().decodeToString()

    assertThat(output).isEqualTo(actualBody)
  }

  @Test
  fun testWriteAgeStanza() {
    val stanza =
      """
      |-> X25519 SVrzdFfkPxf0LPHOUGB1gNb9E5Vr8EUDa9kxk04iQ0o
      |0OrTkKHpE7klNLd0k+9Uam5hkQkzMxaqKcIPRIO1sNE
      |"""
        .trimMargin()

    val reader = stanza.byteInputStream().buffered()
    val ageStanza = AgeStanza.parse(reader)

    val outputStream = ByteArrayOutputStream()
    outputStream.bufferedWriter().use { writer -> AgeStanza.write(writer, ageStanza) }
    val output = outputStream.toByteArray().decodeToString()

    assertThat(output).isEqualTo(stanza)
  }

  @Test
  fun testWriteAgeStanzaDoesNotAddExtraSpaceWhenNoArgsArePresent() {
    val stanza =
      """
      |-> X25519
      |0OrTkKHpE7klNLd0k+9Uam5hkQkzMxaqKcIPRIO1sNE
      |"""
        .trimMargin()

    val reader = stanza.byteInputStream().buffered()
    val ageStanza = AgeStanza.parse(reader)

    val outputStream = ByteArrayOutputStream()
    outputStream.bufferedWriter().use { writer -> AgeStanza.write(writer, ageStanza) }
    val output = outputStream.toByteArray().decodeToString()
    val endsWithSpace = output.lines().first().endsWith(" ")

    assertThat(endsWithSpace).isFalse()
    assertThat(output).isEqualTo(stanza)
  }
}
/*
 * Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
 * SPDX-License-Identifier: GPL-3.0-only
 */

package app.passwordstore.ui.dialogs

import android.content.Context
import android.content.DialogInterface.OnDismissListener
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.ViewTreeObserver
import android.widget.FrameLayout
import androidx.annotation.StringRes
import androidx.core.view.isVisible
import app.passwordstore.R
import app.passwordstore.databinding.BasicBottomSheetBinding
import app.passwordstore.util.extensions.viewBinding
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment

/**
 * [BottomSheetDialogFragment] that exposes a simple [androidx.appcompat.app.AlertDialog] like API
 * through [BasicBottomSheet.Builder] to create a similar UI, just at the bottom of the screen.
 */
class BasicBottomSheet
private constructor(
  val title: String?,
  val message: String,
  val positiveButtonLabel: String?,
  val negativeButtonLabel: String?,
  val positiveButtonClickListener: View.OnClickListener?,
  val negativeButtonClickListener: View.OnClickListener?,
  val onDismissListener: OnDismissListener?,
) : BottomSheetDialogFragment() {

  private val binding by viewBinding(BasicBottomSheetBinding::bind)

  private var behavior: BottomSheetBehavior<FrameLayout>? = null
  private val bottomSheetCallback =
    object : BottomSheetBehavior.BottomSheetCallback() {
      override fun onSlide(bottomSheet: View, slideOffset: Float) {}

      override fun onStateChanged(bottomSheet: View, newState: Int) {
        if (newState == BottomSheetBehavior.STATE_COLLAPSED) {
          dismiss()
        }
      }


 = new SolanaJsonRpcClientOptionalParams();
        optionalParams.addParam("encoding", "base58");

        final var response = SOLANA_API.getTokenAccountsByOwner(
                "7H1itW7F72uJbaXK2R4gP7J18HrQ2M683kL9YgUeeUHr",
                Map.entry("mint", "2tokpcExDmewsSNRKuTLVLMUseiSkEdBQWBjeQLmuFaS"),
                optionalParams);

        // base58 encoding account data to be less than 128 bytes - wouldn't this always basically be the case for token accounts?
        // not sure why they'd offer base58 encoding here at all, but whatever
        assertThat(response.isSuccess()).isFalse();
        assertThat(response.getError().getErrorCode()).isEqualTo(-32600L);
        assertThat(response.getError().getErrorMessage()).isEqualTo("Encoded binary (base 58) data should be less than 128 bytes, please use Base64 encoding.");
    }

    @Test
    void shouldGetTokenAccountsByOwnerBase64ZstdEncodingOptionalParam() throws SolanaJsonRpcClientException
    {
        final SolanaClientOptionalParams optionalParams = new SolanaJsonRpcClientOptionalParams();
        optionalParams.addParam("encoding", "base64+zstd");

        final var response = SOLANA_API.getTokenAccountsByOwner(
                        "7H1itW7F72uJbaXK2R4gP7J18HrQ2M683kL9YgUeeUHr",
                        Map.entry("mint", "2tokpcExDmewsSNRKuTLVLMUseiSkEdBQWBjeQLmuFaS"),
                        optionalParams)
                .getResponse();

        assertThat(response.get(0).getAccountInfo().getData().getAccountInfoEncoded().get(0)).isEqualTo(
                "KLUv/QBYbQIANAQcISzCHy60JdAGqewjDybPQ4VCj03tsvHdZNXHmjqXi11AOymqthEW3kDjLUvosc102c5Dsh08e2SpgX9n5rTVAAEAAgAEJwaY4Aw=");
        assertThat(response.get(0).getAccountInfo().getData().getAccountInfoEncoded().get(1)).isEqualTo("base64+zstd");
        assertThat(response.get(0).getAccountInfo().getData().getAccountInfoParsed()).isNull();
    }

    @Test
    void shouldGetTokenAccountsByOwnerJsonParsedEncodingOptionalParam() throws SolanaJsonRpcClientException
    {
        final SolanaClientOptionalParams optionalParams = new SolanaJsonRpcClientOptionalParams();
        optionalParams.addParam("encoding", "jsonParsed");

        final var response = SOLANA_API.getTokenAccountsByOwner(
                        "7H1itW7F72uJbaXK2R4gP7J18HrQ2M683kL9YgUeeUHr",
                        Map.entry("mint", "2tokpcExDmewsSNRKuTLVLMUseiSkEdBQWBjeQLmuFaS"),
                        optionalParams)
                .getResponse();

        assertThat(response.get(0).getAccountInfo().getData().getAccountInfoEncoded()).isNull();
        // already checked these fields in another test
        assertThat(response.get(0).getAccountInfo().getData().getAccountInfoParsed()).isNotNull();
    }

    @Test
    void shouldGetTokenAccountsByOwnerWithProgramIdDefaultOptionalParams() throws SolanaJsonRpcClientException
    {
        final var response = SOLANA_API.getTokenAccountsByOwner(
                        "7H1itW7F72uJbaXK2R4gP7J18HrQ2M683kL9YgUeeUHr",
                        Map.entry("programId", "TokenzQdBNbLqP


down-Builder\THBWikiMarkdown\Temp\main\d\d7\ns0%3AMiuMyu.html -->

MiuMyu ，主要制作 周边，同人音乐 的日本同人社团，主催是 みゅう☆，曾以 東方らぢぉ 名义活动，当前状态为 休止

本页是关于 **[同人社团](./同人社团.md#同人社团)** 的词条

## 目录

- [1 社团信息](#社团信息)
- [2 成员名单](#成员名单)
- [3 作品列表](#作品列表)

  - [3.1 同人专辑](#同人专辑)
  - [3.2 同人志](#同人志)
  - [3.3 同人周边](#同人周边)

- [4 参展信息](#参展信息)

## 社团信息
[](./文件-MiuMyubanner.gif.md)  [](./文件-MiuMyubanner.gif.md)Banner 1
[](./文件-MiuMyubanner2.gif.md)  [](./文件-MiuMyubanner2.gif.md)Banner 2

社团名称	 MiuMyu

曾用名称	 東方らぢぉ

主要作品类型	周边，同人音乐

当前状态	休止

主催	 みゅう☆

地区	日本

官网页面	http://miumyu.net/ （已经失效）
http://221.116.210.138/~myu/ （旧官网）（已经失效）

MiuMyu（同人社团，周边社团，同人音乐社团） - MiuMyu ，主要制作 周边，同人音乐 的日本同人社团，主催是 みゅう☆，曾以 東方らぢぉ 名义活动，当前状态为 休止

## 成员名单
- みゅう☆ (未找到链接)

## 作品列表

### 同人专辑
[](./Happy_Winter（同人专辑）.md)[Happy Winter](./Happy_Winter（同人专辑）.md)首发日期：2004-12-30 （Comic Market 67 (未找到链接)）全长、配音作品


{
                var cycle = Node.IsChildOf( item );
                using var disabled = ImRaii.Disabled( cycle );

                if( ImGui.Selectable( item.GetText(), Selected[idx] == item ) && !cycle ) CommandManager.Add( new AvfxNodeSelectListCommand<T>( this, item, idx ) );
                if( ImGui.IsItemHovered() ) item.ShowTooltip();
            }
        }
    }
}


_new_age/common_display/print_creature_info.dart';
import 'package:lcs_new_age/common_display/print_party.dart';
import 'package:lcs_new_age/creature/body.dart';
import 'package:lcs_new_age/creature/creature.dart';
import 'package:lcs_new_age/creature/creature_type.dart';
import 'package:lcs_new_age/engine/engine.dart';
import 'package:lcs_new_age/gamestate/game_state.dart';
import 'package:lcs_new_age/gamestate/ledger.dart';
import 'package:lcs_new_age/gamestate/squad.dart';
import 'package:lcs_new_age/location/site.dart';
import 'package:lcs_new_age/sitemode/shop.dart';
import 'package:lcs_new_age/utils/colors.dart';
import 'package:lcs_new_age/utils/interface_options.dart';
import 'package:lcs_new_age/vehicles/vehicle.dart';
import 'package:lcs_new_age/vehicles/vehicle_type.dart';

Future<void> hospital(Site loc) async {
  locatesquad(activeSquad!, loc);
  int partysize = squadsize(activeSquad);

  while (true) {
    erase();

    locHeader();
    printParty();

    addOptionText(10, 1, "F", "F - Go in and fix up Conservative wounds");
    addOptionText(12, 1, "Enter", "Enter - Leave");

    bool showPartyPrompt =
        partysize > 0 && (activeSquadMemberIndex == -1 || partysize > 1);
    mvaddstrc(13, 1, showPartyPrompt ? lightGray : darkGray,
        "# - Check the status of a squad Liberal");
    bool showStatusPrompt = activeSquadMember != null;
    addOptionText(14, 1, "0", "0 - Show the squad's Liberal status",
        enabledWhen: showStatusPrompt);

    int c = await getKey();

    if (isBackKey(c)) break;

    if (c == '0'.codePoint) activeSquadMemberIndex = -1;

    if (c >= '1'.codePoint && c <= '6'.codePoint && activeSquad != null) {
      int index = c - '1'.codePoint;
      if (squad.length > index) {
        Creature p = squad[index];
        if (p == activeSquadMember) {
          await fullCreatureInfoScreen(p);
        } else {
          activeSquadMember = p;
        }
      }
    }

    if (c == Key.f) {
      for (Creature p in squad.toList()) {
        await hospitalize(loc, p);
      }
      break;
    }
  }
}

Future<void> hospitalize(Site loc, Creature patient) async {
  // He's dead, Jim
  if (!patient.alive) return;

  int time = clinictime(patient);

  if (time > 0) {
    patient.clinicMonthsLeft = time;
    patient.squad = null;
    patient.location = loc;
    patient.activity = Activity.none();

    makeDelimiter();
    mvaddstrc(8, 1, white, "${patient.name} will be at ${loc.name} for $time ");
    if (time > 1) {
      addstr("months");
    } else {
      addstr("month");
    }
    addstr(".");

    await getKey();
  }
}

/* common - determines how long a creature's injuries will take to heal */
int clinictime(Creature g) {
  int time = 0;
  for (BodyPart bp in g.body.parts) {
    if (bp.nastyOff) time++;
  }
  if (g.blood <= g.


 dataspace = H5Dget_space(_dataset);

        if (dataspace == H5I_INVALID_HID) {
            EINSUMS_THROW_EXCEPTION(std::runtime_error, "Could not create a copy of the data space for view creation!");
        }

        auto err = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, reinterpret_cast<hsize_t const *>(offsets.data()), NULL,
                                       reinterpret_cast<hsize_t const *>(counts.data()), reinterpret_cast<hsize_t const *>(block.data()));

        if (err < 0) {
            H5Sclose(dataspace);
            EINSUMS_THROW_EXCEPTION(std::runtime_error, "Disk view creation failed!");
        }

        return DiskView<T, count_of_type<AllT, MultiIndex...>() + count_of_type<Range, MultiIndex...>()>(*this, dims_all, _dataset,
                                                                                dataspace);
    }

    /// This creates a Disk object with its Rank being equal to the number of All{} parameters
    /// Range is not inclusive. Range{10, 11} === size of 1
    template <typename... MultiIndex>
        requires(count_of_type<AllT, MultiIndex...>() + count_of_type<Range, MultiIndex...>() != 0)
    auto operator()(MultiIndex... index) const
        -> DiskView<T, count_of_type<AllT, MultiIndex...>() + count_of_type<Range, MultiIndex...>()> const {
        auto all_positions = arguments::get_array_from_tuple<std::array<int, count_of_type<AllT, MultiIndex...>()>>(
            arguments::positions_of_type<AllT, MultiIndex...>());
        auto index_positions = arguments::get_array_from_tuple<std::array<int, count_of_type<size_t, MultiIndex...>()>>(
            arguments::positions_of_type<size_t, MultiIndex...>());
        auto range_positions = arguments::get_array_from_tuple<std::array<int, count_of_type<Range, MultiIndex...>()>>(
            arguments::positions_of_type<Range, MultiIndex...>());

        auto const &indices = std::forward_as_tuple(index...);

        // Need the offset and stride into the large tensor
        Offset<Rank> offsets{};
        Count<Rank>  counts{};
        Dim<Rank>    block{};

        std::fill(counts.begin(), counts.end(), 1);

        // Need the dim of the smaller tensor
        Dim<count_of_type<AllT, MultiIndex...>() + count_of_type<Range, MultiIndex...>()> dims_all{};

        for (auto [i, value] : enumerate(index_positions)) {
            // printf("i, value: %d %d\n", i, value);
            offsets[value] = arguments::get_from_tuple<size_t>(indices, value);
            block[value]   = 1;
        }
        for (auto [i, value] : enumerate(all_positions)) {
            // println("here");
            block[value] = _dims[value];
        }
        for (auto [i, value] : enumerate(range_positions)) {
            offsets[value] = arguments::get_from_tuple<Range>(indices, value)[0];
            block[value]   = arguments::get_from_tuple<Range>(indices, value)[1] - arguments::get_from_tuple<Range>(indices, value)[0];
        }

        // Go through counts and anything that isn't equal to 1 is copied to the dims_all
        int dims_index = 0;
        for (auto cnt : block) {
            if (cnt > 1) {
                dims_all[dims_index++] = cnt;
            }
        }

        hid_t dataspace = H5Dget_space(_dataset);

        if (dataspace == H5I_INVALID_HID) {
            E


gsDrawRichText(buffer,x,y)
	for line=1,#buffer do
		local l = buffer[line]
		for index=1,#l do
			local block = l[index]
			local text,offx,offy,color = block[1],block[2],block[3],block[4]
			dxDrawText(text,x+offx,y+offy,_,_,color)
		end
	end
end
local rt = dgsCreateTextBuffer("123#FF0000123")
addEventHandler("onClientRender",root,function()
	dgsDrawRichText(rt,10,10)
end)]]
--------------------------------Other Utility
function urlEncode(s)
    s = gsub(s,"([^%w%.%- ])",function(c)
		return format("%%%02X",c:byte())
	end)
    return gsub(s," ","+")
end

function urlDecode(s)
    s = gsub(s,'%%(%x%x)',function(h)
		return char(tonumber(h,16))
	end)
    return s
end

unitList = {
	{"B",8,1024},	--Go down ratio, Go up ratio
	{"KB",1024,1024},
	{"MB",1024,1024},
	{"GB",1024,1024},
}

function getProperUnit(value,unit)
	local cUID = table.find(unitList,unit,1)
	if not cUID then return value,unit end
	local currentUnit = unitList[cUID]
	while(true) do
		if value < 1 then
			if cUID <= 1 then return value,currentUnit[1] end
			value = value * currentUnit[2]
			cUID = cUID-1
			currentUnit = unitList[cUID]
		elseif value > currentUnit[3] then
			if cUID >= #unitList then return value,currentUnit[1] end
			value = value /currentUnit[3]
			cUID = cUID+1
			currentUnit = unitList[cUID]
		else
			return value,currentUnit[1]
		end
	end
end

keyStateMap = {
	lctrl=getKeyState("lctrl"),
	rctrl=getKeyState("rctrl"),
	lshift=getKeyState("lshift"),
	rshift=getKeyState("rshift"),
	lalt=getKeyState("lalt"),
	ralt=getKeyState("ralt"),
}

_getKeyState = getKeyState
function getKeyState(key)
	if keyStateMap[key] ~= nil then
		return keyStateMap[key]
	else
		return _getKeyState(key)
	end
end

addEventHandler("onClientKey",root,function(but,state)
	if keyStateMap[but] ~= nil then
		keyStateMap[but] = state
	end
end)

--------------------------------Dx Utility
function dgsIsPixelPNG(pixel)
    local pngHeader = string.char(0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A)
    return #pixel >= 8 and pixel:sub(1,8) == pngHeader
end

function dgsIsPixelJPEG(pixel)
    local jpegHeader = string.char(0xFF, 0xD8, 0xFF)
    local jpegTail = string.char(0xFF, 0xD9)
    return #pixel >= 2 and pixel:sub(1,3) == jpegHeader and pixel:sub(-2) == jpegTail
end

function dgsIsPixelGIF(pixel)
    local gifHeader87a = "GIF87a"
    local gifHeader89a = "GIF89a"
    return #pixel >= 6 and (pixel:sub(1,6) == gifHeader87a or pixel:sub(1,6) == gifHeader89a)
end

function dgsIsPixelWebP(pixel)
    local webpHeader = "RIFF"
    local webpSignature = "WEBP"
    return #pixel >= 12 and pixel:sub(1,4) == webpHeader and pixel:sub(9,12) == webpSignature
end

function dgsIsPixelDDS(pixel)
    local d


* huffman_simple: 1,4,4, 1,0,2,3  // literal blocktype prefix code
     * huffman_fixed: 26  // literal blockcount prefix code
     * blockcount_easy: 2  // 2 a's
     * // one ins/copy and dist block type
     * vlq_blocktypes: 1
     * vlq_blocktypes: 1
     * ndirect: 0, 0
     * // two MSB6 literal context modes
     * bits: "00", "00"
     * // two literal prefix codes
     * vlq_blocktypes: 2
     * // literal context map
     * vlq_rlemax: 5
     * huffman_simple: 0,3,7, 5,0,6  // context map RLE Huffman code
     * // context map RLE: repeat 0 64 times, 1+5 64 times
     * bits: "01", "0", "11111", "11", "0", "11111"
     * bit: 1  // MTF enabled
     * // one distance prefix code
     * vlq_blocktypes: 1
     * huffman_simple: 0,1,256, 97  // only a's
     * huffman_simple: 0,1,256, 98  // only b's
     * huffman_fixed: 704
     * huffman_fixed: 64
     * // now comes the data
     * command_inscopy_easy: 12, 0
     * bits: "0"; blockcount_easy: 2  // switch to other block type; 2 b's
     * bits: "0"; blockcount_easy: 5  // switch to other block type; 5 a's
     * bits: "0"; blockcount_easy: 1  // switch to other block type; 1 b
     * bits: "0"; blockcount_easy: 1  // switch to other block type; 1 a
     * bits: "0"; blockcount_easy: 1  // switch to other block type; 1 b
     */
    compressed,
    true,
    "aabbaaaaabab",
  );
}

func TestClClTreeDeficiency(t *testing.T) {
  compressed := []uint8{
    0x1b, 0x03, 0x00, 0x00, 0x00, 0x01, 0x80, 0x43, 0x01, 0xe0, 0x05, 0x88,
    0x55, 0x90, 0x01, 0x00, 0x38, 0xd8, 0x32, 0x89, 0x01, 0x12, 0x00, 0x00,
    0x77, 0xda, 0x28, 0x40, 0x23,
  };
  verify(t,
    /*
     * // This test is a copy of TooManySymbolsRepeated, with changed clcl table.
     * main_header
     * metablock_header_begin: 1, 0, 4, 0
     * metablock_header_trivial_context
     * hskip: 0
     * clcl_ordered: 0,3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,1,0
     * set_prefix_cl_rle: "", "110", "", "", "", "", "", "", "111", "101",\
     *                    "", "", "", "", "", "", "0", ""
     * cl_rle: 8
     * cl_rle_rep: 9, 96
     * cl_rle: 1
     * cl_rle_rep: 9, 159 // 1 + 96 + 1 + 159 = 257 > 256 = alphabet size
     * huffman_fixed: 704
     * huffman_fixed: 64
     * command_inscopy_easy: 4, 0
     * command_literal_bits: 0, 0, 0, 101100010
     */
    compressed,
    false,
    "aaab",
  );
}

func TestClClTreeExcess(t *testing.T) {
  compressed := []uint8{
    0x1b, 0x03, 0x00, 0x00, 0x00


hrow new ReportProcessingException(ErrorCode.rsInvalidOperation, RPRes.rsEngineMismatchParentReport(ObjectType.Subreport.ToString(), subreportPath, null, subreportPath, reportContext.ItemPathAsString));
				}
				ChunkFactoryAdapter @object = new ChunkFactoryAdapter(getCompiledDefinitionCallback2);
				getCompiledDefinitionCallback = @object.GetReportChunk;
			}
			else if (subreportContext == null)
			{
				throw new ReportProcessingException(RPRes.rsMissingSubReport(subreportPath, subreportPath), ErrorCode.rsItemNotFound);
			}
		}

		public void SubReportDataSourcesCallback(ICatalogItemContext reportContext, string subreportPath, out ICatalogItemContext subreportContext, out ReportProcessing.GetReportChunk getCompiledDefinitionCallback, out DataSourceInfoCollection dataSources)
		{
			getCompiledDefinitionCallback = null;
			IChunkFactory getCompiledDefinitionCallback2 = null;
			m_subreportDataSourcesCallback(reportContext, subreportPath, NeedsUpgrade, out subreportContext, out getCompiledDefinitionCallback2, out dataSources, out DataSetInfoCollection _);
			if (getCompiledDefinitionCallback2 != null)
			{
				if (ReportProcessing.ContainsFlag(getCompiledDefinitionCallback2.ReportProcessingFlags, ReportProcessingFlags.OnDemandEngine))
				{
					subreportContext = null;
					getCompiledDefinitionCallback = null;
					dataSources = null;
					string text = subreportPath.MarkAsPrivate();
					string text2 = reportContext.ItemPathAsString.MarkAsPrivate();
					Global.Tracer.Trace(TraceLevel.Warning, "The subreport '{0}' could not be processed.  Parent report '{1}' failed to automatically republish, or it contains a Reporting Services 2005-style CustomReportItem, and is therefore incompatible with the subreport. To correct this error, please attempt to republish the parent report manually. If it contains a CustomReportItem, please upgrade the report to the latest version.", text, text2);
					throw new ReportProcessingException(ErrorCode.rsInvalidOperation, RPRes.rsEngineMismatchParentReport(ObjectType.Subreport.ToString(), text, null, text, text2));
				}
				ChunkFactoryAdapter @object = new ChunkFactoryAdapter(getCompiledDefinitionCallback2);
				getCompiledDefinitionCallback = @object.GetReportChunk;
			}
			else if (subreportContext == null)
			{
				throw new ReportProcessingException(RPRes.rsMissingSubReport(subreportPath, subreportPath), ErrorCode.rsItemNotFound);
			}
		}

		public bool NeedsUpgrade(ReportProcessingFlags processingFlags)
		{
			return false;
		}
	}
}


,
		"эшелон",
		"юбилей",
		"юбка",
		"южный",
		"юмор",
		"юноша",
		"юрист",
		"яблоко",
		"явление",
		"ягода",
		"ядерный",
		"ядовитый",
		"ядро",
		"язва",
		"язык",
		"яйцо",
		"якорь",
		"январь",
		"японец",
		"яркий",
		"ярмарка",
		"ярость",
		"ярус",
		"ясный",
		"яхта",
		"ячейка",
		"ящик",
	},
}
// Copyright 2017-2021 DERO Project. All rights reserved.
// Use of this source code in any form is governed by RESEARCH license.
// license can be found in the LICENSE file.
// GPG: 0F39 E425 8C65 3947 702A  8234 08B2 0360 A03A 9DE8
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

package rpcserver

import "fmt"
import "context"
import "runtime/debug"
import "github.com/deroproject/derohe/rpc"

func GetBalance(ctx context.Context, p rpc.GetBalance_Params) (result rpc.GetBalance_Result, err error) {
	defer func() { // safety so if anything wrong happens, we return error
		if r := recover(); r != nil {
			err = fmt.Errorf("panic occured. stack trace %s", debug.Stack())
		}
	}()

	w := fromContext(ctx)

	if err := w.wallet.Sync_Wallet_Memory_With_Daemon_internal(p.SCID); err != nil {
		return result, err
	}

	mature, locked := w.wallet.Get_Balance_scid(p.SCID)
	return rpc.GetBalance_Result{
		Balance:          mature


function cmp(x, y) { return x.a === y.a; }
         *      var l1 = [{a: 1}, {a: 2}, {a: 3}];
         *      var l2 = [{a: 3}, {a: 4}];
         *      R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}]
         *
         */
        differenceWith<T>(pred: (a: T, b: T) => boolean, list1: T[], list2: T[]): T[];

        /**
         * Combines two lists into a set (i.e. no duplicates) composed of those elements common to both lists.
         *
         * @func
         * @memberOf R
         * @category relation
         * @sig [a] -> [a] -> [a]
         * @param {Array} list1 The first list.
         * @param {Array} list2 The second list.
         * @see R.intersectionWith
         * @return {Array} The list of elements found in both `list1` and `list2`
         * @example
         *
         *      R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3]
         */
        intersection<T>(list1: T[], list2: T[]): T[];

        /**
         * Combines two lists into a set (i.e. no duplicates) composed of those
         * elements common to both lists.  Duplication is determined according
         * to the value returned by applying the supplied predicate to two list
         * elements.
         *
         * @func
         * @memberOf R
         * @category relation
         * @sig (a,a -> Boolean) -> [a] -> [a] -> [a]
         * @param {Function} pred A predicate function that determines whether
         *        the two supplied elements are equal.
         * @param {Array} list1 One list of items to compare
         * @param {Array} list2 A second list of items to compare
         * @see R.intersection
         * @return {Array} A new list containing those elements common to both lists.
         * @example
         *
         *      var buffaloSpringfield = [
         *        {id: 824, name: 'Richie Furay'},
         *        {id: 956, name: 'Dewey Martin'},
         *        {id: 313, name: 'Bruce Palmer'},
         *        {id: 456, name: 'Stephen Stills'},
         *        {id: 177, name: 'Neil Young'}
         *      ];
         *      var csny = [
         *        {id: 204, name: 'David Crosby'},
         *        {id: 456, name: 'Stephen Stills'},
         *        {id: 539, name: 'Graham Nash'},
         *        {id: 177, name: 'Neil Young'}
         *      ];
         *
         *      var sameId = function(o1, o2) {return o1.id === o2.id;};
         *
         *      R.intersectionWith(sameId, buffaloSpringfield, csny);
         *      //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}]
         */
        intersectionWith<T>(pred: (a: T, b: T) => boolean, list1: T[], list2: T[]): T[];

        /**
         * Sorts the list according to a key generated by the supplied function.
         *
         * @func
         * @memberOf R
         * @category relation
         * @sig (a -> String) -> [a] -> [a]
         * @param {Function} fn The function mapping `list` items to keys.
         * @param {Array} list The list to sort.
         * @return {Array} A new list sorted by the keys generated by `fn`.
         * @example
         *
         *      var sortByFirstItem = R.sortBy(prop(0));
         *      var sortByNameCaseInsensitive = R.sortBy(compose(R.toLowerCase, prop('name')));
         *      var pairs = [[-1, 1], [-2, 2], [-3, 3]];
         *      sortByFirstItem(pairs); //


64V32c0-17.67-14.33-32-32-32H96C78.33 0 64 14.33 64 32v32H0c0 41.74 26.8 76.9 64 90.12V192H0c0 41.74 26.8 76.9 64 90.12V320H0c0 42.84 28.25 78.69 66.99 91.05C79.42 468.72 130.6 512 192 512s112.58-43.28 125.01-100.95C355.75 398.69 384 362.84 384 320h-64v-37.88c37.2-13.22 64-48.38 64-90.12zM192 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm0-128c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm0-128c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48z"],train:[448,512,[],"f238","M448 96v256c0 51.815-61.624 96-130.022 96l62.98 49.721C386.905 502.417 383.562 512 376 512H72c-7.578 0-10.892-9.594-4.957-14.279L130.022 448C61.82 448 0 403.954 0 352V96C0 42.981 64 0 128 0h192c65 0 128 42.981 128 96zm-48 136V120c0-13.255-10.745-24-24-24H72c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24zm-176 64c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56z"],tram:[512,512,[],"f7da","M288 64c17.7 0 32-14.3 32-32S305.7 0 288 0s-32 14.3-32 32 14.3 32 32 32zm223.5-12.1c-2.3-8.6-11-13.6-19.6-11.3l-480 128c-8.5 2.3-13.6 11-11.3 19.6C2.5 195.3 8.9 200 16 200c1.4 0 2.8-.2 4.1-.5L240 140.8V224H64c-17.7 0-32 14.3-32 32v224c0 17.7 14.3 32 32 32h384c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32H272v-91.7l228.1-60.8c8.6-2.3 13.6-11.1 11.4-19.6zM176 384H80v-96h96v96zm160-96h96v96h-96v-96zm-32 0v96h-96v-96h96zM192 96c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z"],transgender:[384,512,[],"f224","M372 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7C198.5 104.1 172.2 96 144 96 64.5 96 0 160.5 0 240c0 68.5 47.9


rated list selector, not matching class attribute with partial value',
    'selector': '[data-attr-whitespace~="div"]',
    'expect': <String>[] /*no matches*/,
    'level': 2,
    'testType': testQsaBaseline
  },
  {
    'name':
        'Attribute whitespace-separated list selector, matching custom data-* attribute with unicode escaped value',
    'selector': '[data-attr-whitespace~="\\0000e9"]',
    'expect': ['attr-whitespace-div4'],
    'level': 2,
    'testType': testQsaBaseline | testMatchBaseline
  },
  {
    'name':
        'Attribute whitespace-separated list selector, matching custom data-* attribute with escaped character',
    'selector': '[data-attr-whitespace_foo~="\\e9"]',
    'expect': ['attr-whitespace-div5'],
    'level': 2,
    'testType': testQsaBaseline | testMatchBaseline
  },
  {
    'name':
        'Attribute whitespace-separated list selector with single-quoted value, matching multiple links with rel attributes',
    'selector':
        "#attr-whitespace a[rel~='bookmark'],  #attr-whitespace a[rel~='nofollow']",
    'expect': [
      'attr-whitespace-a1',
      'attr-whitespace-a2',
      'attr-whitespace-a3',
      'attr-whitespace-a5',
      'attr-whitespace-a7'
    ],
    'level': 2,
    'testType': testQsaBaseline | testMatchBaseline
  },
  {
    'name':
        'Attribute whitespace-separated list selector with double-quoted value, matching multiple links with rel attributes',
    'selector':
        "#attr-whitespace a[rel~=\"bookmark\"],#attr-whitespace a[rel~='nofollow']",
    'expect': [
      'attr-whitespace-a1',
      'attr-whitespace-a2',
      'attr-whitespace-a3',
      'attr-whitespace-a5',
      'attr-whitespace-a7'
    ],
    'level': 2,
    'testType': testQsaBaseline | testMatchBaseline
  },
  {
    'name':
        'Attribute whitespace-separated list selector with unquoted value, matching multiple links with rel attributes',
    'selector':
        '#attr-whitespace a[rel~=bookmark],    #attr-whitespace a[rel~=nofollow]',
    'expect': [
      'attr-whitespace-a1',
      'attr-whitespace-a2',
      'attr-whitespace-a3',
      'attr-whitespace-a5',
      'attr-whitespace-a7'
    ],
    'level': 2,
    'testType': testQsaBaseline | testMatchBaseline
  },
  {
    'name':
        'Attribute whitespace-separated list selector with double-quoted value, not matching value with space',
    'selector': '#attr-whitespace a[rel~="book mark"]',
    'expect': <String>[] /* no matches */,
    'level': 2,
    'testType': testQsaBaseline
  },
  {
    'name':
        'Attribute whitespace-separated list selector, matching title attribute with value using non-ASCII characters',
    'selector': '#attr-whitespace [title~=中文]',
    'expect': ['attr-whitespace-p1'],
    'level': 2,
    'testType': testQsaBaseline | testMatchBaseline
  },

  // - hyphen-separated list     [att|=val]
  {
    'name':
        'Attribute hyphen-separated list selector, not matching unspecified lang attribute',
    'selector': '#attr-hyphen-div1[lang|="en"]',
    'expect': <String>[] /*no matches*/,
    'level': 2,
    'testType': testQsaBaseline
  },
  {
    'name':
        'Attribute hyp


p-map'
import * as path from 'path'

const EXT = '.json'
const EXT_LEN = EXT.length

export class FileCacheDBAdapter implements CacheDBAdapter {
  constructor (private cacheDirPath: string, public defaultTable = 'cacheDB') {
    fs.ensureDir(cacheDirPath) // async
  }

  name = 'File'

  // Ensures that table (folder) exists
  private async getTable (table = this.defaultTable): Promise<string> {
    const tablePath = path.join(this.cacheDirPath, table)
    await fs.ensureDir(tablePath)
    return tablePath
  }

  private async getFilePath (table = this.defaultTable, key: string): Promise<string> {
    return path.join(await this.getTable(table), `${key}${EXT}`)
  }

  async set (key: string, value: any, table?: string): Promise<void> {
    const filePath = await this.getFilePath(table, key)
    let v: any = value

    if (value && value._value instanceof Buffer) {
      // Buffer case
      v = {
        ...value,
        type: 'buffer',
      }
      await fs.writeFile(filePath + '.buffer', value._value)
      delete v._value
    }

    v = JSON.stringify(v, undefined, 2)
    await fs.writeFile(filePath, v)
  }

  async get<T = any> (key: string, table?: string): Promise<T | undefined> {
    const file = await this.getFilePath(table, key)
    if (!(await fs.pathExists(file))) return undefined
    const v = await fs.readFile(file, 'utf8')
    const r = v ? JSON.parse(v) : undefined
    if (r && r.type === 'buffer') {
      // Buffer case
      r._value = await fs.readFile(file + '.buffer')
    }

    return r
  }

  async delete (key: string, table?: string): Promise<void> {
    await fs.unlink(await this.getFilePath(table, key))
  }

  async clear (table?: string): Promise<void> {
    const tablePath = await this.getTable(table)
    await fs.unlink(tablePath)
  }

  async clearAll (): Promise<void> {
    await fs.unlink(this.cacheDirPath)
    await fs.ensureDir(this.cacheDirPath)
  }

  async keys (table = this.defaultTable): Promise<string[] | undefined> {
    const tablePath = path.join(this.cacheDirPath, table)
    if (!(await fs.pathExists(tablePath))) return undefined
    const files = await fs.readdir(tablePath)
    return files.map(f => f.substr(0, f.length - EXT_LEN))
  }

  async entries<T = any> (table: string): Promise<{ [k: string]: T } | undefined> {
    const keys = await this.keys(table)
    if (!keys) return undefined

    const r: { [k: string]: T } = {}
    await promiseMap(keys, async k => {
      const filePath = path.join(this.cacheDirPath, table, k + EXT)
      const v = await fs.readFile(filePath, 'utf8')
      r[k] = v ? JSON.parse(v) : undefined
    })
    return r
  }

  async values<T = any> (table = this.defaultTable): Promise<T[] | undefined> {
    const entries = await this.entries(table)
    if (!entries) return undefined
    return Object.values(entries)
  }

  async tables (): Promise<string[]> {
    return fs.readdir(this.cacheDirPath)
  }
}
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { User } from 'src/models/users/user.entity';
import { Repository } from 'typeorm';
import { JwtService } from '@nestjs/jwt';
import { JWTPayload } from 'src/models/payload/jwt-payload';
import * as bcrypt from 'bcrypt'


),
        ($33.ParseResponse value) => value.writeToBuffer()));
    $addMethod($grpc.ServiceMethod<$33.CheckRequest, $33.CheckResponse>(
        'Check',
        check_Pre,
        false,
        false,
        ($core.List<$core.int> value) => $33.CheckRequest.fromBuffer(value),
        ($33.CheckResponse value) => value.writeToBuffer()));
    $addMethod($grpc.ServiceMethod<$33.EvalRequest, $33.EvalResponse>(
        'Eval',
        eval_Pre,
        false,
        false,
        ($core.List<$core.int> value) => $33.EvalRequest.fromBuffer(value),
        ($33.EvalResponse value) => value.writeToBuffer()));
  }

  $async.Future<$33.ParseResponse> parse_Pre(
      $grpc.ServiceCall call, $async.Future<$33.ParseRequest> request) async {
    return parse(call, await request);
  }

  $async.Future<$33.CheckResponse> check_Pre(
      $grpc.ServiceCall call, $async.Future<$33.CheckRequest> request) async {
    return check(call, await request);
  }

  $async.Future<$33.EvalResponse> eval_Pre(
      $grpc.ServiceCall call, $async.Future<$33.EvalRequest> request) async {
    return eval(call, await request);
  }

  $async.Future<$33.ParseResponse> parse(
      $grpc.ServiceCall call, $33.ParseRequest request);
  $async.Future<$33.CheckResponse> check(
      $grpc.ServiceCall call, $33.CheckRequest request);
  $async.Future<$33.EvalResponse> eval(
      $grpc.ServiceCall call, $33.EvalRequest request);
}
//
//  Generated code. Do not modify.
//  source: google/api/apikeys/v2/apikeys.proto
//
// @dart = 2.12

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

import 'dart:core' as $core;

import 'package:protobuf/protobuf.dart' as $pb;

import '../../../protobuf/field_mask.pb.dart' as $58;
import 'resources.pb.dart' as $30;

/// Request message for `CreateKey` method.
class CreateKeyRequest extends $pb.GeneratedMessage {
  factory CreateKeyRequest({
    $core.String? parent,
    $30.Key? key,
    $core.String? keyId,
  }) {
    final $result = create();
    if (parent != null) {
      $result.parent = parent;
    }
    if (key != null) {
      $result.key = key;
    }
    if (keyId != null) {
      $result.keyId = keyId;
    }
    return $result;
  }
  CreateKeyRequest._() : super();
  factory CreateKeyRequest.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory CreateKeyRequest.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'CreateKeyRequest',
      package: const $pb.PackageName(
          _omitMessageNames ? '' : 'google.api.apikeys.v2'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ?


??Input_Lic_4
        MOV      R3,R11
        B.N      ??Input_Lic_5
//  161         else     Display_Str(j*8+ x0, y0, WHT, PRN,  n);
??Input_Lic_4:
        MOVS     R3,#+0
??Input_Lic_5:
        MOV      R2,R9
        MOV      R1,R10
        UXTH     R0,R7
        BL       Display_Str
        ADD      SP,SP,#+8
        CFI CFA R13+56
//  162       }
        ADDS     R6,R6,#+1
        ADDS     R7,R7,#+8
        ADD      R8,R8,#+1
        UXTB     R0,R6
        CMP      R0,#+8
        BCC.N    ??Input_Lic_3
//  163     }
//  164     if(Key_Buffer != 0){
??Input_Lic_2:
        LDR.N    R0,??Input_Lic_0+0x8  ;; Key_Buffer
        LDRB     R0,[R0, #+0]
        CMP      R0,#+0
        BEQ.N    ??Input_Lic_6
//  165       switch (Key_Buffer){
        LDR.N    R0,??Input_Lic_0+0x8  ;; Key_Buffer
        LDRB     R0,[R0, #+0]
        CMP      R0,#+2
        BEQ.N    ??Input_Lic_7
        CMP      R0,#+5
        BEQ.N    ??Input_Lic_8
        CMP      R0,#+6
        BEQ.N    ??Input_Lic_9
        CMP      R0,#+8
        BEQ.N    ??Input_Lic_10
        CMP      R0,#+9
        BEQ.N    ??Input_Lic_11
        B.N      ??Input_Lic_12
//  166       case K_INDEX_DEC:
//  167         if(((Lic >>((7-i)*4))& 0x0F )> 0) Lic -= 0x01<<((7-i)*4);
??Input_Lic_8:
        MOVS     R0,R4
        RSB      R0,R0,#+7
        LSLS     R0,R0,#+24
        LSRS     R0,R0,#+22
        LSR      R1,R5,R0
        TST      R1,#0xF
        BEQ.N    ??Input_Lic_13
        MOVS     R1,#+1
        LSL      R0,R1,R0
??Input_Lic_14:
        SUBS     R5,R5,R0
        B.N      ??Input_Lic_12
//  168         else                              Lic += 0x0F<<((7-i)*4);
??Input_Lic_13:
        MOVS     R1,#+15
        LSL      R0,R1,R0
??Input_Lic_15:
        ADDS     R5,R0,R5
        B.N      ??Input_Lic_12
//  169         break;
//  170       case K_INDEX_INC:
//  171         if(((Lic >>((7-i)*4))& 0x0F )<15) Lic += 0x01<<((7-i)*4);
??Input_Lic_9:
        MOVS     R0,R4
        RSB      R0,R0,#+7
        LSLS     R0,R0,#+24
        LSRS     R0,R0,#+22
        LSR      R1,R5,R0
        AND      R1,R1,#0xF
        CMP      R1,#+15
        BCS.N    ??Input_Lic_16
        MOVS     R1,#+1
        LSL      R0,R1,R0
        B.N      ??Input_Lic_15
//  172         else                              Lic -= 0x0F<<((7-i)*4);
??Input_Lic_16:
        MOVS     R1,#+15
        LSL      R0,R1,R0
        B.N      ??Input_Lic_14
//  173         break;
//  174       case K_ITEM_INC


x;}.setup_template .cur_5 .set7days_2{left:-83px;}.setup_template .cur_5 .set7days_3{left:-63px;}.setup_template .cur_5 .set7days_4{left:-43px;}.setup_template .cur_5 .set7days_5{left:80px;}.setup_template .cur_5 .set7days_6{left:100px;}.setup_template .cur_5 .set7days_7{left:120px;}.setup_template .cur_6 .set7days_1{left:-103px;}.setup_template .cur_6 .set7days_2{left:-83px;}.setup_template .cur_6 .set7days_3{left:-63px;}.setup_template .cur_6 .set7days_4{left:-43px;}.setup_template .cur_6 .set7days_5{left:-23px;}.setup_template .cur_6 .set7days_6{left:100px;}.setup_template .cur_6 .set7days_7{left:120px;}.setup_template .cur_7 .set7days_1{left:-103px;}.setup_template .cur_7 .set7days_2{left:-83px;}.setup_template .cur_7 .set7days_3{left:-63px;}.setup_template .cur_7 .set7days_4{left:-43px;}.setup_template .cur_7 .set7days_5{left:-23px;}.setup_template .cur_7 .set7days_6{left:-3px;}.setup_template .cur_7 .set7days_7{left:120px;}.setup_template .set7days_box li{	position:absolute;box-shadow:1px 0 3px #666;	-webkit-transition: left 1s ease;	transition: left 1s ease;}.setup_template_new .header .menu_tab{width:450px;}.setup_template_v2 .header .menu_tab{width:540px;}.setup_template_v2 .like_wrap .W_fl{ position: relative; width: 400px; height: 172px; margin-left: 74px; background:url("../../../images/layer/bg_like.png?id=1419901742185")  no-repeat;}.setup_template_v2 .like_wrap .W_fr{ width: 428px; }.setup_template_v2 .like_wrap .template_list{ margin-left: 0;}#js_style_css_module_layer_setup_template{height:42px;}
.UI_trans_ease{-webkit-transition:all .5s ease;transition:all .5s ease;}.UI_trans_linear{-webkit-transition:all .5s linear;transition:all .5s linear;}.UI_trans_easeOut{-webkit-transition:all .5s ease-out;transition:all .5s ease-out;}.UI_trans_easeIn{-webkit-transition:all .5s ease-in;transition:all .5s ease-in;}.UI_animated{-webkit-animation-fill-mode:both;animation-fill-mode:both;}.UI_speed_normal,.UI_speed_500{-webkit-animation-duration:0.5s;animation-duration:0.5s;}.UI_speed_fast,.UI_speed_200{-webkit-animation-duration:0.2s;animation-duration:0.2s;}.UI_speed_slow,.UI_speed_1000{-webkit-animation-duration:1s;animation-duration:1s;}.UI_speed_100{-webkit-animation-duration:.1s;animation-duration:.1s;}.UI_speed_300{-webkit-animation-duration:.3s;animation-duration:.3s;}.UI_speed_400{-webkit-animation-duration:.4s;animation-duration:.4s;}.UI_speed_600{-webkit-animation-duration:.6s;animation-duration:.6s;}.UI_speed_700{-webkit-animation-duration:.7s;animation-duration:.7s;}.UI_speed_800{-webkit-animation


ee1.IsLeaf {
		if !quadTree1.Val {
			return quadTree2
		}
		node.Val = true
		return node
	}
	if quadTree2.IsLeaf {
		if !quadTree2.Val {
			return quadTree1
		}
		node.Val = true
		return node
	}
	bl := Solution(quadTree1.BottomLeft, quadTree2.BottomLeft)
	br := Solution(quadTree1.BottomRight, quadTree2.BottomRight)
	tl := Solution(quadTree1.TopLeft, quadTree2.TopLeft)
	tr := Solution(quadTree1.TopRight, quadTree2.TopRight)
	if bl.IsLeaf && br.IsLeaf && tl.IsLeaf && tr.IsLeaf {
		if bl.Val == br.Val && bl.Val == tl.Val && bl.Val == tr.Val {
			node.IsLeaf = true
			node.Val = bl.Val
			return node
		}
	}
	node.BottomLeft = bl
	node.BottomRight = br
	node.TopLeft = tl
	node.TopRight = tr
	return node
}
// Package SolarUtil @Title SolarUtil
// @Description 阳历工具
// @Author 6tail
package SolarUtil

import (
	"fmt"
	"math"
)

var WEEK = []string{"日", "一", "二", "三", "四", "五", "六"}
var DAYS_OF_MONTH = []int{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
var XINGZUO = []string{"白羊", "金牛", "双子", "巨蟹", "狮子", "处女", "天秤", "天蝎", "射手", "摩羯", "水瓶", "双鱼"}
var FESTIVAL = map[string]string{"1-1": "元旦节", "2-14": "情人节", "3-8": "妇女节", "3-12": "植树节", "3-15": "消费者权益日", "4-1": "愚人节", "5-1": "劳动节", "5-4": "青年节", "6-1": "儿童节", "7-1": "建党节", "8-1": "建军节", "9-10": "教师节", "10-1": "国庆节", "10-31": "万圣节前夜", "11-1": "万圣节", "12-24": "平安夜", "12-25": "圣诞节"}
var WEEK_FESTIVAL = map[string]string{
	"3-0-1":  "全国中小学生安全教育日",
	"5-2-0":  "母亲节",
	"5-3-0":  "全国助残日",
	"6-3-0":  "父亲节",
	"9-3-6":  "全民国防教育日",
	"10-1-1": "世界住房日",
	"11-4-4": "感恩节",
}
var OTHER_FESTIVAL = map[string][]string{
	"1-8":   {"周恩来逝世纪念日"},
	"1-10":  {"中国人民警察节"},
	"1-14":  {"日记情人节"},
	"1-21":  {"列宁逝世纪念日"},
	"1-26":  {"国际海关日"},
	"1-27":  {"国际大屠杀纪念日"},
	"2-2":   {"世界湿地日"},
	"2-4":   {"世界抗癌日"},
	"2-7":   {"京汉铁路罢工纪念日"},
	"2-10":  {"国际气象节"},
	"2-19":  {"邓小平逝世纪念日"},
	"2-20":  {"世界社会公正日"},
	"2-21":  {"国际母语日"},
	"2-24":  {"第三世界青年日"},
	"3-1":   {"国际海


题/成交/时间/物料/内容）

2\. 活动中的执行：（建群-引流/破冰-IP 打造-成交-养粉-留升）

3\. 活动后的复盘：（集体复盘-总结经验-优秀表彰）

前中后保持这 3 个节奏，就能有续的进行，不慌不忙，收钱收到手软🤫，下一次就可以做的更好…

# 一、项目背景

该品牌是微商转型品牌，自有代理上万，2015 年成立至今已经是 8 年了，全国也是有几百家直营店，大健康产业主打产品是艾灸及周边养生系列产品。

疫情后线下门店顾客进店太少，线上流量获取越来越难，产品的动销与招商严重受阻，很多代理商都沉寂了。

在这样的情况下，看我们如何激活代理，打爆百店的国庆节活动，来，看我走过的路，都是一笔重要的财富，我把它分享给你。请你用 20 分钟读完，我们结一辈子的缘。

# 二、活动前的准备（方案/主题/成交/时间/物料/内容）

想要做一场成功的活动，好的活动运营方案也就成功了一半，当然细节也很关键，抄作业：

1、确定活动主题：百店同庆国庆艾灸体验节

2、参与对象：品牌代理商 159 家报名，中间有部分掉队，120 家跟上（每个门店收 500 押金，听话照做执行，全退）

3、设计好引流海报：小黄图，空白处放群二维码与抽奖礼品，门店自己准备抽奖礼品

![](img/0fcc901e336edd05adde1fc68a11c009.png)

4、线上线下成交方案及海报：线上海报与线下成交易拉宝。

![](img/396da4b7371df07618660336bda6596e.png)

5、线下活动物料：地贴，条幅，易拉宝，小旗，大转盘或红包墙等，活动氛围要直接拉满。

![](img/55e0c6a02eaafbb9f17917ecba6def70.png)

![](img/6c602bc049f19b49bb8a91635be39a7a.png)

![](img/a48ccc852515450bd1c206c51840b17b.png)

![](img/dba4247132b5dea3f855fa5fcfa60357.png)

6、抽奖礼品：线上


.intToString(electrostaticsThreads);
    program = cc.compileProgram(electrostaticsSource.str(), defines);
    electrostaticsKernel = program->createKernel("computeElectrostatics");
    electrostaticsKernel->addArg(cc.getLongForceBuffer());
    electrostaticsKernel->addArg(torque);
    electrostaticsKernel->addArg(cc.getEnergyBuffer());
    electrostaticsKernel->addArg(cc.getPosq());
    electrostaticsKernel->addArg(covalentFlags);
    electrostaticsKernel->addArg(polarizationGroupFlags);
    electrostaticsKernel->addArg(nb.getExclusionTiles());
    electrostaticsKernel->addArg();
    electrostaticsKernel->addArg();
    if (usePME) {
        electrostaticsKernel->addArg(nb.getInteractingTiles());
        electrostaticsKernel->addArg(nb.getInteractionCount());
        for (int i = 0; i < 6; i++)
            electrostaticsKernel->addArg();
        electrostaticsKernel->addArg(nb.getBlockCenters());
        electrostaticsKernel->addArg(nb.getInteractingAtoms());
    }
    electrostaticsKernel->addArg(sphericalDipoles);
    electrostaticsKernel->addArg(sphericalQuadrupoles);
    electrostaticsKernel->addArg(inducedDipole);
    electrostaticsKernel->addArg(inducedDipolePolar);
    electrostaticsKernel->addArg(dampingAndThole);

    // Set up PME.

    if (usePME) {
        // Create required data structures.

        int elementSize = (cc.getUseDoublePrecision() ? sizeof(double) : sizeof(float));
        pmeGrid1.initialize(cc, gridSizeX*gridSizeY*gridSizeZ, 2*elementSize, "pmeGrid1");
        pmeGrid2.initialize(cc, gridSizeX*gridSizeY*gridSizeZ, 2*elementSize, "pmeGrid2");
        if (useFixedPointChargeSpreading()) {
            pmeGridLong.initialize(cc, 2*gridSizeX*gridSizeY*gridSizeZ, sizeof(long long), "pmeGridLong");
            cc.addAutoclearBuffer(pmeGridLong);
        }
        else
            cc.addAutoclearBuffer(pmeGrid1);
        pmeBsplineModuliX.initialize(cc, gridSizeX, elementSize, "pmeBsplineModuliX");
        pmeBsplineModuliY.initialize(cc, gridSizeY, elementSize, "pmeBsplineModuliY");
        pmeBsplineModuliZ.initialize(cc, gridSizeZ, elementSize, "pmeBsplineModuliZ");
        pmePhi.initialize(cc, 20*numMultipoles, elementSize, "pmePhi");
        pmePhid.initialize(cc, 10*numMultipoles, elementSize, "pmePhid");
        pmePhip.initialize(cc, 10*numMultipoles, elementSize, "pmePhip");
        pmePhidp.initialize(cc, 20*numMultipoles, elementSize, "pmePhidp");
        pmeCphi.initialize(cc, 10*numMultipoles, elementSize, "pmeCphi");
        fft = cc.createFFT(gridSizeX, gridSizeY, gridSizeZ, false);

        // Create the PME kernels.

        map<string, string> pmeDefines;
        pmeDefines["EWALD_ALPHA"] = cc.doubleToString(pmeAlpha);
        pmeDefines["PME_ORDER"] = cc.intToString(PmeOrder);
        pmeDefines["NUM_ATOMS"] = cc.intToString(numMultipoles);
        pmeDefines["PADDED_NUM_ATOMS"] = cc.intToString(cc.getPaddedNumAtoms());
        pmeDefines["NUM_INDICES"] = "0";
        pmeDefines["EPSILON_FACTOR"] = cc.doubleToString(ONE_4PI_EPS0);
        pmeDefines["GRID_SIZE_X"] = cc.intToString(gridSizeX);
        pmeDefines["GRID_SIZ


.memTracker),
			idForTest:             i,
			ctx:                   ctx,
			inputCh:               e.partialInputChs[i],
			outputChs:             e.partialOutputChs,
			giveBackCh:            e.inputCh,
			BInMaps:               make([]int, finalConcurrency),
			partialResultsBuffer:  *partialResultsBuffer,
			globalOutputCh:        e.finalOutputCh,
			partialResultsMap:     partialResultsMap,
			groupByItems:          e.GroupByItems,
			chk:                   e.NewChunkWithCapacity(e.Children(0).RetFieldTypes(), 0, e.MaxChunkSize()),
			groupKeyBuf:           *groupKeyBuf,
			serializeHelpers:      aggfuncs.NewSerializeHelper(),
			isSpillPrepared:       false,
			spillHelper:           e.spillHelper,
			inflightChunkSync:     e.inflightChunkSync,
			fileNamePrefixForTest: e.FileNamePrefixForTest,
		}

		memUsage += e.partialWorkers[i].chk.MemoryUsage()

		e.partialWorkers[i].partialResultNumInRow = e.partialWorkers[i].getPartialResultSliceLenConsiderByteAlign()
		for j := range finalConcurrency {
			e.partialWorkers[i].BInMaps[j] = 0
		}

		// There is a bucket in the empty partialResultsMap.
		failpoint.Inject("ConsumeRandomPanic", nil)
		e.memTracker.Consume(hack.DefBucketMemoryUsageForMapStrToSlice * (1 << e.partialWorkers[i].BInMap))
		if e.stats != nil {
			e.partialWorkers[i].stats = &AggWorkerStat{}
			e.stats.PartialStats = append(e.stats.PartialStats, e.partialWorkers[i].stats)
		}
		input := &HashAggInput{
			chk:        chunk.New(e.Children(0).RetFieldTypes(), 0, e.MaxChunkSize()),
			giveBackCh: e.partialWorkers[i].inputCh,
		}
		memUsage += input.chk.MemoryUsage()
		e.inputCh <- input
	}

	e.memTracker.Consume(memUsage)
}

func (e *HashAggExec) initFinalWorkers(finalConcurrency int) {
	for i := range finalConcurrency {
		e.finalWorkers[i] = HashAggFinalWorker{
			baseHashAggWorker:          newBaseHashAggWorker(e.finishCh, e.FinalAggFuncs, e.MaxChunkSize(), e.memTracker),
			partialResultMap:           make(aggfuncs.AggPartialResultMapper),
			BInMap:                     0,
			inputCh:                    e.partialOutputChs[i],
			outputCh:                   e.finalOutputCh,
			finalResultHolderCh:        make(chan *chunk.Chunk, 1),
			spillHelper:                e.spillHelper,
			restoredAggResultMapperMem: 0,
		}
		// There is a bucket in the empty partialResultsMap.
		e.memTracker.Consume(hack.DefBucketMemoryUsageForMapStrToSlice * (1 << e.finalWorkers[i].BInMap))
		if e.stats != nil {
			e.finalWorkers[i].stats = &AggWorkerStat{}
			e.stats.FinalStats = append(e.stats.FinalStats, e.finalWorkers[i].stats)
		}
		e.finalWorkers[i].finalResultHolderCh <- chunk.New(e.RetFieldTypes(), 0, e.MaxChunkSize())
	}
}

func (e *HashAggExec) initForParallelExec(ctx sessionctx.Context) error {
	sessionVars := e.Ctx().GetSessionVars()
	partialConcurrency := sessionVars.HashAggPartialConcurrency()
	finalConcurrency := sessionVars.HashAggFinalConcurrency()

	if partialConcurrency ==


) 'description': description,
    });
  }

  i1.CategoriesCompanion copyWith(
      {i0.Value<int>? id, i0.Value<String>? description}) {
    return i1.CategoriesCompanion(
      id: id ?? this.id,
      description: description ?? this.description,
    );
  }

  @override
  Map<String, i0.Expression> toColumns(bool nullToAbsent) {
    final map = <String, i0.Expression>{};
    if (id.present) {
      map['id'] = i0.Variable<int>(id.value);
    }
    if (description.present) {
      map['description'] = i0.Variable<String>(description.value);
    }
    return map;
  }

  @override
  String toString() {
    return (StringBuffer('CategoriesCompanion(')
          ..write('id: $id, ')
          ..write('description: $description')
          ..write(')'))
        .toString();
  }
}

class ExampleDrift extends i2.ModularAccessor {
  ExampleDrift(i0.GeneratedDatabase db) : super(db);
  i0.Selectable<i1.Todo> filterTodos(FilterTodos$predicate predicate) {
    var $arrayStartIndex = 1;
    final generatedpredicate =
        $write(predicate(this.todos), startIndex: $arrayStartIndex);
    $arrayStartIndex += generatedpredicate.amountOfVariables;
    return customSelect('SELECT * FROM todos WHERE ${generatedpredicate.sql}',
        variables: [
          ...generatedpredicate.introducedVariables
        ],
        readsFrom: {
          todos,
          ...generatedpredicate.watchedTables,
        }).asyncMap(todos.mapFromRow);
  }

  i0.Selectable<i1.Todo> getTodos({GetTodos$predicate? predicate}) {
    var $arrayStartIndex = 1;
    final generatedpredicate = $write(
        predicate?.call(this.todos) ?? const i0.CustomExpression('(TRUE)'),
        startIndex: $arrayStartIndex);
    $arrayStartIndex += generatedpredicate.amountOfVariables;
    return customSelect('SELECT * FROM todos WHERE ${generatedpredicate.sql}',
        variables: [
          ...generatedpredicate.introducedVariables
        ],
        readsFrom: {
          todos,
          ...generatedpredicate.watchedTables,
        }).asyncMap(todos.mapFromRow);
  }

  i1.Todos get todos =>
      i2.ReadDatabaseContainer(attachedDatabase).resultSet<i1.Todos>('todos');
}

typedef FilterTodos$predicate = i0.Expression<bool> Function(i1.Todos todos);
typedef GetTodos$predicate = i0.Expression<bool> Function(i1.Todos todos);
// dart format width=80
// ignore_for_file: type=lint
import 'package:drift/drift.dart' as i0;
import 'package:shared/src/posts.drift.dart' as i1;
import 'package:drift/internal/modular.dart' as i2;
import 'package:shared/src/users.drift.dart' as i3;

typedef $PostsCreateCompanionBuilder = i1.PostsCompanion Function({
  required int author,
  i0.Value<String?> content,
  i0.Value<int> rowid,
});
typedef $PostsUpdateCompanionBuilder = i1.PostsCompanion Function({
  i0.Value<int> author,
  i0.Value<String?> content,
  i0.Value<int> rowid,
});

final class $PostsReferences
    extends i0.BaseReferences<i0.GeneratedDatabase, i1.Posts, i1.Post> {
  $PostsReferences(super.$_db, super.$_table, super.$_typedResult);

  static i3.$UsersTable _authorTable(i0.GeneratedDatabase db) =>
      i2.ReadDatabaseContainer(db)
          .resultSet<i3.$UsersTable>('users')
          .createAlias(i0.$_aliasNameGenerator(
              i2.ReadDatabaseContainer(db).resultSet<i1.Posts>('posts').author,
              i2.Read


extended PC relative

  <tt>R_X86_64_PLT32</tt>
  32 bit PLT address

  <tt>R_X86_64_PLTOFF64</tt>
  64-bit GOT relative offset to PLT entry
  PIC & Large code model

  <tt>R_X86_64_RELATIVE</tt>
  Adjust by program base

  <tt>R_X86_64_SIZE32</tt>

  <tt>R_X86_64_SIZE64</tt>

  <tt>R_X86_64_TLSDESC</tt>
  2 by 64-bit TLS descriptor
  TLS

  <tt>R_X86_64_TLSDESC_CALL</tt>
  Relaxable call through TLS descriptor
  TLS

  <tt>R_X86_64_TLSGD</tt>
  32 bit signed PC relative offset to two GOT entries for GD symbol
  TLS & PIC

  <tt>R_X86_64_TLSLD</tt>
  32 bit signed PC relative offset to two GOT entries for LD symbol
  TLS

  <tt>R_X86_64_TPOFF32</tt>
  Offset in initial TLS block
  TLS

  <tt>R_X86_64_TPOFF64</tt>
  Offset in initial TLS block
  TLS & Large code model

According to Chapter 3.5 of AMD64 System V Application Binary Interface,
there are four code models and they differ in addressing modes (absolute versus relative):

Small: All compile- and link-time addresses and symbols are assumed to fit
in 32-bit immediate operands. This model restricts code and global data to the low
2 GB of the address space (to be exact, between 0x0 and 0x7eff ffff, which is 2031 MB)

The compiler can encode symbolic references

In sign-extended immediate operands for offsets in the range of 0x8000 0000 (-231)
            to 0x100 0000 (224)

In zero-extended immediate operands for offsets in the range of 0x0
            to 0x7f00 0000 (231 - 224)

In <a href="http://www.tortall.net/projects/yasm/manual/html/nasm-effaddr.html


#!/usr/bin/env python
import baseSchemaClass

class SchemaUpdate15961(baseSchemaClass.SchemaUpdate):
	'''
	This will add badAlign field to old apProtomoRefinementParamsData
	'''

	def upgradeAppionDB(self):
		if not self.appion_dbupgrade.columnExists('ApTomoAlignmentRunData', 'badAlign'):
			self.appion_dbupgrade.addColumn('ApTomoAlignmentRunData', 'badAlign', self.appion_dbupgrade.bool)

if __name__ == "__main__":
	update = SchemaUpdate15961()
	# update only leginon database
	update.setRequiredUpgrade('appion')
	update.run()


/*

    LEON2/3 LIBIO low-level routines
    Written by Jiri Gaisler.
    Copyright (C) 2004  Cobham Gaisler AB

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

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

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

#define VENDOR_GAISLER   1
#define GAISLER_APBMST   0x006
#define GAISLER_IRQMP    0x00D
#define GAISLER_DDR2SPA  0x02E
#define GAISLER_DDRSPA   0x025
#define GAISLER_SDCTRL       0x009
#define GAISLER_FTMCTRL      0x054
#define GAISLER_FTSRCTRL     0x051
#define GAISLER_APBUART      0x00c
#define GAISLER_GPTIMER      0x011
#define ESA_MCTRL            0x00f
#define VENDOR_ESA           4

#define LEON3_IO_AREA 0xfff00000
#define LEON3_CONF_AREA 0xff000
#define LEON3_AHB_SLAVE_CONF_AREA (1 << 11)

	.text
	.global _prom_ft, _clean_ram0, _clean_ram0_size, _clean_ram1, _clean_ram1_size, mkprom_ahbslv_scan, mkprom_apbslv_scan, mkprom_iobar_getbase

_prom_ft:


e))}),this._cancelWants(r,e,n),await this._addWants(r,e,i)}_cancelWants(e,t,r){const n=t.toB58String();this._tasks=u((e,t)=>{const r=e.target.toB58String()===n,i=e.entry.cid.equals(t.cid);return r&&i},this._tasks,r)}async _addWants(e,t,r){await Promise.all(r.map(async e=>{let r;try{r=await this.blockstore.has(e.cid)}catch(t){return void this._log.error("failed blockstore existence check for "+e.cid)}r&&this._tasks.push({entry:e.entry,target:t})})),this._outbox()}_processBlocks(e,t){const r=[];e.forEach((e,n)=>{this._log("got block (%s bytes)",e.data.length),t.receivedBytes(e.data.length),r.push(e.cid)}),this.receivedBlocks(r)}messageSent(e,t){const r=this._findOrCreate(e);r.sentBytes(t?t.data.length:0),t&&t.cid&&r.wantlist.remove(t.cid)}numBytesSentTo(e){return this._findOrCreate(e).accounting.bytesSent}numBytesReceivedFrom(e){return this._findOrCreate(e).accounting.bytesRecv}peerDisconnected(e){}_findOrCreate(e){const t=e.toB58String();if(this.ledgerMap.has(t))return this.ledgerMap.get(t);const r=new o(e);return this.ledgerMap.set(t,r),this._stats&&this._stats.push(t,"peerCount",1),r}start(){this._running=!0}stop(){this._running=!1}}},function(e,t,r){"use strict";const n=r(231);e.exports=class{constructor(e){this.partner=e,this.wantlist=new n,this.exchangeCount=0,this.sentToPeer=new Map,this.accounting={bytesSent:0,bytesRecv:0}}sentBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesSent+=e}receivedBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesRecv+=e}wants(e,t){this.wantlist.add(e,t)}cancelWant(e){this.wantlist.remove(e)}wantlistContains(e){return this.wantlist.contains(e)}debtRatio(){return this.accounting.bytesSent/(this.accounting.bytesRecv+1)}}},function(e,t,r){"use strict";const n=r(6).EventEmitter,i=r(315),s=r(118).logger,o=e=>`unwant:${e}`,a=e=>`block:${e}`;e.exports=class extends n{constructor(e){super(),this.setMaxListeners(i.maxListeners),this._log=s(e,"notif"),this._unwantListeners={},this._blockListeners={}}hasBlock(e){const t=`block:${e.cid.toString("base58btc")}`;this._log(t),this.emit(t,e)}wantBlock(e){const t=e.toString("base58btc");return this._log(`wantBlock:${t}`),new Promise((e,r)=>{this._unwantListeners[t]=()=>{this._log(`manual unwant: ${t}`),this._cleanup(t),e()},this._blockListeners[t]=r=>{this._cleanup(t),e(r)},this.once(o(t),this._unwantListeners[t]),this.once(a(t),this._blockListeners[t])})}unwantBlock(e){const t=`unwant:${e.toString("base58btc")}`;this._log(t),this.emit(t)}_cleanup(e){this._unwantListeners[e]&&(this.removeListener(o(e),this._unwantListeners[e]),delete this._unwantListeners[e]),this._blockListeners[e]&&(this.removeListener(a(e),this._blo


ACHE_NBR_MIN] "
#error  "                                        [     &&  <= NET_NDP_CACHE_NBR_MAX] "
#endif

/*
*********************************************************************************************************
*********************************************************************************************************
*                                             MODULE END
*********************************************************************************************************
*********************************************************************************************************
*/

#endif  /* NET_NDP_MODULE_EN       */
#endif  /* NET_NDP_MODULE_PRESENT  */


0xff]
          vpsubd zmm7 {k3} {z}, zmm28, zmm7

// CHECK: vpsubd zmm7, zmm28, zmmword ptr [rcx]
// CHECK:  encoding: [0x62,0xf1,0x1d,0x40,0xfa,0x39]
          vpsubd zmm7, zmm28, zmmword ptr [rcx]

// CHECK: vpsubd zmm7, zmm28, zmmword ptr [rax + 8*r14 + 291]
// CHECK:  encoding: [0x62,0xb1,0x1d,0x40,0xfa,0xbc,0xf0,0x23,0x01,0x00,0x00]
          vpsubd zmm7, zmm28, zmmword ptr [rax + 8*r14 + 291]

// CHECK: vpsubd zmm7, zmm28, dword ptr [rcx]{1to16}
// CHECK:  encoding: [0x62,0xf1,0x1d,0x50,0xfa,0x39]
          vpsubd zmm7, zmm28, dword ptr [rcx]{1to16}

// CHECK: vpsubd zmm7, zmm28, zmmword ptr [rdx + 8128]
// CHECK:  encoding: [0x62,0xf1,0x1d,0x40,0xfa,0x7a,0x7f]
          vpsubd zmm7, zmm28, zmmword ptr [rdx + 8128]

// CHECK: vpsubd zmm7, zmm28, zmmword ptr [rdx + 8192]
// CHECK:  encoding: [0x62,0xf1,0x1d,0x40,0xfa,0xba,0x00,0x20,0x00,0x00]
          vpsubd zmm7, zmm28, zmmword ptr [rdx + 8192]

// CHECK: vpsubd zmm7, zmm28, zmmword ptr [rdx - 8192]
// CHECK:  encoding: [0x62,0xf1,0x1d,0x40,0xfa,0x7a,0x80]
          vpsubd zmm7, zmm28, zmmword ptr [rdx - 8192]

// CHECK: vpsubd zmm7, zmm28, zmmword ptr [rdx - 8256]
// CHECK:  encoding: [0x62,0xf1,0x1d,0x40,0xfa,0xba,0xc0,0xdf,0xff,0xff]
          vpsubd zmm7, zmm28, zmmword ptr [rdx - 8256]

// CHECK: vpsubd zmm7, zmm28, dword ptr [rdx + 508]{1to16}
// CHECK:  encoding: [0x62,0xf1,0x1d,0x50,0xfa,0x7a,0x7f]
          vpsubd zmm7, zmm28, dword ptr [rdx + 508]{1to16}

// CHECK: vpsubd zmm7, zmm28, dword ptr [rdx + 512]{1to16}
// CHECK:  encoding: [0x62,0xf1,0x1d,0x50,0xfa,0xba,0x00,0x02,0x00,0x00]
          vpsubd zmm7, zmm28, dword ptr [rdx + 512]{1to16}

// CHECK: vpsubd zmm7, zmm28, dword ptr [rdx - 512]{1to16}
// CHECK:  encoding: [0x62,0xf1,0x1d,0x50,0xfa,0x7a,0x80]
          vpsubd zmm7, zmm28, dword ptr [rdx - 512]{1to16}

// CHECK: vpsubd zmm7, zmm28, dword ptr [rdx