nk-volume 1 100%');
  console.log('open sound');
});

button.on('falling', () => {
  execSync('pactl set-sink-volume 1 0%');
  console.log('mute');
});

process.on("SIGINT", () => {
  button.close();
  console.log('shutdown!');
  process.exit(0);
});
```

程序并不优雅，但是要实现的功能大致就是这个意思。这段程序看似没有问题，不知道是系统问题还是 rpio2 这个库的问题，在接收上升沿和下降沿信号时经常让板子宕机，这个问题还需要好好研究下。

---

花了好几个小时来回折腾，完成了这个实验性的小玩具，生活中我肯定不会用它，因为它过于简陋。这里我还给自己加了一道拓展题，如何识别多次按钮点击，然后根据点击的次数执行不同任务，结果写出来的程序，当按钮按下时，系统总是奔溃，就没有继续了，感兴趣的读者可以尝试下~

---
title: 个人网站架构设计(一)
categories:
  - 前端杂烩
tags:
  - tech
  - cnblogs
date: 2014-05-13 11:13:00
fromUrl: http://www.cnblogs.com/hustskyking/archive/2014/05/13/personal-website-design-part-1.html
from: 博客园
---

网站地址：http://barretlee.com

从大二开始，坚持每月3到8篇的技术分享，到现在差不多两年了。一直在分享之中跟着大家一起进步，从最开始的点点网，到github，再到现在的博客园。分享是一件有趣的事情，能够收到很多的反馈，渐渐地，已经把写博当成一种习惯。

在不同的平台上写博客会有不同的感受，但是几乎没有哪个平台可以满足自己的所有需求，比如，期望没有广告、希望速度可以更快、自己可以更多的操作后端、找个地方放DEMO、有个NodeJS测试的环境、自定义样式和主题等等，对我这个喜欢折腾的人来说，这些需求真是太普通了，可惜，没有哪个平台可以提供这么多的服务。再如，我希望把更多的生活中元素或者情感的东西带到博客中来，这些平台貌似不太适合做这些事情。

无奈之下只好自己花点钱买个主机安置个人网站。搭建一个网站是一个系统学习前后端的最佳机


 ([\#16299](https://github.com/matrix-org/synapse/issues/16299))
- Small improvements to logging in replication code. ([\#16309](https://github.com/matrix-org/synapse/issues/16309))
- Remove a reference cycle in background processes. ([\#16314](https://github.com/matrix-org/synapse/issues/16314))
- Only use literal strings for background process names. ([\#16315](https://github.com/matrix-org/synapse/issues/16315))
- Refactor `get_user_by_id`. ([\#16316](https://github.com/matrix-org/synapse/issues/16316))
- Speed up task to delete to-device messages. ([\#16318](https://github.com/matrix-org/synapse/issues/16318))
- Avoid patching code in tests. ([\#16349](https://github.com/matrix-org/synapse/issues/16349))
- Test against PostgreSQL 16. ([\#16351](https://github.com/matrix-org/synapse/issues/16351))

### Updates to locked dependencies

* Bump mypy from 1.4.1 to 1.5.1. ([\#16300](https://github.com/matrix-org/synapse/issues/16300))
* Bump black from 23.7.0 to 23.9.1. ([\#16295](https://github.com/matrix-org/synapse/issues/16295))
* Bump docker/build-push-action from 4 to 5. ([\#16336](https://github.com/matrix-org/synapse/issues/16336))
* Bump docker/login-action from 2 to 3. ([\#16339](https://github.com/matrix-org/synapse/issues/16339))
* Bump docker/metadata-action from 4 to 5. ([\#16337](https://github.com/matrix-org/synapse/issues/16337))
* Bump docker/setup-qemu-action from 2 to 3. ([\#16338](https://github.com/matrix-org/synapse/issues/16338))
* Bump furo from 2023.8.19 to 2023.9.10. ([\#16340](https://github.com/matrix-org/synapse/issues/16340))
* Bump gitpython from 3.1.32 to 3.1.35. ([\#16267](https://github.com/matrix-org/synapse/issues/16267), [\#16279](https://github.com/matrix-org/synapse/issues/16279))
* Bump mypy-zope from 1.0.0 to 1.0.1. ([\#16291](https://github.com/matrix-org/synapse/issues/16291))
* Bump pillow from 10.0.0 to 10.0.1. ([\#16344](https://github.com/matrix-org/synapse/issues/16344))
* Bump regex from 1.9.4 to 1.9.5. ([\#16233](https://github.com/matrix-org/synapse/issues/16233))
* Bump ruff from 0.0.286 to 0.0.290. ([\#16342](https://github.com/matrix-org/synapse/issues/16342))
* Bump serde_json from 1.0.105 to 1.0.107. ([\#16296](https://github.com/matrix-org/synapse/issues/16296), [\#16345](https://github.com/matrix-org/synapse/issues/16345))
* Bump twisted from 22.10.0 to 23.8.0. ([\#16235](https://github.com/matrix-org/synapse/issues/16235))
* Bump types-pillow from 10.0.0.2 to 10.0.0.3. ([\#16293](https://github.com/matrix-org/synapse/issues/16293))
* Bump types-setuptools from 68.0.0.3 to 68.2.0.0. ([\#16292](https://github.com/matrix-org/synapse/issues/16292))
* Bump typing-extensions from 4.7.1 to 4.8.0. ([\#16341](https://github.com/matrix-org/synapse/issues/16341))

# Synapse 1.92.3 (2023-09-18)

This is again a security update targeted at mitigating [CVE-2023-4863](https://cve.org/CVERecord?id=


交叉路口，收到由路侧单元（RSU)发送的道路数据及信号灯实时状态数据时，应用将给予驾驶员一个建议车速区间，以使车辆能够经济地、舒适地（不需要停车等待）通过信号灯路口；

左转辅助：主车在交叉路口左转，与对向驶来的远车存在碰撞危险时，本应用将对驾驶员进行预警。本应用适用于城市及郊区普通道路及公路的交叉路口，辅助驾驶员避免或减轻侧向碰撞，提高交叉路口通行安全；

公交站台播报：当车辆经过公交站台路段时，系统自动触发公交站台信息播报，提醒驾乘人员注意减速避让；

综合信息发布：通过V2X Server平台可以定向下发诸如文旅、商超活动等便民服务；

### 2.7 仿真系统、数字孪生

#### 2.7.1 仿真系统

车路协同系统是一种功能复杂的大系统，进行系统功能仿真测试是系统投入运营前的必备环节。因此，针对车路协同运行控制系统的功能测试需求，建立可视化的仿真平台以支持系统的全面、高效、可重复测试。

![image-20210603113915972](https://gitee.com/AiShiYuShiJiePingXing/img/raw/master/img/image-20210603113915972.png)

##### 1. 车路协同典型场景建模

在车路协同系统进行多车仿真时，车车信息交互模型将模拟车辆之间的信息交互。

![image-20210603114020588](https://gitee.com/AiShiYuShiJiePingXing/img/raw/master/img/image-20210603114020588.png)

#### 2.7.2 数字孪生平台

产品的最后最优秀的呈现和解决方案，就是彻底实现车路协同的数字孪生平台，将车路协同的所有应用场景以数字孪生的方式进行呈现。# C-V2X业务演进白皮书

# 1   C-V2X业务演进趋势

## 1.1  C-V2X业务向更加安全、绿色、智能、协同演进

随着C-V2X及5G技术发展，与之而来的更大数据吞吐量、更低时延、更高安全性和更海量连接等特性，极大地促进了智能驾驶和智慧交通发展。通过“车-路-云”协同，一方面推动智能网联汽车快速发展，提供更安全、更智能的出行方式；另一方面赋能智


watched-words-replace,
.watched-words-tag {
  .watched-word-box {
    min-width: calc(50% - 5px);
  }
}

.watched-word-box,
.watched-words-test-modal {
  .replacement {
    white-space: pre;
    background: var(--tertiary-low);
  }

  .tag {
    background: var(--primary-low);
    font-size: var(--font-down-1);
    margin-right: 0.1em;
    padding: 0.5em;
  }
}

.watched-words-uploader {
  display: inline-block;

  label {
    font-weight: normal;
  }
}

.watched-words-list {
  margin-top: 20px;
  display: inline-block;
  width: 100%;
}

.watched-word {
  display: inline-block;
  cursor: pointer;

  .delete-word-record:hover {
    color: var(--danger);
  }
}

.watched-word-form {
  .success-message {
    margin-left: 1em;
  }
}

.watched-words-detail {
  .watched-word-controls,
  .about,
  .watched-word-form {
    margin-bottom: 1em;
  }

  .about {
    font-size: var(--font-up-1);
    max-width: 30em;
  }

  .watched-word-controls .btn {
    margin-bottom: 0.25em;
    margin-right: 0.25em;
  }
}

.watched-words-test-modal p {
  margin-top: 0;
}

.watched-word-input {
  label {
    display: inline-block;
    min-width: 150px;
    padding-top: 4px;
    vertical-align: top;
  }

  input.watched-word-input-field {
    min-width: 300px;
  }

  .select-kit.multi-select.watched-word-input-field {
    width: 300px;
    margin-bottom: 9px;
  }

  + .btn-primary {
    margin-top: 1em;
  }
}

// Search logs
table.search-logs-list {
  td.term {
    width: 60%;
    word-wrap: break-word;

    @media screen and (width <= 767px) {
      width: 100%;
    }
  }

  th:not(.term),
  td:not(.term) {
    text-align: center;
  }

  @media screen and (width >= 550px) {
    tr {
      td.term {
        grid-column-start: span 3;
      }
    }
  }

  @include viewport.until(sm) {
    tr {
      td.term {
        grid-column-start: 1;
        grid-column-end: 4;
      }

      th:not(.term),
      td:not(.term) {
        text-align: left;
      }
    }
  }
}
:root {
  --base-font-size-smallest: 0.815em; // eq. to 13px
  --base-font-size-smaller: 0.875em; // eq. to 14px
  --base-font-size: 1em; // eq. to 16px
  --base-font-size-larger: 1.125em; // eq. to 18px
  --base-font-size-largest: 1.25em; // eq. to 20px

  // Font-size definitions, multiplier ^ (step / interval)
  --font-up-6: 2.296em;
  --font-up-5: 2em;
  --font-up-4: 1.7511em;
  --font-up-3: 1.5157em;
  --font-up-2: 1.3195em;
  --font-up-1: 1.1487em; // 2^(1/5)
  --font-0: 1em;
  --font-down-1: 0.8706em; // 2^(-1/5)
  --font-down-2: 0.7579em; // Smallest size we use based on the 1em base
  --font-down-3: 0.6599em;


 40 50 */	subf r4, r0, r8
/* 80183838 0017ED78  40 80 00 08 */	bge lbl_80183840
/* 8018383C 0017ED7C  7C FA 3B 78 */	mr r26, r7
lbl_80183840:
/* 80183840 0017ED80  7C 04 D8 00 */	cmpw r4, r27
/* 80183844 0017ED84  40 80 00 08 */	bge lbl_8018384C
/* 80183848 0017ED88  7C 9B 23 78 */	mr r27, r4
lbl_8018384C:
/* 8018384C 0017ED8C  7C 04 C8 00 */	cmpw r4, r25
/* 80183850 0017ED90  40 81 00 18 */	ble lbl_80183868
/* 80183854 0017ED94  A0 03 00 02 */	lhz r0, 2(r3)
/* 80183858 0017ED98  2C 00 00 00 */	cmpwi r0, 0
/* 8018385C 0017ED9C  41 82 00 0C */	beq lbl_80183868
/* 80183860 0017EDA0  7C 99 23 78 */	mr r25, r4
/* 80183864 0017EDA4  7F 17 C3 78 */	mr r23, r24
lbl_80183868:
/* 80183868 0017EDA8  2C 16 00 00 */	cmpwi r22, 0
/* 8018386C 0017EDAC  41 82 00 0C */	beq lbl_80183878
/* 80183870 0017EDB0  7C 03 B0 40 */	cmplw r3, r22
/* 80183874 0017EDB4  41 82 00 D0 */	beq lbl_80183944
lbl_80183878:
/* 80183878 0017EDB8  7F D4 AA 14 */	add r30, r20, r21
/* 8018387C 0017EDBC  56 BF 10 3A */	slwi r31, r21, 2
/* 80183880 0017EDC0  48 00 00 B8 */	b lbl_80183938
lbl_80183884:
/* 80183884 0017EDC4  80 6F 00 00 */	lwz r3, 0(r15)
/* 80183888 0017EDC8  A0 18 00 00 */	lhz r0, 0(r24)
/* 8018388C 0017EDCC  80 63 00 08 */	lwz r3, 8(r3)
/* 80183890 0017EDD0  54 00 20 36 */	slwi r0, r0, 4
/* 80183894 0017EDD4  7C 63 02 14 */	add r3, r3, r0
/* 80183898 0017EDD8  90 61 00 14 */	stw r3, 0x14(r1)
/* 8018389C 0017EDDC  C0 03 00 00 */	lfs f0, 0(r3)
/* 801838A0 0017EDE0  FC 00 F8 40 */	fcmpo cr0, f0, f31
/* 801838A4 0017EDE4  4C 40 13 82 */	cror 2, 0, 2
/* 801838A8 0017EDE8  41 82 00 90 */	beq lbl_80183938
/* 801838AC 0017EDEC  7F B2 FA 14 */	add r29, r18, r31
/* 801838B0 0017EDF0  7E 43 93 78 */	mr r3, r18
/* 801838B4 0017EDF4  7F A4 EB 78 */	mr r4, r29
/* 801838B8 0017EDF8  38 A1 00 14 */	addi r5, r1, 0x14
/* 801838BC 0017EDFC  48 00 1D 15 */


ter yerine veya ek olarak Flask/FastAPI ile web arayüzü.
  - **Görevler**:
    - Flask ile tarama ve spoofing için web sunucusu oluşturma.
    - Web arayüzünde hedef/port/alan adı girişi, tarama/spoofing başlatma.
    - HTML raporları ve topoloji görselleştirmesini web’de görüntüleme.
  - **Süre**: 4 hafta.
  - **Başarı Kriteri**: Web arayüzünden tarama ve spoofing başlatma.

### 4. Otomasyon ve Karşılaştırma
- **Hedef**: Düzenli tarama/spoofing ve sonuç karşılaştırma.
  - **Görevler**:
    - `schedule` ile periyodik tarama/spoofing planlama.
    - SQLite ile tarama/spoofing sonuçlarını kaydetme.
    - Önceki taramalarla karşılaştırma (yeni cihaz/port/zafiyet).
  - **Süre**: 3 hafta.
  - **Başarı Kriteri**: Otomatik tarama ve rapor karşılaştırması.

Amaç: Gelişmiş spoofing, bulut entegrasyonu ve platform bağımsızlığı.

### 1. DHCP Manipülasyonu
- **Hedef**: Sahte DHCP teklifleriyle yanlış DNS sunucusu atama.
  - **Görevler**:
    - Scapy ile DHCP spoofing betiği:
      ```python
      from scapy.all import *

      def dhcp_spoof(packet):
          if packet.haslayer(DHCP) and packet[DHCP].options[0][1] == 1:
              fake_dns = "192.168.1.100"
              # Sahte DHCP yanıtı oluşturma (detaylı yapılandırma gerekir)
              # send(dhcp_offer)

      sniff(filter="udp and (port 67 or 68)", prn=dhcp_spoof)
      ```
    - Betiği `NetworkScanner` sınıfına entegre etme (`--dhcp-spoof`).
    - GUI’ye DHCP spoofing için yapılandırma ekleme.
  - **Süre**: 4 hafta.
  - **Başarı Kriteri**: Kurban VM’de `ipconfig /renew` ile sahte DNS sunucusu atanması.

### 2. Bulut Tabanlı Rapor Depolama
- **Hedef**: Tarama ve spoofing sonuçlarını bulutta saklama.
  - **Görevler**:
    - AWS S3 veya Firebase ile rapor depolama.
    - Paylaşılabilir rapor linkleri oluşturma.
    - Kullanıcı kimlik doğrulaması için oturum sistemi.
  - **Süre**: 4 hafta.
  - **Başarı Kriteri**: Raporların bulutta saklanması ve güvenli paylaşımı.

### 3. Mobil Uygulama Desteği
- **Hedef**: Mobil cihazlarda tarama/spoofing kontrolü.
  - **Görevler**:
    - Kivy/Flutter ile çapraz platform mobil arayüz.
    - Web API ile tarama/spoofing başlatma ve sonuç alma.
    - Push bildirimleriyle tamamlanma uyarıları.
  - **Süre**: 6 hafta.
  - **Başarı Kriteri**: iOS/Android’de çalışan mobil uygulama.

### 4. Makine Öğrenimi ile Zafiyet Analizi
- **Hedef**: Zafiyetlerin önem derecesini tahmin etme.
  - **Görevler**:
    - Scikit-learn ile sın


t-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity))}:is([dir=ltr] .ltr\:ml-2){margin-left:.5rem}:is([dir=ltr] .ltr\:hidden){display:none}:is([dir=rtl] .rtl\:mr-2){margin-right:.5rem}:is([dir=rtl] .rtl\:hidden){display:none}:is([dir=rtl] .rtl\:-translate-x-0){--tw-translate-x:-0px}:is([dir=rtl] .rtl\:-translate-x-0),:is([dir=rtl] .rtl\:-translate-x-5){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:-translate-x-5){--tw-translate-x:-1.25rem}:is([dir=rtl] .rtl\:-translate-x-full){--tw-translate-x:-100%}:is([dir=rtl] .rtl\:-translate-x-full),:is([dir=rtl] .rtl\:translate-x-1\/2){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:translate-x-1\/2){--tw-translate-x:50%}:is([dir=rtl] .rtl\:translate-x-full){--tw-translate-x:100%}:is([dir=rtl] .rtl\:rotate-180),:is([dir=rtl] .rtl\:translate-x-full){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .rtl\:rotate-180){--tw-rotate:180deg}:is([dir=rtl] .rtl\:flex-row-reverse){flex-direction:row-reverse}:is([dir=rtl] .rtl\:space-x-reverse)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}:is([dir=rtl] .rtl\:divide-x-reverse)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}:is(.dark .dark\:divide-white\/10)>:not([hidden])~:not([hidden]){border-color:#ffffff1a}:is(.dark .dark\:divide-white\/20)>:not([hidden])~:not([hidden]){border-color:#fff3}:is(.dark .dark\:divide-white\/5)>:not([hidden])~:not([hidden]){border-color:#ffffff0d}:is(.dark .dark\:border-gray-600){--tw-border-opacity:1;border-color:rgba(var(--gray-600),var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity:1;border-color:rgba(var(--gray-700),var(--tw-border-opacity))}:is(.dark .dark\:border-primary-500){--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity))}:is(.dark .dark\:border-white\/10){border-color:#ffffff1a}:is(.dark .dark\:border-white\/5){border-color:#ffffff0d}:is(.dark .dark\:border-t-white\/10){


ocus {
	outline-offset: 2px;
	outline: 2px dotted #39414d;
}

.is-dark-theme select {
	background: rgba(255, 255, 255, 0.9) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2328303d'><polygon points='0,0 10,0 5,5'/></svg>") no-repeat;
	background-position: right 10px top 60%;
}

textarea {
	width: 100%;
}

label {
	font-size: 1.125rem;
	font-weight: 500;
	margin-bottom: 10px;
}

/**
https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/
https://codepen.io/aaroniker/pen/ZEYoxEY by Aaron Iker.
License: MIT.
*/
@supports (-webkit-appearance: none) or (-moz-appearance: none) {

	input[type=checkbox] {
		-webkit-appearance: none;
		-moz-appearance: none;
		position: relative;
		width: 25px;
		height: 25px;
		border: 3px solid #39414d;
		background: #fff;
	}

	input[type=radio] {
		-webkit-appearance: none;
		-moz-appearance: none;
		position: relative;
		width: 25px;
		height: 25px;
		border: 3px solid #39414d;
		background: #fff;
	}

	input[type=checkbox]:disabled,
	input[type=radio]:disabled {
		opacity: 0.7;
	}

	.is-dark-theme input[type=checkbox] {
		background: rgba(255, 255, 255, 0.9);
	}

	.is-dark-theme input[type=radio] {
		background: rgba(255, 255, 255, 0.9);
	}

	input[type=checkbox]:focus {
		outline-offset: 2px;
		outline: 2px dotted #39414d;
	}

	input[type=checkbox]:after {
		content: "";
		opacity: 0;
		display: block;
		left: 5px;
		top: 2px;
		position: absolute;
		width: 7px;
		height: 13px;
		border: 3px solid #28303d;
		border-top: 0;
		border-left: 0;
		transform: rotate(30deg);
	}

	input[type=checkbox]:checked {
		color: #28303d;
	}

	input[type=checkbox]:checked:after {
		opacity: 1;
	}

	input[type=radio] {
		border-radius: 50%;
	}

	input[type=radio]:focus {
		outline-offset: 2px;
		outline: 2px dotted #39414d;
	}

	input[type=radio]:after {
		content: "";
		opacity: 0;
		display: block;
		left: 3px;
		top: 3px;
		position: absolute;
		width: 11px;
		height: 11px;
		border-radius: 50%;
		background: #28303d;
	}

	input[type=radio]:checked {
		border: 4px solid #39414d;
	}

	input[type=radio]:checked:after {
		opacity: 1;
	}

	input[type=radio]:checked:focus {
		outline-offset: 4px;
		outline: 2px dotted #39414d;
	}
}

input[type=checkbox] + label {
	display: inline-block;
	padding-left: 10px;
	font-size: 1rem;
	vertical-align: top;
}

input[type=radio] + label {
	display: inline-block;
	padding-left: 10px;
	font-size: 1


.Start,
			EndTs:   span.End,
		})
	}
	hashNum := tsDelete.HashNum
	if tsDelete.InputRows == nil && tab.GetTableType() == tree.TimeseriesTable {
		node, err := b.factory.ConstructTSDelete(
			[]roachpb.NodeID{b.evalCtx.NodeID},
			uint64(tab.ID()),
			uint64(hashNum),
			spans,
			uint8(tsDelete.DeleteType),
			[][]byte{}, // primary tag key
			[][]byte{}, // primary tag value
			false)
		if err != nil {
			return execPlan{}, err
		}

		return execPlan{root: node}, nil
	}

	cols := make([]*sqlbase.ColumnDescriptor, tab.ColumnCount())
	var primaryTagCols []*sqlbase.ColumnDescriptor

	// get table's primary tag metadata and it's filter expr
	childColIndexs := make(map[int]int, 1)
	colIndexs := make(map[int]int, len(cols))
	for i := 0; i < len(cols); i++ {
		cols[i] = tab.Column(i).(*sqlbase.ColumnDescriptor)
		if cols[i].IsPrimaryTagCol() {
			primaryTagCols = append(primaryTagCols, cols[i])
			childColIndexs[int(cols[i].ID)] = 0
		}
		if ord, ok := tsDelete.ColsMap[int(cols[i].ID)]; ok {
			// get value expr from colMap
			colIndexs[int(cols[i].ID)] = ord
		}
	}
	var inputRowVal opt.RowsValue
	if tsDelete.RunInsideProcedure {
		inputRowVal = tsDelete.ActualRows
	} else {
		inputRowVal = tsDelete.InputRows
	}

	var primaryTagVal []byte
	var isOutOfRange bool
	// time series table support delete entity and delete data
	if tab.GetTableType() == tree.TimeseriesTable {
		// build time series table's primary tags values through expr
		primaryTagVal, isOutOfRange, err = BuildInputForTSDelete(
			b.evalCtx,
			inputRowVal,
			[]int{0},
			primaryTagCols,
			colIndexs,
		)
		if err != nil {
			return execPlan{}, err
		}
		// instance table only support delete data
	} else if tab.GetTableType() == tree.InstanceTable {
		// build instance table's primary tags values through it's table name
		var inputRow tree.Exprs
		name := tab.Name()
		inputRow = append(inputRow, tree.NewDString(name.String()))
		var inputRows opt.RowsValue
		inputRows = append(inputRows, inputRow)
		primaryTagVal, _, err = BuildInputForTSDelete(
			b.evalCtx,
			inputRows,
			[]int{0},
			primaryTagCols,
			childColIndexs,
		)
		if err != nil {
			return execPlan{}, err
		}
	}
	hashPoints, err := api.GetHashPointByPrimaryTag(uint64(hashNum), primaryTagVal)
	if err != nil {
		return execPlan{}, err
	}
	primaryTagKey := sqlbase.MakeTsPrimaryTagKey(sqlbase.ID(tab.ID()), hashPoints)
	primaryTagVals := [][]byte{primaryTagVal}

	node, err := b.factory.ConstructTSDelete(
		[]roachpb.NodeID{b.evalCtx.NodeID},
		uint64(tab.ID()),
		uint64(hashNum),
		spans,
		uint8(tsDelete.DeleteType),
		[][]byte{primaryTagKey},
		primaryTagVals,
		isOutOfRange)
	if err != nil {
		return execPlan{}, err
	}

	return execPlan{root: node}, nil
}

// buildTSUpdate builds time series update node.
func (b *Builder)


  }
        let (bits,mode) = array[self.look_bits(7)?].clone();

        if bits <= 7 {
            self.skip_bits(bits);
            return Ok(mode)
        }

        if bits == 10 {
            self.skip_bits(10);
            let n = self.look_bits(3)?;
            self.skip_bits(3);
            return Ok(Mode::Ext2D(n))
        }
        self.skip_bits(bits);
        Ok(Mode::None)
    }

// skip next byte
    fn flush(&mut self) {
        self.left_bits -= self.left_bits % 8;
    }
}

// Tiff independ
pub fn decoder(buf:&[u8],width:usize,height:usize,encoding:Encoder,is_lsb:bool) -> Result<(Vec<u8>,bool),Error> {

    let mut data = Vec::with_capacity(width*height);
    let white = white_tree();
    let black = black_tree();

    let mut reader = BitReader::new(buf,is_lsb);

    let mut code1;

    // seek first EOL
    if encoding == Encoder::G31d || encoding == Encoder::G32d {
        loop {
            code1 = reader.look_bits(12)?;
            if code1 != 0 { break };
            reader.skip_bits(1);
        }
        if code1 == 1 {
            reader.skip_bits(12);
        }
    }

    let mut is2d = if encoding == Encoder::G4 {true} else {false};

    let mut y = 0;

    if encoding == Encoder::G32d {
        if reader.get_bits(1)? == 0 {
            is2d = true
        }
    }
    // slow code
    /*
    let mut ref_codes = vec![WHITE;width];
    ref_codes.push(TERMINATE);
    let mut cur_codes = Vec::with_capacity(width+1);
    for _ in 0..width {cur_codes.push(UNDEF);}
    cur_codes.push(TERMINATE);
    */
    // fast code
    let mut codes = vec![0,0,width];

    loop {
        let mut a0 = 0;
        let mut eol = false;

        // test code
        let pre_codes = codes;
        codes = Vec::with_capacity(width+2);
        codes.push(0);
        codes.push(0);
        let mut codes_ptr = 1;

        if cfg!(debug_assertions) {
            print!("\ny {} {} ",y,is2d);
        }

        while a0 < width && !eol {
            let mode = if is2d { reader.mode()? } else { Mode::Horiz };
            match mode {
                Mode::Horiz => {

                    let (mut len1, mut len2);
                    if codes.len() & 0x1 == 0 {
                        if cfg!(debug_assertions) {
                            print!("Hw ");
                        }
                        len1 = reader.run_len(&white)?;
                        len2 = reader.run_len(&black)?;
                    } else {
                        if cfg!(debug_assertions) {
                            print!("Hb ");
                        }


ep_has_booted
    ldr w8, [x8]
    cbnz w8, 3f
    ldr x8, =_sep_has_panicked
    ldr w8, [x8]
    cbnz w8, 3f

    mov x29, #0x100
    b 1b

3:
    ldp x20, x21, [sp, #0x10]
    ldp x22, x23, [sp, #0x20]
    ldp x24, x25, [sp, #0x30]
    ldp x26, x27, [sp, #0x40]
    ldp x28, x19, [sp, #0x50]
    ldp x29, x30, [sp], 0x60
    ret

4:
    mov x24, x0
    add x25, x25, #1
    cmp x25, #1
    b.hi 11f
    b 5b
11:
    mov x29, #0x4
    ldr x8, =_seprom_has_left_to_sepos // if we got a 0x6a in slowpath, just skip 0x6a delay loop
    ldr w8, [x8]
    cbnz w8, 6f

12:
    bl _sep_fast_check_mailbox // 0x6a delay loop
    cbz x0, 12b
    and x0, x0, #0xff0000
    cmp x0, #0x6a0000
    b.ne 12b

    mov x0, x20
    mov x1, x23
    sub x2, x26, #0x1000
    bl _memcpy_blocks

    sub x2, x26, #0x1000
    add x0, x20, x2
    add x1, x23, x2
    mov x2, #0x1000
    bl _swap_blocks

    mov w0, #0xbabe
    movk w0, #0xcafe, lsl#16

6:
    ldr w1, [x19]
    cmp w1, w0
    b.eq 3b

7:
    sub x29, x29, #1
    cbz x29, 8f
    b 6b

8:
    bl _sep_check_mailbox
    ldr x8, =_sep_has_booted
    ldr w8, [x8]
    cbnz w8, 3b
    ldr x8, =_sep_has_panicked
    ldr w8, [x8]
    cbnz w8, 3b

    mov x29, #0x4
    mov w0, #0xbabe
    movk w0, #0xcafe, lsl#16
    b 6b

9:
    mov x0, x28
    mov x1, x21
    mov x2, #0x40
    bl _memcpy_blocks

    mov x27, xzr
    b 5b

_memcpy_blocks:
    cmp x2, #0x40
    b.lo 1f

    ldp q0, q1, [x1]
    ldp q2, q3, [x1,#0x20]
    stp q0, q1, [x0]
    stp q2, q3, [x0,#0x20]
    add x0, x0, #0x40
    add x1, x1, #0x40
    sub x2, x2, #0x40
    b _memcpy_blocks
1:
    ret
_swap_blocks:
    cmp x2, #0x40
    b.lo 1f

    ldp q0, q1, [x1]
    ldp q2, q3, [x1,#0x20]
    ldp q4, q5, [x0]
    ldp q6, q7, [x0,#0x20]
    stp q4, q5, [x1]
    stp q6, q7, [x1,#0x20]
    stp q0, q1, [x0]
    stp q2, q3, [x0,#0x20]

    add x0, x0, #0x40
    add x1, x1, #0x40
    sub x2, x2, #0x40
    b _swap_blocks
1:
    ret


import pika
from mongoengine import connect
from models import Contact
import json
from db import *

def callback(ch, method, properties, body):
    contact_id = json.loads(body)
    contact = Contact.objects(id=contact_id).first()

    if contact:
        print(f"Sending email to {contact.email}")
        contact.email_send = True
        contact.save()
        print(f"Email sent to {contact.fullname}, email_send set to {contact.email_send}")

connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost', port=5672))
channel = connection.channel()

channel.queue_declare(queue='email_queue')

channel.basic_consume(queue='email_queue',
                      on_message_callback=callback,
                      auto_ack=True)

try:
    print('Waiting for messages. To exit press CTRL+C')
    channel.start_consuming()
except KeyboardInterrupt:
    print('Interrupted')
    try:
        channel.stop_consuming()
    except Exception as e:
        print(f"Error while trying to stop consuming: {e}")
    connection.close()
    print('Consumer stopped.')


eadHeader_m6809956ED26CFF90923FF7E3B4DB6733828FB124_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t TermInfoReader__ctor_mB414A3E5B0CA1C42E830F8221DCC6DAD579055A6_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t TermInfoReader__ctor_mDC681850346716B16DF3EC44DCF1DA6F2A754B7D_MetadataUsageId;
struct Assembly_t_marshaled_com;
struct Assembly_t_marshaled_pinvoke;
struct CultureData_tF43B080FFA6EB278F4F289BCDA3FB74B6C208ECD_marshaled_com;
struct CultureData_tF43B080FFA6EB278F4F289BCDA3FB74B6C208ECD_marshaled_pinvoke;
struct CultureInfo_t345AC6924134F039ED9A11F3E03F8E91B6A3225F_marshaled_com;
struct CultureInfo_t345AC6924134F039ED9A11F3E03F8E91B6A3225F_marshaled_pinvoke;
struct Exception_t_marshaled_com;
struct Exception_t_marshaled_pinvoke;

struct ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821;
struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2;
struct Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83;
struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A;
struct FormatParamU5BU5D_t2F95A3C5AF726E75A42BC28843BAD579B62199B5;
struct StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E;
struct TermInfoStringsU5BU5D_t734604FFAFCF8B18CFD63C5901E11EA6C13F23F2;
struct UInt32U5BU5D_t9AA834AF2940E75BBF8E3F08FF0D20D266DB71CB;

IL2CPP_EXTERN_C_BEGIN
IL2CPP_EXTERN_C_END

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif

// System.Object

// Mono.Xml.SmallXmlParser
struct SmallXmlParser_t4FF09686422594EF19E2CA54CB877F9FCE5AF196  : public RuntimeObject
{
public:
	// Mono.Xml.SmallXmlParser/IContentHandler Mono.Xml.SmallXmlParser::handler
	RuntimeObject* ___handler_0;
	// System.IO.TextReader Mono.Xml.SmallXmlParser::reader
	TextReader_t7DF8314B601D202ECFEDF623093A87BFDAB58D0A * ___reader_1;
	// System.Collections.Stack Mono.Xml.SmallXmlParser::elementNames
	Stack_t37723B68CC4FFD95F0F3D06A5D42D7DEE7569643 * ___elementNames_2;
	// System.Collections.Stack Mono.Xml.SmallXmlParser::xmlSpaces
	Stack_t37723B68CC4FFD95F0F3D06A5D42D7DEE7569643 * ___xmlSpaces_3;
	// System.String Mono.Xml.SmallXmlParser::xmlSpace
	String_t* ___xmlSpace_4;
	// System.Text.StringBuilder Mono.Xml.SmallXmlParser::


app2app3/dirs/dir2/text.txt": app2App2app3DirsDir2TextTxt,
	"app2/app2app3/dirs/text.txt":      app2App2app3DirsTextTxt,
	"app2/app2app3/index.html":         app2App2app3IndexHtml,
	"app2/index.html":                  app2IndexHtml,
	"app2/mydir/text.txt":              app2MydirTextTxt,
	"css/main.css":                     cssMainCss,
	"favicon.ico":                      faviconIco,
	"index.html":                       indexHtml,
	"js/main.js":                       jsMainJs,
}

// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
//
//	data/
//	  foo.txt
//	  img/
//	    a.png
//	    b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
	node := _bintree
	if len(name) != 0 {
		cannonicalName := strings.Replace(name, "\\", "/", -1)
		pathList := strings.Split(cannonicalName, "/")
		for _, p := range pathList {
			node = node.Children[p]
			if node == nil {
				return nil, fmt.Errorf("Asset %s not found", name)
			}
		}
	}
	if node.Func != nil {
		return nil, fmt.Errorf("Asset %s not found", name)
	}
	rv := make([]string, 0, len(node.Children))
	for childName := range node.Children {
		rv = append(rv, childName)
	}
	return rv, nil
}

type bintree struct {
	Func     func() (*asset, error)
	Children map[string]*bintree
}

var _bintree = &bintree{nil, map[string]*bintree{
	"app2": {nil, map[string]*bintree{
		"app2app3": {nil, map[string]*bintree{
			"css": {nil, map[string]*bintree{
				"main.css": {app2App2app3CssMainCss, map[string]*bintree{}},
			}},
			"dirs": {nil, map[string]*bintree{
				"dir1": {nil, map[string]*bintree{
					"text.txt": {app2App2app3DirsDir1TextTxt, map[string]*bintree{}},
				}},
				"dir2": {nil, map[string]*bintree{
					"text.txt": {app2App2app3DirsDir2TextTxt, map[string]*bintree{}},
				}},
				"text.txt": {app2App2app3DirsTextTxt, map[string]*bintree{}},
			}},
			"index.html": {app2App2app3IndexHtml, map[string]*bintree{}},
		}},
		"index.html": {app2IndexHtml, map[string]*bintree{}},
		"mydir": {nil, map[string]*bintree{
			"text.txt": {app2MydirTextTxt, map[string]*bintree{}},
		}},
	}},
	"css": {nil, map[string]*bintree{
		"main.css": {cssMainCss, map[string]*bintree{}},
	}},
	"favicon.ico": {faviconIco, map[string]*bintree{}},
	"index.html":


ED_MEMORY_SLOT to BigInteger.ZERO)),
    MEM32("tacM0x20", Tag.Bit256, MetaMap(TACMeta.RESERVED_MEMORY_SLOT to 0x20.toBigInteger())),
    MEM64("tacM0x40", Tag.Bit256, MetaMap(TACMeta.RESERVED_MEMORY_SLOT to 0x40.toBigInteger())),
    ARGOFFSET("tacArgOffset", Tag.Bit256),
    ARG("tacArg", Tag.Bit256),
    COND("tacCond", Tag.Bool),
    CREATED("tacCreated", Tag.Bit256, MetaMap(TACMeta.IS_CREATED_ADDRESS)),
    NONCE("tacNonce", Tag.WordMap, MetaMap(TACMeta.NO_CALLINDEX), stateVarWithBackup = true),
    STACK_HEIGHT("L", Tag.Bit256),

    /**
     * These are *synthetic* properties that track the number of clones created along any given path
     */
    CONTRACT_COUNT("tacContractsCreated", Tag.WordMap, MetaMap(TACMeta.NO_CALLINDEX), stateVarWithBackup = true),

    /**
        Maps allocated Soroban object handles to `true`.
     */
    SOROBAN_OBJECTS("tacSorobanObjects", Tag.GhostMap(listOf(Tag.Bit256), Tag.Bool), MetaMap(TACMeta.SOROBAN_ENV)),

    /*
        Soroban object types

        SOROBAN_*_SIZES: used to store mapping sizes: objectHandle->size
        SOROBAN_*_MAPPINGS: used to store mappings: {objectHandle,key}->value
     */
    SOROBAN_BYTES_SIZES("tacSoroBytesSizes", Tag.GhostMap(listOf(Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),
    SOROBAN_BYTES_MAPPINGS("tacSoroBytesMappings", Tag.GhostMap(listOf(Tag.Bit256, Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),

    SOROBAN_STRING_SIZES("tacSoroStringSizes", Tag.GhostMap(listOf(Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),
    SOROBAN_STRING_MAPPINGS("tacSoroStringMappings", Tag.GhostMap(listOf(Tag.Bit256, Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),

    SOROBAN_SYMBOL_SIZES("tacSoroSymbolSizes", Tag.GhostMap(listOf(Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),
    SOROBAN_SYMBOL_MAPPINGS("tacSoroSymbolMappings", Tag.GhostMap(listOf(Tag.Bit256, Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),

    SOROBAN_VEC_SIZES("tacSoroVectorSizes", Tag.GhostMap(listOf(Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),
    SOROBAN_VEC_MAPPINGS("tacSoroVectorMappings", Tag.GhostMap(listOf(Tag.Bit256, Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),

    SOROBAN_MAP_SIZES("tacSoroMapSizes", Tag.GhostMap(listOf(Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),
    SOROBAN_MAP_MAPPINGS("tacSoroMapMappings", Tag.GhostMap(listOf(Tag.Bit256, Tag.Bit256), Tag.Bit256), MetaMap(TACMeta.SOROBAN_ENV)),

    /*
        Additional maps for Soroban "map" objects; see [wasm.host.soroban.types.MapType]
     */
    SOR


          {
                    // Accept file
                }

                var fileInfo = new FileInfo(file);
                catalogs.Add(new DirectoryCatalog(fileInfo.DirectoryName, fileInfo.Name));
            }

            return catalogs;
        }
    }
}


4 15 18.17 15 14.59 11.41 16 10 22 16 16 22 14.59 20.59z"}),(0,Wa.jsx)("path",{id:"_Transparent_Rectangle_",d:"M0 0H32V32H0z",className:"cls-1","data-name":"<Transparent Rectangle>"})]})}function lm(){return(0,Wa.jsxs)("svg",{className:"icon",width:"32px",height:"32px",xmlns:"http://www.w3.org/2000/svg",id:"icon",fill:"#000",viewBox:"0 0 32 32",children:[(0,Wa.jsx)("defs",{children:(0,Wa.jsx)("style",{children:".cls-1 {    fill: none; }"})}),(0,Wa.jsx)("path",{d:"M6 30h12a2.002 2.002 0 002-2v-3h-2v3H6V4h12v3h2V4a2.002 2.002 0 00-2-2H6a2.002 2.002 0 00-2 2v24a2.002 2.002 0 002 2z"}),(0,Wa.jsx)("path",{d:"M20.586 20.586L24.172 17 10 17 10 15 24.172 15 20.586 11.414 22 10 28 16 22 22 20.586 20.586z"}),(0,Wa.jsx)("path",{id:"_Transparent_Rectangle_",d:"M0 0H32V32H0z",className:"cls-1","data-name":"<Transparent Rectangle>"})]})}zf=Jf,Ei(Jf,"cloneIntegration",(e=>{const t=JSON.parse(JSON.stringify(e)),n=new wd({...t}),i=[];for(const o of n.spec.flows||[])if("Beans"!==o.dslName)i.push(Wf.createStep(o.dslName,o));else{const e=new Ed;e.beans.push(...o.beans.map((e=>zf.cloneBean(e)))),i.push(e)}for(const o of(null===(r=n.spec.flows)||void 0===r?void 0:r.filter((e=>"RouteConfiguration"===e.dslName)))||[]){var r;const e=zf.cloneRouteConfiguration(o);i.push(e)}return n.spec.flows=i,n})),Ei(Jf,"cloneStep",(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=JSON.parse(JSON.stringify(e,((e,n)=>t&&"uuid"===e?dd():n)));return Wf.createStep(e.dslName,n,!0)})),Ei(Jf,"cloneBean",(e=>{const t=JSON.parse(JSON.stringify(e)),n=new _p(t);return n.uuid=e.uuid,n})),Ei(Jf,"cloneRouteConfiguration",(e=>{const t=JSON.parse(JSON.stringify(e)),n=new Lu(t);return n.uuid=e.uuid,n})),Ei(Jf,"capitalizeName",(e=>0===e.length?e:e[0].toUpperCase()+e.substring(1))),Ei(Jf,"camelizeName",((e,t,n)=>{if(0===e.length)return e;const i=e.split(t).map((e=>zf.capitalizeName(e))).join("");return n?i[0].toLowerCase()+i.substring(1):i})),Ei(Jf,"camelizeBody",((e,t,n)=>{if(t&&Object.keys(t).length>0){const i=Object.keys(t)[0],r=zf.camelizeName(i,"-",!0);return n||r!==e?t:{[r]:t[i]}}return{}})),Ei(Jf,"camelizeObject",(e=>{if(Array.isArray(e))return e.map((e=>"object"===typeof e?zf.camelizeObject(e):e));if("object"===typeof e){const t={};for(const n in e)if(null!==e&&void 0!==e&&e.hasOwnPrope


mageList; // image lis for tree control

  // dialogs
  CDlgClient m_dlgParent;
  CDlgClient m_dlgAnimSet;
  CDlgClient m_dlgColision;
  CDlgClient m_dlgAllFrames;
  CDlgClient m_dlgLod;
  CDlgClient m_dlgBone;
  CDlgClient m_dlgTexture;
  CDlgClient m_dlgListOpt;
  CDlgClient m_dlgShader;
  CDialog    *pdlgCurrent;

  CTexView   m_tvTexView;

  CStaticStackArray<class Control> dlg_aControls;

  // controls in parent dialog
  CTextBox m_tbOffPosX;
  CTextBox m_tbOffPosY;
  CTextBox m_tbOffPosZ;
  CTextBox m_tbOffRotH;
  CTextBox m_tbOffRotP;
  CTextBox m_tbOffRotB;
  CTextBox m_tbMiName;
  // controls in animset dialog
  CTextBox m_tbTreshold;
  CTextBox m_tbAnimSpeed;
  CTextBox m_tbWalkSpeed;
  CTextBox m_tbWalkLoopSec;
  // controls in colision dialog
  CTextBox m_tbColName;
  CTextBox m_tbColWidth;
  CTextBox m_tbColHeight;
  CTextBox m_tbColLength;
  CTextBox m_tbColPosX;
  CTextBox m_tbColPosY;
  CTextBox m_tbColPosZ;
  // controls in all frames bbox
  CTextBox m_tbAFBBWidth;
  CTextBox m_tbAFBBHeight;
  CTextBox m_tbAFBBLength;
  CTextBox m_tbAFBBPosX;
  CTextBox m_tbAFBBPosY;
  CTextBox m_tbAFBBPosZ;

  // controls in lod dialog
  CTextBox m_tbDistance;
  // controls in texture dialog
  CTextBox m_tbTextureName;

//  CSize m_Size;
	// Generated message map functions

protected:
	//{{AFX_MSG(CDlgBarTreeView)
	afx_msg void OnSelchangeModeSelectTab(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};

#endif // !defined(AFX_DLGBARTREEVIEW_H__97A19AEB_ACE0_11D5_8AB4_00C0262D9BFE__INCLUDED_)


          .header("Content-Type", "application/x-www-form-urlencoded")
            .post(form.build())
            .build()
        val response = HttpUtils.client.newCall(request).execute()

        assert(response.code == 200) { "Http code ${response.code}" }

        val body = JsonParser.parseReader(response.body!!.charStream()).asJsonObject
        if (!body.has("access_token") || !body.has("refresh_token")) {
            if (body.has("error")) {
                throw RuntimeException("error occur whilst refreshing token: " + body.get("error").asString)
            } else {
                throw RuntimeException("error occur whilst refreshing token")
            }
        }
        return body.get("access_token").asString to body.get("refresh_token").asString
    }

    companion object {

        val DEVICE_ANDROID = XboxDeviceInfo("0000000048183522", "Android", false, xalRedirect = "ms-xal-0000000048183522://auth")
        val DEVICE_IOS = XboxDeviceInfo("000000004c17c01a", "iOS", false, xalRedirect = "ms-xal-000000004c17c01a://auth")
        val DEVICE_NINTENDO = XboxDeviceInfo("00000000441cc96b", "Nintendo", true)
        val devices = arrayOf(DEVICE_ANDROID, DEVICE_IOS, DEVICE_NINTENDO).associateBy { it.deviceType }
    }
}

interface IXboxIdentityTokenCache {

    /**
     * identifier for the account which used to cache
     */
    val identifier: String

    fun cache(device: XboxDeviceInfo, token: XboxIdentityToken)

    fun checkCache(device: XboxDeviceInfo): XboxIdentityToken?

}

@Suppress("MemberVisibilityCanBePrivate")
class XboxIdentityTokenCacheFileSystem(val cacheFile: File, override val identifier: String) : IXboxIdentityTokenCache {

    override fun cache(device: XboxDeviceInfo, token: XboxIdentityToken) {
        val json = if (!cacheFile.exists()) {
            null
        } else {
            try {
                JsonParser.parseReader(cacheFile.reader(Charsets.UTF_8)).asJsonObject
            } catch (t: Throwable) {
                println("Load config: $t")
                null
            }
        } ?: JsonObject()

        val identifierJson = if (json.has(identifier)) {
            val identifierElement = json.get(identifier)
            if (identifierElement.isJsonObject) {
                identifierElement.asJsonObject
            } else {
                JsonObject()
            }
        } else {
            JsonObject()
        }

        identifierJson.add(device.deviceType, JsonObject().apply {
            addProperty("token", token.token)
            addProperty("expires", token.notAfter)
        })

        json.add(identifier, identifierJson)

        removeExpired(json)
        cacheFile.writeText(gson.toJson(json), Charsets.UTF_8)
    }

    override fun checkCache(device: XboxDeviceInfo): XboxIdentityToken? {
        if (!cacheFile.exists()) {
            return null
        }

        val json: JsonObject = try {
            JsonParser.parseReader(cacheFile.reader(Charsets.UTF_8)).asJsonObject
        } catch (t: Throwable) {
            println("Load config: $t")
            null
        } ?: return null

        try {
            val identifierJson = if (json.has(identifier)) {
                json.get(identifier).asJsonObject
            } else {
                return null
            }

            val deviceJson = if (identifierJson.has(device.deviceType)) {
                identifierJson.get(device.deviceType).asJsonObject
            } else {
                return null
            }

            if (deviceJson.get("expires").as


 // console.log( res.headers.get('X-Powered-By') );

          console.log(res);
        },

        (err: HttpErrorResponse) => {
          console.log(err.error);
          console.log(err.name);
          console.log(err.message);
          console.log(err.status);
        }

      );

  }

  //get table data from json
  getTableData(){
    return this.http.get(`http://localhost:4200/assets/tableData.json`);
  }

  // get pics

  getThumbnails(): Observable<any>{
    return this.http.get(`${this.GET_USER_THUMBNAILS}`);
  }

  //snack bar method; duration in milliseconds,data is message to display, panelClass is css class from ts
  openSnackBar(message: string, panelClass: string) {
    this.snackBar.openFromComponent(SnackbarComponent, {
      data: message,
      panelClass: panelClass,
      duration: 4000
    });
  }

}
import * as THREE from 'three';

