Compare commits
421 Commits
Author | SHA1 | Date | |
---|---|---|---|
c51e52b5c5 | |||
36d2ad88a6 | |||
17df489348 | |||
8c71fdee72 | |||
445ba9a5f8 | |||
49d5254f2b | |||
4bff216f48 | |||
58425e0318 | |||
be3818f818 | |||
b717b1c67f | |||
d4b984c509 | |||
2dbfe101c7 | |||
34434fd402 | |||
68b7bf36bb | |||
5815147509 | |||
0b669ed687 | |||
3c74a22420 | |||
3a0a9f72f7 | |||
84fa394a3a | |||
c70a95e007 | |||
c9dcfd2829 | |||
bc4dea6930 | |||
106d7aa602 | |||
ecb59d8980 | |||
f6cb68debf | |||
98f5cdd08c | |||
355d360720 | |||
5e12094078 | |||
71eb82ae3a | |||
6e1dc3467e | |||
fba093f495 | |||
34f6bba4a1 | |||
7597799323 | |||
11818ada00 | |||
4cb46dc4ea | |||
6ed219e2e1 | |||
bffbc128f2 | |||
b1ba4282f7 | |||
bbd3292c8e | |||
b14257542f | |||
8f782f6204 | |||
8e0df579c3 | |||
870cc88b2a | |||
0f475095ad | |||
e79adc056d | |||
cc2061077c | |||
c407dce74b | |||
08614a6ce8 | |||
676c87ffe8 | |||
c504469c86 | |||
b3cf04d323 | |||
5254c49bdd | |||
011ee54010 | |||
6c7d393cff | |||
86c3191501 | |||
03160c5ad4 | |||
f3b532b4d9 | |||
24290541e7 | |||
e527de9a89 | |||
fab09b1f13 | |||
7bb62ab3c3 | |||
4c4f800427 | |||
a2be0fa8a5 | |||
b3e8be65f6 | |||
4d21e9f1cf | |||
337bdf3f6f | |||
80cb879bc8 | |||
9e24d8da48 | |||
03ea09ed8d | |||
45fbcae3f9 | |||
78b431ffc7 | |||
ab51674496 | |||
a2a6011b31 | |||
44bf2fdf10 | |||
98efabd925 | |||
dc0412ed07 | |||
ca05decbc0 | |||
91f81b4958 | |||
36676240e2 | |||
0d0e73c0a3 | |||
729cafa2d6 | |||
cce405626a | |||
2a8428076e | |||
10f7b75d35 | |||
31a8351cce | |||
867bb7344a | |||
6c48ade999 | |||
138500303b | |||
9e6b4fccfb | |||
39fb8143ac | |||
bcc6cb6335 | |||
79497c0678 | |||
2333d30ee5 | |||
1ae43d171a | |||
31aa83c9b8 | |||
7309e5d249 | |||
60588c52f3 | |||
9ba0641cc7 | |||
d9e86b555f | |||
71fa3b3c26 | |||
fbd3a4fffa | |||
2f818808eb | |||
8295db4b4e | |||
be73485516 | |||
e47092fec0 | |||
8c47a905d4 | |||
624fe766df | |||
2c7028efc3 | |||
01a6b7e36f | |||
d588663619 | |||
bd03383b62 | |||
47aa71b7cc | |||
86d4e8bea5 | |||
4020036f93 | |||
3c2e988059 | |||
8f97826a84 | |||
c229e915ca | |||
2c9a399a9a | |||
c06cbe37f0 | |||
80b0443823 | |||
ba543600e5 | |||
ccd2310541 | |||
f421bfb764 | |||
be0492518b | |||
30eb2e8b0c | |||
3ab21896c5 | |||
e7d6c1318c | |||
39fb171563 | |||
d428322b0a | |||
b51cfb3977 | |||
9c86478101 | |||
d3647a1817 | |||
aedd5f5d9f | |||
5b11b6e281 | |||
07f6747c57 | |||
752bd641a6 | |||
25f5aa4695 | |||
a448246060 | |||
9fc8523762 | |||
b22c815c29 | |||
3798e14e8a | |||
2913dd244f | |||
a0476287df | |||
89be124f1d | |||
7841be7bdd | |||
f630c78dbc | |||
a9310c38d1 | |||
199e1613d4 | |||
c7b3633498 | |||
b3a2a6dae6 | |||
27cb494fa9 | |||
d734868ba7 | |||
95baa9a508 | |||
fb1fa4b47f | |||
0d0e92dd56 | |||
83c74bb912 | |||
5f87a74720 | |||
1e68618479 | |||
a4891cef29 | |||
ff0b08acdb | |||
24ea8f6a6a | |||
7900e348f1 | |||
9680e2a113 | |||
a1defb6f23 | |||
af188f9f19 | |||
f6b68c8d09 | |||
252c880f5f | |||
39f16f5a97 | |||
3b6495a781 | |||
8576cbe101 | |||
df4ef8c5ac | |||
e9386b57a5 | |||
8ee2877234 | |||
d5e8643497 | |||
0125cc1c0b | |||
937426be72 | |||
de964317cd | |||
fdb5b72830 | |||
4039d6f04c | |||
2a6da92c94 | |||
c5c157ea3d | |||
51fb218d6b | |||
150208884f | |||
c44ace5edd | |||
e97a1a8f8a | |||
3451e3b055 | |||
3cc761446e | |||
cfbe8ae4b8 | |||
9df9ff4354 | |||
cf7e9aa29e | |||
a38aaccd49 | |||
4d813c765f | |||
3d1abf5035 | |||
f7b60c9a09 | |||
93f1b473af | |||
c35662155e | |||
f3692146bf | |||
f0135c77a1 | |||
8aed2170e3 | |||
c4308aac0f | |||
82c0e32a16 | |||
80ac14cad6 | |||
41e7bac906 | |||
fe855c04c7 | |||
ef6d1d7c76 | |||
09ece3b274 | |||
56569c813a | |||
f9fb17cb5e | |||
d632dcac7e | |||
6529b5e85f | |||
1f8b93dbab | |||
22066608fe | |||
530e454bf8 | |||
f4b69f9b55 | |||
6b7e4322c9 | |||
3c1c37b4a9 | |||
fd26de4484 | |||
b065d03300 | |||
a732ff3892 | |||
a3bc1f8d20 | |||
36482c5846 | |||
862813a0fc | |||
e218c7ec86 | |||
9acf9ae5a3 | |||
0beda68e62 | |||
f3754732bd | |||
0bc4e3b09e | |||
c83de17d72 | |||
4eb3372413 | |||
511db1fb0b | |||
b724f66b27 | |||
d2c11fab72 | |||
a48806438e | |||
ed399a9dc2 | |||
a33a60838b | |||
101fd365be | |||
adb708e3ba | |||
eff2e44e1e | |||
67bc79e60b | |||
1d60e54663 | |||
6f0b8fb175 | |||
517a846133 | |||
f3ebc461d4 | |||
6f45968e1a | |||
2f0c809390 | |||
2321368d3e | |||
c65ba9df21 | |||
cb0fe8ef7d | |||
60380ceaa4 | |||
fd6f325ef6 | |||
14ed1d3f44 | |||
f34851d2d5 | |||
1626464167 | |||
556b4f8655 | |||
0915987573 | |||
fa15c32717 | |||
ac217e7b99 | |||
a2542e3e4d | |||
b530554d1e | |||
6163e9b4f5 | |||
ec3c285fbb | |||
1aae2c027e | |||
dd53261d3c | |||
0d643d4672 | |||
70c68318ee | |||
8bde7ad5de | |||
2e05f1307b | |||
3b33c3d9bc | |||
9efd75d657 | |||
a54aecde30 | |||
21cc727b16 | |||
9c875cf5f6 | |||
1ef8a1484d | |||
c0da5393f5 | |||
e7d8b4aac6 | |||
850fcfae54 | |||
8f1d00647c | |||
486ebb19c1 | |||
588f84f33c | |||
298631fd5a | |||
3ac3043898 | |||
bd8b551997 | |||
a3c44b3088 | |||
d98e60dc43 | |||
34f59d161e | |||
ac7e63e247 | |||
e606837a88 | |||
6f6526218f | |||
94f377ecd8 | |||
55a072222b | |||
f88ae30d7f | |||
5e7bfa54f2 | |||
faf1e52739 | |||
17177a29a9 | |||
801c90c059 | |||
e6f011d607 | |||
1d607ed3b5 | |||
e385350aaa | |||
271c92336d | |||
ca770c8d7a | |||
e6dc5d1858 | |||
e1b507eafc | |||
fadd789bbc | |||
3d967056e5 | |||
555238ff04 | |||
909e7929d0 | |||
cb293dc036 | |||
1eadc7748e | |||
f3b8c65f73 | |||
5c4075497e | |||
b75cb75372 | |||
1ca1e49030 | |||
03b2ce120d | |||
881fd368c5 | |||
8f2117970b | |||
32b7b03faa | |||
ea762bf805 | |||
30999dcafc | |||
d1c8300dcf | |||
e3bf99b022 | |||
8c7c9e1957 | |||
da61a8d25d | |||
3ddd8d7fea | |||
7facfea3f9 | |||
f687d48666 | |||
a90c8e2ed4 | |||
3087afb4ee | |||
710848dcac | |||
6d8fe96e96 | |||
5c775c9074 | |||
c40b0dff2f | |||
94bbb4f6a7 | |||
dbbb2cce54 | |||
714db4d198 | |||
5e02521794 | |||
cb5b582b81 | |||
3fe58b7c0d | |||
5ca1e140d1 | |||
64b52fc1bc | |||
ab26411164 | |||
2c858eb744 | |||
c39abea00a | |||
30fa592d95 | |||
36f071de00 | |||
289237d5b6 | |||
b1a10ee797 | |||
f597396afe | |||
36a3bb2112 | |||
88d42e6ac8 | |||
59e840628b | |||
2519135036 | |||
32af22afaa | |||
fcf60fb56f | |||
f81d2174f6 | |||
9daa435dee | |||
defd3d3fee | |||
33103fb68d | |||
2348522810 | |||
5ca71fdb60 | |||
bbf00328b3 | |||
dba2f6c1fd | |||
3523cdff76 | |||
d4fd7a30c8 | |||
7c153a0579 | |||
8f2a86457b | |||
b98e7d8395 | |||
3d1317603e | |||
8a651c813b | |||
10884e73f0 | |||
de4286cd7f | |||
f31aab4b35 | |||
485e83c5df | |||
5f1e3f6a2b | |||
9688866fdb | |||
9c59d4a225 | |||
3f2559c1e1 | |||
606776662d | |||
3cec40c4f9 | |||
a5c1f3c02e | |||
8171974454 | |||
d50673ad3f | |||
7ca89af17c | |||
e0ce750d73 | |||
409e44a354 | |||
8382555a20 | |||
e3e6783703 | |||
ea86c3a76c | |||
49b1394090 | |||
03f1c20d2c | |||
ae060ebac2 | |||
358d8f4e17 | |||
6614543e04 | |||
5693510df6 | |||
dfaaee7ce5 | |||
c356147d5f | |||
1e1836f949 | |||
65aab8d920 | |||
816aabf365 | |||
9efea19f6b | |||
e1661b5dc4 | |||
45f42568fc | |||
04d063f1fe | |||
7b5d556dcc | |||
6900980460 | |||
28066ae3c4 | |||
39bd0173e8 | |||
6b570f2035 | |||
dac7e778cb | |||
9e16ec7005 | |||
489d7f509e | |||
c0855988c0 | |||
e5e0160628 | |||
cb7b542fb1 | |||
101d5c1b09 | |||
004553f1de | |||
da7da9aae0 | |||
6d4ce812d0 | |||
bab4e10038 | |||
e30defe3bf | |||
0691e82eb2 | |||
38b685315b |
@ -1,6 +1,5 @@
|
||||
.github
|
||||
.husky
|
||||
docs
|
||||
scripts
|
||||
node_modules
|
||||
package-lock.json
|
||||
|
20
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -1,20 +0,0 @@
|
||||
---
|
||||
name: 🐞 错误报告
|
||||
about: 当出现问题时提交报告以便修复!
|
||||
title: '错误报告: xxx.md'
|
||||
labels: bug
|
||||
assignees: jaywcjlove
|
||||
---
|
||||
|
||||
### 错误类型
|
||||
|
||||
- [ ] 排版 & 文字错误
|
||||
- [ ] 清单内容示例错误
|
||||
|
||||
### 错误清单
|
||||
|
||||
`xxx.md`
|
||||
|
||||
### 错误内容描述
|
||||
|
||||
请在这里描述具体错误内容。
|
42
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: 🐞 错误报告
|
||||
description: 当出现问题时提交报告以便修复!
|
||||
title: '🐞 错误报告: xxx.md'
|
||||
labels: ['request']
|
||||
assignees: jaywcjlove
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
|
||||
注意:请求太多,请按照下面内容提供错误报告
|
||||
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
|
||||
|
||||
- type: input
|
||||
id: error-list
|
||||
attributes:
|
||||
label: 📄 错误清单
|
||||
description: 指定错误清单文件,方便我们快速定位错误。
|
||||
placeholder: ex. `docs/ansible.md`
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: error-type
|
||||
attributes:
|
||||
label: 🧨 错误类型
|
||||
description: 请选择错误类型。
|
||||
options:
|
||||
- label: 排版 & 文字错误
|
||||
- label: 清单内容示例错误
|
||||
- label: 其它
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 📖 错误说明
|
||||
description: 您可以在这里简单的提供一些资料,方便我们在 Quick Reference 中添加您想添加的备忘清单(速查表)。
|
||||
placeholder: 请您在这里详细介绍具体错误问题
|
||||
validations:
|
||||
required: true
|
36
.github/ISSUE_TEMPLATE/cheatsheet-request.md
vendored
@ -1,36 +0,0 @@
|
||||
---
|
||||
name: 🤙 备忘清单请求
|
||||
about: 请求添加备忘清单和参考。
|
||||
title: '请求添加备忘清单: '
|
||||
labels: request
|
||||
assignees: jaywcjlove
|
||||
---
|
||||
|
||||
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
|
||||
注意:请求太多,参考【优先级】快速添加内容
|
||||
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
|
||||
|
||||
#### 优先级
|
||||
|
||||
- [ ] 提交 PR 优先合并(优先处理)
|
||||
- [ ] 提供可复制的[中文/英文]备忘清单资料,优先添加
|
||||
- [ ] 大众化的内容(java/python),优先搬运(小众内容请提供资料)
|
||||
|
||||
#### 说明项目
|
||||
|
||||
您可以在这里简单的提供一些资料,方便我们在 Quick Reference 中添加您想添加的备忘清单(速查表)。
|
||||
|
||||
【请您在这里介绍一下工具或者语言,这很重要】
|
||||
|
||||
- 如果你有一张不错的备忘清单(速查表) [`参考这里`](https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md) 为仓库贡献。
|
||||
- 如果您不方便贡献,请在下方参考资料中提供链接地址,方便共建备忘清单(速查表)
|
||||
- 这里为您提供了 Markdown 排版[示例教程](https://jaywcjlove.github.io/reference/docs/quickreference.html)
|
||||
|
||||
#### 提供参考资料地址
|
||||
|
||||
提供更多参考资料有助于我们整理成备忘清单(速查表)
|
||||
|
||||
- 提供参考地址 https://jaywcjlove.github.io/reference
|
||||
- 提供官网地址 https://jaywcjlove.github.io/reference
|
||||
|
||||
_⚠️ 注意: 随着内容越来越多,可能甚至找不到这个工具或者语言的官网,请您在这里提供以便大家共同参与贡献内容_
|
55
.github/ISSUE_TEMPLATE/cheatsheet-request.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
name: 🤙 备忘清单请求
|
||||
description: 请求添加备忘清单和参考
|
||||
title: '【备忘清单】 请求: <Name>'
|
||||
labels: ['request']
|
||||
assignees: jaywcjlove
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
|
||||
注意:请求太多,参考【优先级】快速添加内容
|
||||
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
|
||||
|
||||
### 优先级
|
||||
|
||||
- 提交 PR 优先合并(优先处理)
|
||||
- 提供可复制的[中文/英文]备忘清单资料,优先添加
|
||||
- 大众化的内容(java/python),优先搬运(小众内容请提供资料)
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 说明项目
|
||||
description: 您可以在这里简单的提供一些资料,方便我们在 Quick Reference 中添加您想添加的备忘清单(速查表)。
|
||||
placeholder: 【请您在这里介绍一下工具或者语言,这很重要】
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: official-website
|
||||
attributes:
|
||||
label: 提供官网
|
||||
description: 提供官网网站有助于我们整理成备忘清单(速查表)
|
||||
placeholder: ex. https://xxx.com
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
_⚠️ 注意: 随着内容越来越多,可能甚至找不到这个工具或者语言的官网,请您在这里提供以便大家共同参与贡献内容_
|
||||
|
||||
- type: textarea
|
||||
id: reference-url
|
||||
attributes:
|
||||
label: 参考资料 URL
|
||||
description: 提供更多参考资料有助于我们整理成备忘清单(速查表)
|
||||
placeholder: |
|
||||
https://jaywcjlove.github.io/reference
|
||||
https://jaywcjlove.github.io/reference
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
_⚠️ 注意: 提供更多参考资料,以便大家共同参与贡献内容_
|
14
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 😍 投稿指南
|
||||
url: https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md
|
||||
about: 请在做出任何贡献之前通读!
|
||||
- name: 🚀 部署镜像网站
|
||||
url: https://github.com/jaywcjlove/reference/issues/102#issue-1451649637
|
||||
about: 部署镜像网站教程在这里!
|
||||
- name: 🪩 清单排版布局说明
|
||||
url: https://jaywcjlove.github.io/reference/docs/quickreference.html
|
||||
about: 部署镜像网站教程在这里!
|
||||
- name: 🪩 Markdown 语法说明
|
||||
url: https://jaywcjlove.github.io/reference/docs/markdown.html
|
||||
about: 部署镜像网站教程在这里!
|
59
.github/workflows/ci.yml
vendored
@ -84,7 +84,7 @@ jobs:
|
||||
id: changelog
|
||||
uses: jaywcjlove/changelog-generator@main
|
||||
with:
|
||||
filter-author: (小弟调调™)
|
||||
filter-author: (小弟调调™|github-actions-bot|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
|
||||
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
|
||||
|
||||
- name: Create Release
|
||||
@ -122,10 +122,7 @@ jobs:
|
||||
```
|
||||
|
||||
# Create Docker Image
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@ -137,8 +134,8 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm64/v7
|
||||
tags: ${{ secrets.DOCKER_USER }}/reference:latest
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: wcjiang/reference:latest
|
||||
|
||||
- name: Build and push image:tags
|
||||
uses: docker/build-push-action@v3
|
||||
@ -146,33 +143,33 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm64/v7
|
||||
tags: ${{ secrets.DOCKER_USER }}/reference:${{steps.changelog.outputs.version}}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: wcjiang/reference:${{steps.changelog.outputs.version}}
|
||||
|
||||
# Create Docker Image in Github
|
||||
- name: Login to the GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
# # Create Docker Image in Github
|
||||
# - name: Login to the GitHub Container Registry
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# registry: ghcr.io
|
||||
# username: ${{ github.actor }}
|
||||
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push image:latest
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm64/v7
|
||||
tags: ghcr.io/jaywcjlove/reference:latest
|
||||
# - name: Build and push image:latest
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# push: true
|
||||
# context: .
|
||||
# platforms: linux/amd64,linux/arm64
|
||||
# tags: ghcr.io/jaywcjlove/reference:latest
|
||||
|
||||
- name: Build and push image:tags
|
||||
uses: docker/build-push-action@v3
|
||||
if: steps.create_tag.outputs.successful
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm64/v7
|
||||
tags: ghcr.io/jaywcjlove/reference:${{steps.changelog.outputs.version}}
|
||||
# - name: Build and push image:tags
|
||||
# uses: docker/build-push-action@v3
|
||||
# if: steps.create_tag.outputs.successful
|
||||
# with:
|
||||
# push: true
|
||||
# context: .
|
||||
# platforms: linux/amd64,linux/arm64
|
||||
# tags: ghcr.io/jaywcjlove/reference:${{steps.changelog.outputs.version}}
|
||||
|
||||
# # Create Docker Image in Github
|
||||
# - name: Login to GitHub registry
|
||||
|
16
.refsrc.json
@ -12,5 +12,21 @@
|
||||
},
|
||||
"github": {
|
||||
"url": "https://github.com/jaywcjlove/reference"
|
||||
},
|
||||
"giscus": {
|
||||
"src": "https://giscus.app/client.js",
|
||||
"data-repo": "jaywcjlove/reference",
|
||||
"data-repo-id": "R_kgDOID2-Mw",
|
||||
"data-category": "Q&A",
|
||||
"data-category-id": "DIC_kwDOID2-M84CS5wo",
|
||||
"data-mapping": "pathname",
|
||||
"data-strict": "0",
|
||||
"data-reactions-enabled": "1",
|
||||
"data-emit-metadata": "0",
|
||||
"data-input-position": "bottom",
|
||||
"data-theme": "dark",
|
||||
"data-lang": "zh-CN",
|
||||
"crossorigin": "anonymous",
|
||||
"async": true
|
||||
}
|
||||
}
|
||||
|
248
CONTRIBUTING.md
@ -66,13 +66,13 @@ Contributing 贡献
|
||||
### 提示配置
|
||||
|
||||
```markdown
|
||||
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
|
||||
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
|
||||
```
|
||||
|
||||
添加 `contributing` 类名,会在卡片下方添加 _`👆待完善需要您的参与`_,添加 `data-info=👆看看还缺点儿什么?`,更换默认提示文本。
|
||||
|
||||
```markdown
|
||||
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=tag&data-lang=Python-->
|
||||
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=tag&data-lang=Python-->
|
||||
```
|
||||
|
||||
添加 `class=tag&data-lang=Python` 类名和参数,会在卡片右上角标记 _`Python`_
|
||||
@ -147,7 +147,6 @@ REF_LABEL=网站首页
|
||||
- [linzhe.top](https://linzhe.top/)
|
||||
- [xushanxiang.com](https://xushanxiang.com/ref/)
|
||||
- [winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)
|
||||
- [isteed.cc](https://ref.isteed.cc/)
|
||||
- [hestudio.org](https://quickref.hestudio.org)
|
||||
- [surcode.cn](https://ref.surcode.cn)
|
||||
- [cms.im](https://quickref.cms.im/)
|
||||
@ -211,39 +210,75 @@ jobs:
|
||||
|
||||
请参阅[贡献指南](./CONTRIBUTING.md)了解如何开始。一如既往,感谢我们出色的贡献者!
|
||||
|
||||
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调™">
|
||||
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调™"/>
|
||||
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调">
|
||||
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
|
||||
</a>
|
||||
<a href="https://github.com/fwqaaq" title="fw_qaq">
|
||||
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fw_qaq"/>
|
||||
<a href="https://github.com/fwqaaq" title="fwqaaq">
|
||||
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/>
|
||||
</a>
|
||||
<a href="https://github.com/mofelee" title="mofelee">
|
||||
<img src="https://avatars.githubusercontent.com/u/5069410?v=4" width="42;" alt="mofelee"/>
|
||||
</a>
|
||||
<a href="https://github.com/JeffersonHuang" title="Jefferson">
|
||||
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson"/>
|
||||
<a href="https://github.com/JeffersonHuang" title="Jefferson Huang">
|
||||
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/>
|
||||
</a>
|
||||
<a href="https://github.com/Alex-Programer" title="Alex">
|
||||
<a href="https://github.com/aixcyi" title="砹小翼">
|
||||
<img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="砹小翼"/>
|
||||
</a>
|
||||
<a href="https://github.com/Alex-Programmer-Bro" title="Alex">
|
||||
<img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/>
|
||||
</a>
|
||||
<a href="https://github.com/expoli" title="expoli">
|
||||
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
|
||||
</a>
|
||||
<a href="https://github.com/LiuYuan-SHU" title="Liuyuan">
|
||||
<img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Liuyuan"/>
|
||||
</a>
|
||||
<a href="https://github.com/heStudio-Network" title="醉、倾城">
|
||||
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
|
||||
</a>
|
||||
<a href="https://github.com/sjh42" title="42:p">
|
||||
<img src="https://avatars.githubusercontent.com/u/34529275?v=4" width="42;" alt="42:p"/>
|
||||
</a>
|
||||
<a href="https://github.com/LufsX" title="LufsX">
|
||||
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
|
||||
</a>
|
||||
<a href="https://github.com/expoli" title="expoli">
|
||||
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
|
||||
</a>
|
||||
<a href="https://github.com/k23223" title="k23223">
|
||||
<img src="https://avatars.githubusercontent.com/u/57606136?v=4" width="42;" alt="k23223"/>
|
||||
</a>
|
||||
<a href="https://github.com/eryajf" title="二丫讲梵">
|
||||
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
|
||||
</a>
|
||||
<a href="https://github.com/Country-If" title="Maylon">
|
||||
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
|
||||
</a>
|
||||
<a href="https://github.com/LiuYuan-SHU" title="Yuan Liu">
|
||||
<img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Yuan Liu"/>
|
||||
</a>
|
||||
<a href="https://github.com/mailbaoer" title="baoer">
|
||||
<img src="https://avatars.githubusercontent.com/u/5282978?v=4" width="42;" alt="baoer"/>
|
||||
</a>
|
||||
<a href="https://github.com/chaos-cn" title="chaos">
|
||||
<img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/>
|
||||
</a>
|
||||
<a href="https://github.com/MackDing" title="Blossom">
|
||||
<img src="https://avatars.githubusercontent.com/u/19878893?v=4" width="42;" alt="Blossom"/>
|
||||
</a>
|
||||
<a href="https://github.com/MarioMang" title="MarioMang">
|
||||
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="MarioMang"/>
|
||||
</a>
|
||||
<a href="https://github.com/qyl27" title="秋 雨落">
|
||||
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋 雨落"/>
|
||||
</a>
|
||||
<a href="https://github.com/undefined-hestudio" title="undefined">
|
||||
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/>
|
||||
</a>
|
||||
<a href="https://github.com/webeautiful" title="Albert">
|
||||
<img src="https://avatars.githubusercontent.com/u/3364316?v=4" width="42;" alt="Albert"/>
|
||||
</a>
|
||||
<a href="https://github.com/dadatom" title="Da Da">
|
||||
<img src="https://avatars.githubusercontent.com/u/33886943?v=4" width="42;" alt="Da Da"/>
|
||||
</a>
|
||||
<a href="https://github.com/XYZscratcher" title="XYZ">
|
||||
<img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/>
|
||||
</a>
|
||||
<a href="https://github.com/1834423612" title="kjch">
|
||||
<img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/>
|
||||
</a>
|
||||
<a href="https://github.com/mancuoj" title="mancuoj">
|
||||
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
|
||||
</a>
|
||||
<a href="https://github.com/pangxiaoli" title="pangxiaoli">
|
||||
<img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/>
|
||||
</a>
|
||||
@ -253,11 +288,14 @@ jobs:
|
||||
<a href="https://github.com/ryanhex53" title="ryanhex53">
|
||||
<img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/>
|
||||
</a>
|
||||
<a href="https://github.com/eryajf" title="二丫讲梵">
|
||||
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
|
||||
<a href="https://github.com/catcto" title="catcto">
|
||||
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="catcto"/>
|
||||
</a>
|
||||
<a href="https://github.com/catcto" title="喵仙人">
|
||||
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
|
||||
<a href="https://github.com/itldg" title="老大哥">
|
||||
<img src="https://avatars.githubusercontent.com/u/13432299?v=4" width="42;" alt="老大哥"/>
|
||||
</a>
|
||||
<a href="https://github.com/wsypower" title="魏">
|
||||
<img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt="魏"/>
|
||||
</a>
|
||||
<a href="https://github.com/13812700839" title="花殇">
|
||||
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
|
||||
@ -265,17 +303,23 @@ jobs:
|
||||
<a href="https://github.com/dousha0w0" title="dousha0w0">
|
||||
<img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"/>
|
||||
</a>
|
||||
<a href="https://github.com/Brid9e" title="Brid9e">
|
||||
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Brid9e"/>
|
||||
<a href="https://github.com/Brid9e" title="Joe">
|
||||
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Joe"/>
|
||||
</a>
|
||||
<a href="https://github.com/ch3nnn" title="Ch3nnn">
|
||||
<img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="Ch3nnn"/>
|
||||
<a href="https://github.com/ch3nnn" title="chentong">
|
||||
<img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="chentong"/>
|
||||
</a>
|
||||
<a href="https://github.com/CharlotteZeng" title="hanchZ">
|
||||
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/>
|
||||
</a>
|
||||
<a href="https://github.com/DaiNing810" title="DaiN">
|
||||
<img src="https://avatars.githubusercontent.com/u/94962339?v=4" width="42;" alt="DaiN"/>
|
||||
<a href="https://github.com/ohto-ai" title="Choo">
|
||||
<img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="Choo"/>
|
||||
</a>
|
||||
<a href="https://github.com/Damao2250" title="Damao">
|
||||
<img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/>
|
||||
</a>
|
||||
<a href="https://github.com/dasferco" title="Dasferco">
|
||||
<img src="https://avatars.githubusercontent.com/u/92622404?v=4" width="42;" alt="Dasferco"/>
|
||||
</a>
|
||||
<a href="https://github.com/demigodliu" title="DemigodLiu">
|
||||
<img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/>
|
||||
@ -283,9 +327,21 @@ jobs:
|
||||
<a href="https://github.com/eeeeeio" title="EEEEE">
|
||||
<img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/>
|
||||
</a>
|
||||
<a href="https://github.com/sirius-fan" title="Fan">
|
||||
<img src="https://avatars.githubusercontent.com/u/25720015?v=4" width="42;" alt="Fan"/>
|
||||
</a>
|
||||
<a href="https://github.com/Fuku-L" title="Fuku-L">
|
||||
<img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Fuku-L"/>
|
||||
</a>
|
||||
<a href="https://github.com/gongyeheyu" title="GONGYE Heyu">
|
||||
<img src="https://avatars.githubusercontent.com/u/85177605?v=4" width="42;" alt="GONGYE Heyu"/>
|
||||
</a>
|
||||
<a href="https://github.com/Ding-Kyoma" title="HooinKyoma">
|
||||
<img src="https://avatars.githubusercontent.com/u/44542198?v=4" width="42;" alt="HooinKyoma"/>
|
||||
</a>
|
||||
<a href="https://github.com/ljq" title="Jack Liu">
|
||||
<img src="https://avatars.githubusercontent.com/u/7278286?v=4" width="42;" alt="Jack Liu"/>
|
||||
</a>
|
||||
<a href="https://github.com/jasnzhuang" title="Jason Zhuang">
|
||||
<img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/>
|
||||
</a>
|
||||
@ -304,54 +360,114 @@ jobs:
|
||||
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski">
|
||||
<img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/>
|
||||
</a>
|
||||
<a href="https://github.com/HanaNoryu" title="Noryu">
|
||||
<img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/>
|
||||
<a href="https://github.com/malcolmyu" title="Minghao Yu">
|
||||
<img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/>
|
||||
</a>
|
||||
<a href="https://github.com/Moeyuuko" title="Moeyuuko">
|
||||
<img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/>
|
||||
</a>
|
||||
<a href="https://github.com/mo3et" title="Monet Lee">
|
||||
<img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/>
|
||||
</a>
|
||||
<a href="https://github.com/Perzch" title="Perzch">
|
||||
<img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="Perzch"/>
|
||||
</a>
|
||||
<a href="https://github.com/PipecraftNet" title="Pipecraft">
|
||||
<img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/>
|
||||
</a>
|
||||
<a href="https://github.com/sevenleave" title="Poirot Hercule">
|
||||
<img src="https://avatars.githubusercontent.com/u/24411140?v=4" width="42;" alt="Poirot Hercule"/>
|
||||
</a>
|
||||
<a href="https://github.com/QDelta" title="QDelta">
|
||||
<img src="https://avatars.githubusercontent.com/u/60222316?v=4" width="42;" alt="QDelta"/>
|
||||
</a>
|
||||
<a href="https://github.com/RivailleF" title="RivailleF">
|
||||
<img src="https://avatars.githubusercontent.com/u/93083015?v=4" width="42;" alt="RivailleF"/>
|
||||
</a>
|
||||
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou">
|
||||
<img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/>
|
||||
</a>
|
||||
<a href="https://github.com/SkylarLeo" title="SkylarLeo">
|
||||
<img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="SkylarLeo"/>
|
||||
</a>
|
||||
<a href="https://github.com/YLee9527" title="Terry Young">
|
||||
<img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/>
|
||||
</a>
|
||||
<a href="https://github.com/whb1998a" title="WHB">
|
||||
<img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="WHB"/>
|
||||
</a>
|
||||
<a href="https://github.com/hi-liyan" title="Yan Li">
|
||||
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="Yan Li"/>
|
||||
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()">
|
||||
<img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/>
|
||||
</a>
|
||||
<a href="https://github.com/hi-liyan" title="嘉木旅人">
|
||||
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="嘉木旅人"/>
|
||||
</a>
|
||||
<a href="https://github.com/Yo-gurts" title="Yogurt">
|
||||
<img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/>
|
||||
</a>
|
||||
<a href="https://github.com/dfshizhiqiang" title="Zech">
|
||||
<img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"/>
|
||||
</a>
|
||||
<a href="https://github.com/yikuaibro" title="yikuaibro">
|
||||
<img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"/>
|
||||
</a>
|
||||
<a href="https://github.com/zhu0629" title="cc">
|
||||
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="cc"/>
|
||||
</a>
|
||||
<a href="https://github.com/Leaderzhangyi" title="ZinkCas">
|
||||
<img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/>
|
||||
</a>
|
||||
<a href="https://github.com/y52y" title="Zyj">
|
||||
<img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/>
|
||||
</a>
|
||||
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm">
|
||||
<img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/>
|
||||
</a>
|
||||
<a href="https://github.com/chyok" title="chyok">
|
||||
<img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/>
|
||||
</a>
|
||||
<a href="https://github.com/gaoxiaoduan" title="coderduan">
|
||||
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="coderduan"/>
|
||||
<a href="https://github.com/gaoxiaoduan" title="CoderDuan">
|
||||
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="CoderDuan"/>
|
||||
</a>
|
||||
<a href="https://github.com/cool9203" title="cool9203">
|
||||
<img src="https://avatars.githubusercontent.com/u/29609607?v=4" width="42;" alt="cool9203"/>
|
||||
</a>
|
||||
<a href="https://github.com/fakevn" title="fakevn">
|
||||
<img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/>
|
||||
</a>
|
||||
<a href="https://github.com/fjqz177" title="fjqz177">
|
||||
<img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/>
|
||||
</a>
|
||||
<a href="https://github.com/gi-b716" title="gi-b716">
|
||||
<img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="gi-b716"/>
|
||||
</a>
|
||||
<a href="https://github.com/godotc" title="godotc">
|
||||
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godotc"/>
|
||||
<a href="https://github.com/godotc" title="godot42">
|
||||
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godot42"/>
|
||||
</a>
|
||||
<a href="https://github.com/greyhao" title="greyhao">
|
||||
<img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/>
|
||||
</a>
|
||||
<a href="https://github.com/sunny0826" title="Xudong Guo">
|
||||
<img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/>
|
||||
</a>
|
||||
<a href="https://github.com/gzttcydxx" title="gzttcydxx">
|
||||
<img src="https://avatars.githubusercontent.com/u/50025185?v=4" width="42;" alt="gzttcydxx"/>
|
||||
</a>
|
||||
<a href="https://github.com/hua03" title="hua03">
|
||||
<img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/>
|
||||
</a>
|
||||
<a href="https://github.com/yanxuplay" title="hupilan">
|
||||
<img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/>
|
||||
</a>
|
||||
<a href="https://github.com/hweining" title="hweining">
|
||||
<img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/>
|
||||
</a>
|
||||
<a href="https://github.com/infanx" title="infanx">
|
||||
<img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/>
|
||||
</a>
|
||||
<a href="https://github.com/auroraslot" title="Tang Weize">
|
||||
<img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="Tang Weize"/>
|
||||
</a>
|
||||
<a href="https://github.com/joyfully-W" title="joyfully-W">
|
||||
<img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/>
|
||||
</a>
|
||||
@ -364,6 +480,9 @@ jobs:
|
||||
<a href="https://github.com/genius-kim" title="kim">
|
||||
<img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="kim"/>
|
||||
</a>
|
||||
<a href="https://github.com/kubeme" title="kubernetes for me">
|
||||
<img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/>
|
||||
</a>
|
||||
<a href="https://github.com/larry-xue" title="larry">
|
||||
<img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/>
|
||||
</a>
|
||||
@ -373,9 +492,6 @@ jobs:
|
||||
<a href="https://github.com/lykjjj" title="lykjjj">
|
||||
<img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/>
|
||||
</a>
|
||||
<a href="https://github.com/mancuoj" title="mancuoj">
|
||||
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
|
||||
</a>
|
||||
<a href="https://github.com/miclon-dev" title="miclon-dev">
|
||||
<img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/>
|
||||
</a>
|
||||
@ -385,26 +501,56 @@ jobs:
|
||||
<a href="https://github.com/phygerr" title="phygerr">
|
||||
<img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/>
|
||||
</a>
|
||||
<a href="https://github.com/Mowmowj" title="shelton">
|
||||
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="shelton"/>
|
||||
<a href="https://github.com/Mowmowj" title="nexo">
|
||||
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="nexo"/>
|
||||
</a>
|
||||
<a href="https://github.com/wjjwkwindy" title="wjjwkwindy">
|
||||
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="wjjwkwindy"/>
|
||||
<a href="https://github.com/swift-fs" title="swift">
|
||||
<img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift"/>
|
||||
</a>
|
||||
<a href="https://github.com/wannima66" title="tmen">
|
||||
<img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/>
|
||||
</a>
|
||||
<a href="https://github.com/wjjwkwindy" title="Hudson Alen">
|
||||
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="Hudson Alen"/>
|
||||
</a>
|
||||
<a href="https://github.com/xing133" title="xing133">
|
||||
<img src="https://avatars.githubusercontent.com/u/5336490?v=4" width="42;" alt="xing133"/>
|
||||
</a>
|
||||
<a href="https://github.com/zxx-457" title="zxx-457">
|
||||
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx-457"/>
|
||||
<a href="https://github.com/hiyms" title="yms">
|
||||
<img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/>
|
||||
</a>
|
||||
<a href="https://github.com/zhouhw0306" title="zhouhw0306">
|
||||
<img src="https://avatars.githubusercontent.com/u/82752681?v=4" width="42;" alt="zhouhw0306"/>
|
||||
</a>
|
||||
<a href="https://github.com/zxx457" title="zxx457">
|
||||
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/>
|
||||
</a>
|
||||
<a href="https://github.com/lvzhenbo" title="吕振波">
|
||||
<img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/>
|
||||
</a>
|
||||
<a href="https://github.com/qyl27" title="秋雨落">
|
||||
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋雨落"/>
|
||||
<a href="https://github.com/LuckyJie12" title="夜未央">
|
||||
<img src="https://avatars.githubusercontent.com/u/102901105?v=4" width="42;" alt="夜未央"/>
|
||||
</a>
|
||||
<a href="https://github.com/ZIDOUZI" title="ZIDOUZI">
|
||||
<img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="ZIDOUZI"/>
|
||||
</a>
|
||||
<a href="https://github.com/lisheng741" title="芦荟柚子茶">
|
||||
<img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/>
|
||||
</a>
|
||||
<a href="https://github.com/HuaChan233" title="花开花落">
|
||||
<img src="https://avatars.githubusercontent.com/u/75212820?v=4" width="42;" alt="花开花落"/>
|
||||
</a>
|
||||
<a href="https://github.com/1250422131" title="萌新杰少">
|
||||
<img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/>
|
||||
</a>
|
||||
<a href="https://github.com/qwxingzhe" title="行者">
|
||||
<img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/>
|
||||
</a>
|
||||
<a href="https://github.com/binscor" title="Zheng Nai Bin">
|
||||
<img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/>
|
||||
</a>
|
||||
<a href="https://github.com/Zeng-qh" title="都一样">
|
||||
<img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/>
|
||||
</a><!--GAMFC-END-->
|
||||
|
||||
上图贡献者列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 自动生成贡献者图片。
|
||||
|
@ -1,6 +1,6 @@
|
||||
# https://lipanski.com/posts/smallest-docker-image-static-website
|
||||
# https://github.com/lipanski/docker-static-website
|
||||
FROM lipanski/docker-static-website:latest
|
||||
FROM wcjiang/docker-static-website:latest
|
||||
|
||||
# Copy the static website
|
||||
# Use the .dockerignore file to control what ends up inside the image!
|
||||
|
356
README.md
@ -22,9 +22,10 @@ Quick Reference
|
||||
[Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=RedHat&data-info=👆看看还缺点儿什么?-->
|
||||
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
|
||||
[C#](./docs/cs.md)<!--rehype:style=background: rgb(6 147 13);&class=contributing-->
|
||||
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
|
||||
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
|
||||
[FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9);&class=contributing-->
|
||||
[Flask](./docs/flask.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
|
||||
[FastAPI](./docs/fastapi.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
|
||||
[Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254);&class=contributing tag&data-lang=Dart-->
|
||||
[Gitlab CI/CD](./docs/gitlab-ci.md)<!--rehype:style=background: rgb(226 67 41);&class=contributing-->
|
||||
[LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128);&class=contributing-->
|
||||
@ -45,13 +46,12 @@ Quick Reference
|
||||
[Dart](./docs/dart.md)<!--rehype:style=background: rgb(64 196 255);-->
|
||||
[Docker](./docs/docker.md)<!--rehype:style=background: rgb(72 143 223);-->
|
||||
[Dockerfile](./docs/dockerfile.md)<!--rehype:style=background: rgb(0 72 153);&class=tag&data-lang=Docker-->
|
||||
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
|
||||
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
|
||||
[Flask](./docs/flask.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
|
||||
[FastAPI](./docs/fastapi.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
|
||||
[Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254);&class=contributing tag&data-lang=Dart-->
|
||||
[Golang](./docs/golang.md)<!--rehype:style=background: rgb(39 160 193);-->
|
||||
[GraphQL](./docs/graphql.md)<!--rehype:style=background: rgb(214 66 146);-->
|
||||
[INI](./docs/ini.md)<!--rehype:style=background: rgb(57 59 60);-->
|
||||
[JSON](./docs/json.md)<!--rehype:style=background: rgb(57 59 60);-->
|
||||
[Java](./docs/java.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
|
||||
[Julia](./docs/julia.md)<!--rehype:style=background: rgb(26 188 156);&class=contributing&data-info=👆看看还缺点儿什么?-->
|
||||
[Kotlin](./docs/kotlin.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
|
||||
@ -64,43 +64,55 @@ Quick Reference
|
||||
[Python](./docs/python.md)<!--rehype:style=background: rgb(43 91 132);-->
|
||||
[Ruby](./docs/ruby.md)<!--rehype:style=background: rgb(204 52 45);-->
|
||||
[Rust](./docs/rust.md)<!--rehype:style=background: rgb(71 71 71);-->
|
||||
[Scala](./docs/scala.md)<!--rehype:style=background: rgb(34 82 94);-->
|
||||
[Swift](./docs/swift.md)<!--rehype:style=background: rgb(240 81 57);-->
|
||||
[SwiftUI](./docs/swiftui.md)<!--rehype:style=background: rgb(10 127 247);&class=tag&data-lang=swift-->
|
||||
[TOML](./docs/toml.md)<!--rehype:style=background: rgb(132 132 132);-->
|
||||
[YAML](./docs/yaml.md)<!--rehype:style=background: rgb(91 163 230);-->
|
||||
[Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128);-->
|
||||
[Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44);&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?-->
|
||||
<!--rehype:class=home-card-->
|
||||
|
||||
## 配置
|
||||
|
||||
[INI](./docs/ini.md)<!--rehype:style=background: rgb(57 59 60);-->
|
||||
[JSON](./docs/json.md)<!--rehype:style=background: rgb(57 59 60);-->
|
||||
[TOML](./docs/toml.md)<!--rehype:style=background: rgb(132 132 132);-->
|
||||
[YAML](./docs/yaml.md)<!--rehype:style=background: rgb(91 163 230);-->
|
||||
<!--rehype:class=home-card-->
|
||||
|
||||
## 前端
|
||||
|
||||
[前端导航](./docs/feds.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=导航-->
|
||||
[CSS 3](./docs/css.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=CSS-->
|
||||
[Electron](./docs/electron.md)<!--rehype:style=background: rgb(0 72 153);-->
|
||||
[Emmet](./docs/emmet.md)<!--rehype:style=background: rgb(122 203 23);-->
|
||||
[ES 6](./docs/es6.md)<!--rehype:style=background: rgb(122 203 23);&class=tag&data-lang=JS-->
|
||||
[Styled Components](./docs/styled-components.md)<!--rehype:style=background: rgb(221 60 184);&class=tag&data-lang=CSS-->
|
||||
[Stylus](./docs/stylus.md)<!--rehype:style=background: rgb(109 161 63);&class=tag&data-lang=CSS-->
|
||||
[Sass](./docs/sass.md)<!--rehype:style=background: rgb(207 100 154);&class=tag&data-lang=CSS-->
|
||||
[HTML](./docs/html.md)<!--rehype:style=background: rgb(228 77 39);-->
|
||||
[JavaScript](./docs/javascript.md)<!--rehype:style=background: rgb(203 183 31);-->
|
||||
[jQuery](./docs/jquery.md)<!--rehype:style=background: rgb(203 183 31);-->
|
||||
[Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93);&class=tag&data-lang=CSS-->
|
||||
[Next.js](./docs/nextjs.md)<!--rehype:style=background: rgb(0 0 0);&class=tag&data-lang=React-->
|
||||
[React](./docs/react.md)<!--rehype:style=background: rgb(34 143 173);-->
|
||||
[React Router](./docs/reactrouter.md)<!--rehype:style=background: rgb(244 66 79);&class=tag&data-lang=React-->
|
||||
[React Native](./docs/react-native.md)<!--rehype:style=background: rgb(34 143 173);&class=tag&data-lang=React-->
|
||||
[RegEx 正则表达式](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155);-->
|
||||
[TypeScript](./docs/typescript.md)<!--rehype:style=background: rgb(49 120 198);-->
|
||||
[Tailwind CSS](./docs/tailwindcss.md)<!--rehype:style=background: rgb(49 120 198);-->
|
||||
[Vue 2](./docs/vue2.md)<!--rehype:style=background: rgb(64 184 131);-->
|
||||
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=contributing-->
|
||||
[</> htmx](./docs/htmx.md)<!--rehype:style=background: rgb(52 101 164);&class=contributing-->
|
||||
<!--rehype:class=home-card-->
|
||||
|
||||
## CSS
|
||||
|
||||
[CSS 3](./docs/css.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=CSS-->
|
||||
[Styled Components](./docs/styled-components.md)<!--rehype:style=background: rgb(221 60 184);&class=tag&data-lang=CSS-->
|
||||
[Stylus](./docs/stylus.md)<!--rehype:style=background: rgb(109 161 63);&class=tag&data-lang=CSS-->
|
||||
[Sass](./docs/sass.md)<!--rehype:style=background: rgb(207 100 154);&class=tag&data-lang=CSS-->
|
||||
[Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93);&class=tag&data-lang=CSS-->
|
||||
[Tailwind CSS](./docs/tailwindcss.md)<!--rehype:style=background: rgb(49 120 198);-->
|
||||
<!--rehype:class=home-card-->
|
||||
|
||||
## Nodejs
|
||||
|
||||
[Express.js](./docs/expressjs.md)<!--rehype:style=background: rgb(95 151 206);-->
|
||||
[Ejs](./docs/ejs.md)<!--rehype:style=background: rgb(169 30 80);&class=tag&data-lang=JavaScript-->
|
||||
[Jest](./docs/jest.md)<!--rehype:style=background: rgb(153 66 91);-->
|
||||
[Koa.js](./docs/koajs.md)<!--rehype:style=background: rgb(95 151 206);-->
|
||||
[Lerna](./docs/lerna.md)<!--rehype:style=background: rgb(192 132 252);-->
|
||||
@ -127,6 +139,7 @@ Quick Reference
|
||||
[Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=RedHat&data-info=👆看看还缺点儿什么?-->
|
||||
[Awk](./docs/awk.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Conan](./docs/conan.md)<!--rehype:style=background: rgb(0 193 9);&class=tag&data-lang=C/C++-->
|
||||
[Conda](./docs/conda.md)<!--rehype:style=background: rgb(68 168 51);&class=tag&data-lang=Python-->
|
||||
[CocoaPods](./docs/cocoapods.md)<!--rehype:style=background: rgb(251 0 6);&class=tag&data-lang=C/C++-->
|
||||
[Cargo](./docs/cargo.md)<!--rehype:style=background: rgb(71 71 71);&class=tag&data-lang=Rust-->
|
||||
[Curl](./docs/curl.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
@ -134,6 +147,7 @@ Quick Reference
|
||||
[Cron](./docs/cron.md)<!--rehype:style=background: rgb(239 68 68);-->
|
||||
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
|
||||
[Make](./docs/make.md)<!--rehype:style=background: rgb(99 99 99);&class=contributing-->
|
||||
[Gdb](./docs/gdb.md)<!--rehype:style=background: rgb(215 89 62);-->
|
||||
[Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62);-->
|
||||
[Grep](./docs/grep.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Find](./docs/find.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
@ -143,21 +157,27 @@ Quick Reference
|
||||
[Netstat](./docs/netstat.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[iptables](./docs/iptables.md)<!--rehype:style=background: rgb(32 74 135);-->
|
||||
[jq](./docs/jq.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=JSON-->
|
||||
[Justfile](./docs/justfile.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Lsof](./docs/lsof.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135);-->
|
||||
[Netcat](./docs/netcat.md)<!--rehype:style=background: rgb(4 92 135);-->
|
||||
[Sed](./docs/sed.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[OpenSSL](./docs/openssl.md)<!--rehype:style=background: rgb(114 20 18);-->
|
||||
[ps](./docs/ps.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[Sed](./docs/sed.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Systemd](./docs/systemd.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[SSH](./docs/ssh.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[Subversion (SVN)](./docs/subversion.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[Screen](./docs/screen.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[Sysdig](./docs/sysdig.md)<!--rehype:style=background: rgb(1 171 199);-->
|
||||
[Tmux](./docs/tmux.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[Taskset](./docs/taskset.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[YUM](./docs/yum.md)<!--rehype:style=background: rgb(86 86 123);-->
|
||||
[CMD](./docs/cmd.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[Zip](./docs/zip.md)<!--rehype:style=background: rgb(99 99 99);-->
|
||||
[APT](./docs/apt.md)<!--rehype:style=background: rgb(30 144 255);-->
|
||||
[tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62);-->
|
||||
[pacman](./docs/pacman.md)<!--rehype:style=background: rgb(24 147 209);&class=tag&data-lang=archlinux&class=contributing-->
|
||||
[Linux Command](./docs/linux-command.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=命令速查-->
|
||||
<!--rehype:class=home-card-->
|
||||
|
||||
## 数据库
|
||||
@ -175,6 +195,7 @@ Quick Reference
|
||||
[Adobe Photoshop](./docs/adobe-photoshop.md)<!--rehype:style=background: rgb(49 168 255);-->
|
||||
[Adobe XD](./docs/adobe-xd.md)<!--rehype:style=background: rgb(255 97 246);-->
|
||||
[Android Studio](./docs/android-studio.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Blender](./docs/blender.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Firefox](./docs/firefox.md)<!--rehype:style=background: rgb(253 53 76);-->
|
||||
[Gmail](./docs/gmail.md)<!--rehype:style=background: rgb(234 67 54);-->
|
||||
[Gitlab](./docs/gitlab.md)<!--rehype:style=background: rgb(226 67 41);-->
|
||||
@ -190,15 +211,17 @@ Quick Reference
|
||||
|
||||
## 其它
|
||||
|
||||
[Quick Reference](./docs/quickreference.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=排版说明-->
|
||||
[Quick Reference](./docs/quickreference.md)<!--rehype:style=background: rgb(0 182 122);&class=tag&data-lang=排版说明-->
|
||||
[Aspect Ratio](./docs/aspect-ratio.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[ASCII Code](./docs/ascii-code.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Symbol Code](./docs/symbol-code.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Github Actions](./docs/github-actions.md)<!--rehype:style=background: rgb(121 184 255);-->
|
||||
[Gitlab CI/CD](./docs/gitlab-ci.md)<!--rehype:style=background: rgb(226 67 41);&class=contributing-->
|
||||
[Colors Named](./docs/colors-named.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=CSS-->
|
||||
[HTTP 状态码](./docs/http-status-code.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[HTML 字符实体](./docs/html-char.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=HTML-->
|
||||
[ISO 639-1 Language Code](./docs/iso-639-1.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Emoji](./docs/emoji.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Emoji](./docs/emoji.md)<!--rehype:style=\-\-bg\-opacity: 0.75;background-image: linear-gradient(to left, rgba(74 222 128 / var(\-\-bg\-opacity)), rgba(59 130 246 / var(\-\-bg\-opacity)));-->
|
||||
[MIME types](./docs/mime.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
[Resolutions](./docs/resolutions.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||
<!--rehype:class=home-card-->
|
||||
@ -208,7 +231,7 @@ Quick Reference
|
||||
|
||||
上面的列表没有看到你想要的? 您是否正在寻找一些备忘清单或参考资料,或者您有一些片段备忘清单要分享,这是一个最好的机会!
|
||||
|
||||
[`请求添加备忘单(速查表)`](https://github.com/jaywcjlove/reference/issues/new?title=【备忘清单】+请求%3A+&labels=request&template=cheatsheet-request.md&assignee=jaywcjlove)<!--rehype:class=home-button&style=margin-top:2rem&target=__blank-->
|
||||
[`请求添加备忘单(速查表)`](https://github.com/jaywcjlove/reference/issues/new?title=【备忘清单】+请求%3A+&labels=request&template=cheatsheet-request.md&assignee=)<!--rehype:class=home-button&style=margin-top:2rem&target=__blank-->
|
||||
[`我有一张备忘单(速查表)`](https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md)<!--rehype:class=home-button text-grey&target=__blank-->
|
||||
<!--rehype:style=margin-top:3rem-->
|
||||
|
||||
@ -218,39 +241,75 @@ Quick Reference
|
||||
请参阅 [Quick Reference](./docs/quickreference.md) 了解如何开始。一如既往,感谢我们出色的[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)!
|
||||
<!--rehype:style=padding-bottom:1rem;-->
|
||||
|
||||
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调™">
|
||||
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调™"/>
|
||||
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调">
|
||||
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
|
||||
</a>
|
||||
<a href="https://github.com/fwqaaq" title="fw_qaq">
|
||||
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fw_qaq"/>
|
||||
<a href="https://github.com/fwqaaq" title="fwqaaq">
|
||||
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/>
|
||||
</a>
|
||||
<a href="https://github.com/mofelee" title="mofelee">
|
||||
<img src="https://avatars.githubusercontent.com/u/5069410?v=4" width="42;" alt="mofelee"/>
|
||||
</a>
|
||||
<a href="https://github.com/JeffersonHuang" title="Jefferson">
|
||||
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson"/>
|
||||
<a href="https://github.com/JeffersonHuang" title="Jefferson Huang">
|
||||
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/>
|
||||
</a>
|
||||
<a href="https://github.com/Alex-Programer" title="Alex">
|
||||
<a href="https://github.com/aixcyi" title="砹小翼">
|
||||
<img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="砹小翼"/>
|
||||
</a>
|
||||
<a href="https://github.com/Alex-Programmer-Bro" title="Alex">
|
||||
<img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/>
|
||||
</a>
|
||||
<a href="https://github.com/expoli" title="expoli">
|
||||
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
|
||||
</a>
|
||||
<a href="https://github.com/LiuYuan-SHU" title="Liuyuan">
|
||||
<img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Liuyuan"/>
|
||||
</a>
|
||||
<a href="https://github.com/heStudio-Network" title="醉、倾城">
|
||||
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
|
||||
</a>
|
||||
<a href="https://github.com/sjh42" title="42:p">
|
||||
<img src="https://avatars.githubusercontent.com/u/34529275?v=4" width="42;" alt="42:p"/>
|
||||
</a>
|
||||
<a href="https://github.com/LufsX" title="LufsX">
|
||||
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
|
||||
</a>
|
||||
<a href="https://github.com/expoli" title="expoli">
|
||||
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
|
||||
</a>
|
||||
<a href="https://github.com/k23223" title="k23223">
|
||||
<img src="https://avatars.githubusercontent.com/u/57606136?v=4" width="42;" alt="k23223"/>
|
||||
</a>
|
||||
<a href="https://github.com/eryajf" title="二丫讲梵">
|
||||
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
|
||||
</a>
|
||||
<a href="https://github.com/Country-If" title="Maylon">
|
||||
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
|
||||
</a>
|
||||
<a href="https://github.com/LiuYuan-SHU" title="Yuan Liu">
|
||||
<img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Yuan Liu"/>
|
||||
</a>
|
||||
<a href="https://github.com/mailbaoer" title="baoer">
|
||||
<img src="https://avatars.githubusercontent.com/u/5282978?v=4" width="42;" alt="baoer"/>
|
||||
</a>
|
||||
<a href="https://github.com/chaos-cn" title="chaos">
|
||||
<img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/>
|
||||
</a>
|
||||
<a href="https://github.com/MackDing" title="Blossom">
|
||||
<img src="https://avatars.githubusercontent.com/u/19878893?v=4" width="42;" alt="Blossom"/>
|
||||
</a>
|
||||
<a href="https://github.com/MarioMang" title="MarioMang">
|
||||
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="MarioMang"/>
|
||||
</a>
|
||||
<a href="https://github.com/qyl27" title="秋 雨落">
|
||||
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋 雨落"/>
|
||||
</a>
|
||||
<a href="https://github.com/undefined-hestudio" title="undefined">
|
||||
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/>
|
||||
</a>
|
||||
<a href="https://github.com/webeautiful" title="Albert">
|
||||
<img src="https://avatars.githubusercontent.com/u/3364316?v=4" width="42;" alt="Albert"/>
|
||||
</a>
|
||||
<a href="https://github.com/dadatom" title="Da Da">
|
||||
<img src="https://avatars.githubusercontent.com/u/33886943?v=4" width="42;" alt="Da Da"/>
|
||||
</a>
|
||||
<a href="https://github.com/XYZscratcher" title="XYZ">
|
||||
<img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/>
|
||||
</a>
|
||||
<a href="https://github.com/1834423612" title="kjch">
|
||||
<img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/>
|
||||
</a>
|
||||
<a href="https://github.com/mancuoj" title="mancuoj">
|
||||
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
|
||||
</a>
|
||||
<a href="https://github.com/pangxiaoli" title="pangxiaoli">
|
||||
<img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/>
|
||||
</a>
|
||||
@ -260,11 +319,14 @@ Quick Reference
|
||||
<a href="https://github.com/ryanhex53" title="ryanhex53">
|
||||
<img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/>
|
||||
</a>
|
||||
<a href="https://github.com/eryajf" title="二丫讲梵">
|
||||
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
|
||||
<a href="https://github.com/catcto" title="catcto">
|
||||
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="catcto"/>
|
||||
</a>
|
||||
<a href="https://github.com/catcto" title="喵仙人">
|
||||
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
|
||||
<a href="https://github.com/itldg" title="老大哥">
|
||||
<img src="https://avatars.githubusercontent.com/u/13432299?v=4" width="42;" alt="老大哥"/>
|
||||
</a>
|
||||
<a href="https://github.com/wsypower" title="魏">
|
||||
<img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt="魏"/>
|
||||
</a>
|
||||
<a href="https://github.com/13812700839" title="花殇">
|
||||
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
|
||||
@ -272,17 +334,23 @@ Quick Reference
|
||||
<a href="https://github.com/dousha0w0" title="dousha0w0">
|
||||
<img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"/>
|
||||
</a>
|
||||
<a href="https://github.com/Brid9e" title="Brid9e">
|
||||
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Brid9e"/>
|
||||
<a href="https://github.com/Brid9e" title="Joe">
|
||||
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Joe"/>
|
||||
</a>
|
||||
<a href="https://github.com/ch3nnn" title="Ch3nnn">
|
||||
<img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="Ch3nnn"/>
|
||||
<a href="https://github.com/ch3nnn" title="chentong">
|
||||
<img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="chentong"/>
|
||||
</a>
|
||||
<a href="https://github.com/CharlotteZeng" title="hanchZ">
|
||||
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/>
|
||||
</a>
|
||||
<a href="https://github.com/DaiNing810" title="DaiN">
|
||||
<img src="https://avatars.githubusercontent.com/u/94962339?v=4" width="42;" alt="DaiN"/>
|
||||
<a href="https://github.com/ohto-ai" title="Choo">
|
||||
<img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="Choo"/>
|
||||
</a>
|
||||
<a href="https://github.com/Damao2250" title="Damao">
|
||||
<img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/>
|
||||
</a>
|
||||
<a href="https://github.com/dasferco" title="Dasferco">
|
||||
<img src="https://avatars.githubusercontent.com/u/92622404?v=4" width="42;" alt="Dasferco"/>
|
||||
</a>
|
||||
<a href="https://github.com/demigodliu" title="DemigodLiu">
|
||||
<img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/>
|
||||
@ -290,9 +358,21 @@ Quick Reference
|
||||
<a href="https://github.com/eeeeeio" title="EEEEE">
|
||||
<img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/>
|
||||
</a>
|
||||
<a href="https://github.com/sirius-fan" title="Fan">
|
||||
<img src="https://avatars.githubusercontent.com/u/25720015?v=4" width="42;" alt="Fan"/>
|
||||
</a>
|
||||
<a href="https://github.com/Fuku-L" title="Fuku-L">
|
||||
<img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Fuku-L"/>
|
||||
</a>
|
||||
<a href="https://github.com/gongyeheyu" title="GONGYE Heyu">
|
||||
<img src="https://avatars.githubusercontent.com/u/85177605?v=4" width="42;" alt="GONGYE Heyu"/>
|
||||
</a>
|
||||
<a href="https://github.com/Ding-Kyoma" title="HooinKyoma">
|
||||
<img src="https://avatars.githubusercontent.com/u/44542198?v=4" width="42;" alt="HooinKyoma"/>
|
||||
</a>
|
||||
<a href="https://github.com/ljq" title="Jack Liu">
|
||||
<img src="https://avatars.githubusercontent.com/u/7278286?v=4" width="42;" alt="Jack Liu"/>
|
||||
</a>
|
||||
<a href="https://github.com/jasnzhuang" title="Jason Zhuang">
|
||||
<img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/>
|
||||
</a>
|
||||
@ -311,54 +391,114 @@ Quick Reference
|
||||
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski">
|
||||
<img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/>
|
||||
</a>
|
||||
<a href="https://github.com/HanaNoryu" title="Noryu">
|
||||
<img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/>
|
||||
<a href="https://github.com/malcolmyu" title="Minghao Yu">
|
||||
<img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/>
|
||||
</a>
|
||||
<a href="https://github.com/Moeyuuko" title="Moeyuuko">
|
||||
<img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/>
|
||||
</a>
|
||||
<a href="https://github.com/mo3et" title="Monet Lee">
|
||||
<img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/>
|
||||
</a>
|
||||
<a href="https://github.com/Perzch" title="Perzch">
|
||||
<img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="Perzch"/>
|
||||
</a>
|
||||
<a href="https://github.com/PipecraftNet" title="Pipecraft">
|
||||
<img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/>
|
||||
</a>
|
||||
<a href="https://github.com/sevenleave" title="Poirot Hercule">
|
||||
<img src="https://avatars.githubusercontent.com/u/24411140?v=4" width="42;" alt="Poirot Hercule"/>
|
||||
</a>
|
||||
<a href="https://github.com/QDelta" title="QDelta">
|
||||
<img src="https://avatars.githubusercontent.com/u/60222316?v=4" width="42;" alt="QDelta"/>
|
||||
</a>
|
||||
<a href="https://github.com/RivailleF" title="RivailleF">
|
||||
<img src="https://avatars.githubusercontent.com/u/93083015?v=4" width="42;" alt="RivailleF"/>
|
||||
</a>
|
||||
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou">
|
||||
<img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/>
|
||||
</a>
|
||||
<a href="https://github.com/SkylarLeo" title="SkylarLeo">
|
||||
<img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="SkylarLeo"/>
|
||||
</a>
|
||||
<a href="https://github.com/YLee9527" title="Terry Young">
|
||||
<img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/>
|
||||
</a>
|
||||
<a href="https://github.com/whb1998a" title="WHB">
|
||||
<img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="WHB"/>
|
||||
</a>
|
||||
<a href="https://github.com/hi-liyan" title="Yan Li">
|
||||
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="Yan Li"/>
|
||||
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()">
|
||||
<img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/>
|
||||
</a>
|
||||
<a href="https://github.com/hi-liyan" title="嘉木旅人">
|
||||
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="嘉木旅人"/>
|
||||
</a>
|
||||
<a href="https://github.com/Yo-gurts" title="Yogurt">
|
||||
<img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/>
|
||||
</a>
|
||||
<a href="https://github.com/dfshizhiqiang" title="Zech">
|
||||
<img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"/>
|
||||
</a>
|
||||
<a href="https://github.com/yikuaibro" title="yikuaibro">
|
||||
<img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"/>
|
||||
</a>
|
||||
<a href="https://github.com/zhu0629" title="cc">
|
||||
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="cc"/>
|
||||
</a>
|
||||
<a href="https://github.com/Leaderzhangyi" title="ZinkCas">
|
||||
<img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/>
|
||||
</a>
|
||||
<a href="https://github.com/y52y" title="Zyj">
|
||||
<img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/>
|
||||
</a>
|
||||
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm">
|
||||
<img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/>
|
||||
</a>
|
||||
<a href="https://github.com/chyok" title="chyok">
|
||||
<img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/>
|
||||
</a>
|
||||
<a href="https://github.com/gaoxiaoduan" title="coderduan">
|
||||
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="coderduan"/>
|
||||
<a href="https://github.com/gaoxiaoduan" title="CoderDuan">
|
||||
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="CoderDuan"/>
|
||||
</a>
|
||||
<a href="https://github.com/cool9203" title="cool9203">
|
||||
<img src="https://avatars.githubusercontent.com/u/29609607?v=4" width="42;" alt="cool9203"/>
|
||||
</a>
|
||||
<a href="https://github.com/fakevn" title="fakevn">
|
||||
<img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/>
|
||||
</a>
|
||||
<a href="https://github.com/fjqz177" title="fjqz177">
|
||||
<img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/>
|
||||
</a>
|
||||
<a href="https://github.com/gi-b716" title="gi-b716">
|
||||
<img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="gi-b716"/>
|
||||
</a>
|
||||
<a href="https://github.com/godotc" title="godotc">
|
||||
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godotc"/>
|
||||
<a href="https://github.com/godotc" title="godot42">
|
||||
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godot42"/>
|
||||
</a>
|
||||
<a href="https://github.com/greyhao" title="greyhao">
|
||||
<img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/>
|
||||
</a>
|
||||
<a href="https://github.com/sunny0826" title="Xudong Guo">
|
||||
<img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/>
|
||||
</a>
|
||||
<a href="https://github.com/gzttcydxx" title="gzttcydxx">
|
||||
<img src="https://avatars.githubusercontent.com/u/50025185?v=4" width="42;" alt="gzttcydxx"/>
|
||||
</a>
|
||||
<a href="https://github.com/hua03" title="hua03">
|
||||
<img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/>
|
||||
</a>
|
||||
<a href="https://github.com/yanxuplay" title="hupilan">
|
||||
<img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/>
|
||||
</a>
|
||||
<a href="https://github.com/hweining" title="hweining">
|
||||
<img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/>
|
||||
</a>
|
||||
<a href="https://github.com/infanx" title="infanx">
|
||||
<img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/>
|
||||
</a>
|
||||
<a href="https://github.com/auroraslot" title="Tang Weize">
|
||||
<img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="Tang Weize"/>
|
||||
</a>
|
||||
<a href="https://github.com/joyfully-W" title="joyfully-W">
|
||||
<img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/>
|
||||
</a>
|
||||
@ -371,6 +511,9 @@ Quick Reference
|
||||
<a href="https://github.com/genius-kim" title="kim">
|
||||
<img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="kim"/>
|
||||
</a>
|
||||
<a href="https://github.com/kubeme" title="kubernetes for me">
|
||||
<img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/>
|
||||
</a>
|
||||
<a href="https://github.com/larry-xue" title="larry">
|
||||
<img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/>
|
||||
</a>
|
||||
@ -380,9 +523,6 @@ Quick Reference
|
||||
<a href="https://github.com/lykjjj" title="lykjjj">
|
||||
<img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/>
|
||||
</a>
|
||||
<a href="https://github.com/mancuoj" title="mancuoj">
|
||||
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
|
||||
</a>
|
||||
<a href="https://github.com/miclon-dev" title="miclon-dev">
|
||||
<img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/>
|
||||
</a>
|
||||
@ -392,26 +532,56 @@ Quick Reference
|
||||
<a href="https://github.com/phygerr" title="phygerr">
|
||||
<img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/>
|
||||
</a>
|
||||
<a href="https://github.com/Mowmowj" title="shelton">
|
||||
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="shelton"/>
|
||||
<a href="https://github.com/Mowmowj" title="nexo">
|
||||
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="nexo"/>
|
||||
</a>
|
||||
<a href="https://github.com/wjjwkwindy" title="wjjwkwindy">
|
||||
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="wjjwkwindy"/>
|
||||
<a href="https://github.com/swift-fs" title="swift">
|
||||
<img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift"/>
|
||||
</a>
|
||||
<a href="https://github.com/wannima66" title="tmen">
|
||||
<img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/>
|
||||
</a>
|
||||
<a href="https://github.com/wjjwkwindy" title="Hudson Alen">
|
||||
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="Hudson Alen"/>
|
||||
</a>
|
||||
<a href="https://github.com/xing133" title="xing133">
|
||||
<img src="https://avatars.githubusercontent.com/u/5336490?v=4" width="42;" alt="xing133"/>
|
||||
</a>
|
||||
<a href="https://github.com/zxx-457" title="zxx-457">
|
||||
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx-457"/>
|
||||
<a href="https://github.com/hiyms" title="yms">
|
||||
<img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/>
|
||||
</a>
|
||||
<a href="https://github.com/zhouhw0306" title="zhouhw0306">
|
||||
<img src="https://avatars.githubusercontent.com/u/82752681?v=4" width="42;" alt="zhouhw0306"/>
|
||||
</a>
|
||||
<a href="https://github.com/zxx457" title="zxx457">
|
||||
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/>
|
||||
</a>
|
||||
<a href="https://github.com/lvzhenbo" title="吕振波">
|
||||
<img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/>
|
||||
</a>
|
||||
<a href="https://github.com/qyl27" title="秋雨落">
|
||||
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋雨落"/>
|
||||
<a href="https://github.com/LuckyJie12" title="夜未央">
|
||||
<img src="https://avatars.githubusercontent.com/u/102901105?v=4" width="42;" alt="夜未央"/>
|
||||
</a>
|
||||
<a href="https://github.com/ZIDOUZI" title="ZIDOUZI">
|
||||
<img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="ZIDOUZI"/>
|
||||
</a>
|
||||
<a href="https://github.com/lisheng741" title="芦荟柚子茶">
|
||||
<img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/>
|
||||
</a>
|
||||
<a href="https://github.com/HuaChan233" title="花开花落">
|
||||
<img src="https://avatars.githubusercontent.com/u/75212820?v=4" width="42;" alt="花开花落"/>
|
||||
</a>
|
||||
<a href="https://github.com/1250422131" title="萌新杰少">
|
||||
<img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/>
|
||||
</a>
|
||||
<a href="https://github.com/qwxingzhe" title="行者">
|
||||
<img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/>
|
||||
</a>
|
||||
<a href="https://github.com/binscor" title="Zheng Nai Bin">
|
||||
<img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/>
|
||||
</a>
|
||||
<a href="https://github.com/Zeng-qh" title="都一样">
|
||||
<img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/>
|
||||
</a><!--GAMFC-END-->
|
||||
|
||||
[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 根据提交次数的先后顺序自动生成
|
||||
@ -420,41 +590,63 @@ Quick Reference
|
||||
## 国内镜像网站
|
||||
<!--rehype:wrap-style=text-align: center;max-width: 650px;margin: 0 auto;&class=home-title-reset-->
|
||||
|
||||
由于中国国内访问,时常打不开,你可以访问下面镜像网站。推荐自己的[镜像网站](https://github.com/jaywcjlove/reference/discussions/206#discussion-4625735)
|
||||
由于中国国内访问,时常打不开,你可以访问下面镜像网站(国内打不开的不再收录)。推荐自己的[镜像网站](https://github.com/jaywcjlove/reference/discussions/206#discussion-4625735)
|
||||
|
||||
[server.wiki](https://ref.server.wiki)<!--rehype:target=_blank-->
|
||||
[nihaosi.com](https://refs.nihaosi.com)<!--rehype:target=_blank-->
|
||||
[quickref.cn](https://quickref.cn)<!--rehype:target=_blank-->
|
||||
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank-->
|
||||
[aibk.cn](https://quickref.aibk.cn)<!--rehype:target=_blank-->
|
||||
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank-->
|
||||
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank-->
|
||||
[quickref.hestudio.net](https://quickref.hestudio.net)<!--rehype:target=_blank&class=contributing&data-info=👆整点自动同步-->
|
||||
[qiubit.cc](http://ref.qiubit.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[guoxudong.io](https://reference.guoxudong.io/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[moeyuuko.com](https://ref.moeyuuko.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[defense.ink](https://ref.defense.ink)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[terryyoung.cn](http://ref.terryyoung.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆每周一三五自动同步-->
|
||||
[quickref.binscor.top](https://quickref.binscor.top)<!--rehype:target=_blank&data-info=👆每天自动同步-->
|
||||
[fxkjnj.com](https://ref.fxkjnj.com/)<!--rehype:target=_blank&data-info=👆每天自动同步-->
|
||||
[haah.net](https://ref.haah.net)<!--rehype:target=_blank&data-info=👆每天自动同步-->
|
||||
[laoleng.vip](http://bbs.laoleng.vip/reference/)<!--rehype:target=_blank-->
|
||||
[liujiapeng.com](https://www.liujiapeng.com/)<!--rehype:target=_blank-->
|
||||
[dbyun.net](https://www.dbyun.net/reference/index.html)<!--rehype:target=_blank-->
|
||||
[dc6.fun](https://dc6.fun/reference/)<!--rehype:target=_blank-->
|
||||
[if010.com](https://quickref.if010.com/)<!--rehype:target=_blank-->
|
||||
[pipecraft.net](https://quickref.pipecraft.net/)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
|
||||
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
|
||||
[1han.wiki](https://code.1han.wiki/)<!--rehype:target=_blank-->
|
||||
[linzhe.top](https://linzhe.top/)<!--rehype:target=_blank-->
|
||||
[xushanxiang.com](https://xushanxiang.com/ref/)<!--rehype:target=_blank-->
|
||||
[winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
|
||||
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
|
||||
[hestudio.org](https://quickref.hestudio.org)<!--rehype:target=_blank&class=contributing&data-info=👆整点自动同步-->
|
||||
[surcode.cn](https://ref.surcode.cn)<!--rehype:target=_blank-->
|
||||
[cms.im](https://quickref.cms.im/)<!--rehype:target=_blank-->
|
||||
[nuomiphp.com](https://reference.tool.nuomiphp.com/)<!--rehype:target=_blank-->
|
||||
[eryajf.net](https://ref.eryajf.net/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[kjchmc.cn](https://ref.kjchmc.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆实时同步,多线路-->
|
||||
[likeadmin.cn](https://www.likeadmin.cn/quickref/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[qiubit.cc](http://ref.qiubit.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[eryajf.net](https://ref.eryajf.net/)<!--rehype:target=_blank-->
|
||||
[kjchmc.cn](https://ref.kjchmc.cn/)<!--rehype:target=_blank-->
|
||||
[aoh.cc](https://aoh.cc/)<!--rehype:target=_blank-->
|
||||
[reference.code05.com](https://reference.code05.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[kyoma.top](https://reference.kyoma.top/)<!--rehype:target=_blank&class=contributing&data-info=👆实时同步-->
|
||||
[quickreference.pages.dev](https://quickreference.pages.dev/)<!--rehype:target=_blank-->
|
||||
[code05.com](https://reference.code05.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[xhfun.cn](https://ref.xhfun.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
|
||||
[btaw.cn](https://btaw.cn/qr)<!--rehype:target=_blank&class=contributing-->
|
||||
[lzw.me](https://lzw.me/x/reference/)<!--rehype:target=_blank-->
|
||||
[itcent.cn](https://code.itcent.cn/)<!--rehype:target=_blank-->
|
||||
[coolxy.top](https://refer.coolxy.top)<!--rehype:target=_blank-->
|
||||
[notes-bin.top](https://notes-bin.top)<!--rehype:target=_blank-->
|
||||
[tangcc.cn](https://web.tangcc.cn)<!--rehype:target=_blank-->
|
||||
[xadocker.cn](https://reference.xadocker.cn)<!--rehype:target=_blank-->
|
||||
[trtu.com.cn](https://reference.trtu.com.cn)<!--rehype:target=_blank-->
|
||||
[lzzzt.cn](https://ref.lzzzt.cn)<!--rehype:target=_blank-->
|
||||
[kclouder.cn](https://www.kclouder.cn/reference)<!--rehype:target=_blank-->
|
||||
[djcoder.com](https://doc.djcoder.com)<!--rehype:target=_blank-->
|
||||
[qirishuzhai.com](http://qirishuzhai.com/quickref)<!--rehype:target=_blank-->
|
||||
[longdada.me](https://ref.longdada.me)<!--rehype:target=_blank-->
|
||||
[xalaok.top](https://ref.xalaok.top)<!--rehype:target=_blank-->
|
||||
[zhangyuanqian.top](https://reference.zhangyuanqian.top/)<!--rehype:target=_blank-->
|
||||
[sosloli.com](https://ref.sosloli.com)<!--rehype:target=_blank-->
|
||||
[chenze.cloud](https://quick.chenze.cloud)<!--rehype:target=_blank-->
|
||||
[ref.v-ta.com](https://ref.v-ta.com)<!--rehype:target=_blank-->
|
||||
[hao.kim](https://ref.hao.kim)<!--rehype:target=_blank-->
|
||||
[tool.sakura.vin](https://tool.sakura.vin/ref/)<!--rehype:target=_blank-->
|
||||
[guoyaxue.top](https://reference.guoyaxue.top/)<!--rehype:target=_blank-->
|
||||
[chenchen.site](https://img.chenchen.site/reference/)<!--rehype:target=_blank-->
|
||||
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank-->
|
||||
[itzcy.com](https://reference.itzcy.com/)<!--rehype:target=_blank-->
|
||||
<!--rehype:class=home-card home-links-->
|
||||
|
||||
如果你有资源,可以很方便部署 web 版,这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
|
||||
如果你有资源,可以很方便[部署 web 版](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637),这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
|
||||
|
||||
<!--rehype:ignore:start-->
|
||||
## License
|
||||
|
3
assets/blender.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
|
||||
<path d="M341.333333 128C341.333333 142.506667 348.586667 157.44 362.666667 165.546667L512 256 106.666667 256C71.253333 256 42.666667 284.586667 42.666667 320 42.666667 355.413333 71.253333 384 106.666667 384L358.826667 384 85.333333 554.666667C49.493333 576 42.666667 606.72 42.666667 640 42.666667 682.666667 75.52 725.333333 128 725.333333 157.44 725.333333 187.306667 704 213.333333 682.666667L298.666667 613.546667C307.2 794.453333 456.96 938.666667 640 938.666667 828.586667 938.666667 981.333333 785.92 981.333333 597.333333 981.333333 472.746667 914.346667 362.666667 814.506667 304.213333 813.226667 303.36 811.946667 302.08 810.666667 301.226667 810.666667 301.226667 807.253333 298.666667 804.693333 297.386667 672.426667 208.213333 555.946667 158.72 407.466667 90.88 398.506667 87.04 390.826667 85.333333 384 85.333333 358.4 85.333333 341.333333 104.96 341.333333 128M640 384C757.76 384 853.333333 479.573333 853.333333 597.333333 853.333333 715.093333 757.76 810.666667 640 810.666667 522.24 810.666667 426.666667 715.093333 426.666667 597.333333 426.666667 479.573333 522.24 384 640 384M640 448C557.653333 448 490.666667 514.986667 490.666667 597.333333 490.666667 679.68 557.653333 746.666667 640 746.666667 722.346667 746.666667 789.333333 679.68 789.333333 597.333333 789.333333 514.986667 722.346667 448 640 448Z"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
1
assets/conda.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg height="1em" width="1em" role="img" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Anaconda</title><path d="M12.045.033a12.181 12.182 0 00-1.361.078 17.512 17.513 0 011.813 1.433l.48.438-.465.45a15.047 15.048 0 00-1.126 1.205l-.178.215a8.527 8.527 0 01.86-.05 8.154 8.155 0 11-4.286 15.149 15.764 15.765 0 01-1.841.106h-.86a21.847 21.848 0 00.264 2.866 11.966 11.967 0 106.7-21.89zM8.17.678a12.181 12.182 0 00-2.624 1.275 15.506 15.507 0 011.813.43A18.551 18.552 0 018.17.678zM9.423.75a16.237 16.238 0 00-.995 1.998 16.15 16.152 0 011.605.66 6.98 6.98 0 01.43-.509c.234-.286.472-.559.716-.817A15.047 15.048 0 009.423.75zM4.68 2.949a14.969 14.97 0 000 2.336c.587-.065 1.196-.1 1.812-.107a16.617 16.617 0 01.48-1.748 16.48 16.481 0 00-2.292-.481zM3.62 3.5A11.938 11.938 0 001.762 5.88a17.004 17.004 0 011.877-.444A17.39 17.391 0 013.62 3.5zm4.406.287c-.143.437-.265.888-.38 1.347a8.255 8.255 0 011.67-.803c-.423-.2-.845-.38-1.29-.544zM6.3 6.216a14.051 14.052 0 00-1.555.108c.064.523.157 1.038.272 1.554a8.39 8.391 0 011.283-1.662zm-2.55.137a15.313 15.313 0 00-2.602.716h-.078v.079a17.104 17.105 0 001.267 2.544l.043.071.072-.049a16.309 16.31 0 011.734-1.083l.057-.035V8.54a16.867 16.868 0 01-.408-2.094v-.092zM.644 8.095l-.063.2A11.844 11.845 0 000 11.655v.209l.143-.152a17.706 17.707 0 011.584-1.447l.057-.043-.043-.064a16.18 16.18 0 01-1.025-1.87zm3.77 1.253l-.18.1c-.465.273-.93.573-1.375.889l-.065.05.05.064c.309.437.645.867.996 1.276l.137.165v-.208a8.176 8.176 0 01.364-2.15zM2.2 10.853l-.072.05a16.574 16.574 0 00-1.813 1.734l-.058.058.066.057a15.449 15.45 0 001.991 1.483l.072.05.043-.08a16.738 16.74 0 011.053-1.64v-.05l-.043-.05a16.99 16.99 0 01-1.19-1.54zm1.855 2.071l-.121.172a15.363 15.363 0 00-.917 1.433l-.043.072.071.043a16.61 16.61 0 001.562.766l.193.086-.086-.193a8.04 8.04 0 01-.66-2.172zm-3.976.48v.2a11.758 11.759 0 00.946 3.326l.078.186.072-.194a16.215 16.216 0 01.845-2l.057-.063-.064-.043a17.197 17.198 0 01-1.776-1.284zm2.543 1.805l-.035.08a15.764 15.765 0 00-.983 2.479v.08h.086a16.15 16.152 0 002.688.5l.072.007v-.086a17.562 17.563 0 01.164-2.056v-.065H4.55a16.266 16.266 0 01-1.849-.896zm2.544 1.169v.114a17.254 17.255 0 00-.151 1.828v.078h.931c.287 0 .624.014.946 0h.209l-.166-.129a8.011 8.011 0 01-1.64-1.834zm-3.29 2.1l.115.172a11.988 11.988 0 002.502 2.737l.157.129v-.201a22.578 22.58 0 01-.2-2.336v-.071h-.072a16.23 16.23 0 01-2.3-.387z"/></svg>
|
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
1
assets/ejs.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em"><path d="M384.28144981 252.31647403v112.80048696L145.20918813 474.54291854 384.28144981 587.88378965v110.53930269L21.43812835 526.28761486v-100.68590819l362.84332146-173.28714866zm246.90017394 102.1173521c0-28.82050958-26.50183907-46.93105778-47.58641778-32.52080298-21.0845787 14.41025479-21.0845787 50.63135118 0 65.04352199 21.08649586 14.41025479 47.58641778-3.70220942 47.58641778-32.52271901zm-86.46152988 88.55216697c-71.49939257-39.1951269-71.49939257-137.71758023 0-176.91462428 71.50130859-39.1951269 161.36227954 10.06609977 161.36227954 88.45827072s-89.86096981 127.65339648-161.36036352 88.45635356zm382.94102812 229.81099065c0-28.82050958-26.50183907-46.93105778-47.58641778-32.52080298-21.0845787 14.41025479-21.0845787 50.63135118 0 65.04160597 21.08649586 14.41025479 47.58641778-3.69837625 47.58641778-32.51888697zm-86.46152988 88.55216583c-71.49939257-39.1951269-71.49939257-137.71758023 0-176.91462315S1002.56187165 594.50062621 1002.56187165 672.89279602s-89.86096981 127.65339648-161.36036352 88.45635356zm-219.70656598 13.75681195 372.53958429-526.21192306H866.73755363l-378.74825784 526.21192306h133.50181432z"></path></svg>
|
After Width: | Height: | Size: 1.2 KiB |
1
assets/es6.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em"><path d="M821.375 500.75c-16.875-11.25-33.75-16.875-56.25-11.25000001-22.50000001 0-33.75 11.25-45 28.12500001-11.25 16.875-11.25 33.75-11.25 56.25s5.625 33.75 22.5 50.62499999c11.25 11.25 28.125 22.50000001 50.625 22.50000001s39.375-5.625 50.625-22.50000001c11.25-11.25 16.875-33.75 16.87500001-61.87499999 0-33.75-5.625-50.625-28.12500001-61.875z"></path><path d="M62 62v900h900V62H62zm292.50000001 618.75H140.75V326.375H343.25v39.375H191.375v106.875h140.625V512H191.375v123.75h163.12500001v45zm230.62499999-22.5c-16.875 16.875-45 22.50000001-78.75 22.5-33.75 0-61.875-11.25-78.75-28.125-22.50000001-16.875-28.125-39.375-28.12500001-67.5V568.25h45v11.25000001c0 22.50000001 5.625 33.75 16.87500001 45 11.25 11.25 28.125 16.875 45 16.87499999 22.50000001 0 39.375-5.625 50.625-16.87499999 5.625-11.25 11.25-22.50000001 11.25-39.37500001 0-11.25-5.625-28.125-16.875-39.375-11.25-11.25-28.125-22.50000001-50.625-28.125-33.75-11.25-56.25-28.125-73.125-39.375-16.875-16.875-22.50000001-39.375-22.5-56.25 0-28.125 11.25-50.625 28.125-67.50000001 22.50000001-22.50000001 45-28.125 73.125-28.12499999 33.75 0 61.875 11.25 78.75 33.75 11.25 16.875 22.50000001 39.375 22.5 61.875h-45c0-16.875 0-28.125-11.25-39.375-11.25-11.25-28.125-16.875-45-16.875-16.875 0-28.125 5.625-39.375 11.25-11.25 11.25-11.25 22.50000001-11.25 39.375 0 11.25 0 22.50000001 11.25 28.12499999 5.625 11.25 28.125 16.875 56.25 33.75000001 28.125 11.25 50.625 28.125 67.5 45 16.875 16.875 22.50000001 39.375 22.5 56.24999999 5.625 33.75-5.625 56.25-28.125 78.75000001zm298.125-45c-5.625 16.875-16.875 33.75-33.75000001 50.625-16.875 16.875-39.375 22.50000001-67.49999999 22.5s-50.625-5.625-73.125-16.87499999c-22.50000001-11.25-33.75-28.125-39.37500001-50.62500001-5.625-22.50000001-11.25-39.375-11.24999999-61.875 0-22.50000001 5.625-33.75 11.24999999-50.625 11.25-11.25 22.50000001-28.125 33.75000001-50.625l84.375-129.375h45l-84.375 135c39.375-11.25 67.50000001-5.625 90 5.625 22.50000001 11.25 33.75 28.125 45 39.375 5.625 16.875 11.25 33.75 11.24999999 50.625 0 16.875 0 39.375-11.24999999 56.25z"></path></svg>
|
After Width: | Height: | Size: 2.1 KiB |
3
assets/fastapi.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
|
||||
<path d="M12 0C5.375 0 0 5.375 0 12c0 6.627 5.375 12 12 12 6.626 0 12-5.373 12-12 0-6.625-5.373-12-12-12zm-.624 21.62v-7.528H7.19L13.203 2.38v7.528h4.029L11.376 21.62z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 286 B |
213
assets/gdb.svg
Normal file
After Width: | Height: | Size: 23 KiB |
3
assets/scala.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32" height="1em" width="1em">
|
||||
<path d="M6.12 32c6.047 0 18.411-2.021 19.76-4v-7.641c-1.276 1.88-13.714 3.885-19.76 3.885zm0-10.182c6.047 0 18.411-2.021 19.76-4v-7.635c-1.276 1.875-13.714 3.88-19.76 3.88zm0-10.177c6.047 0 18.411-2.021 19.76-4V0C24.604 1.875 12.166 3.88 6.12 3.88z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 367 B |
3
assets/subversion.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 14 14" height="1em" width="1em">
|
||||
<path d="M13 11.377V8.223c-1.643.648-3.681 1.278-6.115 1.893-2.267.573-4.229.986-5.885 1.238v.022h12zM1 8.038v2.566a51.332 51.332 0 0 0 5.065-.983c1.481-.374 2.623-.738 3.424-1.09.8-.351 1.17-.648 1.11-.89-.054-.21-.424-.318-1.109-.323-.351.005-.835.03-1.452.075-.618.045-1.387.117-2.305.213-1.425.152-2.608.269-3.55.348-.448.037-.842.066-1.183.085Zm.517 1.475c.03 0 .058.013.08.035a.116.116 0 0 1-.128.191.117.117 0 0 1-.037-.025.072.072 0 0 1-.025-.037c0-.008-.008-.023-.008-.045 0-.03.015-.06.037-.083.023-.022.053-.03.09-.03zm.406 0a.12.12 0 0 1 .082.035.115.115 0 0 1 .033.083c0 .033-.011.06-.034.084a.135.135 0 0 1-.135.024.097.097 0 0 1-.038-.025c-.014-.007-.022-.022-.03-.037-.007-.008-.007-.023-.007-.045 0-.03.007-.06.03-.083a.112.112 0 0 1 .082-.03zm-.405-.755c.03 0 .057.011.08.035.023.022.035.05.035.083 0 .031-.012.06-.035.082a.114.114 0 0 1-.082.035.114.114 0 0 1-.084-.035.115.115 0 0 1-.035-.082c0-.034.008-.062.03-.085a.117.117 0 0 1 .083-.034Zm.405 0c.031 0 .058.011.082.035.022.022.033.05.033.083 0 .031-.011.06-.034.082-.03.022-.053.035-.09.035a.106.106 0 0 1-.083-.035.118.118 0 0 1-.037-.082c0-.034.007-.062.03-.085a.116.116 0 0 1 .082-.034ZM13 3.299v2.406c-.818.05-1.84.138-3.069.267-1.245.135-2.26.24-3.046.307-.788.075-1.357.114-1.705.12-.682.016-1.045-.075-1.098-.277-.053-.224.353-.524 1.223-.885.87-.367 2.025-.735 3.45-1.095a43.649 43.649 0 0 1 4.244-.825zm-.428-.675a81.77 81.77 0 0 0-5.056 1.115C4.793 4.426 2.622 5.11 1 5.787V2.624h11.573z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
131
docs/adb.md
@ -1,7 +1,7 @@
|
||||
Android ADB 备忘清单
|
||||
Android Debug Bridge 备忘清单
|
||||
===
|
||||
|
||||
[ADB](https://developer.android.com/studio/command-line/adb.html),Android Debug Bridge,包含在 Google 的 Android SDK 中,可用于从计算机控制您的 Android 设备。以下是您可以与 [ADB](https://developer.android.com/studio/command-line/adb.html) 一起使用的一些最常见的命令及其用法
|
||||
[ADB](https://developer.android.com/studio/command-line/adb.html) 既 Android Debug Bridge,是 Google 的 Android SDK 中的一个命令行工具,可让您的计算机控制 Android 设备执行各种设备操作。以下是您可以与 [ADB](https://developer.android.com/studio/command-line/adb.html) 一起使用的一些最常见的命令及其用法
|
||||
|
||||
入门
|
||||
----
|
||||
@ -11,15 +11,18 @@ Android ADB 备忘清单
|
||||
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb devices` | 列出连接的设备
|
||||
`adb devices -l` | 列出连接的设备和种类
|
||||
`adb devices` | 列出已连接的设备
|
||||
`adb devices -l` | 列出已连接的设备和种类
|
||||
`adb connect [IP:PORT]` | 连接到指定 IP 和端口的设备
|
||||
`adb disconnect [IP:PORT]` | 断开指定 IP 和端口的设备连接,若未指定,则断开所有连接
|
||||
`adb root` | 以 `root` 权限重新启动 `adbd`
|
||||
`adb start-server` | 启动 `adb` 服务器
|
||||
`adb kill-server` | 杀死 `adb` 服务器
|
||||
`adb start-server` | 启动 `adb` 服务
|
||||
`adb kill-server` | 停止 `adb` 服务
|
||||
`adb remount` | 重新挂载具有读/写访问权限的文件系统
|
||||
`adb reboot` | 重启设备
|
||||
`adb reboot bootloader` | 将设备重新启动到快速启动
|
||||
`adb disable-verity` | 将设备重新启动到快速启动
|
||||
`adb reboot bootloader` | 将设备重启到 fastboot 模式
|
||||
`adb reboot recovery` | 将设备重启到恢复模式
|
||||
`adb disable-verity` | 禁用设备的 dm-verity 安全特性
|
||||
<!--rehype:className=left-align code-nowrap-->
|
||||
|
||||
---
|
||||
@ -45,12 +48,12 @@ $ adb -s somedevice-1234 root
|
||||
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb logcat` | 开始将日志消息打印到标准输出
|
||||
`adb logcat` | 将日志消息打印到标准输出
|
||||
`adb logcat -g` | 显示当前日志缓冲区大小
|
||||
`adb logcat -G <size>` | 设置缓冲区大小(K 或 M)
|
||||
`adb logcat -c` | 清除日志缓冲区
|
||||
`adb logcat *:V` | 启用所有日志消息(详细)
|
||||
`adb logcat -f <filename>` | 转储到指定文件
|
||||
`adb logcat -f <filename>` | 将日志转储到指定文件
|
||||
<!--rehype:className=left-align code-nowrap-->
|
||||
|
||||
#### 示例
|
||||
@ -62,16 +65,16 @@ $ adb logcat *:V > output.log
|
||||
|
||||
#### 过滤日志输出
|
||||
|
||||
- `V` 详细(最低优先级)
|
||||
- `D` 调试
|
||||
- `I` 信息
|
||||
- `W` 警告
|
||||
- `E` 错误
|
||||
- `F` 严重错误
|
||||
- `V` 最详细的信息(最低优先级)
|
||||
- `D` 调试信息
|
||||
- `I` 普通信息
|
||||
- `W` 警告信息
|
||||
- `E` 错误信息
|
||||
- `F` 致命错误信息
|
||||
- `S` 静默(最高优先级)
|
||||
<!--rehype:className=cols-2 shortcuts style-none-->
|
||||
|
||||
过滤器表达式显示了优先级不低于 `警告` 的所有标记的所有日志消息:
|
||||
例如,要显示优先级不低于 `警告` 的所有标记的所有日志消息,可以使用以下命令:
|
||||
|
||||
```bash
|
||||
$ adb logcat *:W
|
||||
@ -81,8 +84,8 @@ $ adb logcat *:W
|
||||
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb push <local> <remote>` | 将本地复制到远程设备
|
||||
`adb pull <remote> <local>` | 将远程设备从设备复制到本地
|
||||
`adb push <local> <remote>` | 将本地文件复制到远程设备
|
||||
`adb pull <remote> <local>` | 将远程设备文件复制到本地
|
||||
<!--rehype:className=left-align code-nowrap-->
|
||||
|
||||
#### 示例
|
||||
@ -97,22 +100,22 @@ $ adb pull /sdcard/test.txt pulledTest.txt
|
||||
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb shell <command>` | 在设备上运行指定的命令(大多数 unix 命令在这里工作)
|
||||
`adb shell <command>` | 在设备上运行指定的命令(大多数 Unix 命令在这里工作)
|
||||
`adb shell wm size` | 显示当前屏幕分辨率
|
||||
`adb shell wm size WxH` | 将分辨率设置为 WxH
|
||||
`adb shell pm list packages` | 列出所有已安装的包
|
||||
`adb shell pm list packages -3` | 列出所有已安装的 3rd 方包
|
||||
`adb shell monkey -p app.package.name` | 启动指定包
|
||||
`adb shell pm list packages` | 列出所有已安装的应用包
|
||||
`adb shell pm list packages -3` | 列出所有已安装的第三方的应用包
|
||||
`adb shell monkey -p app.package.name` | 启动指定包名的应用程序
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 包安装
|
||||
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb shell install <apk>` | 安装应用程序
|
||||
`adb shell install <path>` | 手机路径安装应用
|
||||
`adb shell install -r <path>` | 手机路径安装应用
|
||||
`adb shell uninstall <name>` | 删除应用程序
|
||||
`adb shell install <apk>` | 安装应用程序
|
||||
`adb shell install <path>` | 从手机路径安装应用
|
||||
`adb shell install -r <path>` | 从手机路径安装应用(允许覆盖安装)
|
||||
`adb shell uninstall <name>` | 卸载应用程序
|
||||
<!--rehype:className=left-align code-nowrap-->
|
||||
|
||||
### Paths
|
||||
@ -121,10 +124,10 @@ $ adb pull /sdcard/test.txt pulledTest.txt
|
||||
:-- | --
|
||||
:-- | --
|
||||
`/data/data/<package>/databases` | 应用程序数据库
|
||||
`/data/data/<package>/shared_prefs/` | 共享偏好
|
||||
`/data/app` | 用户安装的apk
|
||||
`/system/app` | 预装的 APK 文件
|
||||
`/mmt/asec` | 加密的应用程序\|App2SD
|
||||
`/data/data/<package>/shared_prefs/` | 共享偏好设置
|
||||
`/data/app` | 用户安装的 APK
|
||||
`/system/app` | 系统预装的 APK 文件
|
||||
`/mmt/asec` | 加密的应用程序(App2SD)
|
||||
`/mmt/emmc` | 内部 SD 卡
|
||||
`/mmt/adcard` | 外部/内部 SD 卡
|
||||
`/mmt/adcard/external_sd` | 外置 SD 卡
|
||||
@ -145,17 +148,17 @@ $ adb pull /sdcard/test.txt pulledTest.txt
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb get-statе` | 打印设备状态
|
||||
`adb get-serialno` | 获取序列号
|
||||
`adb shell dumpsys iphonesybinfo` | 获取 IMEI
|
||||
`adb shell netstat` | 列出 TCP 连接
|
||||
`adb get-serialno` | 获取设备的序列号
|
||||
`adb shell dumpsys iphonesybinfo` | 获取设备的 IMEI 信息
|
||||
`adb shell netstat` | 列出设备上的所有 TCP 连接
|
||||
`adb shell pwd` | 打印当前工作目录
|
||||
`adb shell dumpsys battery` | 电池状态
|
||||
`adb shell pm list features` | 列出电话功能
|
||||
`adb shell service list` | 列出所有服务
|
||||
`adb shell dumpsys activity <package>/<activity>` | 活动信息
|
||||
`adb shell ps` | 打印进程状态
|
||||
`adb shell wm size` | 显示当前屏幕分辨率
|
||||
`dumpsys window windows` \| `grep -E 'mCurrentFocus\|mFocusedApp'` | 打印当前应用程序的打开活动
|
||||
`adb shell dumpsys battery` | 获取设备电池状态
|
||||
`adb shell pm list features` |列出设备支持的所有功能
|
||||
`adb shell service list` | 列出设备上运行的所有服务
|
||||
`adb shell dumpsys activity <package>/<activity>` | 获取指定包和活动的信息
|
||||
`adb shell ps` | 打印设备上所有运行的进程状态
|
||||
`adb shell wm size` | 显示当前设备的屏幕分辨率
|
||||
`dumpsys window windows` \| `grep -E 'mCurrentFocus\|mFocusedApp'` | 打印当前应用程序的打开活动的信息
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 包信息
|
||||
@ -168,8 +171,8 @@ $ adb pull /sdcard/test.txt pulledTest.txt
|
||||
`adb shell list packages -s` | 仅列出系统包
|
||||
`adb shell list packages -u` | 列出包名称 + 已卸载
|
||||
`adb shell dumpsys package packages` | 列出所有应用程序的信息
|
||||
`adb shell dump <name>` | 列出一个包裹的信息
|
||||
`adb shell path <package>` | apk文件的路径
|
||||
`adb shell dump <name>` | 列出一个包的信息
|
||||
`adb shell path <package>` | 列出 APK 文件的路径
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 设备相关命令
|
||||
@ -177,7 +180,7 @@ $ adb pull /sdcard/test.txt pulledTest.txt
|
||||
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb reboot-recovery` | 重启设备进入恢复模式
|
||||
`adb reboot recovery` | 重启设备进入恢复模式
|
||||
`adb reboot fastboot` | 重启设备进入恢复模式
|
||||
`adb shell screencap -p "/path/to/screenshot.png"` | 截图
|
||||
`adb shell screenrecord "/path/to/record.mp4"` | 录制设备屏幕
|
||||
@ -193,8 +196,8 @@ $ adb pull /sdcard/test.txt pulledTest.txt
|
||||
|
||||
:-- | --
|
||||
:-- | --
|
||||
`adb shell permissions groups` | 列出权限组定义
|
||||
`adb shell list permissions -g -r` | 列出权限详细信息
|
||||
`adb shell permissions groups` | 列出所有已定义的权限组
|
||||
`adb shell list permissions -g -r` | 列出了所有权限的详细信息
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### Logs
|
||||
@ -211,7 +214,7 @@ $ adb pull /sdcard/test.txt pulledTest.txt
|
||||
### 将文件推送到 Android 设备的下载文件夹
|
||||
|
||||
```bash
|
||||
$ adb push example.apk /mnt/Download/
|
||||
$ adb push example.apk /sdcard/Download/
|
||||
```
|
||||
|
||||
### 列出所有已安装的包并获取完整路径
|
||||
@ -223,19 +226,19 @@ $ adb shell pm list packages -f
|
||||
### 从安卓设备中提取文件
|
||||
|
||||
```bash
|
||||
$ adb pull /mnt/Download/example.apk
|
||||
$ adb pull /sdcard/Download/example.apk
|
||||
```
|
||||
|
||||
### 从主机安装 apk 到 Android 设备
|
||||
### 从主机安装 APK 到 Android 设备
|
||||
|
||||
```bash
|
||||
$ adb shell install example.apk
|
||||
```
|
||||
|
||||
### 从 Android 设备存储安装 apk
|
||||
### 从 Android 设备存储安装 APK
|
||||
|
||||
```bash
|
||||
$ adb shell install /mnt/Download/example.apk
|
||||
$ adb shell install /sdcard/Download/example.apk
|
||||
```
|
||||
|
||||
### 设置网络代理
|
||||
@ -250,7 +253,7 @@ $ adb shell settings put global http_proxy <address>:<port>
|
||||
$ adb shell settings put global http_proxy :0
|
||||
```
|
||||
|
||||
### 显示连接的设备并选择一个设备和外壳
|
||||
### 显示连接的设备并指定一个设备进行 Shell
|
||||
|
||||
```bash
|
||||
$ adb devices
|
||||
@ -259,16 +262,16 @@ $ adb -s 7f1c864e shell
|
||||
|
||||
`7f1c864e` 是设备 `ID`
|
||||
|
||||
### 通过 ip 地址无线连接到设备
|
||||
### 通过 IP 地址连接到设备
|
||||
|
||||
```bash
|
||||
$ adb connect 192.168.56.101:5555
|
||||
```
|
||||
|
||||
### adb 通过 wifi
|
||||
### 通过 Wi-Fi 连接 ADB
|
||||
<!--rehype:wrap-class=row-span-5-->
|
||||
|
||||
我们可以通过 `wifi` 或专门使用 `tcp` 连接使用 `adb`。 要通过 `wifi` 使用 `adb`,首先通过 `usb` 连接手机并启用 `usb` 调试。然后列出所有设备:
|
||||
我们可以通过 `Wi-Fi` 或专门使用 `tcp` 连接使用 `adb`。 要通过 `Wi-Fi` 使用 `adb`,首先通过 `USB` 连接手机并启用 `USB` 调试。然后列出所有设备:
|
||||
|
||||
```bash
|
||||
$ adb devices
|
||||
@ -276,7 +279,7 @@ $ adb devices
|
||||
# device_id device
|
||||
```
|
||||
|
||||
现在检查 `android` 设备的 `ip`:
|
||||
现在检查 `Android` 设备的 `IP`:
|
||||
|
||||
```bash
|
||||
$ adb shell ifconfig
|
||||
@ -286,7 +289,7 @@ wlan0 Link encap:UNSPEC Driver icnss
|
||||
inet addr:XXX.XXX.X.XX Bcast:XXX.XXX.X.XXX
|
||||
```
|
||||
|
||||
记下 `inet addr` 后面的 `ip` 地址。我们稍后会需要它。现在在某个端口重新启动 `tcpip`:
|
||||
记下 `inet addr` 后的 `IP` 地址。稍后要用。现在在某个端口重新启动 `tcpip`:
|
||||
|
||||
```bash
|
||||
$ adb tcpip $port
|
||||
@ -298,25 +301,25 @@ $ adb tcpip $port
|
||||
$ adb tcpip 5555
|
||||
```
|
||||
|
||||
您现在可以断开使用。 现在连接到设备只需给出以下命令:
|
||||
您现在可以断开 USB 线缆使用。 若要连接到设备请键入以下命令:
|
||||
|
||||
```bash
|
||||
$ adb connect $ip:$port
|
||||
```
|
||||
|
||||
like:
|
||||
例如:
|
||||
|
||||
```bash
|
||||
$ adb connect 192.168.1.4:5555
|
||||
```
|
||||
|
||||
### 从计算机上的 apk 文件安装应用程序
|
||||
### 将计算机上的 APK 文件安装到设备
|
||||
|
||||
```bash
|
||||
$ adb install /Users/dev/projects/myapp.apk
|
||||
```
|
||||
|
||||
### 查找应用的 apk 路径
|
||||
### 查找应用的 APK 路径
|
||||
|
||||
```bash
|
||||
$ adb shell pm path com.example.myapp
|
||||
@ -324,13 +327,13 @@ $ adb shell pm path com.example.myapp
|
||||
|
||||
将 `com.example.myapp` 替换为您自己的应用程序包名称
|
||||
|
||||
### 按名称查找应用的包名
|
||||
### 通过名称查找应用的包名
|
||||
|
||||
```bash
|
||||
$ adb shell pm list package | grep app_name
|
||||
```
|
||||
|
||||
### 将 apk 从设备提取到您的计算机
|
||||
### 从设备提取 APK 到您的计算机
|
||||
|
||||
```bash
|
||||
$ adb pull /data/app/com.example.myapp.apk ./
|
||||
@ -366,7 +369,7 @@ $ adb shell input keyevent 66
|
||||
|
||||
### 发送点击
|
||||
|
||||
点击又名点击屏幕:
|
||||
点击屏幕:
|
||||
|
||||
```bash
|
||||
$ adb shell input tap x y
|
||||
|
@ -19,6 +19,7 @@ Ansible 备忘清单
|
||||
- [Ansible 官方文档](https://docs.ansible.com)
|
||||
|
||||
### 配置位置
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
文件路径 | 说明
|
||||
:-|-
|
||||
@ -26,13 +27,27 @@ Ansible 备忘清单
|
||||
`~/ansible.cfg` | 用户特定的配置
|
||||
`$pwd/ansible.cfg` | 当前目录下的配置
|
||||
|
||||
配置文件优先级
|
||||
|
||||
- 如果没有任何其他配置文件,默认使用 `/etc/ansible/ansible.cfg`
|
||||
- `~/.ansible.cfg` `家`目录下的 `.ansible.cfg`
|
||||
- 当前目录下的 `ansible.cfg`,即在同一目录下 `ansible.cfg` 优先级高于 `~/.ansible.cfg`
|
||||
- 环境变量 `exoport ANSIBLE_CONFIG=/$DIR/ansible.cfg`
|
||||
<!--rehype:className=style-timeline-->
|
||||
|
||||
查看正在使用的 `ansible` 配置文件:
|
||||
|
||||
```bash
|
||||
ansible --version | grep "config file"
|
||||
```
|
||||
|
||||
### Inventory文件(hosts列表)
|
||||
|
||||
#### 静态Inventory
|
||||
|
||||
`/etc/ansible/hosts`
|
||||
|
||||
```INI
|
||||
```ini
|
||||
mail.example.com
|
||||
|
||||
[webservers]
|
||||
@ -42,7 +57,7 @@ bar.example.com
|
||||
|
||||
### Inventory 主机组使用多个IP和域名
|
||||
|
||||
```
|
||||
```ini
|
||||
[web]
|
||||
172.18.12.5[1:4]
|
||||
[webservers]
|
||||
|
270
docs/ascii-code.md
Normal file
@ -0,0 +1,270 @@
|
||||
ASCII Code 备忘清单
|
||||
===
|
||||
|
||||
这份速查表是 ASCII 码表的完整列表,包含了它们的数字和名称
|
||||
|
||||
ASCII 代码表
|
||||
---
|
||||
<!--rehype:body-class=cols-1&style=display:none;-->
|
||||
|
||||
### ASCII 代码表
|
||||
|
||||
| Symbol(符号) | Dec | Oct | Hex | Bin |
|
||||
|------------------------------------|------|------|------|----------|
|
||||
| NUL (Null) | 0 | 0 | 0 | 0 |
|
||||
| SOH (Start of Heading) | 1 | 1 | 1 | 1 |
|
||||
| STX (Start of Text) | 2 | 2 | 2 | 10 |
|
||||
| ETX (End of Text) | 3 | 3 | 3 | 11 |
|
||||
| EOT (End of Transmission) | 4 | 4 | 4 | 100 |
|
||||
| ENQ (Enquiry) | 5 | 5 | 5 | 101 |
|
||||
| ACK (Acknowledgment) | 6 | 6 | 6 | 110 |
|
||||
| BEL (Bell) | 7 | 7 | 7 | 111 |
|
||||
| BS (Back Space) | 8 | 10 | 8 | 1000 |
|
||||
| HT (Horizontal Tab) | 9 | 11 | 9 | 1001 |
|
||||
| LF (Line Feed) | 10 | 12 | 0A | 1010 |
|
||||
| VT (Vertical Tab) | 11 | 13 | 0B | 1011 |
|
||||
| FF (Form Feed) | 12 | 14 | 0C | 1100 |
|
||||
| CR (Carriage Return) | 13 | 15 | 0D | 1101 |
|
||||
| SO (Shift Out / X-On) | 14 | 16 | 0E | 1110 |
|
||||
| SI (Shift In / X-Off) | 15 | 17 | 0F | 1111 |
|
||||
| DLE (Data Line Escape) | 16 | 20 | 10 | 10000 |
|
||||
| DC1 (Device Control 1 / oft. XON) | 17 | 21 | 11 | 10001 |
|
||||
| DC2 (Device Control 2) | 18 | 22 | 12 | 10010 |
|
||||
| DC3 (Device Control 3 / oft. XOFF) | 19 | 23 | 13 | 10011 |
|
||||
| DC4 (Device Control 4) | 20 | 24 | 14 | 10100 |
|
||||
| NAK (Negative Acknowledgement) | 21 | 25 | 15 | 10101 |
|
||||
| SYN (Synchronous Idle) | 22 | 26 | 16 | 10110 |
|
||||
| ETB (End of Transmit Block) | 23 | 27 | 17 | 10111 |
|
||||
| CAN (Cancel) | 24 | 30 | 18 | 11000 |
|
||||
| EM (End of Medium) | 25 | 31 | 19 | 11001 |
|
||||
| SUB (Substitute) | 26 | 32 | 1A | 11010 |
|
||||
| ESC (Escape) | 27 | 33 | 1B | 11011 |
|
||||
| FS (File Separator) | 28 | 34 | 1C | 11100 |
|
||||
| GS (Group Separator) | 29 | 35 | 1D | 11101 |
|
||||
| RS (Record Separator) | 30 | 36 | 1E | 11110 |
|
||||
| US (Unit Separator) | 31 | 37 | 1F | 11111 |
|
||||
| (Space) | 32 | 40 | 20 | 100000 |
|
||||
| ! | 33 | 41 | 21 | 100001 |
|
||||
| " | 34 | 42 | 22 | 100010 |
|
||||
| # | 35 | 43 | 23 | 100011 |
|
||||
| $ | 36 | 44 | 24 | 100100 |
|
||||
| % | 37 | 45 | 25 | 100101 |
|
||||
| & | 38 | 46 | 26 | 100110 |
|
||||
| ' | 39 | 47 | 27 | 100111 |
|
||||
| ( | 40 | 50 | 28 | 101000 |
|
||||
| ) | 41 | 51 | 29 | 101001 |
|
||||
| * | 42 | 52 | 2A | 101010 |
|
||||
| + | 43 | 53 | 2B | 101011 |
|
||||
| , | 44 | 54 | 2C | 101100 |
|
||||
| - | 45 | 55 | 2D | 101101 |
|
||||
| . | 46 | 56 | 2E | 101110 |
|
||||
| / | 47 | 57 | 2F | 101111 |
|
||||
| 0 | 48 | 60 | 30 | 110000 |
|
||||
| 1 | 49 | 61 | 31 | 110001 |
|
||||
| 2 | 50 | 62 | 32 | 110010 |
|
||||
| 3 | 51 | 63 | 33 | 110011 |
|
||||
| 4 | 52 | 64 | 34 | 110100 |
|
||||
| 5 | 53 | 65 | 35 | 110101 |
|
||||
| 6 | 54 | 66 | 36 | 110110 |
|
||||
| 7 | 55 | 67 | 37 | 110111 |
|
||||
| 8 | 56 | 70 | 38 | 111000 |
|
||||
| 9 | 57 | 71 | 39 | 111001 |
|
||||
| : | 58 | 72 | 3A | 111010 |
|
||||
| ; | 59 | 73 | 3B | 111011 |
|
||||
| < | 60 | 74 | 3C | 111100 |
|
||||
| = | 61 | 75 | 3D | 111101 |
|
||||
| > | 62 | 76 | 3E | 111110 |
|
||||
| ? | 63 | 77 | 3F | 111111 |
|
||||
| @ | 64 | 100 | 40 | 1000000 |
|
||||
| A | 65 | 101 | 41 | 1000001 |
|
||||
| B | 66 | 102 | 42 | 1000010 |
|
||||
| C | 67 | 103 | 43 | 1000011 |
|
||||
| D | 68 | 104 | 44 | 1000100 |
|
||||
| E | 69 | 105 | 45 | 1000101 |
|
||||
| F | 70 | 106 | 46 | 1000110 |
|
||||
| G | 71 | 107 | 47 | 1000111 |
|
||||
| H | 72 | 110 | 48 | 1001000 |
|
||||
| I | 73 | 111 | 49 | 1001001 |
|
||||
| J | 74 | 112 | 4A | 1001010 |
|
||||
| K | 75 | 113 | 4B | 1001011 |
|
||||
| L | 76 | 114 | 4C | 1001100 |
|
||||
| M | 77 | 115 | 4D | 1001101 |
|
||||
| N | 78 | 116 | 4E | 1001110 |
|
||||
| O | 79 | 117 | 4F | 1001111 |
|
||||
| P | 80 | 120 | 50 | 1010000 |
|
||||
| Q | 81 | 121 | 51 | 1010001 |
|
||||
| R | 82 | 122 | 52 | 1010010 |
|
||||
| S | 83 | 123 | 53 | 1010011 |
|
||||
| T | 84 | 124 | 54 | 1010100 |
|
||||
| U | 85 | 125 | 55 | 1010101 |
|
||||
| V | 86 | 126 | 56 | 1010110 |
|
||||
| W | 87 | 127 | 57 | 1010111 |
|
||||
| X | 88 | 130 | 58 | 1011000 |
|
||||
| Y | 89 | 131 | 59 | 1011001 |
|
||||
| Z | 90 | 132 | 5A | 1011010 |
|
||||
| [ | 91 | 133 | 5B | 1011011 |
|
||||
| \ | 92 | 134 | 5C | 1011100 |
|
||||
| ] | 93 | 135 | 5D | 1011101 |
|
||||
| ^ | 94 | 136 | 5E | 1011110 |
|
||||
| _ | 95 | 137 | 5F | 1011111 |
|
||||
| <code>\`</code> | 96 | 140 | 60 | 1100000 |
|
||||
| a | 97 | 141 | 61 | 1100001 |
|
||||
| b | 98 | 142 | 62 | 1100010 |
|
||||
| c | 99 | 143 | 63 | 1100011 |
|
||||
| d | 100 | 144 | 64 | 1100100 |
|
||||
| e | 101 | 145 | 65 | 1100101 |
|
||||
| f | 102 | 146 | 66 | 1100110 |
|
||||
| g | 103 | 147 | 67 | 1100111 |
|
||||
| h | 104 | 150 | 68 | 1101000 |
|
||||
| i | 105 | 151 | 69 | 1101001 |
|
||||
| j | 106 | 152 | 6A | 1101010 |
|
||||
| k | 107 | 153 | 6B | 1101011 |
|
||||
| l | 108 | 154 | 6C | 1101100 |
|
||||
| m | 109 | 155 | 6D | 1101101 |
|
||||
| n | 110 | 156 | 6E | 1101110 |
|
||||
| o | 111 | 157 | 6F | 1101111 |
|
||||
| p | 112 | 160 | 70 | 1110000 |
|
||||
| q | 113 | 161 | 71 | 1110001 |
|
||||
| r | 114 | 162 | 72 | 1110010 |
|
||||
| s | 115 | 163 | 73 | 1110011 |
|
||||
| t | 116 | 164 | 74 | 1110100 |
|
||||
| u | 117 | 165 | 75 | 1110101 |
|
||||
| v | 118 | 166 | 76 | 1110110 |
|
||||
| w | 119 | 167 | 77 | 1110111 |
|
||||
| x | 120 | 170 | 78 | 1111000 |
|
||||
| y | 121 | 171 | 79 | 1111001 |
|
||||
| z | 122 | 172 | 7A | 1111010 |
|
||||
| { | 123 | 173 | 7B | 1111011 |
|
||||
| | 124 | 174 | 7C | 1111100 |
|
||||
| } | 125 | 175 | 7D | 1111101 |
|
||||
| ~ | 126 | 176 | 7E | 1111110 |
|
||||
| (Delete) | 127 | 177 | 7F | 1111111 |
|
||||
| € | 128 | 200 | 80 | 10000000 |
|
||||
| | 129 | 201 | 81 | 10000001 |
|
||||
| ‚ | 130 | 202 | 82 | 10000010 |
|
||||
| ƒ | 131 | 203 | 83 | 10000011 |
|
||||
| „ | 132 | 204 | 84 | 10000100 |
|
||||
| … | 133 | 205 | 85 | 10000101 |
|
||||
| † | 134 | 206 | 86 | 10000110 |
|
||||
| ‡ | 135 | 207 | 87 | 10000111 |
|
||||
| ˆ | 136 | 210 | 88 | 10001000 |
|
||||
| ‰ | 137 | 211 | 89 | 10001001 |
|
||||
| Š | 138 | 212 | 8A | 10001010 |
|
||||
| ‹ | 139 | 213 | 8B | 10001011 |
|
||||
| Œ | 140 | 214 | 8C | 10001100 |
|
||||
| | 141 | 215 | 8D | 10001101 |
|
||||
| Ž | 142 | 216 | 8E | 10001110 |
|
||||
| | 143 | 217 | 8F | 10001111 |
|
||||
| | 144 | 220 | 90 | 10010000 |
|
||||
| ‘ | 145 | 221 | 91 | 10010001 |
|
||||
| ’ | 146 | 222 | 92 | 10010010 |
|
||||
| “ | 147 | 223 | 93 | 10010011 |
|
||||
| ” | 148 | 224 | 94 | 10010100 |
|
||||
| • | 149 | 225 | 95 | 10010101 |
|
||||
| – | 150 | 226 | 96 | 10010110 |
|
||||
| — | 151 | 227 | 97 | 10010111 |
|
||||
| ˜ | 152 | 230 | 98 | 10011000 |
|
||||
| ™ | 153 | 231 | 99 | 10011001 |
|
||||
| š | 154 | 232 | 9A | 10011010 |
|
||||
| › | 155 | 233 | 9B | 10011011 |
|
||||
| œ | 156 | 234 | 9C | 10011100 |
|
||||
| | 157 | 235 | 9D | 10011101 |
|
||||
| ž | 158 | 236 | 9E | 10011110 |
|
||||
| Ÿ | 159 | 237 | 9F | 10011111 |
|
||||
| (Non-breaking space) | 160 | 240 | A0 | 10100000 |
|
||||
| ¡ | 161 | 241 | A1 | 10100001 |
|
||||
| ¢ | 162 | 242 | A2 | 10100010 |
|
||||
| £ | 163 | 243 | A3 | 10100011 |
|
||||
| ¤ | 164 | 244 | A4 | 10100100 |
|
||||
| ¥ | 165 | 245 | A5 | 10100101 |
|
||||
| ¦ | 166 | 246 | A6 | 10100110 |
|
||||
| § | 167 | 247 | A7 | 10100111 |
|
||||
| ¨ | 168 | 250 | A8 | 10101000 |
|
||||
| © | 169 | 251 | A9 | 10101001 |
|
||||
| ª | 170 | 252 | AA | 10101010 |
|
||||
| « | 171 | 253 | AB | 10101011 |
|
||||
| ¬ | 172 | 254 | AC | 10101100 |
|
||||
| (Soft hyphen) | 173 | 255 | AD | 10101101 |
|
||||
| ® | 174 | 256 | AE | 10101110 |
|
||||
| ¯ | 175 | 257 | AF | 10101111 |
|
||||
| ° | 176 | 260 | B0 | 10110000 |
|
||||
| ± | 177 | 261 | B1 | 10110001 |
|
||||
| ² | 178 | 262 | B2 | 10110010 |
|
||||
| ³ | 179 | 263 | B3 | 10110011 |
|
||||
| ´ | 180 | 264 | B4 | 10110100 |
|
||||
| µ | 181 | 265 | B5 | 10110101 |
|
||||
| ¶ | 182 | 266 | B6 | 10110110 |
|
||||
| · | 183 | 267 | B7 | 10110111 |
|
||||
| ¸ | 184 | 270 | B8 | 10111000 |
|
||||
| ¹ | 185 | 271 | B9 | 10111001 |
|
||||
| º | 186 | 272 | BA | 10111010 |
|
||||
| » | 187 | 273 | BB | 10111011 |
|
||||
| ¼ | 188 | 274 | BC | 10111100 |
|
||||
| ½ | 189 | 275 | BD | 10111101 |
|
||||
| ¾ | 190 | 276 | BE | 10111110 |
|
||||
| ¿ | 191 | 277 | BF | 10111111 |
|
||||
| À | 192 | 300 | C0 | 11000000 |
|
||||
| Á | 193 | 301 | C1 | 11000001 |
|
||||
| Â | 194 | 302 | C2 | 11000010 |
|
||||
| Ã | 195 | 303 | C3 | 11000011 |
|
||||
| Ä | 196 | 304 | C4 | 11000100 |
|
||||
| Å | 197 | 305 | C5 | 11000101 |
|
||||
| Æ | 198 | 306 | C6 | 11000110 |
|
||||
| Ç | 199 | 307 | C7 | 11000111 |
|
||||
| È | 200 | 310 | C8 | 11001000 |
|
||||
| É | 201 | 311 | C9 | 11001001 |
|
||||
| Ê | 202 | 312 | CA | 11001010 |
|
||||
| Ë | 203 | 313 | CB | 11001011 |
|
||||
| Ì | 204 | 314 | CC | 11001100 |
|
||||
| Í | 205 | 315 | CD | 11001101 |
|
||||
| Î | 206 | 316 | CE | 11001110 |
|
||||
| Ï | 207 | 317 | CF | 11001111 |
|
||||
| Ð | 208 | 320 | D0 | 11010000 |
|
||||
| Ñ | 209 | 321 | D1 | 11010001 |
|
||||
| Ò | 210 | 322 | D2 | 11010010 |
|
||||
| Ó | 211 | 323 | D3 | 11010011 |
|
||||
| Ô | 212 | 324 | D4 | 11010100 |
|
||||
| Õ | 213 | 325 | D5 | 11010101 |
|
||||
| Ö | 214 | 326 | D6 | 11010110 |
|
||||
| × | 215 | 327 | D7 | 11010111 |
|
||||
| Ø | 216 | 330 | D8 | 11011000 |
|
||||
| Ù | 217 | 331 | D9 | 11011001 |
|
||||
| Ú | 218 | 332 | DA | 11011010 |
|
||||
| Û | 219 | 333 | DB | 11011011 |
|
||||
| Ü | 220 | 334 | DC | 11011100 |
|
||||
| Ý | 221 | 335 | DD | 11011101 |
|
||||
| Þ | 222 | 336 | DE | 11011110 |
|
||||
| ß | 223 | 337 | DF | 11011111 |
|
||||
| à | 224 | 340 | E0 | 11100000 |
|
||||
| á | 225 | 341 | E1 | 11100001 |
|
||||
| â | 226 | 342 | E2 | 11100010 |
|
||||
| ã | 227 | 343 | E3 | 11100011 |
|
||||
| ä | 228 | 344 | E4 | 11100100 |
|
||||
| å | 229 | 345 | E5 | 11100101 |
|
||||
| æ | 230 | 346 | E6 | 11100110 |
|
||||
| ç | 231 | 347 | E7 | 11100111 |
|
||||
| è | 232 | 350 | E8 | 11101000 |
|
||||
| é | 233 | 351 | E9 | 11101001 |
|
||||
| ê | 234 | 352 | EA | 11101010 |
|
||||
| ë | 235 | 353 | EB | 11101011 |
|
||||
| ì | 236 | 354 | EC | 11101100 |
|
||||
| í | 237 | 355 | ED | 11101101 |
|
||||
| î | 238 | 356 | EE | 11101110 |
|
||||
| ï | 239 | 357 | EF | 11101111 |
|
||||
| ð | 240 | 360 | F0 | 11110000 |
|
||||
| ñ | 241 | 361 | F1 | 11110001 |
|
||||
| ò | 242 | 362 | F2 | 11110010 |
|
||||
| ó | 243 | 363 | F3 | 11110011 |
|
||||
| ô | 244 | 364 | F4 | 11110100 |
|
||||
| õ | 245 | 365 | F5 | 11110101 |
|
||||
| ö | 246 | 366 | F6 | 11110110 |
|
||||
| ÷ | 247 | 367 | F7 | 11110111 |
|
||||
| ø | 248 | 370 | F8 | 11111000 |
|
||||
| ù | 249 | 371 | F9 | 11111001 |
|
||||
| ú | 250 | 372 | FA | 11111010 |
|
||||
| û | 251 | 373 | FB | 11111011 |
|
||||
| ü | 252 | 374 | FC | 11111100 |
|
||||
| ý | 253 | 375 | FD | 11111101 |
|
||||
| þ | 254 | 376 | FE | 11111110 |
|
||||
| ÿ | 255 | 377 | FF | 11111111 |
|
||||
<!--rehype:className=show-header-->
|
19
docs/bash.md
@ -1010,6 +1010,25 @@ echo "${args[@]}"
|
||||
|
||||
将参数放入数组中,然后追加
|
||||
|
||||
### 调试模式
|
||||
|
||||
启用调试模式,会把脚本中的每条命令的执行情况打印出来。它可以在整个会话或脚本上运行,也可以在脚本内以编程方式启用。
|
||||
|
||||
以调试模式运行脚本(整个脚本都会打印调试信息):
|
||||
|
||||
```bash
|
||||
$ bash -x myscript.sh
|
||||
```
|
||||
|
||||
在bash脚本中打开调试(针对部分内容打印调试信息)。
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
set -x # Enable debugging
|
||||
# some code here
|
||||
set +x # Disable debugging output.
|
||||
```
|
||||
|
||||
Bash 颜色
|
||||
----
|
||||
|
||||
|
263
docs/blender.md
Normal file
@ -0,0 +1,263 @@
|
||||
Blender 键盘快捷键
|
||||
===
|
||||
|
||||
Blender 中 187 个键盘快捷键的视觉备忘单
|
||||
|
||||
键盘快捷键
|
||||
---------
|
||||
<!--rehype:body-class=cols-2-->
|
||||
|
||||
### 普遍的
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`Esc` | 取消 Blender 功能而不做任何更改
|
||||
`Space` | 打开工具箱
|
||||
`Tab` | 启动或退出编辑模式
|
||||
`F1` | 加载 Blender 文件,将窗口更改为文件窗口
|
||||
`Shift` `F1` | 附加其他文件中的部分,或作为库数据加载
|
||||
`F2` | 写入 Blender 文件,将窗口更改为文件窗口
|
||||
`Shift` `F2` | 将场景导出为 DXF 文件
|
||||
`Ctrl` `F2` | 将场景导出为 VRML1 文件
|
||||
`F3` | 如果图片已渲染,并且文件格式如显示按钮中所示,则写入图片
|
||||
`Ctrl` `F3` | 保存活动窗口的屏幕转储
|
||||
`Ctrl` `Shift` `F3` | 保存整个 Blender 屏幕的屏幕转储
|
||||
`F4` | 显示逻辑上下文
|
||||
`F5` | 显示着色上下文、灯光、材质或世界子上下文
|
||||
`F6` | 显示着色上下文和纹理子上下文
|
||||
`F7` | 显示对象上下文
|
||||
`F8` | 显示着色上下文和世界子上下文
|
||||
`F9` | 显示编辑上下文
|
||||
`F10` | 显示场景上下文
|
||||
`F11` | 隐藏或显示渲染窗口
|
||||
`F12` | 从活动相机开始渲染
|
||||
`Left` | 转到上一帧
|
||||
`Shift` `Left` | 转到第一帧
|
||||
`Right` | 转到下一帧
|
||||
`Shift` `Right` | 转到最后一帧
|
||||
`Up` | 前进 10 帧
|
||||
`Down` | 后退 10 帧
|
||||
`Alt` `A` | 将当前Blender窗口更改为动画播放模式,光标变为计数器
|
||||
`Alt` `Shift` `A` | 将当前窗口和所有3D窗口更改为动画播放模式
|
||||
`I` | 插入按键菜单,该菜单因窗口而异
|
||||
`J` | 切换渲染缓冲区
|
||||
`Ctrl` `O` | 打开上次保存的文件
|
||||
`Q` | 退出搅拌机
|
||||
`Ctrl` `Alt` `T` | 计时器菜单,此菜单提供有关绘图速度的信息的访问
|
||||
`Ctrl` `U` | 保存用户默认值,当前项目设置将写入默认文件,每次启动时都会加载该文件Blender
|
||||
`Ctrl` `W` | 写入文件而不打开文件窗口
|
||||
`Alt` `W` | 写入视频景观文件
|
||||
`Ctrl` `X` | 擦除除渲染缓冲区之外的所有内容,重新加载默认场景
|
||||
`Ctrl` `Y` | 重做
|
||||
`Ctrl` `Z` | 撤消
|
||||
`Ctrl` `Shift` `Z` | 重做
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 对象模式
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`Home` | 可见层中的所有对象均完整显示,位于窗口中央
|
||||
`PgUp` | 选择下一个对象键,如果选择了多个对象键,则选择循环向上移动
|
||||
`Shift` `PgUp` | 将下一个对象键添加到选择中
|
||||
`PgDn` | 选择上一个对象键,如果选择了多个对象键,则选择循环向上移动
|
||||
`Shift` `PgDn` | 将前一个对象键添加到选择中
|
||||
<code>\`</code> | 选择所有图层
|
||||
`Shift` <code>\`</code> | 恢复到上一层设置
|
||||
`Tab` | 启动或停止编辑模式
|
||||
`A` | 选择或取消选择全部
|
||||
`Ctrl` `A` | 应用尺寸和旋转
|
||||
`Ctrl` `Shift` `A` | 如果活动对象被自动复制,则会弹出一个用于实际创建对象的菜单
|
||||
`Shift` `A` | 调出添加菜单,以 ADD 开头的工具箱项目
|
||||
`B` | 边框选择,用鼠标左键画一个矩形来选择对象
|
||||
`Shift` `B` | 渲染边框,仅适用于相机视图模式
|
||||
`C` | 中心视图,3D光标的位置成为3D窗口的新中心
|
||||
`Alt` `C` | 转换菜单,根据活动对象显示弹出菜单,使您可以转换某些类型的 ObData
|
||||
`Ctrl` `C` | 复制菜单,此菜单将信息从活动对象复制到选定对象
|
||||
`Shift` `C` | 中心零视图,3D 光标设置为零并更改视图,以便可以显示所有对象
|
||||
`D` | 显示绘图模式菜单
|
||||
`Shift` `D` | 添加重复项,所选对象被重复
|
||||
`Alt` `D` | 添加链接副本,创建所选对象的链接副本
|
||||
`Ctrl` `D` | 将纹理图像绘制为线
|
||||
`Alt` `E` | 启动或停止编辑模式
|
||||
`F` | 如果所选对象是混搭,则打开或关闭面选择模式
|
||||
`Ctrl` `F` | 对面进行排序,活动网格对象的面根据 3D 窗口中的当前视图进行排序
|
||||
`G` | 抓取模式或翻译模式
|
||||
`Alt` `G` | 清除以抓取模式给出的翻译
|
||||
`Shift` `G` | 团体选拔
|
||||
`I` | 插入对象关键点,在当前帧所有选定对象中插入一个关键位置
|
||||
`Ctrl` `J` | 连接对象,所有选定的相同类型的对象都添加到活动对象中
|
||||
`K` | 显示关键点,为所有选定对象打开绘制关键点选项
|
||||
`Shift` `K` | 显示用于显示和选择所有键的弹出菜单
|
||||
`L` | 使所选对象成为本地对象,使库链接对象成为当前场景的本地对象
|
||||
`Ctrl` `L` | 链接选定对象,将一些活动对象数据链接到所有选定对象
|
||||
`Shift` `L` | 选择链接,选择以某种方式链接到活动对象的所有对象
|
||||
`M` | 将选定的对象移动到另一层
|
||||
`Ctrl` `M` | 镜像菜单,可以沿 X、Y 或 Z 轴镜像对象
|
||||
`N` | 数字面板,显示活动对象的位置、旋转、缩放比例并可修改
|
||||
`Alt` `O` | 清除原点,所有子对象的原点都被删除,这导致它们移动到父对象的确切位置objects
|
||||
`Shift` `O` | 如果选定的对象是网格,则打开或关闭 subsurf
|
||||
`Ctrl` `P` | 使选定对象成为活动对象的子对象
|
||||
`Alt` `P` | 清除父级关系,询问用户是否希望保留或清除父级引发的转换
|
||||
`R` | 旋转模式,适用于选定的对象
|
||||
`Alt` `R` | 清除旋转,将选定对象的 X、Y 和 Z 旋转设置为零
|
||||
`S` | 大小模式或缩放模式,适用于选定的对象
|
||||
`Alt` `S` | 清除大小,将选定对象的 X、Y、Z 尺寸设置为 1
|
||||
`Shift` `S` | 打开快照菜单
|
||||
`T` | 纹理空间模式,可以以相同的方式更改所选对象的纹理空间维度的位置for grab and size mode
|
||||
`Ctrl` `T` | 使选定的对象跟踪活动对象
|
||||
`Alt` `T` | 清除旧样式轨道,约束轨道被删除,因为所有约束都被删除
|
||||
`U` | 使对象成为单用户,链接的逆操作
|
||||
`V` | 切换进入和退出顶点绘制模式
|
||||
`Alt` `V` | 对象图像方面,此热键设置所选对象相对于对象尺寸的 X 和 Y 尺寸image texture they have
|
||||
`W` | 打开对象布尔菜单
|
||||
`X` | 删除选定的对象
|
||||
`Z` | 打开或关闭固体模式
|
||||
`Shift` `Z` | 打开或关闭着色模式
|
||||
`Alt` `Z` | 打开或关闭纹理模式
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 编辑模式 - 常规
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`Tab` | 启动或停止编辑模式
|
||||
`Alt` `E` | 启动或停止编辑模式(替代)
|
||||
`Ctrl` `Tab` | 在顶点选择、边选择和面选择模式之间切换
|
||||
`A` | 全选或取消全选
|
||||
`B` `B` | 圆圈选择
|
||||
`Ctrl` `H` | 选择顶点后,这将创建一个钩子对象
|
||||
`N` | 数字面板,比对象模式一简单
|
||||
`O` | 切换成比例编辑和退出成比例编辑
|
||||
`Shift` `O` | 在平滑和锐利比例编辑之间切换
|
||||
`P` | 分开,您可以选择用所有选定的顶点、边、面和曲线来制作一个新对象
|
||||
`Ctrl` `P` | 使顶点成为父级
|
||||
`Ctrl` `S` | 剪切,在编辑模式下此操作使您可以使选定的形状倾斜
|
||||
`U` | 撤消
|
||||
`W` | 显示特价弹出菜单
|
||||
`Shift` `W` | 扭曲,使用此选项可以将选定的顶点弯曲成曲线
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 编辑模式 - 网格
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`Ctrl` `+` | 将通过边连接到已选定顶点的所有顶点添加到选择中
|
||||
`Ctrl` `-` | 从选择中删除选定顶点外环的所有顶点
|
||||
`C` | 如果使用曲线变形,则打开或关闭曲线循环模式
|
||||
`E` | 挤出选定的
|
||||
`Shift` `E` | 折痕海面边缘
|
||||
`Ctrl` `E` | 标记 LSCM 接缝
|
||||
`F` | 制作边缘或面
|
||||
`Shift` `F` | 填充选定,所有选定的由边包围并形成闭合多边形的顶点都用三角形面填充
|
||||
`Alt` `F` | 美容填充,所有选定的三角形面的边缘都会交换,从而形成相同大小的面
|
||||
`Ctrl` `F` | 翻转面,将选定的三角形面配对并交换每对的公共边
|
||||
`H` | 隐藏选定,隐藏所有选定的顶点和面
|
||||
`Shift` `H` | 隐藏未选中,隐藏所有未选中的顶点和面
|
||||
`Alt` `H` | Reveal,所有隐藏的顶点和面都重新绘制
|
||||
`Alt` `J` | 连接面,选定的三角形面成对连接并转换为四边形
|
||||
`K` | 刀工具菜单
|
||||
`L` | 选择链接
|
||||
`Shift` `L` | 取消选择链接
|
||||
`Ctrl` `L` | 选择链接的选定内容
|
||||
`M` | 镜像,打开一个弹出窗口,询问要镜像的轴
|
||||
`Alt` `M` | 根据弹出窗口中的选择将选定的顶点合并为重心或光标处
|
||||
`Ctrl` `N` | 计算外部法线
|
||||
`Ctrl` `Shift` `N` | 计算内部法线
|
||||
`Alt` `S` | 沿其局部法线方向缩放每个顶点
|
||||
`Ctrl` `T` | 制作三角形,所有选定的面都转换为三角形
|
||||
`U` | 撤消
|
||||
`Shift` `U` | 重做
|
||||
`Alt` `U` | 撤消菜单
|
||||
`W` | 特别菜单
|
||||
`X` | 删除所选内容
|
||||
`Y` | 分割,此命令分割网格的选定部分而不删除面
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 编辑模式 - 曲线
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`C` | 将选定的曲线设置为循环或关闭循环
|
||||
`E` | 挤出曲线
|
||||
`F` | 添加线段,在两条曲线末端的两个选定顶点之间添加一条线段
|
||||
`H` | 切换手柄对齐或自由
|
||||
`Shift` `H` | 将句柄设置为自动
|
||||
`Ctrl` `H` | 计算句柄
|
||||
`L` | 选择链接
|
||||
`Shift` `L` | 取消选择链接
|
||||
`M` | 与网格中的顶点完全相同地镜像选定的控制点
|
||||
`T` | 倾斜模式,为 3D 曲线中的每个顶点指定额外的轴旋转
|
||||
`Alt` `T` | 清晰的倾斜
|
||||
`V` | 矢量手柄
|
||||
`W` | 出现曲线专用菜单
|
||||
`X` | 删除所选内容
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 编辑模式 - 曲面
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`C` | 切换循环菜单
|
||||
`E` | 挤出选定的
|
||||
`F` | 添加线段,在两条曲线末端的两个选定顶点之间添加一条线段
|
||||
`L` | 选择链接
|
||||
`Shift` `L` | 取消选择链接
|
||||
`M` | 与网格中的顶点完全相同地镜像选定的控制点
|
||||
`Shift` `R` | 选择行,从最后一个选定的顶点开始
|
||||
`W` | 出现曲面的特殊菜单
|
||||
`X` | 删除所选内容
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 编辑模式 - 字体
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`Right` | 将文本光标向前移动一位
|
||||
`Shift` `Right` | 将文本光标移至行尾
|
||||
`Left` | 将文本光标向后移动一位
|
||||
`Shift` `Left` | 将文本光标移至行首
|
||||
`Down` | 将文本光标向前移动一行
|
||||
`Shift` `Down` | 将文本光标移动到文本末尾
|
||||
`Up` | 将文本光标向后移动一行
|
||||
`Shift` `Up` | 将文本光标移动到文本开头
|
||||
`Alt` `U` | 重新加载原始数据
|
||||
`Alt` `V` | 粘贴文本
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 脸部选择
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`Tab` | 切换到编辑模式
|
||||
`F` | 选择多个共面的面后,只要它们保持共面,这会将它们合并为一个 FGon
|
||||
`L` | 选择链接的 UV
|
||||
`R` | 调用允许旋转 UV 坐标或顶点列的菜单
|
||||
`U` | 调用 UV 计算菜单
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 顶点绘制
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`Shift` `K` | 所有顶点颜色都被删除,它们更改为当前绘制颜色
|
||||
`U` | 撤消,按两次重做撤消的操作
|
||||
`W` | 共享顶点调用,共享顶点的所有面的颜色被混合
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 紫外线编辑器
|
||||
|
||||
快捷键 | 说明
|
||||
---|---
|
||||
`E` | LSCM 展开,在 UV 编辑器中可见的面上启动
|
||||
`P` | 固定选定的顶点,当执行 LSCM 展开时,它们将保留在 UV 编辑器上的适当位置
|
||||
`Alt` `P` | 取消固定选定的顶点
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
Also see
|
||||
--------
|
||||
|
||||
- [Keyboard shortcuts for Blender](https://download.blender.org/documentation/BlenderHotkeyReference.pdf) _(download.blender.org)_
|
12
docs/c.md
@ -18,13 +18,13 @@ int main() {
|
||||
}
|
||||
```
|
||||
|
||||
使用 `gcc` 编译 `hello.c` 文件
|
||||
使用 `gcc` 编译 `hello.c` 源文件
|
||||
|
||||
```bash
|
||||
$ gcc -o hello hello.c
|
||||
```
|
||||
|
||||
运行编译后的二进制文件(`hello`)
|
||||
运行编译后的二进制文件可执行文件(`hello`)
|
||||
|
||||
```bash
|
||||
$ ./hello
|
||||
@ -37,8 +37,8 @@ $ ./hello
|
||||
```c
|
||||
int myNum = 15;
|
||||
|
||||
int myNum2; // 不赋值,然后再赋值
|
||||
myNum2 = 15;
|
||||
int myNum2; // 声明变量 myNum2
|
||||
myNum2 = 15; // 变量声明后第一次赋值我们称为初始化,如果 初始化 和 赋值 在同一行,那么我们可以直接称为 定义变量 myNum2
|
||||
|
||||
int myNum3 = 15; // myNum3 值为 15
|
||||
myNum3 = 10; // 现在 myNum3 值为 10
|
||||
@ -55,6 +55,8 @@ int x = 5, y = 6, z = 50;
|
||||
|
||||
### 常量 Constants
|
||||
|
||||
常量在 C 语言中我们一般理解为不能被改变的值,活用常量与符号常量
|
||||
|
||||
```c
|
||||
const int minutesPerHour = 60;
|
||||
const float PI = 3.14;
|
||||
@ -443,7 +445,7 @@ int* ptr = &myAge; // 名为 ptr 的指针变量,用于存储 myAge
|
||||
|
||||
printf("%d\n", myAge); // 输出 myAge (43) 的值
|
||||
|
||||
printf("%p\n", \&myAge); // 输出 myAge 的内存地址(0x7ffe5367e044)
|
||||
printf("%p\n", &myAge); // 输出 myAge 的内存地址(0x7ffe5367e044)
|
||||
|
||||
printf("%p\n", ptr); // 用指针(0x7ffe5367e044)输出myAge的内存地址
|
||||
```
|
||||
|
123
docs/conda.md
Normal file
@ -0,0 +1,123 @@
|
||||
Conda备忘清单
|
||||
===
|
||||
|
||||
这是开始使用 `conda` 命令的快速参考备忘单,初次学习可参考[这里](https://anaconda.org.cn/anaconda/user-guide/getting-started/#open-nav-win)
|
||||
|
||||
入门
|
||||
-----
|
||||
<!--rehype:body-class=cols-1-->
|
||||
|
||||
### 常用基础命令
|
||||
|
||||
命令 | 说明
|
||||
:-- | --
|
||||
`conda info` | 查看 conda 的一系列基本信息(版本、源、路径等)
|
||||
`conda update -n base conda` | 在base环境中更新conda
|
||||
`conda install anconda=2022.05` | 安装最新的anaconda发行版(见[发行说明](https://docs.anaconda.com/navigator/release-notes/?utm_source=cheatsheet))
|
||||
`conda create --name <ENVNAME>` | 创建一个新的环境
|
||||
`conda activate <ENVNAME>` | 激活/切换/选择一个环境
|
||||
`conda env list 或者 conda info -e` | 列出所有的环境和位置看
|
||||
`conda list -n <ENVNAME> --show-channel-urls` | 列出某个环境所有包和包的下载源路径
|
||||
`conda install -n <ENVNAME> <PKG1> <PKG2>` | 在某个环境中安装包
|
||||
`conda uninstall <PKGNAME包名> -n <ENVNAME环境名>` | 从某个环境删除某个包
|
||||
`conda update --all -n <ENVNAME环境名>` | 升级某个环境的所有包
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
环境与包管理
|
||||
-----
|
||||
|
||||
### 包与源管理
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
> 在使用 `conda` 时,包依赖关系和平台细节会**自动解决**
|
||||
|
||||
查看命令均可搭配 `grep` 命令使用,例如:
|
||||
|
||||
```bash
|
||||
conda list | grep torch #列出所有包含torch的包
|
||||
```
|
||||
|
||||
Command | Description
|
||||
:-- | --
|
||||
`conda list` | 列出所有安装的包
|
||||
`conda list --show-channel-urls` |列出包含源信息的已安装包
|
||||
`conda update --all` | 更新所有包
|
||||
`conda install -c <CHANNELNAME源地址> <PKG1包> <PKG2>` | 从特定源(如清华源、阿里源)安装包
|
||||
`conda install PKGNAME=3.1.4` | 安装指定版本的包
|
||||
`conda install "PKGNAME>2.5,<3.2"` | 使用AND逻辑安装包
|
||||
`conda install "<PKGNAME> [version='2.5\|3.2']"` |
|
||||
`conda uninstall <PKGNAME>` | 卸载包
|
||||
`conda config --show-sources` | 查看源地址(位置越靠上,搜索的时候越优先)
|
||||
`conda config --add channels <CHANNELNAME>` | 添加conda的源地址
|
||||
`conda config --remove channels <CHANNELNAME>`| 移除conda的源地址
|
||||
|
||||
### 更改环境
|
||||
|
||||
Command | Description
|
||||
:-- | --
|
||||
`conda create -n <ENVNAME> python=3.10` | 指定Python版本创建环境
|
||||
`conda create --clone <ENVNAME> -n <NEWENV>` | 从已有环境克隆一个新环境
|
||||
`conda rename -n <ENVNAME> <NEWENVNAME>` | 对环境名字重命名
|
||||
`conda remove -n <ENVNAME> --all` | 通过名字删除一个环境
|
||||
`conda env remove -n <ENVNAME>` | 通过名字删除一个环境
|
||||
`conda list -n <ENVNAME> --revisions` | 列出环境的各个修订版本
|
||||
`conda install -n <ENVNAME> --revision <NUMBER>"` | 回滚到环境的某个版本本
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
关于 `conda` 环境回滚可参考:[这里](https://www.pybloggers.com/2016/06/conda-revisions-letting-you-rollback-to-a-previous-version-of-your-environment/)
|
||||
|
||||
### 导出环境配置
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
建议将导出文件命名为“environment”,环境名称将被保留
|
||||
|
||||
Command | Description
|
||||
:-- | --
|
||||
`conda env export --from-history>ENV.yml` | 跨平台兼容需(通过这种方式,可以省去所有其他可能是特定于平台的依赖项)
|
||||
`conda env export -n ENVNAME > ENV.yml` | 导出指定环境到yml文件
|
||||
`conda env export > ENV.yml` | 导出当前环境到yml文件
|
||||
`conda list --explicit>ENV.txt` | 导出包信息到当前目录
|
||||
`conda env create -n ENVNAME --file ENV.yml` | 从yml文件导入
|
||||
`conda create -n ENVNAME --file ENV.txt` | 从txt文件导入
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 另外
|
||||
|
||||
查看命令帮助
|
||||
|
||||
```bash
|
||||
conda <COMMAND> --help
|
||||
conda search <PKGNAME> --info
|
||||
conda clean --all # 清除所有未使用的文件
|
||||
conda config --show # 检查conda配置
|
||||
```
|
||||
|
||||
设置指定环境为默认环境
|
||||
|
||||
```bash
|
||||
vim ~/.bashrc
|
||||
export PATH="~/anaconda/envs/ENVNAME/bin:$PATH" # 文件末尾添加
|
||||
conda activate ENVNAME # :wq 保存并关闭
|
||||
source ~/.bashrc # 更新
|
||||
conda config --set auto_activate_base false # 禁用auto activate base环境
|
||||
```
|
||||
|
||||
### 额外提示
|
||||
|
||||
```bash
|
||||
conda COMMAND --help # 获得任何命令的帮助
|
||||
# 获取任何包裹的信息
|
||||
conda search PKGNAME --info
|
||||
# 运行没有用户提示的命令,例如,安装多个包
|
||||
conda COMMAND ARG --yes
|
||||
conda install PKG1 PKG2 --yes
|
||||
conda clean --all # 删除所有未使用的文件
|
||||
conda config --show # 检查 conda 配置
|
||||
```
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
- [Anaconda文档](https://anaconda.org.cn/)
|
||||
- [官网命令Cheat sheet](https://conda.io/projects/conda/en/latest/user-guide/cheatsheet.html)
|
||||
- [Conda cheatsheet PDF](https://conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf)
|
283
docs/cs.md
@ -26,47 +26,34 @@ $ dotnet run
|
||||
Hello, world!
|
||||
```
|
||||
|
||||
### 变量
|
||||
### 命名空间
|
||||
|
||||
```cs
|
||||
int intNum = 9;
|
||||
long longNum = 9999999;
|
||||
float floatNum = 9.99F;
|
||||
double doubleNum = 99.999;
|
||||
decimal decimalNum = 99.9999M;
|
||||
char letter = 'D';
|
||||
bool @bool = true;
|
||||
string site = "jaywcjlove.github.io";
|
||||
var num = 999;
|
||||
var str = "999";
|
||||
var bo = false;
|
||||
//使用时 using 命名名称
|
||||
using Test;
|
||||
//创建:
|
||||
namespace Test{
|
||||
class Test_className{
|
||||
// main方法是程序的主入口
|
||||
public void Myclass() {
|
||||
console.writeline("Test")
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 原始数据类型
|
||||
### 访问修饰符
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
数据类型 | 尺寸 | 范围
|
||||
:- | - | -
|
||||
| `int` | 4 bytes | -2^31^ ^to^ 2^31^-1 |
|
||||
| `long` | 8 bytes | -2^63^ ^to^ 2^63^-1 |
|
||||
| `float` | 4 bytes | 6 ^to^ 7 decimal digits |
|
||||
| `double` | 8 bytes | 15 decimal digits |
|
||||
| `decimal` | 16 bytes | 28 ^to^ 29 decimal digits |
|
||||
| `char` | 2 bytes | 0 ^to^ 65535 |
|
||||
| `bool` | 1 bit | true / false |
|
||||
| `string` | 2 bytes per char | _N/A_ |
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
### 注释
|
||||
|
||||
```cs
|
||||
// 单行注释
|
||||
/* 多行
|
||||
注释 */
|
||||
// TODO:向 Visual Studio 中的任务列表添加注释
|
||||
/// 用于文档的单行注释
|
||||
/** 多行 注释
|
||||
用于文档 **/
|
||||
```
|
||||
| 声明的可访问性 | 含义 |
|
||||
|-----|----------------------|
|
||||
| `public` | 访问不受限制 |
|
||||
| `protected` | 访问限于包含类或派生自包含类的类型 (该类内部和继承类中可以访问) |
|
||||
| `internal` | 访问限于当前程序集 |
|
||||
| `protected internal` | 访问限于当前程序集或派生自包含类的类型 |
|
||||
| `private` | 访问限于包含类 |
|
||||
| `private protected` | 访问限于包含类或当前程序集中派生自包含类的类型,自 C# 7.2 之后可用 |
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 字符串
|
||||
|
||||
@ -91,6 +78,42 @@ if(int.TryParse(Console.ReadLine(),out int input))
|
||||
}
|
||||
```
|
||||
|
||||
### 变量
|
||||
|
||||
```cs
|
||||
int intNum = 9;
|
||||
long longNum = 9999999;
|
||||
float floatNum = 9.99F;
|
||||
double doubleNum = 99.999;
|
||||
decimal decimalNum = 99.9999M;
|
||||
char letter = 'D';
|
||||
bool @bool = true;
|
||||
string site = "jaywcjlove.github.io";
|
||||
var num = 999;
|
||||
var str = "999";
|
||||
var bo = false;
|
||||
```
|
||||
|
||||
### 注释
|
||||
|
||||
```cs
|
||||
// 单行注释
|
||||
|
||||
/*
|
||||
* 多行
|
||||
* 注释
|
||||
*/
|
||||
|
||||
// TODO:向IDE中的任务列表添加注释(VS、Rider都支持)
|
||||
|
||||
/// XML 单行注释,用于文档
|
||||
|
||||
/**
|
||||
* XML 多行注释,
|
||||
* 用于文档
|
||||
*/
|
||||
```
|
||||
|
||||
### 条件判断
|
||||
|
||||
```cs
|
||||
@ -132,6 +155,57 @@ foreach(int num in numbers) {
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```cs
|
||||
while(true)
|
||||
{
|
||||
Console.WriteLine("只要给定的条件为真,while 循环语句会重复执行");
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```cs
|
||||
do
|
||||
{
|
||||
Console.WriteLine("与 while 类似,do...while 会确保至少执行一次循环。");
|
||||
} while( true );
|
||||
```
|
||||
|
||||
C# 数据类型
|
||||
---------------------
|
||||
|
||||
### 原始数据类型
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
| 关键字 | 名称 | System 别名 | 占用空间(Byte) | 数据范围 |
|
||||
| ------ | ------------ | ----------- | ---------- | ---------------------------------------- |
|
||||
| `bool` | 布尔型 | `Boolean` | 1 | true/false |
|
||||
| `sbyte` | 有符号字节型 | `SByte` | 1 | -128 ~ 127 |
|
||||
| `byte` | 字节型 | `Byte` | 1 | 0 ~ 255 |
|
||||
| `short` | 短整型 | `Int16` | 2 | -32,768 ~ 32,767 |
|
||||
| `ushort` | 无符号短整型 | `UInt16` | 2 | 0 ~ 65,535 |
|
||||
| `int` | 整型 | `Int32` | 4 | -2,147,483,648 ~ 2,147,483,647 |
|
||||
| `uint` | 无符号整型 | `UInt32` | 4 | 0 ~ 4,294,967,295 |
|
||||
| `long` | 长整型 | `Int64` | 8 | -2^63 ~ 2^63-1 |
|
||||
| `ulong` | 无符号长整型 | `UInt64` | 8 | 0 ~ 2^64-1 |
|
||||
| `char` | 字符型 | `Char` | 8 | UTF-16 所编码的字符 |
|
||||
| `float` | 单精度浮点型 | `Single` | 4 | ±1.5x10^45 ~ ±3.4x10^38 |
|
||||
| `double` | 双精度浮点型 | `Double` | 8 | ±5.0x10^-324 ~ ±1.7x10^308 |
|
||||
| `nint` | 指针型 | `IntPtr` | 与指针相同 | 与指针相同(受操作系统和处理器位宽影响) |
|
||||
| `nuint` | 无符号指针型 | `UIntPtr` | 与指针相同 | 与指针相同(受操作系统和处理器位宽影响) |
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
### 基本数据类型
|
||||
|
||||
关键字 | 名称 | System 别名 | 说明
|
||||
:------ | ------ | ------ | ------
|
||||
(除指针型外的全部原始数据类型) | - | - | 原始数据类型都是值类型,基本数据类型包含部分本质上是引用的数据类型
|
||||
`string` | 字符串 | `String` | 可变长度
|
||||
`decimal` | 十进制浮点数 | `Decimal` | 适合处理货币等计算,16字节长,不遵循 IEEE 754 关于浮点数的规则
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
C# 字符串
|
||||
----------------
|
||||
|
||||
@ -213,6 +287,135 @@ string multiLine = """
|
||||
Console.WriteLine(multiLine); // => Content begin "Hello World!" /\n<>"" end.
|
||||
```
|
||||
|
||||
### 字符串操作
|
||||
|
||||
#### 字符串分割
|
||||
|
||||
```cs
|
||||
string Name = "字A符A串A分A割";
|
||||
string[] Names=Name.Split(new char[] { 'A' });
|
||||
//会以A为媒介把字符串分成若干份
|
||||
for (int i = 0; i < Names.Length; i++)
|
||||
{
|
||||
Console.Write(Names[i]);
|
||||
}
|
||||
```
|
||||
|
||||
#### 字符串截取
|
||||
|
||||
```cs
|
||||
string Str = "字符串截取";
|
||||
Str = Str.Substring(2, 1);
|
||||
Console.WriteLine(Str);
|
||||
//输出结果“串”,意为从第二个下标开始截取一位字符
|
||||
```
|
||||
|
||||
#### 字符串替换
|
||||
|
||||
```cs
|
||||
string Rep = "字符1替换";
|
||||
Rep = Rep.Replace("1", "串");
|
||||
Console.WriteLine(Rep);
|
||||
//会把字符中的 “1”替换成“串”
|
||||
```
|
||||
|
||||
### 逻辑运算
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```cs
|
||||
//或运算, 与运算, 非运算
|
||||
bool A = true;
|
||||
bool B = false;
|
||||
bool Or = A || B; // = A | B
|
||||
bool And = A && B; // = A & B
|
||||
bool Not = !A;
|
||||
// ||,&& 与 |,& 分别为逻辑运算和条件逻辑运算, 两者的区别在于,
|
||||
// 前者仅在必要时才会计算右侧的值, 后者始终计算右侧的值. 例如:
|
||||
bool C = false;
|
||||
bool D = true;
|
||||
bool CalcD() {
|
||||
D = !D;
|
||||
return D;
|
||||
}
|
||||
bool E = C && CalcD(); // C: false, D: false, E: false
|
||||
bool F = C & CalcD(); // C:false, D: true, F: false
|
||||
// 两种运算方法稍有不同, 计算结果始终相同, 但第二种可能造成其他影响.
|
||||
//异或运算
|
||||
bool Xor = A ^ B;
|
||||
```
|
||||
|
||||
C# 中的逻辑运算支持可空布尔类型运算. 注意条件逻辑运算不支持可空布尔类型.
|
||||
|
||||
x | y | x & y | x \| y | x ^ y | ! x
|
||||
:- | - | --- | --- | --- | --
|
||||
true | true | true | true | false | false
|
||||
true | false | false | true | true | false
|
||||
true | null | null | true | null | false
|
||||
false | true | false | true | true | true
|
||||
false | false | false | false | false | true
|
||||
false | null | false | null | null | true
|
||||
null | true | null | true | null | null
|
||||
null | false | false | null | null | null
|
||||
null | null | null | null | null | null
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
### 算术运算符
|
||||
<!--rehype:wrap-class=col-span-1-->
|
||||
|
||||
C# 支持下表中的所有算术运算符。假设变量 A 的值为 10,变量 B 的值为 20,则:
|
||||
|
||||
| 运算符 | 描述 | 实例 |
|
||||
| :----- | -------------------------------- | ----------------- |
|
||||
| + | 把两个操作数相加 | A + B 将得到 30 |
|
||||
| - | 从第一个操作数中减去第二个操作数 | A - B 将得到 -10 |
|
||||
| \* | 把两个操作数相乘 | A \* B 将得到 200 |
|
||||
| / | 分子除以分母 | B / A 将得到 2 |
|
||||
| % | 取模运算符,整除后的余数 | B % A 将得到 0 |
|
||||
| ++ | 自增运算符,整数值增加 1 | A++ 将得到 11 |
|
||||
| -- | 自减运算符,整数值减少 1 | A-- 将得到 9 |
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
### 关系运算符
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
C# 支持下表中的所有关系运算符。假设变量 A 的值为 1,变量 B 的值为 2,则:
|
||||
|
||||
| 运算符 | 描述 | 实例 |
|
||||
| :----- | -------------------------------------------------------------- | ----------------- |
|
||||
| == | 检查两个操作数的值是否相等,如果相等则条件为真。 | (A == B) 不为真。 |
|
||||
| != | 检查两个操作数的值是否相等,如果不相等则条件为真。 | (A != B) 为真。 |
|
||||
| > | 检查左操作数的值是否大于右操作数的值,如果是则条件为真。 | (A > B) 不为真。 |
|
||||
| < | 检查左操作数的值是否小于右操作数的值,如果是则条件为真。 | (A < B) 为真。 |
|
||||
| >= | 检查左操作数的值是否大于或等于右操作数的值,如果是则条件为真。 | (A >= B) 不为真。 |
|
||||
| <= | 检查左操作数的值是否小于或等于右操作数的值,如果是则条件为真。 | (A <= B) 为真。 |
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
### 运算符优先级
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
运算符的优先级确定表达式中项的组合。这会影响到一个表达式如何计算。某些运算符比其他运算符有更高的优先级,例如,乘除运算符具有比加减运算符更高的优先级。
|
||||
|
||||
下表将按运算符优先级从高到低列出各个运算符,具有较高优先级的运算符出现在表格的上面,具有较低优先级的运算符出现在表格的下面。在表达式中,较高优先级的运算符会优先被计算。
|
||||
|
||||
| 类别 | 运算符 | 结合性 |
|
||||
| :--------- | ---------------------------------- | -------- |
|
||||
| 后缀 | () [] -> . ++ - - | 从左到右 |
|
||||
| 一元 | + - ! ~ ++ - - (type)\* & sizeof | 从右到左 |
|
||||
| 乘除 | \* / % | 从左到右 |
|
||||
| 加减 | + - | 从左到右 |
|
||||
| 移位 | << >> | 从左到右 |
|
||||
| 关系 | < <= > >= | 从左到右 |
|
||||
| 相等 | == != | 从左到右 |
|
||||
| 位与 AND | & | 从左到右 |
|
||||
| 位异或 XOR | ^ | 从左到右 |
|
||||
| 位或 OR | \| | 从左到右 |
|
||||
| 逻辑与 AND | && | 从左到右 |
|
||||
| 逻辑或 OR | \|\| | 从左到右 |
|
||||
| 条件 | ?: | 从右到左 |
|
||||
| 赋值 | = += -= \*= /= %=>>= <<= &= ^= \|= | 从右到左 |
|
||||
| 逗号 | , | 从左到右 |
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
杂项
|
||||
-----------
|
||||
|
||||
@ -221,8 +424,8 @@ Console.WriteLine(multiLine); // => Content begin "Hello World!" /\n<>"" end.
|
||||
|
||||
概念 | 中文名 | 定义
|
||||
:- | -|--
|
||||
Runtime | 运行时 | 执行给定的已编译代码单元所需的服务集合
|
||||
Common Language Runtime (CLR) | 通用语言运行库 | 主要定位、加载和托管 .NET 对象。<br/>CLR 还处理内存管理、应用程序托管、线程协调、执行安全检查和其他低级细节
|
||||
Managed code | 托管代码 | 在 `.NET` 运行时编译和运行的代码。 C#/F#/VB 就是例子
|
||||
Unmanaged code | 非托管代码 | 直接编译为机器代码且不能由 .NET 运行时直接托管的代码。<br/>不包含空闲内存管理、垃圾收集等。从 C/C++ 创建的 DLL 就是示例
|
||||
`Runtime` | 运行时 | 执行给定的已编译代码单元所需的服务集合
|
||||
`Common Language Runtime (CLR)` | 通用语言运行库 | 主要定位、加载和托管 .NET 对象。<br/>CLR 还处理内存管理、应用程序托管、线程协调、执行安全检查和其他低级细节
|
||||
`Managed code` | 托管代码 | 在 `.NET` 运行时编译和运行的代码。 C#/F#/VB 就是例子
|
||||
`Unmanaged code` | 非托管代码 | 直接编译为机器代码且不能由 .NET 运行时直接托管的代码。<br/>不包含空闲内存管理、垃圾收集等。从 C/C++ 创建的 DLL 就是示例
|
||||
<!--rehype:className=show-header-->
|
||||
|
232
docs/css.md
@ -1264,10 +1264,13 @@ CSS 函数
|
||||
### calc()
|
||||
|
||||
```css
|
||||
width: calc(100% - 80px);
|
||||
div {
|
||||
width: calc(100% - 30px);
|
||||
height: calc(100% - 30px);
|
||||
}
|
||||
```
|
||||
|
||||
声明 CSS 属性值时执行一些计算
|
||||
[`calc()`](https://developer.mozilla.org/zh-CN/docs/Web/CSS/calc) CSS 函数允许您在指定 CSS 属性值时执行计算
|
||||
|
||||
### clamp()
|
||||
|
||||
@ -1468,6 +1471,35 @@ html {
|
||||
|
||||
[点击我](#入门)页面会平滑滚动到入门
|
||||
|
||||
### 修改浏览器自动填充 input 样式
|
||||
|
||||
```css
|
||||
input[type="text"]:autofill {
|
||||
box-shadow: 0 0 0 1000px #000 inset;
|
||||
-webkit-text-fill-color: white;
|
||||
}
|
||||
```
|
||||
|
||||
另见: [:autofill](https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill)
|
||||
|
||||
### 修改 input type="color" 样式
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```css
|
||||
input[type="color"] {
|
||||
-webkit-appearance: none;
|
||||
border: none;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
input[type="color"]::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
input[type="color"]::-webkit-color-swatch {
|
||||
border: none;
|
||||
}
|
||||
```
|
||||
|
||||
### 忽略用作间距的换行符 \<br />
|
||||
|
||||
```css
|
||||
@ -1491,6 +1523,7 @@ br + br {
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
@ -1519,6 +1552,24 @@ html {
|
||||
|
||||
上面示例设置了当前卡片灰色
|
||||
|
||||
### `<textarea>`自动增加其高度
|
||||
|
||||
```css
|
||||
textarea {
|
||||
form-sizing: normal
|
||||
}
|
||||
```
|
||||
|
||||
### 定义容器的长宽比
|
||||
|
||||
```css
|
||||
div {
|
||||
aspect-ratio: 1/1
|
||||
}
|
||||
```
|
||||
|
||||
属性 [aspect-ratio](https://developer.mozilla.org/zh-CN/docs/Web/CSS/aspect-ratio) 可以非常容易的定义一个容器的长宽比
|
||||
|
||||
### 使用 unset 而不是重置所有属性
|
||||
|
||||
使用 `all` 速记来指定元素的所有属性。将值设置为 `unset` 会将元素的属性更改为其初始值:
|
||||
@ -1557,6 +1608,7 @@ body {
|
||||
这样文本元素可以很容易地从 `body` 继承
|
||||
|
||||
### 使用图像作为光标
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```css
|
||||
div {
|
||||
@ -1593,17 +1645,6 @@ div {
|
||||
|
||||
多行文本截断到特定的行数,末尾显示省略号 _(...)_
|
||||
|
||||
### 计算函数
|
||||
|
||||
```css
|
||||
div {
|
||||
width: calc(100% - 30px);
|
||||
height: calc(100% - 30px);
|
||||
}
|
||||
```
|
||||
|
||||
[`calc()`](https://developer.mozilla.org/zh-CN/docs/Web/CSS/calc) CSS 函数允许您在指定 CSS 属性值时执行计算
|
||||
|
||||
### 粘性定位元素
|
||||
|
||||
```css
|
||||
@ -1677,16 +1718,6 @@ div {
|
||||
|
||||
通过样式来控制一个元素 `div` 是否可以编辑
|
||||
|
||||
### 定义容器的长宽比
|
||||
|
||||
```css
|
||||
div {
|
||||
aspect-ratio: 1/1
|
||||
}
|
||||
```
|
||||
|
||||
属性 [aspect-ratio](https://developer.mozilla.org/zh-CN/docs/Web/CSS/aspect-ratio) 可以非常容易的定义一个容器的长宽比
|
||||
|
||||
### 等宽表格单元格
|
||||
|
||||
尝试使用 `table-layout: fixed` 以保持单元格宽度相等:
|
||||
@ -1785,16 +1816,6 @@ button:disabled {
|
||||
|
||||
就这么简单
|
||||
|
||||
### 在用作间距的换行符上设置 `display: none`
|
||||
|
||||
用户使用额外的换行符
|
||||
|
||||
```css
|
||||
br + br {
|
||||
display: none;
|
||||
}
|
||||
```
|
||||
|
||||
### 子元素选中父元素
|
||||
|
||||
```css
|
||||
@ -1811,6 +1832,151 @@ div:has(h2):has(ul) {
|
||||
}
|
||||
```
|
||||
|
||||
### 在用作间距的换行符上设置 `display: none`
|
||||
|
||||
用户使用额外的换行符
|
||||
|
||||
```css
|
||||
br + br {
|
||||
display: none;
|
||||
}
|
||||
```
|
||||
|
||||
### 给 `body` 添加行高
|
||||
|
||||
```css
|
||||
body {
|
||||
line-height: 1.5;
|
||||
}
|
||||
```
|
||||
|
||||
您不需要为每个 `<p>`、`<h*>` 等分别添加行高。相反,将其添加到正文
|
||||
|
||||
### 检查本地是否安装了字体
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```css
|
||||
@font-face {
|
||||
font-family: "Dank Mono";
|
||||
src:
|
||||
/* Full name */
|
||||
local("Dank Mono"),
|
||||
/* Postscript name */
|
||||
local("Dank-Mono"),
|
||||
/* 否则,请下载它! */
|
||||
url("//...a.server/DankMono.woff");
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: "Dank Mono",
|
||||
system-ui-monospace;
|
||||
}
|
||||
```
|
||||
|
||||
您可以在远程获取字体之前检查是否在本地安装了字体,这也是一个很好的性能提示
|
||||
|
||||
### 获取 HTML 元素的属性
|
||||
|
||||
```html
|
||||
<a href="https://example.com">超链接</a>
|
||||
```
|
||||
|
||||
attr HTML 元素的属性名。
|
||||
|
||||
```css
|
||||
a:after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
```
|
||||
|
||||
### 为表单元素设置 `:focus`
|
||||
|
||||
```css
|
||||
a:focus, button:focus, input:focus,
|
||||
select:focus, textarea:focus {
|
||||
box-shadow: none;
|
||||
outline: #000 dotted 2px;
|
||||
outline-offset: .05em;
|
||||
}
|
||||
```
|
||||
|
||||
有视力的键盘用户依靠焦点来确定键盘事件在页面中的位置。使表单元素的焦点比浏览器的默认实现更加突出和一致
|
||||
|
||||
### 垂直居中任何东西
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```css
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
```
|
||||
|
||||
...还有 CSS 网格:
|
||||
|
||||
```css
|
||||
body {
|
||||
display: grid;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
place-items: center center;
|
||||
}
|
||||
```
|
||||
|
||||
### 图片对齐不变形
|
||||
|
||||
```css
|
||||
img {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
/** 确保图片按原始宽高比例进行缩放 */
|
||||
object-fit: cover;
|
||||
object-position: left top;
|
||||
transition: 1s;
|
||||
}
|
||||
img:hover {
|
||||
/** 指定图片显示的位置,结合鼠标移动+过渡动画 */
|
||||
object-position: right bottom;
|
||||
}
|
||||
```
|
||||
|
||||
### 多行截断,展示省略号
|
||||
|
||||
```css
|
||||
.clamp {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
```
|
||||
|
||||
`html` 文本超过 3 行将被截断,显示省略号...
|
||||
|
||||
```html
|
||||
<p class="clamp">
|
||||
展示多行文本,超过 3 行将被截断,显示省略号...
|
||||
</p>
|
||||
```
|
||||
|
||||
### 逗号分隔列表
|
||||
|
||||
```css
|
||||
ul > li:not(:last-child)::after {
|
||||
content: ",";
|
||||
}
|
||||
```
|
||||
|
||||
使列表项看起来像一个真实的逗号分隔列表,使用 `:not()` 伪类,最后一项不会添加逗号
|
||||
|
||||
另见
|
||||
---------
|
||||
|
||||
|
10
docs/curl.md
@ -63,14 +63,16 @@ Curl 是一种在服务器之间传输数据的工具,支持协议,包括 HT
|
||||
### 头信息 Headers
|
||||
|
||||
```bash
|
||||
-A <str> # --user-agent
|
||||
-A <str> # --user-agent
|
||||
-b name=val # --cookie
|
||||
|
||||
-b name=val # --cookie
|
||||
# 从 URL 的指定文件加载 cookie
|
||||
-b, --cookie FILE
|
||||
# 将 cookie 从 URL 保存到指定文件
|
||||
-c, --cookie-jar FILE
|
||||
|
||||
-b FILE # --cookie
|
||||
|
||||
-H "X-Foo: y" # --header
|
||||
|
||||
--compressed # 使用 deflate/gzip
|
||||
```
|
||||
|
||||
|
@ -17,14 +17,14 @@ $ docker run -d -p 80:80 docker/getting-started
|
||||
|
||||
----
|
||||
|
||||
- `-d` - 以分离模式运行容器
|
||||
- `-p 80:80` - 将端口 80 映射到容器中的端口 80
|
||||
- `-d` - 以分离(后台)模式运行容器
|
||||
- `-p 80:80` - 将端口 80 映射到容器中的端口 80,格式:宿主机端口:容器端口
|
||||
- `docker/getting-started` - 要使用的镜像
|
||||
|
||||
在前台创建并运行容器
|
||||
在前台创建并运行容器(之后如果要退出容器但是不关闭容器,按*Ctrl+P+Q*即可)
|
||||
|
||||
```shell
|
||||
$ docker run -it -p --rm 8001:8080 --name my-nginx nginx
|
||||
$ docker run -it --rm -p 8001:8080 --name my-nginx nginx
|
||||
```
|
||||
|
||||
----
|
||||
@ -41,7 +41,7 @@ $ docker run -it -p --rm 8001:8080 --name my-nginx nginx
|
||||
|-------------------------------------|--------------------------------------------------|
|
||||
| `docker ps` | 列出正在运行的容器 |
|
||||
| `docker ps -a` | 列出所有容器 |
|
||||
| `docker ps -s` | 列出正在运行的容器 _(带 CPU / 内存)_ |
|
||||
| `docker ps -s` | 列出正在运行的容器 *(带 CPU / 内存)* |
|
||||
| `docker images` | 列出所有镜像 |
|
||||
| `docker exec -it <container> bash` | 连接到容器 |
|
||||
| `docker logs <container>` | 显示容器的控制台日志 |
|
||||
@ -142,13 +142,14 @@ Docker 镜像
|
||||
`docker load --input ubuntu.tar` | 加载一个 tarred 存储库
|
||||
`docker save busybox > ubuntu.tar` | 将镜像保存到 tar 存档
|
||||
`docker history` | 显示镜像的历史
|
||||
`docker commit nginx` | 将容器另存为镜像。
|
||||
`docker commit nginx my_nginx` | 将容器另存为镜像
|
||||
`docker tag nginx eon01/nginx` | 标记镜像
|
||||
`docker push eon01/nginx` | 推送镜像
|
||||
|
||||
### 构建镜像
|
||||
|
||||
```shell
|
||||
# 注意有的最后面是英文 .
|
||||
$ docker build .
|
||||
$ docker build github.com/creack/docker-firefox
|
||||
$ docker build - < Dockerfile
|
||||
@ -224,6 +225,20 @@ docker network create -d overlay \
|
||||
MyOverlayNetwork
|
||||
```
|
||||
|
||||
Docker 快捷键
|
||||
----
|
||||
<!--rehype:body-class=cols-2-->
|
||||
|
||||
### 退出
|
||||
|
||||
| Docker 快捷键 | 说明 |
|
||||
|------------|------|
|
||||
`ctrl+c` | 将关闭容器,并删除当前的容器实例
|
||||
`ctrl+d` | 将保留容器,并退出到Docker主机的命令行界面
|
||||
`ctrl+p+q` | 将容器分离,保留容器,但是不退出
|
||||
|
||||
需要特别注意的是,上面的退出快捷键中的删除容器实例只对于使用`docker attach`进入的容器生效,使用`docker exec`进入容器后使用上面的快捷键后将隔离容器且不会删除容器实例。
|
||||
|
||||
各种各样的
|
||||
----
|
||||
<!--rehype:body-class=cols-2-->
|
||||
@ -232,10 +247,10 @@ docker network create -d overlay \
|
||||
|
||||
| Docker 语法 | 说明 |
|
||||
|------------|------|
|
||||
`docker search search_word` | 在 docker hub 中搜索镜像。
|
||||
`docker pull user/image` | 从 docker hub 下载镜像。
|
||||
`docker search search_word` | 在 docker hub 中搜索镜像
|
||||
`docker pull user/image` | 从 docker hub 下载镜像
|
||||
`docker login` | 向 docker hub 进行身份验证
|
||||
`docker push user/image` | 将镜像上传到 docker hub。
|
||||
`docker push user/image` | 将镜像上传到 docker hub
|
||||
|
||||
### 镜像仓库命令
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
@ -312,7 +327,7 @@ $ docker volume prune
|
||||
`docker-compose config` | 验证并查看 Compose 文件
|
||||
`docker-compose scale <service_name>=<replica>` | 为服务指定容器个数
|
||||
`docker-compose top` | 显示正在运行的进程
|
||||
`docker-compose run -rm -p 2022:22 web bash` | 启动 Web 服务并运行 bash 作为其命令,删除旧容器。
|
||||
`docker-compose run -rm -p 2022:22 web bash` | 启动 Web 服务并运行 bash 作为其命令,删除旧容器
|
||||
|
||||
### Docker Services
|
||||
|
||||
@ -658,6 +673,6 @@ $ docker run -d --name gitlab \
|
||||
另见
|
||||
----
|
||||
|
||||
- [Dockerfile 备忘清单](./dockerfile.md) _(github.io)_
|
||||
- [Docker 官方入门教程](https://docs.docker.com/get-started/) _(docker.com)_
|
||||
- [Docker入门学习笔记](https://jaywcjlove.github.io/docker-tutorial) _(github.io)_
|
||||
- [Dockerfile 备忘清单](./dockerfile.md) *(github.io)*
|
||||
- [Docker 官方入门教程](https://docs.docker.com/get-started/) *(docker.com)*
|
||||
- [Docker入门学习笔记](https://jaywcjlove.github.io/docker-tutorial) *(github.io)*
|
||||
|
@ -28,8 +28,8 @@ FROM [--platform=<platform>] <image> [AS <name>]
|
||||
示例
|
||||
|
||||
```dockerfile
|
||||
FROM ruby:2.2.2
|
||||
FROM golang:1.19-alpine3.16 AS build-env
|
||||
FROM ruby:3.2.2
|
||||
FROM golang:1.20-alpine3.16 AS build-env
|
||||
```
|
||||
|
||||
### 变量 ENV
|
||||
@ -214,7 +214,7 @@ Dockerfile 示例
|
||||
### 服务静态网站的最小 Docker 镜像
|
||||
|
||||
```dockerfile
|
||||
FROM lipanski/docker-static-website:latest
|
||||
FROM wcjiang/docker-static-website:latest
|
||||
# 使用 .dockerignore 文件来控制镜像中的内容!
|
||||
# 复制当前目录内容,到容器中
|
||||
COPY ./ .
|
||||
@ -223,13 +223,13 @@ COPY ./ .
|
||||
这会产生一个 **`154KB +`** 的单层镜像。 如果您需要以不同的方式配置 `httpd`,您可以覆盖 CMD 行:
|
||||
|
||||
```dockerfile
|
||||
FROM lipanski/docker-static-website:latest
|
||||
FROM wcjiang/docker-static-website:latest
|
||||
COPY . .
|
||||
|
||||
CMD ["/busybox","httpd","-f","-v","-p","3000","-c","httpd.conf"]
|
||||
```
|
||||
|
||||
缩小镜像过程[查看原文](https://lipanski.com/posts/smallest-docker-image-static-website),镜像 [Dockerfile 源码](https://github.com/lipanski/docker-static-website)。
|
||||
缩小镜像过程[查看原文](https://lipanski.com/posts/smallest-docker-image-static-website),镜像 [Dockerfile 源码](https://github.com/forksss/docker-static-website)。
|
||||
|
||||
### Docker 镜像多阶段构建
|
||||
|
||||
|
329
docs/ejs.md
Normal file
@ -0,0 +1,329 @@
|
||||
Ejs 备忘清单
|
||||
====
|
||||
|
||||
[](https://www.npmjs.com/package/ejs)
|
||||
[](https://www.npmjs.com/package/ejs)
|
||||
[](https://github.com/mde/ejs/network/dependents)
|
||||
[](https://github.com/mde/ejs)
|
||||
|
||||
EJS(嵌入式 JavaScript)是一种简单的模板语言,可让您使用纯 JavaScript 生成 HTML 标记
|
||||
<!--rehype:style=padding-top: 12px;-->
|
||||
|
||||
入门
|
||||
----
|
||||
|
||||
### Hello world
|
||||
|
||||
#### 安装
|
||||
|
||||
```shell
|
||||
$ npm install ejs
|
||||
```
|
||||
|
||||
#### hello.ejs
|
||||
|
||||
```ejs
|
||||
<% if (user.email) { %>
|
||||
<h1><%= user.email %></h1>
|
||||
<% } %>
|
||||
```
|
||||
|
||||
#### 命令 CLI
|
||||
|
||||
```shell
|
||||
$ ejs hello.ejs -o hello.html
|
||||
```
|
||||
|
||||
### 使用数据渲染
|
||||
|
||||
```js
|
||||
let ejs = require('ejs');
|
||||
|
||||
let people = ['geddy', 'neil', 'alex'];
|
||||
let tpl = '<%= people.join(", "); %>';
|
||||
|
||||
let html = ejs.render(tpl, {
|
||||
people: people
|
||||
});
|
||||
console.log(html);
|
||||
```
|
||||
|
||||
向 `EJS` 传递模板字符串和一些数据
|
||||
|
||||
### 浏览器支持
|
||||
|
||||
```html
|
||||
<script src="ejs.js"></script>
|
||||
<script>
|
||||
let people = ['geddy', 'neil', 'alex'];
|
||||
let html = ejs.render(
|
||||
'<%= people.join(", "); %>',
|
||||
{ people: people }
|
||||
);
|
||||
</script>
|
||||
```
|
||||
|
||||
在脚本标签中使用 `ejs`
|
||||
|
||||
### 变量
|
||||
|
||||
| | |
|
||||
|--------------|----------------------------------|
|
||||
| `<%= var %>` | 打印变量的值 |
|
||||
| `<%- var %>` | 打印时不进行 HTML 转义 |
|
||||
|
||||
### CLI
|
||||
|
||||
渲染并指定输出文件
|
||||
|
||||
```shell
|
||||
$ ejs hello.ejs -o hello.html
|
||||
```
|
||||
|
||||
为其提供模板文件和数据文件
|
||||
|
||||
```shell
|
||||
$ ejs hello.ejs -f data.json -o hello.html
|
||||
```
|
||||
|
||||
### 注释
|
||||
|
||||
```ejs
|
||||
<%# 该行将表示一条注释 %>
|
||||
```
|
||||
|
||||
--------
|
||||
|
||||
```ejs
|
||||
<%# 这是一个多行 EJS 注释。
|
||||
它可以跨越多行,
|
||||
但不会显示
|
||||
在最终的 HTML 输出中。
|
||||
%>
|
||||
```
|
||||
|
||||
### 方法
|
||||
|
||||
```js
|
||||
let ejs = require('ejs');
|
||||
let template = ejs.compile(str, options);
|
||||
|
||||
template(data);
|
||||
// => 渲染的 HTML 字符串
|
||||
|
||||
ejs.render(str, data, options);
|
||||
// => 渲染的 HTML 字符串
|
||||
|
||||
ejs.renderFile(filename, data, options,
|
||||
function(err, str){
|
||||
// str => 渲染的 HTML 字符串
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
### 包括文件
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```ejs
|
||||
<%- include('partials/navbar.ejs') %>
|
||||
```
|
||||
|
||||
包含带有数据的模板:
|
||||
|
||||
```ejs
|
||||
<% include('header', { title: 'My Page' }) %>
|
||||
```
|
||||
|
||||
--------
|
||||
|
||||
```ejs
|
||||
<ul>
|
||||
<% users.forEach(function(user){ %>
|
||||
<%- include('item', {user: user}); %>
|
||||
<% }); %>
|
||||
</ul>
|
||||
```
|
||||
|
||||
要包含模板,需要文件名选项,路径是相对的
|
||||
|
||||
文档
|
||||
--------
|
||||
|
||||
### 条件句
|
||||
|
||||
```ejs
|
||||
<% if (userLoggedIn) { %>
|
||||
<p>Welcome, <%= username %>!</p>
|
||||
<% } else { %>
|
||||
<p>Please log in.</p>
|
||||
<% } %>
|
||||
```
|
||||
|
||||
### 使用循环
|
||||
|
||||
```ejs
|
||||
<% if (userLoggedIn) { %>
|
||||
<p>Welcome, <%= username %>!</p>
|
||||
<% } else { %>
|
||||
<p>Please log in.</p>
|
||||
<% } %>
|
||||
```
|
||||
|
||||
### 自定义分隔符
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```js
|
||||
let ejs = require('ejs'),
|
||||
users = ['geddy', 'neil', 'alex'];
|
||||
|
||||
// 只需一个模板
|
||||
ejs.render('<?= users.join(" | "); ?>',
|
||||
{users: users},
|
||||
{delimiter: '?'});
|
||||
// => 'geddy | neil | alex'
|
||||
|
||||
// 或全局范围内
|
||||
ejs.delimiter = '$';
|
||||
ejs.render('<$= users.join(" | "); $>',
|
||||
{users: users});
|
||||
// => 'geddy | neil | alex'
|
||||
```
|
||||
|
||||
### 缓存
|
||||
|
||||
```js
|
||||
let ejs = require('ejs'),
|
||||
LRU = require('lru-cache');
|
||||
|
||||
// LRU 缓存具有 100 项限制
|
||||
ejs.cache = LRU(100);
|
||||
```
|
||||
|
||||
### 布局
|
||||
|
||||
```ejs
|
||||
<%- include('header'); -%>
|
||||
<h1> Title </h1>
|
||||
<p>
|
||||
My page
|
||||
</p>
|
||||
<%- include('footer'); -%>
|
||||
```
|
||||
|
||||
### 自定义文件加载器
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```js
|
||||
let ejs = require('ejs');
|
||||
let myFileLoader = function (filePath) {
|
||||
return 'myFileLoader: ' + fs.readFileSync(filePath);
|
||||
};
|
||||
|
||||
ejs.fileLoader = myFileLoader;
|
||||
```
|
||||
|
||||
客户端支持
|
||||
-----
|
||||
<!--rehype:body-class=cols-2-->
|
||||
|
||||
### 例子
|
||||
|
||||
```html
|
||||
<div id="output"></div>
|
||||
<script src="ejs.min.js"></script>
|
||||
<script>
|
||||
let people = ['geddy', 'neil', 'alex'],
|
||||
html = ejs.render('<%= people.join(", "); %>', {people: people});
|
||||
// With jQuery:
|
||||
$('#output').html(html);
|
||||
// Vanilla JS:
|
||||
document.getElementById('output').innerHTML = html;
|
||||
</script>
|
||||
```
|
||||
|
||||
### 注意事项
|
||||
|
||||
```js
|
||||
let str = "Hello <%= include('file', {person: 'John'}); %>",
|
||||
fn = ejs.compile(str, {client: true});
|
||||
|
||||
fn(data, null, function(path, d){ // include callback
|
||||
// path -> 'file'
|
||||
// d -> {person: 'John'}
|
||||
// Put your code here
|
||||
// Return the contents of file as a string
|
||||
}); // returns rendered string
|
||||
```
|
||||
|
||||
## 选项
|
||||
<!--rehype:body-class=cols-1-->
|
||||
|
||||
### 选项列表
|
||||
|
||||
选项 | 描述
|
||||
:---|---
|
||||
`cache` | 编译后的函数被缓存,需要文件名
|
||||
`filename` | 由缓存用于关键缓存,并用于包含
|
||||
`root` | 使用绝对路径(例如 `/file.ejs`)设置包含项目的根目录。 可以是一个数组来尝试解析来自多个目录的包含。
|
||||
`views` | 解析包含相对路径时要使用的路径数组。
|
||||
`context` | 函数执行上下文
|
||||
`compileDebug` | 当 `false` 时,不编译任何调试工具
|
||||
`client` | 返回独立编译的函数
|
||||
`delimiter` | 用于内部分隔符的字符,默认为 `%`
|
||||
`openDelimiter` | 用于打开分隔符的字符,默认为 `<`
|
||||
`closeDelimiter` | 用于结束分隔符的字符,默认为 `>`
|
||||
`debug` | 输出生成的函数体
|
||||
`strict` | 当设置为 `true` 时,生成的函数处于严格模式
|
||||
`_with` | 是否使用 `with() {}` 构造。 如果为 `false`,则局部变量将存储在局部变量对象中。 (暗示`--strict`)
|
||||
`localsName` | 不使用时用于存储局部变量的对象的名称 默认为局部变量
|
||||
`rmWhitespace` | 删除所有可安全删除的空格,包括前导和尾随空格。 它还为所有 `scriptlet` 标记启用了更安全版本的 `-%>` 行吸收(它不会在行中间去除新的标记行)
|
||||
`escape` | 与 `<%=` 构造一起使用的转义函数。 它用于渲染,并在生成客户端函数时进行 `.toString()` 处理。 (默认情况下转义 XML)
|
||||
`outputFunctionName` | 设置为字符串(例如 `echo` 或 `print`),以便函数在 `scriptlet` 标签内打印输出
|
||||
`async` | 当 `true` 时,EJS 将使用异步函数进行渲染。 (取决于 `JS` 运行时中的 `async`/`await` 支持
|
||||
|
||||
## 标签
|
||||
<!--rehype:body-class=cols-1-->
|
||||
|
||||
### 标签列表
|
||||
|
||||
标签 | 描述
|
||||
:---|---
|
||||
`<%` | 'Scriptlet' 标签,用于控制流,无输出
|
||||
`<%_` | “Whitespace Slurping”Scriptlet 标签,删除其前面的所有空格
|
||||
`<%=` | 将值输出到模板中(HTML 转义)
|
||||
`<%-` | 将未转义的值输出到模板中
|
||||
`<%#` | 注释标签,不执行,不输出
|
||||
`<%%` | 输出文字 `<%`
|
||||
`%>` | 普通结束标签
|
||||
`-%>` | 修剪模式('newline slurp')标签,修剪换行符后的内容
|
||||
`_%>` | “Whitespace Slurping”结束标签,删除其后的所有空格
|
||||
|
||||
## Cli
|
||||
<!--rehype:body-class=cols-1-->
|
||||
|
||||
### Cli 列表
|
||||
|
||||
选项 | 描述
|
||||
:---|---
|
||||
`cache` | 编译后的函数被缓存,需要文件名
|
||||
`-o / --output-file FILE` | 将渲染的输出写入 FILE 而不是 stdout。
|
||||
`-f / --data-file FILE` | 必须是 JSON 格式。 使用来自 FILE 的解析输入作为渲染数据。
|
||||
`-i / --data-input STRING` | 必须采用 JSON 格式和 URI 编码。 使用来自 STRING 的解析输入作为渲染数据。
|
||||
`-m / --delimiter CHARACTER` | 使用带有尖括号的 CHARACTER 来表示打开/关闭(默认为 %)。
|
||||
`-p / --open-delimiter CHARACTER` | 使用 CHARACTER 而不是左尖括号来打开。
|
||||
`-c / --close-delimiter CHARACTER` | 使用 CHARACTER 而不是右尖括号来结束。
|
||||
`-s / --strict` | 当设置为 `true` 时,生成的函数处于严格模式
|
||||
`-n / --no-with` | 对变量使用 `locals` 对象,而不是使用 `with`(隐含--strict)。
|
||||
`-l / --locals-name` | 不使用“with”时用于存储局部变量的对象的名称。
|
||||
`-w / --rm-whitespace` | 删除所有可安全删除的空格,包括前导和尾随空格。
|
||||
`-d / --debug` | 输出生成的函数体
|
||||
`-h / --help` | 显示此帮助消息。
|
||||
`-V/v / --version` | 显示 EJS 版本。
|
||||
|
||||
使用示例:
|
||||
|
||||
```bash
|
||||
$ ejs -p [ -c ] ./template_file.ejs -o ./output.html
|
||||
$ ejs ./test/fixtures/user.ejs name=Lerxst
|
||||
$ ejs -n -l _ ./some_template.ejs -f ./data_file.json
|
||||
```
|
118
docs/emoji.md
@ -3,8 +3,109 @@ Emoji 备忘清单
|
||||
|
||||
有些表情符号代码不太容易记住,所以这里有一个小备忘单。
|
||||
|
||||
入门
|
||||
----------
|
||||
分类
|
||||
----
|
||||
|
||||
### 笑脸
|
||||
<!--rehype:wrap-style=font-size: 27px;-->
|
||||
|
||||
😀 😃 😄 😁 😆 😅 😂 🤣 🥲 🥹 ☺️
|
||||
😊 😇 🙂 🙃 😉 😌 😍 🥰 😘 😗 😙
|
||||
😚 😋 😛 😝 😜 🤪 🤨 🧐 🤓 😎 🥸
|
||||
🤩 🥳 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣
|
||||
😖 😫 😩 🥺 😢 😭 😮💨 😤 😠 😡 🤬
|
||||
🤯 😳 🥵 🥶 😱 😨 😰 😥 😓 🫣 🤗
|
||||
🫡 🤔 🫢 🤭 🤫 🤥 😶 😶🌫️ 😐 😑 😬
|
||||
🫨 🫠 🙄 😯 😦 😧 😮 😲 🥱 😴 🤤
|
||||
😪 😵 😵💫 🫥 🤐 🥴 🤢 🤮 🤧 😷 🤒
|
||||
🤕 🤑 🤠 😈 👿 👹 👺 🤡 💩 👻 💀
|
||||
☠️ 👽 👾 🤖 🎃
|
||||
😺 😸 😹 😻 😼 😽 🙀 😿 😾
|
||||
|
||||
### 人与幻想
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-2-->
|
||||
|
||||
👶 👧 🧒 👦 👩 🧑 👨 👩🦱 🧑🦱 👨🦱 👩🦰 🧑🦰 👨🦰 👱♀️ 👱 👱♂️ 👩🦳 🧑🦳 👨🦳 👩🦲 🧑🦲 👨🦲 🧔♀️ 🧔 🧔♂️ 👵 🧓 👴 👲 👳♀️ 👳 👳♂️ 🧕 👮♀️ 👮 👮♂️ 👷♀️ 👷 👷♂️ 💂♀️ 💂 💂♂️ 🕵️♀️ 🕵️ 🕵️♂️ 👩⚕️ 🧑⚕️ 👨⚕️ 👩🌾 🧑🌾 👨🌾 👩🍳 🧑🍳 👨🍳 👩🎓 🧑🎓 👨🎓 👩🎤 🧑🎤 👨🎤 👩🏫 🧑🏫 👨🏫 👩🏭 🧑🏭 👨🏭 👩💻 🧑💻 👨💻 👩💼 🧑💼 👨💼 👩🔧 🧑🔧 👨🔧 👩🔬 🧑🔬 👨🔬 👩🎨 🧑🎨 👨🎨 👩🚒 🧑🚒 👨🚒 👩✈️ 🧑✈️ 👨✈️ 👩🚀 🧑🚀 👨🚀 👩⚖️ 🧑⚖️ 👨⚖️ 👰♀️ 👰 👰♂️ 🤵♀️ 🤵 🤵♂️ 👸 🫅 🤴 🥷 🦸♀️ 🦸 🦸♂️ 🦹♀️ 🦹 🦹♂️ 🤶 🧑🎄 🎅 🧙♀️ 🧙 🧙♂️ 🧝♀️ 🧝 🧝♂️ 🧛♀️ 🧛 🧛♂️ 🧟♀️ 🧟 🧟♂️ 🧞♀️ 🧞 🧞♂️ 🧜♀️ 🧜 🧜♂️ 🧚♀️ 🧚 🧚♂️ 🧌 👼 🤰 🫄 🫃 🤱 👩🍼 🧑🍼 👨🍼 🙇♀️ 🙇 🙇♂️ 💁♀️ 💁 💁♂️ 🙅♀️ 🙅 🙅♂️ 🙆♀️ 🙆 🙆♂️ 🙋♀️ 🙋 🙋♂️ 🧏♀️ 🧏 🧏♂️ 🤦♀️ 🤦 🤦♂️ 🤷♀️ 🤷 🤷♂️ 🙎♀️ 🙎 🙎♂️ 🙍♀️ 🙍 🙍♂️ 💇♀️ 💇 💇♂️ 💆♀️ 💆 💆♂️ 🧖♀️ 🧖 🧖♂️ 💅 🤳 💃 🕺 👯♀️ 👯 👯♂️ 🕴 👩🦽 🧑🦽 👨🦽 👩🦼 🧑🦼 👨🦼 🚶♀️ 🚶 🚶♂️ 👩🦯 🧑🦯 👨🦯 🧎♀️ 🧎 🧎♂️ 🏃♀️ 🏃 🏃♂️ 🧍♀️ 🧍 🧍♂️ 👭 🧑🤝🧑 👬 👫 👩❤️👩 💑 👨❤️👨 👩❤️👨 👩❤️💋👩 💏 👨❤️💋👨 👩❤️💋👨 👪 👨👩👦 👨👩👧 👨👩👧👦 👨👩👦👦 👨👩👧👧 👨👨👦 👨👨👧 👨👨👧👦 👨👨👦👦 👨👨👧👧 👩👩👦 👩👩👧 👩👩👧👦 👩👩👦👦 👩👩👧👧 👨👦 👨👦👦 👨👧 👨👧👦 👨👧👧 👩👦 👩👦👦 👩👧 👩👧👦 👩👧👧 🗣 👤 👥 🫂
|
||||
|
||||
### 手势和身体部位
|
||||
<!--rehype:wrap-style=font-size: 32px;-->
|
||||
|
||||
👋 🤚 🖐 ✋ 🖖 👌 🤌 🤏 ✌️ 🤞 🫰 🤟 🤘 🤙 🫵 🫱 🫲 🫸 🫷 🫳 🫴 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🫶 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦵 🦿 🦶 👣 👂 🦻 👃 🫀 🫁 🧠 🦷 🦴 👀 👁 👅 👄 🫦 💋 🩸
|
||||
|
||||
### 苍白的表情符号
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
👋🏻 🤚🏻 🖐🏻 ✋🏻 🖖🏻 👌🏻 🤌🏻 🤏🏻 ✌🏻 🤞🏻 🫰🏻 🤟🏻 🤘🏻 🤙🏻 🫵🏻 🫱🏻 🫲🏻 🫸🏻 🫷🏻 🫳🏻 🫴🏻 👈🏻 👉🏻 👆🏻 🖕🏻 👇🏻 ☝🏻 👍🏻 👎🏻 ✊🏻 👊🏻 🤛🏻 🤜🏻 👏🏻 🫶🏻 🙌🏻 👐🏻 🤲🏻 🙏🏻 ✍🏻 💅🏻 🤳🏻 💪🏻 🦵🏻 🦶🏻 👂🏻 🦻🏻 👃🏻
|
||||
👶🏻 👧🏻 🧒🏻 👦🏻 👩🏻 🧑🏻 👨🏻 👩🏻🦱 🧑🏻🦱 👨🏻🦱 👩🏻🦰 🧑🏻🦰 👨🏻🦰 👱🏻♀️ 👱🏻 👱🏻♂️ 👩🏻🦳 🧑🏻🦳 👨🏻🦳 👩🏻🦲 🧑🏻🦲 👨🏻🦲 🧔🏻♀️ 🧔🏻 🧔🏻♂️ 👵🏻 🧓🏻 👴🏻 👲🏻 👳🏻♀️ 👳🏻 👳🏻♂️ 🧕🏻 👮🏻♀️ 👮🏻 👮🏻♂️ 👷🏻♀️ 👷🏻 👷🏻♂️ 💂🏻♀️ 💂🏻 💂🏻♂️ 🕵🏻♀️ 🕵🏻 🕵🏻♂️ 👩🏻⚕️ 🧑🏻⚕️ 👨🏻⚕️ 👩🏻🌾 🧑🏻🌾 👨🏻🌾 👩🏻🍳 🧑🏻🍳 👨🏻🍳 👩🏻🎓 🧑🏻🎓 👨🏻🎓 👩🏻🎤 🧑🏻🎤 👨🏻🎤 👩🏻🏫 🧑🏻🏫 👨🏻🏫 👩🏻🏭 🧑🏻🏭 👨🏻🏭 👩🏻💻 🧑🏻💻 👨🏻💻 👩🏻💼 🧑🏻💼 👨🏻💼 👩🏻🔧 🧑🏻🔧 👨🏻🔧 👩🏻🔬 🧑🏻🔬 👨🏻🔬 👩🏻🎨 🧑🏻🎨 👨🏻🎨 👩🏻🚒 🧑🏻🚒 👨🏻🚒 👩🏻✈️ 🧑🏻✈️ 👨🏻✈️ 👩🏻🚀 🧑🏻🚀 👨🏻🚀 👩🏻⚖️ 🧑🏻⚖️ 👨🏻⚖️ 👰🏻♀️ 👰🏻 👰🏻♂️ 🤵🏻♀️ 🤵🏻 🤵🏻♂️ 👸🏻 🫅🏻 🤴🏻 🥷🏻 🦸🏻♀️ 🦸🏻 🦸🏻♂️ 🦹🏻♀️ 🦹🏻 🦹🏻♂️ 🤶🏻 🧑🏻🎄 🎅🏻 🧙🏻♀️ 🧙🏻 🧙🏻♂️ 🧝🏻♀️ 🧝🏻 🧝🏻♂️ 🧛🏻♀️ 🧛🏻 🧛🏻♂️ 🧜🏻♀️ 🧜🏻 🧜🏻♂️ 🧚🏻♀️ 🧚🏻 🧚🏻♂️ 👼🏻 🤰🏻 🫄🏻 🫃🏻 🤱🏻 👩🏻🍼 🧑🏻🍼 👨🏻🍼 🙇🏻♀️ 🙇🏻 🙇🏻♂️ 💁🏻♀️ 💁🏻 💁🏻♂️ 🙅🏻♀️ 🙅🏻 🙅🏻♂️ 🙆🏻♀️ 🙆🏻 🙆🏻♂️ 🙋🏻♀️ 🙋🏻 🙋🏻♂️ 🧏🏻♀️ 🧏🏻 🧏🏻♂️ 🤦🏻♀️ 🤦🏻 🤦🏻♂️ 🤷🏻♀️ 🤷🏻 🤷🏻♂️ 🙎🏻♀️ 🙎🏻 🙎🏻♂️ 🙍🏻♀️ 🙍🏻 🙍🏻♂️ 💇🏻♀️ 💇🏻 💇🏻♂️ 💆🏻♀️ 💆🏻 💆🏻♂️ 🧖🏻♀️ 🧖🏻 🧖🏻♂️ 💃🏻 🕺🏻 🕴🏻 👩🏻🦽 🧑🏻🦽 👨🏻🦽 👩🏻🦼 🧑🏻🦼 👨🏻🦼 🚶🏻♀️ 🚶🏻 🚶🏻♂️ 👩🏻🦯 🧑🏻🦯 👨🏻🦯 🧎🏻♀️ 🧎🏻 🧎🏻♂️ 🏃🏻♀️ 🏃🏻 🏃🏻♂️ 🧍🏻♀️ 🧍🏻 🧍🏻♂️ 👭🏻 🧑🏻🤝🧑🏻 👬🏻 👫🏻 🧗🏻♀️ 🧗🏻 🧗🏻♂️ 🏇🏻 🏂🏻 🏌🏻♀️ 🏌🏻 🏌🏻♂️ 🏄🏻♀️ 🏄🏻 🏄🏻♂️ 🚣🏻♀️ 🚣🏻 🚣🏻♂️ 🏊🏻♀️ 🏊🏻 🏊🏻♂️ ⛹🏻♀️ ⛹🏻 ⛹🏻♂️ 🏋🏻♀️ 🏋🏻 🏋🏻♂️ 🚴🏻♀️ 🚴🏻 🚴🏻♂️ 🚵🏻♀️ 🚵🏻 🚵🏻♂️ 🤸🏻♀️ 🤸🏻 🤸🏻♂️ 🤽🏻♀️ 🤽🏻 🤽🏻♂️ 🤾🏻♀️ 🤾🏻 🤾🏻♂️ 🤹🏻♀️ 🤹🏻 🤹🏻♂️ 🧘🏻♀️ 🧘🏻 🧘🏻♂️ 🛀🏻 🛌🏻
|
||||
|
||||
### 服装和配饰
|
||||
<!--rehype:wrap-style=font-size: 26px;-->
|
||||
|
||||
🧳 🌂 ☂️ 🧵 🪡 🪢 🪭 🧶 👓 🕶 🥽
|
||||
🥼 🦺 👔 👕 👖 🧣 🧤 🧥 🧦 👗 👘 🥻 🩴 🩱 🩲 🩳 👙 👚 👛 👜 👝 🎒 👞 👟 🥾 🥿 👠 👡 🩰 👢 👑 👒 🎩 🎓 🧢 ⛑ 🪖 💄 💍 💼
|
||||
|
||||
### 奶油白色表情符号
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
👋🏼 🤚🏼 🖐🏼 ✋🏼 🖖🏼 👌🏼 🤌🏼 🤏🏼 ✌🏼 🤞🏼 🫰🏼 🤟🏼 🤘🏼 🤙🏼 🫵🏼 🫱🏼 🫲🏼 🫸🏼 🫷🏼 🫳🏼 🫴🏼 👈🏼 👉🏼 👆🏼 🖕🏼 👇🏼 ☝🏼 👍🏼 👎🏼 ✊🏼 👊🏼 🤛🏼 🤜🏼 👏🏼 🫶🏼 🙌🏼 👐🏼 🤲🏼 🙏🏼 ✍🏼 💅🏼 🤳🏼 💪🏼 🦵🏼 🦶🏼 👂🏼 🦻🏼 👃🏼 👶🏼 👧🏼 🧒🏼 👦🏼 👩🏼 🧑🏼 👨🏼 👩🏼🦱 🧑🏼🦱 👨🏼🦱 👩🏼🦰 🧑🏼🦰 👨🏼🦰 👱🏼♀️ 👱🏼 👱🏼♂️ 👩🏼🦳 🧑🏼🦳 👨🏼🦳 👩🏼🦲 🧑🏼🦲 👨🏼🦲 🧔🏼♀️ 🧔🏼 🧔🏼♂️ 👵🏼 🧓🏼 👴🏼 👲🏼 👳🏼♀️ 👳🏼 👳🏼♂️ 🧕🏼 👮🏼♀️ 👮🏼 👮🏼♂️ 👷🏼♀️ 👷🏼 👷🏼♂️ 💂🏼♀️ 💂🏼 💂🏼♂️ 🕵🏼♀️ 🕵🏼 🕵🏼♂️ 👩🏼⚕️ 🧑🏼⚕️ 👨🏼⚕️ 👩🏼🌾 🧑🏼🌾 👨🏼🌾 👩🏼🍳 🧑🏼🍳 👨🏼🍳 👩🏼🎓 🧑🏼🎓 👨🏼🎓 👩🏼🎤 🧑🏼🎤 👨🏼🎤 👩🏼🏫 🧑🏼🏫 👨🏼🏫 👩🏼🏭 🧑🏼🏭 👨🏼🏭 👩🏼💻 🧑🏼💻 👨🏼💻 👩🏼💼 🧑🏼💼 👨🏼💼 👩🏼🔧 🧑🏼🔧 👨🏼🔧 👩🏼🔬 🧑🏼🔬 👨🏼🔬 👩🏼🎨 🧑🏼🎨 👨🏼🎨 👩🏼🚒 🧑🏼🚒 👨🏼🚒 👩🏼✈️ 🧑🏼✈️ 👨🏼✈️ 👩🏼🚀 🧑🏼🚀 👨🏼🚀 👩🏼⚖️ 🧑🏼⚖️ 👨🏼⚖️ 👰🏼♀️ 👰🏼 👰🏼♂️ 🤵🏼♀️ 🤵🏼 🤵🏼♂️ 👸🏼 🫅🏼 🤴🏼 🥷🏼 🦸🏼♀️ 🦸🏼 🦸🏼♂️ 🦹🏼♀️ 🦹🏼 🦹🏼♂️ 🤶🏼 🧑🏼🎄 🎅🏼 🧙🏼♀️ 🧙🏼 🧙🏼♂️ 🧝🏼♀️ 🧝🏼 🧝🏼♂️ 🧛🏼♀️ 🧛🏼 🧛🏼♂️ 🧜🏼♀️ 🧜🏼 🧜🏼♂️ 🧚🏼♀️ 🧚🏼 🧚🏼♂️ 👼🏼 🤰🏼 🫄🏼 🫃🏼 🤱🏼 👩🏼🍼 🧑🏼🍼 👨🏼🍼 🙇🏼♀️ 🙇🏼 🙇🏼♂️ 💁🏼♀️ 💁🏼 💁🏼♂️ 🙅🏼♀️ 🙅🏼 🙅🏼♂️ 🙆🏼♀️ 🙆🏼 🙆🏼♂️ 🙋🏼♀️ 🙋🏼 🙋🏼♂️ 🧏🏼♀️ 🧏🏼 🧏🏼♂️ 🤦🏼♀️ 🤦🏼 🤦🏼♂️ 🤷🏼♀️ 🤷🏼 🤷🏼♂️ 🙎🏼♀️ 🙎🏼 🙎🏼♂️ 🙍🏼♀️ 🙍🏼 🙍🏼♂️ 💇🏼♀️ 💇🏼 💇🏼♂️ 💆🏼♀️ 💆🏼 💆🏼♂️ 🧖🏼♀️ 🧖🏼 🧖🏼♂️ 💃🏼 🕺🏼 🕴🏼 👩🏼🦽 🧑🏼🦽 👨🏼🦽 👩🏼🦼 🧑🏼🦼 👨🏼🦼 🚶🏼♀️ 🚶🏼 🚶🏼♂️ 👩🏼🦯 🧑🏼🦯 👨🏼🦯 🧎🏼♀️ 🧎🏼 🧎🏼♂️ 🏃🏼♀️ 🏃🏼 🏃🏼♂️ 🧍🏼♀️ 🧍🏼 🧍🏼♂️ 👭🏼 🧑🏼🤝🧑🏼 👬🏼 👫🏼 🧗🏼♀️ 🧗🏼 🧗🏼♂️ 🏇🏼 🏂🏼 🏌🏼♀️ 🏌🏼 🏌🏼♂️ 🏄🏼♀️ 🏄🏼 🏄🏼♂️ 🚣🏼♀️ 🚣🏼 🚣🏼♂️ 🏊🏼♀️ 🏊🏼 🏊🏼♂️ ⛹🏼♀️ ⛹🏼 ⛹🏼♂️ 🏋🏼♀️ 🏋🏼 🏋🏼♂️ 🚴🏼♀️ 🚴🏼 🚴🏼♂️ 🚵🏼♀️ 🚵🏼 🚵🏼♂️ 🤸🏼♀️ 🤸🏼 🤸🏼♂️ 🤽🏼♀️ 🤽🏼 🤽🏼♂️ 🤾🏼♀️ 🤾🏼 🤾🏼♂️ 🤹🏼♀️ 🤹🏼 🤹🏼♂️ 🧘🏼♀️ 🧘🏼 🧘🏼♂️ 🛀🏼 🛌🏼
|
||||
|
||||
### 棕色表情符号
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
👋🏽 🤚🏽 🖐🏽 ✋🏽 🖖🏽 👌🏽 🤌🏽 🤏🏽 ✌🏽 🤞🏽 🫰🏽 🤟🏽 🤘🏽 🤙🏽 🫵🏽 🫱🏽 🫲🏽 🫸🏽 🫷🏽 🫳🏽 🫴🏽 👈🏽 👉🏽 👆🏽 🖕🏽 👇🏽 ☝🏽 👍🏽 👎🏽 ✊🏽 👊🏽 🤛🏽 🤜🏽 👏🏽 🫶🏽 🙌🏽 👐🏽 🤲🏽 🙏🏽 ✍🏽 💅🏽 🤳🏽 💪🏽 🦵🏽 🦶🏽 👂🏽 🦻🏽 👃🏽 👶🏽 👧🏽 🧒🏽 👦🏽 👩🏽 🧑🏽 👨🏽 👩🏽🦱 🧑🏽🦱 👨🏽🦱 👩🏽🦰 🧑🏽🦰 👨🏽🦰 👱🏽♀️ 👱🏽 👱🏽♂️ 👩🏽🦳 🧑🏽🦳 👨🏽🦳 👩🏽🦲 🧑🏽🦲 👨🏽🦲 🧔🏽♀️ 🧔🏽 🧔🏽♂️ 👵🏽 🧓🏽 👴🏽 👲🏽 👳🏽♀️ 👳🏽 👳🏽♂️ 🧕🏽 👮🏽♀️ 👮🏽 👮🏽♂️ 👷🏽♀️ 👷🏽 👷🏽♂️ 💂🏽♀️ 💂🏽 💂🏽♂️ 🕵🏽♀️ 🕵🏽 🕵🏽♂️ 👩🏽⚕️ 🧑🏽⚕️ 👨🏽⚕️ 👩🏽🌾 🧑🏽🌾 👨🏽🌾 👩🏽🍳 🧑🏽🍳 👨🏽🍳 👩🏽🎓 🧑🏽🎓 👨🏽🎓 👩🏽🎤 🧑🏽🎤 👨🏽🎤 👩🏽🏫 🧑🏽🏫 👨🏽🏫 👩🏽🏭 🧑🏽🏭 👨🏽🏭 👩🏽💻 🧑🏽💻 👨🏽💻 👩🏽💼 🧑🏽💼 👨🏽💼 👩🏽🔧 🧑🏽🔧 👨🏽🔧 👩🏽🔬 🧑🏽🔬 👨🏽🔬 👩🏽🎨 🧑🏽🎨 👨🏽🎨 👩🏽🚒 🧑🏽🚒 👨🏽🚒 👩🏽✈️ 🧑🏽✈️ 👨🏽✈️ 👩🏽🚀 🧑🏽🚀 👨🏽🚀 👩🏽⚖️ 🧑🏽⚖️ 👨🏽⚖️ 👰🏽♀️ 👰🏽 👰🏽♂️ 🤵🏽♀️ 🤵🏽 🤵🏽♂️ 👸🏽 🫅🏽 🤴🏽 🥷🏽 🦸🏽♀️ 🦸🏽 🦸🏽♂️ 🦹🏽♀️ 🦹🏽 🦹🏽♂️ 🤶🏽 🧑🏽🎄 🎅🏽 🧙🏽♀️ 🧙🏽 🧙🏽♂️ 🧝🏽♀️ 🧝🏽 🧝🏽♂️ 🧛🏽♀️ 🧛🏽 🧛🏽♂️ 🧜🏽♀️ 🧜🏽 🧜🏽♂️ 🧚🏽♀️ 🧚🏽 🧚🏽♂️ 👼🏽 🤰🏽 🫄🏽 🫃🏽 🤱🏽 👩🏽🍼 🧑🏽🍼 👨🏽🍼 🙇🏽♀️ 🙇🏽 🙇🏽♂️ 💁🏽♀️ 💁🏽 💁🏽♂️ 🙅🏽♀️ 🙅🏽 🙅🏽♂️ 🙆🏽♀️ 🙆🏽 🙆🏽♂️ 🙋🏽♀️ 🙋🏽 🙋🏽♂️ 🧏🏽♀️ 🧏🏽 🧏🏽♂️ 🤦🏽♀️ 🤦🏽 🤦🏽♂️ 🤷🏽♀️ 🤷🏽 🤷🏽♂️ 🙎🏽♀️ 🙎🏽 🙎🏽♂️ 🙍🏽♀️ 🙍🏽 🙍🏽♂️ 💇🏽♀️ 💇🏽 💇🏽♂️ 💆🏽♀️ 💆🏽 💆🏽♂️ 🧖🏽♀️ 🧖🏽 🧖🏽♂️ 💃🏽 🕺🏽 🕴🏽 👩🏽🦽 🧑🏽🦽 👨🏽🦽 👩🏽🦼 🧑🏽🦼 👨🏽🦼 🚶🏽♀️ 🚶🏽 🚶🏽♂️ 👩🏽🦯 🧑🏽🦯 👨🏽🦯 🧎🏽♀️ 🧎🏽 🧎🏽♂️ 🏃🏽♀️ 🏃🏽 🏃🏽♂️ 🧍🏽♀️ 🧍🏽 🧍🏽♂️ 👭🏽 🧑🏽🤝🧑🏽 👬🏽 👫🏽 🧗🏽♀️ 🧗🏽 🧗🏽♂️ 🏇🏽 🏂🏽 🏌🏽♀️ 🏌🏽 🏌🏽♂️ 🏄🏽♀️ 🏄🏽 🏄🏽♂️ 🚣🏽♀️ 🚣🏽 🚣🏽♂️ 🏊🏽♀️ 🏊🏽 🏊🏽♂️ ⛹🏽♀️ ⛹🏽 ⛹🏽♂️ 🏋🏽♀️ 🏋🏽 🏋🏽♂️ 🚴🏽♀️ 🚴🏽 🚴🏽♂️ 🚵🏽♀️ 🚵🏽 🚵🏽♂️ 🤸🏽♀️ 🤸🏽 🤸🏽♂️ 🤽🏽♀️ 🤽🏽 🤽🏽♂️ 🤾🏽♀️ 🤾🏽 🤾🏽♂️ 🤹🏽♀️ 🤹🏽 🤹🏽♂️ 🧘🏽♀️ 🧘🏽 🧘🏽♂️ 🛀🏽 🛌🏽
|
||||
|
||||
### 深棕色表情符号
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
👋🏾 🤚🏾 🖐🏾 ✋🏾 🖖🏾 👌🏾 🤌🏾 🤏🏾 ✌🏾 🤞🏾 🫰🏾 🤟🏾 🤘🏾 🤙🏾 🫵🏾 🫱🏾 🫲🏾 🫸🏾 🫷🏾 🫳🏾 🫴🏾 👈🏾 👉🏾 👆🏾 🖕🏾 👇🏾 ☝🏾 👍🏾 👎🏾 ✊🏾 👊🏾 🤛🏾 🤜🏾 👏🏾 🫶🏾 🙌🏾 👐🏾 🤲🏾 🙏🏾 ✍🏾 💅🏾 🤳🏾 💪🏾 🦵🏾 🦶🏾 👂🏾 🦻🏾 👃🏾 👶🏾 👧🏾 🧒🏾 👦🏾 👩🏾 🧑🏾 👨🏾 👩🏾🦱 🧑🏾🦱 👨🏾🦱 👩🏾🦰 🧑🏾🦰 👨🏾🦰 👱🏾♀️ 👱🏾 👱🏾♂️ 👩🏾🦳 🧑🏾🦳 👨🏾🦳 👩🏾🦲 🧑🏾🦲 👨🏾🦲 🧔🏾♀️ 🧔🏾 🧔🏾♂️ 👵🏾 🧓🏾 👴🏾 👲🏾 👳🏾♀️ 👳🏾 👳🏾♂️ 🧕🏾 👮🏾♀️ 👮🏾 👮🏾♂️ 👷🏾♀️ 👷🏾 👷🏾♂️ 💂🏾♀️ 💂🏾 💂🏾♂️ 🕵🏾♀️ 🕵🏾 🕵🏾♂️ 👩🏾⚕️ 🧑🏾⚕️ 👨🏾⚕️ 👩🏾🌾 🧑🏾🌾 👨🏾🌾 👩🏾🍳 🧑🏾🍳 👨🏾🍳 👩🏾🎓 🧑🏾🎓 👨🏾🎓 👩🏾🎤 🧑🏾🎤 👨🏾🎤 👩🏾🏫 🧑🏾🏫 👨🏾🏫 👩🏾🏭 🧑🏾🏭 👨🏾🏭 👩🏾💻 🧑🏾💻 👨🏾💻 👩🏾💼 🧑🏾💼 👨🏾💼 👩🏾🔧 🧑🏾🔧 👨🏾🔧 👩🏾🔬 🧑🏾🔬 👨🏾🔬 👩🏾🎨 🧑🏾🎨 👨🏾🎨 👩🏾🚒 🧑🏾🚒 👨🏾🚒 👩🏾✈️ 🧑🏾✈️ 👨🏾✈️ 👩🏾🚀 🧑🏾🚀 👨🏾🚀 👩🏾⚖️ 🧑🏾⚖️ 👨🏾⚖️ 👰🏾♀️ 👰🏾 👰🏾♂️ 🤵🏾♀️ 🤵🏾 🤵🏾♂️ 👸🏾 🫅🏾 🤴🏾 🥷🏾 🦸🏾♀️ 🦸🏾 🦸🏾♂️ 🦹🏾♀️ 🦹🏾 🦹🏾♂️ 🤶🏾 🧑🏾🎄 🎅🏾 🧙🏾♀️ 🧙🏾 🧙🏾♂️ 🧝🏾♀️ 🧝🏾 🧝🏾♂️ 🧛🏾♀️ 🧛🏾 🧛🏾♂️ 🧜🏾♀️ 🧜🏾 🧜🏾♂️ 🧚🏾♀️ 🧚🏾 🧚🏾♂️ 👼🏾 🤰🏾 🫄🏾 🫃🏾 🤱🏾 👩🏾🍼 🧑🏾🍼 👨🏾🍼 🙇🏾♀️ 🙇🏾 🙇🏾♂️ 💁🏾♀️ 💁🏾 💁🏾♂️ 🙅🏾♀️ 🙅🏾 🙅🏾♂️ 🙆🏾♀️ 🙆🏾 🙆🏾♂️ 🙋🏾♀️ 🙋🏾 🙋🏾♂️ 🧏🏾♀️ 🧏🏾 🧏🏾♂️ 🤦🏾♀️ 🤦🏾 🤦🏾♂️ 🤷🏾♀️ 🤷🏾 🤷🏾♂️ 🙎🏾♀️ 🙎🏾 🙎🏾♂️ 🙍🏾♀️ 🙍🏾 🙍🏾♂️ 💇🏾♀️ 💇🏾 💇🏾♂️ 💆🏾♀️ 💆🏾 💆🏾♂️ 🧖🏾♀️ 🧖🏾 🧖🏾♂️ 💃🏾 🕺🏾 🕴🏿 👩🏾🦽 🧑🏾🦽 👨🏾🦽 👩🏾🦼 🧑🏾🦼 👨🏾🦼 🚶🏾♀️ 🚶🏾 🚶🏾♂️ 👩🏾🦯 🧑🏾🦯 👨🏾🦯 🧎🏾♀️ 🧎🏾 🧎🏾♂️ 🏃🏾♀️ 🏃🏾 🏃🏾♂️ 🧍🏾♀️ 🧍🏾 🧍🏾♂️ 👭🏾 🧑🏾🤝🧑🏾 👬🏾 👫🏾 🧗🏾♀️ 🧗🏾 🧗🏾♂️ 🏇🏾 🏂🏾 🏌🏾♀️ 🏌🏾 🏌🏾♂️ 🏄🏾♀️ 🏄🏾 🏄🏾♂️ 🚣🏾♀️ 🚣🏾 🚣🏾♂️ 🏊🏾♀️ 🏊🏾 🏊🏾♂️ ⛹🏾♀️ ⛹🏾 ⛹🏾♂️ 🏋🏾♀️ 🏋🏾 🏋🏾♂️ 🚴🏾♀️ 🚴🏾 🚴🏾♂️ 🚵🏾♀️ 🚵🏾 🚵🏾♂️ 🤸🏾♀️ 🤸🏾 🤸🏾♂️ 🤽🏾♀️ 🤽🏾 🤽🏾♂️ 🤾🏾♀️ 🤾🏾 🤾🏾♂️ 🤹🏾♀️ 🤹🏾 🤹🏾♂️ 🧘🏾♀️ 🧘🏾 🧘🏾♂️ 🛀🏾 🛌🏾
|
||||
|
||||
### 黑色表情符号
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
👋🏿 🤚🏿 🖐🏿 ✋🏿 🖖🏿 👌🏿 🤌🏿 🤏🏿 ✌🏿 🤞🏿 🫰🏿 🤟🏿 🤘🏿 🤙🏿 🫵🏿 🫱🏿 🫲🏿 🫸🏿 🫷🏿 🫳🏿 🫴🏿 👈🏿 👉🏿 👆🏿 🖕🏿 👇🏿 ☝🏿 👍🏿 👎🏿 ✊🏿 👊🏿 🤛🏿 🤜🏿 👏🏿 🫶🏿 🙌🏿 👐🏿 🤲🏿 🙏🏿 ✍🏿 💅🏿 🤳🏿 💪🏿 🦵🏿 🦶🏿 👂🏿 🦻🏿 👃🏿 👶🏿 👧🏿 🧒🏿 👦🏿 👩🏿 🧑🏿 👨🏿 👩🏿🦱 🧑🏿🦱 👨🏿🦱 👩🏿🦰 🧑🏿🦰 👨🏿🦰 👱🏿♀️ 👱🏿 👱🏿♂️ 👩🏿🦳 🧑🏿🦳 👨🏿🦳 👩🏿🦲 🧑🏿🦲 👨🏿🦲 🧔🏿♀️ 🧔🏿 🧔🏿♂️ 👵🏿 🧓🏿 👴🏿 👲🏿 👳🏿♀️ 👳🏿 👳🏿♂️ 🧕🏿 👮🏿♀️ 👮🏿 👮🏿♂️ 👷🏿♀️ 👷🏿 👷🏿♂️ 💂🏿♀️ 💂🏿 💂🏿♂️ 🕵🏿♀️ 🕵🏿 🕵🏿♂️ 👩🏿⚕️ 🧑🏿⚕️ 👨🏿⚕️ 👩🏿🌾 🧑🏿🌾 👨🏿🌾 👩🏿🍳 🧑🏿🍳 👨🏿🍳 👩🏿🎓 🧑🏿🎓 👨🏿🎓 👩🏿🎤 🧑🏿🎤 👨🏿🎤 👩🏿🏫 🧑🏿🏫 👨🏿🏫 👩🏿🏭 🧑🏿🏭 👨🏿🏭 👩🏿💻 🧑🏿💻 👨🏿💻 👩🏿💼 🧑🏿💼 👨🏿💼 👩🏿🔧 🧑🏿🔧 👨🏿🔧 👩🏿🔬 🧑🏿🔬 👨🏿🔬 👩🏿🎨 🧑🏿🎨 👨🏿🎨 👩🏿🚒 🧑🏿🚒 👨🏿🚒 👩🏿✈️ 🧑🏿✈️ 👨🏿✈️ 👩🏿🚀 🧑🏿🚀 👨🏿🚀 👩🏿⚖️ 🧑🏿⚖️ 👨🏿⚖️ 👰🏿♀️ 👰🏿 👰🏿♂️ 🤵🏿♀️ 🤵🏿 🤵🏿♂️ 👸🏿 🫅🏿 🤴🏿 🥷🏿 🦸🏿♀️ 🦸🏿 🦸🏿♂️ 🦹🏿♀️ 🦹🏿 🦹🏿♂️ 🤶🏿 🧑🏿🎄 🎅🏿 🧙🏿♀️ 🧙🏿 🧙🏿♂️ 🧝🏿♀️ 🧝🏿 🧝🏿♂️ 🧛🏿♀️ 🧛🏿 🧛🏿♂️ 🧜🏿♀️ 🧜🏿 🧜🏿♂️ 🧚🏿♀️ 🧚🏿 🧚🏿♂️ 👼🏿 🤰🏿 🫄🏿 🫃🏿 🤱🏿 👩🏿🍼 🧑🏿🍼 👨🏿🍼 🙇🏿♀️ 🙇🏿 🙇🏿♂️ 💁🏿♀️ 💁🏿 💁🏿♂️ 🙅🏿♀️ 🙅🏿 🙅🏿♂️ 🙆🏿♀️ 🙆🏿 🙆🏿♂️ 🙋🏿♀️ 🙋🏿 🙋🏿♂️ 🧏🏿♀️ 🧏🏿 🧏🏿♂️ 🤦🏿♀️ 🤦🏿 🤦🏿♂️ 🤷🏿♀️ 🤷🏿 🤷🏿♂️ 🙎🏿♀️ 🙎🏿 🙎🏿♂️ 🙍🏿♀️ 🙍🏿 🙍🏿♂️ 💇🏿♀️ 💇🏿 💇🏿♂️ 💆🏿♀️ 💆🏿 💆🏿♂️ 🧖🏿♀️ 🧖🏿 🧖🏿♂️ 💃🏿 🕺🏿 🕴🏿 👩🏿🦽 🧑🏿🦽 👨🏿🦽 👩🏿🦼 🧑🏿🦼 👨🏿🦼 🚶🏿♀️ 🚶🏿 🚶🏿♂️ 👩🏿🦯 🧑🏿🦯 👨🏿🦯 🧎🏿♀️ 🧎🏿 🧎🏿♂️ 🏃🏿♀️ 🏃🏿 🏃🏿♂️ 🧍🏿♀️ 🧍🏿 🧍🏿♂️ 👭🏿 🧑🏿🤝🧑🏿 👬🏿 👫🏿 🧗🏿♀️ 🧗🏿 🧗🏿♂️ 🏇🏿 🏂🏿 🏌🏿♀️ 🏌🏿 🏌🏿♂️ 🏄🏿♀️ 🏄🏿 🏄🏿♂️ 🚣🏿♀️ 🚣🏿 🚣🏿♂️ 🏊🏿♀️ 🏊🏿 🏊🏿♂️ ⛹🏿♀️ ⛹🏿 ⛹🏿♂️ 🏋🏿♀️ 🏋🏿 🏋🏿♂️ 🚴🏿♀️ 🚴🏿 🚴🏿♂️ 🚵🏿♀️ 🚵🏿 🚵🏿♂️ 🤸🏿♀️ 🤸🏿 🤸🏿♂️ 🤽🏿♀️ 🤽🏿 🤽🏿♂️ 🤾🏿♀️ 🤾🏿 🤾🏿♂️ 🤹🏿♀️ 🤹🏿 🤹🏿♂️ 🧘🏿♀️ 🧘🏿 🧘🏿♂️ 🛀🏿 🛌🏿
|
||||
|
||||
### 动物与自然
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
🐶 🐱 🐭 🐹 🐰 🦊 🐻 🐼 🐻❄️ 🐨 🐯 🦁 🐮 🐷 🐽 🐸 🐵 🙈 🙉 🙊 🐒 🐔 🐧 🐦 🐦⬛ 🐤 🐣 🐥 🦆 🦅 🦉 🦇 🐺 🐗 🐴 🦄 🐝 🪱 🐛 🦋 🐌 🐞 🐜 🪰 🪲 🪳 🦟 🦗 🕷 🕸 🦂 🐢 🐍 🦎 🦖 🦕 🐙 🦑 🦐 🦞 🦀 🪼 🪸 🐡 🐠 🐟 🐬 🐳 🐋 🦈 🐊 🐅 🐆 🦓 🫏 🦍 🦧 🦣 🐘 🦛 🦏 🐪 🐫 🦒 🦘 🦬 🐃 🐂 🐄 🐎 🐖 🐏 🐑 🦙 🐐 🦌 🫎 🐕 🐩 🦮 🐕🦺 🐈 🐈⬛ 🪽 🪶 🐓 🦃 🦤 🦚 🦜 🦢 🪿 🦩 🕊 🐇 🦝 🦨 🦡 🦫 🦦 🦥 🐁 🐀 🐿 🦔 🐾 🐉 🐲 🌵 🎄 🌲 🌳 🌴 🪹 🪺 🪵 🌱 🌿 ☘️ 🍀 🎍 🪴 🎋 🍃 🍂 🍁 🍄 🐚 🪨 🌾 💐 🌷 🪷 🌹 🥀 🌺 🌸 🪻 🌼 🌻 🌞 🌝 🌛 🌜 🌚 🌕 🌖 🌗 🌘 🌑 🌒 🌓 🌔 🌙 🌎 🌍 🌏 🪐 💫 ⭐️ 🌟 ✨ ⚡️ ☄️ 💥 🔥 🌪 🌈 ☀️ 🌤 ⛅️ 🌥 ☁️ 🌦 🌧 ⛈ 🌩 🌨 ❄️ ☃️ ⛄️ 🌬 💨 💧 💦 🫧 ☔️ ☂️ 🌊 🌫
|
||||
|
||||
### 食物和饮料
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🫐 🍈 🍒 🍑 🥭 🍍 🥥 🥝 🍅 🍆 🥑 🥦 🫛 🥬 🥒 🌶 🫑 🌽 🥕 🫒 🧄 🧅 🫚 🥔 🍠 🫘 🥐 🥯 🍞 🥖 🥨 🧀 🥚 🍳 🧈 🥞 🧇 🥓 🥩 🍗 🍖 🦴 🌭 🍔 🍟 🍕 🫓 🥪 🥙 🧆 🌮 🌯 🫔 🥗 🥘 🫕 🥫 🍝 🍜 🍲 🍛 🍣 🍱 🥟 🦪 🍤 🍙 🍚 🍘 🍥 🥠 🥮 🍢 🍡 🍧 🍨 🍦 🥧 🧁 🍰 🎂 🍮 🍭 🍬 🍫 🍿 🍩 🍪 🌰 🥜 🍯 🥛 🍼 🫖 ☕️ 🍵 🧃 🥤 🧋 🫙 🍶 🍺 🍻 🥂 🍷 🫗 🥃 🍸 🍹 🧉 🍾 🧊 🥄 🍴 🍽 🥣 🥡 🥢 🧂
|
||||
|
||||
### 活动和运动
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
⚽️ 🏀 🏈 ⚾️ 🥎 🎾 🏐 🏉 🥏 🎱 🪀 🏓 🏸 🏒 🏑 🥍 🏏 🪃 🥅 ⛳️ 🪁 🏹 🎣 🤿 🥊 🥋 🎽 🛹 🛼 🛷 ⛸ 🥌 🎿 ⛷ 🏂 🪂 🏋️♀️ 🏋️ 🏋️♂️ 🤼♀️ 🤼 🤼♂️ 🤸♀️ 🤸 🤸♂️ ⛹️♀️ ⛹️ ⛹️♂️ 🤺 🤾♀️ 🤾 🤾♂️ 🏌️♀️ 🏌️ 🏌️♂️ 🏇 🧘♀️ 🧘 🧘♂️ 🏄♀️ 🏄 🏄♂️ 🏊♀️ 🏊 🏊♂️ 🤽♀️ 🤽 🤽♂️ 🚣♀️ 🚣 🚣♂️ 🧗♀️ 🧗 🧗♂️ 🚵♀️ 🚵 🚵♂️ 🚴♀️ 🚴 🚴♂️ 🏆 🥇 🥈 🥉 🏅 🎖 🏵 🎗 🎫 🎟 🎪 🤹 🤹♂️ 🤹♀️ 🎭 🩰 🎨 🎬 🎤 🎧 🎼 🎹 🥁 🪘 🪇 🎷 🎺 🪗 🎸 🪕 🎻 🪈 🎲 ♟ 🎯 🎳 🎮 🎰 🧩
|
||||
|
||||
### 旅游与地点
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
🚗 🚕 🚙 🚌 🚎 🏎 🚓 🚑 🚒 🚐 🛻 🚚 🚛 🚜 🦯 🦽 🦼 🛴 🚲 🛵 🏍 🛺 🚨 🚔 🚍 🚘 🚖 🛞 🚡 🚠 🚟 🚃 🚋 🚞 🚝 🚄 🚅 🚈 🚂 🚆 🚇 🚊 🚉 ✈️ 🛫 🛬 🛩 💺 🛰 🚀 🛸 🚁 🛶 ⛵️ 🚤 🛥 🛳 ⛴ 🚢 ⚓️ 🛟 🪝 ⛽️ 🚧 🚦 🚥 🚏 🗺 🗿 🗽 🗼 🏰 🏯 🏟 🎡 🎢 🛝 🎠 ⛲️ ⛱ 🏖 🏝 🏜 🌋 ⛰ 🏔 🗻 🏕 ⛺️ 🛖 🏠 🏡 🏘 🏚 🏗 🏭 🏢 🏬 🏣 🏤 🏥 🏦 🏨 🏪 🏫 🏩 💒 🏛 ⛪️ 🕌 🕍 🛕 🕋 ⛩ 🛤 🛣 🗾 🎑 🏞 🌅 🌄 🌠 🎇 🎆 🌇 🌆 🏙 🌃 🌌 🌉 🌁
|
||||
|
||||
### 对象
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
⌚️ 📱 📲 💻 ⌨️ 🖥 🖨 🖱 🖲 🕹 🗜 💽 💾 💿 📀 📼 📷 📸 📹 🎥 📽 🎞 📞 ☎️ 📟 📠 📺 📻 🎙 🎚 🎛 🧭 ⏱ ⏲ ⏰ 🕰 ⌛️ ⏳ 📡 🔋 🪫 🔌 💡 🔦 🕯 🪔 🧯 🛢 🛍️ 💸 💵 💴 💶 💷 🪙 💰 💳 💎 ⚖️ 🪮 🪜 🧰 🪛 🔧 🔨 ⚒ 🛠 ⛏ 🪚 🔩 ⚙️ 🪤 🧱 ⛓ 🧲 🔫 💣 🧨 🪓 🔪 🗡 ⚔️ 🛡 🚬 ⚰️ 🪦 ⚱️ 🏺 🔮 📿 🧿 🪬 💈 ⚗️ 🔭 🔬 🕳 🩹 🩺 🩻 🩼 💊 💉 🩸 🧬 🦠 🧫 🧪 🌡 🧹 🪠 🧺 🧻 🚽 🚰 🚿 🛁 🛀 🧼 🪥 🪒 🧽 🪣 🧴 🛎 🔑 🗝 🚪 🪑 🛋 🛏 🛌 🧸 🪆 🖼 🪞 🪟 🛍 🛒 🎁 🎈 🎏 🎀 🪄 🪅 🎊 🎉 🪩 🎎 🏮 🎐 🧧 ✉️ 📩 📨 📧 💌 📥 📤 📦 🏷 🪧 📪 📫 📬 📭 📮 📯 📜 📃 📄 📑 🧾 📊 📈 📉 🗒 🗓 📆 📅 🗑 🪪 📇 🗃 🗳 🗄 📋 📁 📂 🗂 🗞 📰 📓 📔 📒 📕 📗 📘 📙 📚 📖 🔖 🧷 🔗 📎 🖇 📐 📏 🧮 📌 📍 ✂️ 🖊 🖋 ✒️ 🖌 🖍 📝 ✏️ 🔍 🔎 🔏 🔐 🔒 🔓
|
||||
|
||||
### 符号
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
|
||||
|
||||
❤️ 🩷 🧡 💛 💚 💙 🩵 💜 🖤 🩶 🤍 🤎 ❤️🔥 ❤️🩹 💔 ❣️ 💕 💞 💓 💗 💖 💘 💝 💟 ☮️ ✝️ ☪️ 🪯 🕉 ☸️ ✡️ 🔯 🕎 ☯️ ☦️ 🛐 ⛎ ♈️ ♉️ ♊️ ♋️ ♌️ ♍️ ♎️ ♏️ ♐️ ♑️ ♒️ ♓️ 🆔 ⚛️ 🉑 ☢️ ☣️ 📴 📳 🈶 🈚️ 🈸 🈺 🈷️ ✴️ 🆚 💮 🉐 ㊙️ ㊗️ 🈴 🈵 🈹 🈲 🅰️ 🅱️ 🆎 🆑 🅾️ 🆘 ❌ ⭕️ 🛑 ⛔️ 📛 🚫 💯 💢 ♨️ 🚷 🚯 🚳 🚱 🔞 📵 🚭 ❗️ ❕ ❓ ❔ ‼️ ⁉️ 🔅 🔆 〽️ ⚠️ 🚸 🔱 ⚜️ 🔰 ♻️ ✅ 🈯️ 💹 ❇️ ✳️ ❎ 🌐 💠 Ⓜ️ 🌀 💤 🏧 🚾 ♿️ 🅿️ 🛗 🈳 🈂️ 🛂 🛃 🛄 🛅 🚹 🚺 🚼 ⚧ 🚻 🚮 🎦 🛜 📶 🈁 🔣 ℹ️ 🔤 🔡 🔠 🆖 🆗 🆙 🆒 🆕 🆓 0️⃣ 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣ 9️⃣ 🔟 🔢 #️⃣ *️⃣ ⏏️ ▶️ ⏸ ⏯ ⏹ ⏺ ⏭ ⏮ ⏩ ⏪ ⏫ ⏬ ◀️ 🔼 🔽 ➡️ ⬅️ ⬆️ ⬇️ ↗️ ↘️ ↙️ ↖️ ↕️ ↔️ ↪️ ↩️ ⤴️ ⤵️ 🔀 🔁 🔂 🔄 🔃 🎵 🎶 ➕ ➖ ➗ ✖️ 🟰 ♾ 💲 💱 ™️ ©️ ®️ 〰️ ➰ ➿ 🔚 🔙 🔛 🔝 🔜 ✔️ ☑️ 🔘 🔴 🟠 🟡 🟢 🔵 🟣 ⚫️ ⚪️ 🟤 🔺 🔻 🔸 🔹 🔶 🔷 🔳 🔲 ▪️ ▫️ ◾️ ◽️ ◼️ ◻️ 🟥 🟧 🟨 🟩 🟦 🟪 ⬛️ ⬜️ 🟫 🔈 🔇 🔉 🔊 🔔 🔕 📣 📢 👁🗨 💬 💭 🗯 ♠️ ♣️ ♥️ ♦️ 🃏 🎴 🀄️ 🕐 🕑 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 🕛 🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦 🕧
|
||||
|
||||
### 非表情符号
|
||||
<!--rehype:wrap-style=font-size: 28px;-->
|
||||
|
||||
✢ ✣ ✤ ✥ ✦ ✧ ★ ☆ ✯ ✡︎ ✩ ✪ ✫ ✬ ✭ ✮ ✶ ✷ ✵ ✸ ✹ → ⇒ ⟹ ⇨ ⇾ ➾ ⇢ ☛ ☞ ➔ ➜ ➙ ➛ ➝ ➞ ♠︎ ♣︎ ♥︎ ♦︎ ♤ ♧ ♡ ♢ ♚ ♛ ♜ ♝ ♞ ♟ ♔ ♕ ♖ ♗ ♘ ♙ ⚀ ⚁ ⚂ ⚃ ⚄ ⚅ 🂠 ⚈ ⚉ ⚆ ⚇ 𓀀 𓀁 𓀂 𓀃 𓀄 𓀅 𓀆 𓀇 𓀈 𓀉 𓀊 𓀋 𓀌 𓀍 𓀎 𓀏 𓀐 𓀑 𓀒 𓀓 𓀔 𓀕 𓀖 𓀗 𓀘 𓀙 𓀚 𓀛 𓀜 𓀝
|
||||
|
||||
### 旗帜
|
||||
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-2-->
|
||||
|
||||
🏳️ 🏴 🏁 🚩 🏳️🌈 🏳️⚧️ 🏴☠️ 🇦🇫 🇦🇽 🇦🇱 🇩🇿 🇦🇸 🇦🇩 🇦🇴 🇦🇮 🇦🇶 🇦🇬 🇦🇷 🇦🇲 🇦🇼 🇦🇺 🇦🇹 🇦🇿 🇧🇸 🇧🇭 🇧🇩 🇧🇧 🇧🇾 🇧🇪 🇧🇿 🇧🇯 🇧🇲 🇧🇹 🇧🇴 🇧🇦 🇧🇼 🇧🇷 🇮🇴 🇻🇬 🇧🇳 🇧🇬 🇧🇫 🇧🇮 🇰🇭 🇨🇲 🇨🇦 🇮🇨 🇨🇻 🇧🇶 🇰🇾 🇨🇫 🇹🇩 🇨🇱 🇨🇳 🇨🇽 🇨🇨 🇨🇴 🇰🇲 🇨🇬 🇨🇩 🇨🇰 🇨🇷 🇨🇮 🇭🇷 🇨🇺 🇨🇼 🇨🇾 🇨🇿 🇩🇰 🇩🇯 🇩🇲 🇩🇴 🇪🇨 🇪🇬 🇸🇻 🇬🇶 🇪🇷 🇪🇪 🇪🇹 🇪🇺 🇫🇰 🇫🇴 🇫🇯 🇫🇮 🇫🇷 🇬🇫 🇵🇫 🇹🇫 🇬🇦 🇬🇲 🇬🇪 🇩🇪 🇬🇭 🇬🇮 🇬🇷 🇬🇱 🇬🇩 🇬🇵 🇬🇺 🇬🇹 🇬🇬 🇬🇳 🇬🇼 🇬🇾 🇭🇹 🇭🇳 🇭🇰 🇭🇺 🇮🇸 🇮🇳 🇮🇩 🇮🇷 🇮🇶 🇮🇪 🇮🇲 🇮🇱 🇮🇹 🇯🇲 🇯🇵 🎌 🇯🇪 🇯🇴 🇰🇿 🇰🇪 🇰🇮 🇽🇰 🇰🇼 🇰🇬 🇱🇦 🇱🇻 🇱🇧 🇱🇸 🇱🇷 🇱🇾 🇱🇮 🇱🇹 🇱🇺 🇲🇴 🇲🇰 🇲🇬 🇲🇼 🇲🇾 🇲🇻 🇲🇱 🇲🇹 🇲🇭 🇲🇶 🇲🇷 🇲🇺 🇾🇹 🇲🇽 🇫🇲 🇲🇩 🇲🇨 🇲🇳 🇲🇪 🇲🇸 🇲🇦 🇲🇿 🇲🇲 🇳🇦 🇳🇷 🇳🇵 🇳🇱 🇳🇨 🇳🇿 🇳🇮 🇳🇪 🇳🇬 🇳🇺 🇳🇫 🇰🇵 🇲🇵 🇳🇴 🇴🇲 🇵🇰 🇵🇼 🇵🇸 🇵🇦 🇵🇬 🇵🇾 🇵🇪 🇵🇭 🇵🇳 🇵🇱 🇵🇹 🇵🇷 🇶🇦 🇷🇪 🇷🇴 🇷🇺 🇷🇼 🇼🇸 🇸🇲 🇸🇦 🇸🇳 🇷🇸 🇸🇨 🇸🇱 🇸🇬 🇸🇽 🇸🇰 🇸🇮 🇬🇸 🇸🇧 🇸🇴 🇿🇦 🇰🇷 🇸🇸 🇪🇸 🇱🇰 🇧🇱 🇸🇭 🇰🇳 🇱🇨 🇵🇲 🇻🇨 🇸🇩 🇸🇷 🇸🇿 🇸🇪 🇨🇭 🇸🇾 🇹🇼 🇹🇯 🇹🇿 🇹🇭 🇹🇱 🇹🇬 🇹🇰 🇹🇴 🇹🇹 🇹🇳 🇹🇷 🇹🇲 🇹🇨 🇹🇻 🇻🇮 🇺🇬 🇺🇦 🇦🇪 🇬🇧 🏴 🏴 🏴 🇺🇳 🇺🇸 🇺🇾 🇺🇿 🇻🇺 🇻🇦 🇻🇪 🇻🇳 🇼🇫 🇪🇭 🇾🇪 🇿🇲 🇿🇼
|
||||
|
||||
Github emoji 图标标记
|
||||
----
|
||||
|
||||
### People
|
||||
|
||||
@ -879,3 +980,16 @@ Emoji 备忘清单
|
||||
| :milky_way: | `:milky_way:` |
|
||||
| :partly_sunny: | `:partly_sunny:` |
|
||||
| :carrot: | `:carrot:` |
|
||||
|
||||
另见
|
||||
--------
|
||||
|
||||
- [Emoji searcher](https://emoji.muan.co/) _(muan.co)_
|
||||
- [Get Emoji — All Emojis to ✂️ Copy and 📋 Paste](https://getemoji.com/) _(getemoji.com)_
|
||||
- [Emoji Guide – 🔥 The Ultimate Emoji Guide: 🌈 Meanings, 🍎 Platforms, 🆘 Codes and 😍 More](https://emojiguide.com/) _(emojiguide.com)_
|
||||
- [Full Emoji List, v15.0](https://unicode.org/emoji/charts/full-emoji-list.html) _(unicode.org)_
|
||||
- [Emoji Cheat Sheet](https://www.webfx.com/tools/emoji-cheat-sheet/) _(webfx.com)_
|
||||
- [EmojiCopy | Simple emoji copy and paste keyboard by JoyPixels®](https://www.emojicopy.com/) _(emojicopy.com)_
|
||||
- [Emojis 🌱☀️ - Copy & Paste Online 🕵️♀️ | Quicktools by Picsart](https://tools.picsart.com/text/emojis/) _(tools.picsart.com)_
|
||||
- [Emojihub 😀 - All Emojis To Copy And Paste](https://emojihub.org/) _(emojihub.org)_
|
||||
- [All Emojis – Emoji List for Copy and Paste](https://www.freecodecamp.org/news/all-emojis-emoji-list-for-copy-and-paste/) _(freecodecamp.org)_
|
||||
|
490
docs/fastapi.md
Normal file
@ -0,0 +1,490 @@
|
||||
FastAPI 备忘清单
|
||||
===
|
||||
|
||||
FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+ 并基于标准的 Python 类型提示。Python: `3.9.5` FastAPI: `0.103.1`
|
||||
|
||||
入门
|
||||
---
|
||||
<!--rehype:body-class=cols-1-->
|
||||
|
||||
### 最小程序
|
||||
|
||||
下面代码会直接启动http服务,也可以使用 `uvicorn main:app --reload`
|
||||
|
||||
```python
|
||||
from fastapi import FastAPI
|
||||
import uvicorn
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
# http://127.0.0.1:8000/
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"message": "Hello World"}
|
||||
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app='main:app', reload=True)
|
||||
```
|
||||
|
||||
### 路径参数
|
||||
|
||||
#### 最基本的路径参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/items/1
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_item(item_id):
|
||||
return {"item_id": item_id} # item_id自定义
|
||||
```
|
||||
|
||||
#### 多个路径参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/items/1/2
|
||||
@app.get("/items/{item_id}/{user_id}")
|
||||
async def read_item(item_id, user_id):
|
||||
return {"item_id": item_id, "user_id": user_id}
|
||||
```
|
||||
|
||||
#### 有类型的路径参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/items/1
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_item(item_id: int):
|
||||
return {"item_id": item_id}
|
||||
```
|
||||
|
||||
#### 文件路径参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/file//home/my/my.txt
|
||||
@app.get("/file/{file_path:path}")
|
||||
async def read_item(file_path):
|
||||
return {"file_path": file_path}
|
||||
```
|
||||
|
||||
### 查询参数
|
||||
|
||||
#### 带默认值的查询参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/items/?skip=0&limit=2
|
||||
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
|
||||
@app.get("/items/")
|
||||
async def read_item(skip: int = 0, limit: int = 10):
|
||||
return fake_items_db[skip: skip + limit]
|
||||
```
|
||||
|
||||
#### 可选查询参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/items/1?q=admin
|
||||
from typing import Union
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_item(item_id: str, q: Union[str, None] = None):
|
||||
if q:
|
||||
return {"item_id": item_id, "q": q}
|
||||
return {"item_id": item_id}
|
||||
```
|
||||
|
||||
#### 多路径多查询参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/users/1/items/2
|
||||
# or
|
||||
# http://127.0.0.1:8000/users/1/items/2?q=query&short=true
|
||||
@app.get("/users/{user_id}/items/{item_id}")
|
||||
async def read_user_item(
|
||||
user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False
|
||||
):
|
||||
item = {"item_id": item_id, "owner_id": user_id}
|
||||
if q:
|
||||
item.update({"q": q})
|
||||
if not short:
|
||||
item.update(
|
||||
{"description": "This is an amazing item that has a long description"}
|
||||
)
|
||||
return item
|
||||
```
|
||||
|
||||
#### 必需查询参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/items/123?needy=yes
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_user_item(item_id: str, needy: str):
|
||||
item = {"item_id": item_id, "needy": needy}
|
||||
return item
|
||||
```
|
||||
|
||||
### 请求体
|
||||
|
||||
```python
|
||||
from pydantic import BaseModel
|
||||
from typing import Union
|
||||
class Item(BaseModel):
|
||||
name: str = '小明'
|
||||
description: Union[str, None] = None
|
||||
price: float
|
||||
tax: Union[float, None] = None
|
||||
@app.post("/items/")
|
||||
async def create_item(item: Item):
|
||||
print(item.name)
|
||||
return item
|
||||
```
|
||||
|
||||
#### 调用
|
||||
|
||||
```bash
|
||||
curl -X 'POST' \
|
||||
'http://127.0.0.1:8000/items/' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"name": "小明",
|
||||
"description": "string",
|
||||
"price": 0,
|
||||
"tax": 0
|
||||
}'
|
||||
```
|
||||
|
||||
### 查询参数和字符串校验
|
||||
|
||||
```python
|
||||
from fastapi import Query
|
||||
@app.get("/items/")
|
||||
async def read_items(q: Union[str, None] = Query(default=None, max_length=50)):
|
||||
results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
|
||||
if q:
|
||||
results.update({"q": q})
|
||||
return results
|
||||
```
|
||||
|
||||
#### 参数列表
|
||||
|
||||
| 参数 | 含义 | 类型 |
|
||||
| ---------- | ------------ | ------------- |
|
||||
| default | 默认值 | 任意类型或... |
|
||||
| max_length | 最大长度 | int |
|
||||
| min_length | 最小长度 | int |
|
||||
| pattern | 正则匹配 | string |
|
||||
| alias | 别名参数 | string |
|
||||
| deprecated | 准备弃用参数 | bool |
|
||||
|
||||
#### 多个相同的查询参数
|
||||
|
||||
```python
|
||||
# http://127.0.0.1:8000/items/?q=foo&q=bar
|
||||
@app.get("/items/")
|
||||
async def read_items(q: Union[List[str], None] = Query(default=None)):
|
||||
query_items = {"q": q}
|
||||
return query_items
|
||||
```
|
||||
|
||||
### 路径参数和数值校验
|
||||
|
||||
Path用法基本和Query相同,参考:[FastAPI官方文档](https://fastapi.tiangolo.com/zh/tutorial/path-params-numeric-validations/)
|
||||
|
||||
#### 导入 Path
|
||||
|
||||
```python
|
||||
from fastapi import FastAPI, Path, Query
|
||||
from typing_extensions import Annotated
|
||||
```
|
||||
|
||||
#### 声明元数据
|
||||
|
||||
```python
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_items(
|
||||
item_id: Annotated[int, Path(title="The ID of the item to get")],
|
||||
q: Annotated[Union[str, None], Query(alias="item-query")] = None,
|
||||
):
|
||||
results = {"item_id": item_id}
|
||||
if q:
|
||||
results.update({"q": q})
|
||||
return results
|
||||
```
|
||||
|
||||
#### 参数列表
|
||||
|
||||
| 参数 | 含义 | 类型 |
|
||||
| ----- | ------------------- | --------- |
|
||||
| ... | 和Query具有相同参数 | ... |
|
||||
| ge | 大于等于 | int float |
|
||||
| gt | 大于 | int float |
|
||||
| le | 小于等于 | int float |
|
||||
| le | 小于等于 | int float |
|
||||
| title | api文档的标题 | string |
|
||||
|
||||
### 其他参数
|
||||
|
||||
都具有Query的参数,max_length、min_length等
|
||||
|
||||
#### Cookie参数
|
||||
|
||||
```python
|
||||
from fastapi import Cookie
|
||||
@app.get("/items/")
|
||||
async def read_items(ads_id: Annotated[Union[str, None], Cookie()] = None):
|
||||
return {"ads_id": ads_id}
|
||||
```
|
||||
|
||||
#### Header 参数
|
||||
|
||||
```python
|
||||
from fastapi import Header
|
||||
@app.get("/items/")
|
||||
async def read_items(user_agent: Annotated[Union[str, None], Header()] = None,items_id: Annotated[Union[int, None], Header(ge=1)] = None):
|
||||
return {"User-Agent": user_agent, "items_id": items_id}
|
||||
```
|
||||
|
||||
### 表单数据
|
||||
|
||||
接收的不是 JSON,而是表单字段时,要使用 Form。
|
||||
|
||||
#### 安装
|
||||
|
||||
`pip install python-multipart`
|
||||
|
||||
#### HTML
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" action="http://127.0.0.1:8000/login">
|
||||
<span>账号:</span><input type="text" name="username">
|
||||
<br>
|
||||
<span>密码:</span><input type="password" name="password">
|
||||
<br>
|
||||
<input type="submit" value="登录">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
#### FastAPI
|
||||
|
||||
```python
|
||||
from fastapi import FastAPI, Form
|
||||
import uvicorn
|
||||
app = FastAPI()
|
||||
@app.post("/login/")
|
||||
async def login(username: str = Form(), password: str = Form()):
|
||||
return {"username": username}
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app='main:app', reload=True)
|
||||
```
|
||||
|
||||
### 文件上传
|
||||
|
||||
```python
|
||||
from fastapi import FastAPI, UploadFile
|
||||
from fastapi.responses import HTMLResponse
|
||||
@app.post("/uploadfile/")
|
||||
async def create_upload_file(file: UploadFile):
|
||||
print(file.file.read().decode())
|
||||
return {"filenames": file.filename, "type": str(type(file.file))}
|
||||
@app.get("/")
|
||||
async def main():
|
||||
content = """<body>
|
||||
<form action="/uploadfile/" enctype="multipart/form-data" method="post">
|
||||
<input name="file" type="file" multiple>
|
||||
<input type="submit">
|
||||
</form>
|
||||
</body>"""
|
||||
return HTMLResponse(content=content)
|
||||
```
|
||||
|
||||
#### UploadFile属性
|
||||
|
||||
| 属性名 | 含义 | 返回 |
|
||||
| ------------ | -------- | --------------------------------------- |
|
||||
| filename | 文件名 | 上传的文件名 |
|
||||
| content_type | 内容类型 | MIME 类型 |
|
||||
| file | 文件 | SpooledTemporaryFile具有read,write方法 |
|
||||
|
||||
#### UploadFile async方法
|
||||
|
||||
| 方法名 | 含义 |
|
||||
| ------------ | ----------------------------------------- |
|
||||
| write(data) | 把 `data` 写入文件 |
|
||||
| read(size) | 按指定数量的字节读取文件内容 |
|
||||
| seek(offset) | 移动至文件 `offset` (`int`)字节处的位置 |
|
||||
| close() | 关闭文件 |
|
||||
|
||||
依赖项
|
||||
---
|
||||
|
||||
<!--rehype:body-class=cols-1-->
|
||||
|
||||
### 依赖项使用场景
|
||||
|
||||
- 共享业务逻辑(复用相同的代码逻辑)
|
||||
- 共享数据库连接
|
||||
- 实现安全、验证、角色权限
|
||||
- 等……
|
||||
|
||||
### 创建依赖项
|
||||
|
||||
```python
|
||||
from typing import Union
|
||||
|
||||
from fastapi import Depends, FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
# read_items和read_users方法依赖common_parameters
|
||||
# 白话就是read_items和read_users都需要q,skip,limit查询参数
|
||||
async def common_parameters(
|
||||
q: Union[str, None] = None, skip: int = 0, limit: int = 100
|
||||
):
|
||||
return {"q": q, "skip": skip, "limit": limit}
|
||||
|
||||
|
||||
@app.get("/items/")
|
||||
async def read_items(commons: dict = Depends(common_parameters)):
|
||||
return commons
|
||||
|
||||
|
||||
@app.get("/users/")
|
||||
async def read_users(commons: dict = Depends(common_parameters)):
|
||||
return commons
|
||||
```
|
||||
|
||||
### 类作为依赖项
|
||||
|
||||
```python
|
||||
from typing import Union
|
||||
|
||||
from fastapi import Depends, FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
|
||||
|
||||
|
||||
class CommonQueryParams:
|
||||
def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
|
||||
self.q = q
|
||||
self.skip = skip
|
||||
self.limit = limit
|
||||
|
||||
# read_itemsx接收一个commons参数,类型是CommonQueryParams
|
||||
# CommonQueryParams接收三个参数,这三个参数是调用api的时候传
|
||||
@app.get("/items/")
|
||||
async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)):
|
||||
response = {}
|
||||
if commons.q:
|
||||
response.update({"q": commons.q})
|
||||
items = fake_items_db[commons.skip : commons.skip + commons.limit]
|
||||
response.update({"items": items})
|
||||
return response
|
||||
```
|
||||
|
||||
#### 还可以简写
|
||||
|
||||
```python
|
||||
@app.get("/items/")
|
||||
async def read_items(commons: CommonQueryParams = Depends()): # 这里的Depends没有传参,FastAPI会自动使用CommonQueryParams
|
||||
response = {}
|
||||
if commons.q:
|
||||
response.update({"q": commons.q})
|
||||
items = fake_items_db[commons.skip : commons.skip + commons.limit]
|
||||
response.update({"items": items})
|
||||
return response
|
||||
```
|
||||
|
||||
### 子依赖项
|
||||
|
||||
```python
|
||||
from typing import Union
|
||||
|
||||
from fastapi import Cookie, Depends, FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
def query_extractor(q: Union[str, None] = None):
|
||||
return q
|
||||
|
||||
|
||||
def query_or_cookie_extractor(
|
||||
q: str = Depends(query_extractor),
|
||||
last_query: Union[str, None] = Cookie(default=None),
|
||||
):
|
||||
if not q:
|
||||
return last_query
|
||||
return q
|
||||
|
||||
# read_query函数依赖query_or_cookie_extractor函数
|
||||
# query_or_cookie_extractor函数又依赖query_extractor函数
|
||||
# 就是说依赖项可以依赖其他依赖项,只要你不晕,可以无数次套娃
|
||||
@app.get("/items/")
|
||||
async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
|
||||
return {"q_or_cookie": query_or_default}
|
||||
```
|
||||
|
||||
#### 不使用缓存
|
||||
|
||||
```python
|
||||
# 使用use_cache = False参数不使用缓存数据
|
||||
# 不使用use_cache = False,value和value1是一样的
|
||||
def result_value():
|
||||
value = randint(1, 99)
|
||||
return value
|
||||
|
||||
def get_value(value: int = Depends(result_value, use_cache=False), value1: int = Depends(result_value, use_cache=False)):
|
||||
return value, value1
|
||||
|
||||
@app.get('/value/')
|
||||
async def needy_dependency(value: tuple = Depends(get_value)):
|
||||
return {"value": value}
|
||||
```
|
||||
|
||||
### 全局依赖项
|
||||
|
||||
```python
|
||||
from fastapi import Depends, FastAPI, Header, HTTPException
|
||||
|
||||
|
||||
async def verify_token(x_token: str = Header()):
|
||||
if x_token != "fake-super-secret-token":
|
||||
raise HTTPException(status_code=400, detail="X-Token header invalid")
|
||||
|
||||
|
||||
async def verify_key(x_key: str = Header()):
|
||||
if x_key != "fake-super-secret-key":
|
||||
raise HTTPException(status_code=400, detail="X-Key header invalid")
|
||||
return x_key
|
||||
|
||||
# 全局依赖项很有用,后面的安全性就可以使用全局依赖项
|
||||
app = FastAPI(dependencies=[Depends(verify_token), Depends(verify_key)])
|
||||
|
||||
|
||||
@app.get("/items/")
|
||||
async def read_items():
|
||||
return [{"item": "Portal Gun"}, {"item": "Plumbus"}]
|
||||
|
||||
|
||||
@app.get("/users/")
|
||||
async def read_users():
|
||||
return [{"username": "Rick"}, {"username": "Morty"}]
|
||||
```
|
||||
|
||||
安全性
|
||||
---
|
||||
|
||||
待更新
|
||||
|
||||
参考
|
||||
---
|
||||
|
||||
- [Python 备忘清单](./python.md) _(jaywcjlove.github.io)_
|
||||
- [FastAPI 官方文档](https://fastapi.tiangolo.com/zh/tutorial/) _(fastapi.tiangolo.com)_
|
@ -45,7 +45,6 @@ FED 前端导航
|
||||
|
||||
[MDN Web Docs](https://developer.mozilla.org/zh-CN/)<!--rehype:target=_blank&style=background: rgb(140 181 255/var(\-\-bg\-opacity));-->
|
||||
[ECMAScript 6 入门](https://es6.ruanyifeng.com/)<!--rehype:target=_blank-->
|
||||
[W3C 标准](http://w3help.org/)<!--rehype:target=_blank-->
|
||||
<!--rehype:class=home-card-->
|
||||
|
||||
JavaScript 工具
|
||||
@ -76,7 +75,7 @@ JavaScript 测试工具
|
||||
CSS 工具
|
||||
---
|
||||
|
||||
[30秒CSS](https://atomiks.github.io/30-seconds-of-css/)<!--rehype:target=_blank-->
|
||||
[30秒CSS](https://www.30secondsofcode.org/css/)<!--rehype:target=_blank-->
|
||||
[Autoprefixer](https://github.com/postcss/autoprefixer)<!--rehype:target=_blank-->
|
||||
[ColorZilla](http://www.colorzilla.com/gradient-editor/)<!--rehype:target=_blank-->
|
||||
[CSS Protips](https://github.com/AllThingsSmitty/css-protips)<!--rehype:target=_blank-->
|
||||
@ -90,7 +89,6 @@ CSS 工具
|
||||
[Emmet](https://www.emmet.io/)<!--rehype:target=_blank-->
|
||||
[est](http://ecomfe.github.io/est/)<!--rehype:target=_blank-->
|
||||
[Flex Layout Attribute](https://github.com/StefanKovac/flex-layout-attribute)<!--rehype:target=_blank-->
|
||||
[Grid.Guide](http://grid.guide/)<!--rehype:target=_blank-->
|
||||
[minireset.css](http://lesscss.org/)<!--rehype:target=_blank-->
|
||||
[Normalize.css](http://necolas.github.io/normalize.css/)<!--rehype:target=_blank-->
|
||||
[PostCSS](http://postcss.org/)<!--rehype:target=_blank-->
|
||||
@ -105,7 +103,7 @@ CSS 工具
|
||||
框架类库
|
||||
---
|
||||
|
||||
[React](https://facebook.github.io/react/)<!--rehype:target=_blank&style=background: rgb(97 218 251/var(\-\-bg\-opacity));-->
|
||||
[React](https://zh-hans.react.dev)<!--rehype:target=_blank&style=background: rgb(97 218 251/var(\-\-bg\-opacity));-->
|
||||
[Vue 中文](https://cn.vuejs.org/)<!--rehype:target=_blank&style=background: rgb(66 184 131/var(\-\-bg\-opacity));-->
|
||||
[Angular](https://angular.io/)<!--rehype:target=_blank&style=background: rgb(195 8 47/var(\-\-bg\-opacity));-->
|
||||
[jQuery](http://www.jquery123.com/)<!--rehype:target=_blank-->
|
||||
|
@ -84,6 +84,7 @@ $ ffmpeg -i movie.webm movie.mp4
|
||||
`-r RATE` | 每秒帧率
|
||||
`-s WIDTHxHEIGHT` | 帧大小
|
||||
`-vn` | 没有视频
|
||||
`-crf` | 指定编码的质量,数值越大压缩越高,一般范围是 18-28
|
||||
|
||||
### 码率设置
|
||||
|
||||
|
@ -206,14 +206,14 @@ def getImg():
|
||||
```py
|
||||
from flask import Blueprint, abort, jsonify
|
||||
|
||||
# 定义Bp2,并定义url前缀为/vedio
|
||||
Bp2 = Blueprint('vedioBlue', __name__, template_folder='templates', url_prefix='/vedio')
|
||||
# 定义Bp2,并定义url前缀为/video
|
||||
Bp2 = Blueprint('videoBlue', __name__, template_folder='templates', url_prefix='/video')
|
||||
|
||||
|
||||
@Bp2.route('/getvedio')
|
||||
def getVedio():
|
||||
@Bp2.route('/getvideo')
|
||||
def getvideo():
|
||||
try:
|
||||
return jsonify(name="vedio", size="100GB")
|
||||
return jsonify(name="video", size="100GB")
|
||||
except Exception as e:
|
||||
abort(e)
|
||||
```
|
||||
@ -223,7 +223,7 @@ def getVedio():
|
||||
```py
|
||||
from flask import Flask, jsonify
|
||||
from lantu.img import Bp1
|
||||
from lantu.vedio import Bp2
|
||||
from lantu.video import Bp2
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@ -250,6 +250,6 @@ curl http://127.0.0.1:5000/
|
||||
curl http://127.0.0.1:5000/img/getimg
|
||||
>> {"name": "img", "size": "100KB"}
|
||||
|
||||
curl http://127.0.0.1:5000/vedio/getvedio
|
||||
>> {"name": "vedio", "size": "100GB"}
|
||||
curl http://127.0.0.1:5000/video/getvideo
|
||||
>> {"name": "video", "size": "100GB"}
|
||||
```
|
||||
|
@ -616,10 +616,10 @@ Flex 的用法与 `Row` 或 `Column` 类似,但只需要额外传入 `directio
|
||||
```dart
|
||||
Flex(
|
||||
direction: Axis.vertiacl,
|
||||
children;[
|
||||
Fluterlogo(),
|
||||
Fluterlogo(),
|
||||
Fluterlogo(),
|
||||
children: [
|
||||
FlutterLogo(),
|
||||
FlutterLogo(),
|
||||
FlutterLogo(),
|
||||
],
|
||||
),
|
||||
```
|
||||
@ -628,11 +628,11 @@ Flex(
|
||||
|
||||
```dart
|
||||
Flex(
|
||||
dirction: Axis.horizontal,
|
||||
direction: Axis.horizontal,
|
||||
children: [
|
||||
Flutterlogo(),
|
||||
Flutterlogo(),
|
||||
Flutterlogo(),
|
||||
FlutterLogo(),
|
||||
FlutterLogo(),
|
||||
FlutterLogo(),
|
||||
],
|
||||
),
|
||||
```
|
||||
|
246
docs/gdb.md
Normal file
@ -0,0 +1,246 @@
|
||||
GDB 备忘清单
|
||||
===
|
||||
|
||||
本清单提供了对 [GDB](https://en.wikipedia.org/wiki/GNU_Debugger) 的入门简要概述,以及 `GDB` 常用示例,完整文档参阅 [Debugging with gdb](https://www.eecs.umich.edu/courses/eecs373/readings/Debugger.pdf),该文档最后有 `GDB index`,可以快速查找命令。
|
||||
|
||||
入门
|
||||
---
|
||||
<!--rehype:body-class=cols-2-->
|
||||
|
||||
### 常用命令
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
`[]` 内为命令缩写
|
||||
|
||||
| 命令 `[缩写]` | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `help[h]` | **查看命令帮助**。如 `help run` |
|
||||
| `run[r]` | **运行程序**。可搭配参数使用 |
|
||||
| `start` | **运行程序,停在第一条执行语句**。可搭配参数使用 |
|
||||
| `list[l]` | **查看程序源码** |
|
||||
| `break[b]` | **设置断点**。可指定文件名、函数名和行号等参数来设置断点 |
|
||||
| `watch` | **设置监视点**。当监视的变量发生更改时,程序会被中断 |
|
||||
| `delete` | **删除断点等**。可用于删除断点、监视点、`display` 等 |
|
||||
| `continue[c]` | **继续执行程序**。让程序继续执行,到下一个断点或程序结束 |
|
||||
| `next[n]` | **单步执行程序,跳过函数调用** |
|
||||
| `step[s]` | **单步执行程序,进入函数调用** |
|
||||
| `finish` | **结束当前函数**。返回到函数调用点 |
|
||||
| `kill` | **杀死当前的调试进程** |
|
||||
| `backtrace[bt]` | **查看函数调用栈**。它会打印出当前的函数调用栈 |
|
||||
| `frame[fr]` | **切换栈帧**。以查看该栈帧中的局部变量和参数等 |
|
||||
| `info` | **查看程序状态信息**。例如断点、寄存器、线程、局部变量等 |
|
||||
| `show` | **查看 `gdb` 配置信息**。与 `info` 不同, `show` 查看 `GDB` 本身的配置信息 |
|
||||
| `set` | **设置变量值**。有时指定变量类型才能设置,如 `set *(int*)(&a) = 3` |
|
||||
| `whatis` | **查看变量、函数类型**。例如,`whatis a` 可以显示变量 `a` 的类型 |
|
||||
| `ptype` | **查看变量、函数类型**。会显示完整的结构体类型 |
|
||||
| `print[p]` | **打印变量的值**。例如,`print x` 可以显示变量 `x` 的当前值 |
|
||||
| `display` | **持续打印变量的值**。与 `print` 类似,但它会在每次停下时自动输出值 |
|
||||
| `thread` | **切换线程**。例如,`thread 2` 切换到编号为 `2` 的线程 |
|
||||
| `signal` | **向进程发送信号**。例如,`signal 9` 发送编号为 `9` 的信号 |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 启动调试
|
||||
|
||||
启动进程,不带参数
|
||||
|
||||
```bash
|
||||
# gdb <program>
|
||||
(gdb) run
|
||||
```
|
||||
|
||||
启动进程,带参数 `<args>`
|
||||
|
||||
```bash
|
||||
# gdb <program>
|
||||
(gdb) run <args>
|
||||
```
|
||||
|
||||
启动 `gdb` 时传入参数,`run` 就不用传入了
|
||||
|
||||
```bash
|
||||
# gdb --args <program> 1 2 3
|
||||
(gdb) run
|
||||
```
|
||||
|
||||
通过 `set` 设置参数
|
||||
|
||||
```bash
|
||||
# gdb <program>
|
||||
(gdb) set args 1 2 3
|
||||
(gdb) run
|
||||
```
|
||||
|
||||
显示运行时将要或已经传递给程序的参数
|
||||
|
||||
```bash
|
||||
(gdb) show args
|
||||
```
|
||||
|
||||
在启动进程前,添加环境变量
|
||||
|
||||
```bash
|
||||
(gdb) set env DEBUG 1
|
||||
```
|
||||
|
||||
在启动进程前,清除环境变量
|
||||
|
||||
```bash
|
||||
(gdb) unset env DEBUG
|
||||
```
|
||||
|
||||
通过进程号 `123` 连接到正在运行的进程
|
||||
|
||||
```bash
|
||||
(gdb) attach 123
|
||||
```
|
||||
|
||||
### core dump 文件
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
默认情况下,`linux` 系统中程序崩溃时也不会生成 `core dump` 文件,需要先启用
|
||||
|
||||
```bash
|
||||
ulimit -c unlimited
|
||||
echo "/tmp/core-%e-%p-%t" > /proc/sys/kernel/core_pattern
|
||||
```
|
||||
|
||||
调试 `core` 文件
|
||||
|
||||
```bash
|
||||
gdb program /tmp/core-file
|
||||
```
|
||||
|
||||
### 查看源码
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) list 30` | 查看第 `30` 行为中心的上下 `5` 行源码 |
|
||||
| `(gdb) list main` | 查看 `main` 函数为中心的上下 `5` 行源码 |
|
||||
| `(gdb) list file.c:30` | 查看 `file.c` 文件中 `30` 行的源码 |
|
||||
| `(gdb) list file.c:main` | 查看 `file.c` 文件中 `main` 函数 |
|
||||
| `(gdb) disassemble` | 查看当前可执行文件的汇编源码 |
|
||||
| `(gdb) disassemble myfun` | 查看指定函数的汇编源码 |
|
||||
|
||||
### 流程控制
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) step[s]` | 执行源码级别的单步进入操作 |
|
||||
| `(gdb) stepi[si]` | 执行指令级别的单步进入操作 |
|
||||
| `(gdb) next[n]` | 执行源码级别的单步跳过操作 |
|
||||
| `(gdb) nexti[ni]` | 执行指令级别的单步跳过操作 |
|
||||
| `(gdb) continue[c]` | 继续执行,到下一个断点或程序结束 |
|
||||
| `(gdb) finish` | 运行完当前函数,并返回到函数调用点 |
|
||||
| `(gdb) return` | 直接退出当前函数,不执行剩下代码块 |
|
||||
| `(gdb) return expression` | 可以指定返回值的内容 |
|
||||
| `(gdb) until` | 结束当前循环 |
|
||||
|
||||
### 断点命令
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) break main` | 在所有名为 `main` 的函数处设置一个断点 |
|
||||
| `(gdb) break test.c:12` | 在文件 `test.c` 的第 `12` 行设置断点 |
|
||||
| `(gdb) break test.c:func` | 在文件 `test.c` 的 `func` 函数处设置断点 |
|
||||
| `(gdb) rbreak regular-expression` | 在正则表达式匹配的函数名上设置断点 |
|
||||
| `(gdb) break foo if a < 100` | 设置**条件断点**,条件满足才停止 |
|
||||
| `(gdb) info break` | 列出所有断点位置、编号 |
|
||||
| `(gdb) delete 2` | 删除指定编号的断点 |
|
||||
| `(gdb) clear` | 删除刚才停止处的断点 |
|
||||
| `(gdb) disable 1` | `disable` 指定编号的断点 |
|
||||
| `(gdb) enable 1` | `enable` 指定编号的断点 |
|
||||
|
||||
### watch 命令
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) watch var` | 监视变量,当值变化时会输出新、旧值 |
|
||||
| `(gdb) info break` | 列出断点,也包括 `watchpoint` |
|
||||
| `(gdb) i watch` | 只列出 `watchpoint` |
|
||||
| `(gdb) delete 1` | 删除指定的 `watchpoint` |
|
||||
|
||||
### 查看变量
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) info args` | 查看传入参数信息 |
|
||||
| `(gdb) info local` | 查看当前栈帧(函数)的本地变量 |
|
||||
| `(gdb) print var` | 查看指定变量的值 |
|
||||
| `(gdb) print/x var` | 以十六进制输出变量的值 |
|
||||
| `(gdb) print ptr` | 假设 `int *ptr=&a`,输出变量 `a` 的地址 |
|
||||
| `(gdb) print *ptr` | 假设 `int *ptr=&a`,输出变量 `a` 的值 |
|
||||
| `(gdb) print *ptr@5` | 假设 `int ptr[5]`,输出数组的值 |
|
||||
| `(gdb) display var` | 与 `print` 作用相同,但每次停下来都自动输出变量的值 |
|
||||
| `(gdb) info display` | 列出所有设置了 `display` 的变量 |
|
||||
| `(gdb) undisplay 1` | 与 `display` 相反,不能指定变量名,只能是编号 |
|
||||
| `(gdb) delete display 1` | 与 `undisplay` 类似,通过编号取消显示 |
|
||||
| `(gdb) whatis var` | 查看变量类型 |
|
||||
| `(gdb) ptype var` | 比 `type` 更详细,会给出结构体的定义 |
|
||||
|
||||
### frame 栈帧
|
||||
|
||||
每当一个函数被调用时,一个新的栈帧 `frame` 就会被压入栈中,栈帧包含了该函数的局部变量、参数、返回地址和其他信息,当函数执行完毕后,这个栈帧会被弹出栈并销毁。
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) frame` | 显示当前栈帧和源代码行 |
|
||||
| `(gdb) backtrace` | 打印出当前正在执行的所有栈帧 |
|
||||
| `(gdb) backtrace 5` | 只显示最近调用的 `5` 个栈帧 |
|
||||
| `(gdb) frame 2` | 切换到第 `2` 个栈帧,以查看信息 |
|
||||
| `(gdb) up` | 切换到上一级调用栈帧 |
|
||||
| `(gdb) down` | 切换到下一级调用栈帧 |
|
||||
|
||||
### 函数调用
|
||||
|
||||
`call` 和 `print` 调用的函数如果存在全局变量、静态变量的修改,在函数返回后会恢复到调用之前的值,这两个调用不会影响程序的状态
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) call func(a, b)` | 调用指定的函数,不影响主线程变量 |
|
||||
| `(gdb) print func(a, b)` | 与 `call` 类似 |
|
||||
| `(gdb) finish` | 结束当前运行的函数 |
|
||||
|
||||
### 信号
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
`linux` 下使用 `kill -l` 查看信号编号与信号名,使用 `info signal` 查看信号的处理方式、描述等:
|
||||
|
||||
```bash
|
||||
(gdb) info signal
|
||||
Signal Stop Print Pass to program Description
|
||||
|
||||
SIGHUP Yes Yes Yes Hangup
|
||||
SIGINT Yes Yes No Interrupt
|
||||
SIGQUIT Yes Yes Yes Quit
|
||||
SIGILL Yes Yes Yes Illegal instruction
|
||||
```
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) signal SIGKILL` | 向进程发送信号,用信号名或编号表示 |
|
||||
| `(gdb) signal 9` | 向进程发送信号,用信号名或编号表示 |
|
||||
| `(gdb) handle <signal> actions` | 指定信号的处理方式,选择如下,可以组合 |
|
||||
| `stop/nostop` | 收到信号是否停止进程,类似断点 |
|
||||
| `print/noprint` | 收到信号是否输出消息 |
|
||||
| `pass/nopass` | 是否将信号传递给程序 |
|
||||
|
||||
### 线程
|
||||
|
||||
| 命令 | 说明 |
|
||||
|:--------------------|:-----------|
|
||||
| `(gdb) info threads` | 列出所有线程,标识当前所在线程 |
|
||||
| `(gdb) thread 2` | 切换到编号为 `2` 的线程 |
|
||||
| `(gdb) break file.c:23 thread all` | 在所有线程中相应的行上设置断点 |
|
||||
| `(gdb) thread apply all command` | 让所有线程执行 `gdb` 命令 |
|
||||
| `(gdb) thread apply ID1 ID2 command` | 让指定线程执行 `gdb` 命令 |
|
||||
| `(gdb) set scheduler-locking off` | 所有线程都执行,这是默认值 |
|
||||
| `(gdb) set scheduler-locking on` | 只让当前线程执行 |
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
- [应用崩溃调试分析](https://carlyleliu.github.io/2022/%E5%BA%94%E7%94%A8%E5%B4%A9%E6%BA%83%E8%B0%83%E8%AF%95%E5%88%86%E6%9E%90)
|
650
docs/git.md
@ -155,7 +155,7 @@ $ git branch -av
|
||||
$ git checkout my_branch
|
||||
```
|
||||
|
||||
创建一个名为 `new_branch` 的新分支
|
||||
创建并切换到新分支`new_branch`
|
||||
|
||||
```shell
|
||||
$ git checkout -b new_branch
|
||||
@ -389,21 +389,8 @@ $ git mv [existing-path] [new-path]
|
||||
$ git log --stat -M
|
||||
```
|
||||
|
||||
### git 配置 ssh 代理
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```bash
|
||||
$ cat ~/.ssh/config
|
||||
Host gitlab.com
|
||||
# 直接使用 sh**socks 提供的 socks5 代理端口
|
||||
ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p
|
||||
|
||||
Host github.com
|
||||
ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### .gitattributes
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```ini
|
||||
# 设置默认行为,以防人们没有设置 core.autocrlf
|
||||
@ -435,6 +422,362 @@ special-vendored-path/* linguist-vendored
|
||||
*.rb linguist-language=Java
|
||||
```
|
||||
|
||||
### git 配置 ssh 代理
|
||||
|
||||
```bash
|
||||
$ cat ~/.ssh/config
|
||||
Host gitlab.com
|
||||
# 直接使用 sh**socks 提供的 socks5 代理端口
|
||||
ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p
|
||||
|
||||
Host github.com
|
||||
ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
Commit
|
||||
---
|
||||
|
||||
### 改写历史
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
重写最后的提交消息
|
||||
|
||||
```shell
|
||||
$ git commit --amend -m "new message"
|
||||
```
|
||||
|
||||
修改最新的提交而不更改提交消息
|
||||
|
||||
```shell
|
||||
$ git commit --amend --no-edit
|
||||
```
|
||||
|
||||
### 在 commit log 中显示 GPG 签名
|
||||
|
||||
```bash
|
||||
$ git log --show-signature
|
||||
```
|
||||
|
||||
### 修改远程 Commit 记录
|
||||
<!--rehype:wrap-class=row-span-5-->
|
||||
|
||||
```shell
|
||||
$ git rebase -i HEAD~3
|
||||
# 表示要修改当前版本的倒数第三次状态
|
||||
# 将要更改的记录行首单词 pick 改为 edit
|
||||
pick 96dc3f9 提交 commit 描述内容 1
|
||||
pick f1cce8a 提交 commit 描述内容 2
|
||||
pick 6293516 提交 commit 描述内容 3
|
||||
# Rebase eeb03a4..6293516 onto eeb03a4
|
||||
# (3 commands)
|
||||
#
|
||||
# Commands:
|
||||
# p, pick = 使用提交
|
||||
# r, reword = 使用提交,但编辑提交消息
|
||||
# e, edit = 使用提交,但停止修改
|
||||
# s, squash = 使用提交,但融合到先前的提交中
|
||||
# f, fixup = 像 squash,但丢弃此提交的日志消息
|
||||
# x, exec = 使用 shell 运行命令(该行的其余部分)
|
||||
# d, drop = 删除提交
|
||||
```
|
||||
|
||||
保存并退出,会弹出下面提示
|
||||
|
||||
```shell
|
||||
# 您现在可以修改提交,使用
|
||||
#
|
||||
# git commit --amend
|
||||
#
|
||||
# 对更改感到满意后,运行
|
||||
#
|
||||
# git rebase --continue
|
||||
#
|
||||
# 1. 通过这条命令进入编辑更改 commit,保存退出
|
||||
$ git commit --amend
|
||||
# 2. 保存退出确认修改,继续执行下面命令,
|
||||
$ git rebase --continue
|
||||
# 如果修改多条记录反复执行上面两条命令直到完成所有修改
|
||||
|
||||
# 最后,确保没有人提交进行推送,最好不要加 -f 强制推送
|
||||
$ git push -f origin master
|
||||
```
|
||||
|
||||
### Commit
|
||||
|
||||
```shell
|
||||
$ git commit -v --amend
|
||||
```
|
||||
|
||||
重写最后的提交信息
|
||||
|
||||
### 撤销远程记录
|
||||
|
||||
```shell
|
||||
# 撤销一条记录
|
||||
$ git reset --hard HEAD~1
|
||||
# 强制同步到远程仓库
|
||||
$ git push -f origin HEAD:master
|
||||
```
|
||||
|
||||
### 放弃本地修改内容
|
||||
|
||||
```shell
|
||||
# 如果有的修改以及加入暂存区的话
|
||||
$ git reset --hard
|
||||
# 还原所有修改,不会删除新增的文件
|
||||
$ git checkout .
|
||||
# 下面命令会删除新增的文件
|
||||
$ git clean -xdf
|
||||
```
|
||||
|
||||
### 把 A 分支的某一个 commit,放到 B 分支上
|
||||
|
||||
```shell
|
||||
# 切换到 B 分支
|
||||
$ git checkout <B>
|
||||
# 将 A 分支 <hash-id> 的内容 pick 到 B 分支
|
||||
$ git cherry-pick <hash-id>
|
||||
```
|
||||
|
||||
### 重设第一个 commit
|
||||
|
||||
```bash
|
||||
$ git update-ref -d HEAD
|
||||
```
|
||||
|
||||
把所有的改动都重新放回工作区,并**清空所有的 commit**,这样就可以重新提交第一个 `commit` 了
|
||||
|
||||
### 回到远程仓库的状态
|
||||
|
||||
```bash
|
||||
$ git fetch --all && git reset --hard origin/master
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
抛弃本地所有的修改,回到远程仓库的状态
|
||||
|
||||
### commit 历史中显示 Branch1 有的但是 Branch2 没有 commit
|
||||
|
||||
```bash
|
||||
$ git log Branch1 ^Branch2
|
||||
```
|
||||
|
||||
Git Submodule 子模块
|
||||
------
|
||||
|
||||
### 添加子模块
|
||||
|
||||
```bash
|
||||
$ git submodule add <仓库地址> <子模块路径>
|
||||
```
|
||||
|
||||
### 克隆包含子模块的仓库
|
||||
|
||||
```bash
|
||||
$ git clone <repository_url> --recursive
|
||||
```
|
||||
|
||||
### 更新子模块
|
||||
|
||||
```bash
|
||||
$ git submodule update --remote
|
||||
```
|
||||
|
||||
### 切换到子模块的特定提交
|
||||
|
||||
```bash
|
||||
$ cd <path_to_submodule>
|
||||
$ git checkout <commit_hash>
|
||||
```
|
||||
|
||||
### 查看当前仓库中的子模块
|
||||
|
||||
```bash
|
||||
$ git submodule status
|
||||
```
|
||||
|
||||
### 初始化子模块
|
||||
|
||||
```bash
|
||||
$ git submodule init
|
||||
```
|
||||
|
||||
### 切换到父仓库的特定提交,并更新子模块
|
||||
|
||||
```bash
|
||||
$ cd ..
|
||||
$ git checkout <commit_hash>
|
||||
$ git submodule update --remote
|
||||
```
|
||||
|
||||
### 获取并切换子模块的最新标签
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```bash
|
||||
$ cd <path_to_submodule>
|
||||
$ git fetch --tags
|
||||
$ git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
```
|
||||
|
||||
### 子模块递归
|
||||
<!--rehype:wrap-class=col-span-2 row-span-3-->
|
||||
|
||||
```bash
|
||||
# 添加所有已存在的子模块
|
||||
$ git submodule foreach --recursive git submodule add <repository_url>
|
||||
# 更新所有子模块到最新提交
|
||||
$ git submodule foreach --recursive git pull origin master
|
||||
# 检出特定的子模块路径
|
||||
$ git submodule foreach --recursive git checkout <branch_name>
|
||||
# 获取仓库中的所有子模块变化
|
||||
$ git submodule foreach --recursive git fetch
|
||||
# 获取并合并子模块的远程分支
|
||||
$ git submodule foreach --recursive git pull origin <branch_name>
|
||||
# 将子模块还原到父仓库中的初始提交
|
||||
$ git submodule foreach --recursive git checkout .
|
||||
# 获取子模块的更新并忽略本地修改
|
||||
$ git submodule foreach --recursive git fetch --all
|
||||
$ git submodule foreach --recursive git reset --hard origin/master
|
||||
```
|
||||
|
||||
### 获取子模块的最新提交
|
||||
|
||||
```bash
|
||||
$ cd <path_to_submodule>
|
||||
$ git pull
|
||||
```
|
||||
|
||||
### 删除子模块
|
||||
|
||||
```bash
|
||||
$ git submodule deinit <path_to_submodule>
|
||||
$ git rm <path_to_submodule>
|
||||
```
|
||||
|
||||
### 切换子模块的分支
|
||||
|
||||
```bash
|
||||
$ cd <path_to_submodule>
|
||||
$ git checkout <branch_name>
|
||||
```
|
||||
|
||||
### 初始化并更新所有子模块
|
||||
|
||||
```bash
|
||||
$ git submodule init
|
||||
$ git submodule update
|
||||
```
|
||||
|
||||
### 切换子模块的特定标签
|
||||
|
||||
```bash
|
||||
$ cd <path_to_submodule>
|
||||
$ git checkout tags/<tag_name>
|
||||
```
|
||||
|
||||
Config 设置
|
||||
---
|
||||
|
||||
### 查看配置的信息
|
||||
|
||||
```bash
|
||||
$ git help config
|
||||
```
|
||||
|
||||
获取帮助信息,查看修改个人信息的参数
|
||||
|
||||
### 忽略文件的权限变化
|
||||
|
||||
```shell
|
||||
git config core.fileMode false
|
||||
```
|
||||
|
||||
不再将文件的权限变化视作改动
|
||||
|
||||
### 配置自动换行
|
||||
|
||||
```bash
|
||||
$ git config --global core.autocrlf input
|
||||
```
|
||||
|
||||
自动转换坑太大,提交到git是自动将换行符转换为 `lf`
|
||||
|
||||
### 获取帮助信息
|
||||
|
||||
```bash
|
||||
$ git config --list
|
||||
```
|
||||
|
||||
### 中文乱码的解决方案
|
||||
|
||||
```shell
|
||||
$ git config --global core.quotepath false
|
||||
```
|
||||
|
||||
### 删除全局设置
|
||||
|
||||
```bash
|
||||
$ git config --global --unset <entry-name>
|
||||
```
|
||||
|
||||
### 配置 http 和 socks 代理
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```bash
|
||||
# 查看代理
|
||||
$ git config --global http.proxy
|
||||
$ git config --global https.proxy
|
||||
$ git config --global socks.proxy
|
||||
|
||||
# 设置代理
|
||||
# 适用于 privoxy 将 socks 协议转为 http 协议的 http 端口
|
||||
$ git config --global http.proxy http://127.0.0.1:1080
|
||||
$ git config --global https.proxy http://127.0.0.1:1080
|
||||
$ git config --global socks.proxy 127.0.0.1:1080
|
||||
|
||||
# 取消代理
|
||||
$ git config --global --unset http.proxy
|
||||
$ git config --global --unset https.proxy
|
||||
$ git config --global --unset socks.proxy
|
||||
|
||||
# 只对 github.com 设置代理
|
||||
$ git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
|
||||
$ git config --global https.https://github.com.proxy socks5://127.0.0.1:1080
|
||||
|
||||
# 取消 github.com 代理
|
||||
$ git config --global --unset http.https://github.com.proxy
|
||||
$ git config --global --unset https.https://github.com.proxy
|
||||
```
|
||||
|
||||
### Git 别名
|
||||
|
||||
```shell
|
||||
$ git config --global alias.co checkout
|
||||
$ git config --global alias.br branch
|
||||
$ git config --global alias.ci commit
|
||||
$ git config --global alias.st status
|
||||
```
|
||||
|
||||
配置好后,再输入 `git` 命令的时候就不用再输入一大段了,例如我们要查看状态,只需:
|
||||
|
||||
```bash
|
||||
$ git st
|
||||
```
|
||||
|
||||
也可以看看:[更多别名](https://gist.github.com/johnpolacek/69604a1f6861129ef088)
|
||||
|
||||
### 设置大小写敏感
|
||||
|
||||
```shell
|
||||
# 查看git 的设置
|
||||
$ git config --get core.ignorecase
|
||||
# 设置大小写敏感
|
||||
$ git config core.ignorecase false
|
||||
# 远程有俩相同目录,通过这种方式清除掉,然后提交记录
|
||||
$ git rm -r --cached <目录/文件>
|
||||
```
|
||||
|
||||
Git 技巧
|
||||
------
|
||||
|
||||
@ -444,7 +787,7 @@ Git 技巧
|
||||
|
||||
```shell
|
||||
$ git branch -m <new>
|
||||
$ git branch -m <old> <new> #重命名分支
|
||||
$ git branch -m <old> <new> #重命名分支
|
||||
```
|
||||
|
||||
- **推送**并重置
|
||||
@ -488,7 +831,7 @@ $ git log --pretty=oneline --graph --decorate --all
|
||||
列出所有分支及其上游
|
||||
|
||||
```shell
|
||||
$ git branch -vv
|
||||
$ git branch -vv
|
||||
```
|
||||
|
||||
快速切换到上一个分支
|
||||
@ -512,109 +855,7 @@ $ git checkout <branch> -- <file>
|
||||
删除本地存在远程不存在的分支
|
||||
|
||||
```shell
|
||||
git remote prune origin
|
||||
```
|
||||
|
||||
### Commit
|
||||
|
||||
```shell
|
||||
$ git commit -v --amend
|
||||
```
|
||||
|
||||
重写最后的提交信息
|
||||
|
||||
### 忽略文件的权限变化
|
||||
|
||||
```shell
|
||||
git config core.fileMode false
|
||||
```
|
||||
|
||||
不再将文件的权限变化视作改动
|
||||
|
||||
### Git 别名
|
||||
|
||||
```shell
|
||||
$ git config --global alias.co checkout
|
||||
$ git config --global alias.br branch
|
||||
$ git config --global alias.ci commit
|
||||
$ git config --global alias.st status
|
||||
```
|
||||
|
||||
也可以看看:[更多别名](https://gist.github.com/johnpolacek/69604a1f6861129ef088)
|
||||
|
||||
### 设置大小写敏感
|
||||
|
||||
```shell
|
||||
# 查看git 的设置
|
||||
$ git config --get core.ignorecase
|
||||
# 设置大小写敏感
|
||||
$ git config core.ignorecase false
|
||||
# 远程有俩相同目录,通过这种方式清除掉,然后提交记录
|
||||
$ git rm -r --cached <目录/文件>
|
||||
```
|
||||
|
||||
### 修改远程 Commit 记录
|
||||
<!--rehype:wrap-class=row-span-4-->
|
||||
|
||||
```shell
|
||||
$ git rebase -i HEAD~3
|
||||
# 表示要修改当前版本的倒数第三次状态
|
||||
# 将要更改的记录行首单词 pick 改为 edit
|
||||
pick 96dc3f9 提交 commit 描述内容 1
|
||||
pick f1cce8a 提交 commit 描述内容 2
|
||||
pick 6293516 提交 commit 描述内容 3
|
||||
# Rebase eeb03a4..6293516 onto eeb03a4
|
||||
# (3 commands)
|
||||
#
|
||||
# Commands:
|
||||
# p, pick = 使用提交
|
||||
# r, reword = 使用提交,但编辑提交消息
|
||||
# e, edit = 使用提交,但停止修改
|
||||
# s, squash = 使用提交,但融合到先前的提交中
|
||||
# f, fixup = 像 squash,但丢弃此提交的日志消息
|
||||
# x, exec = 使用 shell 运行命令(该行的其余部分)
|
||||
# d, drop = 删除提交
|
||||
```
|
||||
|
||||
保存并退出,会弹出下面提示
|
||||
|
||||
```shell
|
||||
# 您现在可以修改提交,使用
|
||||
#
|
||||
# git commit --amend
|
||||
#
|
||||
# 对更改感到满意后,运行
|
||||
#
|
||||
# git rebase --continue
|
||||
#
|
||||
# 1. 通过这条命令进入编辑更改 commit,保存退出
|
||||
$ git commit --amend
|
||||
# 2. 保存退出确认修改,继续执行下面命令,
|
||||
$ git rebase --continue
|
||||
# 如果修改多条记录反复执行上面两条命令直到完成所有修改
|
||||
|
||||
# 最后,确保没有人提交进行推送,最好不要加 -f 强制推送
|
||||
$ git push -f origin master
|
||||
```
|
||||
|
||||
### 撤销远程记录
|
||||
|
||||
```shell
|
||||
# 撤销一条记录
|
||||
$ git reset --hard HEAD~1
|
||||
# 强制同步到远程仓库
|
||||
$ git push -f origin HEAD:master
|
||||
```
|
||||
|
||||
### 放弃本地修改内容
|
||||
|
||||
```shell
|
||||
# 如果有的修改以及加入暂存区的话
|
||||
$ git reset --hard
|
||||
# 还原所有修改,不会删除新增的文件
|
||||
$ git checkout .
|
||||
# 下面命令会删除新增的文件
|
||||
$ git clean -xdf
|
||||
$ git remote prune origin
|
||||
```
|
||||
|
||||
### 获取最近一次提交的 Hash
|
||||
@ -632,32 +873,6 @@ $ git branch --merged master | grep -v '^\*\| master' | xargs -n 1 git branch -
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 把 A 分支的某一个 commit,放到 B 分支上
|
||||
|
||||
```shell
|
||||
# 切换到 B 分支
|
||||
$ git checkout <B>
|
||||
# 将 A 分支 <hash-id> 的内容 pick 到 B 分支
|
||||
$ git cherry-pick <hash-id>
|
||||
```
|
||||
|
||||
### 回到远程仓库的状态
|
||||
|
||||
```bash
|
||||
$ git fetch --all && git reset --hard origin/master
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
抛弃本地所有的修改,回到远程仓库的状态
|
||||
|
||||
### 重设第一个 commit
|
||||
|
||||
```bash
|
||||
$ git update-ref -d HEAD
|
||||
```
|
||||
|
||||
把所有的改动都重新放回工作区,并**清空所有的 commit**,这样就可以重新提交第一个 `commit` 了
|
||||
|
||||
### 查看冲突文件列表
|
||||
|
||||
```bash
|
||||
@ -685,12 +900,6 @@ $ git diff <commit-id> <commit-id>
|
||||
git diff --cached
|
||||
```
|
||||
|
||||
### 中文乱码的解决方案
|
||||
|
||||
```shell
|
||||
$ git config --global core.quotepath false
|
||||
```
|
||||
|
||||
### 展示暂存区、工作区和最近版本的不同
|
||||
|
||||
```bash
|
||||
@ -733,14 +942,6 @@ $ git remote show origin
|
||||
$ git describe --tags --abbrev=0
|
||||
```
|
||||
|
||||
### 查看某段代码是谁写的
|
||||
|
||||
```bash
|
||||
$ git blame <file-name>
|
||||
```
|
||||
|
||||
`blame` 的意思为`责怪`,你懂的。
|
||||
|
||||
### 修改作者名
|
||||
|
||||
```bash
|
||||
@ -748,12 +949,6 @@ $ git commit --amend --author='Author Name <email@address.com>'
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 修改远程仓库的 url
|
||||
|
||||
```bash
|
||||
$ git remote set-url origin <URL>
|
||||
```
|
||||
|
||||
### 增加远程仓库
|
||||
|
||||
```bash
|
||||
@ -767,12 +962,6 @@ $ git remote add origin <remote-url>
|
||||
$ git remote -v
|
||||
```
|
||||
|
||||
### 查看两个星期内的改动
|
||||
|
||||
```bash
|
||||
$ git whatchanged --since='2 weeks ago'
|
||||
```
|
||||
|
||||
### 从 stash 中拿出某个文件的修改
|
||||
|
||||
```bash
|
||||
@ -846,18 +1035,6 @@ $ git clean -X -f
|
||||
$ git status --ignored
|
||||
```
|
||||
|
||||
### commit 历史中显示 Branch1 有的但是 Branch2 没有 commit
|
||||
|
||||
```bash
|
||||
$ git log Branch1 ^Branch2
|
||||
```
|
||||
|
||||
### 在 commit log 中显示 GPG 签名
|
||||
|
||||
```bash
|
||||
$ git log --show-signature
|
||||
```
|
||||
|
||||
### 新建并切换到新分支上,同时这个分支没有任何 commit
|
||||
|
||||
```bash
|
||||
@ -872,35 +1049,6 @@ $ git checkout --orphan <branch-name>
|
||||
$ git show <branch-name>:<file-name>
|
||||
```
|
||||
|
||||
### 配置 http 和 socks 代理
|
||||
<!--rehype:wrap-class=row-span-4-->
|
||||
|
||||
```bash
|
||||
# 查看代理
|
||||
$ git config --global http.proxy
|
||||
$ git config --global https.proxy
|
||||
$ git config --global socks.proxy
|
||||
|
||||
# 设置代理
|
||||
# 适用于 privoxy 将 socks 协议转为 http 协议的 http 端口
|
||||
$ git config --global http.proxy http://127.0.0.1:1080
|
||||
$ git config --global https.proxy http://127.0.0.1:1080
|
||||
$ git config --global socks.proxy 127.0.0.1:1080
|
||||
|
||||
# 取消代理
|
||||
$ git config --global --unset http.proxy
|
||||
$ git config --global --unset https.proxy
|
||||
$ git config --global --unset socks.proxy
|
||||
|
||||
# 只对 github.com 设置代理
|
||||
$ git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
|
||||
$ git config --global https.https://github.com.proxy socks5://127.0.0.1:1080
|
||||
|
||||
# 取消 github.com 代理
|
||||
$ git config --global --unset http.https://github.com.proxy
|
||||
$ git config --global --unset https.https://github.com.proxy
|
||||
```
|
||||
|
||||
### clone 最新一次提交
|
||||
|
||||
```bash
|
||||
@ -934,14 +1082,6 @@ git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads
|
||||
|
||||
最新的放在最上面
|
||||
|
||||
### 在 commit log 中查找相关内容
|
||||
|
||||
```bash
|
||||
git log --all --grep='<given-text>'
|
||||
```
|
||||
|
||||
通过 grep 查找,given-text: 所需要查找的字段
|
||||
|
||||
### 把暂存区的指定 file 放到工作区中
|
||||
|
||||
```bash
|
||||
@ -960,10 +1100,32 @@ Host github.com
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
git 代码统计
|
||||
### Fork仓库同步上游仓库
|
||||
|
||||
- 设置上游仓库
|
||||
|
||||
```shell
|
||||
$ git remote add upstream https://github.com/jaywcjlove/reference.git
|
||||
```
|
||||
|
||||
- 本地项目操作
|
||||
|
||||
```shell
|
||||
$ git fetch upstream # 获取上游仓库更新
|
||||
$ git stach # 暂存本地修改(如果有)
|
||||
$ git branch -a # 列出所有远程仓库地址(非必须)
|
||||
$ git rebase remotes/upstream/main # 使用远程仓库的提交记录来重写本地提交记录
|
||||
$ git push -f # 强制推送到远程(github)仓库
|
||||
$ git stach pop # 恢复暂存的本地修改(如果有)
|
||||
```
|
||||
|
||||
<!--rehype:className=style-timeline-->
|
||||
|
||||
统计查询
|
||||
---
|
||||
|
||||
### 查看 git 上的个人代码量
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
- `username` 需要改成自己的
|
||||
|
||||
@ -971,8 +1133,10 @@ git 代码统计
|
||||
git log --author="username" --pretty=tformat: --numstat | awk \
|
||||
'{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 统计每个人增删行数
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```bash
|
||||
git log --format='%aN' | sort -u |\
|
||||
@ -980,6 +1144,7 @@ git log --format='%aN' | sort -u |\
|
||||
git log --author="$name" --pretty=tformat: --numstat | awk \
|
||||
'{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 查看仓库提交者排名
|
||||
|
||||
@ -988,6 +1153,7 @@ git log --format='%aN' | sort -u |\
|
||||
```bash
|
||||
git log --pretty='%aN' | sort | uniq -c | sort -k1 -n -r | head -n 10
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 提交数统计
|
||||
|
||||
@ -995,6 +1161,46 @@ git log --pretty='%aN' | sort | uniq -c | sort -k1 -n -r | head -n 10
|
||||
git log --oneline | wc -l
|
||||
```
|
||||
|
||||
### 查看某段代码是谁写的
|
||||
|
||||
```bash
|
||||
$ git blame <file-name>
|
||||
```
|
||||
|
||||
`blame` 的意思为`责怪`,你懂的。
|
||||
|
||||
### 查看两个星期内的改动
|
||||
|
||||
```bash
|
||||
$ git whatchanged --since='2 weeks ago'
|
||||
```
|
||||
|
||||
### 在 commit log 中查找相关内容
|
||||
|
||||
```bash
|
||||
$ git log --all --grep='<given-text>'
|
||||
```
|
||||
|
||||
通过 grep 查找,given-text: 所需要查找的字段
|
||||
|
||||
### Git 仓库的大小
|
||||
|
||||
```bash
|
||||
$ git ls-files | xargs -r du -hs
|
||||
```
|
||||
|
||||
### Git 仓库的总大小
|
||||
|
||||
```bash
|
||||
$ git count-objects -vH
|
||||
```
|
||||
|
||||
### 查询历史体积大的 10 个文件
|
||||
|
||||
```bash
|
||||
$ git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | awk '/^blob/ {print substr($0,6)}' | sort --numeric-sort --key=2 --reverse | head -n 10 | cut -c 13-
|
||||
```
|
||||
|
||||
Conventional Commmits
|
||||
----
|
||||
|
||||
|
@ -260,17 +260,17 @@ env:
|
||||
#### 操作符
|
||||
|
||||
- `( )` _(逻辑分组)_
|
||||
- `[ ]` _(指数)_
|
||||
- `.` _(属性取消引用)_
|
||||
- `!` _(不是)_
|
||||
- `<` _(少于)_
|
||||
- `[ ]` _(索引)_
|
||||
- `.` _(属性解引用)_
|
||||
- `!` _(非)_
|
||||
- `<` _(小于)_
|
||||
- `<=` _(小于或等于)_
|
||||
- `>` _(比...更棒)_
|
||||
- `>` _(大于)_
|
||||
- `>=` _(大于或等于)_
|
||||
- `==` _(平等的)_
|
||||
- `!=` _(不相等)_
|
||||
- `==` _(相等)_
|
||||
- `!=` _(不等)_
|
||||
- `&&` _(和)_
|
||||
- `||` _(或者)_
|
||||
- `||` _(或)_
|
||||
<!--rehype:className=cols-2 style-none-->
|
||||
|
||||
### Github 上下文
|
||||
|
@ -33,8 +33,10 @@ windows_job:
|
||||
script:
|
||||
- echo Hello, %USERNAME%!
|
||||
|
||||
linux_job: tags:
|
||||
- linux script:
|
||||
linux_job:
|
||||
tags:
|
||||
- linux
|
||||
script:
|
||||
- echo "Hello, $USER!"
|
||||
```
|
||||
|
||||
|
471
docs/golang.md
@ -33,6 +33,8 @@ s1 = "Learn Go!"
|
||||
// 一次声明多个变量
|
||||
var b, c int = 1, 2
|
||||
var d = true
|
||||
// 匿名赋值
|
||||
_ , e = 10, 20
|
||||
```
|
||||
|
||||
简短声明
|
||||
@ -139,7 +141,6 @@ fmt.Println(!true) // false
|
||||
参见:[更多操作符](#运算符和标点符号)
|
||||
|
||||
### 数组 Arrays
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```go
|
||||
┌────┬────┬────┬────┬─────┬─────┐
|
||||
@ -183,6 +184,7 @@ fmt.Println("2d: ", twoDimension)
|
||||
```
|
||||
|
||||
### 指针(Pointers)
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```go
|
||||
func main () {
|
||||
@ -194,9 +196,30 @@ func getPointer () (myPointer *int) {
|
||||
a := 234
|
||||
return &a
|
||||
}
|
||||
//申明指针的时候,如果没有指向某个变量,默认值为nil
|
||||
//不能直接进行操作,包括读写
|
||||
var p *int
|
||||
*p = 123 // panic nil pointer
|
||||
```
|
||||
|
||||
a := new(int)
|
||||
*a = 234
|
||||
---
|
||||
|
||||
```go
|
||||
//而用new返回的是有默认值的指针, 为数据类型的默认值
|
||||
func main(){
|
||||
//有一块内存存放了10,它的地址由系统自动分配,别名是a
|
||||
a := 10
|
||||
//内存存放的10变成了20
|
||||
a = 20
|
||||
var p *int
|
||||
p = &a //或者直接写 p := &a
|
||||
//上面的p是一个指针,通过 *p 的方式同样可以访问 变量a指向 的内存
|
||||
|
||||
/*当你动态申请内存的时候,指针的存在意义之一就被体现出来了*/
|
||||
ptr := new(int)
|
||||
//申请了一块内存空间,没有办法指定别名,new()返回内存地址,用指针接收
|
||||
//此时并没有变量能直接指向这块内存,所以只能通过内存地址来访问
|
||||
}
|
||||
```
|
||||
|
||||
参见:[指针(Pointers)](https://tour.golang.org/moretypes/1)
|
||||
@ -225,11 +248,29 @@ const s string = "constant"
|
||||
const Phi = 1.618
|
||||
const n = 500000000
|
||||
const d = 3e20 / n
|
||||
fmt.Println(d)
|
||||
```
|
||||
|
||||
常量声明可以使用 iota常量生成器 初始化,它用于
|
||||
生成一组以相似规则初始化的常量,但是不用每行都
|
||||
写一遍初始化表达式。
|
||||
注意:
|
||||
|
||||
1. 在一个const声明语句中,在第一个声明的常量所在的行,iota被置为0,然后在每一个有常量声明的行加一。
|
||||
2. 写在同一行的值是相同的
|
||||
|
||||
```go
|
||||
const (
|
||||
a = iota
|
||||
b
|
||||
c
|
||||
)
|
||||
// a = 0, b = 1, c = 2
|
||||
```
|
||||
|
||||
### 类型转换
|
||||
|
||||
Go语言中不允许隐式转换,所有类型转换必须显式声明(强制转换),而且转换只能发生在两种相互兼容的类型之间。
|
||||
|
||||
```go
|
||||
i := 90
|
||||
f := float64(i)
|
||||
@ -561,6 +602,8 @@ sum(1, 2) // => [1 2] 3
|
||||
sum(1, 2, 3) // => [1 2 3] 6
|
||||
nums := []int{1, 2, 3, 4}
|
||||
sum(nums...) // => [1 2 3 4] 10
|
||||
// 不定参在内存中是连续存储的
|
||||
// 不定参内部再传递的时候,参数也要是不定的
|
||||
```
|
||||
|
||||
### 初始化函数
|
||||
@ -597,20 +640,8 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
### 关闭 1
|
||||
|
||||
```go
|
||||
func scope() func() int{
|
||||
outer_var := 2
|
||||
foo := func() int {return outer_var}
|
||||
return foo
|
||||
}
|
||||
// Outpus: 2
|
||||
fmt.Println(scope()())
|
||||
```
|
||||
|
||||
### 关闭 2
|
||||
|
||||
### 闭包
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
```go
|
||||
func outer() (func() int, int) {
|
||||
outer_var := 2
|
||||
@ -622,8 +653,25 @@ func outer() (func() int, int) {
|
||||
return inner, outer_var
|
||||
}
|
||||
inner, val := outer()
|
||||
fmt.Println(inner()) // => 200
|
||||
fmt.Println(val) // => 101
|
||||
fmt.Println(val)
|
||||
// => 101
|
||||
fmt.Println(inner())
|
||||
// => 200,这里涉及到golang中闭包和内存逃逸的概念,inner()实际上执行了两次,outer()中一次,fmt又一次,
|
||||
//但为什么是200呢,编译器不能确定outer_var在后续会不会使用,
|
||||
//所以outer_var不会随着outer()结束而释放它的栈(Stack)空间,
|
||||
//而会‘逃逸到’堆(Heap)上,那么第二次的inner()中outer_var就会是101。
|
||||
```
|
||||
|
||||
### 关闭 1
|
||||
|
||||
```go
|
||||
func scope() func() int{
|
||||
outer_var := 2
|
||||
foo := func() int {return outer_var}
|
||||
return foo
|
||||
}
|
||||
// Outpus: 2
|
||||
fmt.Println(scope()())
|
||||
```
|
||||
|
||||
Golang 包(Packages)
|
||||
@ -835,8 +883,21 @@ Golang 方法(Methods)
|
||||
<!--rehype:body-class=cols-2-->
|
||||
|
||||
### 接收器
|
||||
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
```go
|
||||
//Go语言中的方法(Method)是一种作用于特定类型变量的函数。
|
||||
//这种特定类型变量叫做接收者(Receiver)。
|
||||
//接收者的概念就类似于其他语言中的 this 或者 self。
|
||||
//方法的定义格式如下:
|
||||
func (接收者变量 接收者类型) 方法名(参数列表) (返回参数) {
|
||||
函数体
|
||||
}
|
||||
// 其中,
|
||||
// 1.接收者变量:接收者中的参数变量名在命名时,官方建议使用接收者类型名
|
||||
//的第一个小写字母,而不是self、this之类的命名。例如,Person类型的接收者变量
|
||||
// 应该命名为 p,Connector类型的接收者变量应该命名为c等。
|
||||
// 2.接收者类型:接收者类型和参数类似,可以是指针类型和非指针类型。
|
||||
// 3.方法名、参数列表、返回参数:具体格式与函数定义相同。
|
||||
type Vertex struct {
|
||||
X, Y float64
|
||||
}
|
||||
@ -844,27 +905,82 @@ type Vertex struct {
|
||||
func (v Vertex) Abs() float64 {
|
||||
return math.Sqrt(v.X * v.X + v.Y * v.Y)
|
||||
}
|
||||
func (v Vertex) valuechange() float64 {
|
||||
v.X += 1
|
||||
return v.X
|
||||
}
|
||||
func (v *Vertex) pointerchange() float64 {
|
||||
v.X += 1
|
||||
return v.X
|
||||
}
|
||||
func main() {
|
||||
v := Vertex{1, 2}
|
||||
v.Abs()
|
||||
|
||||
v = Vertex{1, 2}
|
||||
fmt.Println(v.valuechange()) // 2
|
||||
fmt.Println(v) // {1 2}
|
||||
|
||||
v = Vertex{1, 2}
|
||||
fmt.Println(v.pointerchange())// 2
|
||||
fmt.Println(v) // {2 2}
|
||||
}
|
||||
//如果在方法里修改receiver的值要对caller生效,使用 pointer receiver。
|
||||
|
||||
v := Vertex{1, 2}
|
||||
v.Abs()
|
||||
```
|
||||
|
||||
参见:[Methods](https://tour.golang.org/methods/1)
|
||||
参见:[Methods](https://tour.golang.org/methods/1),[指针接收器](https://tour.golang.org/methods/4)
|
||||
|
||||
### Mutation
|
||||
### 方法表达式
|
||||
|
||||
方法表达式相当于提供一种语法将类型方法调用显式地转换为函数调用,接收者(receiver)必须显式地传递进去。
|
||||
|
||||
```go
|
||||
func (v *Vertex) Scale(f float64) {
|
||||
v.X = v.X * f
|
||||
v.Y = v.Y * f
|
||||
func (t T) Get(){
|
||||
return t.a
|
||||
}
|
||||
|
||||
v := Vertex{6, 12}
|
||||
v.Scale(0.5)
|
||||
// `v` 已更新
|
||||
func (t *T) Set(i int){
|
||||
t.a = i
|
||||
}
|
||||
//表达式`T.Get`和`(*T).Set`被称为方法表达式,
|
||||
//需要注意的是在方法表达式中编译器不会做自动转换。
|
||||
//值调用会自动转换,表达式调用则不会,例如:
|
||||
type Data struct{}
|
||||
func (Data) TestValue () {}
|
||||
func (*Data) TestPointer () {}
|
||||
//声明一个类型变量a
|
||||
var a Data= struct{}{}
|
||||
//表达式调用编译器不会进行自动转换
|
||||
Data.TestValue(a)
|
||||
//Data.TestValue(&a)
|
||||
(*Data).TestPointer (&a)
|
||||
//Data.TestPointer(&a) //type Data has no method TestPointer
|
||||
//值调用编译器会进行自动转换
|
||||
y : = (&a).TestValue //编译器帮助转换a.TestValue
|
||||
g : = a.TestPointer //会转换为(&a).TestPointer
|
||||
```
|
||||
|
||||
参见:[指针接收器](https://tour.golang.org/methods/4)
|
||||
#### 组合结构的方法集
|
||||
|
||||
内嵌字段的访问不需要使用全路径,只要保证命名是唯一的就可以,尽量避免同名。如果外层字段和内层字段有相同的方法,则使用简化模式访问外层方法会覆盖内层的方法。
|
||||
|
||||
```go
|
||||
x : = X{a: 1}
|
||||
y : = Y{
|
||||
X : x ,
|
||||
b : 2 ,
|
||||
}
|
||||
z : = z {
|
||||
Y : y ,
|
||||
c : 3 ,
|
||||
}//组合结构,内嵌字段
|
||||
```
|
||||
|
||||
组合结构的方法集有如下规则:
|
||||
|
||||
- 若类型 T 包含匿名字段 S ,则 T 的方法集包含S的方法集
|
||||
- 若类型 T 包含匿名字段 *S ,则 T 的方法集包含 S 和*S方法集
|
||||
- 不管类型 T 中嵌入的匿名字段是 S 还是 *S ,*T 方法集总是包含 S 和 *S 方法集
|
||||
|
||||
Golang 接口(Interfaces)
|
||||
--------
|
||||
@ -912,6 +1028,279 @@ func main() {
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
Golang Embed (Go version >= 1.16)
|
||||
---
|
||||
|
||||
### 嵌入为string
|
||||
|
||||
``` go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
//go:embed version.txt
|
||||
var version string
|
||||
|
||||
func main() {
|
||||
fmt.Printf("version %q\n", version)
|
||||
}
|
||||
```
|
||||
|
||||
### 嵌入为[]byte
|
||||
|
||||
``` go
|
||||
package main
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
//go:embed version.txt
|
||||
var versionByte []byte
|
||||
|
||||
func main() {
|
||||
fmt.Printf("version %q\n", string(versionByte))
|
||||
}
|
||||
```
|
||||
|
||||
### 嵌入为embed.FS
|
||||
|
||||
``` go
|
||||
//go:embed hello.txt
|
||||
var f embed.FS
|
||||
func main() {
|
||||
data, _ := f.ReadFile("hello.txt")
|
||||
fmt.Println(string(data))
|
||||
}
|
||||
```
|
||||
|
||||
### 嵌入多个文件
|
||||
|
||||
``` go
|
||||
//go:embed hello.txt
|
||||
//go:embed hello2.txt
|
||||
var f embed.FS
|
||||
func main() {
|
||||
data, _ := f.ReadFile("hello.txt")
|
||||
fmt.Println(string(data))
|
||||
data, _ = f.ReadFile("hello2.txt")
|
||||
fmt.Println(string(data))
|
||||
}
|
||||
```
|
||||
|
||||
### 嵌入子文件夹下的文件
|
||||
|
||||
``` go
|
||||
//go:embed p/hello.txt p/hello2.txt
|
||||
var f embed.FS
|
||||
func main() {
|
||||
data, _ := f.ReadFile("p/hello.txt")
|
||||
fmt.Println(string(data))
|
||||
data, _ = f.ReadFile("p/hello2.txt")
|
||||
fmt.Println(string(data))
|
||||
}
|
||||
```
|
||||
|
||||
### 同一个文件嵌入为多个变量
|
||||
|
||||
``` go
|
||||
//go:embed hello.txt
|
||||
var s string
|
||||
//go:embed hello.txt
|
||||
var s2 string
|
||||
func main() {
|
||||
fmt.Println(s)
|
||||
fmt.Println(s2)
|
||||
}
|
||||
```
|
||||
|
||||
### 匹配模式
|
||||
|
||||
``` go
|
||||
//go:embed p/*
|
||||
var f embed.FS
|
||||
func main() {
|
||||
data, _ := f.ReadFile("p/.hello.txt")
|
||||
fmt.Println(string(data))
|
||||
data, _ = f.ReadFile("p/q/.hi.txt") // 没有嵌入 p/q/.hi.txt
|
||||
fmt.Println(string(data))
|
||||
}
|
||||
```
|
||||
|
||||
Golang 泛型 (Go version >= 1.18)
|
||||
-------------
|
||||
|
||||
### 泛型类型
|
||||
<!--rehype:wrap-class=row-span-1-->
|
||||
|
||||
```text
|
||||
type S[T int|float32|float64 ] []T
|
||||
┬ ────────┬────────
|
||||
┆ ╰─── 2. 类型约束
|
||||
╰────────────── 1. 类型形参
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
可以使用类型实参 int 或 string 实例化
|
||||
|
||||
``` go
|
||||
type MyMap[K int|string, V float32 | float64] map[K]V
|
||||
|
||||
var a MyMap[string, float64] = map[string]float64{
|
||||
"jack_score": 9.6,
|
||||
"bob_score": 8.4,
|
||||
}
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
- **匿名结构体不支持泛型**<!--rehype:style=color: #b43c29;-->
|
||||
- **匿名函数不支持泛型**<!--rehype:style=color: #b43c29;-->
|
||||
|
||||
### 泛型函数
|
||||
<!--rehype:wrap-class=row-span-1-->
|
||||
|
||||
任意类型
|
||||
|
||||
``` go
|
||||
func Add[T any](a,b T) T {
|
||||
return a+b
|
||||
}
|
||||
```
|
||||
|
||||
对类型进行约束
|
||||
|
||||
``` go
|
||||
func Add[T string | int | int8](a,b T) T {
|
||||
return a+b
|
||||
}
|
||||
```
|
||||
|
||||
类型嵌套
|
||||
|
||||
``` go
|
||||
type WowStruct[T int | float32, S []T] struct {
|
||||
Data S
|
||||
MaxValue T
|
||||
MinValue T
|
||||
}
|
||||
|
||||
var ws WowStruct[int, []int]
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
泛型函数中进行类型声明 (go version >= 1.20)
|
||||
|
||||
``` go
|
||||
func F[T1 any]() {
|
||||
type x struct{}
|
||||
type y = x
|
||||
}
|
||||
```
|
||||
|
||||
### 泛型约束
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
通过接口实现
|
||||
|
||||
``` go
|
||||
type Addable interface{
|
||||
type int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr, float32, float64, complex64, complex128, string
|
||||
}
|
||||
|
||||
func Add[T Addable](a,b T) T {
|
||||
return a+b
|
||||
}
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
使用 ~ 符号
|
||||
|
||||
``` go
|
||||
type Int interface {
|
||||
~int | ~int8 | ~int16 | ~int32 | ~int64
|
||||
}
|
||||
|
||||
type Uint interface {
|
||||
~uint | ~uint8 | ~uint16 | ~uint32
|
||||
}
|
||||
type Float interface {
|
||||
~float32 | ~float64
|
||||
}
|
||||
|
||||
type Slice[T Int | Uint | Float] []T
|
||||
|
||||
var s Slice[int] // 正确
|
||||
|
||||
type MyInt int
|
||||
var s2 Slice[MyInt] // MyInt底层类型是int,所以可以用于实例化
|
||||
|
||||
type MyMyInt MyInt
|
||||
var s3 Slice[MyMyInt] // 正确。MyMyInt 虽然基于 MyInt ,但底层类型也是int,所以也能用于实例化
|
||||
|
||||
type MyFloat32 float32 // 正确
|
||||
var s4 Slice[MyFloat32]
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
使用 ~ 时的限制:
|
||||
<!--rehype:style=color: #b43c29;-->
|
||||
1. ~后面的类型不能为接口
|
||||
2. ~后面的类型必须为基本类型
|
||||
<!--rehype:style=color: #b43c29;-->
|
||||
|
||||
### 泛型 Receiver
|
||||
<!--rehype:wrap-class=row-span-1-->
|
||||
|
||||
定义普通类型支持泛型
|
||||
|
||||
``` go
|
||||
type MySlice[T int | float32] []T
|
||||
|
||||
func (s MySlice[T]) Sum() T {
|
||||
var sum T
|
||||
for _, value := range s {
|
||||
sum += value
|
||||
}
|
||||
return sum
|
||||
}
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
结构体支持泛型
|
||||
|
||||
``` go
|
||||
type A[T int | float32 | float64] struct {
|
||||
}
|
||||
|
||||
func (receiver A[T]) Add(a T, b T) T {
|
||||
return a + b
|
||||
}
|
||||
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
### 泛型接口
|
||||
<!--rehype:wrap-class=row-span-1-->
|
||||
|
||||
``` go
|
||||
type Uint interface { // 接口 Uint 中有类型,所以是一般接口
|
||||
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
|
||||
}
|
||||
|
||||
type ReadWriter interface { // ReadWriter 接口既有方法也有类型,所以是一般接口
|
||||
~string | ~[]rune
|
||||
|
||||
Read(p []byte) (n int, err error)
|
||||
Write(p []byte) (n int, err error)
|
||||
}
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
一般接口类型不能用来定义变量,只能用于泛型的类型约束中
|
||||
<!--rehype:style=color: #b43c29;-->
|
||||
|
||||
杂项
|
||||
-------------
|
||||
|
||||
@ -1006,11 +1395,11 @@ Go 命令
|
||||
另见
|
||||
--------
|
||||
|
||||
- [Devhints](https://devhints.io/go) _(devhints.io)_
|
||||
- [A tour of Go](https://tour.golang.org/welcome/1) _(tour.golang.org)_
|
||||
- [Golang wiki](https://github.com/golang/go/wiki/) _(github.com)_
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html) _(golang.org)_
|
||||
- [Go by Example](https://gobyexample.com/) _(gobyexample.com)_
|
||||
- [Awesome Go](https://awesome-go.com/) _(awesome-go.com)_
|
||||
- [JustForFunc Youtube](https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw) _(youtube.com)_
|
||||
- [Style Guide](https://github.com/golang/go/wiki/CodeReviewComments) _(github.com)_
|
||||
- [Devhints](https://devhints.io/go) *(devhints.io)*
|
||||
- [A tour of Go](https://tour.golang.org/welcome/1) *(tour.golang.org)*
|
||||
- [Golang wiki](https://github.com/golang/go/wiki/) *(github.com)*
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html) *(golang.org)*
|
||||
- [Go by Example](https://gobyexample.com/) *(gobyexample.com)*
|
||||
- [Awesome Go](https://awesome-go.com/) *(awesome-go.com)*
|
||||
- [JustForFunc Youtube](https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw) *(youtube.com)*
|
||||
- [Style Guide](https://github.com/golang/go/wiki/CodeReviewComments) *(github.com)*
|
||||
|
@ -27,7 +27,7 @@ Google Chrome 键盘快捷键备忘清单
|
||||
`Alt` `Space` `N` | 最小化当前窗口
|
||||
`Alt` `Space` `X` | 最大化当前窗口
|
||||
`Alt` `F4` | 关闭当前窗口
|
||||
`Ctrl` `Shift` `Q` | 相当谷歌浏览器
|
||||
`Ctrl` `Shift` `Q` | 退出谷歌浏览器
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 谷歌浏览器功能
|
||||
@ -206,7 +206,41 @@ Chrome 开发者工具键盘快捷键
|
||||
`Enter` | 执行
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
Chrome 搜索引擎查询语法
|
||||
---
|
||||
|
||||
### 语法
|
||||
|
||||
语法 | 阐述
|
||||
:- | -
|
||||
`site:` | 指定网站
|
||||
`inurl:` | URL 中存在的关键字页面
|
||||
`intext:` | 网页内容里的关键字
|
||||
`Filetype:` | 指定文件的类型
|
||||
`intitle:` | 网页辩题中的关键字
|
||||
`link:` | 返回所有你指定的域名链接
|
||||
`info:` | 查找指定站点信息
|
||||
`cache:` | 搜索 Google 中的内容缓存
|
||||
`related:` | 搜索相关的网站
|
||||
|
||||
<span style="color:red">注意:</span>搜索语法的 `:` 后不应该存在空格,像这样 `site:google.com`,而不是这样 `site: google.com`。
|
||||
|
||||
### 指令
|
||||
|
||||
指令 | 阐述
|
||||
:- | -
|
||||
`@` | 用于搜索社交媒体,如:`@twitter`
|
||||
`*` | 通配符省略,如:`wlop *`
|
||||
`$` | 用于搜索指定的价格,如:`phone $400`
|
||||
`#` | 搜索 `#` 标签,如:`#疯狂星期四`
|
||||
`-` | 排除特定关键字,如:`中国美食 -麻辣`
|
||||
`""` | 完全匹配的结果,如:`"最高的建筑"`
|
||||
`..` | 某个数字范围之内的,如:`phone $50..$100`
|
||||
`OR` | 组合搜索,如:`疯狂星期四 OR 肯德基`
|
||||
`AND` | 空格默认是 AND 指令
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
- [Keyboard shortcuts for Google Chrome](https://support.google.com/chrome/answer/157179?hl=en) _(support.google.com)_
|
||||
- [Search Help for Google Chrome](https://support.google.com/websearch/answer/2466433?hl=en)
|
||||
|
@ -37,27 +37,28 @@ export HOMEBREW_INSTALL_FROM_API=1
|
||||
|
||||
命令 | 说明
|
||||
:--- :---
|
||||
`brew install git` | `安装`一个包
|
||||
`brew reinstall git` | 重新`安装`一个包
|
||||
`brew install git` | `安装`一个软件包
|
||||
`brew reinstall git` | 重新`安装`一个软件包
|
||||
`brew uninstall git` | `删除`/`卸载`软件包
|
||||
`brew upgrade git` | 升级包
|
||||
`brew upgrade git` | 升级一个软件包
|
||||
`brew upgrade` | 升级所有可升级的包
|
||||
:--- :---
|
||||
`brew unlink git` | `取消`链接
|
||||
`brew link git` | 关联
|
||||
`brew switch git 2.5.0` | 更改版本
|
||||
`brew unlink git` | 取消软件包的链接
|
||||
`brew link git` | 链接已有的软件包
|
||||
`brew switch git 2.5.0` | 切换软件包的版本
|
||||
:--- :---
|
||||
`brew list --versions git` | 看看你有什么版本
|
||||
`brew list --versions git` | 查看安装的软件包及其版本信息
|
||||
|
||||
### 更多包命令
|
||||
|
||||
命令 | 说明
|
||||
:--- :---
|
||||
`brew info git` | 列出版本、注意事项等
|
||||
`brew cleanup git` | 删除旧版本
|
||||
`brew edit git` | 编辑此软件包
|
||||
`brew cat git` | 打印这个软件包
|
||||
`brew home git` | 打开主页
|
||||
`brew search git` | 搜索公式
|
||||
`brew info git` | 显示软件包的版本、依赖、注意事项等信息
|
||||
`brew cleanup git` | 删除旧版本的软件包及其依赖
|
||||
`brew edit git` | 编辑此软件包的安装脚本
|
||||
`brew cat git` | 打印此软件包的安装脚本
|
||||
`brew home git` | 打开此软件包的主页
|
||||
`brew search git` | 搜索软件包公式并显示相关信息
|
||||
|
||||
### Brew Cask 命令
|
||||
|
||||
@ -66,20 +67,20 @@ export HOMEBREW_INSTALL_FROM_API=1
|
||||
`brew install --cask firefox` | 安装火狐浏览器
|
||||
`brew list --cask` | 列出已安装应用
|
||||
|
||||
Cask 命令用于与图形应用程序交互
|
||||
Cask 命令用于与图形界面应用程序交互,可以安装和管理 macOS 上的图形界面应用程序
|
||||
|
||||
### 全局命令
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
命令 | 说明
|
||||
:--- :---
|
||||
`brew update` | 更新 `brew` 和 `cask`
|
||||
`brew upgrade` | 升级所有软件包
|
||||
`brew list` | 已安装列表
|
||||
`brew outdated` | 升级需要什么?
|
||||
`brew doctor` | 诊断 brew 问题
|
||||
`brew pin <formula>` | 防止指定软件包升级
|
||||
`brew unpin <formula>` | 允许升级指定的软件包
|
||||
`brew update` | 更新 `Homebrew` 和 `Cask`
|
||||
`brew upgrade` | 升级所有可升级的软件包
|
||||
`brew list` | 列出已安装的软件包
|
||||
`brew outdated` | 列出需要升级的软件包
|
||||
`brew doctor` | 诊断 Homebrew 是否存在问题
|
||||
`brew pin <formula>` | 防止指定软件包被升级
|
||||
`brew unpin <formula>` | 允许指定软件包被升级
|
||||
|
||||
### Brew 清理
|
||||
|
||||
@ -127,6 +128,27 @@ $ brew info <formula>
|
||||
`brew help` | 打印帮助信息
|
||||
`brew help <sub-command>` | 打印子命令的帮助信息
|
||||
|
||||
### 依赖
|
||||
|
||||
显示`包`的依赖关系。 特定于`包`的其他选项可能是附加到命令
|
||||
|
||||
```bash
|
||||
# 您还可以看到包和依赖关系图
|
||||
$ brew deps --tree --installed
|
||||
$ brew deps git # 显示 git 依赖
|
||||
```
|
||||
|
||||
### 卸载 Homebrew
|
||||
|
||||
- 使用官方卸载脚本卸载 Homebrew
|
||||
- 验证文件是否已删除
|
||||
|
||||
```bash
|
||||
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
|
||||
$ sudo rm -rf /opt/homebrew
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
|
130
docs/html.md
@ -793,7 +793,7 @@ HTML meta 标签
|
||||
<!--rehype:body-class=cols-2-->
|
||||
|
||||
### Meta 标签
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
<!--rehype:wrap-class=row-span-5-->
|
||||
|
||||
meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他材料。
|
||||
|
||||
@ -821,7 +821,7 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他
|
||||
|
||||
```html
|
||||
<!-- 描述 -->
|
||||
<meta name="description" content="···">
|
||||
<meta name="description" content="网页描述···">
|
||||
<meta property="og:description" content="···">
|
||||
<meta name="twitter:description" content="···">
|
||||
```
|
||||
@ -849,6 +849,32 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他
|
||||
<meta name="viewport" content="width=1024">
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<!-- 重定向 -->
|
||||
<meta http-equiv="refresh" content="5;url=http://example.com/">
|
||||
<meta name="robots" content="index,follow">
|
||||
<meta name="generator" content="网站生成工具">
|
||||
<meta name="csrf-token" content="token值">
|
||||
```
|
||||
|
||||
### 常用 Meta
|
||||
|
||||
```html
|
||||
<meta name="description" content="网页描述···">
|
||||
<meta name="keywords" content="关键词1,关键词2,关键词3">
|
||||
<meta name="author" content="作者名">
|
||||
```
|
||||
|
||||
### 常用 Meta
|
||||
|
||||
```html
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="favicon.png" type="image/png">
|
||||
<link rel="icon" href="favicon.jpg" type="image/jpeg">
|
||||
```
|
||||
|
||||
### Open Graph
|
||||
|
||||
```html
|
||||
@ -887,6 +913,106 @@ Facebook、Instagram、Pinterest、LinkedIn 等使用。
|
||||
|
||||
请参阅:[Geotagging](https://en.wikipedia.org/wiki/Geotagging#HTML_pages)
|
||||
|
||||
标签语义化
|
||||
------
|
||||
|
||||
### 复杂布局
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <header> ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <nav> ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <section> ┆
|
||||
┆╭┈┈┈┈┈┈┈┈╮╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮┆
|
||||
┆┆<aside> ┆┆ <main> ┆┆
|
||||
┆┆ ┆┆╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮┆┆
|
||||
┆┆ ┆┆┆ <article> ┆ ┆ <aside> ┆┆┆
|
||||
┆┆ ┆┆┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ┆ <header> ┆ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ┆ <article> ┆ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ┆ <footer> ┆ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆┆┆
|
||||
┆┆ ┆┆╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯┆┆
|
||||
┆╰┈┈┈┈┈┈┈┈╯╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <footer> ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
### 复杂布局
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <header> ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ┆
|
||||
┆ ┆ <nav> ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <main> ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆
|
||||
┆ ┆ <article> ┆ ┆ <aside> ┆ ┆
|
||||
┆ ┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ┆ <header> ┆ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ┆ <section> ┆ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ┆ <footer> ┆ ┆ ┆ ┆ ┆
|
||||
┆ ┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <footer> ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
### 区域语义化
|
||||
|
||||
```
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <main> ┆ ┆ <aside> ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆
|
||||
┆ ┆ <header> ┆ ┆ ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆
|
||||
┆ ┆ <section> ┆ ┆ ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆
|
||||
┆ ┆ <footer> ┆ ┆ ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
### 页面头语义化
|
||||
|
||||
```
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
|
||||
┆ <header> ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ┆
|
||||
┆ ┆ <section> ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ┆
|
||||
┆ ┆ <nav> ┆ ┆ <aside> ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ┆
|
||||
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ┆
|
||||
┆ ┆ <footer> ┆ ┆
|
||||
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
另见
|
||||
--------
|
||||
|
||||
|
@ -6,34 +6,34 @@ HTTP 状态码备忘清单。 每个 HTTP 状态代码的快速参考。
|
||||
HTTP 状态码
|
||||
---
|
||||
|
||||
### Means
|
||||
### 含义
|
||||
|
||||
- [1xx: Informational](#1xx-信息) _这意味着已收到请求并且该过程正在继续_<!--rehype:tooltips-->
|
||||
- [2xx: Success](#2xx-成功的) _这意味着该操作已成功接收、理解和接受_<!--rehype:tooltips-->
|
||||
- [3xx: Redirection](#3xx-重定向) _这意味着必须采取进一步行动才能完成请求_<!--rehype:tooltips-->
|
||||
- [4xx: Client Error](#4xx-客户端错误) _这意味着请求包含不正确的语法或无法完成_<!--rehype:tooltips-->
|
||||
- [5xx: Server Error](#5xx-服务器错误) _这意味着服务器未能满足明显有效的请求_<!--rehype:tooltips-->
|
||||
- [1xx: 信息](#1xx-信息) _代表已收到请求并且该过程正在继续_<!--rehype:tooltips-->
|
||||
- [2xx: 成功](#2xx-成功) _代表该操作已成功接收、理解和接受_<!--rehype:tooltips-->
|
||||
- [3xx: 重定向](#3xx-重定向) _代表必须采取进一步行动才能完成请求_<!--rehype:tooltips-->
|
||||
- [4xx: 客户端错误](#4xx-客户端错误) _代表请求包含不正确的语法或无法完成_<!--rehype:tooltips-->
|
||||
- [5xx: 服务器错误](#5xx-服务器错误) _代表服务器未能满足明显有效的请求_<!--rehype:tooltips-->
|
||||
|
||||
### 2xx. 成功的
|
||||
### 2xx. 成功
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
- [200: OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) _请求没问题_<!--rehype:tooltips-->
|
||||
- [201: Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) _请求完成,并创建了一个新资源_<!--rehype:tooltips-->
|
||||
- [202: Accepted](https://tools.ietf.org/html/rfc7231#section-6.3.3) _接受请求进行处理,但处理未完成_<!--rehype:tooltips-->
|
||||
- [203: Non-Authoritative Information](https://tools.ietf.org/html/rfc7231#section-6.3.4) _实体标头中的信息来自本地或第三方副本,而不是来自原始服务器_<!--rehype:tooltips-->
|
||||
- [204: No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) _响应中给出了状态码和标头,但响应中没有实体主体_<!--rehype:tooltips-->
|
||||
- [205: Reset Content](https://tools.ietf.org/html/rfc7231#section-6.3.6) _浏览器应清除用于此事务的表单以获取其他输入_<!--rehype:tooltips-->
|
||||
- [206: Partial Content](https://tools.ietf.org/html/rfc7233#section-4.1) _服务器正在返回请求大小的部分数据。 用于响应指定 Range 标头的请求。 服务器必须使用 Content-Range 标头指定响应中包含的范围_<!--rehype:tooltips-->
|
||||
- [200: OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) _请求成功_<!--rehype:tooltips-->
|
||||
- [201: 已创建](https://tools.ietf.org/html/rfc7231#section-6.3.2) _请求成功,并创建了新的资源_<!--rehype:tooltips-->
|
||||
- [202: 已接受](https://tools.ietf.org/html/rfc7231#section-6.3.3) _请求成功,但处理尚未完成_<!--rehype:tooltips-->
|
||||
- [203: Non-Authoritative Information](https://tools.ietf.org/html/rfc7231#section-6.3.4) _请求成功,但负载经过了第三方服务器的修改,而非原始负载_<!--rehype:tooltips-->
|
||||
- [204: No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) _响应给出了状态码和标头,但响应中没有实体主体_<!--rehype:tooltips-->
|
||||
- [205: Reset Content](https://tools.ietf.org/html/rfc7231#section-6.3.6) _请求成功,但浏览器应重置文档视图,比如清空表单内容、重置 canvas 状态或者刷新用户界面_<!--rehype:tooltips-->
|
||||
- [206: Partial Content](https://tools.ietf.org/html/rfc7233#section-4.1) _请求成功,服务器正在返回请求所指定部分的数据。用于响应标头中指定了数据区间的请求。服务器必须使用 Content-Range 标头指定响应中包含的数据区间_<!--rehype:tooltips-->
|
||||
|
||||
### 4xx. 客户端错误
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
- [400: Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) _服务器不理解该请求_<!--rehype:tooltips-->
|
||||
- [401: Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) _请求的页面需要用户名和密码_<!--rehype:tooltips-->
|
||||
- [402: Payment Required](https://tools.ietf.org/html/rfc7231#section-6.5.2) _您还不能使用此代码_<!--rehype:tooltips-->
|
||||
- [403: Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) _禁止访问请求的页面_<!--rehype:tooltips-->
|
||||
- [402: Payment Required](https://tools.ietf.org/html/rfc7231#section-6.5.2) _您目前还不能使用此代码。402 状态码被创建最初用于表明请求的内容只有付费之后才能获取。目前不存在标准的使用约定_<!--rehype:tooltips-->
|
||||
- [403: Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) _禁止了对于此页面的请求_<!--rehype:tooltips-->
|
||||
- [404: Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) _服务器找不到请求的页面_<!--rehype:tooltips-->
|
||||
- [405: Method Not Allowed](https://tools.ietf.org/html/rfc7231#section-6.5.5) _请求中指定的方法是不允许的_<!--rehype:tooltips-->
|
||||
- [405: Method Not Allowed](https://tools.ietf.org/html/rfc7231#section-6.5.5) _请求中指定的方法不被允许_<!--rehype:tooltips-->
|
||||
- [406: Not Acceptable](https://tools.ietf.org/html/rfc7231#section-6.5.6) _服务器只能生成客户端不接受的响应_<!--rehype:tooltips-->
|
||||
- [407: Proxy Authentication Required](https://tools.ietf.org/html/rfc7235#section-3.2) _您必须先通过代理服务器进行身份验证,然后才能提供此请求_<!--rehype:tooltips-->
|
||||
- [408: Request Timeout](https://tools.ietf.org/html/rfc7231#section-6.5.7) _请求花费的时间比服务器准备等待的时间长_<!--rehype:tooltips-->
|
||||
|
@ -8,7 +8,7 @@ INI 备忘清单
|
||||
|
||||
### 介绍
|
||||
|
||||
INI 是一种固定标准格式的配置文件,INI配置方法来自 MS-DOS 操作系统
|
||||
INI 是一种固定标准格式的配置文件,INI 配置方法来自 MS-DOS 操作系统
|
||||
|
||||
```ini
|
||||
; 这里是注释
|
||||
@ -37,7 +37,7 @@ file="acme payroll.dat"
|
||||
name = value
|
||||
```
|
||||
|
||||
与下面👇 JSON 大致相同
|
||||
与下面👇 `JSON` 大致相同
|
||||
|
||||
```js
|
||||
{
|
||||
|
@ -74,7 +74,7 @@ IDEA Windows 和 Linux 键盘映射
|
||||
`Esc`| 转到编辑器
|
||||
`Shift` `Esc`| 隐藏活动或最后一个活动窗口
|
||||
`Ctrl` `Shift` `F4`| 关闭活动运行,消息...
|
||||
`Ctrl` `G`| 去线
|
||||
`Ctrl` `G`| 导航到行:列
|
||||
`Ctrl` `E`| 最近的文件弹出窗口
|
||||
`Ctrl` `Alt` `Left` _/_ `Right`| 向后/向前导航
|
||||
`Ctrl` `Shift` `Backspace`| 导航到上次编辑位置
|
||||
@ -192,4 +192,4 @@ IDEA Windows 和 Linux 键盘映射
|
||||
`Ctrl` `Alt` `Shift` `S` | 打开项目结构对话框
|
||||
`Ctrl` `Shift` `A` | 寻找行动
|
||||
`Ctrl` `Tab` | 在工具和选项卡之间切换
|
||||
<!--rehype:className=shortcuts-->
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
201
docs/java.md
@ -544,6 +544,154 @@ for (int i = 0; i < 5; i++) {
|
||||
// 输出: 0123
|
||||
```
|
||||
|
||||
Java 多线程
|
||||
--------------------
|
||||
|
||||
### 创建线程
|
||||
|
||||
```java
|
||||
// 实现Runnable接口
|
||||
public class RunnableThread implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
// todo something
|
||||
}
|
||||
}
|
||||
|
||||
// 实现Callable接口,T 替换成实际类型
|
||||
public class CallableTask implements Callable<T> {
|
||||
@Override
|
||||
public T call() throws Exception {
|
||||
// todo something
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 继承Thrad类
|
||||
public class ExtendsThread extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
// todo something
|
||||
}
|
||||
}
|
||||
|
||||
// 运行线程
|
||||
public static void main(String[] args) throws ExecutionException, InterruptedException {
|
||||
new Thread(new RunnableThread()).start();
|
||||
new ExtendsThread2().start();
|
||||
FutureTask<Integer> integerFutureTask = new FutureTask<>(new CallableTask());
|
||||
integerFutureTask.run();
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 线程池
|
||||
|
||||
```java
|
||||
/**
|
||||
* corePoolSize: 核心线程数
|
||||
* maximumPoolSize: 最大线程数
|
||||
* keepAliveTime: 线程空闲时间
|
||||
* timeUni: 线程空闲时间单位
|
||||
* workQueue: 线程等待队列
|
||||
* threadFactory: 线程创建工厂
|
||||
* handler: 拒绝策略
|
||||
*/
|
||||
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
|
||||
2, 5,
|
||||
5, TimeUnit.SECONDS,
|
||||
new ArrayBlockingQueue<>(10),
|
||||
new DefaultThreadFactory("pollName"),
|
||||
new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
|
||||
// 内置的线程池, 不推荐生产使用
|
||||
Executors.newCachedThreadPool();
|
||||
Executors.newFixedThreadPool(10);
|
||||
Executors.newScheduledThreadPool(10);
|
||||
Executors.newSingleThreadExecutor();
|
||||
```
|
||||
|
||||
### synchronized
|
||||
|
||||
<!--rehype:wrap-class=row-span-1-->
|
||||
|
||||
```java
|
||||
// 代码块
|
||||
synchronized(obj) {
|
||||
...
|
||||
}
|
||||
|
||||
// (静态)方法
|
||||
public synchronized (static) void methodName() {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### ThreadLocal
|
||||
|
||||
```java
|
||||
// 使用完之后一定要记得remove, 否则会内存泄露
|
||||
ThreadLocal<Integer> threadLocal = new ThreadLocal<>();
|
||||
threadLocal.set(1);
|
||||
threadLocal.get();
|
||||
threadLocal.remove();
|
||||
```
|
||||
|
||||
### 线程等待与唤醒
|
||||
|
||||
```java
|
||||
// 需要synchronized修饰的代码块才能使用
|
||||
wait();
|
||||
notify();
|
||||
notifyAll();
|
||||
|
||||
// 使用lock的条件唤醒
|
||||
ReentrantLock lock = new ReentrantLock();
|
||||
Condition condition= lock.newCondition();
|
||||
lock.lock();
|
||||
try{
|
||||
// 当前线程唤醒或等待
|
||||
condition.await();
|
||||
condition.signal();
|
||||
condition.signalAll();
|
||||
} finally {
|
||||
lock.unlock
|
||||
}
|
||||
|
||||
// LockSupport,可以先unpark,后续park不会阻塞线程
|
||||
LockSupport.park(obj);
|
||||
LockSupport.unpark(thread);
|
||||
```
|
||||
|
||||
### 线程编排
|
||||
|
||||
```java
|
||||
// CountDownLatch
|
||||
CountDownLatch countDownLatch = new CountDownLatch(2);
|
||||
new Thread(() -> {
|
||||
try {
|
||||
...
|
||||
}finally {
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
}).start();
|
||||
countDownLatch.await();
|
||||
|
||||
// CompletableFuture
|
||||
CompletableFuture<Void> task1 = CompletableFuture.runAsync(() -> {});
|
||||
CompletableFuture<Void> task2 = CompletableFuture.runAsync(() -> {});
|
||||
CompletableFuture<Void> task3 = CompletableFuture.runAsync(() -> {});
|
||||
CompletableFuture.allOf(task1, task2, task3).get();
|
||||
|
||||
// Semaphore
|
||||
Semaphore semaphore = new Semaphore(5);
|
||||
try {
|
||||
semaphore.acquire();
|
||||
} finally {
|
||||
semaphore.release();
|
||||
}
|
||||
```
|
||||
|
||||
Java 框架搜集
|
||||
--------------------
|
||||
|
||||
@ -595,6 +743,8 @@ nums.remove(0); // 非常慢
|
||||
for (Integer value : nums) {
|
||||
System.out.println(value);
|
||||
}
|
||||
// lambda 打印元素
|
||||
nums.forEach(e -> System.out.println(e.toString()));
|
||||
```
|
||||
|
||||
### HashMap
|
||||
@ -653,6 +803,7 @@ set.remove("cat");
|
||||
for (String element : set) {
|
||||
System.out.println(element);
|
||||
}
|
||||
set.forEach(e -> System.out.println(e.toString()));
|
||||
```
|
||||
|
||||
### ArrayDeque
|
||||
@ -839,7 +990,55 @@ method.invoke(classLoader, url);
|
||||
- `LocalTime` 表示没有时区的时间,只包含时分秒,不可变并且线程安全的,java8 及以上版本可用
|
||||
- `LocalDateTime` 表示没有时区的日期时间,同时包含年月日时分秒,不可变并且线程安全的,java8 及以上版本可用
|
||||
|
||||
### IO流
|
||||
|
||||
```java
|
||||
// 输入流转输出流
|
||||
byte[] inputContent = "test".getBytes();
|
||||
try (InputStream inputStream = new ByteArrayInputStream(inputContent);
|
||||
OutputStream outputStream = new ByteArrayOutputStream()) {
|
||||
byte[] buffer = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
outputStream.write(buffer, 0, len);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
```
|
||||
|
||||
### Collections 工具类
|
||||
|
||||
```java
|
||||
// 计算出现频率
|
||||
List<Integer> list = new ArrayList<>();
|
||||
list.add(1);
|
||||
list.add(2);
|
||||
list.add(2);
|
||||
list.add(3);
|
||||
list.add(3);
|
||||
list.add(3);
|
||||
int frequency = Collections.frequency(list, 2); // frequency = 2
|
||||
```
|
||||
|
||||
### Stream 流
|
||||
|
||||
```java
|
||||
// 统计词频
|
||||
List<Integer> list = new ArrayList<>();
|
||||
list.add(1);
|
||||
list.add(1);
|
||||
list.add(3);
|
||||
list.add(2);
|
||||
list.add(2);
|
||||
list.add(2);
|
||||
Map<Integer, Long> frequencyMap = list.stream().collect(Collectors.groupingBy(x -> x, Collectors.counting()));
|
||||
// 1: 2
|
||||
// 2: 3
|
||||
// 3: 1
|
||||
```
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
- [Java 官网](https://www.java.com/zh-CN/) _(java.com)_
|
||||
- [Java 官网](https://www.oracle.com/cn/java/) _(oracle.com/cn/java)_
|
||||
|
@ -88,7 +88,7 @@ console.log(single.length);
|
||||
|
||||
```javascript
|
||||
5 + 5 = 10 // 加法 Addition
|
||||
10 - 5 = 5 // 加法 Subtraction
|
||||
10 - 5 = 5 // 减法 Subtraction
|
||||
5 * 10 = 50 // 乘法 Multiplication
|
||||
10 / 5 = 2 // 除法 Division
|
||||
10 % 5 = 0 // 取模 Modulo
|
||||
@ -469,6 +469,15 @@ function sum(num1, num2) {
|
||||
sum(2, 4); // 6
|
||||
```
|
||||
|
||||
### 立即执行函数
|
||||
|
||||
```javascript
|
||||
//命名函数并立即执行一次
|
||||
(function sum(num1, num2) {
|
||||
return num1 + num2;
|
||||
})(2,4)//6
|
||||
```
|
||||
|
||||
### 函数表达式
|
||||
|
||||
```javascript
|
||||
|
@ -113,7 +113,7 @@ $("selector1, selector2 ...selectorn")
|
||||
- [[name!="value"]](https://api.jquery.com/attribute-not-equal-selector/) _选择不具有指定属性或具有指定属性但不具有特定值的元素_<!--rehype:tooltips-->
|
||||
- [[name^="value"]](https://api.jquery.com/attribute-starts-with-selector/) _选择具有指定属性且值恰好以给定字符串开头的元素_<!--rehype:tooltips-->
|
||||
- [[name]](https://api.jquery.com/has-attribute-selector/) _选择具有指定属性和任意值的元素_<!--rehype:tooltips-->
|
||||
- [[name="value"][name2="value2"]](https://api.jquery.com/multiple-attribute-selector/) _匹配匹配所有指定属性过滤器的元素_<!--rehype:tooltips-->
|
||||
- [[name="value"]](https://api.jquery.com/multiple-attribute-selector/) _匹配匹配所有指定属性过滤器的元素_<!--rehype:tooltips-->
|
||||
<!--rehype:className=cols-2 style-none-->
|
||||
|
||||
### 子过滤器
|
||||
|
283
docs/justfile.md
Normal file
@ -0,0 +1,283 @@
|
||||
Justfile 备忘清单
|
||||
===
|
||||
|
||||
[](https://github.com/casey/just/network/dependents)
|
||||
[](https://github.com/casey/just)
|
||||
|
||||
[`just`](https://github.com/casey/just) 为您提供一种保存和运行项目特有命令的便捷方式
|
||||
|
||||
入门
|
||||
----
|
||||
|
||||
### 简单的 justfile
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env just --justfile
|
||||
|
||||
# hello 是配方(recipe)的名字
|
||||
hello:
|
||||
echo "Hello World!"
|
||||
```
|
||||
|
||||
### 带参数的配方
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```bash
|
||||
filter PATTERN:
|
||||
echo {{PATTERN}}
|
||||
|
||||
# 带有默认值的 param
|
||||
email address='master@example.com':
|
||||
echo {{address}}
|
||||
|
||||
# 带表达式的参数
|
||||
test triple=(arch() + "-unknown-unknown"):
|
||||
./test {{triple}}
|
||||
|
||||
# 变量参数:“+”接受一个或多个值
|
||||
backup +FILES:
|
||||
scp {{FILES}} me@example.com
|
||||
|
||||
# 带*的可变参数:零个或多个值
|
||||
commit MESSAGE *FLAGS:
|
||||
git commit {{FLAGS}} -m "{{MESSAGE}}"
|
||||
```
|
||||
|
||||
### 变量和子变量
|
||||
|
||||
```bash
|
||||
version := "0.2.7"
|
||||
tardir := "awesomesauce-" + version
|
||||
tarball := tardir + ".tar.gz"
|
||||
|
||||
test:
|
||||
echo {{version}}
|
||||
|
||||
# 仅从命令行设置/覆盖变量
|
||||
$ just --set version 1.1.0
|
||||
```
|
||||
|
||||
### 默认配置
|
||||
|
||||
```bash
|
||||
default: lint build test
|
||||
# 显示帮助信息的默认配方
|
||||
default:
|
||||
@just --list
|
||||
# 如果没有默认配方,则默认第一个配方
|
||||
```
|
||||
|
||||
### 命令的环境变量
|
||||
|
||||
```bash
|
||||
export RUST_BACKTRACE := "1"
|
||||
|
||||
test:
|
||||
# 如果堆栈崩溃,将打印堆栈跟踪
|
||||
cargo test
|
||||
```
|
||||
|
||||
### backtick-从评估中捕获输出
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```bash
|
||||
JAVA_HOME := `jbang jdk home 11`
|
||||
# Backtick 代码块
|
||||
stuff := \```
|
||||
foo="hello"
|
||||
echo $foo "world"
|
||||
\```
|
||||
|
||||
done BRANCH=`git rev-parse --abbrev-ref HEAD`:
|
||||
git checkout master
|
||||
|
||||
sloc:
|
||||
@echo "`wc -l *.c` lines of code"
|
||||
|
||||
# Backtick 在任何地方工作:字符串/变量/参数
|
||||
```
|
||||
|
||||
注意: 上面示例中 <code>\\`</code> 没有转义过来
|
||||
|
||||
### 别名
|
||||
|
||||
```bash
|
||||
alias t := test
|
||||
alias c := check
|
||||
```
|
||||
|
||||
### 带有命令 env 变量配置
|
||||
|
||||
```bash
|
||||
# recipe 参数作为$符号的Env变量
|
||||
hello $name:
|
||||
echo $name
|
||||
```
|
||||
|
||||
### 设置
|
||||
|
||||
```bash
|
||||
set shell := ["zsh", "-cu"]
|
||||
|
||||
set dotenv-load := true
|
||||
serv:
|
||||
echo "$DATABASE_ADDRESS from .env"
|
||||
|
||||
set positional-arguments := true
|
||||
foo:
|
||||
echo $0
|
||||
echo $1
|
||||
```
|
||||
|
||||
### 配置依赖性-之前、之后和周围
|
||||
|
||||
```bash
|
||||
# 执行序列:A-> B-> C-> D
|
||||
b: a && c d
|
||||
# 执行配方(recipe)“A”
|
||||
b:
|
||||
echo 'B start!'
|
||||
just a
|
||||
echo 'B end!'
|
||||
# 通过表达式依赖参数
|
||||
default: (build "main")
|
||||
|
||||
build target:
|
||||
@echo 'Building {{target}}...'
|
||||
```
|
||||
|
||||
### Just 函数
|
||||
|
||||
```shell
|
||||
hello name:
|
||||
echo {{os()}}
|
||||
echo {{uppercase(name)}}
|
||||
|
||||
# 函数类别
|
||||
* 系统信息
|
||||
* 系统信息
|
||||
* Justfile 和 Justfile目录
|
||||
* 字符串操纵
|
||||
* 路径操纵
|
||||
|
||||
# String contact: (key + ":" + value)
|
||||
```
|
||||
|
||||
### 字符串-用双引号转义
|
||||
|
||||
```bash
|
||||
tring-with-tab := "\t"
|
||||
string-with-newline := "\n"
|
||||
escapes := '\t\n\r\"\\'
|
||||
|
||||
# 该字符串将评估为`foo\nbar\n`
|
||||
x := '''
|
||||
foo
|
||||
bar
|
||||
'''
|
||||
```
|
||||
|
||||
### 命令注释:quiet(@)、suppress(-)、invert(!)
|
||||
|
||||
```bash
|
||||
hello:
|
||||
@ echo "command will not be echoed"
|
||||
- echo "ignore none-zero exit status and continue"
|
||||
|
||||
@hello2:
|
||||
echo "command will not be echoed"
|
||||
|
||||
# 反转命令退出状态!- shell 功能
|
||||
hello3:
|
||||
# 如果命令成功(退出状态为0),请仅退出
|
||||
! git branch | grep '* master'
|
||||
```
|
||||
|
||||
### 条件表达式:if、loop 和 while
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```shell
|
||||
# 正则表达匹配
|
||||
fo := if "hi" =~ 'h.+' { "match" } else { "mismatch" }
|
||||
|
||||
test:
|
||||
if true; then echo 'True!'; fi
|
||||
for file in `ls .`; do echo $file; done
|
||||
while `server-is-dead`; do ping -c 1 server; done
|
||||
|
||||
foo bar:
|
||||
echo {{ if bar == "bar" { "hello" } else { "bye" } }}
|
||||
```
|
||||
|
||||
### Just 命令行
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```bash
|
||||
# 运行配方(recipe)
|
||||
$ just hello param1
|
||||
|
||||
# 按字母顺序列出配方(recipe)
|
||||
$ just --list
|
||||
$ just --summary
|
||||
|
||||
# 显示有关配方(recipe)的完整信息
|
||||
just --show test
|
||||
|
||||
# 选择以交互方式运行的配方(recipe)
|
||||
$ just --choose
|
||||
|
||||
# shell 完成
|
||||
just --completions zsh
|
||||
```
|
||||
|
||||
### 其他语言的配置
|
||||
|
||||
```bash
|
||||
bash-test:
|
||||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
hello='Yo'
|
||||
echo "$hello from bash!"
|
||||
```
|
||||
|
||||
### 私人配置 - 名称以开头 _
|
||||
|
||||
```bash
|
||||
test: _test-helper
|
||||
./bin/test
|
||||
|
||||
# ommited from 'just --list'
|
||||
_test-helper:
|
||||
./bin/super-secret-test-helper-stuff
|
||||
```
|
||||
|
||||
### 注意
|
||||
|
||||
```bash
|
||||
# 每个命令行都由一个新的 shell 执行
|
||||
# 如果一个命令行执行失败,just会退出
|
||||
# 后面的命令行不会执行
|
||||
change-working-dir:
|
||||
cd bar && pwd
|
||||
# 多行构造 - 用斜线转义换行符
|
||||
if true; then \
|
||||
echo 'True!'; \
|
||||
fi
|
||||
|
||||
# justfile 不区分大小写:Justfile、JUSTFILE 等
|
||||
# justfile 可以被隐藏:'.justfile'
|
||||
# 从子目录调用配方:`~/app1/target>$ just build`
|
||||
```
|
||||
|
||||
### 作为 shell 别名的配置
|
||||
|
||||
```bash
|
||||
for recipe in `just -f ~/.justfile --summary`; do
|
||||
alias $recipe="just -f ~/.justfile -d. $recipe"
|
||||
done
|
||||
```
|
||||
|
||||
### IDE 集成
|
||||
|
||||
- VS Code: <https://marketplace.visualstudio.com/items?itemName=skellock.just>
|
||||
- JetBrains: <https://plugins.jetbrains.com/plugin/18658-just>
|
@ -606,6 +606,75 @@ fun main() {
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 简单的高阶函数
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
```kotlin
|
||||
//注意啦,这里的num1AndNum2有个operation,它是接收了一个函数作为形参
|
||||
fun num1AndNum2(num1: Int, num2: Int, operation: (Int, Int) -> Int): Int {
|
||||
//让我们试着向operation传入参数
|
||||
return operation(num1, num2)
|
||||
}
|
||||
|
||||
fun plus(num1: Int, num2: Int): Int {
|
||||
return num1 + num2
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val total = num1AndNum2(100, 200, ::plus)
|
||||
println(total)//300
|
||||
//怎么样?我们利用传入一个函数来充当另一个函数的参数
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
还记得我们怎么在Java中用接口吗?
|
||||
|
||||
试着用函数参数简化它
|
||||
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 以匿名函数作为参数的函数
|
||||
|
||||
```kotlin
|
||||
//operation是一个函数类型的参数哦
|
||||
fun num1AndNum2(num1: Int, num2: Int, operation: (Int, Int) -> Int): Int {
|
||||
return operation(num1, num2)
|
||||
}
|
||||
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//这里我们定义一个匿名函数
|
||||
val operation: (Int, Int) -> Int = { i: Int, i2: Int ->
|
||||
i + i2
|
||||
}
|
||||
val total = num1AndNum2(100, 200, operation)
|
||||
println(total) //300
|
||||
}
|
||||
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### Lambda表达式方式传入函数参数
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```kotlin
|
||||
//我们还是不改变什么
|
||||
fun num1AndNum2(num1: Int, num2: Int, operation: (Int, Int) -> Int): Int {
|
||||
return operation(num1, num2)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//wow哦天哪,Lambda可以做到这样简洁
|
||||
val total = num1AndNum2(100, 200) { n1, n2 ->
|
||||
n1 + n2
|
||||
}
|
||||
println(total)
|
||||
}
|
||||
```
|
||||
|
||||
这里之所以可以把lambda写在外部,是因为operation是最后一个参数。
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
类
|
||||
---
|
||||
|
||||
|
@ -205,8 +205,9 @@ $ kubectl taint [node_name] [taint_name]
|
||||
### 标签
|
||||
|
||||
```bash
|
||||
$ kubectl label [node_name] disktype=ssd
|
||||
$ kubectl label [pod_name] env=prod
|
||||
$ kubectl label nodes <node-name> <label-key>=<label-value> #增加
|
||||
$ kubectl label nodes <node-name> <label-key>- #删除
|
||||
$ kubectl label nodes <node-name> <label-key>=<label-value> --overwrite #修改
|
||||
```
|
||||
|
||||
### 维护/可调度
|
||||
@ -308,6 +309,7 @@ $ kubectl run [pod_name] --image=busybox --rm -it --restart=Never -- sh
|
||||
```bash
|
||||
$ kubectl create deploy [deploy_name] --image=nginx --dry-run -o yaml > deploy.yaml
|
||||
$ kubectl get po [pod_name] -o yaml --export > pod.yaml
|
||||
$ kubectl run nginx --image=nginx:alpine --dry-run -o -yaml > deploy.yaml
|
||||
```
|
||||
|
||||
### 获取帮助
|
||||
|
263
docs/linux-command.md
Normal file
@ -0,0 +1,263 @@
|
||||
Linux 命令速查表
|
||||
===
|
||||
|
||||
这个快速参考备忘单提供了使用 Linux 常用命令的使用清单
|
||||
|
||||
命令速查表
|
||||
---
|
||||
|
||||
### 系统
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`uname`** | 显示 linux 系统信息
|
||||
**`uname -r`** | 显示内核版本信息
|
||||
**`cat /etc/os-release`** | 显示 linux 系统详细信息
|
||||
**`uptime`** | 显示系统运行的时间(包括平均负载)
|
||||
**`hostname`** | 显示系统主机名
|
||||
**`hostname -i`** | 显示系统的IP地址
|
||||
**`last reboot`** | 显示系统重新启动历史记录
|
||||
**`date`** | 显示当前系统日期和时间
|
||||
**`timedatectl`** | 查询和更改系统时钟
|
||||
**`cal`** | 显示当前日历的月份和日期
|
||||
**`w`** | 显示系统中当前登录的用户
|
||||
**`whoami`** | 显示您的登录身份
|
||||
**`finger username`** | 显示有关用户的信息
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 硬件
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`dmesg`** | 显示启动消息
|
||||
**`cat /proc/cpuinfo`** | <pur>**CPU**</pur>: 显示 CPU 的更多信息,例如型号、核心等
|
||||
**`cat /proc/meminfo`** | <pur>**内存**</pur>: 显示硬件内存的更多信息
|
||||
**`df -h`** | <pur>**磁盘空间**</pur>: 显示磁盘空间大小(单位`G`)
|
||||
**`hdparm -i /dev/xda`** | <pur>**磁盘**</pur>: 显示有关磁盘数据的信息
|
||||
**`lshw`** | 显示有关系统硬件配置的信息
|
||||
**`lsblk`** | 显示块设备相关信息
|
||||
**`free -m`** | 显示系统中空闲和使用的内存,`-m`(MB),`-g`(GB)
|
||||
**`lspci -tv`** | 在树状图中显示 PCI 设备
|
||||
**`lsusb -tv`** | 以树状图的形式显示 USB 设备
|
||||
**`dmidecode`** | 显示BIOS中的硬件信息
|
||||
**`hdparm -tT /dev/xda <:code>`** | 在设备xda上进行读速度测试
|
||||
**`badblocks -s /dev/xda`** | 测试磁盘上不可读的块
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 用户
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`id`** | 显示活动用户的详细信息,如uid、gid和组
|
||||
**`last`** | 显示系统中的最后一次登录
|
||||
**`who`** | 显示谁已登录到系统
|
||||
**`groupadd "admin"`** | 添加组"admin"
|
||||
**`adduser "Sam"`** | 添加用户 Sam
|
||||
**`userdel "Sam"`** | 删除用户 Sam
|
||||
**`usermod`** | 用于更改/修改用户信息
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 登陆
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`ssh user@host`** | 使用指定用户安全连接到主机
|
||||
**`ssh -p port_number user@host`** | 使用指定端口安全地连接到主机
|
||||
**`ssh host`** | 通过SSH默认端口22安全连接到系统
|
||||
**`telnet host`** | 通过telnet默认端口23连接到主机
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 文件
|
||||
<!--rehype:wrap-class=row-span-4-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`ls -al`** | 列出文件-包括常规文件和隐藏文件以及它们的权限
|
||||
**`pwd`** | 显示当前目录文件路径
|
||||
**`mkdir 'directory_name'`** | 创建一个新目录
|
||||
**`rm file_name`** | 删除一个文件
|
||||
**`rm -f filename`** | 强制删除文件
|
||||
**`rm -r directory_name`** | 递归地删除一个目录
|
||||
**`rm -rf directory_name`** | 强制并递归地删除一个目录
|
||||
**`cp file1 file2`** | 将file1的内容复制到file2
|
||||
**`cp -r dir1 dir2`** | 递归地将dir1复制到dir2。如果dir2不存在,则创建它
|
||||
**`mv file1 file2`** | 将file1重命名为file2
|
||||
**`ln -s /path/to/file_name link_name`** | 创建到file_name的软链接
|
||||
**`touch file_name`** | 创建一个新文件
|
||||
**`cat > file_name`** | 从键盘创建一个文件
|
||||
**`more file_name`** | 输出文件的内容
|
||||
**`head file_name`** | 显示文件的前10行
|
||||
**`tail file_name`** | 显示文件的最后10行
|
||||
**`gpg -c file_name`** | 加密一个文件
|
||||
**`gpg file_name.gpg`** | 解密文件
|
||||
**`wc`** | 打印文件中的字节、单词和行数
|
||||
**`xargs`** | 从标准输入执行命令
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 进程
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`ps`** | 显示当前活动的进程
|
||||
**`ps aux \| grep 'telnet'`** | 搜索进程'telnet'的id
|
||||
**`pmap`** | 显示进程的内存映射
|
||||
**`top`** | 显示所有正在运行的进程
|
||||
**`kill pid`** | 使用给定的pid终止进程
|
||||
**`killall proc`** | 杀死/终止所有名为proc的进程
|
||||
**`pkill process-name`** | 向具有其名称的进程发送信号
|
||||
**`bg`** | 将一个在后台暂停的命令,变成继续执行
|
||||
**`fg`** | 将后台中的命令调至前台继续运行
|
||||
**`fg n`** | job n to the foreground
|
||||
**`lsof`** | 列出进程打开的文件 [#](./lsof.md)
|
||||
**`renice 19 PID`** | 使进程以非常低的优先级运行
|
||||
**`pgrep firefox`** | 查找Firefox进程ID
|
||||
**`pstree`** | 在树模型中可视化过程
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 安装包
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`rpm -i pkg_name.rpm`** | 安装 rpm 包
|
||||
**`rpm -e pkg_name`** | 删除 rpm 包
|
||||
**`dnf install pkg_name`** | 使用 dnf 工具安装软件包
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 文件权限
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`chmod octal filename`** | 将文件权限更改为八进制
|
||||
**`chmod 777 /data/test.c`** | 将rwx权限设置为owner、group和everyone(其他可以访问服务器的人)
|
||||
**`chmod 755 /data/test.c`** | 将rwx设置为所有者,将r_x设置为组和所有人
|
||||
**`chmod 766 /data/test.c`** | 为所有者设置rwx,为组和每个人设置rw
|
||||
**`chown owner user-file`** | 更改文件的所有权
|
||||
**`chown owner-user:owner-group file_name`** | 更改文件的所有者和组所有者
|
||||
**`chown owner-user:owner-group directory`** | 更改目录的所有者和组所有者
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 安装源(编译)
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`./configure`** | 检查系统,以获得构建程序所需的软件。它将构建包含有效构建项目所需的指令的Makefile
|
||||
**`make`** |
|
||||
**`make install`** | 编译后,该命令将二进制文件安装在默认/修改的路径中
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 压缩/打包
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`tar -cf home.tar home<:code>`** | 创建名为"home"的存档文件。tar文件’home'
|
||||
**`tar -xf files.tar`** | 解压档案文件"files.tar"
|
||||
**`tar -zcvf home.tar.gz source-folder`** | 从源文件夹创建压缩的tar存档文件
|
||||
**`gzip file`** | 压缩扩展名为.gz的文件
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 搜索
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`grep ‘pattern’ files`** | 在文件中搜索给定的模式
|
||||
**`grep -r pattern dir`** | Search recursively for a pattern in a given directory
|
||||
**`locate file`** | 查找文件的所有实例
|
||||
**`find /home/ -name "index"`** | 在/home文件夹中查找以’index’开头的文件名
|
||||
**`find /home -size +10000k`** | 在主文件夹中查找大于10000k的文件
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 网络
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`ip addr show`** | 显示IP地址和所有网络接口
|
||||
**`ip address add 192.168.0.1/24 dev eth0`** | 将IP地址192.168.0.1分配给接口eth0
|
||||
**`ifconfig`** | 显示所有网络接口的IP地址
|
||||
**`ping host`** | ping命令发送ICMP回送请求以建立到服务器/PC的连接
|
||||
**`whois domain`** | 检索有关域名的更多信息
|
||||
**`dig domain`** | 检索关于域的DNS信息
|
||||
**`dig -x host`** | 对域执行反向查找
|
||||
**`host google.com`** | 执行域名的IP查找
|
||||
**`hostname -i`** | 显示本地IP地址
|
||||
**`wget file_name`** | 从在线资源下载文件
|
||||
**`netstat -pnltu`** | 显示所有活动监听端口
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 文件传输
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`scp file1.txt server2/tmp`** | 安全地将file1.txt复制到/tmp目录中的server2
|
||||
**`rsync -a /home/apps /backup/`** | 将/home/apps目录中的内容与/backup目录进行同步
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 磁盘使用情况
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`df -h`** | 显示安装系统上的空闲空间
|
||||
**`df -i`** | 显示文件系统上的空闲inode
|
||||
**`fdisk -l`** | 显示磁盘分区、大小和类型
|
||||
**`du -sh`** | 以人类可读的格式显示当前目录中的磁盘使用情况
|
||||
**`findmnt`** | 显示所有文件系统的目标挂载点
|
||||
**`mount device-path mount-point`** | 挂载设备
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 目录遍历
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**`cd ..`** | 在目录树结构中向上移动一层
|
||||
**`cd`** | 将目录更改为$HOME目录
|
||||
**`cd /test`** | 将目录更改为/test目录
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
快捷键
|
||||
---
|
||||
|
||||
### 命令行编辑
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**Tab** | 自动补全
|
||||
**Ctrl+A** | 移动光标到命令行首
|
||||
**Ctrl+E** | 移动光标到命令行尾
|
||||
**Ctrl+Left** | 光标左移一个单词
|
||||
**Ctrl+Right** | 光标右移一个单词
|
||||
**Ctrl+K** | 删除光标之后所有字符
|
||||
**Ctrl+U** | 清空当前键入的命令
|
||||
**Ctrl+W** | 删除光标前的单词
|
||||
**Ctrl+Y** | 粘贴`Ctrl+W`或`Ctrl+K`删除的内容
|
||||
**Ctrl+D** | 删除当前光标所在字符 (在没有字符时会关闭终端)
|
||||
Ctrl+B (Left) | 光标左移(后退)
|
||||
Ctrl+F (Right) | 光标右移(前进)
|
||||
Ctrl+H (Backspace) | 删除光标的前一个字符
|
||||
|
||||
### 其他
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
:--- | :---
|
||||
:--- | :---
|
||||
**Ctrl+L** | 清屏
|
||||
**Ctrl+C** | 中断正在执行的程序
|
||||
**Ctrl+R** | 按字符串寻找历史命令
|
||||
**Ctrl+Z** | 将当前进程放到后台(之后可以用`fg`命令重回到前台)
|
||||
**Shift+Insert** | 粘贴
|
||||
**Ctrl+PageUp** | 屏幕输出向上翻页
|
||||
**Ctrl+PageDown** | 屏幕输出向下翻页
|
||||
Ctrl+P (Up) | 上一条命令
|
||||
Ctrl+N (Down) | 下一条命令
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
- [Linux命令大全搜索工具](https://jaywcjlove.github.io/linux-command) _(jaywcjlove.github.io)_
|
||||
- [Linux命令大全(手册)](https://www.linuxcool.com/) _(linuxcool.com)_
|
||||
- [MAN手册 - 中文](https://manpages.debian.org/buster/manpages-zh/index.html) _(debian.org)_
|
||||
- [Linux 命令行速查表](https://www.cheat-sheet.cn/post/linux-command-line-cheat-sheet/) _(cheat-sheet.cn)_
|
@ -55,6 +55,7 @@ $ brew install mitmproxy # macOS
|
||||
```
|
||||
|
||||
### 代理模式
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
Argument | Effect
|
||||
:-- | --
|
||||
@ -64,6 +65,48 @@ Argument | Effect
|
||||
`-U UPSTREAM_PROXY`, `--upstream UPSTREAM_PROXY` | 将所有请求转发到上游代理服务器:`http://host[:port]`
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 复制到剪贴板
|
||||
|
||||
命令语法:
|
||||
|
||||
```
|
||||
:export.clip format flow
|
||||
```
|
||||
|
||||
例子:
|
||||
|
||||
| 描述 | 命令示例 |
|
||||
| ---|--- |
|
||||
| 1. 复制为 curl 命令 | `:export.clip curl @focus` |
|
||||
| 2. 复制为 httpie | `:export.clip httpie @focus` |
|
||||
| 3. 复制为原始文件 | `:export.clip raw @focus` |
|
||||
| 4. 复制为原始 HTTP 请求 | `:export.clip raw_request @focus` |
|
||||
| 5. 复制为原始 HTTP 响应 | `:export.clip raw_response @focus` |
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
将流程导出到系统剪贴板
|
||||
|
||||
### 保存到文件
|
||||
|
||||
命令语法:
|
||||
|
||||
```
|
||||
:export.file format flow path
|
||||
```
|
||||
|
||||
例子:
|
||||
|
||||
| 描述 | 命令示例 |
|
||||
| ---|--- |
|
||||
| 1. 导出到 `/tmp/a.curl` | `:export.file curl @focus /tmp/a.curl` |
|
||||
| 2. 导出到 `/tmp/a.httpie` | `:export.file httpie @focus /tmp/a.httpie` |
|
||||
| 3. 导出到 `/tmp/a.raw` | `:export.file raw @focus /tmp/a.raw` |
|
||||
| 4. 导出到 `/tmp/a.request` | `:export.file raw_request @focus /tmp/a.request` |
|
||||
| 5. 导出到 `/tmp/a.response` | `:export.file raw_response @focus /tmp/a.response` |
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
将流程导出到系统剪贴板
|
||||
|
||||
### 流(视图)
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
|
@ -30,7 +30,7 @@ db // 打印当前数据库
|
||||
use <database_name>
|
||||
```
|
||||
|
||||
### 显示收藏
|
||||
### 显示集合
|
||||
|
||||
```mongodb
|
||||
show collections
|
||||
@ -50,7 +50,7 @@ CRUD
|
||||
|
||||
```mongodb
|
||||
db.coll.insertOne({ name: "Max" })
|
||||
db.coll.insert([{ name: "Max"}, {name:"Alex"}]) // 订购批量插入
|
||||
db.coll.insert([{ name: "Max"}, {name:"Alex"}]) // 批量插入
|
||||
db.coll.insert([{ name: "Max"}, {name:"Alex"}], {ordered: false}) // 无序批量插入
|
||||
db.coll.insert({ date: ISODate()})
|
||||
db.coll.insert({ name: "Max"}, {"writeConcern": {"w": "majority", "wtimeout": 5000}})
|
||||
@ -70,7 +70,7 @@ Commands | Description
|
||||
|
||||
Operator | Description | Commands
|
||||
:-- | --- | ---
|
||||
`$gt` | 比...更棒 | `db.docx.find({class:{$gt:'T'}`
|
||||
`$gt` | 大于 | `db.docx.find({class:{$gt:'T'}`
|
||||
`$gte` | 大于等于 | `db.docx.find({class:{$gt:'T'}`
|
||||
`$lt` | 小于 | `db.docx.find({class:{$lt:'T'}`
|
||||
`$lte` | 小于等于 | `db.docx.find({class:{$lte:'T'}`
|
||||
|
@ -96,7 +96,8 @@ bootstrap()
|
||||
│ ├── app.controller.ts # 单个路由的基本控制器
|
||||
│ ├── app.service.ts # 具有单一方法的基本服务
|
||||
│ └── main.ts # 应用程序的入口文件
|
||||
│ # 它使用核心函数 NestFactory 来创建 Nest 应用程序的实例
|
||||
│ # 它使用核心函数 NestFactory
|
||||
│ # 来创建 Nest 应用程序的实例
|
||||
└── test # 测试目录
|
||||
├── app.e2e-spec.ts
|
||||
└── jest-e2e.json
|
||||
@ -115,7 +116,7 @@ $ npm run start
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
需要[注意]((https://docs.nestjs.com/first-steps#language))的一点是,`JavaScript`的版本是需要`Babel`的
|
||||
需要[注意](<https://docs.nestjs.com/first-steps#language>)的一点是,`JavaScript` 的版本是需要 `Babel` 的
|
||||
|
||||
另见
|
||||
---
|
||||
|
@ -201,7 +201,7 @@ export default Blog
|
||||
- Next.js 在后台触发页面的重新生成
|
||||
- 一旦页面生成成功,Next.js 将使缓存失效并显示更新后的页面。如果后台重新生成失败,旧页面仍将保持不变
|
||||
|
||||
### 使用 useeffect 客户端数据获取
|
||||
### 使用 useEffect 客户端数据获取
|
||||
|
||||
```jsx
|
||||
import { useState, useEffect } from 'react'
|
||||
@ -399,7 +399,7 @@ const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
sassOptions: {
|
||||
includePaths:
|
||||
includePaths:
|
||||
[path.join(__dirname, 'styles')],
|
||||
},
|
||||
}
|
||||
@ -1336,7 +1336,7 @@ NEXT_PUBLIC_ANALYTICS_ID=abcdefghijk
|
||||
// pages/index.js
|
||||
import setupAnalyticsService from '../lib/my-analytics-service'
|
||||
|
||||
//
|
||||
//
|
||||
// 它将在构建时转换为 `setupAnalyticsService('abcdefghijk')`
|
||||
setupAnalyticsService(process.env.NEXT_PUBLIC_ANALYTICS_ID)
|
||||
|
||||
@ -1528,11 +1528,11 @@ export default function Home() {
|
||||
|
||||
```js
|
||||
// GET `/post` (empty object)
|
||||
{ }
|
||||
{ }
|
||||
// `GET /post/a` (single-element array)
|
||||
{ "slug": ["a"] }
|
||||
{ "slug": ["a"] }
|
||||
// `GET /post/a/b` (multi-element array)
|
||||
{ "slug": ["a", "b"] }
|
||||
{ "slug": ["a", "b"] }
|
||||
```
|
||||
|
||||
### 事件执行调整页面
|
||||
|
@ -275,10 +275,10 @@ server {
|
||||
listen 80;
|
||||
server_name example.com;
|
||||
root /path/to/website;
|
||||
# root /www/data/ 示例,如果里面没有'root',它将寻找 /www/data/index.html
|
||||
# root /path/to/website/ 示例,如果里面没有'root',它将寻找 /path/to/website/index.html
|
||||
location / {
|
||||
}
|
||||
location /images/ { # 如果里面没有“root”,它将寻找 /www/data/images/index.html
|
||||
location /images/ { # 如果里面没有“root”,它将寻找 /path/to/website/images/index.html
|
||||
}
|
||||
location /videos/ { # 由于里面有“root”,它会寻找 /www/media/videos/index.html
|
||||
root /www/media;
|
||||
@ -510,7 +510,7 @@ upstream example {
|
||||
server 127.0.0.1:82 weight=3;
|
||||
server 127.0.0.1:83 weight=3 down;
|
||||
server 127.0.0.1:84 weight=3; max_fails=3 fail_timeout=20s;
|
||||
server 127.0.0.1:85 weight=4;;
|
||||
server 127.0.0.1:85 weight=4;
|
||||
keepalive 32;
|
||||
}
|
||||
server {
|
||||
|
313
docs/pacman.md
Normal file
@ -0,0 +1,313 @@
|
||||
Pacman 备忘清单
|
||||
===
|
||||
|
||||
这个是 Arch Linux 软件包管理器 Pacman 快速参考备忘单显示了它的常用命令使用清单。
|
||||
|
||||
PACMAN 清单查询
|
||||
---
|
||||
|
||||
### 介绍
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
Pacman 是 Arch Linux 软件包管理器。帮助您在 Arch Linux 上使用 Pacman 软件包管理器进行软件包的安装、升级、搜索和删除等操作
|
||||
|
||||
---
|
||||
|
||||
命令语法格式
|
||||
|
||||
```bash
|
||||
$ pacman [ OPTIONS ] COMMAND
|
||||
```
|
||||
|
||||
同步非本地(local)软件仓库并升级系统的软件包
|
||||
|
||||
```bash
|
||||
$ pacman -Syu
|
||||
```
|
||||
|
||||
子命令描述和任务,显示 apt 命令和选项。
|
||||
|
||||
```bash
|
||||
$ pacman -h or --help
|
||||
# 或
|
||||
$ pacman
|
||||
```
|
||||
|
||||
查看指令用法
|
||||
|
||||
```bash
|
||||
$ man pacman
|
||||
```
|
||||
|
||||
请注意,使用 Pacman 命令时,需要管理员权限 `sudo`
|
||||
|
||||
---
|
||||
|
||||
相关参考文献
|
||||
|
||||
- [Archlinux Wiki 官方文档](https://wiki.archlinuxcn.org/wiki/Pacman)
|
||||
|
||||
### 示例
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
Option | Function
|
||||
:-- | --
|
||||
`pacman -D, --database` | 操作软件包数据库
|
||||
`pacman -Q, --query` | 从数据库中查询软件包
|
||||
`pacman -R, --remove` | 从系统中移除软件包
|
||||
`pacman -S, --sync` | 同步软件包
|
||||
`pacman -T, --deptest` | 检查依赖关系
|
||||
`pacman -U, --upgrade` | 将包升级或添加到系统,并从同步存储库安装所需的依赖项。
|
||||
`pacman -F, --files` | 查询文件数据库。
|
||||
`pacman -V, --version` | 显示版本
|
||||
`pacman -h, --help` | 显示帮助信息
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
升级所有已安装的软件包
|
||||
|
||||
```bash
|
||||
$ sudo pacman -Syu
|
||||
```
|
||||
|
||||
### 安装
|
||||
|
||||
要安装单个或者一系列软件包(包含软件包的依赖)
|
||||
|
||||
```bash
|
||||
$ pacman -S 包名_1 包名_2 ...
|
||||
```
|
||||
|
||||
要通过正则表达式安装一系列软件包
|
||||
|
||||
```bash
|
||||
$ pacman -S $(pacman -Ssq 包正则表达式)
|
||||
```
|
||||
|
||||
有时软件包有多个版本,放在不同的仓库内(例如 extra 和 testing)
|
||||
|
||||
```bash
|
||||
$ pacman -S extra/包名
|
||||
```
|
||||
|
||||
要安装多个含有相似名称的软件包,可以使用花括号扩展
|
||||
|
||||
```bash
|
||||
$ pacman -S plasma-{desktop,mediacenter,nm}
|
||||
```
|
||||
|
||||
可以多层扩展到需要的层次:
|
||||
|
||||
```bash
|
||||
$ pacman -S plasma-{workspace{,-wallpapers},pa}
|
||||
```
|
||||
|
||||
### 安装包组
|
||||
|
||||
一些包属于一个可以同时安装的软件包组
|
||||
|
||||
```bash
|
||||
$ pacman -S gnome
|
||||
```
|
||||
|
||||
想要查看哪些包属于 gnome 组
|
||||
|
||||
```bash
|
||||
$ pacman -Sg gnome
|
||||
```
|
||||
|
||||
### 查询包数据库
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
pacman 使用 -Q 参数查询本地软件包数据库, -S 查询同步数据库,以及 -F查询文件数据库
|
||||
|
||||
pacman 可以在包数据库中查询软件包,查询位置包含了软件包的名字和描述
|
||||
|
||||
```bash
|
||||
$ pacman -Ss string1 string2 ...
|
||||
```
|
||||
|
||||
使用正则
|
||||
|
||||
```bash
|
||||
$ pacman -Ss '^vim-'
|
||||
```
|
||||
|
||||
要查询已安装的软件包:
|
||||
|
||||
```bash
|
||||
$ pacman -Qs string1 string2 ...
|
||||
```
|
||||
|
||||
按文件名查找软件库:
|
||||
|
||||
```bash
|
||||
$ pacman -F string1 string2 ...
|
||||
```
|
||||
|
||||
显示软件包的详尽的信息:
|
||||
|
||||
```bash
|
||||
$ pacman -Si package_name
|
||||
```
|
||||
|
||||
查询本地安装包的详细信息:
|
||||
|
||||
```bash
|
||||
$ pacman -Qi package_name
|
||||
```
|
||||
|
||||
同时显示备份文件和修改状态:
|
||||
|
||||
```bash
|
||||
$ pacman -Qii package_name
|
||||
```
|
||||
|
||||
要获取已安装软件包所包含文件的列表:
|
||||
|
||||
```bash
|
||||
$ pacman -Ql package_name
|
||||
```
|
||||
|
||||
查询远程库中软件包包含的文件:
|
||||
|
||||
```bash
|
||||
$ pacman -Fl package_name
|
||||
```
|
||||
|
||||
查软件包安装的文件是否都存在:
|
||||
|
||||
```bash
|
||||
$ pacman -Qk package_name
|
||||
```
|
||||
|
||||
查询数据库获取某个文件属于哪个软件包
|
||||
|
||||
```bash
|
||||
$ pacman -Qo /path/to/file_name
|
||||
```
|
||||
|
||||
查询文件属于远程数据库中的哪个软件包:
|
||||
|
||||
```bash
|
||||
$ pacman -F /path/to/file_name
|
||||
```
|
||||
|
||||
查询所有不再作为依赖的软件包(孤立orphans):
|
||||
|
||||
```bash
|
||||
$ pacman -Qdt
|
||||
```
|
||||
|
||||
查询所有明确安装而且不被其它包依赖的软件包:
|
||||
|
||||
```bash
|
||||
$ pacman -Qet
|
||||
```
|
||||
|
||||
### 清理软件包缓存
|
||||
|
||||
pacman 将下载的软件包保存在 /var/cache/pacman/pkg/ 并且不会自动移除旧的和未安装版本的软件包
|
||||
|
||||
要删除目前没有安装的所有缓存的包,和没有被使用的同步数据库
|
||||
|
||||
```bash
|
||||
$ pacman -Sc
|
||||
```
|
||||
|
||||
要删除缓存中的全部文件
|
||||
|
||||
```bash
|
||||
$ pacman -Scc
|
||||
```
|
||||
|
||||
#### Pactree
|
||||
|
||||
> 注意: pactree 不再是pacman包的一部分。它现在在pacman-contrib包中。
|
||||
|
||||
要显示软件包的依赖树:
|
||||
|
||||
```bash
|
||||
$ pactree package_name
|
||||
```
|
||||
|
||||
### 删除软件包
|
||||
|
||||
删除单个软件包,保留其全部已经安装的依赖关系
|
||||
|
||||
```bash
|
||||
$ pacman -R package_name
|
||||
```
|
||||
|
||||
删除指定软件包,及其所有没有被其他已安装软件包使用的依赖关系:
|
||||
|
||||
```bash
|
||||
# ⚠️删除类似 gnome 这样的软件包组时,将会忽略组中软件包的安装原因,因为实际操作上执行的是逐一删除软件组的每一个软件,依赖软件包的安装原因不会被忽略。
|
||||
$ pacman -Rs package_name
|
||||
```
|
||||
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
要删除软件包和所有依赖这个软件包的程序:
|
||||
|
||||
```bash
|
||||
# ⚠️此操作是递归的,请小心检查,可能会一次删除大量的软件包。
|
||||
$ pacman -Rsc package_name
|
||||
```
|
||||
|
||||
要删除一个被其他软件包依赖的软件包,但是不删除依赖这个软件包的其他软件包
|
||||
|
||||
```bash
|
||||
# ⚠️ 此操作有破坏系统的能力,应该尽量避免使用
|
||||
$ pacman -Rdd package_name
|
||||
```
|
||||
|
||||
### 查询一个包含具体文件的包名
|
||||
|
||||
同步文件数据库:
|
||||
|
||||
```bash
|
||||
$ pacman -Fy
|
||||
```
|
||||
|
||||
查询包含某个文件的包名,比如:
|
||||
|
||||
```bash
|
||||
$ pacman -F pacman
|
||||
core/pacman 5.0.1-4
|
||||
usr/bin/pacman
|
||||
usr/share/bash-completion/completions/pacman
|
||||
extra/xscreensaver 5.36-1
|
||||
usr/lib/xscreensaver/pacman
|
||||
```
|
||||
|
||||
### 其它命令
|
||||
|
||||
升级系统时安装其他软件包:
|
||||
|
||||
```bash
|
||||
$ pacman -Syu package_name1 package_name2 ...
|
||||
```
|
||||
|
||||
下载包而不安装它:
|
||||
|
||||
```bash
|
||||
$ pacman -Sw package_name
|
||||
```
|
||||
|
||||
安装一个本地包(不从源里下载)
|
||||
|
||||
```bash
|
||||
$ pacman -U /path/to/package/package_name-version.pkg.tar.zst
|
||||
```
|
||||
|
||||
要将本地包保存至缓存
|
||||
|
||||
```bash
|
||||
$ pacman -U file:///path/to/package/package_name-version.pkg.tar.zst
|
||||
```
|
||||
|
||||
安装一个远程包(不在 pacman 配置的源里面):
|
||||
|
||||
```bash
|
||||
$ pacman -U http://www.example.com/repo/example.pkg.tar.zst
|
||||
```
|
@ -969,4 +969,4 @@ echo 'CURRENT_DATE is: ' . CURRENT_DATE;
|
||||
----
|
||||
|
||||
- [PHP 官方中文文档](https://www.php.net/manual/zh/index.php) _(php.net)_
|
||||
- [Learn X in Y minutes](https://learnxinyminutes.com/docs/php/) _(learnxinyminutes.com)_
|
||||
- [Learn X in Y minutes](https://learnxinyminutes.com/docs/zh-cn/php-cn/) _(learnxinyminutes.com)_
|
||||
|
@ -623,6 +623,31 @@ $ sudo systemctl restart postgresql
|
||||
|
||||
另见:[复制](https://www.postgresql.org/docs/current/sql-copy.html)
|
||||
|
||||
### 跨版本升级
|
||||
|
||||
pg_upgrade 跨版本升级
|
||||
|
||||
```shell
|
||||
$ /usr/lib/postgresql/16/bin/pg_upgrade \
|
||||
-b /usr/lib/postgresql/15/bin \
|
||||
-B /usr/lib/postgresql/16/bin \
|
||||
-d /var/lib/postgresql/15/main \
|
||||
-D /var/lib/postgresql/16/main \
|
||||
-o " -c config_file=/etc/postgresql/15/main/postgresql.conf" \
|
||||
-O " -c config_file=/etc/postgresql/16/main/postgresql.conf"
|
||||
```
|
||||
|
||||
- `-b` 旧版本二进制文件目录
|
||||
- `-B` 新版本二进制文件目录
|
||||
- `-d` 旧版本数据目录
|
||||
- `-D` 新版本数据目录
|
||||
- `-o` 旧版本主配置文件
|
||||
- `-O` 新版本主配置文件
|
||||
- `-c` 仅`check`,不执行升级,可先加`-c`检查是否有报错,没有报错再运行升级
|
||||
<!--rehype:className=style-none-->
|
||||
|
||||
使用 `pg_upgrade -?` 获取完整的选项列表
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
|
933
docs/python.md
@ -91,7 +91,7 @@ npm run start # 监听 md 文件编译输出 HTML
|
||||
### 首页提示配置
|
||||
|
||||
```markdown
|
||||
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
|
||||
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
@ -104,13 +104,13 @@ class=tag&data-info=👆看看还缺点儿什么?
|
||||
上面示例将默认提示更改为: `👆看看还缺点儿什么?`
|
||||
|
||||
```markdown
|
||||
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=tag&data-lang=Python-->
|
||||
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=tag&data-lang=Python-->
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
添加 `class=tag&data-lang=Python` 类名和参数,会在卡片右上角标记 _`Python`_
|
||||
|
||||
### Command Help
|
||||
### 命令帮助
|
||||
|
||||
```bash
|
||||
Usage: refs-cli [output-dir] [--help|h]
|
||||
@ -135,14 +135,16 @@ Example:
|
||||
refs-cli@v0.0.1
|
||||
```
|
||||
|
||||
### Config
|
||||
### 配置 Config
|
||||
|
||||
将 `.refsrc.json` 存放在项目的根目录下
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "文档网站名称",
|
||||
"description": "{{description}} 网站说明",
|
||||
"keywords": "关键字,refs-cli,refs,cli",
|
||||
"data-info": "👆需要你的参与",
|
||||
"data-info": "👆 需要你的参与",
|
||||
"search": {
|
||||
"label": "搜索",
|
||||
"placeholder": "搜索备忘清单",
|
||||
@ -163,7 +165,55 @@ refs-cli@v0.0.1
|
||||
}
|
||||
```
|
||||
|
||||
将 `.refsrc.json` 存放在项目的根目录下
|
||||
支持 [JSON](https://www.json.org), [JSONC](https://github.com/microsoft/node-jsonc-parser), [JSON5](https://json5.org/), [YAML](https://yaml.org/), [TOML](https://toml.io), [INI](https://en.wikipedia.org/wiki/INI_file), [CJS](http://www.commonjs.org), [Typescript](https://www.typescriptlang.org/), 和 ESM 配置加载。
|
||||
|
||||
### `TOML` 配置示例
|
||||
|
||||
将 `.refsrc.toml` 存放在项目的根目录下
|
||||
|
||||
```toml
|
||||
title = "Refs CLI 文档网站名称"
|
||||
description = "{{description}}. 网站说明"
|
||||
keywords = "关键字,reference,refs-cli,cli"
|
||||
data-info = "👆 需要你的参与"
|
||||
|
||||
[search]
|
||||
label = "搜索"
|
||||
placeholder = "搜索备忘清单"
|
||||
cancel = "取消"
|
||||
|
||||
[editor]
|
||||
label = "编辑"
|
||||
|
||||
[github]
|
||||
url = "<github url>"
|
||||
|
||||
[home]
|
||||
label = "首页"
|
||||
url = "https://<你的网站>"
|
||||
|
||||
footer = "<br />备案号:支持HTML字符串"
|
||||
license = "支持 HTML 字符串"
|
||||
```
|
||||
|
||||
### 支持更多配置加载
|
||||
|
||||
```bash
|
||||
.refsrc .refsrc.json
|
||||
.refsrc.json5 .refsrc.jsonc
|
||||
.refsrc.yaml .refsrc.yml
|
||||
.refsrc.toml .refsrc.ini
|
||||
.refsrc.js .refsrc.ts
|
||||
.refsrc.cjs .refsrc.mjs
|
||||
.config/refsrc .config/refsrc.json
|
||||
.config/refsrc.json5 .config/refsrc.jsonc
|
||||
.config/refsrc.yaml .config/refsrc.yml
|
||||
.config/refsrc.toml .config/refsrc.ini
|
||||
.config/refsrc.js .config/refsrc.ts
|
||||
.config/refsrc.cjs .config/refsrc.mjs
|
||||
refs.config.js refs.config.ts
|
||||
refs.config.cjs refs.config.mjs
|
||||
```
|
||||
|
||||
### 环境变量
|
||||
|
||||
@ -373,7 +423,7 @@ const school = <div>学校</div>;
|
||||
:- | -
|
||||
:- | -
|
||||
`<yel>` | <yel>黄色</yel>
|
||||
`<red>` | <yel>红色</yel>
|
||||
`<red>` | <red>红色</red>
|
||||
`<pur>` | <pur>紫色</pur>
|
||||
`<code>` 或 <code>\`\`</code> | <code>绿</code>`色`
|
||||
`<del>` 或 `~~删除~~` | <del>~~红色~~</del>
|
||||
@ -1038,4 +1088,4 @@ H3 部分 - 占位效果展示
|
||||
注释配置:
|
||||
`<!--rehype:wrap-style=background: #1b5064;-->`
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
@ -297,7 +297,7 @@ RegEX 备忘清单
|
||||
|
||||
范例 | 说明
|
||||
:-|-
|
||||
`colou?r` | 匹配 <yel>color</yel> 或 <yel>color</yel>
|
||||
`colou?r` | 匹配 <yel>color</yel> 或 <yel>colour</yel>
|
||||
`[BW]ill[ieamy's]*` | 匹配 <yel>Bill</yel>、<yel>Willy</yel>、<yel>William's</yel> 等。
|
||||
`[a-zA-Z]+` | 匹配 1 个或多个字母
|
||||
`\d{3}-\d{2}-\d{4}` | 匹配 SSN
|
||||
@ -615,7 +615,7 @@ M(?(?=.*?\bher\b)s|r)\.
|
||||
|
||||
表达式 | 匹配示例
|
||||
:- | -
|
||||
`The` | The `fat` cat sat on the mat.
|
||||
`The` | `The` fat cat sat on the mat.
|
||||
`/The/gi` | `The` fat cat sat on `the` mat.
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
|
@ -83,6 +83,12 @@ gem 'rspec', :require => 'spec'
|
||||
$ bundle install
|
||||
```
|
||||
|
||||
解决开发用 mac,生产用 linux 出现的 Gemfile.lock 不一致问题
|
||||
|
||||
```bash
|
||||
bundle lock --add-platform x86_64-linux
|
||||
```
|
||||
|
||||
### 安装特定 ruby gem 的特定版本
|
||||
|
||||
```bash
|
||||
|
@ -180,7 +180,7 @@ let p = Point { x: 10, y: 11 };
|
||||
let px: i32 = p.x;
|
||||
```
|
||||
|
||||
#### 元祖结构体
|
||||
#### 元组结构体
|
||||
|
||||
```rust
|
||||
struct Color (i32, i32, i32);
|
||||
|
356
docs/scala.md
Normal file
@ -0,0 +1,356 @@
|
||||
Scala
|
||||
===
|
||||
|
||||
[](https://github.com/scala/scala/network/dependents)
|
||||
[](https://github.com/scala/scala)
|
||||
|
||||
本速查表可以用于快速地查找 [Scala](https://github.com/scala/scala) 语法结构
|
||||
<!--rehype:style=padding-top: 12px;-->
|
||||
|
||||
入门
|
||||
-----
|
||||
|
||||
### 介绍
|
||||
|
||||
- [Scala](https://github.com/scala/scala) 官网 _(github.com)_
|
||||
|
||||
### 函数
|
||||
<!--rehype:wrap-class=col-span-2 row-span-4-->
|
||||
|
||||
```scala
|
||||
def f(x: Int) = { x*x } // ✅ GOOD
|
||||
def f(x: Int) { x*x } // ❌ BAD 定义函数,潜在风险:
|
||||
// 不加“=”号将会是一段返回Unit类型的过程,
|
||||
// 这将会导致意想不到的错误。
|
||||
|
||||
def f(x: Any) = println(x) // ✅ GOOD
|
||||
def f(x) = println(x) // ❌ BAD 定义函数 语法错误: 每个参数都需要指定类型。
|
||||
|
||||
type R = Double // 类型别名
|
||||
def f(x: R) vs.
|
||||
def f(x: => R) // 传值调用 传名调用 (惰性参数)
|
||||
(x:R) => x*x // 匿名函数
|
||||
(1 to 5).map(_*2) vs. // 匿名函数: 下划线是参数的占位符
|
||||
(1 to 5).reduceLeft( _+_ )
|
||||
(1 to 5).map( x => x*x ) // 匿名函数: 必须命名以后才可以多次使用同一个参数
|
||||
|
||||
(1 to 5).map(2*) // ✅ GOOD
|
||||
(1 to 5).map(*2) // ❌ BAD 匿名函数: 绑定中缀方法,明智的做法是2*_。
|
||||
|
||||
|
||||
(1 to 5).map { x => val y=x*2; println(y); y } // 匿名函数: 代码块风格,最后一个表达式作为返回值
|
||||
(1 to 5) filter {_%2 == 0} map {_*2} // 匿名函数: 管道风格(或者用圆括号)
|
||||
|
||||
// 匿名函数: 要传入多个代码块的话,需要使用花括号。
|
||||
def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))
|
||||
val f = compose({_*2}, {_-1})
|
||||
|
||||
val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd // 柯里化, 显然的语法。
|
||||
def zscore(mean:R, sd:R) = (x:R) => (x-mean)/sd // 柯里化, 显然的语法。
|
||||
def zscore(mean:R, sd:R)(x:R) = (x-mean)/sd // 柯里化,语法糖。然后:)
|
||||
|
||||
val normer = zscore(7, 0.4) _ // 需要在尾部加下划线来变成偏函数(只对语法糖版本适用)
|
||||
def mapmake[T](g:T=>T)(seq: List[T]) = seq.map(g) // 泛型
|
||||
|
||||
5.+(3); 5 + 3
|
||||
(1 to 5) map (_*2) // 中缀语法糖
|
||||
def sum(args: Int*) = args.reduceLeft(_+_) // 变长参数
|
||||
```
|
||||
|
||||
### 变量
|
||||
|
||||
```scala
|
||||
var x = 5 // 可变变量
|
||||
val x = 5 // ✅ GOOD
|
||||
x=6 // ❌ BAD 常量
|
||||
var x: Double = 5 // 显式类型
|
||||
```
|
||||
|
||||
### 包
|
||||
|
||||
```scala
|
||||
import scala.collection._ // 通配符导入
|
||||
import scala.collection.Vector
|
||||
// 选择性导入
|
||||
import scala.collection.{Vector, Sequence}
|
||||
// 重命名导入
|
||||
import scala.collection.{Vector => Vec28}
|
||||
// 导入java.util包里除Date之外的一切
|
||||
import java.util.{Date => _, _}
|
||||
// 文件开头的包名 pkg
|
||||
package pkg { ... } // 声明这是一个包
|
||||
```
|
||||
|
||||
### 数据结构
|
||||
|
||||
```scala
|
||||
(1,2,3) // 元组字面量 (Tuple3)
|
||||
// 解构绑定:通过模式匹配来解构元组。
|
||||
var (x,y,z) = (1,2,3)
|
||||
// ❌ BAD 潜在风险:整个元组被赋值给了每一个变量
|
||||
var x,y,z = (1,2,3)
|
||||
// 列表 (不可变)
|
||||
var xs = List(1,2,3)
|
||||
xs(2) // 用括号索引 (slides)
|
||||
1 :: List(2,3) // Cons(构成)
|
||||
1 to 5 /* 等价于 => */ 1 until 6
|
||||
// Range类型(语法糖)
|
||||
1 to 10 by 2
|
||||
// Unit类型的唯一成员 (相当于 C/Java 里的void)
|
||||
() (空括号)
|
||||
```
|
||||
|
||||
控制结构
|
||||
---
|
||||
|
||||
### 条件
|
||||
|
||||
```scala
|
||||
if (check) happy else sad
|
||||
```
|
||||
|
||||
### 条件(语法糖)
|
||||
|
||||
```scala
|
||||
if (check) happy same as
|
||||
if (check) happy else ()
|
||||
```
|
||||
|
||||
### while 循环
|
||||
|
||||
```scala
|
||||
while (x < 5) { println(x); x += 1}
|
||||
```
|
||||
|
||||
### do while 循环
|
||||
|
||||
```scala
|
||||
do { println(x); x += 1} while (x < 5)
|
||||
```
|
||||
|
||||
### break. (slides)
|
||||
|
||||
```scala
|
||||
import scala.util.control.Breaks._
|
||||
breakable {
|
||||
for (x <- xs) {
|
||||
if (Math.random < 0.1) break
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### for 表达式: filter/map
|
||||
|
||||
```scala
|
||||
for (x <- xs if x%2 == 0) yield x*10
|
||||
// 等价于
|
||||
xs.filter(_%2 == 0).map(_*10)
|
||||
```
|
||||
|
||||
### for 表达式: 解构绑定
|
||||
|
||||
```scala
|
||||
for ((x,y) <- xs zip ys) yield x*y
|
||||
// 等价于
|
||||
(xs zip ys) map { case (x,y) => x*y }
|
||||
```
|
||||
|
||||
### for 表达式: 叉乘
|
||||
|
||||
```scala
|
||||
for (x <- xs; y <- ys) yield x*y
|
||||
// 等价于
|
||||
xs flatMap {x => ys map {y => x*y}}
|
||||
```
|
||||
|
||||
### for 表达式: 不可避免的格式
|
||||
|
||||
```scala
|
||||
for (x <- xs; y <- ys) {
|
||||
println("%d/%d = %.1f".format(x, y, x/y.toFloat))
|
||||
}
|
||||
```
|
||||
|
||||
### for 表达式: 包括上边界的遍历
|
||||
|
||||
```scala
|
||||
for (i <- 1 to 5) {
|
||||
println(i)
|
||||
}
|
||||
```
|
||||
|
||||
### for 表达式: 忽略上边界的遍历
|
||||
|
||||
```scala
|
||||
for (i <- 1 until 5) {
|
||||
println(i)
|
||||
}
|
||||
```
|
||||
|
||||
模式匹配
|
||||
---
|
||||
|
||||
### 在函数的参数中使用模式匹配
|
||||
|
||||
```scala
|
||||
// ✅ GOOD
|
||||
(xs zip ys) map { case (x,y) => x*y }
|
||||
// ❌ BAD
|
||||
(xs zip ys) map( (x,y) => x*y )
|
||||
```
|
||||
|
||||
### 可以匹配任何Int类型值的名称
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```scala
|
||||
val v42 = 42
|
||||
Some(3) match {
|
||||
case Some(v42) => println("42")
|
||||
case _ => println("Not 42")
|
||||
}
|
||||
```
|
||||
|
||||
❌ BAD: “v42” 被解释为可以匹配任何Int类型值的名称,打印输出”42”
|
||||
|
||||
```scala
|
||||
val v42 = 42
|
||||
Some(3) match {
|
||||
case Some(`v42`) => println("42")
|
||||
case _ => println("Not 42")
|
||||
}
|
||||
```
|
||||
|
||||
✅ GOOD: 有反引号的 “`v42`” 被解释为已经存在的 `val v42`,所以输出的是 “Not 42”.
|
||||
|
||||
```scala
|
||||
val UppercaseVal = 42
|
||||
Some(3) match {
|
||||
case Some(UppercaseVal) => println("42")
|
||||
case _ => println("Not 42")
|
||||
}
|
||||
```
|
||||
|
||||
✅ GOOD: UppercaseVal 被视作已经存在的 val,而不是一个新的模式变量,因为它是以大写字母开头的,所以 `UppercaseVal` 所包含的值(42)和检查的值(3)不匹配,输出”Not 42”
|
||||
|
||||
面向对象
|
||||
----
|
||||
|
||||
### 构造器参数 - 私有
|
||||
|
||||
```scala
|
||||
class C(x: R) same as
|
||||
class C(private val x: R)
|
||||
var c = new C(4)
|
||||
```
|
||||
|
||||
### 构造器参数 - 公有
|
||||
|
||||
```scala
|
||||
class C(val x: R)
|
||||
var c = new C(4)
|
||||
c.x
|
||||
```
|
||||
|
||||
### 构造函数就是类的主体
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```scala
|
||||
class C(var x: R) {
|
||||
assert(x > 0, "positive please")
|
||||
var y = x
|
||||
val readonly = 5
|
||||
private var secret = 1
|
||||
def this = this(42)
|
||||
}
|
||||
```
|
||||
|
||||
### 匿名类
|
||||
|
||||
```scala
|
||||
new{ ... }
|
||||
```
|
||||
|
||||
### 定义一个抽象类
|
||||
|
||||
```scala
|
||||
abstract class D { ... } // 不可创建
|
||||
```
|
||||
|
||||
### 定义一个继承子类
|
||||
|
||||
```scala
|
||||
class C extends D { ... }
|
||||
```
|
||||
|
||||
### 继承与构造器参数
|
||||
|
||||
```scala
|
||||
class D(var x: R)
|
||||
class C(x: R) extends D(x)
|
||||
```
|
||||
|
||||
愿望清单: 默认自动传参
|
||||
|
||||
### 定义一个单例
|
||||
|
||||
```scala
|
||||
object O extends D { ... }
|
||||
```
|
||||
|
||||
和模块一样
|
||||
|
||||
### 特质
|
||||
|
||||
```scala
|
||||
trait T { ... }
|
||||
class C extends T { ... }
|
||||
class C extends D with T { ... }
|
||||
```
|
||||
|
||||
带有实现的接口,没有构造参数
|
||||
|
||||
### 多个特质
|
||||
|
||||
```scala
|
||||
trait T1; trait T2
|
||||
class C extends T1 with T2
|
||||
class C extends D with T1 with T2
|
||||
```
|
||||
|
||||
### 必须声明覆盖该方法
|
||||
|
||||
```scala
|
||||
class C extends D { override def f = ...}
|
||||
```
|
||||
|
||||
### 创建对象
|
||||
|
||||
```scala
|
||||
new java.io.File("f")
|
||||
new List[Int] // ✅ GOOD
|
||||
List(1,2,3) // ❌ BAD
|
||||
```
|
||||
|
||||
### 类字面量
|
||||
|
||||
```scala
|
||||
classOf[String]
|
||||
```
|
||||
|
||||
### 类型检查 (运行时)
|
||||
|
||||
```scala
|
||||
x.isInstanceOf[String]
|
||||
```
|
||||
|
||||
### 类型强制转换 (运行时)
|
||||
|
||||
```scala
|
||||
x.asInstanceOf[String]
|
||||
```
|
||||
|
||||
### 归属 (编译时)
|
||||
|
||||
```scala
|
||||
x: String
|
||||
```
|
220
docs/subversion.md
Normal file
@ -0,0 +1,220 @@
|
||||
Subversion 备忘清单
|
||||
===
|
||||
|
||||
本备忘单总结了常用的 [SVN](https://git-scm.com/) 命令行指令,以供快速参考。
|
||||
|
||||
入门
|
||||
---
|
||||
|
||||
### Subversion 组件
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
名称 | 说明
|
||||
:- | :-
|
||||
`svn` | 命令行程序
|
||||
`svnversion` | 工作副本的修订
|
||||
`svnlook` | 检查存储库
|
||||
`svnadmin` | 存储库管理
|
||||
`svndumpfilter` | 过滤存储库流
|
||||
`mod_dav_svn` | Apache 模块
|
||||
`svnserve` | SVN服务器(SVN协议)
|
||||
`svnsync` | 镜像仓库
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
---
|
||||
|
||||
- [Subversion 官方文档](https://subversion.apache.org/)
|
||||
|
||||
### 添加文件或文件夹
|
||||
|
||||
```bash
|
||||
$ svn add *
|
||||
# 添加文件夹中的所有项目,然后递归(忽略版本目录)
|
||||
$ svn add itemname
|
||||
# 如果 itemname 是文件夹,
|
||||
# 则所有子文件夹 并且文件也会被添加
|
||||
$ svn add * --force
|
||||
# 强制递归到版本化目录
|
||||
```
|
||||
|
||||
### 将更改提交到存储库
|
||||
|
||||
```shell
|
||||
$ svn commit "/path"
|
||||
# 提交对文件或文件夹的更改
|
||||
$ svn commit -m "Message" "/path"
|
||||
# 提交消息“Message”
|
||||
$ svn commit -N "/path"
|
||||
# 提交对文件夹的更改而不递归
|
||||
```
|
||||
|
||||
### Subversion 协议
|
||||
|
||||
协议 | 说明
|
||||
:- | :-
|
||||
`file://` | 本地
|
||||
`http://` | HTTP (Apache)
|
||||
`https://` | HTTPS (SSL)
|
||||
`svn://` | SVN (svnserve)
|
||||
`svn+ssh://` | SVN over SSH
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 删除、复制和移动
|
||||
|
||||
```shell
|
||||
$ svn delete "/path"
|
||||
$ svn -m "Deleting" delete "/path"
|
||||
# 删除并显示消息“正在删除”
|
||||
$ svn copy "sourcepath" "targetpath"
|
||||
# 将源复制到目标
|
||||
$ svn move "sourcepath" "targetpath"
|
||||
# 将源移动到目标
|
||||
```
|
||||
|
||||
### 杂项命令 ($ svn ... )
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
命令 | 说明
|
||||
:- | :-
|
||||
`$ svn resolve "/path"` | 解决冲突
|
||||
`$ svn cleanup "/path"` | 递归删除,锁并完成,操作
|
||||
`$ svn lock "/path"` | 锁定路径
|
||||
`$ svn unlock "/path"` | 解锁路径
|
||||
`$ svn cat "/path"` | 查看文件内容
|
||||
`$ svn status "/path"` | 获取路径状态
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### Subversion 帮助
|
||||
|
||||
```shell
|
||||
$ svn help
|
||||
$ svn help import
|
||||
# 显示“导入”命令的帮助
|
||||
```
|
||||
|
||||
### 恢复本地(未提交)更改
|
||||
|
||||
```shell
|
||||
$ svn revert "/path/filename"
|
||||
# 恢复对文件的更改
|
||||
$ svn revert -R "/path/folder"
|
||||
# 递归恢复对文件夹的更改
|
||||
```
|
||||
|
||||
### 日志与责任
|
||||
|
||||
```shell
|
||||
$ svn log "/path"
|
||||
# 显示存储库中的日志消息
|
||||
$ svn blame "/path"
|
||||
# 显示路径的带有消息的提交
|
||||
```
|
||||
|
||||
### 将本地文件夹添加到存储库
|
||||
|
||||
```shell
|
||||
$ svn import folder "/path/to/repository"
|
||||
```
|
||||
|
||||
### 物品和财产状态
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
命令 | 说明
|
||||
:- | :-
|
||||
' ' | 无修改
|
||||
`A` | 添加
|
||||
`D` | 删除
|
||||
`M` | 修改的
|
||||
`R` | 已更换物品
|
||||
`C` | 冲突中
|
||||
`X` | 外部定义
|
||||
`I` | 被忽略
|
||||
`?` | 不在存储库中
|
||||
`!` | 物品缺失
|
||||
`~` | 对象类型已更改
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 存储库管理
|
||||
|
||||
```shell
|
||||
$ svnadmin create "/path/to/repository"
|
||||
# 创建存储库
|
||||
$ svnadmin setlog "path" -r 7 message.txt
|
||||
# 第7版的更改日志消息
|
||||
# message.txt内容的“路径”
|
||||
$ svnadmin dump "repository" > filename
|
||||
# 将存储库的内容转储到文件
|
||||
$ svnadmin load "repository" < filename
|
||||
# 将文件的内容加载到存储库
|
||||
```
|
||||
|
||||
### 文件之间的差异
|
||||
|
||||
```shell
|
||||
$ svn diff "/path/file"
|
||||
# 查看“/path/file”中的更改
|
||||
$ svn diff "/path/file@2" "/path/file@7"
|
||||
# 比较修订版2和7中的文件
|
||||
$ svn diff -r 2:7 "/path/folder"
|
||||
# 比较修订版2和7中的所有文件
|
||||
```
|
||||
|
||||
### 签出工作副本
|
||||
|
||||
```shell
|
||||
$ svn checkout "/path/to/repository/folder"
|
||||
# 创建“文件夹”的工作副本
|
||||
$ svn checkout "/path" foldername
|
||||
# 签出到新文件夹“foldername”
|
||||
```
|
||||
|
||||
### 合并更改
|
||||
|
||||
```shell
|
||||
$ svn merge -r 2:7 "item" "/path/file"
|
||||
# 在修订2之间应用差异
|
||||
# 和“item”到“/path/file”的7
|
||||
$ svn merge "url1" "url2" "/path/file"
|
||||
# 应用“url1”和
|
||||
# “url2”到“/path/file”
|
||||
```
|
||||
|
||||
### 特性命令($ svn ... )
|
||||
|
||||
命令 | 说明
|
||||
:- | :-
|
||||
`$ svn proplist "/path"` | 列出属性
|
||||
`$ svn propset PROP VAL` | 设置属性“PROP”
|
||||
`$ svn "/path"` | 至值“VAL”
|
||||
`$ svn propget PROP "/path"` | 获取“PROP”的值
|
||||
`$ svn propedit PROP "/path"` | 编辑“PROP”
|
||||
`$ svn propdel PROP "/path"` | 删除“PROP”
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 参数快捷方式
|
||||
|
||||
参数 | 说明
|
||||
:- | :-
|
||||
`-m "Message"` | `--message`
|
||||
`-q` | `--quiet`
|
||||
`-v` | `--verbose`
|
||||
`-r` | `--revision`
|
||||
`-c` | `--change`
|
||||
`-t` | `--transaction`
|
||||
`-R` | `--recursive`
|
||||
`-N` | `--non-recursive`
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 从存储库更新工作副本
|
||||
|
||||
```shell
|
||||
$ svn update "/path"
|
||||
$ svn update -r9 "/path"
|
||||
# 更新至修订版9
|
||||
```
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
- [Apache Subversion: Quick Start](https://subversion.apache.org/quick-start)
|
||||
- [Subversion 与版本控制](https://svnbook.red-bean.com/)
|
@ -1204,4 +1204,4 @@ struct SheetDetail: Identifiable {
|
||||
|
||||
- [SwiftUI 2.0 Cheat Sheet](https://github.com/SimpleBoilerplates/SwiftUI-Cheat-Sheet) _(github.com)_
|
||||
- [SwiftUI 2.0 备忘清单](https://wangchujiang.com/swiftui-example/cheat-sheet.html) _(swiftui-example)_
|
||||
- [Swift 备忘清单](./swift.mdl) _(jaywcjlove.github.io)_
|
||||
- [Swift 备忘清单](./swift.md) _(jaywcjlove.github.io)_
|
||||
|
458
docs/symbol-code.md
Normal file
@ -0,0 +1,458 @@
|
||||
Symbol Code 备忘清单
|
||||
===
|
||||
|
||||
这份速查表是 Symbol 特殊符号列表
|
||||
|
||||
Symbol 特殊符号
|
||||
---
|
||||
|
||||
### 热门符号
|
||||
<!--rehype:wrap-style=font-size: 28px;-->
|
||||
|
||||
```
|
||||
ღ • ⁂ € ™ ↑ → ↓ ⇝ √ ∞ ░ ▲ ▶ ◀ ● ☀ ☁ ☂ ☃ ☄ ★ ☆ ☉ ☐ ☑ ☎ ☚ ☛ ☜ ☝ ☞ ☟ ☠ ☢ ☣ ☪ ☮ ☯ ☸ ☹ ☺ ☻ ☼ ☽ ☾ ♔ ♕ ♖ ♗ ♘ ♚ ♛ ♜ ♝ ♞ ♟ ♡♨ ♩ ♪ ♫ ♬ ✈ ✉ ✍ ✎ ✓ ✔ ✘ ✚ ✞ ✟ ✠ ✡ ✦ ✧ ✩✪ ✮ ✯ ✹ ✿ ❀ ❁ ❂ ❄ ❅ ❆ ❝ ❞ ❣ ❤ ❥ ❦ ➤
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 特殊符号
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
#### 国际象棋符号列表视图
|
||||
|
||||
```
|
||||
♔ ♕ ♖ ♗ ♘ ♙ ♚ ♛ ♜ ♝ ♞ ♟
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 音符符号
|
||||
|
||||
```
|
||||
♩ ♪ ♫ ♬ ♭ ♮ ♯ 𝄞 𝄡 𝄢 𝄪 𝄫 🎵 🎶 🎼 𓏢
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 天气符号
|
||||
|
||||
```
|
||||
ϟ ☀ ☁ ☂ ☃ ☄ ☉ ☼ ☽ ☾ ♁ ♨ ❄ ❅ ❆ ༄ ࿓
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 办公室的符号
|
||||
|
||||
```
|
||||
‱ № ℗ ℠ ℡ ℻ ℀ ℁ ℅ ℆ ⅍ ⌚ ⌛ ☊ ☎ ☏ ✁ ✂ ✃ ✄ ✆ ✇ ✈ ✉ ✍ ✎ ✏ ✐ ✑✒ ™ © ® ‰ § ¶ 𓍝
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 技术符号
|
||||
|
||||
```
|
||||
⏎ ⇧ ⏏ ⌂ ⌘☢ ☣ ⎋ ⌥ ⌫ ᵁ ᴴ ᴰ ⌖
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 菜单
|
||||
|
||||
```
|
||||
☰ ≡ Ξ ㊂ ≣ ⁝ ⋮ ︙ ⦙ ⁞ ⋯ … ∷ ▲ ▼ ▶ △ ▽ ▷ ⌃ ⌄ ︿ ﹀ ︽ ︾ ⌵ 𓏬 𓃑 𓏧 ⸬
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 星座符号
|
||||
|
||||
```
|
||||
♓ ♒ ♑ ♐ ♏ ♎ ♍ ♌ ♋ ♊ ♉ ♈ ☉ ☽ ☿ ♀ ⊕ ♁ ♂ ♃ ♄ ♅ ⛢ ♆ ♇
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 打勾符号
|
||||
|
||||
```
|
||||
✓ ✔ ✖ ✗ ✘ ∛ ∜ ⍻ ☐ ☑ ☒ □ ■ ○ ● ༝ ྾ ∨ 🆅 🆇 🅥 🅧 ⊗
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 扑克符号
|
||||
|
||||
```
|
||||
♡ ♢ ♤ ♧ ♣ ♦ ♥ ♠
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 骰子符号
|
||||
|
||||
```
|
||||
⚀ ⚁ ⚂ ⚃ ⚄ ⚅
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 爱心符号
|
||||
|
||||
```
|
||||
♡ ♥ ❣ ❤ ❦ ❧ ❥ ☙ დ ღ
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 动物符号
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
```
|
||||
𓃥 𓃠 𓃰 𓃱 𓃯 𓃭 𓃸 𓃵 𓃗 𓃘 𓃙 𓃟 𓄀 𓄁 𓄂 𓄃 𓃚 𓃛 𓃜 𓃝 𓃞 𓃒 𓃓 𓃔 𓃕 𓃖 𓃡 𓃢 𓃦 𓃩 𓃫 𓃬 𓃮 𓃲 𓃴 𓃶 𓃷 𓃹 𓃻 𓃽 𓃾 𓃿 𓄄 𓄅 𓄆 𓄇 𓆇 𓆈 𓆉 𓆌 𓆏 𓆗 𓆘 𓆙 𓆚 𓆐 𓆑 𓆒 𓆓 𓆔 𓆕 𓆖 𓆊 𓆍 𓆣 𓆤 𓆥 𓆦 𓆧 𓆨 𓆛 𓆜 𓆝 𓆞 𓆟 𓆠 𓆡 𓆢 𓄿 𓅀 𓅁 𓅂 𓅃 𓅄 𓅅 𓅆 𓅇 𓅈 𓅉 𓅊 𓅋 𓅌 𓅍 𓅎 𓅏𓅐 𓅑 𓅒 𓅓 𓅔 𓅕𓅖 𓅗 𓅘 𓅙𓅚 𓅛 𓅜 𓅝 𓅞 𓅟 𓅠 𓅡 𓅢 𓅣 𓅤 𓅥 𓅦 𓅧 𓅨 𓅩 𓅪 𓅫 𓅬 𓅭 𓅮 𓅯 𓅰 𓅱 𓅲 𓅳 𓅴 𓅵 𓅶 𓅷 𓅸 𓅹 𓅺 𓅻 𓅼 𓅽 𓅾 𓅿 𓆀 𓆁 𓆂 𓆃 𓆆
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 星号符号
|
||||
|
||||
#### 天空中的星星
|
||||
|
||||
```
|
||||
★ ☆ ✡ ✦ ✧ ⌑ ✩ ✪ ⍟ ❂ ✫ ✬ ✭ ✮ ✯ ✰ ☪ ⍣ ⋆ ≛ 𓇼 𓇻 𓇽 ꙳ ⭑ ⭒ 𖤐
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 星号符号
|
||||
|
||||
```
|
||||
* ∗ ٭ ※ ⁂ ⁎ ⁑ ⁕⃰ ⊛ ☸ ❋ ✱ ✲ ✳ ✴ ✵ ✶ ✷ ✸ ✹ ✺ ✽ ⧆ * ﹡ * † ‡
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
#### 花卉符号
|
||||
|
||||
```
|
||||
✻ ✼ ✾ ✿ ❀ ❁ ❃ ❇ ❈ ❉ ❊ ✢ ✣ ✤ ✥ ꕥ 𓇬 ⚘ 𓆸 𓆹 𓆼 𓇊 𓇚 𓇕 𓇗 𓋇 𓁙 𓁋 ֍ ֎ 𓆭 𓆰 𓆱 𓇋𓇑 𓇛 𓇟 𓇣꧁ ꧂
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 箭头符号
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```
|
||||
↕ ↖ ↗ ↘ ↙ ↚ ↛ ↜ ↝ ↞ ↟ ↠ ↡ ↢ ↣ ↤ ↥ ↦ ↧ ↨ ↩ ↪ ↫ ↬ ↭ ↮ ↯ ↰ ↱ ↲ ↳ ↴ ↶ ↷ ↸ ↹ ↺ ↻ ⟳ ↼ ↽ ↾ ↿ ⇀ ⇁ ⇂ ⇃ ⇄ ⇅ ⇆ ⇇ ⇈ ⇉ ⇊ ⇋ ⇌ ⇍ ⇎ ⇏ ⇕ ⇖ ⇗ ⇘ ⇙ ⇚ ⇛ ⇜ ⇝ ⇞ ⇟ ⇠ ⇡ ⇢ ⇣ ⇤ ⇥ ⇦ ⇧ ⇨ ⇩ ⇪ ⌅ ⌆ ⌤ ⏎ ▶ ☇ ☈ ➔ ➘ ➙ ➚ ➛ ➜ ➝ ➞ ➟ ➠ ➡ ➢ ➣ ➤ ➥ ➦ ➧ ➨ ➩ ➪ ➫ ➬ ➭ ➮ ➯ ➱ ➲ ➳ ➴ ➵ ➶ ➷ ➸ ➹ ➺ ➻ ➼ ➽ ➾ ⤴ ⤵ ↵ ↓ ↔ ← → ↑ ⍇ ⍈ ⍐ ⍗ ⇫ ⇬ ⇭ ⇮ ⇯ ⇰ ⇱ ⇲ ⇳ ⇴ ⇵ ⇶ ⇷ ⇸ ⇹ ⇺ ⇻ ⇼ ⇽ ⇾ ⇿ ⇐ ⇑ ⇒ ⇓ ⇔
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 货币符号
|
||||
|
||||
```
|
||||
$ ¢ € £ ¥ ₩ ₽ ₹ ¤ ₱ ₦ ƒ ₮ ৲ ৳ ₨ ௹ ฿ ៛ ₪ ₫ ₭ ₲ ₴ ₵ ﷼ ≋ ₿ Ł Ð ₳
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
图形符号
|
||||
----
|
||||
|
||||
### 方形符号
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
∎ ⊞ ⊟ ⊠ ⊡ ⋄ ⎔ ⎚ ▀ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▉ ▊ ▋ ▋ ▌▍ ▎ ▏ ▐ ░ ▒ ▓ ▔ ■ □ ▢▣ ▤ ▥ ▦ ▧ ▨ ▩ ▪ ▫ ▬ ▭ ▮ ▯ ▰ ▱ ◆ ◇ ◈ ◘ ◙ ◚ ◛ ◧ ◨ ◩ ◪ ◫ ☖ ☗ ⭔ ⭓ ❏ ❐ ❑ ❒ ❖ ❘ ❙ ❚ ◊ ⌑ ▖ ▗ ▘ ▙ ▚ ▛ ▜ ▝ ▞ ▟ ◰ ◱ ◲ ◳
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 三角形符号
|
||||
|
||||
```
|
||||
⊿ ▲ △ ▴ ▵ ▶ ▷ ▸ ▹ ► ▻ ▼ ▽ ▾ ▿ ◀ ◁ ◂ ◃ ◄ ◅ ◢ ◣ ◤ ◥ ◬ ◭ ◮ ◸ ◹ ◺ ◿ ∇ ∆
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 线段符号
|
||||
<!--rehype:wrap-class=row-span-4-->
|
||||
|
||||
```
|
||||
ˍ ‐ ⎯ ‒ ― ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ╌ ╍ ╎ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿ ▏ ▕ ╏ – — ⌜ ⌝ ⌞ ⌟ ┌ ┍ ┎ ┏ ┐ ┑ ┒ ┓ └ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ├ ┝ ┞ ┟ ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿ ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ═ ║ ╒ ╓ ╔╔ ╔ ╕ ╕ ╖ ╖ ╗ ╗ ╘ ╙ ╚ ╚ ╛ ╛ ╜ ╜ ╝ ╝ ╞ ╟ ╟ ╠ ╡ ╡ ╢ ╢ ╣ ╣ ╤ ╤ ╥ ╥ ╦ ╦ ╧ ╧ ╨ ╨ ╩ ╩ ╪ ╪ ╫ ╬ ╱ ╲ ╳ ╭ ╮ ╯ ╰ ◜ ◝ ◞ ◟ ◠ ◡ ⌈ ⌊ ⌉ ⌋ ⎛ ⎝ ⎞ ⎠ ⎡ ⎣ ⎤ ⎦ ⎧ ⎩ ⎫ ⎭ ⎸ ⎹ ⎾ ⎿ ⏉ ⏊ ⏋ ⏌ ≡ ≣ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 圆形符号
|
||||
|
||||
```
|
||||
⊖ ⊘ ⊙ ⊚ ⊛ ⊜ ⊝ ◉ ○ ◌ ◍ ◎ ● ◐ ◑ ◒ ◓ ◔ ◕ ◖ ◗ ◦ ◯ ◴ ◵ ◶ ◷ ❍ ₒ ॰ ° ৹ ๐ º 𐤏 O ⦿ ⊕ ⊗ ⨷ ⭕ 🅞 Ⓞ ⓞ
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### X 标记符号
|
||||
|
||||
```
|
||||
× ☓ ✕ ✖ ❌ ❎ ⨉ ⨯ ☐ ☒ ✗ ✘ Χ χ ꭓ ᚷ ⊗ ⨷ ₓ ˣ
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 项目清单
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
• · ∙ ⊙ ⊚ ⊛ ◉ ○ ◌ ◍ ◎ ● ◘ ◦ 。 ☉ ⦾ ⦿ ⁃ ⁌ ⁍ ◆ ◇ ◈ ★ ☆ ■ □ ☐ ☑ ☒ ✓ ✔ ❖ ⋄ ❥ ❧ ☙ ☸ ✤ ✱ ✲ ✦ ✧ ↠ ↣ ↦ ↬ ⇛ ⇝ ⇢ ⇨ ➔ ➙ ➛ ➜ ➝ ➞ ➟ ➠ ➡ ➢ ➣ ➤ ➥ ➦ ➧ ➨ ➮ ➱ ➲ ➳ ➵ ➸ ➼ ➽ ➾ → ⇾ ⇒ ‣ ▶ ▷ ▸ ▹ ► ▻
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 盲文符号
|
||||
|
||||
```
|
||||
⣿ ⠿ ⠾ ⠽ ⠼ ⠻ ⠺ ⠹ ⠸ ⠷ ⠶ ⠵ ⠴ ⠳ ⠲ ⠱ ⠰ ⠯ ⠮ ⠭ ⠬ ⠫ ⠪ ⠩ ⠨ ⠧ ⠦ ⠥ ⠤ ⠣ ⠢ ⠡ ⠠ ⠟ ⠞ ⠝ ⠜ ⠛ ⠚ ⠙ ⠘ ⠗ ⠖ ⠕ ⠔ ⠓ ⠒ ⠑ ⠐ ⠏ ⠎ ⠍ ⠌ ⠋ ⠊ ⠉ ⠈ ⠇ ⠆ ⠅⠄ ⠃ ⠂ ⠁ ⠀
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 麻将符号
|
||||
|
||||
```
|
||||
🀀 🀄︎ 🀁 🀂 🀃 🀅 🀆 🀇 🀈 🀉 🀊 🀋 🀌 🀍 🀎 🀏 🀐 🀑 🀒 🀓 🀔 🀕 🀖 🀗 🀘 🀙 🀚 🀛 🀜 🀝 🀞 🀟 🀠 🀡 🀢 🀣 🀤 🀥 🀦 🀧 🀨 🀩
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 制表符
|
||||
|
||||
```
|
||||
┏┳┓ ╔╦╗ ╓╥╖ ┌┬┐
|
||||
┣╋┫ ╠╬╣ ╟╫╢ ├┼┤
|
||||
┗┻┛ ╚╩╝ ╙╨╜ └┴┘
|
||||
╭╮ ╱╲ ━━ ══ ┅┅ ┈┈
|
||||
╰╯ ╲╱ ﹍ ﹎﹉ ﹊
|
||||
_ _ ﹏ ˉ  ̄ ﹌ ˇ
|
||||
╳ ¦ ‖ ︴ ︳| ┃ ║ ┆ ┇
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 表格
|
||||
|
||||
```
|
||||
┏━━┳━━┓╔══╦══╗┌┈┈┬┈┈┐
|
||||
┣━━╋━━┫║ ║ ║├┈┈┼┈┈┤
|
||||
┃ ┃ ┃╠══╬══╣┆ ┆ ┆
|
||||
┗━━┻━━┛╚══╩══╝└┈┈┴┈┈┘
|
||||
╭┈┈┬┈┈╮
|
||||
├┈┈┼┈┈┤
|
||||
├┈┈┼┈┈┤
|
||||
╰┈┈┴┈┈╯
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
人物符号
|
||||
----
|
||||
|
||||
### 人员和活动
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
𓀞 𓀟 𓀠 𓀡 𓀢 𓀣 𓀤 𓀥 𓀦 𓀧 𓀨 𓀩 𓀪 𓀫 𓀬 𓀀 𓀁 𓀂 𓀃 𓀄 𓀅 𓀆 𓀇 𓀈 𓀉 𓀊 𓀋 𓀌 𓀍 𓀎 𓀏 𓀑 𓀒 𓀓 𓀔 𓀕 𓀖 𓀗 𓀘 𓀙 𓀚 𓀛 𓀜 𓀝 𓁁 𓁂 𓁃 𓁄 𓁅 𓁆 𓁇 𓁈 𓁉 𓁊 𓁋 𓁌 𓁍 𓁎 𓁏 𓁐 𓁑 𓁒 𓁓 𓁔 𓁕 𓁖 𓁗 𓁘 𓁙 𓀭 𓀮 𓀯 𓀰 𓀱 𓀲 𓀳 𓀴 𓀵 𓀶 𓀷 𓀸 𓀹 𓀺 𓀻 𓀼 𓀽 𓀾 𓀿 𓁀 𓁲 𓁚 𓁛 𓁜 𓁝 𓁞 𓁟 𓁠 𓁡 𓁢 𓁣 𓁤 𓁥 𓁦 𓁧 𓁨 𓁩 𓁪 𓁫 𓁬 𓁭 𓁮 𓁯 𓁰 𓁱 𓁳 𓁴 𓁵
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 脸和笑脸符号
|
||||
|
||||
```
|
||||
☹ ☺ ☻ ☿ ♀ ⚣ ⚤ ⚥ ⚦ ⚧ ⚨ ♂ ⚢ 〠 ヅ ツ ㋡ 웃 유 ü ت ⍢ ⍨ ⚇ ⚉ 𓁷 𓁶 𓂈 𓂉 𓂊 𓂎 𓂀 𓁿 𓁾 𓁽 𓁼 𓁻 𓁺 𓁹
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 心形符号
|
||||
|
||||
```
|
||||
♡ ♥ ❣ ❤ ❦ ❧ ❥ ☙ დ ღ
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 手符号
|
||||
|
||||
```
|
||||
☚ ☛ ☜ ☝ ☞ ☟ ✌ ✍ 𓂬 𓂩 𓂨 𓂷 𓂭𓂝 𓂡 𓂦 𓃈 ⍝
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 文化符号
|
||||
|
||||
```
|
||||
☠ ⚰ ☤ ☥ ☦ ☧ ☨ ☩ ☪ ☫ ☬ ☮☭ ☯ ☸ ☽ ☾ ✙ ✚ ✛ ✜ ✝ ✞✟ ✠ ✡ 卍 ﷽
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
数学符号
|
||||
----
|
||||
|
||||
### 计数符号
|
||||
|
||||
```
|
||||
∟ ∬ ∭ ∮ ∵ ∷ ≦ ≧ ≋ ╳ ✕ ✖ ✚ ﹢ ﹣ ﹤ ﹥ % + - / = ∧ ∠ ∩ ∪ ° ÷ ≡ ≥ ∞ ∫ ≤ ≠ ∨ ‰ ‱ ⊥ π ± √ ∑ ∴ × ¬
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 分数符号
|
||||
|
||||
```
|
||||
½ ⅓ ⅔ ¼ ¾ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅐ ⅛ ⅜ ⅝ ⅞ ⅑ ⅒ ↉ ⅟
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 数字符号
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
```
|
||||
Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ Ⅺ Ⅻ ⅰ ⅱ ⅲ ⅳ ⅴ ⅵ ⅶ ⅷ ⅸ ⅹ ⅺ ⅻ ⓪ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉ ➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓ ⑴ ⑵ ⑶ ⑷⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⓿ ❶ ❷ ❸ ❹ ❺ ❻ ❼ ❽ ❾ ❿ ㈠ ㈡ ㈢ ㈣ ㈤ ㈥ ㈦ ㈧ ㈨ ㈩ ㊀ ㊁ ㊂ ㊃ ㊄ ㊅ ㊆ ㊇ ㊈ ㊉ 0 1 2 34 5 6 7 8 9
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 单位符号
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
μ ° ℃ ℉ ㎍ ㎎ ㎏ ℥ ㏌ ㎚ ㎛ ㎜ ㎝ ㎞ ² ³ ㎖ ㎗ ㎘ ㏄ ㏖ ㏒ ㎅ ㎆ ㎇ ㎈ ㎉ ㎐ ㎑ ㎒ ㎓ ㎾ Ω ㏑ ㏈ ㏐ ㏂ ㏘ ㎳ ㎭ ㏅ ㎪ ㏗
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 下标和上标
|
||||
|
||||
```
|
||||
⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽⁾ ⁿ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌₍ ₎ ₐ ₑ ₒ ₓ ₔ ° ⁱ ⁄
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### PI 符号
|
||||
|
||||
```
|
||||
Π π 𝜫 𝝅 𝝥 𝝿 𝞟 𝞹 П п ∏ ϖ ∐ ℼ ㄇ 兀
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
语言符号
|
||||
----
|
||||
|
||||
### 字母字体
|
||||
<!--rehype:wrap-class=row-span-4 col-span-3-->
|
||||
|
||||
```
|
||||
Ⓐ Ⓑ Ⓒ Ⓓ Ⓔ Ⓕ Ⓖ Ⓗ Ⓘ Ⓙ Ⓚ Ⓛ Ⓜ Ⓝ Ⓞ Ⓟ Ⓠ Ⓡ Ⓢ Ⓣ Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ
|
||||
ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ
|
||||
|
||||
ᴀ ʙ ᴄ ᴅ ᴇ ғ ɢ ʜ ɪ ᴊ ᴋ ʟ ᴍ ɴ ᴏ ᴘ ǫ ʀ s ᴛ ᴜ ᴠ ᴡ x ʏ ᴢ
|
||||
|
||||
𝓐 𝓑 𝓒 𝓓 𝓔 𝓕 𝓖 𝓗 𝓘 𝓙 𝓚 𝓛 𝓜 𝓝 𝓞 𝓟 𝓠 𝓡 𝓢 𝓣 𝓤 𝓥 𝓦 𝓧 𝓨 𝓩
|
||||
𝓪 𝓫 𝓬 𝓭 𝓮 𝓯 𝓰 𝓱 𝓲 𝓳 𝓴 𝓵 𝓶 𝓷 𝓸 𝓹 𝓺 𝓻 𝓼 𝓽 𝓾 𝓿 𝔀 𝔁 𝔂 𝔃
|
||||
𝒜 ℬ 𝒞 𝒟 ℰ ℱ 𝒢 ℋ ℐ 𝒥 𝒦 ℒ ℳ 𝒩 𝒪 𝒫 𝒬 ℛ 𝒮 𝒯 𝒰 𝒱 𝒲 𝒳 𝒴 𝒵
|
||||
𝒶 𝒷 𝒸 𝒹 𝑒 𝒻 𝑔 𝒽 𝒾 𝒿 𝓀 𝓁 𝓂 𝓃 𝑜 𝓅 𝓆 𝓇 𝓈 𝓉 𝓊 𝓋 𝓌 𝓍 𝓎 𝓏
|
||||
|
||||
🅐 🅑 🅒 🅓 🅔 🅕 🅖 🅗 🅘 🅙 🅚 🅛 🅜 🅝 🅞 🅟 🅠 🅡 🅢 🅣 🅤 🅥 🅦 🅧 🅨 🅩
|
||||
|
||||
𝔸 𝔹 ℂ 𝔻 𝔼 𝔽 𝔾 ℍ 𝕀 𝕁 𝕂 𝕃 𝕄 ℕ 𝕆 ℙ ℚ ℝ 𝕊 𝕋 𝕌 𝕍 𝕎 𝕏 𝕐 ℤ
|
||||
𝕒 𝕓 𝕔 𝕕 𝕖 𝕗 𝕘 𝕙 𝕚 𝕛 𝕜 𝕝 𝕞 𝕟 𝕠 𝕡 𝕢 𝕣 𝕤 𝕥 𝕦 𝕧 𝕨 𝕩 𝕪 𝕫
|
||||
|
||||
🄰 🄱 🄲 🄳 🄴 🄵 🄶 🄷 🄸 🄹 🄺 🄻 🄼 🄽 🄾 🄿 🅀 🅁 🅂 🅃 🅄 🅅 🅆 🅇 🅈 🅉
|
||||
|
||||
🅰 🅱 🅲 🅳 🅴 🅵 🅶 🅷 🅸 🅹 🅺 🅻 🅼 🅽 🅾 🅿 🆀 🆁 🆂 🆃 🆄 🆅 🆆 🆇 🆈 🆉
|
||||
|
||||
𝕬 𝕭 𝕮 𝕯 𝕰 𝕱 𝕲 𝕳 𝕴 𝕵 𝕶 𝕷 𝕸 𝕹 𝕺 𝕻 𝕼 𝕽 𝕾 𝕿 𝖀 𝖁 𝖂 𝖃 𝖄 𝖅
|
||||
𝖆 𝖇 𝖈 𝖉 𝖊 𝖋 𝖌 𝖍 𝖎 𝖏 𝖐 𝖑 𝖒 𝖓 𝖔 𝖕 𝖖 𝖗 𝖘 𝖙 𝖚 𝖛 𝖜 𝖝 𝖞 𝖟
|
||||
𝔄 𝔅 ℭ 𝔇 𝔈 𝔉 𝔊 ℌ ℑ 𝔍 𝔎 𝔏 𝔐 𝔑 𝔒 𝔓 𝔔 ℜ 𝔖 𝔗 𝔘 𝔙 𝔚 𝔛 𝔜 ℨ
|
||||
𝔞 𝔟 𝔠 𝔡 𝔢 𝔣 𝔤 𝔥 𝔦 𝔧 𝔨 𝔩 𝔪 𝔫 𝔬 𝔭 𝔮 𝔯 𝔰 𝔱 𝔲 𝔳 𝔴 𝔵 𝔶 𝔷
|
||||
|
||||
𝐀 𝐁 𝐂 𝐃 𝐄 𝐅 𝐆 𝐇 𝐈 𝐉 𝐊 𝐋 𝐌 𝐍 𝐎 𝐏 𝐐 𝐑 𝐒 𝐓 𝐔 𝐕 𝐖 𝐗 𝐘 𝐙
|
||||
𝐚 𝐛 𝐜 𝐝 𝐞 𝐟 𝐠 𝐡 𝐢 𝐣 𝐤 𝐥 𝐦 𝐧 𝐨 𝐩 𝐪 𝐫 𝐬 𝐭 𝐮 𝐯 𝐰 𝐱 𝐲 𝐳
|
||||
|
||||
𝘈 𝘉 𝘊 𝘋 𝘌 𝘍 𝘎 𝘏 𝘐 𝘑 𝘒 𝘓 𝘔 𝘕 𝘖 𝘗 𝘘 𝘙 𝘚 𝘛 𝘜 𝘝 𝘞 𝘟 𝘠 𝘡
|
||||
𝘢 𝘣 𝘤 𝘥 𝘦 𝘧 𝘨 𝘩 𝘪 𝘫 𝘬 𝘭 𝘮 𝘯 𝘰 𝘱 𝘲 𝘳 𝘴 𝘵 𝘶 𝘷 𝘸 𝘹 𝘺 𝘻
|
||||
𝘼 𝘽 𝘾 𝘿 𝙀 𝙁 𝙂 𝙃 𝙄 𝙅 𝙆 𝙇 𝙈 𝙉 𝙊 𝙋 𝙌 𝙍 𝙎 𝙏 𝙐 𝙑 𝙒 𝙓 𝙔 𝙕
|
||||
𝙖 𝙗 𝙘 𝙙 𝙚 𝙛 𝙜 𝙝 𝙞 𝙟 𝙠 𝙡 𝙢 𝙣 𝙤 𝙥 𝙦 𝙧 𝙨 𝙩 𝙪 𝙫 𝙬 𝙭 𝙮 𝙯
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 希腊符号
|
||||
|
||||
```
|
||||
Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 拉丁字母
|
||||
|
||||
```
|
||||
Æ Á Â Â À Å Ã Ä Ç Ð É Ê È Ë Í Î Ì Ï Ñ Ó Ô Ò Ø Õ Ö Þ Ú Û Ù Ü Ý á â æ à å ã ä ç é ê è ð ë í î ì ïñ ó ô ò ø õ ö ß þ ú û ù ü ý ÿ
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 拉丁扩展字符
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď Đ đ Ē ē Ĕ ĕ Ė ė Ę ę Ě ě Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĩ ĩ Ī ī Ĭ ĭ Į į İ ı IJ ij Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň Ŋ ŋ Ō ō Ŏ ŏ Ő ő Œ œ Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ŝ ŝ Ş ş Š š Ţ ţ Ť ť Ŧ ŧ Ũ ũ Ū ū Ŭ ŭ Ů ů Ű ű Ų ų Ŵ ŵ Ŷ ŷ Ÿ Ź źŻ ż Ž ž ſ ʼn
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 中国符号
|
||||
|
||||
```
|
||||
㊊ ㊋ ㊌ ㊍ ㊎ ㊏ ㊐ ㊑ ㊒ ㊓ ㊔ ㊕ ㊖ ㊗ ㊘ ㊙ ㊚ ㊛ ㊜ ㊝ ㊞ ㊟ ㊠ ㊡ ㊢ ㊣ ㊤ ㊥ ㊦ ㊧ ㊨ ㊩ ㊪ ㊫ ㊬ ㊭ ㊮ ㊯ ㊰
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 拼音注音
|
||||
|
||||
```
|
||||
ā á ǎ à ō ó ǒ ò ē é ě è ń ň ī í ǐ ì ū ú ǔ ù ǖ ǘ ǚ ǜ ü ɑ
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 俄文字符
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
```
|
||||
А Б В Г Д Е Ё Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 日文字符
|
||||
<!--rehype:wrap-class=row-span-4-->
|
||||
|
||||
```
|
||||
ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ け げ こ ご さ ざ し じ す ず せ ぜ そ ぞ た だ ち ぢ っ つ づ て で と ど な に ぬ ね の は ば ぱ ひ び ぴ ふ ぶ ぷ へ べ ぺ ほ ぼ ぽ ま み む め も ゃ や ゅ ゆ ょ よ ら り る れ ろ ゎ わ ゐ ゑ を ん ゔ ゕ ゖ゚ ゛ ゜ ゝ ゞ ゟ ゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ カ ガ キ ギ ク グ ケ ゲ コ ゴ サ ザ シ ジ ス ズ セ ゼ ソ ゾ タ ダ チ ヂ ッ ツ ヅ テ デ ト ド ナ ニ ヌ ネ ノ ハ バ パ ヒ ビ ピ フ ブ プ ヘ ベ ペ ホ ボ ポ マ ミ ム メ モ ャ ヤ ュ ユ ョ ヨ ラ リ ル レ ロ ヮ ワ ヰ ヱ ヲ ン ヴ ヵ ヶ ヷ ヸ ヹ ヺ ・ ー ヽ ヾ ヿ ㍐ ㍿
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 韩国符号
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
ㄱ ㄲ ㄳ ㄴ ㄵ ㄶ ㄷ ㄸ ㄹ ㄺ ㄻ ㄼ ㄽ ㄾ ㄿ ㅀ ㅁ ㅂ ㅃ ㅄ ㅅ ㅆ ㅇ ㅈ ㅉ ㅊ ㅋ ㅌ ㅍ ㅎ ㅏ ㅐ ㅑ ㅒ ㅓ ㅔ ㅕ ㅖ ㅗ ㅘ ㅙ ㅚ ㅛ ㅜ ㅝ ㅞ ㅟ ㅠ ㅡ ㅢ ㅥ ㅦ ㅧ ㅨ ㅩ ㅪ ㅫ ㅬ ㅭ ㅮ ㅯ ㅰ ㅱ ㅲ ㅳ ㅴ ㅵ ㅶ ㅷ ㅸ ㅹ ㅺ ㅻ ㅼ ㅽ ㅾ ㅿ ㆀ ㆁ ㆂ ㆃ ㆄ ㆅ ㆆ ㆇ ㆈ ㆉ ㆊ
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 标点符号
|
||||
|
||||
```
|
||||
˙ ‥ ‧ ‵ 、 。 ﹐ ﹒ ﹔ ﹕ ! # $ % & * , . : ; ? @ ~ • … · . ᐟ ¡ ¿ ¦ ¨ ¯ ´ · ¸ º ‽ ‼ ⁏ ※ † ‡ ˉ ˘ ⁇ ⁈ ⁉ ˆ ⁊ ⸘
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 日本时代名称
|
||||
|
||||
```
|
||||
㋿ ㍻ ㍼ ㍽ ㍾
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 括号符号
|
||||
|
||||
```
|
||||
〈 〉 《 》 「 」 『 』 【 】 〔 〕 ︵ ︶ ︷ ︸ ︹ ︺ ︻ ︼ ︽ ︾ ︿ ﹀ ﹁ ﹂ ﹃ ﹄﹙ ﹚ ﹛ ﹜ ﹝ ﹞ ﹤ ﹥ ( ) < >{ } ❬ ❭ ❮ ❯ ❰ ❱ 〖 〗 〘 〙 〚 〛 ⟨ ⟩ ‹ › « » 「 」 ⌃ ⌄ ⌵
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 引号
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```
|
||||
" ' « » ‘ ’ ‚ ‛ “ ” „ ‟ ‹ › ❛ ❜ ❝ ❞ 〝 〞 〟 〃 " ' ′ ″ ` ˊ ― — –
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
### 段落标记
|
||||
|
||||
```
|
||||
§ ¶ ❡ ⁋ ※
|
||||
```
|
||||
<!--rehype:className=wrap-text&style=font-size: 28px;-->
|
||||
|
||||
另见
|
||||
--------
|
||||
|
||||
- [特殊符号](https://cn.piliapp.com/symbol/) _(piliapp.com)_
|
218
docs/taskset.md
Normal file
@ -0,0 +1,218 @@
|
||||
Taskset 备忘清单
|
||||
===
|
||||
|
||||
`Taskset` 命令用于设置或检索给定pid的运行进程的CPU相关性,或启动具有给定CPU相关性的新命令
|
||||
|
||||
入门
|
||||
----
|
||||
|
||||
### 使用
|
||||
|
||||
默认行为是使用给定的关联掩码运行新命令
|
||||
|
||||
```shell
|
||||
$ taskset [mask] [command] [arguments]
|
||||
```
|
||||
|
||||
#### 使用 #2
|
||||
|
||||
```shell
|
||||
$ taskset -p [pid]
|
||||
```
|
||||
|
||||
---------
|
||||
|
||||
```shell
|
||||
$ taskset -p [mask] [pid]
|
||||
```
|
||||
|
||||
您还可以检索现有任务的CPU相关性
|
||||
|
||||
### 常用选项
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
命令 | 候补 | 含义
|
||||
---|---|---
|
||||
`-a` | --all-tasks | 设置或检索给定PID的所有任务(线程)的CPU相关性
|
||||
`-c` | --cpu-list | 将掩码解释为处理器的数字列表,而不是位掩码</br>数字用逗号分隔,可能包括范围。例如:`0,5,8-11`
|
||||
`-p` | --pid | 对现有PID进行操作,不要启动新任务
|
||||
`-h` | --help | 显示帮助文本并退出
|
||||
`-v` | --version | 打印版本并退出
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
示例
|
||||
--------
|
||||
|
||||
### 查看CPU相关性
|
||||
|
||||
```shell
|
||||
$ taskset -cp 29523
|
||||
pid 29523's current affinity list: 0-15
|
||||
```
|
||||
|
||||
这意味着 PID `29523` 的进程在 CPU 范围 `[0,1,...,15]` 上处于活动状态,这意味着总共 `16`。
|
||||
|
||||
**PID**:进程标识符 - 是赋予每个正在运行的进程的唯一数字标识符,您可以在 `top` 或 `htop` 工具中查看进程的PID
|
||||
|
||||
_如果您运行上述命令但收到消息 `错误使用`,请尝试使用 PID = 1_
|
||||
|
||||
```shell
|
||||
$ taskset -cp 1
|
||||
```
|
||||
|
||||
### 设置 CPU 相关性
|
||||
|
||||
现在让我们尝试将进程设置到指定的CPU。 例如,我们有一个进程 PID = 14846
|
||||
|
||||
我们先看一下该进程的CPU相关性列表:
|
||||
|
||||
```shell
|
||||
$ taskset -cp 14846
|
||||
pid 14846's current affinity list: 0-15
|
||||
```
|
||||
|
||||
#### 将 CPU 关联性更改为 1
|
||||
|
||||
```shell
|
||||
$ taskset -cp 1 14846
|
||||
pid 14846's current affinity list: 0-15
|
||||
pid 14846's new affinity list: 1
|
||||
```
|
||||
|
||||
正如我们所看到的,CPU 相关性发生了变化
|
||||
|
||||
### 设置多个值的CPU 相关性
|
||||
|
||||
这意味着新的CPU关联列表是`[0,1,2,3]`
|
||||
|
||||
```shell
|
||||
$ taskset -cp 0-3 14846
|
||||
pid 14846's current affinity list: 1
|
||||
pid 14846's new affinity list: 0-3
|
||||
```
|
||||
|
||||
您可以使用以下命令设置单个CPU:
|
||||
|
||||
```shell
|
||||
$ taskset -cp 5,8,12 14846
|
||||
pid 14846's current affinity list: 0-3
|
||||
pid 14846's new affinity list: 5,8,12
|
||||
```
|
||||
|
||||
这意味着新的CPU关联列表是`[5,8,12]`
|
||||
|
||||
### 将进程的CPU亲和性设置为特定的CPU核心
|
||||
|
||||
```bash
|
||||
$ taskset -p <cpu_mask> <pid>
|
||||
```
|
||||
|
||||
例如:`taskset -p 0x00000001 12345` 将进程ID为12345的进程的CPU亲和性设置为CPU核心 0。
|
||||
|
||||
### 获取进程的CPU亲和性
|
||||
|
||||
```bash
|
||||
$ taskset -p <pid>
|
||||
```
|
||||
|
||||
例如:`taskset -p 12345` 将显示进程ID为12345的进程的CPU亲和性。
|
||||
|
||||
### 启动一个新进程,并将其CPU亲和性设置为特定的CPU核心
|
||||
|
||||
```bash
|
||||
$ taskset <cpu_mask> <command>
|
||||
```
|
||||
|
||||
例如:`taskset 0x00000001 ./my_program` 将以CPU核心 0 的亲和性运行 ./my_program。
|
||||
|
||||
### 将已运行进程的CPU亲和性移动到特定的CPU核心
|
||||
|
||||
```bash
|
||||
$ taskset -p -c <cpu_list> <pid>
|
||||
```
|
||||
|
||||
例如:`taskset -p -c 0,1 12345` 将进程ID为12345的进程的CPU亲和性移动到CPU核心 0 和 1。
|
||||
|
||||
### 指定进程只能在指定的CPU核心上运行(排他性)
|
||||
|
||||
```bash
|
||||
$ taskset -p --exclusive <cpu_mask> <pid>
|
||||
```
|
||||
|
||||
例如:`taskset -p --exclusive 0x00000001 12345` 将进程ID为12345的进程限制在CPU核心 0 上运行。
|
||||
|
||||
### 将所有已运行进程的CPU亲和性设置为特定的CPU核心
|
||||
|
||||
```bash
|
||||
$ taskset -a -p <cpu_mask>
|
||||
```
|
||||
|
||||
例如:`taskset -a -p 0x00000001` 将所有进程的CPU亲和性设置为CPU核心 0。
|
||||
|
||||
### 在启动新进程时设置CPU亲和性,并指定优先级
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```bash
|
||||
$ taskset -c <cpu_mask> nice -n <priority> <command>
|
||||
```
|
||||
|
||||
例如:`taskset -c 0x00000001 nice -n 10 ./my_program` 将以 CPU 核心 `0` 的亲和性和优先级 `10` 运行 `./my_program`。
|
||||
|
||||
### 切换已运行进程的CPU亲和性到其他CPU核心
|
||||
|
||||
```bash
|
||||
$ taskset -p <cpu_mask> -P <pid>
|
||||
```
|
||||
|
||||
例如:`taskset -p 0x00000001 -P 12345` 将进程ID为12345的进程的CPU亲和性切换到CPU核心 0。
|
||||
|
||||
### 将已运行进程的CPU亲和性移动到随机选取的可用CPU核心
|
||||
|
||||
```bash
|
||||
$ taskset -p --cpu-list - <pid>
|
||||
```
|
||||
|
||||
例如:
|
||||
|
||||
```bash
|
||||
$ taskset -p --cpu-list - 12345
|
||||
```
|
||||
|
||||
将进程ID为12345的进程的CPU亲和性移动到一个可用的CPU核心。
|
||||
|
||||
### 使用CPU亲和性运行命令,并显示其CPU使用情况
|
||||
|
||||
```bash
|
||||
$ taskset <cpu_mask> <command> &
|
||||
top -p <pid>
|
||||
```
|
||||
|
||||
例如:
|
||||
|
||||
```bash
|
||||
$ taskset 0x00000001 ./my_program &
|
||||
top -p $(pgrep my_program)
|
||||
```
|
||||
|
||||
将以CPU核心 `0` 的亲和性运行 `./my_program`,并显示该进程的CPU使用情况。
|
||||
|
||||
### 其他
|
||||
|
||||
您可以通过范围设置与其他类似指定CPU的相关性
|
||||
|
||||
```shell
|
||||
$ taskset -cp 1-3,12 14846
|
||||
```
|
||||
|
||||
或
|
||||
|
||||
```shell
|
||||
$ taskset -cp 1-6:2 14846
|
||||
```
|
||||
|
||||
后缀 `:N` 指定范围内的步幅,例如 `0-10:3` 被解释为 `0,3,6,9` 列表。
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
[taskset — Linux manual page](https://man7.org/linux/man-pages/man1/taskset.1.html) _(man7.org)_
|
160
docs/toml.md
@ -114,17 +114,47 @@ array3 = [
|
||||
TOML 字符串
|
||||
-----
|
||||
|
||||
### 多行字符串
|
||||
### 基本字符串
|
||||
|
||||
```toml
|
||||
multiLineString = """
|
||||
Multi-line basic strings are surrounded
|
||||
by three quotation marks on each side
|
||||
and allow newlines.
|
||||
"""
|
||||
str1 = "I'm a string."
|
||||
str2 = "You can \"quote\" me."
|
||||
str3 = "Name\tJos\u00E9\nLoc\tSF."
|
||||
```
|
||||
|
||||
### 文字字符串
|
||||
### 多行基本字符串
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```toml
|
||||
str1 = """
|
||||
Roses are red
|
||||
Violets are blue"""
|
||||
|
||||
str2 = """\
|
||||
The quick brown \
|
||||
fox jumps over \
|
||||
the lazy dog.\
|
||||
"""
|
||||
```
|
||||
|
||||
用行末反斜杠自动剔除非空白字符前的任何空白字符
|
||||
|
||||
### 多行文字字符串
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```toml
|
||||
re = '''\d{2} apps is t[wo]o many'''
|
||||
lines = '''
|
||||
The first newline is
|
||||
trimmed in raw strings.
|
||||
All other whitespace
|
||||
is preserved.
|
||||
'''
|
||||
```
|
||||
|
||||
由于没有转义,无法在由单引号包裹的字面量字符串中写入单引号
|
||||
|
||||
### 字面量字符串
|
||||
|
||||
```toml
|
||||
path = 'C:\Users\nodejs\templates'
|
||||
@ -135,16 +165,116 @@ regex = '<\i\c*\s*>'
|
||||
|
||||
用单引号括起来。不允许转义。
|
||||
|
||||
### 多行文字字符串
|
||||
TOML 数字
|
||||
-----
|
||||
|
||||
整数、浮点数、无穷甚至非数都是支持的。你可以用科学计数法甚至千分符
|
||||
|
||||
### 整数
|
||||
|
||||
```toml
|
||||
re = '''\d{2} apps is t[wo]o many'''
|
||||
lines = '''
|
||||
The first newline is
|
||||
trimmed in raw strings.
|
||||
All other whitespace
|
||||
is preserved.
|
||||
'''
|
||||
int1 = +99
|
||||
int2 = 42
|
||||
int3 = 0
|
||||
int4 = -17
|
||||
```
|
||||
|
||||
### 十六进制带有前缀 `0x`
|
||||
|
||||
```toml
|
||||
hex1 = 0xDEADBEEF
|
||||
hex2 = 0xdeadbeef
|
||||
hex3 = 0xdead_beef
|
||||
```
|
||||
|
||||
### 八进制带有前缀 `0o`
|
||||
|
||||
```toml
|
||||
oct1 = 0o01234567
|
||||
oct2 = 0o755
|
||||
```
|
||||
|
||||
### 二进制带有前缀 `0b`
|
||||
|
||||
```toml
|
||||
bin1 = 0b11010110
|
||||
```
|
||||
|
||||
### both
|
||||
|
||||
```toml
|
||||
float7 = 6.626e-34
|
||||
```
|
||||
|
||||
### 分隔符
|
||||
|
||||
```toml
|
||||
float8 = 224_617.445_991_228
|
||||
```
|
||||
|
||||
### 小数
|
||||
|
||||
```toml
|
||||
float1 = +1.0
|
||||
float2 = 3.1415
|
||||
float3 = -0.01
|
||||
```
|
||||
|
||||
### 指数
|
||||
|
||||
```toml
|
||||
float4 = 5e+22
|
||||
float5 = 1e06
|
||||
float6 = -2E-2
|
||||
```
|
||||
|
||||
### 无穷
|
||||
|
||||
```toml
|
||||
infinite1 = inf # 正无穷
|
||||
infinite2 = +inf # 正无穷
|
||||
infinite3 = -inf # 负无穷
|
||||
```
|
||||
|
||||
### 非数
|
||||
|
||||
```toml
|
||||
not1 = nan
|
||||
not2 = +nan
|
||||
not3 = -nan
|
||||
```
|
||||
|
||||
TOML 日期与时刻
|
||||
-----
|
||||
|
||||
TOML 支持日期、时刻、日期时刻,带或者不带时区偏移
|
||||
|
||||
### 坐标日期时刻
|
||||
|
||||
```toml
|
||||
odt1 = 1979-05-27T07:32:00Z
|
||||
odt2 = 1979-05-27T00:32:00-07:00
|
||||
odt3 = 1979-05-27T00:32:00.999999-07:00
|
||||
```
|
||||
|
||||
### 各地日期时刻
|
||||
|
||||
```toml
|
||||
ldt1 = 1979-05-27T07:32:00
|
||||
ldt2 = 1979-05-27T00:32:00.999999
|
||||
```
|
||||
|
||||
### 各地日期
|
||||
|
||||
```toml
|
||||
ld1 = 1979-05-27
|
||||
```
|
||||
|
||||
### 各地时刻
|
||||
|
||||
```toml
|
||||
lt1 = 07:32:00
|
||||
lt2 = 00:32:00.999999
|
||||
```
|
||||
|
||||
TOML Tables
|
||||
|
@ -617,7 +617,10 @@ const stringBox = new Box("a package")
|
||||
|
||||
```ts
|
||||
class Location {
|
||||
constructor(public x: number, public y: number) {}
|
||||
constructor(
|
||||
public x: number,
|
||||
public y: number
|
||||
) {}
|
||||
}
|
||||
const loc = new Location(20, 40);
|
||||
|
||||
@ -633,19 +636,23 @@ TypeScript 特定于类的扩展,可自动将实例字段设置为输入参数
|
||||
abstract class Animal {
|
||||
abstract getName(): string;
|
||||
printName() {
|
||||
console.log("Hello, " + this.getName());
|
||||
console.log("Hello, " + this.getName());
|
||||
}
|
||||
}
|
||||
class Dog extends Animal { getName(): { ... } }
|
||||
class Dog extends Animal {
|
||||
getName(): { ... }
|
||||
}
|
||||
```
|
||||
|
||||
一个类可以被声明为不可实现,但可以在类型系统中被子类化。 class 成员也可以。
|
||||
|
||||
### 装饰器和属性
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```ts
|
||||
import { Syncable, triggersSync, preferCache, required } from "mylib"
|
||||
import {
|
||||
Syncable, triggersSync, preferCache,
|
||||
required
|
||||
} from "mylib"
|
||||
|
||||
@Syncable
|
||||
class User {
|
||||
@ -653,7 +660,9 @@ class User {
|
||||
save() { ... }
|
||||
@preferCache(false)
|
||||
get displayName() { ... }
|
||||
update(@required info: Partial<User>) { ... }
|
||||
update(@required info: Partial<User>) {
|
||||
//...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -676,6 +685,21 @@ class MyClass {
|
||||
|
||||
类可以声明索引签名,与其他对象类型的索引签名相同。
|
||||
|
||||
### 在 forwardRef 上面声明泛型
|
||||
|
||||
```ts
|
||||
export const Wrapper = forwardRef(
|
||||
<T extends object>
|
||||
(
|
||||
props: RootNodeProps<T>,
|
||||
ref: React.LegacyRef<HTMLDivElement>
|
||||
) => {
|
||||
return (
|
||||
<div ref={ref}></div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
实用程序类型
|
||||
----
|
||||
|
||||
@ -1185,17 +1209,17 @@ function Dog(prop:CeProps): JSX.Element {
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```tsx
|
||||
interface MenuProps extends React.LiHTMLAttributes<HTMLUListElement> { ... }
|
||||
const InternalMenu = (props: MenuProps, ref?: React.ForwardedRef<HTMLUListElement>) => (
|
||||
interface MenuProps extends React.LiHTMLAttributes<HTMLUListElement> { ... };
|
||||
const InternalMenu = React.forwardRef<HTMLUListElement, MenuProps>((props, ref) => (
|
||||
<ul {...props} ref={ref} />
|
||||
);
|
||||
type MenuComponent = React.FC<React.PropsWithRef<MenuProps>> & {
|
||||
));
|
||||
|
||||
type MenuComponent = typeof InternalMenu & {
|
||||
Item: typeof MenuItem; // MenuItem 函数组件
|
||||
SubMenu: typeof SubMenu; // SubMenu 函数组件
|
||||
};
|
||||
const Menu: MenuComponent = React.forwardRef<HTMLUListElement>(
|
||||
InternalMenu
|
||||
) as unknown as MenuComponent;
|
||||
|
||||
const Menu: MenuComponent = InternalMenu as unknown as MenuComponent;
|
||||
|
||||
Menu.Item = MenuItem;
|
||||
Menu.SubMenu = SubMenu;
|
||||
@ -1289,6 +1313,43 @@ export interface ProgressProps extends React.DetailedHTMLProps<React.HTMLAttribu
|
||||
export const Progress: FC<PropsWithRef<ProgressProps>> = forwardRef<HTMLDivElement>(InternalProgress)
|
||||
```
|
||||
|
||||
### 组件 'as' 属性
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```tsx
|
||||
import React, { ElementType, ComponentPropsWithoutRef } from "react";
|
||||
|
||||
export const Link = <T extends ElementType<any> = "a">(
|
||||
props: { as?: T; } & ComponentPropsWithoutRef<T>
|
||||
) => {
|
||||
const Comp = props.as || "a";
|
||||
return <Comp {...props}></Comp>;
|
||||
};
|
||||
|
||||
|
||||
<Link as="div">文本</Link>;
|
||||
```
|
||||
|
||||
允许传入自定义 `React` 组件,或 `div`, `a` 标签
|
||||
|
||||
### 组件作为 Props 传递
|
||||
|
||||
```tsx
|
||||
type RowProps = {
|
||||
element: React.ElementType<{
|
||||
className?: string;
|
||||
}>;
|
||||
}
|
||||
const Row = (props: RowProps) => {
|
||||
return (
|
||||
<props.element className="h-8 w-8" />
|
||||
);
|
||||
};
|
||||
|
||||
<Row element={"div"} />;
|
||||
<Row element={UserIcon} />;
|
||||
```
|
||||
|
||||
各种各样的技巧
|
||||
---
|
||||
|
||||
@ -1299,7 +1360,7 @@ export const Progress: FC<PropsWithRef<ProgressProps>> = forwardRef<HTMLDivEleme
|
||||
type Capitalize<T extends string> = T extends `${infer U}${infer V}`
|
||||
? `${Uppercase<U>}${V}`
|
||||
: T
|
||||
type capitalized = Capitalize<"hello world"> // Hello World
|
||||
type capitalized = Capitalize<"hello world"> // Hello world
|
||||
```
|
||||
|
||||
也可以在 infer 中使用条件约束(`extends`)
|
||||
@ -1312,13 +1373,32 @@ type SomeBigInt = "100" extends `${infer U extends bigint}` ? U : never;
|
||||
### keyof 取 interface 的键
|
||||
|
||||
```ts
|
||||
interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
interface Point { x: number; y: number; }
|
||||
|
||||
// type keys = "x" | "y"
|
||||
type keys = keyof Point;
|
||||
|
||||
type Arrayish = {
|
||||
[n: number]: unknown;
|
||||
};
|
||||
type A = keyof Arrayish;
|
||||
// type A = number
|
||||
```
|
||||
|
||||
### 两个数组合并成一个新类型
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```ts
|
||||
const named = ["aqua", "aquamarine", "azure"] as const;
|
||||
const hex = ["#00FFFF", "#7FFFD4", "#F0FFFF"] as const;
|
||||
|
||||
type Colors = {
|
||||
[key in (typeof named)[number]]: (typeof hex)[number];
|
||||
};
|
||||
// Colors = {
|
||||
// aqua: "#00FFFF" | "#7FFFD4" | "#F0FFFF";
|
||||
// ....
|
||||
// }
|
||||
```
|
||||
|
||||
### 索引签名
|
||||
@ -1331,6 +1411,13 @@ interface NumberOrString {
|
||||
}
|
||||
```
|
||||
|
||||
### 只读元组类型
|
||||
|
||||
```ts
|
||||
const point = [3, 4] as const
|
||||
// type 'readonly [3, 4]'
|
||||
```
|
||||
|
||||
### 从数组中提取类型
|
||||
|
||||
```ts
|
||||
@ -1342,15 +1429,8 @@ type PointDetail = Data[number];
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 只读元组类型
|
||||
|
||||
```ts
|
||||
const point = [3, 4] as const
|
||||
// type 'readonly [3, 4]'
|
||||
```
|
||||
|
||||
### satisfies
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
`satisfies` 允许将验证表达式的类型与某种类型匹配,而无需更改该表达式的结果类型。
|
||||
|
||||
@ -1389,12 +1469,13 @@ const redComponent = palette.red.at(0)
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 范型实例化表达式
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
不使用的情况下:
|
||||
|
||||
```ts
|
||||
const errorMap: Map<string, Error> = new Map()
|
||||
const errorMap: Map<string, Error>
|
||||
= new Map()
|
||||
// 或者使用 type 定义别名
|
||||
type ErrorMapType = Map<string, Error>
|
||||
```
|
||||
@ -1423,7 +1504,8 @@ function makeHammerBox(hammer: Hammer) {
|
||||
return makeBox(hammer);
|
||||
}
|
||||
// or...
|
||||
const makeWrenchBox: (wrench: Wrench) => Box<Wrench> = makeBox;
|
||||
const makeWrenchBox: (wrench: Wrench)
|
||||
=> Box<Wrench> = makeBox;
|
||||
```
|
||||
|
||||
使用:
|
||||
@ -1446,6 +1528,58 @@ export interface FancyOption {
|
||||
}
|
||||
```
|
||||
|
||||
### 获取数组元素的类型
|
||||
|
||||
```ts
|
||||
const MyArray = [
|
||||
{ name: "Alice", age: 15 },
|
||||
{ name: "Bob", age: 23 },
|
||||
{ name: "Eve", age: 38 },
|
||||
];
|
||||
|
||||
type Person = typeof MyArray[number];
|
||||
// type Person = {
|
||||
// name: string;
|
||||
// age: number;
|
||||
// }
|
||||
|
||||
type Age = typeof MyArray[number]["age"];
|
||||
// type Age = number
|
||||
|
||||
type Age2 = Person["age"];
|
||||
// type Age2 = number
|
||||
```
|
||||
|
||||
### 范型推导出列表字面量
|
||||
|
||||
```ts
|
||||
const a = <T extends string>(t: T) => t;
|
||||
const b = <T extends number>(t: T) => t;
|
||||
const c = <T extends boolean>(t: T) => t;
|
||||
const d = a("a"); // const d: 'a'
|
||||
const e = b(1); // const d: 1
|
||||
const f = c(true); // const d: true
|
||||
|
||||
// 这里t的类型用了一个展开运算
|
||||
const g =
|
||||
<T extends string[]>(t: [...T]) => t;
|
||||
// 类型变成["111", "222"]了
|
||||
const h = g(["111", "222"]);
|
||||
```
|
||||
|
||||
### Object.keys 类型声明
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```ts
|
||||
const keys = Object.keys(options) as (keyof typeof options)[];
|
||||
|
||||
keys.forEach(key => {
|
||||
if (options[key] == null) {
|
||||
throw new Error(`Missing option ${key}`);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
.d.ts 模版
|
||||
---
|
||||
|
||||
@ -1634,6 +1768,248 @@ declare namespace MyClass {
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
JSDoc 参考
|
||||
---
|
||||
|
||||
### @type
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```javascript
|
||||
/** @type {string} */
|
||||
var s;
|
||||
/** @type {Window} */
|
||||
var win;
|
||||
/** @type {PromiseLike<string>} */
|
||||
var promisedString;
|
||||
// 您可以指定具有 DOM 属性的 HTML 元素
|
||||
/** @type {HTMLElement} */
|
||||
var elm = document.querySelector(selector);
|
||||
elm.dataset.myData = "";
|
||||
/** @type {number[]} */
|
||||
var ns;
|
||||
/** @type {Array.<number>} */
|
||||
var jsdoc;
|
||||
/** @type {Array<number>} */
|
||||
var nas;
|
||||
/** @type {string | boolean} */
|
||||
var sb;
|
||||
/** @type {{ a: string, b: number }} */
|
||||
var var9;
|
||||
/**
|
||||
* 将任意“字符串”属性映射到“数字”的类地图对象
|
||||
* @type {Object.<string, number>}
|
||||
*/
|
||||
var stringToNumber;
|
||||
/** @type {Object.<number, object>} */
|
||||
var arrayLike;
|
||||
/** @type {function(string, boolean): number} Closure syntax */
|
||||
var sbn;
|
||||
/** @type {(s: string, b: boolean) => number} TypeScript syntax */
|
||||
var sbn2;
|
||||
/** @type {Function} */
|
||||
var fn7;
|
||||
/** @type {function} */
|
||||
var fn6;
|
||||
/**
|
||||
* @type {*} - can be 'any' type
|
||||
*/
|
||||
var star;
|
||||
/**
|
||||
* @type {?} - unknown type (same as 'any')
|
||||
*/
|
||||
var question;
|
||||
/** @type {number | string} */
|
||||
var numberOrString = Math.random() < 0.5 ? "hello" : 100;
|
||||
var typeAssertedNumber = /** @type {number} */ (numberOrString);
|
||||
let one = /** @type {const} */(1);
|
||||
```
|
||||
|
||||
### 导入类型
|
||||
|
||||
```javascript
|
||||
// @filename: types.d.ts
|
||||
export type Pet = {
|
||||
name: string,
|
||||
};
|
||||
// @filename: main.js
|
||||
/** @param { import("./types").Pet } p */
|
||||
function walk(p) {
|
||||
console.log(`Walking ${p.name}...`);
|
||||
}
|
||||
```
|
||||
|
||||
导入类型可以在类型别名声明中使用
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @typedef {import("./types").Pet} Pet
|
||||
*/
|
||||
/** @type {Pet} */
|
||||
var myPet;
|
||||
myPet.name;
|
||||
```
|
||||
|
||||
如果您不知道类型,或者如果它有一个很烦人的大类型,`import types` 可以用来从模块中获取值的类型:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @type {typeof import("./accounts").userAccount}
|
||||
*/
|
||||
var x = require("./accounts").userAccount;
|
||||
```
|
||||
|
||||
### @param 和 @returns
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @param {string} p1 - 一个字符串参数
|
||||
* @param {string=} p2 - 可选参数(Google Closure 语法)
|
||||
* @param {string} [p3] - 另一个可选参数(JSDoc 语法)
|
||||
* @param {string} [p4="test"] - 具有默认值的可选参数
|
||||
* @returns {string} 这是结果
|
||||
*/
|
||||
function stringsStrings(p1, p2, p3, p4) {
|
||||
// TODO
|
||||
}
|
||||
```
|
||||
|
||||
同样,对于函数的返回类型:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @return {PromiseLike<string>}
|
||||
*/
|
||||
function ps() {}
|
||||
|
||||
/**
|
||||
* @returns {{ a: string, b: number }} - 可以使用“@returns”和“@return”
|
||||
*/
|
||||
function ab() {}
|
||||
```
|
||||
|
||||
### @typedef, @callback, 和 @param
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @typedef {Object} SpecialType - 创建一个名为“SpecialType”的新类型
|
||||
* @property {string} prop1 - SpecialType 的字符串属性
|
||||
* @property {number} prop2 - SpecialType 的数字属性
|
||||
* @property {number=} prop3 - SpecialType 的可选数字属性
|
||||
* @prop {number} [prop4] - SpecialType 的可选数字属性
|
||||
* @prop {number} [prop5=42] - 具有默认值的 SpecialType 的可选数字属性
|
||||
*/
|
||||
|
||||
/** @type {SpecialType} */
|
||||
var specialTypeObject;
|
||||
specialTypeObject.prop3;
|
||||
```
|
||||
|
||||
您可以在第一行使用 object 或 Object
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @typedef {object} SpecialType1 - 创建一个名为“SpecialType”的新类型
|
||||
* @property {string} prop1 - SpecialType 的字符串属性
|
||||
* @property {number} prop2 - SpecialType 的数字属性
|
||||
* @property {number=} prop3 - SpecialType 的可选数字属性
|
||||
*/
|
||||
|
||||
/** @type {SpecialType1} */
|
||||
var specialTypeObject1;
|
||||
```
|
||||
|
||||
**@param** 允许对一次性类型规范使用类似的语法。 请注意,嵌套的属性名称必须以参数名称为前缀:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @param {Object} options - 形状和上面的SpecialType一样
|
||||
* @param {string} options.prop1
|
||||
* @param {number} options.prop2
|
||||
* @param {number=} options.prop3
|
||||
* @param {number} [options.prop4]
|
||||
* @param {number} [options.prop5=42]
|
||||
*/
|
||||
function special(options) {
|
||||
return (options.prop4 || 1001) + options.prop5;
|
||||
}
|
||||
```
|
||||
|
||||
**@callback** 类似于 **@typedef**,但它指定的是函数类型而不是对象类型:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @callback Predicate
|
||||
* @param {string} data
|
||||
* @param {number} [index]
|
||||
* @returns {boolean}
|
||||
*/
|
||||
|
||||
/** @type {Predicate} */
|
||||
const ok = (s) => !(s.length % 2);
|
||||
```
|
||||
|
||||
当然,这些类型中的任何一种都可以在单行 **@typedef** 中使用 TypeScript 语法声明:
|
||||
|
||||
```javascript
|
||||
/** @typedef {{ prop1: string, prop2: string, prop3?: number }} SpecialType */
|
||||
/** @typedef {(data: string, index?: number) => boolean} Predicate */
|
||||
```
|
||||
|
||||
### @template
|
||||
|
||||
您可以使用 **@template** 标记声明类型参数。 这使您可以创建通用的函数、类或类型:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @template T
|
||||
* @param {T} x - 流向返回类型的通用参数
|
||||
* @returns {T}
|
||||
*/
|
||||
function id(x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
const a = id("string");
|
||||
const b = id(123);
|
||||
const c = id({});
|
||||
```
|
||||
|
||||
使用逗号或多个标签来声明多个类型参数:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @template T,U,V
|
||||
* @template W,X
|
||||
*/
|
||||
```
|
||||
|
||||
您还可以在类型参数名称之前指定类型约束。 只有列表中的第一个类型参数受到约束:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @template {string} K - K 必须是字符串或字符串文字
|
||||
* @template {{ serious(): string }} Seriousalizable - 一定要有 serious 的方法
|
||||
* @param {K} key
|
||||
* @param {Seriousalizable} object
|
||||
*/
|
||||
function seriousalize(key, object) {
|
||||
// ????
|
||||
}
|
||||
```
|
||||
|
||||
最后,您可以为类型参数指定默认值:
|
||||
|
||||
```javascript
|
||||
/** @template [T=object] */
|
||||
class Cache {
|
||||
/** @param {T} initial */
|
||||
constructor(T) {
|
||||
}
|
||||
}
|
||||
let c = new Cache()
|
||||
```
|
||||
|
||||
CLI
|
||||
---
|
||||
|
||||
@ -1656,6 +2032,7 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 编译器选项
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
@ -1668,7 +2045,7 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
|
||||
`--project` _string_ | 编译项目给定其配置文件的路径,或带有 'tsconfig.json' 的文件夹
|
||||
`--showConfig` _boolean_ | 打印最终配置而不是构建
|
||||
`--version` _boolean_ | 打印编译器的版本
|
||||
<!--rehype:className=style-list-->
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 构建选项
|
||||
|
||||
@ -1682,13 +2059,14 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 监听选项
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`--excludeDirectories` _list_ | 从监视进程中删除目录列表
|
||||
`--excludeFiles` _list_ | 从监视模式的处理中删除文件列表
|
||||
`--fallbackPolling` _fixedinterval_, _priorityinterval_, _dynamicpriority_, _fixedchunksize_ | 指定当系统用完本机文件观察器时观察器应使用的方法
|
||||
`--synchronousWatchDirectory` boolean | 在本机不支持递归监视的平台上同步调用回调并更新目录监视程序的状态
|
||||
`--synchronousWatchDirectory` _boolean_ | 在本机不支持递归监视的平台上同步调用回调并更新目录监视程序的状态
|
||||
`--watch` _boolean_ | 观看输入文件
|
||||
`--watchDirectory` _usefsevents_, _fixedpollinginterval_, _dynamicprioritypolling_, _fixedchunksizepolling | 指定在缺少递归文件监视功能的系统上如何监视目录
|
||||
`--watchFile` _fixedpollinginterval_, _prioritypollinginterval_, _dynamicprioritypolling_, _fixedchunksizepolling_, _usefsevents_, _usefseventsonparentdirectory_ | 指定 TypeScript 监视模式的工作方式
|
||||
@ -1697,6 +2075,42 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
|
||||
TSConfig Ref
|
||||
---
|
||||
|
||||
### 可完成 90% 的任务
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```js
|
||||
"compilerOptions": {
|
||||
/* 基本选项: */
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"target": "es2022",
|
||||
"verbatimModuleSyntax": true,
|
||||
"allowJs": true,
|
||||
"resolveJsonModule": true,
|
||||
"moduleDetection": "force",
|
||||
/* 严格 */
|
||||
"strict": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
/* 如果使用 TypeScript 进行转译: */
|
||||
"moduleResolution": "NodeNext",
|
||||
"module": "NodeNext",
|
||||
/* 如果不使用 TypeScript 进行转译: */
|
||||
"moduleResolution": "Bundler",
|
||||
"module": "ESNext",
|
||||
"noEmit": true,
|
||||
/* 如果你的代码在 DOM 中运行: */
|
||||
"lib": ["es2022", "dom", "dom.iterable"],
|
||||
/* 如果你的代码不在 DOM 中运行: */
|
||||
"lib": ["es2022"],
|
||||
/* 如果你正在构建一个库: */
|
||||
"declaration": true,
|
||||
/* 如果您正在 monorepo 中构建库: */
|
||||
"composite": true,
|
||||
"sourceMap": true,
|
||||
"declarationMap": true
|
||||
}
|
||||
```
|
||||
|
||||
### 顶层配置
|
||||
|
||||
:- | --
|
||||
@ -1720,7 +2134,7 @@ TSConfig Ref
|
||||
```
|
||||
|
||||
### 类型检查(compilerOptions)
|
||||
<!--rehype:wrap-class=row-span-4-->
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
@ -1746,7 +2160,7 @@ TSConfig Ref
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 模块(compilerOptions)
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
@ -1765,7 +2179,7 @@ TSConfig Ref
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### Emit(compilerOptions)
|
||||
<!--rehype:wrap-class=row-span-6-->
|
||||
<!--rehype:wrap-class=row-span-5-->
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
@ -1794,14 +2208,12 @@ TSConfig Ref
|
||||
`stripInternal` [#](https://www.typescriptlang.org/zh/tsconfig#stripInternal) | 不要为在其 JSDoc 注释中具有 @internal 注释的代码发出声明
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### JavaScript 支持(compilerOptions)
|
||||
### 完整性(compilerOptions)
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`allowJs` [#](https://www.typescriptlang.org/zh/tsconfig#allowJs) | 允许 JavaScript 文件在你的工程中被引入,而不是仅仅允许 .ts 和 .tsx 文件
|
||||
`checkJs` [#](https://www.typescriptlang.org/zh/tsconfig#checkJs) | 与 allowJs 配合使用,当 checkJs 被启用时,JavaScript 文件中会报告错误
|
||||
`maxNodeModuleJsDepth` [#](https://www.typescriptlang.org/zh/tsconfig#maxNodeModuleJsDepth) | 在 node_modules 下搜索和加载 JavaScript 文件的最大依赖深度
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
`skipDefaultLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipDefaultLibCheck) | 请改用 `skipLibCheck`
|
||||
`skipLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipLibCheck) | 跳过声明文件的类型检查
|
||||
|
||||
### 编辑器支持(compilerOptions)
|
||||
|
||||
@ -1811,6 +2223,24 @@ TSConfig Ref
|
||||
`plugins` [#](https://www.typescriptlang.org/zh/tsconfig#plugins) | 可在编辑器内运行的语言服务插件列表
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 输出格式(compilerOptions)
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`noErrorTruncation` [#](https://www.typescriptlang.org/zh/tsconfig#noErrorTruncation) | 不要截断错误消息
|
||||
`preserveWatchOutput` [#](https://www.typescriptlang.org/zh/tsconfig#preserveWatchOutput) | 保留监视输出
|
||||
`pretty` [#](https://www.typescriptlang.org/zh/tsconfig#pretty) | 使用颜色和上下文对错误和消息进行样式化,默认情况下启用
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### JavaScript 支持(compilerOptions)
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`allowJs` [#](https://www.typescriptlang.org/zh/tsconfig#allowJs) | 允许 JavaScript 文件在你的工程中被引入,而不是仅仅允许 .ts 和 .tsx 文件
|
||||
`checkJs` [#](https://www.typescriptlang.org/zh/tsconfig#checkJs) | 与 allowJs 配合使用,当 checkJs 被启用时,JavaScript 文件中会报告错误
|
||||
`maxNodeModuleJsDepth` [#](https://www.typescriptlang.org/zh/tsconfig#maxNodeModuleJsDepth) | 在 node_modules 下搜索和加载 JavaScript 文件的最大依赖深度
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 互操作约束(compilerOptions)
|
||||
|
||||
:- | --
|
||||
@ -1822,8 +2252,20 @@ TSConfig Ref
|
||||
`preserveSymlinks` [#](https://www.typescriptlang.org/zh/tsconfig#preserveSymlinks) | 保留符号链接
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 编译器诊断(compilerOptions)
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`diagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#diagnostics) | 用于输出调试信息
|
||||
`explainFiles` [#](https://www.typescriptlang.org/zh/tsconfig#explainFiles) | 打印 TypeScript 视为项目一部分的文件的名称以及它们是编译一部分的原因
|
||||
`extendedDiagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#extendedDiagnostics) | 您可以使用此标志来发现 TypeScript 在编译时将时间花在哪里
|
||||
`generateCpuProfile` [#](https://www.typescriptlang.org/zh/tsconfig#generateCpuProfile) | 此选项使您有机会让 TypeScript 在编译器运行期间发出 v8 CPU 配置文件
|
||||
`listEmittedFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listEmittedFiles) | 将编译过程中生成的文件的名称打印到终端
|
||||
`listFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listFiles) | 打印编译部分文件的名称
|
||||
`traceResolution` [#](https://www.typescriptlang.org/zh/tsconfig#traceResolution) | 当您尝试调试未包含模块的原因时
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 向后兼容性(compilerOptions)
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
@ -1836,13 +2278,6 @@ TSConfig Ref
|
||||
`suppressImplicitAnyIndexErrors` [#](https://www.typescriptlang.org/zh/tsconfig#suppressImplicitAnyIndexErrors) | 抑制隐式任何索引错误
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 完整性(compilerOptions)
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`skipDefaultLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipDefaultLibCheck) | 请改用 `skipLibCheck`
|
||||
`skipLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipLibCheck) | 跳过声明文件的类型检查
|
||||
|
||||
### 语言与环境(compilerOptions)
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
@ -1862,15 +2297,6 @@ TSConfig Ref
|
||||
`useDefineForClassFields` [#](https://www.typescriptlang.org/zh/tsconfig#useDefineForClassFields) | 为类字段使用定义
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 输出格式(compilerOptions)
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`noErrorTruncation` [#](https://www.typescriptlang.org/zh/tsconfig#noErrorTruncation) | 不要截断错误消息
|
||||
`preserveWatchOutput` [#](https://www.typescriptlang.org/zh/tsconfig#preserveWatchOutput) | 保留监视输出
|
||||
`pretty` [#](https://www.typescriptlang.org/zh/tsconfig#pretty) | 使用颜色和上下文对错误和消息进行样式化,默认情况下启用
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 项目(compilerOptions)
|
||||
|
||||
:- | --
|
||||
@ -1883,19 +2309,6 @@ TSConfig Ref
|
||||
`tsBuildInfoFile` [#](https://www.typescriptlang.org/zh/tsconfig#tsBuildInfoFile) | 这个选项可以让您指定一个文件来存储增量编译信息,以作为复合工程的一部分,从而可以更快的构建更大的 TypeScript 代码库
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 编译器诊断(compilerOptions)
|
||||
|
||||
:- | --
|
||||
:- | --
|
||||
`diagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#diagnostics) | 用于输出调试信息
|
||||
`explainFiles` [#](https://www.typescriptlang.org/zh/tsconfig#explainFiles) | 打印 TypeScript 视为项目一部分的文件的名称以及它们是编译一部分的原因
|
||||
`extendedDiagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#extendedDiagnostics) | 您可以使用此标志来发现 TypeScript 在编译时将时间花在哪里
|
||||
`generateCpuProfile` [#](https://www.typescriptlang.org/zh/tsconfig#generateCpuProfile) | 此选项使您有机会让 TypeScript 在编译器运行期间发出 v8 CPU 配置文件
|
||||
`listEmittedFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listEmittedFiles) | 将编译过程中生成的文件的名称打印到终端
|
||||
`listFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listFiles) | 打印编译部分文件的名称
|
||||
`traceResolution` [#](https://www.typescriptlang.org/zh/tsconfig#traceResolution) | 当您尝试调试未包含模块的原因时
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 监听选项(watchOptions)
|
||||
|
||||
:- | --
|
||||
|
@ -184,7 +184,7 @@ G gg H M L k j ▶ print("to")
|
||||
:- | -
|
||||
`v` | 进入可视化模式
|
||||
`V` | 进入视线模式
|
||||
`<C-v>` | 进入可视化阻挡模式
|
||||
`<C-v>` | 进入可视块模式
|
||||
`ggVG` | 选择所有文本
|
||||
`>` _/_ `<` | 向右/向左移动文本
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
@ -520,7 +520,7 @@ YAML 参考
|
||||
---
|
||||
|
||||
- [YAML Reference Card](https://yaml.org/refcard.html) _(yaml.org)_
|
||||
- [Learn X in Y minutes](https://learnxinyminutes.com/docs/yaml/) _(learnxinyminutes.com)_
|
||||
- [Learn X in Y minutes](https://learnxinyminutes.com/docs/zh-cn/yaml-cn/) _(learnxinyminutes.com)_
|
||||
- [YAML lint online](http://www.yamllint.com/) _(yamllint.com)_
|
||||
- [INI 格式配置文件备忘清单](./ini.md) _(jaywcjlove.github.io)_
|
||||
- [TOML 格式配置文件备忘清单](./toml.md) _(jaywcjlove.github.io)_
|
||||
|
151
docs/zip.md
Normal file
@ -0,0 +1,151 @@
|
||||
Zip 备忘清单
|
||||
====
|
||||
|
||||
Zip 命令用于在 Linux 系统上创建、压缩和解压缩 zip 文件
|
||||
|
||||
入门
|
||||
----
|
||||
|
||||
### Zip 用法
|
||||
|
||||
```shell
|
||||
$ zip [-选项] [-b 路径] [-t 日期] [-n 后缀名] [压缩文件列表] [-xi 列表]
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
默认操作是添加或替换压缩文件列表中的压缩文件条目,压缩文件列表可以包括特殊名称 `-`,压缩标准输入数据
|
||||
|
||||
- `Zip` 是一个创建和管理 `zip` 文件的压缩工具
|
||||
- `Unzip` 是一个用于解压缩 `zip` 文件的工具
|
||||
|
||||
```shell
|
||||
$ yum install -y unzip zip
|
||||
```
|
||||
|
||||
### 选项示例
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
参数 | 描述 | 参数 | 描述
|
||||
:--- | :--- | :--- | :---
|
||||
`-f` | **freshen:** 只压缩具有变化的文件 | `-u` | **update:** 只压缩变化的或新增的文件
|
||||
`-d` | 在压缩文件中删除项目 | `-m` | 移动到压缩文件中(删除操作系统文件)
|
||||
`-r` | 递归进入目录 | `-j` | 不记录目录名
|
||||
`-0` | 仅存储 | `-l` | 将`LF`转换为`CRLF`(-ll CRLF转LF)
|
||||
`-1` | 更快压缩 | `-9` | 更好压缩
|
||||
`-q` | 安静操作 | `-v` | 显示详细操作/打印版本信息
|
||||
`-c` | 增加注释 | `-z` | 添加压缩文件注释
|
||||
`-@` | 从标准输入流读取文件列表 | `-o` | 让压缩文件日期与最近更新的文件日期一致
|
||||
`-x` | 排除以下文件/目录 | `-i` | 仅添加以下文件/目录
|
||||
`-F` | 修复压缩文件(-FF尝试更加努力) | `-D` | 不添加目录到压缩文件中
|
||||
`-A` | 调整自解压可执行文件 | `-J` | 忽略压缩文件的前缀(解压自解压文件)
|
||||
`-T` | 检查压缩文件是否完整 | `-X` | 排除额外的文件属性
|
||||
`-y` | 将符号链接作为链接存储 | `-h` | 显示此帮助文件
|
||||
`-n` | 不压缩以下文件类型 | `-w` | 在压缩操作之前提示
|
||||
`-V` | 保留VMS版本号 | `-L` | 使一些名称小写
|
||||
`-M` | 通过“more”分页器进行数据流输出 | `-O` | CHARSET指定字符编码以供压缩条目使用
|
||||
`-k` | 加密压缩文件项 | `-s` | 使用正则表达式选择要包括的条目
|
||||
`-u@` | 从标准输入读取参数 | `-vV` | 仅包括与VMS版本字符串匹配的条目
|
||||
`-z` | 将zip放入存档模式 | `-Z` | `zipinfo` 模式
|
||||
`-C` | 大小写不敏感匹配文件名(需要UTF-8文件系统;参阅--Ohelp) | |
|
||||
`-2**` | 通过第二层压缩 | `-3**` | 通过第三层压缩
|
||||
`-4**` | 通过第四层压缩 | `-d**` | 仅提取这些文件(仅限zipinfo模式)
|
||||
`-j**` | 忽略 `zipfile` 的前缀(解压模式) | |
|
||||
|
||||
`**` 这些级别是数据压缩算法,具有 gzip(1) 兼容的级别 `1-9`, 以及特殊的 `0` 表示无压缩和 `-1` (最快)表示压缩数据以"存储"方法机会存储在ZIP文件中 的未压缩数据。
|
||||
|
||||
### 语法形式和选项
|
||||
|
||||
:- | :-
|
||||
:- | :-
|
||||
**基本语法** | `zip [选项] 文件名.zip [文件列表]`
|
||||
**压缩目录** | `zip -r [选项] 文件名.zip 目录名称`
|
||||
**将文件添加到现有压缩文件** | `zip -u [选项] 文件名.zip 文件名称`
|
||||
**解压缩文件** | `unzip [选项] 文件名.zip`
|
||||
**将 zip 文件解压缩到指定目录** | `unzip [选项] 文件名.zip -d 目录名称`
|
||||
**列出 zip 文件中的内容** | `unzip -l 文件名.zip`
|
||||
**将 zip 文件加密** | `zip -e [选项] 文件名.zip 文件名称`
|
||||
**将 zip 文件解密** | `unzip [选项] 文件名.zip(然后输入密码解密)`
|
||||
**将 zip 文件中的文件转成 UTF-8 编码** | `zip -O utf-8 -r [选项] 文件名.zip 文件列表`
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
Zip 压缩示例
|
||||
--------
|
||||
|
||||
### 创建新的 zip 压缩文件
|
||||
|
||||
```shell
|
||||
$ zip filename.zip file1 file2 folder1
|
||||
```
|
||||
|
||||
### 将文件添加到现有的 zip 压缩文件
|
||||
|
||||
```shell
|
||||
$ zip -r filename.zip file3 folder2
|
||||
```
|
||||
|
||||
### 压缩文件排除文件
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```shell
|
||||
$ zip -r basic.zip example/basic/ -x "example/basic/node_modules/*" -x "example/basic/build/*" -x "example/basic/coverage/*"
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
压缩 `example/basic/` 目录内容到 `basic.zip` 压缩包中 `-x` 指定排除目录,注意**没有双引**号将不起作用
|
||||
|
||||
### 将大文件分割成多个zip文件
|
||||
|
||||
```shell
|
||||
$ zip -s 10M -r filename.zip largefile
|
||||
```
|
||||
|
||||
### 将zip文件加密
|
||||
|
||||
```shell
|
||||
$ zip -e secure.zip file4
|
||||
```
|
||||
|
||||
### 更新zip文件中的文件
|
||||
|
||||
```shell
|
||||
$ zip -u filename.zip file5
|
||||
```
|
||||
|
||||
### 将zip文件中的文件转成UTF-8编码
|
||||
|
||||
```shell
|
||||
$ zip -O utf-8 -r utf8zip.zip utf8file
|
||||
```
|
||||
|
||||
Zip 解压示例
|
||||
--------
|
||||
|
||||
### 将zip文件解密
|
||||
|
||||
```shell
|
||||
$ unzip secure.zip(然后输入密码解密)
|
||||
```
|
||||
|
||||
### 解压缩zip文件
|
||||
|
||||
```shell
|
||||
$ unzip filename.zip
|
||||
```
|
||||
|
||||
### 将zip文件解压缩到指定目录
|
||||
|
||||
```shell
|
||||
$ unzip filename.zip -d folder3
|
||||
```
|
||||
|
||||
### 列出zip文件中的内容
|
||||
|
||||
```shell
|
||||
$ unzip -l filename.zip
|
||||
```
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
- [Zip 官网](https://www.info-zip.org/Zip.html) _(info-zip.org)_
|
||||
- [Zip 命令帮助文档](https://jaywcjlove.github.io/linux-command/c/zip.html) _(info-zip.org)_
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wcj/reference",
|
||||
"version": "1.35.0",
|
||||
"version": "1.40.0",
|
||||
"description": "为开发人员分享快速参考备忘单(主要是方便自己)。",
|
||||
"author": "jaywcjlove",
|
||||
"license": "MIT",
|
||||
@ -30,9 +30,9 @@
|
||||
"husky": "^8.0.1",
|
||||
"lint-staged": "^13.0.3",
|
||||
"prettier": "^2.7.1",
|
||||
"refs-cli": "^1.2.12",
|
||||
"refs-cli": "^1.5.1",
|
||||
"markdownlint": "^0.27.0",
|
||||
"markdownlint-cli": "^0.32.2"
|
||||
"markdownlint-cli": "^0.33.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
|