let randomInitParticlesShader = {
    vertexShader: `
        varying vec2 vUv;
        void main() {
            vUv = uv;
            gl_Position = vec4(position, 1.0);
        }`,
    fragmentShader: `
        uniform float seed;
        uniform float minX;
        uniform float maxX;
        uniform float minY;
        uniform float maxY;
        uniform float minVX;
        uniform float maxVX;
        uniform float minVY;
        uniform float maxVY;
        varying vec2 vUv;

        float random(const vec2 co) {
            float t = dot(vec2(12.9898, 78.233), co);
            return fract(sin(t) * (123.567 + t));
        }

        void main() {
            vec4 particle;
            particle.x = mix(minX, maxX, random(vUv + seed + 5.0));
            particle.y = mix(minY, maxY, random(3.0*vUv - seed + 6.0));
            particle.z = mix(minVX, maxVX, random(3.0*vUv + 2.0*seed + 7.0));
            particle.w = mix(minVY, maxVY, random(3.0*vUv - 2.0*seed + 8.0));
            gl_FragColor = particle;
        }`
};

export type RandomInitParticlesMaterialUniforms = {
    seed: { value: number },
    minX: { value: number },
    maxX: { value: number },
    minY: { value: number },
    maxY: { value: number },
    minVX: { value: number },
    maxVX: { value: number },
    minVY: { value: number },
    maxVY: { value: number },
}

export class RandomInitParticlesMaterial extends THREE.ShaderMaterial {
    public uniforms: RandomInitParticlesMaterialUniforms;
    constructor(uniforms: Partial<RandomInitParticlesMaterialUniforms>) {
        super({
            ...randomInitParticlesShader,
            blending: THREE.NoBlending
        });
        this.uniforms = {
            seed: { value: 0 },
            minX: { value: 0 },
            maxX: { value: 1 },
            minY: { value: 0 },
            maxY: { value: 1 },
            minVX: { value: -0.1 },
            maxVX: { value: 0.1 },
            minVY: { value: -0.1 },
            maxVY: { value: 0.1 },
            ...uniforms
        };
    }
}import {Injectable} from 'angular2/core'
import {Player} from '../model/player'
import {challenges, Challenge} from '../model/challenges'

export class GameService {

  public players:Array<Player> = []
  private _challenge:Challenge
  public currentPlayer: Player;

  constructor(){}

  addPlayer(player:Player){


rrent_health)
        else
            current_limit = current_health
            GlobalsSetValue("ew_meat_health_limit", tostring(current_limit))
        end
    end
end

function module.on_world_update()
    if GameGetFrameNum() % 60 ~= 55 then
        return
    end

    local is_boss_dead = GlobalsGetValue("BOSS_MEAT_DEAD", "0") == "1"
    local anyone_in_meat = #(EntityGetWithTag("ew_no_heal_in_meat_biome") or {}) > 0
    anyone_in_meat = anyone_in_meat and not is_boss_dead

    if anyone_in_meat ~= is_in_meat_current then
        if anyone_in_meat then
            GamePrint("The air feels heavier...")
        else
            GamePrint("The air feels normal")
        end
    end
    is_in_meat_current = anyone_in_meat
end

return module


stomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing ExampleServer resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static ExampleServer Get(string name, Input<string> id, CustomResourceOptions? options = null)
        {
            return new ExampleServer(name, id, options);
        }
    }

    public sealed class ExampleServerArgs : global::Pulumi.ResourceArgs
    {
        [Input("properties")]
        public InputUnion<Inputs.ServerPropertiesForReplicaArgs, Inputs.ServerPropertiesForRestoreArgs>? Properties { get; set; }

        public ExampleServerArgs()
        {
        }
        public static new ExampleServerArgs Empty => new ExampleServerArgs();
    }
}


/*
 * Copyright 2009-2017 Alibaba Cloud All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ALIBABACLOUD_DOMAIN_MODEL_CHANGERESOURCEGROUPRESULT_H_
#define ALIBABACLOUD_DOMAIN_MODEL_CHANGERESOURCEGROUPRESULT_H_

#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/domain/DomainExport.h>

namespace AlibabaCloud
{
	namespace Domain
	{
		namespace Model
		{
			class ALIBABACLOUD_DOMAIN_EXPORT ChangeResourceGroupResult : public ServiceResult
			{
			public:

				ChangeResourceGroupResult();
				explicit ChangeResourceGroupResult(const std::string &payload);
				~ChangeResourceGroupResult();
				std::string getResult()const;

			protected:
				void parse(const std::string &payload);
			private:
				std::string result_;

			};
		}
	}
}
#endif // !ALIBABACLOUD_DOMAIN_MODEL_CHANGERESOURCEGROUPRESULT_H_


拉丁小寫字母 i 帶尖音符號",icirc:"拉丁小寫字母 i 帶揚抑符",iuml:"拉丁小寫字母 i 帶分音符號",eth:"拉丁小寫字母 eth",ntilde:"拉丁小寫字母 n 帶波浪號",ograve:"拉丁小寫字母 o 帶抑音符號",oacute:"拉丁小寫字母 o 帶尖音符號",ocirc:"拉丁小寫字母 o 帶揚抑符",otilde:"拉丁小寫字母 o 帶波浪號",ouml:"拉丁小寫字母 o 帶分音符號",divide:"除號",oslash:"拉丁小寫字母 o 帶粗線符號",ugrave:"拉丁小寫字母 u 帶抑音符號",uacute:"拉丁小寫字母 u 帶尖音符號",ucirc:"拉丁小寫字母 u 帶揚抑符",uuml:"拉丁小寫字母 u 帶分音符號",yacute:"拉丁小寫字母 y 帶尖音符號",thorn:"拉丁小寫字母 thorn",yuml:"拉丁小寫字母 y 帶分音符號",OElig:"拉丁大寫字母 OE",oelig:"拉丁小寫字母 oe",372:"拉丁大寫字母 W 帶揚抑符",374:"拉丁大寫字母 Y 帶揚抑符",373:"拉丁小寫字母 w 帶揚抑符",
375:"拉丁小寫字母 y 帶揚抑符",sbquo:"低 9 單引號",8219:"高 9 反轉單引號",bdquo:"低 9 雙引號",hellip:"水平刪節號",trade:"商標符號",9658:"黑色向右指箭號",bull:"項目符號",rarr:"向右箭號",rArr:"向右雙箭號",hArr:"左右雙箭號",diams:"黑鑽套裝",asymp:"約等於"});/*
 Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("specialchar","ku",{euro:"نیشانەی یۆرۆ",lsquo:"نیشانەی فاریزەی سەرووژێری تاکی چەپ",rsquo:"نیشانەی فاریزەی سەرووژێری تاکی ڕاست",ldquo:"نیشانەی فاریزەی سەرووژێری دووهێندەی چه‌پ",rdquo:"نیشانەی فاریزەی سەرووژێری دووهێندەی ڕاست",ndash:"تەقەڵی کورت",mdash:"تەقەڵی درێژ",iexcl:"نیشانەی هەڵەوگێڕی سەرسوڕهێنەر",cent:"نیشانەی سەنت",pound:"نیشانەی پاوەن


nst MASK: bool = true;
        const OFFSET: u8 = 2;
        self.w.bits &= !((MASK as u8) << OFFSET);
        self.w.bits |= ((value & MASK) as u8) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `P2REN3`"]
pub enum P2REN3W {}
impl P2REN3W {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> bool {
        match *self {}
    }
}
#[doc = r" Proxy"]
pub struct _P2REN3W<'a> {
    w: &'a mut W,
}
impl<'a> _P2REN3W<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: P2REN3W) -> &'a mut W {
        {
            self.bit(variant._bits())
        }
    }
    #[doc = r" Sets the field bit"]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r" Clears the field bit"]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bit(self, value: bool) -> &'a mut W {
        const MASK: bool = true;
        const OFFSET: u8 = 3;
        self.w.bits &= !((MASK as u8) << OFFSET);
        self.w.bits |= ((value & MASK) as u8) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `P2REN4`"]
pub enum P2REN4W {}
impl P2REN4W {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> bool {
        match *self {}
    }
}
#[doc = r" Proxy"]
pub struct _P2REN4W<'a> {
    w: &'a mut W,
}
impl<'a> _P2REN4W<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: P2REN4W) -> &'a mut W {
        {
            self.bit(variant._bits())
        }
    }
    #[doc = r" Sets the field bit"]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r" Clears the field bit"]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bit(self, value: bool) -> &'a mut W {
        const MASK: bool = true;
        const OFFSET: u8 = 4;
        self.w.bits &= !((MASK as u8) << OFFSET);
        self.w.bits |= ((value & MASK) as u8) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `P2REN5`"]
pub enum P2REN5W {}
impl P2REN5W {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> bool {
        match *self {}
    }
}
#[doc = r" Proxy"]
pub struct _P2REN5W<'a> {
    w: &'a mut W,
}
impl<'a> _P


commerce."

This was the period right after the 1994 Republican landslide, so there was little appetite for new government regulation. But that decision led directly to our current government approach toward the Internet and a reluctance even to allow states to collect sales tax on online transactions.

Fourteen years after Clintons policy decision, we continue to debate the proper line between individual freedom, technology innovation, and government action. We should take action to protect consumer privacy by demanding better transparency and disclosure, but not the creation of a new government agency.

		We are no longer accepting comments on this post

		Should the federal government play a larger role in Internet privacy?

Comments Closed

No Comments

RELATED CONTENT

Privacy and Security in Cloud Computing

Allan A. Friedman and Darrell M. West
The Brookings Institution
October 26, 2010

How Mobile Technology is Reshaping the Global Landscape

Technology Lessons from City Government in Seoul, South Korea

Darrell M. West
The Huffington Post
September 08, 2010

More Related Content »

<a id="ctrlContent_columns_0_ctrlMainColumn_maincolumn_7_hlSavePortfolioLink" title="Save to My Portfolio" href="/profile/Portfolio/PortfolioHelper.aspx?ProfileItemId=27b261be-237b-4c


using Dopamine.Core.Enums;
using Dopamine.Services.Playback;
using Prism.Mvvm;

namespace Dopamine.ViewModels.Common.Base
{
    public abstract class NowPlayingViewModelBase : BindableBase
    {
        private IPlaybackService playbackService;
        private NowPlayingPage selectedNowPlayingPage;

        public NowPlayingPage SelectedNowPlayingPage
        {
            get { return selectedNowPlayingPage; }
            set { SetProperty<NowPlayingPage>(ref this.selectedNowPlayingPage, value); }
        }

        public No


要讲的内容，本文系统介绍了@Column属性注解

参考文章：http://docs.oracle.com/javaee/5/api/javax/persistence/Column.html

上一个：开宠物诊所需要哪些手续（想开宠物诊所需要什么）

下一个：领养宠物后要办什么手续呢（领养宠物需要哪些手续）

热门文章

3月24日→20.1M/S|2025年最新免费节点Shadowrocket/Clash/SSR/V2ray订阅链接地址

3月31日→22.4M/S|2025年最新免费节点V2ray/SSR/Clash/Shadowrocket订阅链接地址

3月20日→19.5M/S|2025年最新免费节点Shadowrocket/Clash/SSR/V2ray订阅链接地址

【Electron】在 WSL2 中 打包 electron Linux 版本应用及运行 – E不小心 _在线工具

<a href="/free-nodes/2025-4-1-free-subscribe-node.htm" title="4月1日→21M/S|2025年最新免费节点SSR/V2ray/Shadowrocket/Clash订阅链接地�


turn n;
  }

  _buildObjectRule(properties, required, name, additionalProperties) {
    const propOrder = this._propOrder;
    // sort by position in prop_order (if specified) then by original order
    const sortedProps = properties.map(([k]) => k).sort((a, b) => {
      const orderA = propOrder[a] || Infinity;
      const orderB = propOrder[b] || Infinity;
      return orderA - orderB || properties.findIndex(([k]) => k === a) - properties.findIndex(([k]) => k === b);
    });

    const propKvRuleNames = {};
    for (const [propName, propSchema] of properties) {
      const propRuleName = this.visit(propSchema, `${name ?? ''}${name ? '-' : ''}${propName}`);
      propKvRuleNames[propName] = this._addRule(
        `${name ?? ''}${name ? '-' : ''}${propName}-kv`,
        `${this._formatLiteral(JSON.stringify(propName))} space ":" space ${propRuleName}`
      );
    }
    const requiredProps = sortedProps.filter(k => required.has(k));
    const optionalProps = sortedProps.filter(k => !required.has(k));

    if (additionalProperties) {
      const subName = `${name ?? ''}${name ? '-' : ''}additional`;
      const valueRule =
        additionalProperties != null && typeof additionalProperties === 'object' ? this.visit(additionalProperties, `${subName}-value`)
        : this._addPrimitive('value', PRIMITIVE_RULES['value']);

      const key_rule =
        sortedProps.length === 0 ? this._addPrimitive('string', PRIMITIVE_RULES['string'])
        : this._addRule(`${subName}-k`, this._notStrings(sortedProps));

      propKvRuleNames['*'] = this._addRule(
        `${subName}-kv`,
        `${key_rule} ":" space ${valueRule}`);
      optionalProps.push('*');
    }

    let rule = '"{" space ';
    rule += requiredProps.map(k => propKvRuleNames[k]).join(' "," space ');

    if (optionalProps.length > 0) {
      rule += ' (';
      if (requiredProps.length > 0) {
        rule += ' "," space ( ';
      }

      const getRecursiveRefs = (ks, firstIsOptional) => {
        const [k, ...rest] = ks;
        const kvRuleName = propKvRuleNames[k];
        let res;
        const commaRef = `( "," space ${kvRuleName} )`;
        if (firstIsOptional) {
          res = commaRef + (k === '*' ? '*' : '?');
        } else {
          res = kvRuleName + (k === '*' ? ' ' + commaRef + '*' : '');
        }
        if (rest.length > 0) {
          res += ' ' + this._addRule(
            `${name ?? ''}${name ? '-' : ''}${k}-rest`,
            getRecursiveRefs(rest, true)
          );
        }
        return res;
      };

      rule += optionalProps.map((_, i) => getRecursiveRefs(optionalProps.slice(i), false)).join(' | ');
      if (requiredProps.length > 0) {
        rule += ' )';
      }
      rule += ' )?';
    }

    rule += ' "}" space';

    return rule;
  }

  formatGrammar() {
    let grammar = '';
    for (const [name, rule] of Object.entries(this._rules).sort(([a], [b]) => a.localeCompare(b))) {
      grammar += `${name} ::= ${rule}\n`;
    }
    return grammar;
  }
}

// Helper function to group elements by a key function
function* groupBy(iterable, keyFn) {
  let lastKey = null;
  let group = [];
  for (const element of iterable) {
    const key =


Scalding Shrooms.|
C Into the Totem|QID|26072|US|M|45.7,30.5;38.4,39.1;46.1,35.7;40.7,36.4;52.8,32.1|Z|Abyssal Depths|CN|U|56801|N|Kill 5 Corrupting Faceless and use the Totem.|
C Clearing the Defiled|QID|26071|US|M|42.4,33.3|Z|Abyssal Depths|N|Kill any wildlife you find.|
T The Wavespeaker|QID|26057|N|To Wavespeaker Valoren.|Z|Abyssal Depths|M|52.58,27.81|
A Free Wil'hai|QID|26065|N|From Wavespeaker Valoren.|Z|Abyssal Depths|M|52.58,27.81|
C Free Wil'hai|QID|26065|M|54.5,27.81;56.38,29.8;57.23,25.35|U|57409|Z|Abyssal Depths|CN|N|Swim to one of the Tentacle Horrors and use Valoren's Shrinkage Totem near it. It will shrink into a Shrunken Tentacle, which you need to kill. Do this for all three tentacles to complete the quest.|
T Free Wil'hai|QID|26065|N|To Wavespeaker Valoren.|Z|Abyssal Depths|M|52.58,27.81|
T Into the Totem|QID|26072|N|To Erunak Stonespeaker.|Z|Abyssal Depths|M|42.73,37.82|
T Scalding Shrooms|QID|26096|N|To Wavespeaker Tulra.|Z|Abyssal Depths|M|42.73,37.82|
T Clearing the Defiled|QID|26071|N|To Legionnaire Nazgrim.|Z|Abyssal Depths|M|42.73,37.82|
A ... It Will Come|QID|26111|PRE|26072&26096|RANK|1|M|42.7,37.8|Z|Abyssal Depths|N|From Erunak Stonespeaker.|
C ... It Will Come|QID|26111|L|56822|M|46.92, 27.89|Z|Abyssal Depths|N|Swim to the Stonespeaker's Luring Totem. Use it to summon Ick'thys the Unfathomable. Kill him and loot his brain.|
T ... It Will Come|QID|26111|M|42.7,37.8|Z|Abyssal Depths|N|To Erunak Stonespeaker.|
A Unplug L'ghorek|QID|26130|PRE|26111|RANK|1|M|42.7,37.8|Z|Abyssal Depths|N|From Erunak Stonespeaker.|
A Fiends from the Netherworld|QID|26133|RANK|1|M|42.7,37.9|Z|Abyssal Depths|N|From Legionnaire Nazgrim.|
C Fiends from the Netherworld|QID|26133|M|33.3,49.4|S|Z|Abyssal Depths|N|Swim down, directly below L'ghorek's head, to find the entrance to The Undershell. While in here, kill any Nether Fiends you see until you complete Fiends from the Netherworld.|
K Ur'Goz|QID|26130|M|36.4,46.8|Z|Abyssal Depths|QO|1|N|Kill Ur'Goz.|; Ur'Goz slain: 1/1
K Sku'Bu|QID|26130|M|34.4,54.2|Z|Abyssal Depths|QO|2|N|Kill Sku'Bu.|; Sku'Bu slain: 1/1
C Unplug L'ghorek|QID|26130|M|29.7,52.7|Z|Abyssal Depths|QO|3|N|Kill Neph'Lahim.|; Neph'Lahim slain: 1/1
C Fiends from the Netherworld|Q


796, nil, nil) -- 9450 Hammer of the Titans
lib:AddRecipe(164, 12834, 16990, 12790, nil, nil) -- 9451 Arcanite Champion
lib:AddRecipe(164, 12835, 16991, 12798, nil, nil) -- 9452 Annihilator
lib:AddRecipe(164, 12836, 16992, 12797, nil, nil) -- 9453 Frostguard
lib:AddRecipe(164, 12837, 16993, 12794, nil, nil) -- 9454 Masterwork Stormhammer
lib:AddRecipe(164, 12838, 16994, 12784, nil, nil) -- 9455 Arcanite Reaper
lib:AddRecipe(164, 12839, 16995, 12783, nil, nil) -- 9456 Heartseeker
lib:AddRecipe(164, 12703, 16661, 12632, nil, nil) -- 9579 Storm Gauntlets
lib:AddRecipe(333, nil, 17181, 12810, nil, nil) -- 9597 Enchanted Leather
lib:AddRecipe(333, nil, 17180, 12655, nil, nil) -- 9598 Enchanted Thorium
lib:AddRecipe(171, 12958, 17187, 12360, nil, nil) -- 9840 Transmute: Arcanite
lib:AddRecipe(171, nil, 17551, 13423, nil, nil) -- 9936 Stonescale Oil
lib:AddRecipe(171, 13476, 17552, 13442, 17528, nil) -- 9937 Mighty Rage Potion
lib:AddRecipe(171, 13477, 17553, 13443, 17530, nil) -- 9938 Superior Mana Potion
lib:AddRecipe(171, 13478, 17554, 13445, 11348, nil) -- 9939 Elixir of Superior Defense
lib:AddRecipe(171, 13479, 17555, 13447, 17535, nil) -- 9940 Elixir of the Sages
lib:AddRecipe(171, 13480, 17556, 13446, 17534, nil) -- 9941 Major Healing Potion
lib:AddRecipe(171, 13481, 17557, 13453, 17537, nil) -- 9942 Elixir of Brute Force
lib:AddRecipe(171, 13482, 17559, 7078, nil, nil) -- 9943 Transmute: Air to Fire
lib:AddRecipe(171, 13484, 17561, 7080, nil, nil) -- 9944 Transmute: Earth to Water
lib:AddRecipe(171, 13489, 17566, 12803, nil, nil) -- 9945 Transmute: Earth to Life
lib:AddRecipe(171, 13483, 17560, 7076, nil, nil) -- 9946 Transmute: Fire to Earth
lib:AddRecipe(171, 13486, 17563, 7080, nil, nil) -- 9947 Transmute: Undeath to Water
lib:AddRecipe(171, 13485, 17562, 7082, nil, nil) -- 9948 Transmute: Water to Air
lib:AddRecipe(171, 13487, 17564, 12808, nil, nil) -- 9949 Transmute: Water to Undeath
lib:AddRecipe(171, 13488, 17565, 7076, nil, nil) -- 9950 Transmute: Life to Earth
lib:AddRecipe(171, 13490, 17570, 13455, 17540, nil) -- 9951 Greater Stoneshield Potion
lib:AddRecipe(171, 13491, 17571, 13452, 17538, nil) -- 9952 Elixir of the Mongoose
lib:AddRecipe(171, 13492, 17572, 13462, 17550, nil) -- 9953 Purification Potion
lib:AddRecipe(171, 13493, 17573, 13454, 17539, nil) -- 9954 Greater Arcane Elixir
lib:AddRecipe(171, 13494, 17574, 13457, 17543, nil) -- 9955 Greater Fire Protection Potion
lib:AddRecipe(171, 13495, 17575, 13456, 17544, nil) -- 9956 Greater Frost Protection Potion
lib:AddRecipe(171, 13496, 17576, 13458, 17546, nil) -- 9957 Greater Nature Prote


 1.5 + 120/10000 × 15 + 30/10000 × 1100 = 4.98$
- 虚拟化$CPI = 1.5 + 120/10000 × (15 + 175) + 30/10000 ×(1100 + 175) = 7.60$
- 非虚拟化$I/O$为一半的$CPI = 1.5 + 120/10000 × 15 + 15/10000 × 1100 = 3.33$
- 虚拟$I/O$为一半的$CPI = 1.5 + 120/10000 × (15 + 175) + 15/10000 ×(1100 + 175) = 5.69$

# 5.29

为了支持多虚拟机, 需要对两级存储器进行虚拟化。每个虚拟机依然控制从虚拟地址 ($VA$)到物理地址 ($PA$) 之间的映射, 同时管理程序将每个虚拟机的物理地址 ($PA$) 映射到实际的机器地址 ($MA$)。为了加速映射过程, 一种被称为 “影子分页” ($shadow ~paging$) 的软件方法在管理程序中复制了每个虚拟机的页表, 并且侦听从虚拟地址到物理地址的映射变化, 以保证两个副本的一致性。为了消除影子页表 ($shadow~ page~ table$) 的复杂性, 一种被称为嵌套页表 ($Nested ~Page~ Table, NPT$) 的硬件方法可以支持两种页表  ($V A\to P A$  和 $PA  \to M A  $), 并且完全依靠硬件来查找这些表。
考虑下面的操作序列：

- 创建进程；
- $TLB$缺失；
- 缺页；
- 上下文切换。

## 5.29.1

### 题目

对于给定的操作序列, 影子页表和嵌套页表分别会产生什么影响?

### 解答

影子页表:

- $VM$创建页表，$hypervisor$更新影子表;
- 管理程序拦截页面错误，创建新的映射，并使$TLB$中的旧映射无效;
- $VM$通知$hypervisor$使进程的$TLB$项无效。

嵌套页表:

- $VM$创建新的页表，$hypervisor$在$PA$表中添加新的映射到$MA$表。
- 硬件遍历两个页表，将$VA$转换为$MA$;
- $VM$和$hypervisor$更新他们的页表，$hypervisor$使陈旧的$TLB$条目无效;
- 与影子页表相同。

## 5.29.2

### 题目

假设一个基于 $x86$ 架构的$4$级页表同时存放在客户页表（$guest~ page~ table$）和嵌套页表中, 那么在处理本地页表（$native~ page~ table$）


# -*- coding: utf-8 -*- #
# Copyright 2017 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The gcloud app domain-mappings group."""

from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals

from googlecloudsdk.calliope import base

@base.ReleaseTracks(base.ReleaseTrack.GA, base.ReleaseTrack.BETA,
                    base.ReleaseTrack.ALPHA)
class DomainMappings(base.Group):
  """View and manage your App Engine domain mappings.

  This set of commands can be used to view and manage your app's
  domain mappings.

  App Engine Domain Mappings allow an application to be served via one or many
  custom domains, such as `example.com`, instead of the default
  `https://<PROJECT-ID>.<REGION-ID>.r.appspot.com` address. You can use a
  custom domain with or without SSL.

  Use the AUTOMATIC management type to automatically provision an SSL
  certificate for your domain. Use the MANUAL management type to provide
  your own certificate or omit SSL.
  """
  category = base.APP_ENGINE_CATEGORY
  detailed_help = {
      'DESCRIPTION':
          '{description}',
      'EXAMPLES':
          """\
          To list your App Engine domains, run:

            $ {command} list

          To create a domain with an automatically managed certificate, run:

            $ {command} create 'example.com' --certificate-management=AUTOMATIC

          To create a domain with a manual certificate, run:

            $ {command} create 'example.com' --certificate-management=manual --certificate-id=1234
      """,
  }


}

/* center */
img[alt~='pos-c'] {
    display: block !important;
    margin: auto;
}

/* avatar */
img[alt~='avatar'] {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* portrait */
img[alt~='portrait'] {
    width: 280px;
    height: 420px;
    object-fit: cover;
}

.is-phone img[alt~='portrait'] {
    width: 180px;
    height: 270px;
    object-fit: cover;
}

/* round */
img[alt~='rund'],
img[alt~='round'] {
    border-radius: 50%;
}

img[alt~='pos-l'],
img[alt~='pos-r'],
img[alt~='pos-c'],
img[alt~='avatar'],
img[alt~='portrait'],
img[alt~='round'],
img[alt~='rund'] {
    margin-bottom: 6px;
}

/* frame small */
img[alt~='rahmen-s1'],
img[alt~='frame-s1'] {
    border: var(--bwidth-s1) solid var(--frame-color-s1);
    border-radius: 0 !important;
    margin-bottom: 8px;
}

img[alt~='rahmen-s2'],
img[alt~='frame-s2'] {
    border: var(--bwidth-s2) solid var(--frame-color-s2);
    border-radius: 0 !important;
    margin-bottom: 8px;
}

/* frame elegant */
img[alt~="rahmen-a"],
img[alt~="frame-a"] {
    border: var(--bwidth-a) solid;
    border-image: var(--bframe-a);
    border-image-slice: var(--bslice-a);
    margin-bottom: 8px;
}

img[alt~="rahmen-b"],
img[alt~="frame-b"] {
    border: var(--bwidth-b) solid;
    border-image: var(--bframe-b);
    border-image-slice: var(--bslice-b);
    margin-bottom: 8px;
}

.is-phone [alt~="rahmen-a"] img,
.is-phone [alt~="frame-a"] img {
    width: 40vw;
    border: calc(var(--bwidth-a) / 2) solid;
    margin: 0;
}

.is-phone [alt~="rahmen-a"] img,
.is-phone [alt~="frame-b"] img {
    width: 40vw;
    border: calc(var(--bwidth-b) / 2) solid;
    margin: 0;
}

.capt-10 .image-embed[src*="#cap"]::before {
    width: 100px;
}

.capt-15 .image-embed[src*="#cap"]::before {
    width: 150px;
}

.capt-20 .image-embed[src*="#cap"]::before {
    width: 200px;
}

.capt-25 .image-embed[src*="#cap"]::before {
    width: 250px;
}

.capt-30 .image-embed[src*="#cap"]::before {
    width: 300px;
}

.capt-35 .image-embed[src*="#cap"]::before {
    width: 350px;
}

.capt-40 .image-embed[src*="#cap"]::before {
    width: 400px;
}

.image-embed[src*="#cap"]::before {
    content: attr(alt);
    color: var(--text-normal);
    background: var(--rev-fontcol);
    font-size: smaller;
    position: absolute;
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;
    z-index: 2;
    bottom: 4px;
    overflow: visible;
}

.image-embed[src*="#cap"] {
    position: relative;
    display: inline-block;
}

.is-phone .image-embed[src*="#cap"]::before {
    padding: 0 4px;
}

/*----------------------------------------------------------------
  MERMAID
  ----------------------------------


随机时间退避策略，需设置 sleeper、minBackOffPeriod 和 maxBackOffPeriod。该策略在 [minBackOffPeriod, maxBackOffPeriod] 之间取一个随机休眠时间，minBackOffPeriod 默认为 500 毫秒，maxBackOffPeriod 默认为 1500 毫秒。

ExponentialBackOffPolicy：指数退避策略，需设置参数 sleeper、initialInterval、maxInterval 和 multiplier。initialInterval 指定初始休眠时间，默认为 100 毫秒。maxInterval 指定最大休眠时间，默认为 30 秒。multiplier 指定乘数，即下一次休眠时间为当前休眠时间 *multiplier。

ExponentialRandomBackOffPolicy：随机指数退避策略，引入随机乘数，之前说过固定乘数可能会引起很多服务同时重试导致 DDos，使用随机休眠时间来避免这种情况。

重试的设计重点主要如下：

要确定什么样的错误下需要重试；

重试的时间和重试的次数。这种在不同的情况下要有不同的考量。有时候，而对一些不是很重要的问题时，我们应该更快失败而不是重试一段时间若干次。比如一个前端的交互需要用到后端的服务。这种情况下，在面对错误的时候，应该快速失败报错（比如：网络错误请重试）。而面对其它的一些错误，比如流控，那么应该使用指数退避的方式，以避免造成更多的流量。

如果超过重试次数，或是一段时间，那么重试就没有意义了。这个时候，说明这个错误不是一个短暂的错误，那么我们对于新来的请求，就没有必要再进行重试了，这个时候对新的请求直接返回错误就好了。但是，这样一来，如果后端恢复了，我们怎么知道呢，此时需要使用我们的熔断设计了。这个在后面会说。

重试还需要考虑被调用方是否有幂等的设计。如果没有，那么重试是不安全的，可能会导致一个相同的操作被执行多次。

重试的代码比较简单也比较通用，完全可以不用侵入到业务代码中。这里有两个模式。一个是代码级的，像 Java 那样可以使用 Annotation 的方式（在 Spring 中你可以用到这样的注解），如果没有注解也可以包装在底层库或是 SDK 库中不需要让上层业务感知到。另外一种是走 Service Mesh 的方式（关于 Service Mesh 的方式，我会在后面的文章中介绍）。

对于有事务相关的操作。我们可能会希望能重试成功，而不至于走业务补偿那样的复杂的回退流程。对此，我们可能需要一个比较长的时间来做重试，但是我们需要保存请求的上下文，这可能对程序的运行有比较大的开销，因此，有一些设计会先把这样的上下文暂存在本机或是数据库中，然后腾出资源来做别的事，过一会再回来把之前的请求从存储中捞出来重试。

好了，我们来总结一下今天分享的主要内容。首先，我讲了重�


T0, B>;
	void: <T0, A>(_: Kind2<F, T0, A>) => Kind2<F, T0, IUnit>;
}
interface Functor2<F extends URI2> extends IFunctor2<F> {
	URI: F;
}
export {Functor2}

interface IFunctor2C<F extends URI2, T0> {
	fmap: <A, B>(_: (_: A) => B) => (_: Kind2<F, T0, A>) => Kind2<F, T0, B>;
}
interface IExtFunctor2C<F extends URI2, T0> {
	lfmap: <A>(_: A) => <B>(_: Kind2<F, T0, B>) => Kind2<F, T0, A>;
	rfmap: <A>(_: Kind2<F, T0, A>) => <B>(_: B) => Kind2<F, T0, B>;
	ffmap: <A>(_: Kind2<F, T0, A>) => <B>(_: (_: A) => B) => Kind2<F, T0, B>;
	void: <A>(_: Kind2<F, T0, A>) => Kind2<F, T0, IUnit>;
}
interface Functor2C<F extends URI2, T0> extends IFunctor2C<F, T0> {
	URI: F;
}
export {Functor2C}

namespace Functor1 {
	export interface Base<F extends URI1> extends IFunctor1<F> {}

	export interface Ext<F extends URI1> extends IExtFunctor1<F> {}
	export let Ext: <F extends URI1>(_: Functor1<F>) => Ext<F> = (
		<F extends URI1>(Functor: Functor1<F>) => (
			define<Ext<F>>(Ext => ({
				lfmap: _ => Functor.fmap(const_(_)),
				rfmap: _0 => _1 => Ext().lfmap(_1)(_0),
				ffmap: _0 => _1 => Functor.fmap(_1)(_0),
				void: _ => Ext().lfmap(IUnit())(_),
			}))
		)
	);

	export let instantiate: <F extends URI1>() => <TFunctor extends Functor1<F>>(_: TFunctor) => TFunctor & Ext<F> = (
		() => _ => assign(_)(_ => merge(_, Ext(_)))
	);
}

namespace Functor2 {
	export interface Base<F extends URI2> extends IFunctor2<F> {}

	export interface Ext<F extends URI2> extends IExtFunctor2<F> {}
	export let Ext: <F extends URI2>(_: Functor2<F>) => Ext<F> = (
		<F extends URI2>(Functor: Functor2<F>) => (
			define<Ext<F>>(Ext => ({
				lfmap: _0 => _1 => Functor.fmap(const_(_0))(_1),
				rfmap: _0 => _1 => Ext().lfmap(_1)(_0),
				ffmap: _0 => _1 => Functor.fmap(_1)(_0),
				void: _ => Ext().lfmap(IUnit())(_),
			}))
		)
	);

	export let instantiate: <F extends URI2>() => <TFunctor extends Functor2<F>>(_: TFunctor) => TFunctor & Ext<F> = (
		() => _ => assign(_)(_ => merge(_, Ext(_)))
	);
}

namespace Functor2C {
	export interface Base<F extends URI2, T0> extends IFunctor2C<F, T0> {}

	export interface Ext<F extends URI2, T0> extends IExtFunctor2C<F, T0> {}
	export let Ext: <F extends URI2, T0>(_: Functor2C<F, T0


cters',
      },
    },
  ],
})
export default class CreatePlaylistCommand extends Command {
  public async run(message: Message, { name }: Args): Promise<void> {
    if (
      message.attachments.size &&
      !message.attachments.some((a) =>
        /\.(png|jpg|jpeg|gif|png|svg)$/.test(a.url)
      )
    )
      return message.error(
        'The playlist thumbnail can only be an image',
        'Accepted file extensions: `png`, `jpg`, `jpeg`, `gif`, `png`, and `svg`'
      );

    if (name.includes('@'))
      return message.error('Playlist names can\'t contain "@"');

    const playlists = (await Playlist.find({
      collaborators: message.author.id,
    })
      .select('title')
      .lean()) as PlaylistDoc[];

    if (playlists.some(({ title }) => title === name))
      return message.error(
        'You already have a playlist or are collaborating with a playlist by that name'
      );

    // TODO: You can only have x playlists unless you support on patreon
    if (
      playlists.filter((playlist) => playlist.id === message.author.id)
        .length >= 3
    )
      return message.error('You can only have 3 playlists');

    const thumbnail =
      message.attachments.find((a) =>
        /\.(png|jpg|jpeg|gif|png|svg)$/.test(a.url)
      )?.url ?? message.author.displayAvatarURL({ format: 'png', size: 4096 });

    const playlist = await new Playlist({
      id: message.author.id,
      title: name,
      author: message.author.tag,
      collaborators: [message.author.id],
      thumbnail,
      color: await getColor(thumbnail).catch(() => [52, 152, 219]),
    }).save();

    message.embed(`Saved Playlist "${playlist.title}"`, (embed) =>
      embed
        .setColor(playlist.color as [number, number, number])
        .setThumbnail(playlist.thumbnail)
    );
  }
}
import * as fs from "fs";
import * as Path from "path";

const nodeModules = "node_modules";

export const mainPackagepath = (): string | undefined => {
  const cwd = process.cwd();
  let base;

  if (cwd.indexOf(nodeModules) > -1) {
    base = cwd.split(nodeModules)[0];
  } else {
    base = cwd;
  }

  let pkgjson = Path.join(base, "package.json");

  if (fs.existsSync(pkgjson)) {
    return Path.join(base, Path.sep);
  } else {
    let currentPath = Path.dirname(base);
    let parentPath = Path.dirname(currentPath);

    while (currentPath !== parentPath) {
      pkgjson = Path.join(currentPath, "package.json");

      if (fs.existsSync(pkgjson)) {
        return Path.join(currentPath, Path.sep);
      }

      currentPath = parentPath;
      parentPath = Path.dirname(currentPath);
    }

    return undefined;
  }
};

Object.freeze(mainPackagepath);
import {Module, VuexModule, Mutation, Action, getModule} from 'vuex-module-decorators'
import store from '@/store';
import fetchWeather, {getWeatherIcon} from "@/api/openWeather";
import beaufort from "beaufort-scale";
import Vue from "vue";
import {dewPoint, windDirectionAbbreviation} from "@/utils/weather";
import SettingsModule from "@/store/modules/settings";

const MODULE_NAME = 'weather';

if(module.hot && store.hasModule(MODULE_NAME))
    store.unregisterModule(MODULE_NAME);

export interface WeatherInfo {
    temperature: number;
    windDescription: string;
    windDeg: number;
    description: string;
    feelsLike: number;
    pressure: number;
    humidity: number;
    visibility: number;
    windSpeed: number;


      String string, int start, int c1, int c2, int c3, int c4) {
    int index = start;
    int last = string.length - 3;
    while (index < last) {
      if (string.codeUnitAt(index) == c1 &&
          string.codeUnitAt(index + 1) == c2 &&
          string.codeUnitAt(index + 2) == c3 &&
          string.codeUnitAt(index + 3) == c4) {
        return index;
      }
      index++;
    }
    return -1;
  }
  static int indexOf5(
      String str, int start, int c1, int c2, int c3, int c4, int c5) {
    int index = start;
    int last = str.length - 4;
    while (index < last) {
      if (str.codeUnitAt(index) == c1 &&
          str.codeUnitAt(index + 1) == c2 &&
          str.codeUnitAt(index + 2) == c3 &&
          str.codeUnitAt(index + 3) == c4 &&
          str.codeUnitAt(index + 4) == c5) {
        return index;
      }
      index++;
    }
    return -1;
  }

  /**
   * Return the index of the first not letter/digit character in the [string]
   * that is at or after the [startIndex]. Return the length of the [string] if
   * all characters to the end are letters/digits.
   */
  static int indexOfFirstNotLetterDigit(String string, int startIndex) {
    int index = startIndex;
    int last = string.length;
    while (index < last) {
      int c = string.codeUnitAt(index);
      if (!Character.isLetterOrDigit(c)) {
        return index;
      }
      index++;
    }
    return last;
  }
  static String intern(String string) => INTERNER.intern(string);
  static bool isEmpty(String s) {
    return s == null || s.isEmpty;
  }
  static bool isTagName(String s) {
    if (s == null || s.length == 0) {
      return false;
    }
    int sz = s.length;
    for (int i = 0; i < sz; i++) {
      int c = s.codeUnitAt(i);
      if (!Character.isLetter(c)) {
        if (i == 0) {
          return false;
        }
        if (!Character.isDigit(c) && c != 0x2D) {
          return false;
        }
      }
    }
    return true;
  }
  /**
   * Produce a string containing all of the names in the given array, surrounded by single quotes,
   * and separated by commas. The list must contain at least two elements.
   *
   * @param names the names to be printed
   * @return the result of printing the names
   */
  static String printListOfQuotedNames(List<String> names) {
    if (names == null) {
      throw new IllegalArgumentException("The list must not be null");
    }
    int count = names.length;
    if (count < 2) {
      throw new IllegalArgumentException(
          "The list must contain at least two names");
    }
    StringBuffer buffer = new StringBuffer();
    buffer.write("'");
    buffer.write(names[0]);
    buffer.write("'");
    for (int i = 1; i < count - 1; i++) {
      buffer.write(", '");
      buffer.write(names[i]);
      buffer.write("'");
    }
    buffer.write(" and '");
    buffer.write(names[count - 1]);
    buffer.write("'");
    return buffer.toString();
  }
  static startsWith2(String str, int start, int c1, int c2) {
    return s


Objective-C paradigms on the platform-specific code side.

Then Objective-C++ can be dispensed with in the ViewController code; it can be made an Objective-C file instead.

Facade Solution

Here is a facade implementation example/facade_planets that overcomes the mixing of paradigms problem.

The facade is:

@implementation PlanetModel

- (id)init {
    self = [super init];

    NSString *testSupportAddPluto =
     [[[NSProcessInfo processInfo] environment]
      objectForKey:@"AddPluto"];

    if ([testSupportAddPluto isEqualToString:@"YES"]) {
        planet::add_planet(
          planet("Pluto", 2370, 7375 * millionKm));
    }

    if (self) {
        _planetDict = [[NSMutableDictionary alloc] init];
        auto pluto_by_find =
         planet::find_planet_named("Pluto");
        auto jupiter_by_find =
         planet::find_planet_named("Jupiter");

        if (planet::isEnd(jupiter_by_find) ||
         planet::isEnd(pluto_by_find)) {
            return nil;
        }
        auto pluto = pluto_by_find->second;
        auto jupiter = jupiter_by_find->second;

        PlanetInfo *plutoPlanet = [[PlanetInfo alloc] init];
        plutoPlanet.diameter = pluto.get_diameter();
        plutoPlanet.distanceFromSun =
         pluto.get_distance_from_sun();
        plutoPlanet.volume = pluto.get_volume();
        assert (plutoPlanet.volume != 0.0);
        [_planetDict setObject:plutoPlanet forKey:@"Pluto"];

        PlanetInfo *jupiterPlanet = [[PlanetInfo alloc] init];
        jupiterPlanet.diameter = jupiter.get_diameter();
        jupiterPlanet.distanceFromSun =
         jupiter.get_distance_from_sun();
        jupiterPlanet.volume = jupiter.get_volume();
        assert (jupiterPlanet.volume != 0.0);
        [_planetDict setObject:jupiterPlanet forKey:@"Jupiter"];
    }

    return self;
}

@end

The consumer then becomes a purely Objective-C class:

- (void)viewDidLoad {
    [super viewDidLoad];

    self.planetModel = [[PlanetModel alloc] init];

    if (self.planetModel == nil) {
        return;
    }

    double pluto_diameter =
     self.planetModel.planetDict[@"Pluto"].diameter;
    double jupiter_diameter =
     self.planetModel.planetDict[@"Jupiter"].diameter;
    double plutoVolume =
     self.planetModel.planetDict[@"Pluto"].volume;
    double jupiterVolume =
     self.planetModel.planetDict[@"Jupiter"].volume;
    double plutosInJupiter = jupiterVolume/plutoVolume;

    self.plutosInJupiterLabelOutlet.text =
    [NSString stringWithFormat:
    @"Number of Plutos that fit inside Jupiter = %f",
     plutosInJupiter];

    self.jupiterLabelOutlet.text =
    [NSString stringWithFormat:
     @"Diameter of Jupiter (km) = %f",
     jupiter_diameter];
    self.plutoLabelOutlet.text =
    [NSString stringWithFormat:
     @"Diameter of Pluto (km) = %f",
     pluto_diameter];
}


ccepted_memory_lock);

		arch_accept_memory(phys_start, phys_end);

		spin_lock(&unaccepted_memory_lock);
		bitmap_clear(unaccepted->bitmap, range_start, len);
	}

	list_del(&range.list);
	spin_unlock_irqrestore(&unaccepted_memory_lock, flags);
}

bool range_contains_unaccepted_memory(phys_addr_t start, phys_addr_t end)
{
	struct efi_unaccepted_memory *unaccepted;
	unsigned long flags;
	bool ret = false;
	u64 unit_size;

	unaccepted = efi_get_unaccepted_table();
	if (!unaccepted)
		return false;

	unit_size = unaccepted->unit_size;

	/*
	 * Only care for the part of the range that is represented
	 * in the bitmap.
	 */
	if (start < unaccepted->phys_base)
		start = unaccepted->phys_base;
	if (end < unaccepted->phys_base)
		return false;

	/* Translate to offsets from the beginning of the bitmap */
	start -= unaccepted->phys_base;
	end -= unaccepted->phys_base;

	/*
	 * Also consider the unaccepted state of the *next* page. See fix #1 in
	 * the comment on load_unaligned_zeropad() in accept_memory().
	 */
	if (!(end % unit_size))
		end += unit_size;

	/* Make sure not to overrun the bitmap */
	if (end > unaccepted->size * unit_size * BITS_PER_BYTE)
		end = unaccepted->size * unit_size * BITS_PER_BYTE;

	spin_lock_irqsave(&unaccepted_memory_lock, flags);
	while (start < end) {
		if (test_bit(start / unit_size, unaccepted->bitmap)) {
			ret = true;
			break;
		}

		start += unit_size;
	}
	spin_unlock_irqrestore(&unaccepted_memory_lock, flags);

	return ret;
}


         if (length2 > b2Settings.b2_linearSlop) {
            this.m_u2.x *= 1.0 / length2;
            this.m_u2.y *= 1.0 / length2;
         }
         else {
            this.m_u2.SetZero();
         }
         C = this.m_maxLength2 - length2;
         linearError = b2Math.Max(linearError, (-C));
         C = b2Math.Clamp(C + b2Settings.b2_linearSlop, (-b2Settings.b2_maxLinearCorrection), 0.0);
         impulse = (-this.m_limitMass2 * C);
         p2X = (-impulse * this.m_u2.x);
         p2Y = (-impulse * this.m_u2.y);
         bB.m_sweep.c.x += bB.m_invMass * p2X;
         bB.m_sweep.c.y += bB.m_invMass * p2Y;
         bB.m_sweep.a += bB.m_invI * (r2X * p2Y - r2Y * p2X);
         bB.SynchronizeTransform();
      }
      return linearError < b2Settings.b2_linearSlop;
   }
   Box2D.postDefs.push(function () {
      Box2D.Dynamics.Joints.b2PulleyJoint.b2_minPulleyLength = 2.0;
   });
   Box2D.inherit(b2PulleyJointDef, Box2D.Dynamics.Joints.b2JointDef);
   b2PulleyJointDef.prototype.__super = Box2D.Dynamics.Joints.b2JointDef.prototype;
   b2PulleyJointDef.b2PulleyJointDef = function () {
      Box2D.Dynamics.Joints.b2JointDef.b2JointDef.apply(this, arguments);
      this.groundAnchorA = new b2Vec2();
      this.groundAnchorB = new b2Vec2();
      this.localAnchorA = new b2Vec2();
      this.localAnchorB = new b2Vec2();
   };
   b2PulleyJointDef.prototype.b2PulleyJointDef = function () {
      this.__super.b2JointDef.call(this);
      this.type = b2Joint.e_pulleyJoint;
      this.groundAnchorA.Set((-1.0), 1.0);
      this.groundAnchorB.Set(1.0, 1.0);
      this.localAnchorA.Set((-1.0), 0.0);
      this.localAnchorB.Set(1.0, 0.0);
      this.lengthA = 0.0;
      this.maxLengthA = 0.0;
      this.lengthB = 0.0;
      this.maxLengthB = 0.0;
      this.ratio = 1.0;
      this.collideConnected = true;
   }
   b2PulleyJointDef.prototype.Initialize = function (bA, bB, gaA, gaB, anchorA, anchorB, r) {
      if (r === undefined) r = 0;
      this.bodyA = bA;
      this.bodyB = bB;
      this.groundAnchorA.SetV(gaA);
      this.groundAnchorB.SetV(gaB);
      this.localAnchorA = this.bodyA.GetLocalPoint(anchorA);
      this.localAnchorB = this.bodyB.GetLocalPoint(anchorB);
      var d1X = anchorA.x - gaA.x;
      var d1Y = anchorA.y - gaA.y;
      this.lengthA = Math.sqrt(d1X * d1X + d1Y * d1Y);
      var d2X = anchorB.x - gaB.x;
      var d2Y = anchorB.y - gaB.y;
      this.lengthB = Math.sqrt(d2X * d2X + d2Y * d2Y);
      this.ratio = r;
      var C = this.lengthA + this.ratio * this.lengthB;
      this.maxLengthA = C - this.ratio * b2PulleyJoint.b2_minPulleyLength;
      this


nction!.call(this, value, ...params).toString();
        }

        return value;
    }

    /**
     * Adds a pipe into piper w/ some error checking.
     * @param pipeName
     * @param func
     */
    private static addPipe(pipeName: string, func: PipeFunc, allowOverride: boolean) {
        pipeName = pipeName.trim();
        if (pipeName.match(/^[a-zA-Z]+$/g)) {
            if (!allowOverride && Piper.pipes.has(pipeName)) {
                throw new Error(`Pipe already exists: ${pipeName}.`);
            }
            Piper.aliasLinks.set(pipeName, []);
            Piper.pipes.set(pipeName, func);
        } else {
            throw new Error('Pipe names must only contain letters. Whitespaces are trimmed.');
        }
    }

    /**
     * Parses a comma separated list into an array and transforms each value into a proper data type.
     * @param parameters
     * @private
     */
    private static parsePipeParameters(parameters?: string) {
        const params = parameters !== undefined ? parameters.split(/\s*,\s*/) : [];
        // convert the string parameters to their proper types (number/boolean/string)
        return params.map((el) => {
            if (!isNaN(parseFloat(el))) return parseFloat(el);
            if (el === 'true') return true;
            if (el === 'false') return false;
            return el;
        });
    }

    /**
     * Finds a pipe in the map taken into account aliases.
     * @param pipeName
     * @private
     */
    private static findPipeName(pipeName: string): string {
        let pipe = Piper.pipes.get(pipeName.trim());

        if (!pipe) {
            throw new Error(`Pipe does not exist: ${pipeName}.`);
        }

        return isString(pipe) ? pipe : pipeName;
    }
}import {Component, ElementRef, Input, OnInit, EventEmitter, Output} from '@angular/core';

interface CodeNumInterface {
  id: number;
  showState: boolean;
  value: string;
}

@Component({
  selector: 'app-security-code',
  templateUrl: './security-code.component.html',
  styleUrls: ['./security-code.component.scss']
})
export class SecurityCodeComponent implements OnInit {
  @Input()
  set num(value: number) {
    const arrayNum = value ? value : 4;
    this.codeNum = [];
    for (let i = 0; i < arrayNum; i++) {
      const tmpObj = {
        id: i + 1,
        showState: false,
        value: ''
      };
      this.codeNum.push(tmpObj);
    }
  }
  @Output() codeInput = new EventEmitter<string>();
  inputValue = '';
  codeNum: CodeNumInterface[] = [
    {
      id: 1,
      showState: false,
      value: ''
    },
    {
      id: 2,
      showState: false,
      value: ''
    },
    {
      id: 3,
      showState: true,
      value: ''
    },
    {
      id: 4,
      showState: false,
      value: ''
    }
  ];

  constructor(private el: ElementRef) {
  }

  ngOnInit(): void {
  }

  onInputClick(item: CodeNumInterface) {
    this.codeNum.map((num) => {
      num.showState = (num.id === item.id && num.value === '');
    });
    const hiddenInput = this.el.nativeElement.querySelector('#boss-security-code-hidden-input');
    hiddenInput.focus();
  }

  onInput(e) {
    this.inputValue = e.target.value;
    this.codeNum.map((item) => {
      item.showState = (this.inputValue.length + 1) === item.id;
      item.value = this.inputValue.slice(item.id - 1, item.id);
    });
    this.codeInput.emit


tack air"; break;
	case UNITAI_DEFENSE_AIR: szString = L"Defense air"; break;
	case UNITAI_CARRIER_AIR: szString = L"Carrier air"; break;
	case UNITAI_PARADROP: szString = L"Paradrop"; break;
	case UNITAI_ATTACK_CITY_LEMMING: szString = L"Attack city lemming"; break;
	case UNITAI_PROPERTY_CONTROL: szString = L"Property control"; break;
	case UNITAI_HEALER: szString = L"Healer"; break;
	case UNITAI_PROPERTY_CONTROL_SEA: szString = L"Property control sea"; break;
	case UNITAI_HEALER_SEA: szString = L"Healer sea"; break;
	case UNITAI_HUNTER_ESCORT: szString = L"Hunter escort"; break;
	case UNITAI_BARB_CRIMINAL: szString = L"Barb criminal"; break;
	case UNITAI_INVESTIGATOR: szString = L"Investigator"; break;
	case UNITAI_INFILTRATOR: szString = L"Infiltrator"; break;
	case UNITAI_SEE_INVISIBLE: szString = L"See invisible"; break;
	case UNITAI_SEE_INVISIBLE_SEA: szString = L"See invisible sea"; break;
	case UNITAI_ESCORT: szString = L"Escort"; break;
	case UNITAI_MISSILE_AIR: szString = L"Missile air"; break;
	case UNITAI_PILLAGE_COUNTER: szString = L"Pillage counter"; break;
	case UNITAI_SUBDUED_ANIMAL: szString = L"Subdued animal"; break;

	default: szString = CvWString::format(L"unknown(%d)", eUnitAI); break;
	}
}

/*
 * Calculates the experience needed to reach the next level after the given level.
 */
int calcBaseExpNeeded(const int iLevel, const PlayerTypes ePlayer)
{
	int iThreshold = 99 + (iLevel*iLevel + 1) * (100 + GET_PLAYER(ePlayer).getLevelExperienceModifier());

	if (GC.getGame().isOption(GAMEOPTION_UNIT_MORE_XP_TO_LEVEL))
	{
		iThreshold *= GC.getDefineINT("MORE_XP_TO_LEVEL_MODIFIER");
		iThreshold /= 100;
	}
	return iThreshold / 100;
}

/*
 * Calculates the level for a unit with the given experience.
 */
int calculateLevel(const int iExperience, const PlayerTypes ePlayer)
{
	PROFILE_EXTRA_FUNC();
	FAssertMsg(ePlayer != NO_PLAYER, "ePlayer must be a valid player");

	if (iExperience <= 0)
	{
		return 1;
	}

	int iLevel = 1;
	while (true)
	{
		const int iNextLevelExperience = calcBaseExpNeeded(iLevel, ePlayer);
		if (iNextLevelExperience > iExperience)
		{
			break;
		}
		++iLevel;
		if (iNextLevelExperience == iExperience)
		{
			break;
		}
	}
	return iLevel;
}

DirectionTypes getOppositeDirection(DirectionTypes eDirection)
{
	switch(eDirection)
	{
	case DIRECTION_NORTH:
		return DIRECTION_SOUTH;
	case DIRECTION_NORTHEAST:
		return DIRECTION_SOUTHWEST;
	case DIRECTION_EAST:
		return DIRECTION_WEST;
	case DIRECTION_SOUTHEAST:
		return DIRECTION_NORTHWEST;
	case DIRECTION_SOUTH:
		return DIRECTION_NORTH;
	case DIRECTION_SOUTHWEST


cQryBatchOrderActionField",	/* tp_name */
	sizeof(PyCThostFtdcQryBatchOrderActionField),/* tp_basicsize */
	0,                          /* tp_itemsize */
	(destructor)PyCThostFtdcQryBatchOrderActionField_dealloc,/* tp_dealloc */
	0,                          /* tp_print */
	0,                          /* tp_getattr */
	0,                          /* tp_setattr */
	0,                          /* tp_reserved */
	(reprfunc)PyCThostFtdcQryBatchOrderActionField_repr,   /* tp_repr */
	0,                          /* tp_as_number */
	0,                          /* tp_as_sequence */
	0,                          /* tp_as_mapping */
	0,                          /* tp_hash  */
	0,                          /* tp_call */
	0,                          /* tp_str */
	0,                          /* tp_getattro */
	0,                          /* tp_setattro */
	0,                          /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT,         /* tp_flags */
	"CThostFtdcQryBatchOrderActionField",           /* tp_doc */
	0,                          /* tp_traverse */
	0,                          /* tp_clear */
	0,                          /* tp_richcompare */
	0,                          /* tp_weaklistoffset */
	0,                          /* tp_iter */
	0,                          /* tp_iternext */
	0,                          /* tp_methods */
	0,                          /* tp_members */
	PyCThostFtdcQryBatchOrderActionField_getset,   /* tp_getset */
	0,                          /* tp_base */
	0,                          /* tp_dict */
	0,                          /* tp_descr_get */
	0,                          /* tp_descr_set */
	0,                          /* tp_dictoffset */
	(initproc)PyCThostFtdcQryBatchOrderActionField_init, /* tp_init */
	0,                          /* tp_alloc */
	PyCThostFtdcQryBatchOrderActionField_new,       /* tp_new */
};

int PyCThostFtdcQryBatchOrderActionFieldType_init(PyObject *module) {

	/* 准备好对象使用 CThostFtdcQryBatchOrderActionField  */
	if (PyType_Ready(&PyCThostFtdcQryBatchOrderActionFieldType) < 0) {
		PyErr_SetString(PyExc_RuntimeError, "can't initialize PyCTP.CThostFtdcQryBatchOrderActionField");
		return -1;
	}

    Py_INCREF(&PyCThostFtdcQryBatchOrderActionFieldType);
    if( PyModule_AddObject(module, "CThostFtdcQryBatchOrderActionField", (PyObject *)&PyCThostFtdcQryBatchOrderActionFieldType) < 0 ) {
        PyErr_SetString(PyExc_RuntimeError, "Failed to add CThostFtdcQryBatchOrderActionField to module");
        Py_DECREF(&PyCThostFtdcQryBatchOrderActionFieldType);
		return -1;
    }

    return 0;
}

#include "PyCThostFtdcQryQuoteActionField.h"

static PyObject *PyCThostFtdcQryQuoteActionField_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
    PyCThostFtdcQryQuoteActionField


dx,%rax,4), %ymm9
// CHECK: encoding: [0xc5,0x7c,0x52,0x4c,0x82,0xc0]
vrsqrtps -64(%rdx,%rax,4), %ymm9

// CHECK: vrsqrtps 64(%rdx,%rax,4), %ymm9
// CHECK: encoding: [0xc5,0x7c,0x52,0x4c,0x82,0x40]
vrsqrtps 64(%rdx,%rax,4), %ymm9

// CHECK: vrsqrtps 64(%rdx,%rax), %xmm15
// CHECK: encoding: [0xc5,0x78,0x52,0x7c,0x02,0x40]
vrsqrtps 64(%rdx,%rax), %xmm15

// CHECK: vrsqrtps 64(%rdx,%rax), %xmm6
// CHECK: encoding: [0xc5,0xf8,0x52,0x74,0x02,0x40]
vrsqrtps 64(%rdx,%rax), %xmm6

// CHECK: vrsqrtps 64(%rdx,%rax), %ymm7
// CHECK: encoding: [0xc5,0xfc,0x52,0x7c,0x02,0x40]
vrsqrtps 64(%rdx,%rax), %ymm7

// CHECK: vrsqrtps 64(%rdx,%rax), %ymm9
// CHECK: encoding: [0xc5,0x7c,0x52,0x4c,0x02,0x40]
vrsqrtps 64(%rdx,%rax), %ymm9

// CHECK: vrsqrtps 64(%rdx), %xmm15
// CHECK: encoding: [0xc5,0x78,0x52,0x7a,0x40]
vrsqrtps 64(%rdx), %xmm15

// CHECK: vrsqrtps 64(%rdx), %xmm6
// CHECK: encoding: [0xc5,0xf8,0x52,0x72,0x40]
vrsqrtps 64(%rdx), %xmm6

// CHECK: vrsqrtps 64(%rdx), %ymm7
// CHECK: encoding: [0xc5,0xfc,0x52,0x7a,0x40]
vrsqrtps 64(%rdx), %ymm7

// CHECK: vrsqrtps 64(%rdx), %ymm9
// CHECK: encoding: [0xc5,0x7c,0x52,0x4a,0x40]
vrsqrtps 64(%rdx), %ymm9

// CHECK: vrsqrtps (%rdx), %xmm15
// CHECK: encoding: [0xc5,0x78,0x52,0x3a]
vrsqrtps (%rdx), %xmm15

// CHECK: vrsqrtps (%rdx), %xmm6
// CHECK: encoding: [0xc5,0xf8,0x52,0x32]
vrsqrtps (%rdx), %xmm6

// CHECK: vrsqrtps (%rdx), %ymm7
// CHECK: encoding: [0xc5,0xfc,0x52,0x3a]
vrsqrtps (%rdx), %ymm7

// CHECK: vrsqrtps (%rdx), %ymm9
// CHECK: encoding: [0xc5,0x7c,0x52,0x0a]
vrsqrtps (%rdx), %ymm9

// CHECK: vrsqrtps %xmm15, %xmm15
// CHECK: encoding: [0xc4,0x41,0x78,0x52,0xff]
vrsqrtps %xmm15, %xmm15

// CHECK: vrsqrtps %xmm6, %xmm6
// CHECK: encoding: [0xc5,0xf8,0x52,0xf6]
vrsqrtps %xmm6, %xmm6


Where,
    int theX,
    int theY,
    const cv::String& theLabel,
    bool *theState,
    unsigned int theColor = 0xCECECE
)
```

where `theWhere` is the image/frame where the image will be rendered, `theX` is the position X, `theY` is the position Y, `theLabel` is text displayed besides the clickable checkbox square, `theState` describes the current state of the checkbox (`true` means the checkbox is checked) and `theColor` is color of the label in the format `0xRRGGBB`, e.g. `0xff0000` for red.

`cvui::checkbox()` returns a boolean value that indicates the current state of the checkbox: `true` if it is checked, or `false` otherwise.

Below is an example showing a checkbox. The result on the screen is shown in Figure 1.

```cpp
bool checked = false;
cvui::checkbox(frame, 90, 50, "Checkbox label", &checked);
```

![Checkbox]({{ site.url }}/img/checkbox.png)
<p class="img-caption">Figure 1: checkbox component.</p>

## Learn more

Check the [main-app](https://github.com/Dovyski/cvui/tree/master/example/src/main-app) example for more information about checkbox.
---
layout: default
title: sparkline
---

# Sparkline

`cvui::sparkline()` renders the values of a `std::vector<double>` as a sparkline. The signature of the function is:

```cpp
void sparkline (
    cv::Mat& theWhere,
    std::vector<double>& theValues,
    int theX,
    int theY,
    int theWidth,
    int theHeight,
    unsigned int theColor = 0x00FF00
)
```

where `theWhere` is the image/frame where the image will be rendered, `theX` is the position X, `theY` is the position Y, `theWidth` is the width of the sparkline, `theHeight` is the height of the sparkline, and `theColor` is the color of sparkline in the format `0xRRGGBB`, e.g. `0xff0000` for red.

<div class="notice--info"><strong>Tip:</strong> if an empty vector is provided to <code>cvui::sparkline()</code>, a message informing about the lack of data will be displayed instead of the sparkline.</div>

Below is an example showing a sparkline. The result on the screen is shown in Figure 1.

```cpp
std::vector<double> values;
for (std::vector<double>::size_type i = 0; i < 30; i++) {
  values.push_back(rand() + 0.);
}

cvui::sparkline(frame, values, 10, 10, 280, 100);
```

![Sparkline]({{ site.url }}/img/sparkline.png)
<p class="img-caption">Figure 1: sparkline component.</p>

## Learn more

Check the [sparkline](https://github.com/Dovyski/cvui/tree/master/example/src/sparkline) example for more information about sparklines.
---
layout: default
title: window
---

# Window

`cvui::window()` renders a window (a block with a title and a body). The signature of the function is:

```cpp
void window (
    cv::Mat& theWhere,
    int theX,
    int theY,
    int theWidth,
    int theHeight,
    const cv::String& theTitle
)
```

where `theWhere` is the image/frame where the image will be rendered, `theX` is the position X, `theY` is the position Y, `theWidth` is the width of the window, `theHeight` is the height of the window, and `theTitle` is the text displayed as the title of the window.

Below is an example showing a window. The result on the screen is shown in Figure 1.

```cpp
cvui::window(frame, 60, 10, 130, 90, "Title");
```

![Window]({{ site.url }}/img/window.png)

Figure 1: window component.

cvui::window() is useful to be used as a background for other UI components, partic