Compare commits

...

335 Commits

Author SHA1 Message Date
01aad1814b chore(deps): update dependency markdownlint to ^0.37.0 2025-04-03 15:51:34 +00:00
1b4be7d870 chore: update sponsorship support #947 2025-04-03 23:50:56 +08:00
ba9b4a5ca1 doc: update README.md. 2025-04-02 15:09:08 +00:00
15cf70fb50 doc: update CONTRIBUTING.md. 2025-04-02 15:09:07 +00:00
b463143e63 doc: update docs/vue.md (#948) 2025-04-02 23:08:07 +08:00
740b2b8871 doc: update docs/vue.md (#948) 2025-04-02 23:05:25 +08:00
9eb9edd04a doc: Update README.md 2025-04-01 23:54:24 +08:00
882efb7310 doc: update README.md. 2025-04-01 11:47:39 +00:00
a1dfc43d67 doc: update CONTRIBUTING.md. 2025-04-01 11:47:38 +00:00
c9e729bc7e doc: Update README.md #102 2025-04-01 19:46:19 +08:00
46e0ef5443 doc: Update README.md #102 2025-03-27 12:33:55 +08:00
c9ae7d673e doc: Update README.md #102 2025-03-27 09:48:32 +08:00
adf39710da doc: update README.md. 2025-03-26 09:53:16 +00:00
b7f0db51fe doc: update CONTRIBUTING.md. 2025-03-26 09:53:15 +00:00
c99af98f7d doc: Update README.md #102 2025-03-26 17:52:13 +08:00
2e96576084 doc: updat docs/vue.md (#943)
* 新增性能优化板块

* Move Performance Optimization introduction to ### 介绍 section

* 我在 `# 性能优化` 章节中又新增了三个优化方法:虚拟列表(Virtual Scrolling)、按需加载资源(Lazy Loading Resources)和优化事件监听(Event Delegation),每个方法都附带了代码示例和说明。这些方法可以进一步丰富优化策略,覆盖更多场景。
2025-03-22 09:22:28 +08:00
17921854d3 doc: update README.md. 2025-03-18 15:58:06 +00:00
f401c87bbf doc: update CONTRIBUTING.md. 2025-03-18 15:58:05 +00:00
a9974dfd20 doc: Update README.md 2025-03-18 23:56:50 +08:00
0fd9e8af65 doc: update README.md. 2025-03-13 04:10:26 +00:00
9f2ad7a295 doc: update CONTRIBUTING.md. 2025-03-13 04:10:25 +00:00
0c618e1c01 doc: update docs/mysql.md (#941)
Co-authored-by: null <shanhai1204@gmail.com>
2025-03-13 12:09:28 +08:00
19e258c591 doc: Update golang.md (#938) 2025-03-11 23:44:43 +08:00
13701d39ee doc: update README.md. 2025-03-10 09:54:24 +00:00
a5759ea2d3 doc: update CONTRIBUTING.md. 2025-03-10 09:54:23 +00:00
0c78352ef7 doc: Update cpp.md (#935) 2025-03-10 17:53:22 +08:00
5e5666d347 doc: update README.md. 2025-03-10 03:15:01 +00:00
884e8dbeff doc: update CONTRIBUTING.md. 2025-03-10 03:15:00 +00:00
e3dbd1b196 doc: Update cpp.md (#933) 2025-03-10 11:14:54 +08:00
828afdad47 doc: Update java.md (#934)
* doc: Update java.md

📝 修正注释中的错误

* doc: Update java.md

📝 修正小标题的翻译错误
2025-03-10 11:13:56 +08:00
c99f3c8788 doc: update README.md. 2025-03-06 04:51:57 +00:00
cec3255efc doc: update CONTRIBUTING.md. 2025-03-06 04:51:56 +00:00
a0a957483c doc(git): update docs/git.md (#931) 2025-03-06 12:50:56 +08:00
8ec4235082 doc: update README.md. 2025-03-04 16:45:46 +00:00
6f95c250e6 doc: update CONTRIBUTING.md. 2025-03-04 16:45:45 +00:00
792451b75f doc: Update java.md (#930)
✏️ 为 Arrays.deepToString(Object[] a) 添加说明注释
🐛 修正变量名拼写错误
2025-03-05 00:44:41 +08:00
d57b60064c doc: update README.md. 2025-03-01 22:30:28 +00:00
3ec25b8951 doc: update CONTRIBUTING.md. 2025-03-01 22:30:27 +00:00
6d86d679f0 docs: optimize latex.md (#929)
* docs:  unified title language and format

- Translate English titles into Chinese ones
- Delete English titles

* docs: 微分符号 `d` 使用正体

* docs: modify the structure of 入门/介绍
2025-03-02 06:29:10 +08:00
95d21e81a9 doc: update README.md. 2025-02-27 08:19:24 +00:00
99c30d38fd doc: update CONTRIBUTING.md. 2025-02-27 08:19:23 +00:00
7cb9f0e058 doc: update docs/cs.md (#926) 2025-02-27 16:17:57 +08:00
f945549091 doc: update README.md. 2025-02-27 08:02:42 +00:00
229b4af4a5 doc: update CONTRIBUTING.md. 2025-02-27 08:02:41 +00:00
b673ede608 doc: update README.md. 2025-02-27 08:01:42 +00:00
2297475e5a doc: update CONTRIBUTING.md. 2025-02-27 08:01:41 +00:00
03e52c1126 doc: update docs/cs.md (#926) 2025-02-27 16:01:16 +08:00
e544b8f7b3 doc: update docs/python.md (#925) 2025-02-27 16:00:44 +08:00
a7b01e4ce0 doc: update README.md. 2025-02-25 06:25:02 +00:00
ea4637c28f doc: update CONTRIBUTING.md. 2025-02-25 06:25:01 +00:00
fe047b1e5a feat: add time-zones.md #924 2025-02-25 14:22:51 +08:00
4c8694d784 doc: Update README.md 2025-02-18 08:51:31 +08:00
61046b519b released v1.46.0 2025-02-13 16:12:20 +08:00
8af3950731 doc: update README.md. 2025-02-13 08:10:35 +00:00
3f329c15ec doc: update CONTRIBUTING.md. 2025-02-13 08:10:35 +00:00
485d80489b doc: Update README.md 2025-02-13 16:09:38 +08:00
0eb3ac6165 doc: Update README.md 2025-02-12 11:08:53 +08:00
869f3de520 doc: Update README.md 2025-01-28 00:40:58 +08:00
da9780f4a7 doc: update docs/yazi.md 2025-01-24 21:48:08 +08:00
8807e483fc doc: update README.md. 2025-01-24 13:07:10 +00:00
d5d79d72c6 doc: update CONTRIBUTING.md. 2025-01-24 13:07:09 +00:00
db215dcb2d feat: add docs/yazi.md (#919)
* add yazi

* update yazi.md

* update yazi.md
2025-01-24 21:05:49 +08:00
7f4fd32453 doc: update README.md. 2025-01-23 04:27:27 +00:00
81d60eacaf doc: update CONTRIBUTING.md. 2025-01-23 04:27:27 +00:00
453a8b9a05 doc: Update README.md #102 2025-01-23 12:26:28 +08:00
b00b74f695 doc: Update README.md 2025-01-12 16:57:52 +08:00
21b8c17818 doc: update README.md. 2025-01-10 06:54:16 +00:00
a54ceebf02 doc: update CONTRIBUTING.md. 2025-01-10 06:54:15 +00:00
2771b42a96 doc: Update emoji.md (#915)
now!
2025-01-10 14:53:16 +08:00
579d1de673 doc: Update README.md 2025-01-06 23:11:20 +08:00
daaa4c5f09 doc: Update README.md 2025-01-05 22:55:21 +08:00
b414893b15 doc: update README.md. 2025-01-04 07:20:54 +00:00
072ddcca73 doc: update CONTRIBUTING.md. 2025-01-04 07:20:53 +00:00
5e773f0696 doc: update README.md 2025-01-04 15:19:42 +08:00
3bcb61d409 doc: update java.md (#914)
* method intern can get a ref of the same string in the string pool

* doc: update java.md
2025-01-02 11:11:06 +08:00
ad9aaf759e doc: update README.md. 2025-01-01 13:36:17 +00:00
211809a177 doc: update CONTRIBUTING.md. 2025-01-01 13:36:16 +00:00
e7b8958368 doc: update c.md document (#913) 2025-01-01 21:33:24 +08:00
d7df8bc6fe doc: update c.md document (#913)
* modify c tutor

* Modify c.md
2025-01-01 17:30:51 +08:00
ba05c9d952 doc: update README.md. 2025-01-01 03:09:05 +00:00
d02dc80480 doc: update CONTRIBUTING.md. 2025-01-01 03:09:04 +00:00
eb1157523d doc: Update README.md 2025-01-01 11:08:05 +08:00
6c8217202a doc: update c.md (#911) 2024-12-30 03:01:44 +08:00
b3893d8478 doc: update README.md. 2024-12-28 02:06:34 +00:00
006c4bf587 doc: update CONTRIBUTING.md. 2024-12-28 02:06:33 +00:00
0c7e4081a5 doc: Update README.md #102 2024-12-28 10:05:33 +08:00
cfac374221 doc: update docs/ports.md #854 (#910) 2024-12-24 20:43:20 +08:00
579d25d3a1 feat: add docs/ports.md #854 (#910) 2024-12-24 20:24:16 +08:00
2cbafe0ef5 doc: update README.md. 2024-12-23 14:10:58 +00:00
a9e3fb135e doc: update CONTRIBUTING.md. 2024-12-23 14:10:57 +00:00
44e775a1ee doc: update docs/java.md (#909) 2024-12-23 22:09:55 +08:00
933b1957e4 doc: Update README.md #102 2024-12-20 22:12:44 +08:00
20ecc2eef2 doc: Update README.md #102 2024-12-20 20:09:18 +08:00
4750e61a30 doc: update README.md. 2024-12-18 01:28:23 +00:00
91b022bf4d doc: update CONTRIBUTING.md. 2024-12-18 01:28:22 +00:00
ad3c46c009 doc: Update linux-command.md (#907)
feat: 新增rsync技巧
2024-12-18 09:27:02 +08:00
4917ecf3a7 doc: update README.md. 2024-12-11 13:51:37 +00:00
cf997d6ac0 doc: update CONTRIBUTING.md. 2024-12-11 13:51:36 +00:00
435cfdf739 doc: Update README.md #102 2024-12-11 21:50:31 +08:00
4412bf6a01 doc: Update README.md #102 2024-11-24 20:49:35 +08:00
da39a1ad3d doc: update README.md. 2024-11-18 07:00:28 +00:00
02bb059452 doc: update CONTRIBUTING.md. 2024-11-18 07:00:27 +00:00
5b28ed2caf doc: Update README.md #102 2024-11-18 14:59:29 +08:00
7eb30c080a doc: update README.md. 2024-11-12 15:43:43 +00:00
3c6c459b17 doc: update CONTRIBUTING.md. 2024-11-12 15:43:41 +00:00
5cb04086b1 doc: Modify Swift && SwiftUI (#852) 2024-11-12 23:41:59 +08:00
27c3a9578f doc: update README.md. 2024-11-11 11:23:25 +00:00
d7b1d03761 doc: update CONTRIBUTING.md. 2024-11-11 11:23:24 +00:00
f03cc68c0d doc: update docs/swift.md (#850) 2024-11-11 19:22:25 +08:00
3a41d66cef doc: update README.md. 2024-11-09 14:04:50 +00:00
0f52c6fdfe doc: update CONTRIBUTING.md. 2024-11-09 14:04:49 +00:00
c63d27edcf doc: update docs/css.md (#849)
* 删除一个错误字符

* Update css.md
2024-11-09 22:03:51 +08:00
6b9ef0aa43 doc: update README.md. 2024-11-06 12:12:20 +00:00
7c220e3efc doc: update CONTRIBUTING.md. 2024-11-06 12:12:19 +00:00
a73f837fc1 doc: update react.md 2024-11-06 20:10:53 +08:00
4ccef1281f doc: update README.md. 2024-11-06 01:38:27 +00:00
f0cfadf240 doc: update CONTRIBUTING.md. 2024-11-06 01:38:26 +00:00
67c9cc4d8e doc: update docs/react.md 2024-11-06 09:31:59 +08:00
a92759f0ed doc: update docs/sqlite.md (#848) 2024-11-06 08:22:52 +08:00
e9a61371f0 doc: update README.md. 2024-11-05 23:18:03 +00:00
881dfa5df3 doc: update CONTRIBUTING.md. 2024-11-05 23:18:02 +00:00
bbd2fa2ebf feat: add sqlite reference (#848) 2024-11-06 07:17:03 +08:00
af5e05b7d8 doc: update README.md. 2024-11-01 04:15:06 +00:00
3986b1ca29 doc: update CONTRIBUTING.md. 2024-11-01 04:15:03 +00:00
416e1ff9fd doc: Update README.md (#847) #102
域名更换: ref.server.wiki 更换为 ref.docflow.cn
2024-11-01 12:13:49 +08:00
1f0fc6c925 doc: Update README.md 2024-10-30 06:49:52 +08:00
ad2fd7b642 feat: add docs/canvas.md 2024-10-30 06:44:18 +08:00
345e968c4c doc: add docs/github-cli.md 2024-10-30 06:30:34 +08:00
72b973a923 doc: update docs/github-copilot.md 2024-10-30 06:00:08 +08:00
8ae69f2386 doc: update docs/github-copilot.md 2024-10-30 05:41:14 +08:00
29bb4e487c doc: update docs/chatgpt.md 2024-10-30 05:18:31 +08:00
3519f863f4 website: update powershell logo. #845 2024-10-30 05:18:31 +08:00
df32d5a429 doc: update README.md. 2024-10-29 13:29:12 +00:00
e3e0896834 doc: update CONTRIBUTING.md. 2024-10-29 13:29:11 +00:00
71c4aea9ca doc: update docs/powershell.md #845 2024-10-29 21:27:34 +08:00
3662bb703c doc: update docs/powershell.md #845 2024-10-29 20:09:26 +08:00
2c6244b6f8 feat:add powershell reference (#845) 2024-10-29 20:01:50 +08:00
292551a8f2 doc: update docs/cpp.md 2024-10-28 19:21:17 +08:00
af2f380a18 doc: update README.md. 2024-10-28 11:15:04 +00:00
9411c434a8 doc: update CONTRIBUTING.md. 2024-10-28 11:15:03 +00:00
02f1d13471 doc: Update README.md #102 2024-10-28 19:13:43 +08:00
37f8c7d69e doc: update README.md. 2024-10-18 05:45:35 +00:00
aa52a25839 doc: update CONTRIBUTING.md. 2024-10-18 05:45:34 +00:00
d41aaa9569 fix: typo in postgres (#842) 2024-10-18 13:44:37 +08:00
32cd8e4d5d doc: update README.md. 2024-10-16 09:11:47 +00:00
cf9c76d5c7 doc: update CONTRIBUTING.md. 2024-10-16 09:11:46 +00:00
15323378b5 doc: update docs/springboot.md (#841)
* Update docker.md

统一端口号

* Update springboot.md

MySQL 5.0 和 8.0 的数据库驱动类名差异
2024-10-16 17:10:40 +08:00
7fb6ce9190 website: update touch-icon. 2024-10-15 04:15:52 +08:00
145aa54a4e website: modify favicon. #840 2024-10-15 04:04:26 +08:00
1e22344f72 website: add webpage icon. #840 2024-10-15 04:04:26 +08:00
596bff3f4a doc: Update README.md #102 2024-10-14 23:20:55 +08:00
30f8feb59b doc: update README.md. 2024-10-13 06:38:06 +00:00
81596b6c88 doc: update CONTRIBUTING.md. 2024-10-13 06:38:05 +00:00
612f874723 doc: update docker.md (#839)
统一端口号
2024-10-13 14:37:07 +08:00
51d30f35d2 doc: update README.md. 2024-10-12 09:46:14 +00:00
804e6ef7eb doc: update CONTRIBUTING.md. 2024-10-12 09:46:13 +00:00
e3628fc62d doc: update docker.md & linux-command.md & nginx.md (#838)
* doc: update linux-command.md

* 增加代理构建

* 删除上次提交多余
2024-10-12 17:45:12 +08:00
184ec1c187 doc: update README.md. 2024-10-11 08:57:52 +00:00
0be49cd510 doc: update CONTRIBUTING.md. 2024-10-11 08:57:51 +00:00
f6fe236778 doc: update docs/nginx.md (#836) 2024-10-11 16:56:19 +08:00
b6d62f4f74 doc: update README.md. 2024-10-11 08:48:56 +00:00
4c67490ade doc: update CONTRIBUTING.md. 2024-10-11 08:48:55 +00:00
3749de233c doc: update docs/nginx.md (#836) 2024-10-11 16:47:53 +08:00
a69be1efba doc: update docs/css.md 2024-10-03 14:20:53 +08:00
b0444f82bf doc: update README.md. 2024-09-30 03:48:01 +00:00
c1dd21bf0c doc: update CONTRIBUTING.md. 2024-09-30 03:48:00 +00:00
c249e0e609 doc: update docs/ffmpeg.md (#835) 2024-09-30 11:46:54 +08:00
0fc608a1ff doc: update README.md. 2024-09-29 10:30:51 +00:00
c0d987694e doc: update CONTRIBUTING.md. 2024-09-29 10:30:50 +00:00
a74c7e2092 doc: update docs/vue.md #832 2024-09-29 18:29:17 +08:00
88559b491c chore(deps): update dependency refs-cli to v^1.6.0 2024-09-29 18:28:29 +08:00
eeb42297ac doc: update README.md. 2024-09-25 15:54:25 +00:00
70842a31b5 doc: update CONTRIBUTING.md. 2024-09-25 15:54:24 +00:00
5ffc6faf3d docs: update vue.md (#832)
* doc:update docs/flutter.md

* docs:update docs/flutter.md

* docs:update docs/flutter.md

* docs:update vue.md & flutter.md
2024-09-25 23:53:15 +08:00
ade6fbe3d0 doc: update docs/flutter.md #830 2024-09-24 15:00:38 +08:00
feba5e1704 doc: update docs/vim.md 2024-09-24 14:45:50 +08:00
ce1e1a0c1d doc: update README.md. 2024-09-24 06:06:35 +00:00
661ee94e68 doc: update CONTRIBUTING.md. 2024-09-24 06:06:34 +00:00
93e3166fc5 doc: Update README.md #102 2024-09-24 14:05:27 +08:00
33909b96f8 doc: update README.md. 2024-09-22 15:29:26 +00:00
001388aa4a doc: update CONTRIBUTING.md. 2024-09-22 15:29:25 +00:00
33683eab41 docs:update /docs/flutter.md (#830)
* doc:update docs/flutter.md

* docs:update docs/flutter.md

* docs:update docs/flutter.md
2024-09-22 23:28:23 +08:00
77b2c7a133 doc: update docs/flutter.md (#828) 2024-09-21 23:31:54 +08:00
f510d354af doc: Update README.md #102 2024-09-20 19:31:18 +08:00
f549244389 doc: update docs/symbol-code.md fixed #823 2024-09-17 22:10:36 +08:00
2bac216f98 doc: update docs/mysql.md fixed #827 2024-09-17 20:35:23 +08:00
acf4c11182 doc: update README.md. 2024-09-16 17:07:44 +00:00
dbc29e409a doc: update CONTRIBUTING.md. 2024-09-16 17:07:43 +00:00
0fb45105c9 doc: Update README.md 2024-09-17 01:06:40 +08:00
ddc7f2dd47 docs: update docs/c.md (#821) 2024-09-12 22:53:31 +08:00
660dfe103d doc: update docs/docker.md 2024-08-29 17:23:26 +08:00
cdeeeb14bb doc: update README.md. 2024-08-26 11:44:41 +00:00
22f2c1472b doc: update CONTRIBUTING.md. 2024-08-26 11:44:39 +00:00
ea3391734b released v1.45.0 2024-08-26 19:42:59 +08:00
5f90dd9265 doc: update README.md. 2024-08-19 07:19:15 +00:00
638fb0bbce doc: update CONTRIBUTING.md. 2024-08-19 07:19:14 +00:00
58efbde216 doc: update docs/minio.md #813 2024-08-19 15:18:05 +08:00
d604a0d557 fix: Fixed description of math function (#817)
* fix: Fixed description of math.sqrt function

* fix: fix math.asin description

* Update lua.md
2024-08-18 17:58:38 +08:00
c4ebb484cd feat: add minio reference (#813)
* feat: add minio reference

* fix:alter minio.md
2024-08-15 22:45:46 +08:00
2307a5796a doc: update README.md. 2024-08-15 01:10:49 +00:00
5ea93312bd doc: update CONTRIBUTING.md. 2024-08-15 01:10:48 +00:00
f0da2a3397 doc: update docs/dart.md (#814)
### Current behavior
The current asynchronous login sample code has the following issues:
1. The `main` function tries to use `await userName()`, but `userName` is a string variable, not a function.
2. the `login` function should be called and `await` should be used to wait for its result.
### Expected behavior
The `main` function should correctly call the `login` function and use `await` to wait for the result, then print out the username.
### Sample code
Here is the corrected code:
```dart
Future<String> login() {
String userName = "Temidjoy";
return Future.delayed(
Duration(seconds: 4), () => userName
).
}
main() async {
print('Authenticating please wait...') The
String result = await login();
String result = await login(); print(result);
}
2024-08-15 09:09:47 +08:00
8963525b9a doc: Update README.md 2024-08-13 01:12:17 +08:00
4e1a4bb641 doc: Update README.md 2024-08-09 11:49:18 +08:00
1a37518aab doc: update docs/typescript.md 2024-08-09 11:36:02 +08:00
01757edbef doc: update README.md. 2024-08-09 03:29:20 +00:00
f36bb4bcbb doc: update CONTRIBUTING.md. 2024-08-09 03:29:18 +00:00
d42cbc7d2c doc: update docs/typescript.md 2024-08-09 11:27:33 +08:00
f80b5795bc doc: Update README.md (#102) 2024-08-01 20:31:56 +08:00
90b9b407b3 doc: Update github-actions.md 2024-07-29 03:21:29 +08:00
1a0415d432 doc: update README.md. 2024-07-28 15:35:23 +00:00
e6dab60332 doc: update CONTRIBUTING.md. 2024-07-28 15:35:22 +00:00
58991c482e doc: update docs/github-actions.md 2024-07-28 23:33:57 +08:00
eea1a03da8 doc: Update docs/jupyter.md 2024-07-28 22:57:23 +08:00
a3d3d4b0dd doc: Update linux-command.md (#807)
add zip/unzip commands
2024-07-27 23:21:56 +08:00
8c8b721015 doc: Update README.md #102 2024-07-26 15:36:35 +08:00
ec6d1677d6 doc: Update README.md #102 2024-07-25 01:58:15 +08:00
e25753169f doc: update README.md. 2024-07-24 16:04:12 +00:00
ca6a407ca8 doc: update CONTRIBUTING.md. 2024-07-24 16:04:11 +00:00
d7ea92c019 doc: update dart.md (#806)
* doc: update dart.md

* doc: update dart.md

完善 import 部分内容

* doc: update dart.md

修正翻译错误,将 “地图” 修改为 “映射”
2024-07-25 00:03:03 +08:00
f25137d53d feat: add jupyter (#803)
* feat: add jupyter note

* fix: alter note

* fix:add note
2024-07-21 15:09:00 +08:00
3e40d6e54f doc: Update README.md #102 2024-07-19 01:53:03 +08:00
145bdf9119 doc: update docs/git.md 2024-07-18 17:10:19 +08:00
daccdf940a doc: update README.md. 2024-07-17 14:46:28 +00:00
29b9e61adb doc: update CONTRIBUTING.md. 2024-07-17 14:46:27 +00:00
708329d8f2 doc: update golang.md (#802)
类型转换中补充了字符串与其他类型相互转换的方法
2024-07-17 22:45:13 +08:00
fac5af10c8 doc: update flutter.md (#800) 2024-07-15 18:15:44 +08:00
a45e63a966 doc: update dart.md (#801) 2024-07-15 18:15:09 +08:00
6c3b017099 doc: update README.md. 2024-07-14 14:51:40 +00:00
68aaed2cef doc: update CONTRIBUTING.md. 2024-07-14 14:51:39 +00:00
a05328f389 doc: Update README.md #102 2024-07-14 22:50:41 +08:00
707e939bf6 doc: update README.md. 2024-07-08 17:18:43 +00:00
94a5baec46 doc: update CONTRIBUTING.md. 2024-07-08 17:18:42 +00:00
0d7f6653b6 doc: Update README.md #786 2024-07-09 01:17:12 +08:00
4f4ac84ec9 doc: update README.md. 2024-07-08 17:13:41 +00:00
a8fbc4f8e1 doc: update CONTRIBUTING.md. 2024-07-08 17:13:40 +00:00
3cbec70a5e doc: Update vue.md (#786)
添加 vue3 watch 监听多个值的模板
2024-07-09 01:12:20 +08:00
8e9132f900 doc: Update docs/json.md 2024-07-05 12:02:13 +08:00
aadda3d5c5 doc: Update README.md 2024-07-02 22:15:10 +08:00
031b7f1976 doc: Update README.md #102 2024-06-29 18:42:46 +08:00
34bf61c2fb doc: Update README.md (#102) 2024-06-27 22:54:17 +08:00
3e05d637d3 doc: update stylex.md 2024-06-26 12:12:04 +08:00
658abb0e00 doc: update README.md. 2024-06-26 02:08:51 +00:00
5dc858cfe5 doc: update CONTRIBUTING.md. 2024-06-26 02:08:50 +00:00
29c4430e3a chore: update README.md (#677)
* Feat: 增加国内镜像网站

* chore: 调整网站名称
2024-06-26 10:07:45 +08:00
229193a584 released v1.44.0 2024-06-25 23:49:41 +08:00
222f5bc604 feat: add stylex.md 2024-06-25 23:22:03 +08:00
4b22796c36 doc: update docs/dart.md 2024-06-25 23:22:03 +08:00
eb01adb655 doc: update docs/dart.md 2024-06-25 23:22:03 +08:00
ebc7ef957a doc: update docs/regex.md 2024-06-25 23:22:03 +08:00
91e0fb3af7 doc: add hook.md 2024-06-25 23:22:03 +08:00
3b817385a8 doc: update xjs.md #674 2024-06-25 23:22:03 +08:00
d19915eac8 doc: update README.md. 2024-06-25 15:04:42 +00:00
3478e345eb doc: update CONTRIBUTING.md. 2024-06-25 15:04:42 +00:00
70b561c710 docs(erlang): update docs/erlang.md (#676)
* feat(docs): add Erlang cheat sheet

Create an Erlang备忘清单 in markdown format to document common commands and
operations for Erlang programming, including入门, 代码结构, 常用内置函数 (BIFs),
并发编程, 错误处理, 分布式编程, OTP框架, 和测试.

This cheat sheet aims to provide a quick reference for Erlang developers and
learners, summarizing key points and examples for various aspects of the
language.

* docs(erlang): update links and clean up markdown formatting

- Update Erlang documentation links.
2024-06-25 23:03:33 +08:00
60fae2b928 doc: update README.md. 2024-06-25 05:54:13 +00:00
85d74eb81a doc: update CONTRIBUTING.md. 2024-06-25 05:54:12 +00:00
99c34277e1 doc: update xjs.md #674 2024-06-25 13:52:13 +08:00
1013713630 doc: add rxjs.md cheat sheet (#674)
Create a new cheat sheet for RxJS covering key concepts, operators, and methods. This includes installation, importing, creating Observables, and using various operators such as map, filter, switchMap, and more. The document also explains important concepts like Schedulers and provides examples for better understanding.
2024-06-25 13:05:27 +08:00
942f2c9563 doc: update erlang.md #673 2024-06-25 13:01:26 +08:00
0be71ca830 doc: update erlang.md #673 2024-06-25 12:53:41 +08:00
121db975c4 doc: update README.md. 2024-06-25 04:35:12 +00:00
8f54901b92 doc: update CONTRIBUTING.md. 2024-06-25 04:35:11 +00:00
09fd8603cb feat(docs): add Erlang cheat sheet (#673)
Create an Erlang备忘清单 in markdown format to document common commands and
operations for Erlang programming, including入门, 代码结构, 常用内置函数 (BIFs),
并发编程, 错误处理, 分布式编程, OTP框架, 和测试.

This cheat sheet aims to provide a quick reference for Erlang developers and
learners, summarizing key points and examples for various aspects of the
language.
2024-06-25 12:33:55 +08:00
1fb3dd7c34 doc: update pinia.md #672 2024-06-25 05:46:30 +08:00
819704c974 doc: update README.md. 2024-06-24 21:25:53 +00:00
41e7f5e2ce doc: update CONTRIBUTING.md. 2024-06-24 21:25:52 +00:00
3fa46ae173 doc: update README.md. 2024-06-24 21:25:13 +00:00
d4115b3044 doc: update CONTRIBUTING.md. 2024-06-24 21:25:12 +00:00
60c463b1cb feats (docs): add Pinia Memo List (#672)
* feats (docs): add Pinia Memo List

Create a Pinia Memo List to document common commands and actions of the Pinia State Management Library in markdown format. Content includes getting started, creating Pinia instances, defining the Store, using the Store, and more

* docs(pinia): update link to pinia-plugin-persist documentation

Correct the documentation link for pinia-plugin-persist in the Pinia documentation
to point to the official documentation hosted on seb-l.github.io. This ensures
that readers will access the most up-to-date and correct information regarding
the usage of the pinia-plugin-persist library.
2024-06-25 05:24:36 +08:00
aadb7e664b doc: Update bun.md #671 2024-06-25 05:22:56 +08:00
deeed5ec0b feat: add bun (#671)
Create a Bun备忘清单 in markdown format to document the common commands
for the Bun package manager, comparing it to npm and Yarn. This includes
installation, project creation, dependency management, script execution,
and cache handling.
2024-06-25 04:20:29 +08:00
c0903a400c doc: Update docs/pnpm.md #670 2024-06-25 03:30:46 +08:00
80761d5cf6 doc: update README.md. 2024-06-24 18:40:49 +00:00
2fbe314f16 doc: update CONTRIBUTING.md. 2024-06-24 18:40:48 +00:00
e657882897 docs: add pnpm memo and update README (#670)
Add a new pnpm.md memo in the docs directory and update the README to
include pnpm in the quick reference section. Also, introduce a new
pnpm.svg asset in the assets directory.
2024-06-25 02:39:46 +08:00
04b0b48d94 ci: Update FUNDING.yml 2024-06-22 23:53:32 +08:00
7e32739eb6 ci: Update FUNDING.yml 2024-06-22 23:52:11 +08:00
9659f0f074 ci: Update FUNDING.yml 2024-06-22 23:49:26 +08:00
e1b5344903 ci: Update FUNDING.yml 2024-06-22 23:46:01 +08:00
f5c4e78c11 doc: update README.md. 2024-06-21 10:12:30 +00:00
08edd2ad3d doc: update CONTRIBUTING.md. 2024-06-21 10:12:29 +00:00
9f7014bc52 doc: update docs/chatgpt.md #669 2024-06-21 18:10:54 +08:00
8197b8f641 feat: add chatgpt prompt (#669) 2024-06-21 17:41:46 +08:00
1c55ee64bf doc: update README.md 2024-06-20 18:21:35 +08:00
8cca95af19 doc: update springboot.md (#668) 2024-06-20 18:19:51 +08:00
4138d22968 doc: update springboot.md (#668) 2024-06-20 18:05:02 +08:00
9529667952 doc: update README.md. 2024-06-20 09:33:32 +00:00
6730b65788 doc: update CONTRIBUTING.md. 2024-06-20 09:33:31 +00:00
a527cb28a0 feat: add springboot (#668) 2024-06-20 17:32:08 +08:00
100297d821 doc: update README.md. 2024-06-17 14:10:46 +00:00
7ef107d114 doc: update CONTRIBUTING.md. 2024-06-17 14:10:46 +00:00
864da459ef doc: update README.md #102 (#666) 2024-06-17 22:09:39 +08:00
44e5c5a248 doc: update README.md. 2024-06-08 18:45:54 +00:00
a3dab064ce doc: update CONTRIBUTING.md. 2024-06-08 18:45:53 +00:00
4b9ff8a35e doc: update docs/github-actions.md 2024-06-09 02:44:46 +08:00
fa2c86a964 doc: Update README.md #102 2024-06-09 01:44:52 +08:00
d7008594f8 doc: update docs/adb.md (#662) 2024-06-09 01:43:12 +08:00
df9c2ac08b doc: update docs/lua.md (#661)
* Update lua.md

* Update lua.md

* Update lua.md
2024-06-09 01:42:21 +08:00
7494981f5f doc: Update README.md 2024-06-07 00:54:39 +08:00
ae490e878e doc: update docs/twitter.md 2024-06-06 22:20:07 +08:00
ae594eb45a doc: update docs/quickreference.md 2024-06-06 21:50:19 +08:00
8fad195069 doc: update docs/quickreference.md 2024-06-06 11:01:36 +08:00
8dbec19255 ci: update markdown lint 2024-06-06 11:01:36 +08:00
8880d82092 doc: update docs/vimium.md #660 2024-06-06 11:01:36 +08:00
ee03850619 doc: update README.md. 2024-06-06 00:32:00 +00:00
9acc906680 doc: update CONTRIBUTING.md. 2024-06-06 00:31:59 +00:00
05191c8c2c feat: add docs/vimium.md (#660) 2024-06-06 08:30:45 +08:00
3b0416a2c3 ci: update workflows config. 2024-06-05 13:59:33 +08:00
10dfe11942 doc: update docs/glances.md #659 #575 2024-06-05 13:44:44 +08:00
a0480a90dd doc: update docs/glances.md #659 #575 2024-06-05 12:04:59 +08:00
1bb046db08 doc: update README.md. 2024-06-05 01:45:52 +00:00
1cbc663abf doc: update CONTRIBUTING.md. 2024-06-05 01:45:51 +00:00
29a3787140 feat: add glances (#659) 2024-06-05 09:44:51 +08:00
e28914b3c7 doc: Update README.md #102 2024-06-03 17:19:27 +08:00
6d9782c019 doc: update README.md. 2024-05-30 13:51:02 +00:00
8727334a7c doc: update CONTRIBUTING.md. 2024-05-30 13:51:01 +00:00
861d35482a doc: update docs/docker-compose.md (#656) 2024-05-30 21:49:58 +08:00
5708867a5d doc: update README.md. 2024-05-23 01:58:48 +00:00
02240aaab0 doc: update CONTRIBUTING.md. 2024-05-23 01:58:47 +00:00
1189c92fd7 doc: Update README.md #102 2024-05-23 09:57:31 +08:00
a1a1bd60f8 doc: update docs/pytorch.md #649 2024-05-13 17:03:11 +08:00
739b18048d doc: update README.md. 2024-05-13 08:34:42 +00:00
bcd60d6020 doc: update CONTRIBUTING.md. 2024-05-13 08:34:41 +00:00
afbe61aebc doc(pytorch): update docs/pytorch.md (#649)
Co-authored-by: zhulin.zzz <zhul289@chinaunicom.cn>
2024-05-13 16:33:42 +08:00
f2183a90c3 doc: update docs/docker-compose.md 2024-05-12 14:35:56 +08:00
a10d0f850d doc: update docs/docker-compose.md 2024-05-12 14:25:32 +08:00
167fef356f doc: update docs/docker-compose.md 2024-05-12 14:19:16 +08:00
5e22e28a2d doc: update docs/docker-compose.md (#645) 2024-05-12 13:15:52 +08:00
3a1d780bbe doc: Update README.md #102 2024-05-11 19:01:53 +08:00
a2b8fc493b doc: Update README.md 2024-05-11 17:49:58 +08:00
7eaa5786d1 doc: update docs/docker-compose.md (#645) 2024-05-11 17:46:32 +08:00
2dbcac300f doc: update README.md. 2024-05-11 06:10:47 +00:00
127f2752dd doc: update CONTRIBUTING.md. 2024-05-11 06:10:46 +00:00
19ed3fa3b2 feat: add docs/docker-compose.md (#645)
* feat: add docker-compose reference

* fix: alter note
2024-05-11 14:09:45 +08:00
106 changed files with 13774 additions and 708 deletions

5
.github/FUNDING.yml vendored
View File

@ -3,7 +3,8 @@
# github: [jaywcjlove]
# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
ko_fi: jaywcjlove
buy_me_a_coffee: jaywcjlove
# tidelift: #npm/mocker-api
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
custom: https://jaywcjlove.github.io/#/sponsor
custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"]

View File

@ -16,6 +16,7 @@ jobs:
- run: npm install
- run: npm run build
- run: cp -rp icons ./dist
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
@ -88,12 +89,14 @@ jobs:
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- name: Create Release
uses: ncipollo/release-action@v1
uses: jaywcjlove/create-tag-action@main
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
package-path: ./package.json
version: ${{steps.create_tag.outputs.version}}
release: true
prerelease: false
draft: false
body: |
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)

View File

@ -4,6 +4,7 @@
"MD014": false,
"MD024": false,
"MD033": false,
"MD036": false,
"MD040": false,
"MD055": false,
"MD056": false,

View File

@ -13,6 +13,17 @@
"github": {
"url": "https://github.com/jaywcjlove/reference"
},
"favicon": "{{RELATIVE_PATH}}icons/favicon.svg",
"meta": [
{ "name": "author", "content": "jaywcjlove" },
{ "name": "license", "content": "MIT" },
{ "name": "funding", "content": "https://jaywcjlove.github.io/#/sponsor" },
{ "rel": "apple-touch-icon", "href": "{{RELATIVE_PATH}}icons/touch-icon-iphone.png" },
{ "rel": "apple-touch-icon", "sizes": "152x152", "href": "{{RELATIVE_PATH}}icons/touch-icon-ipad.png" },
{ "rel": "apple-touch-icon", "sizes": "180x180", "href": "{{RELATIVE_PATH}}icons/touch-icon-iphone.png" },
{ "rel": "apple-touch-icon", "sizes": "167x167", "href": "{{RELATIVE_PATH}}icons/touch-icon-ipad-retina.png" },
{ "rel": "apple-touch-icon", "sizes": "120x120", "href": "{{RELATIVE_PATH}}icons/touch-icon-iphone-retina.png" }
],
"giscus": {
"src": "https://giscus.app/client.js",
"data-repo": "jaywcjlove/reference",

View File

@ -330,100 +330,121 @@ jobs:
<!--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="fwqaaq"><img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/Country-If" title="Maylon"><img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/></a>
<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/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/h7ml" title="h7ml"><img src="https://avatars.githubusercontent.com/u/55233292?v=4" width="42;" alt="h7ml"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<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/Alex20180512" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/eryajf" title="二丫讲梵"><img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/></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/expoli" title="expoli"><img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/></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/aixcyi" title="阿羽"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="阿羽"/></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/alex-reinfoce" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/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/undefined-hestudio" title="undefined"><img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/></a>
<a href="https://github.com/Darkiiiiiice" title="Darkiiiiiice"><img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="Darkiiiiiice"/></a>
<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/qyl27" title="雨落"><img src="https://avatars.githubusercontent.com/u/53731501?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>
<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/1250422131" title="萌新杰少"><img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></a>
<a href="https://github.com/Willxup" title="Willxup"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Willxup"/></a>
<a href="https://github.com/richuff" title="richuff"><img src="https://avatars.githubusercontent.com/u/162144087?v=4" width="42;" alt="richuff"/></a>
<a href="https://github.com/Harris-H" title="Hao He"><img src="https://avatars.githubusercontent.com/u/57698783?v=4" width="42;" alt="Hao He"/></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/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/Willxup" title="Will"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Will"/></a>
<a href="https://github.com/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></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/QinIndexCode" title="fault"><img src="https://avatars.githubusercontent.com/u/177287013?v=4" width="42;" alt="fault"/></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/buyfakett" title="buyfakett"><img src="https://avatars.githubusercontent.com/u/46560426?v=4" width="42;" alt="buyfakett"/></a>
<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/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></a>
<a href="https://github.com/catcto" title="小武Alan"><img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="小武Alan"/></a>
<a href="https://github.com/witt-bit" title="witt"><img src="https://avatars.githubusercontent.com/u/52407727?v=4" width="42;" alt="witt"/></a>
<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/partoneplay" title="partoneplay"><img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="partoneplay"/></a>
<a href="https://github.com/partoneplay" title="佐博"><img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="佐博"/></a>
<a href="https://github.com/pangxiaoli" title="pangxiaoli"><img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/></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/webeautiful" title="Albert"><img src="https://avatars.githubusercontent.com/u/3364316?v=4" width="42;" alt="Albert"/></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/AmosHuKe" title="Amos"><img src="https://avatars.githubusercontent.com/u/32262985?v=4" width="42;" alt="Amos"/></a>
<a href="https://github.com/qjksxy" title="Apin"><img src="https://avatars.githubusercontent.com/u/81305669?v=4" width="42;" alt="Apin"/></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/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>
<a href="https://github.com/Jovins" title="Jovins"><img src="https://avatars.githubusercontent.com/u/17738992?v=4" width="42;" alt="Jovins"/></a>
<a href="https://github.com/Kisa-Dong" title="Kisa-Dong"><img src="https://avatars.githubusercontent.com/u/84782008?v=4" width="42;" alt="Kisa-Dong"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/ThanatosXingYu" title="Thanatos"><img src="https://avatars.githubusercontent.com/u/53430376?v=4" width="42;" alt="Thanatos"/></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/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></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/1834423612" title="kjch"><img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/></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/hweining" title="hweining"><img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/></a>
<a href="https://github.com/icer233" title="icer"><img src="https://avatars.githubusercontent.com/u/74440627?v=4" width="42;" alt="icer"/></a>
<a href="https://github.com/auroraslot" title="irony"><img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="irony"/></a>
<a href="https://github.com/jlchen5" title="jlchen5"><img src="https://avatars.githubusercontent.com/u/61578993?v=4" width="42;" alt="jlchen5"/></a>
<a href="https://github.com/jlchen5" title="J.Chen"><img src="https://avatars.githubusercontent.com/u/61578993?v=4" width="42;" alt="J.Chen"/></a>
<a href="https://github.com/jldxpm" title="jldxjldx"><img src="https://avatars.githubusercontent.com/u/128905630?v=4" width="42;" alt="jldxjldx"/></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>
<a href="https://github.com/jqzhao7" title="jqzhao"><img src="https://avatars.githubusercontent.com/u/54694535?v=4" width="42;" alt="jqzhao"/></a>
<a href="https://github.com/jussker" title="jussker"><img src="https://avatars.githubusercontent.com/u/33953356?v=4" width="42;" alt="jussker"/></a>
<a href="https://github.com/k983551019" title="k983551019"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"/></a>
<a href="https://github.com/k983551019" title="Evan-k"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="Evan-k"/></a>
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></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="yujian(larry) xue"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="yujian(larry) xue"/></a>
<a href="https://github.com/leauny" title="leauny"><img src="https://avatars.githubusercontent.com/u/42369176?v=4" width="42;" alt="leauny"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></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/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></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/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/nodjoy" title="gowshwah"><img src="https://avatars.githubusercontent.com/u/145280043?v=4" width="42;" alt="gowshwah"/></a>
<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/gi-b716" title="Gavin"><img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="Gavin"/></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/fakevn" title="fakevn"><img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/></a>
<a href="https://github.com/emoji-share" title="emoji-share🤪"><img src="https://avatars.githubusercontent.com/u/192275245?v=4" width="42;" alt="emoji-share🤪"/></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/gaoxiaoduan" title="CoderDuan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="CoderDuan"/></a>
<a href="https://github.com/gaoxiaoduan" title="Coder Duan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="Coder Duan"/></a>
<a href="https://github.com/lijc210" title="cizai"><img src="https://avatars.githubusercontent.com/u/10651081?v=4" width="42;" alt="cizai"/></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/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></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/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></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/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/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/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
<a href="https://github.com/HanaChan233" title="花开花落"><img src="https://avatars.githubusercontent.com/u/75212820?v=4" width="42;" alt="花开花落"/></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/ZIDOUZI" title="ZIDOUZI"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="ZIDOUZI"/></a>
<a href="https://github.com/rainbowatcher" title="rainbowatcher"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="rainbowatcher"/></a>
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
<a href="https://github.com/LongYinStudio" title="敬培全"><img src="https://avatars.githubusercontent.com/u/42208852?v=4" width="42;" alt="敬培全"/></a>
<a href="https://github.com/Fengjing95" title="小枫"><img src="https://avatars.githubusercontent.com/u/51731411?v=4" width="42;" alt="小枫"/></a>
<a href="https://github.com/ZIDOUZI" title="子斗子"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="子斗子"/></a>
<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/lvzhenbo" title="吕振波"><img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/></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/kele527" title="吹衣轻飏"><img src="https://avatars.githubusercontent.com/u/345445?v=4" width="42;" alt="吹衣轻飏"/></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/zxx457" title="Xianxin Zeng"><img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="Xianxin Zeng"/></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/hiyms" title="yms"><img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/></a>
<a href="https://github.com/giteeking" title="xunjian"><img src="https://avatars.githubusercontent.com/u/166626162?v=4" width="42;" alt="xunjian"/></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/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/wannima66" title="tmen"><img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/></a>
<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/swift-fs" title="swift-fs"><img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift-fs"/></a>
<a href="https://github.com/suyangzuo" title="suyangzuo"><img src="https://avatars.githubusercontent.com/u/50766353?v=4" width="42;" alt="suyangzuo"/></a>
<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/shanhai1024" title="shanhai1024"><img src="https://avatars.githubusercontent.com/u/56210461?v=4" width="42;" alt="shanhai1024"/></a>
<a href="https://github.com/ri-fumo" title="ri-fumo"><img src="https://avatars.githubusercontent.com/u/190000479?v=4" width="42;" alt="ri-fumo"/></a>
<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/openapphub" title="openapphub"><img src="https://avatars.githubusercontent.com/u/175949671?v=4" width="42;" alt="openapphub"/></a>
<a href="https://github.com/onewesong" title="onewesong"><img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/></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>
<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/lozhu20" title="lozhu"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="lozhu"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></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>
<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/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></a>
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></a>
<a href="https://github.com/likeshop-github" title="likeshop技术社区"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeshop技术社区"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a>
<a href="https://github.com/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></a>
<a href="https://github.com/likeadmin-likeshop" title="likeadmin通过管理后台-likeshop全开源商城"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeadmin通过管理后台-likeshop全开源商城"/></a>
<a href="https://github.com/Lihuagreek" title="Lihuagreek"><img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"/></a>
<a href="https://github.com/LightQuanta" title="Light_Quanta"><img src="https://avatars.githubusercontent.com/u/18213217?v=4" width="42;" alt="Light_Quanta"/></a>
<a href="https://github.com/JetSquirrel" title="JetSquirrel"><img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"/></a>
@ -431,12 +452,14 @@ jobs:
<a href="https://github.com/JavaZeroo" title="JavaZero"><img src="https://avatars.githubusercontent.com/u/71128095?v=4" width="42;" alt="JavaZero"/></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/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/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/Furry-Monster" title="Furry-Monster"><img src="https://avatars.githubusercontent.com/u/158404543?v=4" width="42;" alt="Furry-Monster"/></a>
<a href="https://github.com/Fuku-L" title="Foozi"><img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Foozi"/></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/eeeeeio" title="EEEEE"><img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/></a>
<a href="https://github.com/demigodliu" title="DemigodLiu"><img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/></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/Damao2250" title="Damao"><img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/></a>
<a href="https://github.com/daining810" title="dain"><img src="https://avatars.githubusercontent.com/u/125986872?v=4" width="42;" alt="dain"/></a>
<a href="https://github.com/DEEMO101" title="DEEMO101"><img src="https://avatars.githubusercontent.com/u/35123091?v=4" width="42;" alt="DEEMO101"/></a>
<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/CharlotteZeng" title="hanchZ"><img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/></a>
@ -447,8 +470,15 @@ jobs:
<a href="https://github.com/BlacAmDK" title="BlacAmDK"><img src="https://avatars.githubusercontent.com/u/10971397?v=4" width="42;" alt="BlacAmDK"/></a>
<a href="https://github.com/gitchenze" title="Aze"><img src="https://avatars.githubusercontent.com/u/13357869?v=4" width="42;" alt="Aze"/></a>
<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/JinchuanL" title="ANDY"><img src="https://avatars.githubusercontent.com/u/68026794?v=4" width="42;" alt="ANDY"/></a>
<a href="https://github.com/13812700839" title="花殇"><img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/></a>
<a href="https://github.com/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></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/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></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/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></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/HeZephyr" title="Zephyr He"><img src="https://avatars.githubusercontent.com/u/67893254?v=4" width="42;" alt="Zephyr He"/></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/Yo-gurts" title="Yogurt"><img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/></a>
<a href="https://github.com/hi-liyan" title="李李李"><img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="李李李"/></a>
@ -461,18 +491,18 @@ jobs:
<a href="https://github.com/DataEraserC" title="Sacabambaspis"><img src="https://avatars.githubusercontent.com/u/102341238?v=4" width="42;" alt="Sacabambaspis"/></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/RivailleF" title="RivailleF"><img src="https://avatars.githubusercontent.com/u/93083015?v=4" width="42;" alt="RivailleF"/></a>
<a href="https://github.com/Qliangw" title="Qliangw"><img src="https://avatars.githubusercontent.com/u/22791711?v=4" width="42;" alt="Qliangw"/></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/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/PipecraftNet" title="Pipecraft"><img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/></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/Perzch" title="ZhaoChunhuan"><img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="ZhaoChunhuan"/></a>
<a href="https://github.com/PILIHU2022" title="PILIHU2022"><img src="https://avatars.githubusercontent.com/u/100511118?v=4" width="42;" alt="PILIHU2022"/></a>
<a href="https://github.com/HanaNoryu" title="Noryu"><img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/></a>
<a href="https://github.com/Noryu-01" title="Noryu"><img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/></a>
<a href="https://github.com/NianwenDan" title="NianwenDan"><img src="https://avatars.githubusercontent.com/u/74407127?v=4" width="42;" alt="NianwenDan"/></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/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/></a>
<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/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/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a><!--GAMFC-END-->
<a href="https://github.com/Mieriki" title="Mieriki"><img src="https://avatars.githubusercontent.com/u/142009318?v=4" width="42;" alt="Mieriki"/></a><!--GAMFC-END-->
上图贡献者列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 自动生成贡献者图片。

290
README.md
View File

@ -2,7 +2,7 @@ Quick Reference
===
<!--rehype:ignore:start-->
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![Buy me a coffee](https://img.shields.io/badge/Buy_Me_a_Coffee-ffdd00?logo=buy-me-a-coffee&logoColor=black)](https://jaywcjlove.github.io/#/sponsor)
[![CI](https://github.com/jaywcjlove/reference/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/reference/actions/workflows/ci.yml)
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference)
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference)
@ -13,7 +13,7 @@ Quick Reference
[![Quick Reference](https://user-images.githubusercontent.com/1680273/201931931-d8559417-0a15-46af-a009-ec1e56e5b778.png)](https://jaywcjlove.github.io/reference)
<!--rehype:ignore:end-->
为开发人员分享快速参考备忘清单【速查表】。这是英文版 [Reference](https://github.com/Randy8080/reference) 的中文版本,目的是为了方便自己的技术栈查阅,如果您提供一个清单,我将抽空搬运,立即撸起来 :)。如果您发现此处的备忘单不合适,可以通过提交 [PR](https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md) 来修复或提供更好的备忘清单,只针对【中文】用户。以下是开源天使提供的一些备忘清单和快速参考 :)。
了方便开发人员查阅技术栈,分享这份快速参考备忘清单【速查表】。这是英文版 [Reference](https://github.com/Randy8080/reference) 的中文翻译,旨在帮助自己更好地使用相关技术。如果您有自己的清单,也欢迎提供,我会抽时间搬运并立刻实现 :)。如果您发现这份备忘单中的内容不合适,可以通过提交 [PR](https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md) 来修复或提供更好的备忘清单,主要面向【中文】用户。以下是一些开源天使提供的备忘清单和快速参考 :)。
## 正在建设中...
@ -41,24 +41,29 @@ Quick Reference
[R 语言](./docs/r.md)<!--rehype:style=background: rgb(39 108 192);&class=contributing-->
[Elixir](./docs/elixir.md)<!--rehype:style=background: rgb(124 26 156);&class=contributing tag&data-lang=Elixir-->
[Tauri](./docs/tauri.md)<!--rehype:style=background: rgb(103 214 237);&class=contributing-->
[Docker Compose](./docs/docker-compose.md)<!--rehype:style=background: rgb(72 143 223);&class=contributing tag&data-lang=Docker-->
<!--rehype:class=home-card-->
## 编程
[Bash](./docs/bash.md)<!--rehype:style=background: rgb(72 143 223);-->
[Powershell](./docs/powershell.md)<!--rehype:style=background: rgb(0 81 197);-->
[C 语言](./docs/c.md)<!--rehype:style=background: rgb(92 107 192);-->
[C#](./docs/cs.md)<!--rehype:style=background: rgb(6 147 13);&class=contributing-->
[C++](./docs/cpp.md)<!--rehype:style=background: rgb(6 147 13);&class=contributing-->
[Dart](./docs/dart.md)<!--rehype:style=background: rgb(64 196 255);-->
[Docker](./docs/docker.md)<!--rehype:style=background: rgb(72 143 223);-->
[Docker Compose](./docs/docker-compose.md)<!--rehype:style=background: rgb(72 143 223);&class=contributing tag&data-lang=Docker-->
[Dockerfile](./docs/dockerfile.md)<!--rehype:style=background: rgb(0 72 153);&class=tag&data-lang=Docker-->
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
[Elixir](./docs/elixir.md)<!--rehype:style=background: rgb(124 26 156);&class=contributing tag&data-lang=Elixir-->
[Erlang](./docs/erlang.md)<!--rehype:style=background: rgb(206 55 97);&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-->
[Golang](./docs/golang.md)<!--rehype:style=background: rgb(39 160 193);-->
[GraphQL](./docs/graphql.md)<!--rehype:style=background: rgb(214 66 146);-->
[Hook](./docs/hook.md)<!--rehype:style=background: rgb(211 55 49);-->
[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=👆看看还缺点儿什么?-->
@ -75,8 +80,11 @@ Quick Reference
[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-->
[Spring Boot](./docs/springboot.md)<!--rehype:style=background: rgb(0 149 0);&class=tag&data-lang=Java-->
[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=👆看看还缺点儿什么?-->
[Jupyter](./docs/jupyter.md)<!--rehype:style=background: rgb(0 72 153);&class=tag&data-lang=Python-->
[Minio](./docs/minio.md)<!--rehype:style=background: rgb(3 3 128);-->
<!--rehype:class=home-card-->
## 配置
@ -94,18 +102,20 @@ Quick Reference
[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-->
[HTML](./docs/html.md)<!--rehype:style=background: rgb(228 77 39);-->
[HTML Canvas](./docs/canvas.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);-->
[Next.js](./docs/nextjs.md)<!--rehype:style=background: rgb(0 0 0);&class=tag&data-lang=React-->
[RxJS](./docs/rxjs.md)<!--rehype:style=background: rgb(151 0 81);-->
[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);-->
[Tauri](./docs/tauri.md)<!--rehype:style=background: rgb(103 214 237);&class=contributing-->
[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-->
[Vue 2](./docs/vue2.md)<!--rehype:style=background: rgb(64 184 131);&class=tag&data-lang=Vue-->
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=tag&class=contributing tag&data-lang=Vue-->
[</> htmx](./docs/htmx.md)<!--rehype:style=background: rgb(52 101 164);&class=contributing-->
[Pinia](./docs/pinia.md)<!--rehype:style=background: rgb(44 136 50);&class=tag&data-lang=Vue-->
<!--rehype:class=home-card-->
## CSS
@ -115,7 +125,8 @@ Quick Reference
[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);-->
[Tailwind CSS](./docs/tailwindcss.md)<!--rehype:style=background: rgb(49 120 198);&class=tag&data-lang=CSS-->
[StyleX](./docs/stylex.md)<!--rehype:style=background: rgb(91 79 163);&class=tag&data-lang=CSS-->
<!--rehype:class=home-card-->
## Nodejs
@ -131,16 +142,8 @@ Quick Reference
[package.json](./docs/package.json.md)<!--rehype:style=background: rgb(132 132 132);-->
[Yarn](./docs/yarn.md)<!--rehype:style=background: rgb(33 136 182);-->
[nvm](./docs/nvm.md)<!--rehype:style=background: rgb(132 132 132);-->
<!--rehype:class=home-card-->
## 工具
[Emacs](./docs/emacs.md)<!--rehype:style=background: rgb(98 36 134);-->
[Github](./docs/github.md)<!--rehype:style=background: rgb(36 41 47);-->
[nginx](./docs/nginx.md)<!--rehype:style=background: rgb(0 153 0);-->
[Semver](./docs/semver.md)<!--rehype:style=background: rgb(106 111 141);-->
[Vim](./docs/vim.md)<!--rehype:style=background: rgb(9 150 8);-->
[XPath](./docs/xpath.md)<!--rehype:style=background: rgb(91 163 230);-->
[pnpm](./docs/pnpm.md)<!--rehype:style=background: rgb(191 133 0);-->
[Bun](./docs/bun.md)<!--rehype:style=background: rgb(157 49 81);-->
<!--rehype:class=home-card-->
## 命令
@ -157,7 +160,7 @@ Quick Reference
[Find](./docs/find.md)<!--rehype:style=background: rgb(16 185 129);-->
[FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9);&class=contributing-->
[Gdb](./docs/gdb.md)<!--rehype:style=background: rgb(215 89 62);-->
[Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=版本控制-->
[Glances](./docs/glances.md)<!--rehype:style=background: rgb(16 185 129);-->
[Grep](./docs/grep.md)<!--rehype:style=background: rgb(16 185 129);-->
[Htop](./docs/htop.md)<!--rehype:style=background: rgb(16 185 129);-->
[iptables](./docs/iptables.md)<!--rehype:style=background: rgb(32 74 135);-->
@ -173,17 +176,30 @@ Quick Reference
[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);&class=tag&data-lang=版本控制-->
[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);-->
[tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=解压缩-->
[Yazi](./docs/yazi.md)<!--rehype:style=background: rgb(255 165 0);&class=tag&data-lang=文件管理器;&class=contributing-->
[Zip](./docs/zip.md)<!--rehype:style=background: rgb(99 99 99);&class=tag&data-lang=解压缩-->
[FTP](./docs/ftp.md)<!--rehype:style=background: rgb(99 99 99);-->
<!--rehype:class=home-card-->
## 工具
## 工具
[ChatGPT](./docs/chatgpt.md)<!--rehype:style=background: rgb(74, 161, 129);&class=tag&data-lang=AI-->
[Emacs](./docs/emacs.md)<!--rehype:style=background: rgb(98 36 134);-->
[Linux Command](./docs/linux-command.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=命令速查-->
[Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135);-->
[nginx](./docs/nginx.md)<!--rehype:style=background: rgb(0 153 0);-->
[RegEx 正则表达式](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155);-->
[Semver 语义化版本](./docs/semver.md)<!--rehype:style=background: rgb(106 111 141);-->
[Vim](./docs/vim.md)<!--rehype:style=background: rgb(9 150 8);-->
[XPath](./docs/xpath.md)<!--rehype:style=background: rgb(91 163 230);-->
<!--rehype:class=home-card-->
## 软件包管理器
[APT](./docs/apt.md)<!--rehype:style=background: rgb(30 144 255);-->
[Conan](./docs/conan.md)<!--rehype:style=background: rgb(0 193 9);&class=tag&data-lang=C/C++-->
@ -191,13 +207,22 @@ Quick Reference
[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-->
[Homebrew](./docs/homebrew.md)<!--rehype:style=background: rgb(252 185 87);&class=tag&data-lang=macOS-->
[Linux Command](./docs/linux-command.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=命令速查-->
[Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135);-->
[Pacman](./docs/pacman.md)<!--rehype:style=background: rgb(24 147 209);&class=tag&data-lang=archlinux&class=contributing-->
[YUM](./docs/yum.md)<!--rehype:style=background: rgb(86 86 123);-->
[SDKMAN](./docs/sdkman.md)<!--rehype:style=background: rgb(0 118 198);-->
<!--rehype:class=home-card-->
## Git 版本控制
[Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=版本控制-->
[Github](./docs/github.md)<!--rehype:style=background: rgb(36 41 47);-->
[Github Copilot](./docs/github-copilot.md)<!--rehype:style=background: rgb(125 45 220);&class=tag contributing&data-lang=AI&data-info=👆看看还缺点儿什么?-->
[Github CLI](./docs/github-cli.md)<!--rehype:style=background: rgb(36 41 47);-->
[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-->
[Subversion (SVN)](./docs/subversion.md)<!--rehype:style=background: rgb(99 99 99);&class=tag&data-lang=版本控制-->
<!--rehype:class=home-card-->
## 数据库
[MySQL](./docs/mysql.md)<!--rehype:style=background: rgb(1 117 143);&class=tag&data-lang=SQL-->
@ -207,6 +232,7 @@ Quick Reference
[Redis](./docs/redis.md)<!--rehype:style=background: rgb(198 47 44);-->
[Elasticsearch](./docs/elasticsearch.md)<!--rehype:style=background: rgb(36 187 177);-->
[Neo4j](./docs/neo4j.md)<!--rehype:style=background: rgb(86 86 123);-->
[SQLite](./docs/sqlite.md)<!--rehype:style=background: rgb(0 59 90);-->
<!--rehype:class=home-card-->
## 快捷键
@ -227,8 +253,9 @@ Quick Reference
[PhpStorm](./docs/phpstorm.md)<!--rehype:style=\-\-bg\-opacity: 0.75;background-image: linear-gradient(to left, rgba(255 106 172 / var(\-\-bg\-opacity)), rgba(183 173 255 / var(\-\-bg\-opacity)));-->
[Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0);&class=tag&data-lang=macOS-->
[Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0);-->
[Vimium](./docs/vimium.md)<!--rehype:style=background: rgb(49 168 255);&class=contributing&class=tag&data-lang=浏览器插件-->
[VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230);-->
[Twitter](./docs/twitter.md)<!--rehype:style=background: rgb(91 163 230);-->
[Twitter(X)](./docs/twitter.md)<!--rehype:style=background: rgb(91 163 230);-->
[WebStorm](./docs/webstorm.md)<!--rehype:style=background: rgb(32 148 220);-->
[Xcode](./docs/xcode.md)<!--rehype:style=background: rgb(24 151 233);&class=tag&data-lang=macOS-->
<!--rehype:class=home-card-->
@ -239,8 +266,6 @@ Quick Reference
[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-->
@ -249,6 +274,8 @@ Quick Reference
[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);-->
[时区列表](./docs/time-zones.md)<!--rehype:style=background: rgb(16 185 129);-->
[常见端口对照](./docs/ports.md)<!--rehype:style=background: rgb(16 185 129);-->
<!--rehype:class=home-card-->
## 看到缺少什么了吗?
@ -268,100 +295,121 @@ Quick Reference
<!--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="fwqaaq"><img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/Country-If" title="Maylon"><img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/></a>
<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/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/h7ml" title="h7ml"><img src="https://avatars.githubusercontent.com/u/55233292?v=4" width="42;" alt="h7ml"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<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/Alex20180512" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/eryajf" title="二丫讲梵"><img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/></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/expoli" title="expoli"><img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/></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/aixcyi" title="阿羽"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="阿羽"/></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/alex-reinfoce" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/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/undefined-hestudio" title="undefined"><img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/></a>
<a href="https://github.com/Darkiiiiiice" title="Darkiiiiiice"><img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="Darkiiiiiice"/></a>
<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/qyl27" title="雨落"><img src="https://avatars.githubusercontent.com/u/53731501?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>
<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/1250422131" title="萌新杰少"><img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></a>
<a href="https://github.com/Willxup" title="Willxup"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Willxup"/></a>
<a href="https://github.com/richuff" title="richuff"><img src="https://avatars.githubusercontent.com/u/162144087?v=4" width="42;" alt="richuff"/></a>
<a href="https://github.com/Harris-H" title="Hao He"><img src="https://avatars.githubusercontent.com/u/57698783?v=4" width="42;" alt="Hao He"/></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/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/Willxup" title="Will"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Will"/></a>
<a href="https://github.com/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></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/QinIndexCode" title="fault"><img src="https://avatars.githubusercontent.com/u/177287013?v=4" width="42;" alt="fault"/></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/buyfakett" title="buyfakett"><img src="https://avatars.githubusercontent.com/u/46560426?v=4" width="42;" alt="buyfakett"/></a>
<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/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></a>
<a href="https://github.com/catcto" title="小武Alan"><img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="小武Alan"/></a>
<a href="https://github.com/witt-bit" title="witt"><img src="https://avatars.githubusercontent.com/u/52407727?v=4" width="42;" alt="witt"/></a>
<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/partoneplay" title="partoneplay"><img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="partoneplay"/></a>
<a href="https://github.com/partoneplay" title="佐博"><img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="佐博"/></a>
<a href="https://github.com/pangxiaoli" title="pangxiaoli"><img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/></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/webeautiful" title="Albert"><img src="https://avatars.githubusercontent.com/u/3364316?v=4" width="42;" alt="Albert"/></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/AmosHuKe" title="Amos"><img src="https://avatars.githubusercontent.com/u/32262985?v=4" width="42;" alt="Amos"/></a>
<a href="https://github.com/qjksxy" title="Apin"><img src="https://avatars.githubusercontent.com/u/81305669?v=4" width="42;" alt="Apin"/></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/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>
<a href="https://github.com/Jovins" title="Jovins"><img src="https://avatars.githubusercontent.com/u/17738992?v=4" width="42;" alt="Jovins"/></a>
<a href="https://github.com/Kisa-Dong" title="Kisa-Dong"><img src="https://avatars.githubusercontent.com/u/84782008?v=4" width="42;" alt="Kisa-Dong"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/ThanatosXingYu" title="Thanatos"><img src="https://avatars.githubusercontent.com/u/53430376?v=4" width="42;" alt="Thanatos"/></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/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></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/1834423612" title="kjch"><img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/></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/hweining" title="hweining"><img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/></a>
<a href="https://github.com/icer233" title="icer"><img src="https://avatars.githubusercontent.com/u/74440627?v=4" width="42;" alt="icer"/></a>
<a href="https://github.com/auroraslot" title="irony"><img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="irony"/></a>
<a href="https://github.com/jlchen5" title="jlchen5"><img src="https://avatars.githubusercontent.com/u/61578993?v=4" width="42;" alt="jlchen5"/></a>
<a href="https://github.com/jlchen5" title="J.Chen"><img src="https://avatars.githubusercontent.com/u/61578993?v=4" width="42;" alt="J.Chen"/></a>
<a href="https://github.com/jldxpm" title="jldxjldx"><img src="https://avatars.githubusercontent.com/u/128905630?v=4" width="42;" alt="jldxjldx"/></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>
<a href="https://github.com/jqzhao7" title="jqzhao"><img src="https://avatars.githubusercontent.com/u/54694535?v=4" width="42;" alt="jqzhao"/></a>
<a href="https://github.com/jussker" title="jussker"><img src="https://avatars.githubusercontent.com/u/33953356?v=4" width="42;" alt="jussker"/></a>
<a href="https://github.com/k983551019" title="k983551019"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"/></a>
<a href="https://github.com/k983551019" title="Evan-k"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="Evan-k"/></a>
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></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="yujian(larry) xue"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="yujian(larry) xue"/></a>
<a href="https://github.com/leauny" title="leauny"><img src="https://avatars.githubusercontent.com/u/42369176?v=4" width="42;" alt="leauny"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></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/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></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/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/nodjoy" title="gowshwah"><img src="https://avatars.githubusercontent.com/u/145280043?v=4" width="42;" alt="gowshwah"/></a>
<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/gi-b716" title="Gavin"><img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="Gavin"/></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/fakevn" title="fakevn"><img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/></a>
<a href="https://github.com/emoji-share" title="emoji-share🤪"><img src="https://avatars.githubusercontent.com/u/192275245?v=4" width="42;" alt="emoji-share🤪"/></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/gaoxiaoduan" title="CoderDuan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="CoderDuan"/></a>
<a href="https://github.com/gaoxiaoduan" title="Coder Duan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="Coder Duan"/></a>
<a href="https://github.com/lijc210" title="cizai"><img src="https://avatars.githubusercontent.com/u/10651081?v=4" width="42;" alt="cizai"/></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/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></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/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></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/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/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/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
<a href="https://github.com/HanaChan233" title="花开花落"><img src="https://avatars.githubusercontent.com/u/75212820?v=4" width="42;" alt="花开花落"/></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/ZIDOUZI" title="ZIDOUZI"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="ZIDOUZI"/></a>
<a href="https://github.com/rainbowatcher" title="rainbowatcher"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="rainbowatcher"/></a>
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
<a href="https://github.com/LongYinStudio" title="敬培全"><img src="https://avatars.githubusercontent.com/u/42208852?v=4" width="42;" alt="敬培全"/></a>
<a href="https://github.com/Fengjing95" title="小枫"><img src="https://avatars.githubusercontent.com/u/51731411?v=4" width="42;" alt="小枫"/></a>
<a href="https://github.com/ZIDOUZI" title="子斗子"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="子斗子"/></a>
<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/lvzhenbo" title="吕振波"><img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/></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/kele527" title="吹衣轻飏"><img src="https://avatars.githubusercontent.com/u/345445?v=4" width="42;" alt="吹衣轻飏"/></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/zxx457" title="Xianxin Zeng"><img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="Xianxin Zeng"/></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/hiyms" title="yms"><img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/></a>
<a href="https://github.com/giteeking" title="xunjian"><img src="https://avatars.githubusercontent.com/u/166626162?v=4" width="42;" alt="xunjian"/></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/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/wannima66" title="tmen"><img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/></a>
<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/swift-fs" title="swift-fs"><img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift-fs"/></a>
<a href="https://github.com/suyangzuo" title="suyangzuo"><img src="https://avatars.githubusercontent.com/u/50766353?v=4" width="42;" alt="suyangzuo"/></a>
<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/shanhai1024" title="shanhai1024"><img src="https://avatars.githubusercontent.com/u/56210461?v=4" width="42;" alt="shanhai1024"/></a>
<a href="https://github.com/ri-fumo" title="ri-fumo"><img src="https://avatars.githubusercontent.com/u/190000479?v=4" width="42;" alt="ri-fumo"/></a>
<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/openapphub" title="openapphub"><img src="https://avatars.githubusercontent.com/u/175949671?v=4" width="42;" alt="openapphub"/></a>
<a href="https://github.com/onewesong" title="onewesong"><img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/></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>
<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/lozhu20" title="lozhu"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="lozhu"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></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>
<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/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></a>
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></a>
<a href="https://github.com/likeshop-github" title="likeshop技术社区"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeshop技术社区"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a>
<a href="https://github.com/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></a>
<a href="https://github.com/likeadmin-likeshop" title="likeadmin通过管理后台-likeshop全开源商城"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeadmin通过管理后台-likeshop全开源商城"/></a>
<a href="https://github.com/Lihuagreek" title="Lihuagreek"><img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"/></a>
<a href="https://github.com/LightQuanta" title="Light_Quanta"><img src="https://avatars.githubusercontent.com/u/18213217?v=4" width="42;" alt="Light_Quanta"/></a>
<a href="https://github.com/JetSquirrel" title="JetSquirrel"><img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"/></a>
@ -369,12 +417,14 @@ Quick Reference
<a href="https://github.com/JavaZeroo" title="JavaZero"><img src="https://avatars.githubusercontent.com/u/71128095?v=4" width="42;" alt="JavaZero"/></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/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/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/Furry-Monster" title="Furry-Monster"><img src="https://avatars.githubusercontent.com/u/158404543?v=4" width="42;" alt="Furry-Monster"/></a>
<a href="https://github.com/Fuku-L" title="Foozi"><img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Foozi"/></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/eeeeeio" title="EEEEE"><img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/></a>
<a href="https://github.com/demigodliu" title="DemigodLiu"><img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/></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/Damao2250" title="Damao"><img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/></a>
<a href="https://github.com/daining810" title="dain"><img src="https://avatars.githubusercontent.com/u/125986872?v=4" width="42;" alt="dain"/></a>
<a href="https://github.com/DEEMO101" title="DEEMO101"><img src="https://avatars.githubusercontent.com/u/35123091?v=4" width="42;" alt="DEEMO101"/></a>
<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/CharlotteZeng" title="hanchZ"><img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/></a>
@ -385,8 +435,15 @@ Quick Reference
<a href="https://github.com/BlacAmDK" title="BlacAmDK"><img src="https://avatars.githubusercontent.com/u/10971397?v=4" width="42;" alt="BlacAmDK"/></a>
<a href="https://github.com/gitchenze" title="Aze"><img src="https://avatars.githubusercontent.com/u/13357869?v=4" width="42;" alt="Aze"/></a>
<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/JinchuanL" title="ANDY"><img src="https://avatars.githubusercontent.com/u/68026794?v=4" width="42;" alt="ANDY"/></a>
<a href="https://github.com/13812700839" title="花殇"><img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/></a>
<a href="https://github.com/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></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/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></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/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></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/HeZephyr" title="Zephyr He"><img src="https://avatars.githubusercontent.com/u/67893254?v=4" width="42;" alt="Zephyr He"/></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/Yo-gurts" title="Yogurt"><img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/></a>
<a href="https://github.com/hi-liyan" title="李李李"><img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="李李李"/></a>
@ -399,18 +456,18 @@ Quick Reference
<a href="https://github.com/DataEraserC" title="Sacabambaspis"><img src="https://avatars.githubusercontent.com/u/102341238?v=4" width="42;" alt="Sacabambaspis"/></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/RivailleF" title="RivailleF"><img src="https://avatars.githubusercontent.com/u/93083015?v=4" width="42;" alt="RivailleF"/></a>
<a href="https://github.com/Qliangw" title="Qliangw"><img src="https://avatars.githubusercontent.com/u/22791711?v=4" width="42;" alt="Qliangw"/></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/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/PipecraftNet" title="Pipecraft"><img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/></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/Perzch" title="ZhaoChunhuan"><img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="ZhaoChunhuan"/></a>
<a href="https://github.com/PILIHU2022" title="PILIHU2022"><img src="https://avatars.githubusercontent.com/u/100511118?v=4" width="42;" alt="PILIHU2022"/></a>
<a href="https://github.com/HanaNoryu" title="Noryu"><img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/></a>
<a href="https://github.com/Noryu-01" title="Noryu"><img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/></a>
<a href="https://github.com/NianwenDan" title="NianwenDan"><img src="https://avatars.githubusercontent.com/u/74407127?v=4" width="42;" alt="NianwenDan"/></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/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/></a>
<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/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/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a><!--GAMFC-END-->
<a href="https://github.com/Mieriki" title="Mieriki"><img src="https://avatars.githubusercontent.com/u/142009318?v=4" width="42;" alt="Mieriki"/></a><!--GAMFC-END-->
[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 根据提交次数的先后顺序自动生成
<!--rehype:style=padding-top:1rem;-->
@ -421,8 +478,7 @@ Quick Reference
由于中国国内访问,时常打不开,你可以访问下面镜像网站(国内打不开的不再收录)。推荐自己的[镜像网站](https://github.com/jaywcjlove/reference/discussions/206#discussion-4625735)
[dev.bi](https://dev.bi)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[server.wiki](https://ref.server.wiki)<!--rehype:target=_blank-->
[nihaosi.com](https://refs.nihaosi.com)<!--rehype:target=_blank-->
[docflow.cn](https://ref.docflow.cn)<!--rehype:target=_blank-->
[quickref.cn](https://quickref.cn)<!--rehype:target=_blank-->
[aibk.cn](https://quickref.aibk.cn)<!--rehype:target=_blank-->
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank-->
@ -430,7 +486,6 @@ Quick Reference
[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=👆每天自动同步-->
[srebro.cn](https://ref.srebro.cn)<!--rehype:target=_blank&data-info=👆每天自动同步-->
@ -443,37 +498,25 @@ Quick Reference
[dbyun.net](https://www.dbyun.net/reference/index.html)<!--rehype:target=_blank-->
[if010.com](https://quickref.if010.com/)<!--rehype:target=_blank-->
[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-->
[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-->
[kjchmc.cn](https://ref.kjchmc.cn/)<!--rehype:target=_blank-->
[aoh.cc](https://aoh.cc/)<!--rehype:target=_blank-->
[quickreference.pages.dev](https://quickreference.pages.dev/)<!--rehype:target=_blank-->
[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-->
@ -483,27 +526,25 @@ Quick Reference
[jeffjade.com](https://codehelp.jeffjade.com)<!--rehype:target=_blank-->
[okhk.net](https://ref.okhk.net)<!--rehype:target=_blank-->
[wdft.com](https://ref.wdft.com)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[xuyiyang.vip](https://reference.xuyiyang.vip/)<!--rehype:target=_blank-->
[xiaopa.cc](https://reference.xiaopa.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[zsccodelnc.cn](https://zsccodelnc.cn/coderef/)<!--rehype:target=_blank-->
[chanlun.pro](https://ref.chanlun.pro)<!--rehype:target=_blank-->
[likui.info](https://r.likui.info)<!--rehype:target=_blank-->
[ruiange.work](https://code.ruiange.work/)<!--rehype:target=_blank-->
[denganliang.com](https://ref.denganliang.com)<!--rehype:target=_blank-->
[coderjia.cn](https://refer.coderjia.cn)<!--rehype:target=_blank-->
[ivanz.cc](https://ref.ivanz.cc)<!--rehype:target=_blank-->
[dev6.site](https://ref.dev6.site/)<!--rehype:target=_blank-->
[mingming.dev](https://ref.mingming.dev)<!--rehype:target=_blank-->
[clf.lol](https://ref.clf.lol/)<!--rehype:target=_blank-->
[zishu.me](https://ref.zishu.me/)<!--rehype:target=_blank-->
[sucan2233.cn](http://reference.sucan2233.cn)<!--rehype:target=_blank-->
[reference-bk9.pages.dev](https://reference-bk9.pages.dev/)<!--rehype:target=_blank&class=contributing&data-info=👆自动实时同步-->
[pages.dev](https://reference-bk9.pages.dev/)<!--rehype:target=_blank&class=contributing&data-info=👆自动实时同步-->
[hrzweb.xyz](https://r.hrzweb.xyz)<!--rehype:target=_blank-->
[bobh.cool](https://quickref.bobh.cool)<!--rehype:target=_blank-->
[tangwudi.com](https://doc.tangwudi.com)<!--rehype:target=_blank-->
[alomerry.com](https://ref.alomerry.com)<!--rehype:target=_blank-->
[osz.icu](https://ref.osz.icu/)<!--rehype:target=_blank-->
[ylmty.cc](https://docs.ylmty.cc)<!--rehype:target=_blank-->
[g31.top](https://ref.g31.top/)<!--rehype:target=_blank-->
[kfele.asia](https://ref.kfele.asia/)<!--rehype:target=_blank-->
[9up.dev](https://devref.9up.dev)<!--rehype:target=_blank-->
[cizai.io](https://reference.cizai.io)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[docs.willxup.top](https://docs.willxup.top)<!--rehype:target=_blank-->
@ -511,13 +552,84 @@ Quick Reference
[object.cool](https://r.object.cool)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[luckyits.com](https://ref.luckyits.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[jeremyjone.com](https://ref.jeremyjone.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[gistudy.net](https://reference.gistudy.net/)<!--rehype:target=_blank-->
[maoo.me](https://note.maoo.me)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[deyout.com](https://ref.deyout.com)<!--rehype:target=_blank-->
[xod.cc](https://ref.xod.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[const.team](https://reference.const.team)<!--rehype:target=_blank-->
[jhao.me](http://reference.jhao.me/)<!--rehype:target=_blank-->
[7yueee.cn](https://memo.7yueee.cn/)<!--rehype:target=_blank-->
[liamng.top](https://refer.liamng.top/)<!--rehype:target=_blank-->
[maisblog.cn](https://reference.maisblog.cn/)<!--rehype:target=_blank-->
[ruochen.net](https://dev.ruochen.net/)<!--rehype:target=_blank-->
[zcsk18.cn](https://reference.zcsk18.cn/)<!--rehype:target=_blank-->
[doraemon.press](https://reference.doraemon.press/)<!--rehype:target=_blank-->
[foreverlink.love](https://reference.foreverlink.love)<!--rehype:target=_blank-->
[94vessel.com](https://book.94vessel.com)<!--rehype:target=_blank-->
[hhxyrk.icu](http://hhxy.hhxyrk.icu/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[vhcffh.com](https://docs.vhcffh.com)<!--rehype:target=_blank-->
[magese.com](https://ref.magese.com)<!--rehype:target=_blank-->
[childish.vip](https://reference.childish.vip)<!--rehype:target=_blank-->
[hackshen.com](https://reference.hackshen.com)<!--rehype:target=_blank-->
[afetera.top](https://note.afetera.top)<!--rehype:target=_blank-->
[trtuaazz.com](https://reference.trtuaazz.com)<!--rehype:target=_blank-->
[anhaoyang.com](http://dev-doc.anhaoyang.com/)<!--rehype:target=_blank-->
[xxcxx.lat](https://xxcxx.lat/)<!--rehype:target=_blank-->
[fishlee.net](https://cr.fishlee.net/)<!--rehype:target=_blank-->
[lideshan.top](https://dev.lideshan.top/)<!--rehype:target=_blank-->
[yunshangmanyou.com](https://quick.yunshangmanyou.com)<!--rehype:target=_blank-->
[xiaokaixuan.com](https://xiaokaixuan.com/xkx/rq/index.html)<!--rehype:target=_blank-->
[opzz.top](https://reference.opzz.top)<!--rehype:target=_blank-->
<!--rehype:class=home-card home-links-->
如果你有资源,可以很方便[部署 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:wrap-style=text-align: center;max-width: 650px;margin: 0 auto;&class=home-title-reset-->
- [Quick Reference for VSCode](https://marketplace.visualstudio.com/items?itemName=jackiotyu.quick-reference) 由 [jackiotyu](https://github.com/jackiotyu/vscode-quick-reference) 提供
## 赞助支持
<!--rehype:wrap-style=text-align: center;max-width: 650px;margin: 0 auto;&class=home-title-reset-->
非常感谢那些一直支持我开源工作的朋友们。如果您对我的工作感到满意,可以选择在[这里进行赞助](https://wangchujiang.com/#/sponsor)<!--rehype:target=_blank-->。也可以通过下载并使用我开发的 [macOS 应用](https://wangchujiang.com/#/app)<!--rehype:target=_blank-->来支持我。以下是我个人开发的 macOS 应用:
<p style="display: inline-block">
<a target="_blank" href="https://wangchujiang.com/focus-cursor/" title="FocusCursor for macOS"><img align="center" alt="FocusCursor" height="52" width="52" src="./appicon/focus-cursor.png"></a>
<a target="_blank" href="https://wangchujiang.com/videoer/" title="Videoer for macOS"><img align="center" alt="Videoer" height="52" width="52" src="./appicon/videoer.png"></a>
<a target="_blank" href="https://wangchujiang.com/key-clicker/" title="KeyClicker for macOS"><img align="center" alt="KeyClicker" height="50" width="50" src="./appicon/key-clicker.png"></a>
<a target="_blank" href="https://wangchujiang.com/daybar/" title="DayBar for macOS"><img align="center" alt="DayBar" height="50" width="50" src="./appicon/daybar.png"></a>
<a target="_blank" href="https://wangchujiang.com/iconed/" title="Iconed for macOS"><img align="center" alt="Iconed" height="50" width="50" src="./appicon/iconed.png"></a>
<a target="_blank" href="https://wangchujiang.com/rightmenu-master/" title="RightMenu Master for macOS"><img align="center" alt="RightMenu Master" height="50" width="50" src="./appicon/rightmenu-master.png"></a>
<a target="_blank" href="https://wangchujiang.com/paste-quick/" title="Paste Quick for macOS"><img align="center" alt="Paste Quick" height="50" width="50" src="./appicon/paste-quick.png"></a>
<a target="_blank" href="https://wangchujiang.com/quick-rss/" title="Quick RSS for macOS/iOS"><img align="center" alt="Quick RSS" height="50" width="50" src="./appicon/quick-rss.png"></a>
<a target="_blank" href="https://wangchujiang.com/web-serve/" title="Web Serve for macOS"><img align="center" alt="Web Serve" height="50" width="50" src="./appicon/web-serve.png"></a>
<a target="_blank" href="https://wangchujiang.com/copybook-generator/" title="Copybook Generator for macOS/iOS"><img align="center" alt="Copybook Generator" height="50" width="50" src="./appicon/copybook-generator.png"></a>
<a target="_blank" href="https://wangchujiang.com/devtutor/" title="DevTutor for macOS/iOS"><img align="center" alt="DevTutor for SwiftUI" height="50" width="50" src="./appicon/devtutor.png"></a>
<a target="_blank" href="https://wangchujiang.com/regex-mate/" title="RegexMate for macOS/iOS"><img align="center" alt="RegexMate" height="50" width="50" src="./appicon/regex-mate.png"></a>
<a target="_blank" href="https://wangchujiang.com/time-passage/" title="Time Passage for macOS/iOS"><img align="center" alt="Time Passage" height="50" width="50" src="./appicon/time-passage.png"></a>
<a target="_blank" href="https://wangchujiang.com/IconizeFolder/" title="IconizeFolder for macOS"><img align="center" alt="Iconize Folder" height="50" width="50" src="./appicon/iconize-folder.png"></a>
<a target="_blank" href="https://wangchujiang.com/TextSoundSaver/" title="Textsound Saver for macOS/iOS"><img align="center" alt="Textsound Saver" height="50" width="50" src="./appicon/textsound-saver.png"></a>
<a target="_blank" href="https://wangchujiang.com/create-custom-symbols/" title="Create Custom Symbols for macOS"><img align="center" alt="Create Custom Symbols" height="50" width="50" src="./appicon/create-custom-symbols.png"></a>
<a target="_blank" href="https://wangchujiang.com/DevHub/" title="DevHub for macOS"><img align="center" alt="DevHub" height="50" width="50" src="./appicon/devhub.png"></a>
<a target="_blank" href="https://wangchujiang.com/ResumeRevise/" title="Resume Revise for macOS"><img align="center" alt="Resume Revise" height="50" width="50" src="./appicon/resume-revise.png"></a>
<a target="_blank" href="https://wangchujiang.com/palette-genius/" title="Palette Genius for macOS"><img align="center" alt="Palette Genius" height="50" width="50" src="./appicon/palette-genius.png"></a>
<a target="_blank" href="https://wangchujiang.com/symbol-scribe/" title="Symbol Scribe for macOS"><img align="center" alt="Symbol Scribe" height="50" width="50" src="./appicon/symbol-scribe.png"></a>
</p>
<!--rehype:style=padding-top:1rem;max-width: 520px;margin: 0 auto;-->
<!--rehype:ignore:start-->
## 开发
```sh
# 克隆仓库
$ git clone https://github.com/jaywcjlove/reference.git
$ npm install # 安装依赖
$ npm start # 启动监听,实时生成 HTML
$ open dist/index.html # 在浏览器打开生成 HTML
```
## License
MIT © [Kenny Wong](https://github.com/jaywcjlove)

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
appicon/daybar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
appicon/devhub.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
appicon/devtutor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
appicon/focus-cursor.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
appicon/hosts-editor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
appicon/iconed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
appicon/iconize-folder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
appicon/key-clicker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
appicon/npmd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
appicon/palette-genius.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

BIN
appicon/paste-quick.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

BIN
appicon/quick-rss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
appicon/regex-mate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

BIN
appicon/resume-revise.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
appicon/symbol-scribe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
appicon/textsound-saver.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
appicon/time-passage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
appicon/videoer.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
appicon/web-serve.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

13
assets/bun.svg Normal file
View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 70" height="1em" width="1em">
<path d="M71.09 20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46 26.46 0 0 1 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05-11.58 0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55 65.3 30.14 69.75 42 69.75c20.68 0 37.5-13.48 37.5-30 0-7.06-3.04-13.75-8.41-19.01Z"/>
<path d="M73 35.7c0 15.21-15.67 27.54-35 27.54S3 50.91 3 35.7C3 26.27 9 17.94 18.22 13S33.18 3 38 3s8.94 4.13 19.78 10C67 17.94 73 26.27 73 35.7Z" style="fill:#fbf0df"/>
<path data-name="Bottom Shadow" d="M73 35.7a21.67 21.67 0 0 0-.8-5.78c-2.73 33.3-43.35 34.9-59.32 24.94A40 40 0 0 0 38 63.24c19.3 0 35-12.35 35-27.54Z" style="fill:#f6dece"/>
<path data-name="Light Shine" d="M24.53 11.17C29 8.49 34.94 3.46 40.78 3.45A9.29 9.29 0 0 0 38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7v1.19c6.06-21.41 17.07-23.04 21.53-25.72Z" style="fill:#fffefc"/>
<path d="M35.12 5.53A16.41 16.41 0 0 1 29.49 18c-.28.25-.06.73.3.59 3.37-1.31 7.92-5.23 6-13.14-.08-.45-.67-.33-.67.08Zm2.27 0A16.24 16.24 0 0 1 39 19c-.12.35.31.65.55.36 2.19-2.8 4.1-8.36-1.62-14.36-.29-.26-.74.14-.54.49Zm2.76-.17A16.42 16.42 0 0 1 47 17.12a.33.33 0 0 0 .65.11c.92-3.49.4-9.44-7.17-12.53-.4-.16-.66.38-.33.62Zm-18.46 10.4a16.94 16.94 0 0 0 10.47-9c.18-.36.75-.22.66.18-1.73 8-7.52 9.67-11.12 9.45-.38.01-.37-.52-.01-.63Z" style="fill:#ccbea7;fill-rule:evenodd"/>
<path d="M38 65.75C17.32 65.75.5 52.27.5 35.7c0-10 6.18-19.33 16.53-24.92 3-1.6 5.57-3.21 7.86-4.62 1.26-.78 2.45-1.51 3.6-2.19C32 1.89 35 .5 38 .5s5.62 1.2 8.9 3.14c1 .57 2 1.19 3.07 1.87 2.49 1.54 5.3 3.28 9 5.27C69.32 16.37 75.5 25.69 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05ZM38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7c0 15.19 15.7 27.55 35 27.55S73 50.89 73 35.7c0-9.08-5.69-17.57-15.22-22.7-3.78-2-6.73-3.88-9.12-5.36-1.09-.67-2.09-1.29-3-1.84C42.63 4 40.42 3 38 3Z"/><g>
<path d="M45.05 43a8.93 8.93 0 0 1-2.92 4.71 6.81 6.81 0 0 1-4 1.88A6.84 6.84 0 0 1 34 47.71 8.93 8.93 0 0 1 31.12 43a.72.72 0 0 1 .8-.81h12.34a.72.72 0 0 1 .79.81Z" style="fill:#b71422" data-name="Background"/>
<path data-name="Background" d="M34 47.79a6.91 6.91 0 0 0 4.12 1.9 6.91 6.91 0 0 0 4.11-1.9 10.63 10.63 0 0 0 1-1.07 6.83 6.83 0 0 0-4.9-2.31 6.15 6.15 0 0 0-5 2.78c.23.21.43.41.67.6Z" style="fill:#ff6164"/>
<path data-name="Outline" d="M34.16 47a5.36 5.36 0 0 1 4.19-2.08 6 6 0 0 1 4 1.69c.23-.25.45-.51.66-.77a7 7 0 0 0-4.71-1.93 6.36 6.36 0 0 0-4.89 2.36 9.53 9.53 0 0 0 .75.73Z"/>
<path data-name="Outline" d="M38.09 50.19a7.42 7.42 0 0 1-4.45-2 9.52 9.52 0 0 1-3.11-5.05 1.2 1.2 0 0 1 .26-1 1.41 1.41 0 0 1 1.13-.51h12.34a1.44 1.44 0 0 1 1.13.51 1.19 1.19 0 0 1 .25 1 9.52 9.52 0 0 1-3.11 5.05 7.42 7.42 0 0 1-4.44 2Zm-6.17-7.4c-.16 0-.2.07-.21.09a8.29 8.29 0 0 0 2.73 4.37A6.23 6.23 0 0 0 38.09 49a6.28 6.28 0 0 0 3.65-1.73 8.3 8.3 0 0 0 2.72-4.37.21.21 0 0 0-.2-.09Z"/></g><g><ellipse data-name="Right Blush" cx="53.22" cy="40.18" rx="5.85" ry="3.44" style="fill:#febbd0"/><ellipse data-name="Left Bluch" cx="22.95" cy="40.18" rx="5.85" ry="3.44" style="fill:#febbd0"/>
<path d="M25.7 38.8a5.51 5.51 0 1 0-5.5-5.51 5.51 5.51 0 0 0 5.5 5.51Zm24.77 0A5.51 5.51 0 1 0 45 33.29a5.5 5.5 0 0 0 5.47 5.51Z" style="fill-rule:evenodd"/>
<path d="M24 33.64a2.07 2.07 0 1 0-2.06-2.07A2.07 2.07 0 0 0 24 33.64Zm24.77 0a2.07 2.07 0 1 0-2.06-2.07 2.07 2.07 0 0 0 2.04 2.07Z" style="fill:#fff;fill-rule:evenodd"/></g></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

2
assets/canvas.svg Normal file
View File

@ -0,0 +1,2 @@
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="1em" height="1em"><path d="M861.098667 736.554667l73.472 146.261333a38.4 38.4 0 0 1-1.706667 37.546667 38.826667 38.826667 0 0 1-32.981333 18.304H512a38.741333 38.741333 0 0 1-33.066667-18.261334 38.4 38.4 0 0 1-1.664-37.589333l10.752-21.333333H221.098667a58.026667 58.026667 0 0 1-58.197334-57.941334V474.453333C116.096 439.168 85.333333 383.829333 85.333333 321.024 85.333333 214.570667 172.373333 128 279.253333 128c63.146667 0 118.698667 30.592 154.154667 77.226667h369.493333a58.026667 58.026667 0 0 1 58.197334 57.898666v473.429334zm-155.178667-136.192-131.157333 261.12h262.357333l-131.2-261.12zM240.469333 510.122667v274.133333h286.336l144.426667-287.488c13.184-26.154667 56.234667-26.154667 69.376 0l42.922667 85.333333V282.453333h-314.282667a192.64 192.64 0 0 1-52.992 174.933334 194.773333 194.773333 0 0 1-175.786667 52.778666zm38.826667-73.301334a116.053333 116.053333 0 0 0 116.352-115.797333A116.053333 116.053333 0 0 0 279.253333 205.226667a116.053333 116.053333 0 0 0-116.352 115.797333 116.053333 116.053333 0 0 0 116.352 115.797333z"></path>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

5
assets/chatgpt.svg Normal file
View File

@ -0,0 +1,5 @@
<svg width="1em" height="1em" viewBox="0 0 41 41" fill="none" xmlns="http://www.w3.org/2000/svg" stroke-width="1.5"
class="h-6 w-6">
<path d="M37.5324 16.8707C37.9808 15.5241 38.1363 14.0974 37.9886 12.6859C37.8409 11.2744 37.3934 9.91076 36.676 8.68622C35.6126 6.83404 33.9882 5.3676 32.0373 4.4985C30.0864 3.62941 27.9098 3.40259 25.8215 3.85078C24.8796 2.7893 23.7219 1.94125 22.4257 1.36341C21.1295 0.785575 19.7249 0.491269 18.3058 0.500197C16.1708 0.495044 14.0893 1.16803 12.3614 2.42214C10.6335 3.67624 9.34853 5.44666 8.6917 7.47815C7.30085 7.76286 5.98686 8.3414 4.8377 9.17505C3.68854 10.0087 2.73073 11.0782 2.02839 12.312C0.956464 14.1591 0.498905 16.2988 0.721698 18.4228C0.944492 20.5467 1.83612 22.5449 3.268 24.1293C2.81966 25.4759 2.66413 26.9026 2.81182 28.3141C2.95951 29.7256 3.40701 31.0892 4.12437 32.3138C5.18791 34.1659 6.8123 35.6322 8.76321 36.5013C10.7141 37.3704 12.8907 37.5973 14.9789 37.1492C15.9208 38.2107 17.0786 39.0587 18.3747 39.6366C19.6709 40.2144 21.0755 40.5087 22.4946 40.4998C24.6307 40.5054 26.7133 39.8321 28.4418 38.5772C30.1704 37.3223 31.4556 35.5506 32.1119 33.5179C33.5027 33.2332 34.8167 32.6547 35.9659 31.821C37.115 30.9874 38.0728 29.9178 38.7752 28.684C39.8458 26.8371 40.3023 24.6979 40.0789 22.5748C39.8556 20.4517 38.9639 18.4544 37.5324 16.8707ZM22.4978 37.8849C20.7443 37.8874 19.0459 37.2733 17.6994 36.1501C17.7601 36.117 17.8666 36.0586 17.936 36.0161L25.9004 31.4156C26.1003 31.3019 26.2663 31.137 26.3813 30.9378C26.4964 30.7386 26.5563 30.5124 26.5549 30.2825V19.0542L29.9213 20.998C29.9389 21.0068 29.9541 21.0198 29.9656 21.0359C29.977 21.052 29.9842 21.0707 29.9867 21.0902V30.3889C29.9842 32.375 29.1946 34.2791 27.7909 35.6841C26.3872 37.0892 24.4838 37.8806 22.4978 37.8849ZM6.39227 31.0064C5.51397 29.4888 5.19742 27.7107 5.49804 25.9832C5.55718 26.0187 5.66048 26.0818 5.73461 26.1244L13.699 30.7248C13.8975 30.8408 14.1233 30.902 14.3532 30.902C14.583 30.902 14.8088 30.8408 15.0073 30.7248L24.731 25.1103V28.9979C24.7321 29.0177 24.7283 29.0376 24.7199 29.0556C24.7115 29.0736 24.6988 29.0893 24.6829 29.1012L16.6317 33.7497C14.9096 34.7416 12.8643 35.0097 10.9447 34.4954C9.02506 33.9811 7.38785 32.7263 6.39227 31.0064ZM4.29707 13.6194C5.17156 12.0998 6.55279 10.9364 8.19885 10.3327C8.19885 10.4013 8.19491 10.5228 8.19491 10.6071V19.808C8.19351 20.0378 8.25334 20.2638 8.36823 20.4629C8.48312 20.6619 8.64893 20.8267 8.84863 20.9404L18.5723 26.5542L15.206 28.4979C15.1894 28.5089 15.1703 28.5155 15.1505 28.5173C15.1307 28.5191 15.1107 28.516 15.0924 28.5082L7.04046 23.8557C5.32135 22.8601 4.06716 21.2235 3.55289 19.3046C3.03862 17.3858 3.30624 15.3413 4.29707 13.6194ZM31.955 20.0556L22.2312 14.4411L25.5976 12.4981C25.6142 12.4872 25.6333 12.4805 25.6531 12.4787C25.6729 12.4769 25.6928 12.4801 25.7111 12.4879L33.7631 17.1364C34.9967 17.849 36.0017 18.8982 36.6606 20.1613C37.3194 21.4244 37.6047 22.849 37.4832 24.2684C37.3617 25.6878 36.8382 27.0432 35.9743 28.1759C35.1103 29.3086 33.9415 30.1717 32.6047 30.6641C32.6047 30.5947 32.6047 30.4733 32.6047 30.3889V21.188C32.6066 20.9586 32.5474 20.7328 32.4332 20.5338C32.319 20.3348 32.154 20.1698 31.955 20.0556ZM35.3055 15.0128C35.2464 14.9765 35.1431 14.9142 35.069 14.8717L27.1045 10.2712C26.906 10.1554 26.6803 10.0943 26.4504 10.0943C26.2206 10.0943 25.9948 10.1554 25.7963 10.2712L16.0726 15.8858V11.9982C16.0715 11.9783 16.0753 11.9585 16.0837 11.9405C16.0921 11.9225 16.1048 11.9068 16.1207 11.8949L24.1719 7.25025C25.4053 6.53903 26.8158 6.19376 28.2383 6.25482C29.6608 6.31589 31.0364 6.78077 32.2044 7.59508C33.3723 8.40939 34.2842 9.53945 34.8334 10.8531C35.3826 12.1667 35.5464 13.6095 35.3055 15.0128ZM14.2424 21.9419L10.8752 19.9981C10.8576 19.9893 10.8423 19.9763 10.8309 19.9602C10.8195 19.9441 10.8122 19.9254 10.8098 19.9058V10.6071C10.8107 9.18295 11.2173 7.78848 11.9819 6.58696C12.7466 5.38544 13.8377 4.42659 15.1275 3.82264C16.4173 3.21869 17.8524 2.99464 19.2649 3.1767C20.6775 3.35876 22.0089 3.93941 23.1034 4.85067C23.0427 4.88379 22.937 4.94215 22.8668 4.98473L14.9024 9.58517C14.7025 9.69878 14.5366 9.86356 14.4215 10.0626C14.3065 10.2616 14.2466 10.4877 14.2479 10.7175L14.2424 21.9419ZM16.071 17.9991L20.4018 15.4978L24.7325 17.9975V22.9985L20.4018 25.4983L16.071 22.9985V17.9991Z"
fill="currentColor"></path>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 640 512" height="1em" width="1em">
<path d="M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"/>
</svg>

After

Width:  |  Height:  |  Size: 713 B

12
assets/erlang.svg Normal file
View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 256 225">
<g fill="none" fill-rule="evenodd">
<path fill="#A90533" fill-rule="nonzero" d="M44.3399607 159.659089C25.536634 139.734178 14.5349706 112.207841 14.5628518 79.365069 14.5368716 50.3198413 23.6628914 25.3541383 39.3517627 6.35691059L39.3264162 6.36641554 6.35057459 6.36641554 6.35057459 159.662257 44.3165152 159.662257 44.3399607 159.659089 44.3399607 159.659089ZM218.009347 159.671762C226.109466 150.996277 233.367446 140.779089 239.944238 129.094336L203.445228 110.844831C190.626852 131.684119 171.881188 150.865742 145.959287 150.993742 108.232872 150.865742 93.4102182 118.60594 93.4916246 77.0832472L234.469386 77.0832472C234.657584 72.3954056 234.657584 70.2156037 234.469386 67.9591284 235.389466 43.2557621 228.842456 22.4912472 216.932753 6.32079178L216.871287 6.36704921 248.612753 6.36704921 248.612753 159.662891 217.940278 159.662891 218.009347 159.671762 218.009347 159.671762Z"/>
<path fill="#A90533" fill-rule="nonzero" d="M95.7737825,41.4967126 C97.3344954,22.6971878 112.156515,10.0543363 129.535367,10.0163165 C147.032713,10.0543363 159.674931,22.6971878 160.103287,41.4967126 L95.7737825,41.4967126 L95.7737825,41.4967126 Z"/>
<polygon fill="currentColor" fill-rule="nonzero" points="26.426 185.668 26.426 179.281 6.807 179.281 6.807 217.149 26.426 217.149 26.426 210.761 14.107 210.761 14.107 200.724 25.969 200.724 25.969 194.337 14.107 194.337 14.107 185.668"/>
<path fill="currentColor" fill-rule="nonzero" d="M59.7310102,201.179881 C64.6216241,200.453703 67.3070894,195.607446 67.4870498,190.686416 C67.3070894,182.635723 62.088238,179.304555 54.7123964,179.280475 L44.6751687,179.280475 L44.6751687,217.148198 L51.9749706,217.148198 L51.9749706,202.092356 L61.0997231,217.148198 L70.2244756,217.148198 L59.7310102,201.179881 L59.7310102,201.179881 Z M51.974337,185.212198 L52.8868122,185.212198 C56.8693865,185.361743 59.8583766,186.270416 59.7303766,191.143287 C59.8583766,195.608079 56.9707726,196.819644 52.8868122,196.618139 L51.974337,196.618139 L51.974337,185.212198 L51.974337,185.212198 Z"/>
<polygon fill="currentColor" fill-rule="nonzero" points="93.036 179.281 85.737 179.281 85.737 217.149 103.529 217.149 103.529 210.761 93.036 210.761"/>
<path fill="currentColor" fill-rule="nonzero" d="M140.940674,209.392158 L144.134337,217.148198 L151.890377,217.148198 L137.74701,178.368 L131.815921,178.368 L116.76008,217.148198 L124.515485,217.148198 L127.709783,209.392158 L140.940674,209.392158 L140.940674,209.392158 Z M139.115723,203.461703 L129.990971,203.461703 L134.097109,189.318337 L139.115723,203.461703 L139.115723,203.461703 Z"/>
<polygon fill="currentColor" fill-rule="nonzero" points="165.578 217.149 173.334 217.149 173.334 191.6 193.409 218.061 198.883 218.061 198.883 179.281 191.127 179.281 191.127 204.83 171.052 178.368 165.578 178.368"/>
<path fill="currentColor" fill-rule="nonzero" d="M230.820119,197.073743 L230.820119,203.004832 L239.032396,203.004832 C238.861307,207.771248 234.960476,211.809584 230.363882,211.673347 C223.104634,211.809584 219.507327,204.794297 219.414179,198.442455 C219.507327,192.175525 223.053941,184.856713 230.363882,184.755327 C234.20008,184.856079 237.443169,187.480713 239.032396,190.686416 L245.419723,187.492753 C242.610693,181.575604 236.936238,178.294495 230.363882,178.368 C219.051089,178.295129 211.806416,187.632792 211.658139,198.442455 C211.806416,208.982812 218.848951,218.371168 229.907644,218.516911 C241.850931,218.371168 247.373307,208.831366 247.244674,197.986218 L247.244674,197.073743 L230.820119,197.073743 L230.820119,197.073743 L230.820119,197.073743 Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

3
assets/github-cli.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1984 2048" height="1em" width="1em">
<path d="M663.6 1589.6c0 8-9.2 14.4-20.8 14.4-13.2 1.2-22.4-5.2-22.4-14.4 0-8 9.2-14.4 20.8-14.4 12-1.2 22.4 5.2 22.4 14.4zm-124.4-18c-2.8 8 5.2 17.2 17.2 19.6 10.4 4 22.4 0 24.8-8s-5.2-17.2-17.2-20.8c-10.4-2.8-22 1.2-24.8 9.2zm176.8-6.8c-11.6 2.8-19.6 10.4-18.4 19.6 1.2 8 11.6 13.2 23.6 10.4 11.6-2.8 19.6-10.4 18.4-18.4-1.2-7.6-12-12.8-23.6-11.6zM979.2 32C424.4 32 0 453.2 0 1008c0 443.6 279.2 823.2 678 956.8 51.2 9.2 69.2-22.4 69.2-48.4 0-24.8-1.2-161.6-1.2-245.6 0 0-280 60-338.8-119.2 0 0-45.6-116.4-111.2-146.4 0 0-91.6-62.8 6.4-61.6 0 0 99.6 8 154.4 103.2 87.6 154.4 234.4 110 291.6 83.6 9.2-64 35.2-108.4 64-134.8-223.6-24.8-449.2-57.2-449.2-442 0-110 30.4-165.2 94.4-235.6-10.4-26-44.4-133.2 10.4-271.6 83.6-26 276 108 276 108 80-22.4 166-34 251.2-34s171.2 11.6 251.2 34c0 0 192.4-134.4 276-108 54.8 138.8 20.8 245.6 10.4 271.6 64 70.8 103.2 126 103.2 235.6 0 386-235.6 416.8-459.2 442 36.8 31.6 68 91.6 68 185.6 0 134.8-1.2 301.6-1.2 334.4 0 26 18.4 57.6 69.2 48.4 400-132.8 671.2-512.4 671.2-956 0-554.8-450-976-1004.8-976zM388.8 1411.6c-5.2 4-4 13.2 2.8 20.8 6.4 6.4 15.6 9.2 20.8 4 5.2-4 4-13.2-2.8-20.8-6.4-6.4-15.6-9.2-20.8-4zm-43.2-32.4c-2.8 5.2 1.2 11.6 9.2 15.6 6.4 4 14.4 2.8 17.2-2.8 2.8-5.2-1.2-11.6-9.2-15.6-8-2.4-14.4-1.2-17.2 2.8zm129.6 142.4c-6.4 5.2-4 17.2 5.2 24.8 9.2 9.2 20.8 10.4 26 4 5.2-5.2 2.8-17.2-5.2-24.8-8.8-9.2-20.8-10.4-26-4zm-45.6-58.8c-6.4 4-6.4 14.4 0 23.6 6.4 9.2 17.2 13.2 22.4 9.2 6.4-5.2 6.4-15.6 0-24.8-5.6-9.2-16-13.2-22.4-8z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

8
assets/jupyter.svg Normal file
View File

@ -0,0 +1,8 @@
<svg viewBox="0 0 256 300" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" height="1em" width="1em">
<path d="M10.584 156.41v-32.753h7.136v35.256a21.302 21.302 0 0 1-4.686 15.976A18.213 18.213 0 0 1 .89 179.31l-.745-5.325a11.61 11.61 0 0 0 7.775-2.982c1.917-2.237 2.663-5.273 2.663-14.592Zm53.22-4.201c0 3.994 0 7.562.32 10.651h-6.338l-.426-6.337a14.752 14.752 0 0 1-12.941 7.242c-6.178 0-13.527-3.355-13.527-17.041v-22.74h7.136v21.302c0 7.402 2.29 12.355 8.734 12.355a9.958 9.958 0 0 0 10.065-10.065v-23.859h7.136v28.279l-.16.213Zm13.527-15.555c0-4.953 0-9-.32-12.675h6.39l.32 6.657a15.445 15.445 0 0 1 13.953-7.562c9.48 0 16.616 7.935 16.616 19.757 0 13.953-8.574 20.877-17.84 20.877a13.794 13.794 0 0 1-12.09-6.125v21.302h-7.03v-42.231Zm7.03 10.385c.019.966.126 1.928.319 2.875a10.97 10.97 0 0 0 10.651 8.255c7.509 0 11.93-6.124 11.93-15.018 0-7.775-4.155-14.432-11.664-14.432a12.249 12.249 0 0 0-11.237 11.663v6.657Zm42.644-23.095 8.574 22.953a132.673 132.673 0 0 1 2.503 7.935c.745-2.344 1.544-5.326 2.503-8.095l7.775-22.793h7.509l-10.651 27.692c-5.326 13.314-8.574 20.184-13.474 24.338a19.385 19.385 0 0 1-8.734 4.58l-1.757-5.965a18.906 18.906 0 0 0 6.23-3.461 21.302 21.302 0 0 0 6.019-7.882c.29-.53.488-1.107.585-1.704a6.125 6.125 0 0 0-.479-1.864l-14.485-35.84h7.775l.107.106Zm47.809-11.173v11.183h10.225v5.326h-10.225v20.983c0 4.793 1.384 7.562 5.325 7.562 1.4.023 2.796-.138 4.154-.48l.32 5.326a17.575 17.575 0 0 1-6.338.959 9.906 9.906 0 0 1-7.722-2.983 14.326 14.326 0 0 1-2.77-10.118v-21.302h-6.07V123.9h6.177v-9.48l6.924-1.65Zm23.37 31.877a12.516 12.516 0 0 0 13.474 13.473 25.988 25.988 0 0 0 10.651-2.024l1.225 5.326a31.953 31.953 0 0 1-13.048 2.396 18.106 18.106 0 0 1-19.278-19.598c0-11.716 6.976-20.982 18.373-20.982 12.781 0 15.977 11.183 15.977 18.32.068 1.1.068 2.202 0 3.302h-27.533l.16-.213Zm20.877-5.326a10.064 10.064 0 0 0-9.906-11.503 11.77 11.77 0 0 0-10.917 11.503h20.823Zm17.324-3.269c0-4.58 0-8.52-.32-12.142h6.391v7.616h.32a11.77 11.77 0 0 1 10.651-8.521 7.775 7.775 0 0 1 2.024 0v6.657a10.645 10.645 0 0 0-2.45 0 9.958 9.958 0 0 0-9.533 9.053 19.772 19.772 0 0 0-.32 3.302v20.716h-7.029v-26.627l.266-.054Z" fill="#4E4E4E"/>
<path d="M233.258 16.962a18.053 18.053 0 1 1-18.8-16.935 17.84 17.84 0 0 1 18.8 16.935Z" fill="#767677"/>
<path d="M127.953 225.541c-47.93 0-90.055-17.201-111.836-42.604a119.239 119.239 0 0 0 223.672 0c-21.728 25.403-63.693 42.604-111.836 42.604Zm0-165.187c47.93 0 90.055 17.202 111.836 42.604a119.243 119.243 0 0 0-111.836-77.88 119.239 119.239 0 0 0-111.836 77.88c21.781-25.455 63.694-42.604 111.836-42.604Z" fill="#F37726"/>
<path d="M61.972 274.975a22.74 22.74 0 1 1-23.699-21.302 22.527 22.527 0 0 1 23.699 21.302Z" fill="#9E9E9E"/>
<path d="M21.564 54.565a13.102 13.102 0 1 1 12.728-13.633 13.26 13.26 0 0 1-12.728 13.633Z" fill="#616262"/>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

5
assets/minio.svg Normal file
View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 162.612 24.465" xmlns:v="https://vecta.io/nano">
<path
d="M52.751.414h9.108v23.63h-9.108zM41.711.74l-18.488 9.92a.919.919 0 0 1-.856 0L3.879.74A2.808 2.808 0 0 0 2.558.414h-.023A2.4 2.4 0 0 0 0 2.641v21.376h9.1V13.842a.918.918 0 0 1 1.385-.682l10.361 5.568a3.634 3.634 0 0 0 3.336.028l10.933-5.634a.917.917 0 0 1 1.371.69v10.205h9.1V2.641A2.4 2.4 0 0 0 43.055.414h-.023a2.808 2.808 0 0 0-1.321.326zm65.564-.326h-9.237v10.755a.913.913 0 0 1-1.338.706L72.762.675a2.824 2.824 0 0 0-1.191-.261h-.016a2.4 2.4 0 0 0-2.535 2.227v21.377h9.163V13.275a.914.914 0 0 1 1.337-.707l24.032 11.2a2.813 2.813 0 0 0 1.188.26 2.4 2.4 0 0 0 2.535-2.227zm7.161 23.63V.414h4.191v23.63zm28.856.421c-11.274 0-19.272-4.7-19.272-12.232C124.02 4.741 132.066 0 143.292 0s19.32 4.7 19.32 12.233-7.902 12.232-19.32 12.232zm0-21.333c-8.383 0-14.84 3.217-14.84 9.1 0 5.926 6.457 9.1 14.84 9.1s14.887-3.174 14.887-9.1c0-5.883-6.504-9.1-14.887-9.1z"
fill="#c72c48" />
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

1
assets/pinia.svg Normal file
View File

@ -0,0 +1 @@
<svg viewBox="0 0 256 331" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em"><defs><linearGradient id="a" x1="55.342%" x2="42.817%" y1="0%" y2="42.863%"><stop offset="0%" stop-color="#52CE63"/><stop offset="100%" stop-color="#51A256"/></linearGradient><linearGradient id="b" x1="55.349%" x2="42.808%" y1="0%" y2="42.863%"><stop offset="0%" stop-color="#52CE63"/><stop offset="100%" stop-color="#51A256"/></linearGradient><linearGradient id="c" x1="50%" x2="50%" y1="0%" y2="58.811%"><stop offset="0%" stop-color="#8AE99C"/><stop offset="100%" stop-color="#52CE63"/></linearGradient><linearGradient id="d" x1="51.378%" x2="44.585%" y1="17.473%" y2="100%"><stop offset="0%" stop-color="#FFE56C"/><stop offset="100%" stop-color="#FFC63A"/></linearGradient></defs><path fill="url(#a)" d="M67.56 173.328c30.366-2.985 41.08-27.648 44.735-64.823 3.654-37.175-21.174-70.814-31.502-69.799-10.328 1.015-43.15 40.322-46.805 77.497-3.654 37.175 3.205 60.11 33.572 57.125Z" transform="rotate(-38 72.877 106.136)"/><path fill="url(#b)" d="M184.454 186.277c30.367 2.986 36.394-20.032 32.74-57.207-3.655-37.175-35.645-76.4-45.973-77.415-10.328-1.015-35.989 32.542-32.334 69.717 3.654 37.175 15.201 61.92 45.567 64.905Z" transform="rotate(52 178.34 119.085)"/><path fill="url(#c)" d="M129.232 151.601c27.341 0 34.878-26.184 34.878-67.013 0-40.83-25.579-80.843-34.878-80.843S93.605 43.758 93.605 84.588c0 40.829 8.286 67.013 35.627 67.013Z" transform="rotate(7 128.858 77.673)"/><path fill="url(#d)" d="M113.386 330.307c56.896 0 103.038-16.528 103.038-91.482 0-74.955-46.142-136.462-103.038-136.462-56.897 0-103.002 61.507-103.002 136.462 0 74.954 46.105 91.482 103.002 91.482Z"/><ellipse cx="165.427" cy="216.677" fill="#EAADCC" rx="14.717" ry="6.845"/><ellipse cx="57.273" cy="212.57" fill="#EAADCC" rx="14.717" ry="6.845" transform="rotate(7 57.273 212.57)"/><path d="M96.266 210.285a2.054 2.054 0 1 0-3.406 2.295c3.151 4.676 7.997 7.39 14.373 8.119 6.348.725 12.016-.902 16.877-4.852a2.054 2.054 0 1 0-2.59-3.187c-3.999 3.249-8.563 4.559-13.82 3.958-5.23-.598-8.986-2.7-11.434-6.333ZM65.818 178.63a14.672 14.672 0 0 1 10.551 3.945 14.67 14.67 0 0 1 4.672 10.25 14.671 14.671 0 0 1-3.945 10.55 14.672 14.672 0 0 1-10.25 4.672 14.67 14.67 0 0 1-10.551-3.945 14.672 14.672 0 0 1-4.67-10.25 14.67 14.67 0 0 1 3.944-10.55 14.67 14.67 0 0 1 10.249-4.672Z"/><path fill="#FFF" d="M66.59 190.932a4.792 4.792 0 1 0-9.578.336 4.792 4.792 0 0 0 9.579-.336Z"/><path d="M154.99 182.366a14.671 14.671 0 0 1 10.552 3.944 14.67 14.67 0 0 1 4.67 10.25 14.672 14.672 0 0 1-3.944 10.551 14.67 14.67 0 0 1-10.25 4.671 14.671 14.671 0 0 1-10.55-3.945 14.671 14.671 0 0 1-4.672-10.25 14.67 14.67 0 0 1 3.945-10.55 14.671 14.671 0 0 1 10.25-4.671Z"/><path fill="#FFF" d="M65.71 175.552c9.824-.343 18.066 7.342 18.409 17.165.343 9.824-7.342 18.065-17.166 18.408-9.824.343-18.064-7.342-18.407-17.166-.343-9.823 7.341-18.064 17.164-18.407Zm12.252 17.38c-.224-6.423-5.613-11.448-12.037-11.223-6.422.224-11.447 5.612-11.222 12.035.224 6.424 5.612 11.448 12.035 11.224 6.423-.224 11.448-5.612 11.224-12.036ZM154.883 179.287c9.824-.343 18.065 7.342 18.408 17.165.343 9.824-7.342 18.065-17.165 18.408-9.824.343-18.065-7.342-18.408-17.165-.343-9.824 7.342-18.065 17.165-18.408Zm12.251 17.38c-.224-6.423-5.612-11.447-12.036-11.223-6.423.224-11.448 5.613-11.223 12.036.224 6.423 5.612 11.448 12.035 11.224 6.424-.225 11.448-5.613 11.224-12.037Z"/><path fill="#FFF" d="M155.763 194.668a4.792 4.792 0 1 0-9.578.335 4.792 4.792 0 0 0 9.578-.335Z"/><path fill="#ECB732" d="m38.083 243.16 22.33 23.235 16.022-17.044a3.765 3.765 0 0 1 5.486 5.157l-16.283 17.324 23.1 24.036a3.765 3.765 0 1 1-5.43 5.218l-22.834-23.761-10.725 11.41a3.765 3.765 0 1 1-5.486-5.158l10.986-11.688-22.595-23.511a3.765 3.765 0 1 1 5.43-5.218ZM188.04 243.16a3.765 3.765 0 1 1 5.429 5.218l-22.596 23.511 10.988 11.688a3.765 3.765 0 0 1-.042 5.201l-.123.121a3.765 3.765 0 0 1-5.322-.165l-10.725-11.41-22.834 23.762a3.765 3.765 0 0 1-5.197.222l-.127-.116a3.765 3.765 0 0 1-.105-5.324l23.1-24.036-16.284-17.324a3.765 3.765 0 0 1 .042-5.2l.123-.121a3.765 3.765 0 0 1 5.321.164l16.021 17.044 22.331-23.235Z"/><path fill="#FFC73B" d="M136.602 126.74a3.765 3.765 0 0 1 0 5.323l-17.53 17.531 10.684 10.686a3.765 3.765 0 0 1 .12 5.2l-.12.125a3.765 3.765 0 0 1-5.324 0l-10.686-10.686-10.686 10.686a3.765 3.765 0 1 1-5.324-5.325l10.685-10.686-17.53-17.53a3.765 3.765 0 0 1-.12-5.2l.12-.125a3.765 3.765 0 0 1 5.324 0l17.531 17.53 17.531-17.53a3.765 3.765 0 0 1 5.325 0Z"/></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

12
assets/pnpm.svg Normal file
View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 156 156">
<g fill="none" fill-rule="evenodd">
<polygon fill="#F9AD00" fill-rule="nonzero" points="155.808 48.684 107.027 48.684 107.027 -.097 155.808 -.097"/>
<polygon fill="#F9AD00" fill-rule="nonzero" points="102.139 48.684 53.358 48.684 53.358 -.097 102.139 -.097"/>
<polygon fill="#F9AD00" fill-rule="nonzero" points="48 48.684 0 48.684 0 -.097 48 -.097"/>
<polygon fill="#F9AD00" fill-rule="nonzero" points="155.808 102.344 107.027 102.344 107.027 53.562 155.808 53.562"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="102.139 102.344 53.358 102.344 53.358 53.562 102.139 53.562"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="102.139 156.003 53.358 156.003 53.358 107.222 102.139 107.222"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="155.808 156.003 107.027 156.003 107.027 107.222 155.808 107.222"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="48 156.003 0 156.003 0 107.222 48 107.222"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1015 B

5
assets/powershell.svg Normal file
View File

@ -0,0 +1,5 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" height="1em" width="1em">
<path d="m64 10.5-7.11 42a4.64 4.64 0 0 1-4.62 3.5H4.44C2.24 56 .72 54.43 1 52.5l7.11-42a3.93 3.93 0 0 1 1.3-2.19A5 5 0 0 1 12.73 7h47.83a3.25 3.25 0 0 1 3.35 2.32A2.73 2.73 0 0 1 64 10.5z" fill="#0078d7"/>
<path fill="#fff" d="M17.72 49.6a2.43 2.43 0 0 1-1.45-4.38l20.54-15.11L22 16.18a2.42 2.42 0 0 1-.1-3.43 2.45 2.45 0 0 1 3.45-.1l17 15.92a2.42 2.42 0 0 1-.22 3.72L19.17 49.13a2.44 2.44 0 0 1-1.45.47zm26.87.4H33.41a2.5 2.5 0 0 1 0-5h11.18a2.5 2.5 0 0 1 0 5z"/>
<path fill="#fff" d="m63.91 9.32-7.06 42.27a4 4 0 0 1-.95 2C44.76 42.64 21.52 19.89 9.41 8.31A5 5 0 0 1 12.73 7h47.83a3.25 3.25 0 0 1 3.35 2.32z" opacity=".25"/>
</svg>

After

Width:  |  Height:  |  Size: 760 B

27
assets/rxjs.svg Normal file
View File

@ -0,0 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 255 255">
<defs>
<linearGradient id="a" x1="11.935%" x2="62.881%" y1="90.18%" y2="37.177%">
<stop offset="0%" stop-color="#E01D84"/>
<stop offset="40.1%" stop-color="#DF1D85"/>
<stop offset="77%" stop-color="#932C87"/>
<stop offset="100%" stop-color="#5D2F88"/></linearGradient>
<linearGradient id="c" x1="-.146%" x2="99.946%" y1="49.99%" y2="49.99%">
<stop offset="0%" stop-color="#E01D84"/>
<stop offset="23.8%" stop-color="#DA1E85"/>
<stop offset="65.8%" stop-color="#C72085"/>
<stop offset="99.9%" stop-color="#B52284"/></linearGradient>
<radialGradient id="b" cx="77.558%" cy="33.251%" r="77.293%" fx="77.558%" fy="33.251%" gradientTransform="matrix(.7343 .0024 -.00176 1 .207 -.002)">
<stop offset="0%" stop-color="#E01D84"/>
<stop offset="13.9%" stop-color="#DE1E85"/>
<stop offset="28.5%" stop-color="#D62085"/>
<stop offset="43.4%" stop-color="#C92386"/>
<stop offset="58.6%" stop-color="#B72786"/>
<stop offset="73.9%" stop-color="#9D2B87"/>
<stop offset="89.1%" stop-color="#7C2E88"/>
<stop offset="100%" stop-color="#5D2F88"/></radialGradient></defs>
<g fill="none" transform="translate(1 2)">
<path fill="#E32286" d="M14.6140689,158.580855 C9.41406892,142.380855 7.91406892,125.280855 10.9140689,107.680855 C12.2140689,100.380855 14.2140689,93.3808546 16.4140689,86.2808546 C16.4140689,86.2808546 30.2140689,40.9808546 76.9140689,20.2808546 C76.9140689,20.2808546 93.0140689,11.7808546 117.214069,11.1808546 C117.214069,11.1808546 113.914069,7.98085459 111.814069,6.58085459 C100.414069,-1.01914541 83.4140689,-3.51914541 73.1140689,7.18085459 C70.0140689,10.3808546 67.4140689,13.8808546 64.5140689,17.0808546 C61.2140689,20.6808546 57.2140689,23.6808546 52.6140689,25.3808546 C48.6140689,26.8808546 44.6140689,26.5808546 40.5140689,27.2808546 C36.3140689,27.9808546 32.0140689,29.4808546 28.6140689,32.1808546 C24.9140689,35.1808546 23.4140689,39.1808546 23.0140689,43.7808546 C22.6140689,47.3808546 22.7140689,51.0808546 22.5140689,54.6808546 C22.0140689,65.2808546 18.6140689,68.2808546 11.0140689,74.1808546 C7.81406892,76.5808546 5.11406892,79.7808546 3.11406892,83.1808546 C-2.88593108,93.7808546 6.71406892,104.780855 7.21406892,115.480855 C7.31406892,117.680855 7.11406892,119.880855 6.31406892,121.980855 C5.51406892,124.280855 3.91406892,125.780855 2.61406892,127.680855 C0.814068923,130.180855 -0.385931077,133.180855 0.114068923,136.280855 C0.614068923,139.380855 2.21406892,142.280855 3.71406892,144.980855 C6.61406892,149.780855 10.2140689,154.080855 14.0140689,158.180855 C14.2140689,158.180855 14.4140689,158.380855 14.6140689,158.580855"/>
<path fill="url(#a)" d="M205.414069,196.980855 C228.414069,186.980855 238.214069,169.680855 238.214069,169.680855 C259.714069,140.380855 252.414069,109.480855 252.414069,109.480855 C238.714069,139.280855 226.214069,147.480855 226.214069,147.480855 C259.914069,96.1808546 226.414069,65.1808546 226.414069,65.1808546 C240.114069,94.3808546 221.914069,129.980855 221.914069,129.980855 C206.614069,162.180855 184.914069,173.680855 184.914069,173.680855 C209.114069,178.180855 226.914069,161.880855 226.914069,161.880855 C192.214069,199.380855 154.614069,197.580855 154.614069,197.580855 C170.414069,215.280855 194.114069,213.780855 194.114069,213.780855 C163.114069,221.080855 134.014069,210.780855 110.114069,190.880855 C105.614069,187.180855 101.314069,183.180855 97.3140689,178.880855 C97.3140689,178.880855 93.7140689,175.080855 93.0140689,174.080855 L92.9140689,173.980855 C92.4140689,192.480855 111.714069,209.680855 111.714069,209.680855 C87.5140689,199.680855 76.4140689,177.980855 76.4140689,177.980855 C76.4140689,177.980855 60.1140689,150.180855 71.9140689,118.480855 C83.7140689,86.7808546 119.414069,79.9808546 119.414069,79.9808546 C148.914069,94.2808546 173.914069,98.7808546 173.914069,98.7808546 C226.614069,107.580855 223.614069,81.7808546 223.614069,81.7808546 C224.114069,59.5808546 190.614069,35.9808546 190.614069,35.9808546 C130.914069,-8.31914541 76.9140689,20.2808546 76.9140689,20.2808546 C30.2140689,40.9808546 16.4140689,86.2808546 16.4140689,86.2808546 C14.2140689,93.3808546 12.2140689,100.380855 10.9140689,107.680855 C5.81406892,137.380855 13.5140689,165.480855 30.2140689,190.480855 C56.2140689,229.280855 98.4140689,242.680855 98.4140689,242.680855 C160.914069,263.880855 203.614069,232.680855 203.614069,232.680855 C242.914069,205.680855 250.814069,174.480855 250.814069,174.480855 C219.114069,199.280855 205.414069,196.980855 205.414069,196.980855 Z M156.614069,51.0808546 C159.614069,51.0808546 162.014069,53.4808546 162.014069,56.4808546 C162.014069,59.4808546 159.614069,61.8808546 156.614069,61.8808546 C153.614069,61.8808546 151.214069,59.4808546 151.214069,56.4808546 C151.214069,53.4808546 153.614069,51.0808546 156.614069,51.0808546 Z"/>
<path fill="url(#b)" d="M223.514069,81.6808546 C224.014069,59.4808546 190.514069,35.8808546 190.514069,35.8808546 C130.814069,-8.31914541 76.8140689,20.2808546 76.8140689,20.2808546 C30.1140689,40.9808546 16.3140689,86.2808546 16.3140689,86.2808546 C13.6140689,93.9808546 11.2140689,105.780855 11.2140689,105.780855 C8.31406892,120.580855 9.61406892,134.280855 9.61406892,134.280855 C10.8140689,147.380855 13.7140689,156.180855 13.7140689,156.180855 C16.7140689,165.580855 18.1140689,168.480855 18.1140689,168.480855 C18.0140689,168.180855 17.5140689,165.980855 17.5140689,165.980855 C17.5140689,165.980855 13.3140689,145.780855 17.2140689,126.380855 C17.2140689,126.380855 20.6140689,106.180855 34.4140689,90.5808546 C34.4140689,90.5808546 56.8140689,58.6808546 98.5140689,71.1808546 C98.5140689,71.1808546 107.514069,74.3808546 110.614069,75.9808546 C113.714069,77.4808546 119.114069,79.7808546 119.114069,79.7808546 C148.614069,94.0808546 173.614069,98.5808546 173.614069,98.5808546 C226.514069,107.480855 223.514069,81.6808546 223.514069,81.6808546 L223.514069,81.6808546 Z M156.614069,61.9808546 C153.614069,61.9808546 151.214069,59.5808546 151.214069,56.5808546 C151.214069,53.5808546 153.614069,51.1808546 156.614069,51.1808546 C159.614069,51.1808546 162.014069,53.5808546 162.014069,56.5808546 C162.014069,59.5808546 159.614069,61.9808546 156.614069,61.9808546 Z"/>
<path fill="url(#c)" d="M122.414069,41.4808546 L88.3140689,30.8808546 C88.1140689,30.8808546 87.1140689,30.3808546 85.3140689,30.8808546 C85.3140689,30.8808546 65.2140689,35.9808546 68.7140689,46.9808546 C68.7140689,46.9808546 70.8140689,53.8808546 76.5140689,60.5808546 L114.014069,58.7808546 L122.414069,41.4808546 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

3
assets/springboot.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" height="1em" width="1em">
<path d="M20.205 16.392c-2.469 3.289-7.741 2.179-11.122 2.338 0 0-.599.034-1.201.133 0 0 .228-.097.519-.198 2.374-.821 3.496-.986 4.939-1.727 2.71-1.388 5.408-4.413 5.957-7.555-1.032 3.022-4.17 5.623-7.027 6.679-1.955.722-5.492 1.424-5.493 1.424a5.28 5.28 0 0 1-.143-.076c-2.405-1.17-2.475-6.38 1.894-8.059 1.916-.736 3.747-.332 5.818-.825 2.208-.525 4.766-2.18 5.805-4.344 1.165 3.458 2.565 8.866.054 12.21zm.042-13.28a9.212 9.212 0 0 1-1.065 1.89 9.982 9.982 0 0 0-7.167-3.031C6.492 1.971 2 6.463 2 11.985a9.983 9.983 0 0 0 3.205 7.334l.22.194a.856.856 0 1 1 .001.001l.149.132A9.96 9.96 0 0 0 12.015 22c5.278 0 9.613-4.108 9.984-9.292.274-2.539-.476-5.763-1.752-9.596" />
</svg>

After

Width:  |  Height:  |  Size: 790 B

25
assets/sqlite.svg Normal file
View File

@ -0,0 +1,25 @@
<svg viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em">
<g clip-path="url(#a)">
<path
d="M60 0C26.863 0 0 26.863 0 60v136c0 33.137 26.863 60 60 60h108.46c-1.779-5.243-3.172-13.546-3.956-23.023-.675-8.152-.899-17.171-.525-25.87-.101-1.286-.162-2.122-.162-2.122s-1.874-12.61-4.571-22.969c-1.194-4.598-2.553-8.756-3.98-11.166-.735-1.243.08-6.351 2.131-13.916 1.2 2.071 6.263 10.932 7.28 13.788 1.145 3.228 1.385 4.153 1.385 4.153s-2.777-14.272-7.333-22.6a303.417 303.417 0 0 1 3.542-11.066c1.578 2.767 5.165 9.121 6.461 12.132.12.279.228.541.307.757.184.522.339.965.478 1.371.731 2.118.909 2.792.909 2.792s-.271-1.386-.775-3.524c-.213-.903-.478-1.965-.773-3.096-1.148-4.409-2.892-10.181-5.125-14.704 5.732-29.794 24.181-68.807 44.057-89.868 1.713-1.814 3.434-3.511 5.158-5.041 11.619-10.3 23.392-13.78 33.115-5.118 7.034 6.267 9.912 14.925 9.917 24.89V60c0-33.137-26.863-60-60-60H60Z"
fill="#D9D9D9" />
<path
d="M60 0C26.863 0 0 26.863 0 60v136c0 33.137 26.863 60 60 60h108.46c-1.779-5.243-3.172-13.546-3.956-23.023-.675-8.152-.899-17.171-.525-25.87-.101-1.286-.162-2.122-.162-2.122s-1.874-12.61-4.571-22.969c-1.194-4.598-2.553-8.756-3.98-11.166-.735-1.243.08-6.351 2.131-13.916 1.2 2.071 6.263 10.932 7.28 13.788 1.145 3.228 1.385 4.153 1.385 4.153s-2.777-14.272-7.333-22.6a303.417 303.417 0 0 1 3.542-11.066c1.578 2.767 5.165 9.121 6.461 12.132.12.279.228.541.307.757.184.522.339.965.478 1.371.731 2.118.909 2.792.909 2.792s-.271-1.386-.775-3.524c-.213-.903-.478-1.965-.773-3.096-1.148-4.409-2.892-10.181-5.125-14.704 5.732-29.794 24.181-68.807 44.057-89.868 1.713-1.814 3.434-3.511 5.158-5.041 11.619-10.3 23.392-13.78 33.115-5.118 7.034 6.267 9.912 14.925 9.917 24.89V60c0-33.137-26.863-60-60-60H60Z"
fill="url(#b)" />
<path
d="M246.083 36.91c-9.723-8.662-21.496-5.183-33.115 5.118-1.724 1.53-3.445 3.227-5.158 5.04-19.876 21.063-38.325 60.075-44.057 89.869 2.233 4.523 3.977 10.295 5.125 14.704.295 1.131.56 2.193.773 3.096.504 2.138.775 3.524.775 3.524s-.178-.674-.909-2.792c-.139-.406-.294-.849-.478-1.371a15.467 15.467 0 0 0-.307-.757c-1.296-3.011-4.883-9.365-6.461-12.132a303.417 303.417 0 0 0-3.542 11.066c4.556 8.328 7.333 22.6 7.333 22.6s-.24-.925-1.385-4.153c-1.017-2.856-6.08-11.717-7.28-13.788-2.051 7.565-2.866 12.673-2.131 13.916 1.427 2.41 2.786 6.568 3.98 11.166 2.697 10.359 4.571 22.969 4.571 22.969s.061.836.162 2.122c-.374 8.699-.15 17.718.525 25.87.893 10.791 2.575 20.062 4.719 25.023l1.455-.793c-3.148-9.774-4.427-22.584-3.867-37.358.847-22.581 6.05-49.813 15.662-78.196 16.24-42.847 38.772-77.224 59.394-93.642-18.796 16.956-44.235 71.839-51.85 92.163-8.526 22.759-14.569 44.117-18.21 64.579 6.283-19.183 26.598-27.429 26.598-27.429s9.964-12.274 21.608-29.81c-6.975 1.589-18.428 4.309-22.265 5.919-5.658 2.371-7.183 3.18-7.183 3.18s18.33-11.15 34.056-16.198c21.628-34.025 45.19-82.362 21.462-103.505M28.52 49c-3.063 0-5.554.895-7.463 2.683-1.91 1.79-2.878 4.137-2.878 7.012 0 1.49.24 2.848.714 4.093.474 1.247 1.212 2.403 2.203 3.447.992 1.045 2.977 2.465 5.936 4.27 3.63 2.186 6.005 3.96 7.145 5.346 1.141 1.385 1.707 2.836 1.707 4.348 0 2.026-.675 3.642-2.064 4.858-1.391 1.215-3.251 1.82-5.558 1.82-2.433 0-4.552-.845-6.372-2.526-1.82-1.682-2.738-3.908-2.759-6.698H18V87.78h1.131c.346-.959.824-1.45 1.45-1.45.3 0 1.005.205 2.104.588 2.671.938 4.865 1.39 6.59 1.39 2.971 0 5.508-1.026 7.622-3.114 2.11-2.086 3.176-4.602 3.176-7.54 0-2.278-.704-4.305-2.084-6.071-1.381-1.769-4.066-3.826-8.08-6.19-3.452-2.046-5.694-3.713-6.728-5.013-1.036-1.298-1.568-2.733-1.568-4.309 0-1.704.634-3.072 1.885-4.093 1.252-1.022 2.891-1.528 4.943-1.528 2.309 0 4.233.676 5.756 2.037 1.521 1.363 2.401 3.252 2.66 5.68h1.132v-8.774h-1.053c-.128.447-.247.733-.357.861-.106.128-.311.196-.615.196-.366 0-1.019-.152-1.945-.45-1.985-.66-3.816-.999-5.499-.999Zm36.98 0c-3.733 0-7.121.868-10.183 2.605-3.066 1.734-5.493 4.14-7.285 7.207-1.79 3.066-2.68 6.323-2.68 9.793 0 4.662 1.547 8.816 4.665 12.456 3.12 3.638 6.858 5.905 11.195 6.777.992.51 2.41 1.826 4.268 3.956 2.093 2.404 3.864 4.138 5.32 5.17a16.074 16.074 0 0 0 4.684 2.292c1.661.499 3.457.744 5.4.744 2.351 0 4.457-.403 6.311-1.234l-.416-1.018a10.184 10.184 0 0 1-3.434.568c-1.642 0-3.3-.534-4.963-1.606-1.66-1.075-3.736-3.125-6.213-6.15-1.164-1.45-1.967-2.364-2.421-2.722 4.745-.915 8.648-3.184 11.691-6.816 3.043-3.63 4.565-7.774 4.565-12.417 0-5.514-1.988-10.147-5.935-13.925C76.12 50.9 71.262 49 65.5 49Zm23.085 0 .06 1.195c2.484 0 3.876.722 4.188 2.174.115.52.169 1.478.178 2.86l-.02 26.42c-.02 1.973-.305 3.233-.853 3.78-.549.543-1.476.882-2.819 1.018l-.06 1.195h24.773l.635-5.993h-1.131c-.323 1.632-1.064 2.802-2.243 3.466-1.183.67-3.273 1-6.293 1h-2.342c-2.717 0-4.289-.97-4.704-2.92a6.011 6.011 0 0 1-.12-1.253l.1-26.714c0-1.97.252-3.29.774-3.937.528-.643 1.48-1.004 2.858-1.096L101.507 49H88.585Zm-22.688 1.45c4.21 0 7.647 1.635 10.302 4.935 2.654 3.3 3.97 7.824 3.97 13.553 0 5.428-1.335 9.774-4.01 13.044-2.675 3.268-6.235 4.896-10.66 4.896-4.25 0-7.696-1.679-10.34-5.053-2.643-3.374-3.95-7.755-3.95-13.142 0-5.535 1.323-9.967 3.989-13.279 2.665-3.308 6.233-4.955 10.699-4.955Zm56.968 5.679c-.604 0-1.065.201-1.409.607-.353.404-.461.894-.338 1.489.119.576.449 1.082.973 1.508.521.425 1.083.646 1.687.646.584 0 1.03-.221 1.35-.646.32-.426.417-.931.298-1.508-.124-.595-.442-1.085-.933-1.489-.497-.406-1.044-.607-1.628-.607Zm16.336 4.054c-1.027 3.897-3.252 6.006-6.669 6.346l.039 1.116h3.99l-.079 13.2c.006 2.258.076 3.76.238 4.525.393 1.83 1.605 2.761 3.632 2.761 2.934 0 6.012-1.763 9.23-5.288l-.972-.822c-2.324 2.32-4.379 3.486-6.173 3.486-1.103 0-1.787-.626-2.045-1.86a4.658 4.658 0 0 1-.099-1.058l.04-14.944h6.093l-.059-1.782h-6.015v-5.68h-1.151Zm23.561 4.975c-3.408 0-6.181 1.632-8.336 4.877-2.145 3.25-2.809 6.85-1.965 10.81.496 2.32 1.484 4.12 2.997 5.387 1.51 1.267 3.426 1.9 5.716 1.9 2.133 0 5.103-.534 6.352-1.607 1.253-1.072 2.408-2.81 3.474-5.19l-.854-.881c-1.7 3.087-5.133 4.642-7.721 4.642-3.559 0-5.738-1.927-6.55-5.758a13.745 13.745 0 0 1-.239-1.567c4.234-.662 7.442-1.833 9.608-3.526 2.163-1.693 4.336-3.489 3.93-5.386-.242-1.127-.835-2.013-1.747-2.683-.924-.67-3.324-1.018-4.665-1.018Zm-37.257.137-7.344 1.665v1.292l2.54-.313c1.231 0 1.955.55 2.184 1.645.077.367.125.881.139 1.528l-.08 11.849c-.02 1.64-.205 2.593-.575 2.879-.374.287-1.36.43-2.958.43l-.04 1.117h11.652l-.02-1.116c-1.619 0-2.668-.126-3.136-.372-.46-.245-.776-.69-.913-1.371-.106-.492-.152-1.338-.159-2.507l.04-16.726h-1.33Zm35.392 2.194c.709 0 1.394.27 2.084.802.68.531 1.095 1.122 1.23 1.763.665 3.15-2.166 5.328-8.535 6.542-.182-2.297.222-4.383 1.251-6.268 1.021-1.883 2.351-2.84 3.97-2.84Z"
fill="#003B57" />
</g>
<defs>
<linearGradient id="b" x1="147.614" y1="5.239" x2="147.614" y2="241.763"
gradientUnits="userSpaceOnUse">
<stop stop-color="#97D9F6" />
<stop offset=".92" stop-color="#0F80CC" />
<stop offset="1" stop-color="#0F80CC" />
</linearGradient>
<clipPath id="a">
<rect width="256" height="256" rx="60" fill="#fff" />
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 6.9 KiB

1
assets/stylex.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 151 180"><g fill="none"><path fill="#5BD3F3" d="M123.054863 93.4254443C124.041858 95.7626109 128.450105 105.044084 129.355779 107.321152 123.84289 116.561307 122.549601 118.95899 111.024753 133.60593 64.1232983 182.705627 27.9371992 190.639891 5.76263041 167.701852 3.59627766 165.361764 1.67512566 162.319274 0 158.574382.471825684 159.433291 1.09514745 160.379843 1.86996531 161.414039L2.15025371 161.78256C2.19772524 161.844746 2.24602235 161.906931 2.29473227 161.969534L2.59359648 162.349323 2.90484457 162.735791 3.22888933 163.12977 3.56531797 163.530845 3.91454328 163.939431 4.27615246 164.355113 4.65014553 164.77789 5.03734806 165.208179 5.23549007 165.426036 5.64126842 165.867176 5.84890474 166.090459 6.2732589 166.542451 6.49038953 166.771159C33.8818726 191.84228 61.2048315 170.332834 98.3027967 128.773838 103.902786 122.190123 112.153337 110.407464 123.054863 93.4254443ZM137.380118 14.1032604C154.739423 29.1884191 154.739423 52.5968124 141.717364 86.0295639 140.719637 83.5713654 136.323774 73.7444144 135.221609 71.226952 145.472981 42.8320467 145.710752 29.3332399 130.967334 15.8715774 122.485617 8.12762615 116.462513 7.80876984 104.995043 9.69477985L104.244168 9.82123726C104.118678 9.84252217 103.992775 9.86464178 103.866872 9.8867614L103.107328 10.0236526 102.342004 10.1663867 101.956866 10.2402579 92.9145722 12.0507273 92.9145722 12.0340333 93.1139526 11.9605794C111.260459 5.27670019 126.843916 4.74249067 137.380118 14.1032604L137.380118 14.1032604Z"/><path fill="#D573DE" d="M125.890167,63.5141248 C153.449324,115.583313 155.188797,143.75817 146.009025,163.468062 C142.702042,170.570383 134.455253,175.478804 130.907687,177.387749 C122.003636,182.178957 103.568032,179.793293 87.0876824,174.955283 L84.6173661,173.901615 C92.8984649,176.570162 110.89548,180.056296 120.598168,177.387749 C152.463016,168.623747 148.671973,130.669324 116.64467,71.0621007 C84.6173661,11.4548774 49.5757474,-4.8960329 21.9537585,6.3426811 C19.3015581,7.42161421 16.9891503,8.8960871 15,10.7226111 L15.212887,10.4952275 L15.6399012,10.0462588 L15.853615,9.82508786 L16.282696,9.38854448 C19.3635641,6.29215141 22.5576963,3.87542408 25.8493845,2.76294257 C50.8282672,-5.6788289 93.7099159,2.71324123 125.890167,63.5141248 Z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

4
assets/time-zones.svg Normal file
View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 1024 1024" fill="currentColor" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em">
<path d="M945 412H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h256c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM811 548H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h122c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM477.3 322.5H434c-6.2 0-11.2 5-11.2 11.2v248c0 3.6 1.7 6.9 4.6 9l148.9 108.6c5 3.6 12 2.6 15.6-2.4l25.7-35.1v-.1c3.6-5 2.5-12-2.5-15.6l-126.7-91.6V333.7c.1-6.2-5-11.2-11.1-11.2z"/>
<path d="M804.8 673.9H747c-5.6 0-10.9 2.9-13.9 7.7-12.7 20.1-27.5 38.7-44.5 55.7-29.3 29.3-63.4 52.3-101.3 68.3-39.3 16.6-81 25-124 25-43.1 0-84.8-8.4-124-25-37.9-16-72-39-101.3-68.3s-52.3-63.4-68.3-101.3c-16.6-39.2-25-80.9-25-124 0-43.1 8.4-84.7 25-124 16-37.9 39-72 68.3-101.3 29.3-29.3 63.4-52.3 101.3-68.3 39.2-16.6 81-25 124-25 43.1 0 84.8 8.4 124 25 37.9 16 72 39 101.3 68.3 17 17 31.8 35.6 44.5 55.7 3 4.8 8.3 7.7 13.9 7.7h57.8c6.9 0 11.3-7.2 8.2-13.3-65.2-129.7-197.4-214-345-215.7-216.1-2.7-395.6 174.2-396 390.1C71.6 727.5 246.9 903 463.2 903c149.5 0 283.9-84.6 349.8-215.8 3.1-6.1-1.4-13.3-8.2-13.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -105,17 +105,17 @@ $ adb pull /sdcard/test.txt pulledTest.txt
`adb shell wm size WxH` | 将分辨率设置为 WxH
`adb shell pm list packages` | 列出所有已安装的应用包
`adb shell pm list packages -3` | 列出所有已安装的第三方的应用包
`adb shell monkey -p app.package.name` | 启动指定包名的应用程序
`adb shell monkey -p app.package.name <count>` | 启动指定包名的应用程序, 并执行测试
<!--rehype:className=style-list-arrow-->
### 包安装
:-- | --
:-- | --
`adb shell install <apk>` | 安装应用程序
`adb shell install <path>` | 从手机路径安装应用
`adb shell install -r <path>` | 从手机路径安装应用(允许覆盖安装)
`adb shell uninstall <name>` | 卸载应用程序
`adb install <apk>` | 安装应用程序
`adb install <path>` | 从手机路径安装应用
`adb install -r <path>` | 从手机路径安装应用(允许覆盖安装)
`adb uninstall <name>` | 卸载应用程序
<!--rehype:className=left-align code-nowrap-->
### Paths
@ -165,14 +165,17 @@ $ adb pull /sdcard/test.txt pulledTest.txt
:-- | --
:-- | --
`adb shell list packages` | 列出包名称
`adb shell list packages -r` | 列出包名 + apks 的路径
`adb shell list packages -3` | 列出第三方包名称
`adb shell list packages -s` | 仅列出系统包
`adb shell list packages -u` | 列出包名称 + 已卸载
`adb shell pm list packages` | 列出包名称
`adb shell pm list packages -f` | 列出包名 + apks 的路径
`adb shell pm list packages -3` | 列出第三方包名称
`adb shell pm list packages -s` | 仅列出系统包
`adb shell pm list packages -u` | 列出出包和未安装包
`adb shell pm list packages -i` | 列出包名称 + 安装来源
`adb shell pm list packages -e` | 列出启用的包
`adb shell pm list packages -d` | 列出禁用的包
`adb shell dumpsys package packages` | 列出所有应用程序的信息
`adb shell dump <name>` | 列出一个包的信息
`adb shell path <package>` | 列出 APK 文件的路径
`adb shell dumpsys package <name>` | 列出一个包的信息
`adb shell pm path <package>` | 列出 APK 文件的路径
<!--rehype:className=style-list-arrow-->
### 设备相关命令
@ -232,13 +235,13 @@ $ adb pull /sdcard/Download/example.apk
### 从主机安装 APK 到 Android 设备
```bash
$ adb shell install example.apk
$ adb install example.apk
```
### 从 Android 设备存储安装 APK
```bash
$ adb shell install /sdcard/Download/example.apk
$ adb install /sdcard/Download/example.apk
```
### 设置网络代理
@ -330,7 +333,7 @@ $ adb shell pm path com.example.myapp
### 通过名称查找应用的包名
```bash
$ adb shell pm list package | grep app_name
$ adb shell pm list packages | grep app_name
```
### 从设备提取 APK 到您的计算机

262
docs/bun.md Normal file
View File

@ -0,0 +1,262 @@
Bun 备忘清单
===
这是一份 [`Bun`](https://bun.sh/) 软件包管理器备忘单,其中列出了 `Bun` 常用命令使用清单
入门
---
### 安装 Bun
```bash
curl -fsSL https://bun.sh/install | bash
```
### Bun 与 npm/Yarn 命令比较
<!--rehype:wrap-class=col-span-2 row-span-3-->
npm | Yarn | Bun | 说明
:- | :- | :- | :-
`npm install` | `yarn add` | `bun add` | 安装依赖
`npm init` | `yarn init` | `bun init` | 创建 `package.json` 文件
`npm install -g` | `yarn global add` | `bun global add` | 全局安装包
`npm run` | `yarn run` | `bun run` | 运行脚本
`npm uninstall` | `yarn remove` | `bun remove` | 移除包
`npm update` | `yarn upgrade` | `bun upgrade` | 更新包
`npm cache clean` | `yarn cache clean` | `bun cache clean` | 清理缓存目录
<!--rehype:className=left-align-->
参考备忘清单: [npm](./npm.md)、[yarn](./yaml.md)、[pnpm](./pnpm.md)
### 创建项目
```bash
bun create <template> <project-name>
```
示例:
```bash
bun create react my-react-app
```
### 查看已安装包
```bash
bun ls
```
### 安装依赖
<!--rehype:wrap-class=row-span-2-->
```bash
bun add <package>
```
选项:
```bash
--dev, -D # 安装到 devDependencies
--global, -g # 全局安装包
--exact, -E # 将包安装为精确版本
--tilde, -T # 安装有相同次要版本的包的最新版本
```
### 运行脚本
<!--rehype:wrap-class=row-span-3-->
`package.json` 中定义脚本:
```json
"scripts": {
"start": "node index.js",
"test": "jest"
}
```
运行脚本:
```bash
bun run <script>
```
例如:
```bash
bun run start
```
### 移除依赖
```bash
bun remove <package>
```
### 更新依赖
```bash
bun upgrade
```
选项:
```bash
--latest # 更新到最新版本
```
### 清理缓存
```bash
bun cache clean
```
### 安装全局包
```bash
bun global add <package>
```
### 移除全局包
```bash
bun global remove <package>
```
### Bun 提供的其他命令
```bash
bun bunfile # 管理 Bunfile
bun dev # 运行开发服务器
bun test # 运行测试
bun completions # 生成 shell 补全脚本
```
包管理器
---
### bin 目录的路径
要打印本地项目的 `bin` 目录的路径
```bash
bun pm bin
# /path/to/current/pro/node_modules/.bin
```
全局 bin 目录
```bash
bun pm bin -g
# <$HOME>/.bun/bin
```
### 打印依赖项
```bash
bun pm ls --all
# /path/to/project node_modules (135)
# ├── @eslint-community/eslint-utils@4.4.0
# ├── @eslint-community/regexpp@4.5.0
# ├── @eslint/eslintrc@2.0.2
# ├── @eslint/js@8.38.0
# ├── ...
```
打印所有已安装的依赖项,包括 `n` 阶依赖项。
### 打印已安装及已解决依赖项
```bash
bun pm ls
# /path/to/project node_modules (135)
# ├── eslint@8.38.0
# ├── react@18.2.0
# ├── react-dom@18.2.0
# ├── typescript@5.0.4
# └── zod@3.21.4
```
打印当前项目中已安装依赖项及其已解决版本的列表,不包括其依赖项
### 全局模块缓存的路径
```bash
bun pm cache
```
要打印 Bun 的全局模块缓存的路径
### 清除全局模块缓存
```bash
bun pm cache rm
```
### 列出全局安装
列出所有全局安装的软件包:
```bash
bun pm ls -g
```
列出所有全局安装的软件包,包括 n 阶依赖项:
```bash
bun pm ls -g --all
```
示例
---
### 安装包
<!--rehype:wrap-class=row-span-2-->
```bash
# 将包添加到 dependencies
$ bun add <package>
# 将包添加到 devDependencies
$ bun add -D <package>
# 将包安装为精确版本
$ bun add -E <package>
# 全局安装包
$ bun global add <package>
```
### 移除包
```bash
$ bun remove <package>
```
从所有类型的依赖项中删除包
### 查看包
```bash
# 列出已安装的软件包
$ bun ls
```
### 清除缓存
```bash
$ bun cache clean
```
清理缓存目录
### 运行脚本
```bash
$ bun run <script>
```
`package.json` 中定义的脚本将被执行
另见
---
- [Bun 官方文档](https://bun.sh/docs)
- [Bun GitHub 仓库](https://github.com/oven-sh/bun)
- [Bun 快速上手](https://bun.sh/docs/quickstart)

815
docs/c.md

File diff suppressed because it is too large Load Diff

253
docs/canvas.md Normal file
View File

@ -0,0 +1,253 @@
HTML Canvas 备忘清单
===
这份 HTML Canvas 快速参考备忘单列出了常见的 HTML5 Canvas 设计标签,以易读的格式呈现。
入门
---
<!--rehype:body-class=cols-4-->
### 基本设置
<!--rehype:wrap-class=col-span-2-->
```html
<!DOCTYPE html>
<html>
<head>
<title>Canvas 示例</title>
</head>
<body>
<canvas id="myCanvas" width="500" height="400"
style="border:1px solid #000000;">
</canvas>
<script src="script.js"></script>
</body>
</html>
```
### 获取上下文
<!--rehype:wrap-class=col-span-2-->
```js
const canvas = document.getElementById("myCanvas");
const ctx = canvas.getContext("2d");
```
绘制形状
---
### 矩形
<!--rehype:wrap-class=col-span-2-->
```js
ctx.fillStyle = "red";
ctx.fillRect(10, 10, 150, 100); // x, y, 宽度, 高度
ctx.strokeStyle = "blue";
ctx.lineWidth = 5;
ctx.strokeRect(200, 10, 150, 100); // x, y, 宽度, 高度
ctx.clearRect(15, 15, 30, 30); // x, y, 宽度, 高度
```
路径
---
### 线条
```js
ctx.beginPath();
ctx.moveTo(50, 50); // 起始点
ctx.lineTo(200, 50); // 结束点
ctx.lineTo(200, 200); // 下一个线条结束点
ctx.closePath(); // 将结束点连接到起始点
ctx.stroke();
```
### 圆形
```js
ctx.beginPath();
// x, y, 半径, 起始角度, 结束角度
ctx.arc(150, 150, 75, 0, 2 * Math.PI);
ctx.fillStyle = "green";
ctx.fill();
ctx.stroke();
```
### 弧
```js
ctx.beginPath();
// x, y, 半径, 起始角度, 结束角度
ctx.arc(150, 150, 75, 0, Math.PI);
ctx.stroke();
```
贝塞尔曲线和二次曲线
---
### 二次曲线
```js
ctx.beginPath();
ctx.moveTo(50, 250);
// cpX, cpY, 终点X, 终点Y
ctx.quadraticCurveTo(200, 100, 400, 250);
ctx.stroke();
```
### 贝塞尔曲线
```js
ctx.beginPath();
ctx.moveTo(50, 300);
// cp1X, cp1Y, cp2X, cp2Y, 终点X, 终点Y
ctx.bezierCurveTo(150, 100, 350, 500, 450, 300);
ctx.stroke();
```
### 文本
```js
ctx.font = "30px Arial";
ctx.fillStyle = "black";
// 文本, x, y
ctx.fillText("Hello Canvas", 10, 50);
// 文本, x, y
ctx.strokeText("Hello Canvas", 10, 100);
```
### 图像
<!--rehype:wrap-class=col-span-3-->
```js
const img = new Image();
img.src = "path/to/image.jpg";
img.onload = () => {
ctx.drawImage(img, 10, 10); // img, x, y
ctx.drawImage(img, 50, 50, 100, 100); // img, x, y, 宽度, 高度
ctx.drawImage(img, 100, 100, 100, 100, 150, 150, 200, 200); // img, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight
};
```
变换
---
### 平移
```js
ctx.translate(100, 100); // x, y
ctx.fillRect(0, 0, 50, 50);
```
### 旋转
```js
// 角度(以弧度为单位)
ctx.rotate((Math.PI / 180) * 45);
ctx.fillRect(100, 100, 50, 50);
```
### 缩放
```js
ctx.scale(2, 2); // x, y
ctx.fillRect(50, 50, 50, 50);
```
渐变
---
### 线性渐变
<!--rehype:wrap-class=col-span-2-->
```js
const linearGradient = ctx.createLinearGradient(0, 0, 200, 0); // x0, y0, x1, y1
linearGradient.addColorStop(0, "red");
linearGradient.addColorStop(1, "blue");
ctx.fillStyle = linearGradient;
ctx.fillRect(10, 10, 200, 100);
```
### 径向渐变
```js
const radialGradient = ctx.createRadialGradient(75, 50, 5, 90, 60, 100); // x0, y0, r0, x1, y1, r1
radialGradient.addColorStop(0, "red");
radialGradient.addColorStop(1, "blue");
ctx.fillStyle = radialGradient;
ctx.fillRect(10, 10, 200, 100);
```
### 图案
<!--rehype:wrap-class=col-span-2-->
```js
const img = new Image();
img.src = "path/to/image.jpg";
img.onload = () => {
// 'repeat', 'repeat-x', 'repeat-y', 'no-repeat'
const pattern = ctx.createPattern(img, "repeat");
ctx.fillStyle = pattern;
ctx.fillRect(0, 0, 300, 300);
};
```
### 阴影
```js
ctx.shadowColor = "rgba(0, 0, 0, 0.5)";
ctx.shadowBlur = 10;
ctx.shadowOffsetX = 5;
ctx.shadowOffsetY = 5;
ctx.fillStyle = "red";
ctx.fillRect(100, 100, 100, 100);
```
合成
---
### 全局透明度
```js
ctx.globalAlpha = 0.5;
ctx.fillStyle = "red";
ctx.fillRect(100, 100, 100, 100);
ctx.fillStyle = "blue";
ctx.fillRect(150, 150, 100, 100);
```
### 全局合成操作
```js
ctx.globalCompositeOperation = "source-over"; // 默认
ctx.fillStyle = "red";
ctx.fillRect(100, 100, 100, 100);
ctx.globalCompositeOperation = "destination-over";
ctx.fillStyle = "blue";
ctx.fillRect(150, 150, 100, 100);
```
### 动画
```js
let x = 0;
function draw() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "blue";
ctx.fillRect(x, 100, 50, 50);
x += 2;
requestAnimationFrame(draw);
}
draw();
```
参考阅读
---
- [MDN 文档](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API)

618
docs/chatgpt.md Normal file
View File

@ -0,0 +1,618 @@
ChatGPT
===
此备忘单列出了来自世界各地的提示和提示,说明如何有效使用 ChatGPT。
入门指南
---
### ChatGPT 介绍
ChatGPT 是 OpenAI 于 2022 年发布的 AI 聊天机器人,基于 GPT-3.5、GPT-4 等模型,支持自动生成文本、问答、总结和编程等多种语言处理任务。
- 网址: <https://chatgpt.com/>
### 国内类似的平台
- [文心一言(百度)](https://yiyan.baidu.com/) _baidu.com_
- [通义千问(阿里)](https://tongyi.aliyun.com/) _aliyun.com_
- [混元(腾讯)](https://hunyuan.tencent.com/) _tencent.com_
- [豆包(字节跳动)](https://www.doubao.com/) _doubao.com_
- [天工Ai](https://www.tiangong.cn/) _tiangong.cn_
- [讯飞星火](https://xinghuo.xfyun.cn/) _xfyun.cn_
### 通用
<!--rehype:wrap-class=row-span-2-->
为你的企业或创意命名
```bash
你能帮我为我的科技创业公司起个有创意的名字吗?
帮我想个朗朗上口的名字给我的面包店。
```
为课程或培训项目创建大纲
```sh
请帮我创建一个面向初学者的网页开发课程大纲。
能否为客户服务工作坊设计一个培训项目的大纲?
```
提供特定职位的面试问题
```sh
我在面试软件工程师职位,你能给我一些面试问题吗?
请给我一些常见的市场经理面试问题。
```
为商业伙伴、客户或客户提供礼物创意
```sh
我需要一些送给客户的礼物创意,你能帮忙吗?
有什么独特的礼物可以送给我的商业伙伴?
```
从一长串名字或邮箱中随机挑选比赛获奖者
```sh
我想从100个名字中挑选一位获奖者你能帮忙吗
能帮我从1000个邮箱中随机挑选5个用于赠品抽奖吗
```
### 编程
<!--rehype:wrap-class=row-span-3-->
解释代码为什么无法正常工作
```js
为什么这段代码不能运行
var x = 5;
var y = 0;
console.log(x/y);
```
解释代码的含义
```js
这段代码的作用是什么
function addNumbers(a, b) {
return a + b;
}
```
将代码转换为指定的语言
```js
把这段代码翻译成 Python:
function addNumbers(a, b) {
return a + b;
}
```
编写完整的软件程序
```js
写一个计算给定数的阶乘的 Python 程序
如何用 JavaScript 发起一个 HTTP 请求
```
生成正则表达式 (regex)
```js
创建一个匹配所有电子邮件地址的正则表达式
生成一个8位密码的正则表达式
```
为代码库添加注释
```js
为这段代码添加注释
function addNumbers(a, b) {
return a + b;
}
```
修改代码行的 CSS
```html
更新这行的 CSS 将字体颜色更改为蓝色?
<p class="example">Hello, World!</p>
```
修改代码行的 HTML
```html
给这个标题标签添加一个 "header" 类?
<h1>Hello, World!</h1>
```
### 电子表格
帮助创建一个电子表格公式
```
你能帮我创建一个公式来计算单元格 A1 到 A10 的总和吗?
```
<!--rehype:className=wrap-text-->
解释一个公式
```
你能用简单的语言解释一下公式 =SUM(A1:A10) 的含义吗?
```
<!--rehype:className=wrap-text-->
创建占位符的虚拟数据
```
你能帮我生成一些虚拟数据,作为我的电子表格的占位符吗?
```
<!--rehype:className=wrap-text-->
帮助创建复杂的宏
```
我需要创建一个宏,计算单元格 B1 到 B10 的平均值并将结果插入到单元格 C1。你能帮我吗
```
<!--rehype:className=wrap-text-->
提供提高电子表格效率的建议
```
你能给我一些提高电子表格效率的建议吗?
```
### 电子邮件
<!--rehype:wrap-class=row-span-2-->
创建电子邮件活动
```
邀请 Jack 周末晚餐的邮件
创建一个针对新客户的引导流程邮件序列
```
格式化和校对邮件
```
帮我校对并格式化我刚写的这封邮件:
Hello, do you have any actual tips or tricks for ChatGPT please?
```
<!--rehype:className=wrap-text-->
提供有效电子邮件营销的建议
```
给我一些提高邮件打开率和点击率的建议
建议一些方法,让我的邮件内容对订阅者更具吸引力和相关性。
```
<!--rehype:className=wrap-text-->
自动回复邮件
```
给他发送邮件,内容为 "That's a good suggestion, it's coming soon":
Hello, do you have any actual tips or tricks for ChatGPT please?
```
<!--rehype:className=wrap-text-->
从文本中提取电子邮件地址
```sh
帮我提取所有的电子邮件地址:
Sed sit amet sodales tom@gmail.com, at jack@gmail.com enim. 18261@outlook.com ut eros
```
<!--rehype:className=wrap-text-->
### 社交媒体
提供任何主题的表情包创意
```
你能给我一些关于【狗狗】的表情包创意吗?
```
提供能提升互动的帖子创意
```
我想发一个关于气候变化的帖子,能与我的粉丝产生互动。你能给我一些创意吗?
```
<!--rehype:className=wrap-text-->
生成标签和配文
```
我需要一些适合风景日落照片的标签和配文。你能帮我生成一些吗?
```
<!--rehype:className=wrap-text-->
提供回复建议
```
我刚收到一条关于项目状态的消息。你能给我一个回复建议吗?
```
<!--rehype:className=wrap-text-->
### 阅读
总结长文本
```
你能帮我总结一下这篇文章吗?[你的文本]
```
翻译外语
```
你能把这句话翻译成西班牙语吗?[你的文本]
```
推荐类似的书籍
```
你能推荐一些和《饥饿游戏》类似的书吗?
```
### 设计
创建 AI 设计提示词
```
你能帮我生成一个为新运动品牌设计标志的提示词吗?
```
博客或视频的缩略图建议
```
你能推荐一些引人注目的缩略图设计,适合我最新关于健康饮食的 YouTube 视频吗?
```
<!--rehype:className=wrap-text-->
字体搭配
```
你能为旅行博客的标题设计推荐一组字体搭配吗?
```
颜色搭配
```
你能推荐一个适合婚礼摄影网站的配色方案吗?
```
### 数据分析
从大量文本中提取数字
```
请从这段文本中提取所有数字:[你的文本]
```
根据你提供的文本或数据创建表格
```
你能根据这些数据创建一个表格吗?:[你的数据]
```
从大列表中筛选数据
```
请根据特定条件筛选此列表:[你的列表]
```
### 付费广告
提供广告创意
```
给我一些新产品发布的广告创意。
```
检查跟踪代码错误(标签管理器等)
```
检查我的标签管理器代码是否有错误。
```
提供广告文案创意
```
为一家【旅游】公司建议广告文案。
```
Facebook 受众建议
```
推荐适合服装系列广告活动的 Facebook 受众。
```
为广告创建正文、标题和/或号召性用语
```
为一个新的健身计划广告创建标题、正文和号召性用语。
```
### 亚马逊 FBA
编写或重写产品描述
```
请帮我为最新商品写一个新颖且吸引人的产品描述。
```
编写或重写申诉信
```
我需要帮助重写我的申诉信,使其更具说服力。
```
编写或重写供应商联系邮件
```
你能帮我写一封有效的邮件,以联系潜在供应商吗?
```
帮助寻找适合打包销售的商品
```
请推荐一些适合为客户打包销售的商品。
```
整理产品和定价数据
```
你能帮我把产品和定价信息整理成一个整洁易管理的表格吗?
```
<!--rehype:className=wrap-text-->
### SEO
<!--rehype:wrap-class=col-span-2 row-span-2-->
生成或查找关键词
- 为[主题]生成一系列相关关键词。
- 识别[主题]内容优化的长尾关键词。
- 查找[主题]的最佳表现关键词。
- 为[主题]生成一系列 LSI 关键词。
- 查找[主题]的低竞争关键词。
- 为[主题]关键词创建同义词列表。
- 查找[主题] PPC 广告活动的最佳关键词。
- 查找[主题]语音搜索优化的最佳关键词。
- 列出[主题]的最佳关键词用于特色摘要。
- 查找[主题]视频优化的最佳关键词。
- 查找[主题]的最佳关键词。
- 查找[主题] AMP 优化的最佳关键词。
- 查找[主题]社交媒体优化的最佳关键词。
<!--rehype:className=style-round-->
更多关于 SEO 的 ChatGPT 提示
- 为[主题]创建元描述和标题标签。
- 查找与[主题]相关的内部链接机会。
- 为[主题]生成博客文章和主题创意。
- 研究[主题]内容中使用的行业术语。
- 查找权威网站以获取与[主题]内容相关的反向链接。
- 创建与[主题]相关的 XML 网站地图示例。
- 研究[主题]的最佳元标签。
- 研究[主题]内容的最佳内部链接结构。
- 生成与[主题]相关的常见问题列表。
- 为与[主题]相关的图片创建最佳替代文本标签列表。
- 为[主题]创建相关子主题列表。
- 查找与[主题]相关的内容发布时间的最佳时机。
- 研究与[主题]相关的最佳外部链接策略。
- 查找与[主题] SEO 使用的最流行工具。
- 为[主题]创建潜在影响者列表。
- 研究[主题]的最佳模式标记。
- 查找[主题]内容的最佳标题标签。
- 为[主题]创建潜在的链接建设机会列表。
- 研究[主题]反向链接的最佳锚文本。
- 创建[主题]的潜在客座博客机会列表。
- 研究[主题]的最佳本地 SEO 策略。
- 研究[主题]网站性能的最佳分析工具。
- 为[主题]创建潜在合作伙伴关系列表。
- 研究[主题]的最佳移动优化策略。
- 研究[主题]的最佳电子商务优化策略,并提供关键词聚类。
- 创建[主题]的潜在联盟营销机会列表。
- [主题]的最佳联盟营销网站有哪些?
- [主题]的最佳国际 SEO 策略是什么?
- 创建与[主题]相关的潜在播客或播客嘉宾机会列表。
- 研究[主题]的最佳 Google 我的商家优化策略。
- 查找与[主题]相关的热门内容主题。
- 研究[主题]的最佳 SEO 策略并提供可操作步骤。
- 创建与[主题]相关的潜在视频系列或网络研讨会创意列表。
- 研究与[主题]相关的竞争对手策略。
- 查找与[主题]相关的规范标签示例。
- 为[主题]创建一个面向多个地理位置的示例关键词列表。
- 生成针对不同客户购买漏斗阶段的[主题]关键词创意。
- 识别与[主题]相关的行业标签。
<!--rehype:className=style-round-->
### 写作/博客
为你的创意写作项目创建标题
```
我短篇小说集的标题:[你的文章]
```
创建大纲
```
关于锻炼的论文大纲。
```
生成内容创意
```
可持续时尚博客的创意?
```
总结你提供的任何文本
```
总结一下这篇关于可再生能源的文章?[你的文章]
```
创建完整的博客文章
```
关于[财务规划]的博客文章?
```
扩展句子、段落或长文本
```
扩展关于爵士音乐的这句话?[你的句子]
```
改变你的写作语气
```
将这份报告的语气改为对话式?[你的报告]
```
校对或编辑你的写作
```
校对这篇文章?[你的文章]
```
用标题格式化文本(适合博客文章)
```
为我的博客文章格式化标题?[你的帖子]
```
检查任何文本的偏见
```
检查这篇文章是否存在偏见?[你的文章]
```
检测任何文本的抄袭
```
检测这篇论文的抄袭情况?[你的论文]
```
提供域名创意
```
我[园艺博客]的域名?
```
### 教师/课程创建者
将事实或统计数据转换为多项选择题
```sh
你能把这份关于世界历史的事实列表转成多项选择题吗?[你的列表]
```
<!--rehype:className=wrap-text-->
特定主题的作业创意
```
我需要一些关于美国独立战争的历史作业创意。你能建议一些吗?
```
<!--rehype:className=wrap-text-->
从学生列表中创建分组
```
我有一份30名学生的名单。你能把他们分成6人一组进行小组项目吗
```
<!--rehype:className=wrap-text-->
根据考试成绩创建曲线
```
我需要根据学生的考试成绩创建一个评分曲线。你能帮忙吗?
```
<!--rehype:className=wrap-text-->
评分作业
```
你能给这篇历史论文评分并提供改进建议吗?
```
### YouTube
从文字稿中创建时间戳
```
你能为这段播客节目的文字稿创建时间戳吗?[你的文字稿]
```
<!--rehype:className=wrap-text-->
将 YouTube 视频转换为带格式的博客文章
```
你能把这段关于烹饪的 YouTube 视频转成带有标题和项目符号的博客文章吗?[视频链接]
```
<!--rehype:className=wrap-text-->
想出视频大纲或脚本
```
我需要一个关于冥想好处的视频大纲。你能帮忙吗?
```
创建对评论的回复
```
你能写一个周到且礼貌的回复,回应我 YouTube 视频上的这条负面评论吗?
```
<!--rehype:className=wrap-text-->
给你缩略图创意
```
我需要一些关于“DIY 家居装饰”视频的缩略图创意。你能建议一些吗?
```
<!--rehype:className=wrap-text-->
分析你的脚本或文字稿并告诉你语气
```
你能分析这段关于环境问题的视频脚本,并告诉我语气是什么吗?[你的脚本]
```
<!--rehype:className=wrap-text-->
任何主题的视频创意
```
我想制作一系列关于时尚的视频。你能给我建议一些单集的创意吗?
```
<!--rehype:className=wrap-text-->
### 研究
帮助研究2021年前发生的任何事情
- 用简单的术语解释量子计算。
- 有什么创意适合10岁生日派对的吗
- 我如何在 JavaScript 中发出 HTTP 请求?
- 你能告诉我美国内战前的事件吗?
- 你能告诉我印刷机的发明吗?
- 你能研究一下奥林匹克运动会的历史吗?
- 你能给我关于法国大革命的信息吗?
- 我对拜占庭帝国的历史感兴趣。你能帮我了解更多吗?
- 等等...
<!--rehype:className=style-round-->
## 参考资料
- [Awesome ChatGPT Prompts](https://github.com/f/awesome-chatgpt-prompts)
- [原始资料](https://github.com/Fechin/reference/blob/main/source/_posts/chatgpt.md)
- [ChatGPT](https://chatgpt.com/)

View File

@ -30,7 +30,7 @@ Hello Quick Reference
int number = 5; // 整数
float f = 0.95; // 浮点数
double PI = 3.14159; // 浮点数
char yes = 'Y'; // 特点
char yes = 'Y'; // 字符
std::string s = "ME"; // 字符串(文本)
bool isRight = true; // 布尔值
// 常量
@ -177,7 +177,7 @@ marks[0] = 92;
marks[1] = 97;
marks[2] = 98;
// 定义和初始化
std::array<int, 3> = {92, 97, 98};
std::array<int, 3> marks = {92, 97, 98};
// 有空成员
std::array<int, 3> marks = {92, 97};
std::cout << marks[2]; // 输出: 0
@ -322,19 +322,19 @@ else
| Example | Meaning |
|----------------|------------------------|
| `exp1 && exp2` | Both are true _(AND)_ |
| `exp1 || exp2` | Either is true _(OR)_ |
| <code>exp1 &#124;&#124; exp2</code> | Either is true _(OR)_ |
| `!exp` | `exp` is false _(NOT)_ |
#### 位运算符
| Operator | Description |
|----------|-------------------------|
| `a & b` | Binary AND |
| `a | b` | Binary OR |
| `a ^ b` | Binary XOR |
| `a ~ b` | Binary One's Complement |
| `a << b` | Binary Shift Left |
| `a >> b` | Binary Shift Right |
| 运算符 | 描述 |
|--------|------|
| `a & b` | 按位与 |
| <code>a &#124; b</code> | 按位或 |
| `a ^ b` | 按位异或 |
| `~a` | 按位取反 |
| `a << b` | 左移 |
| `a >> b` | 右移 |
### 三元运算符
@ -614,14 +614,14 @@ auto func = []() -> return_type { };
```cpp
int val1 = 123, val2 = 456;
string str1("123"), str2(456);
auto func1 = [=, &str1]() -> int
{
return val1 == std::stoi(str1)
? val1 : val2;
};
auto func2 = [&, val1]() -> int
auto func2 = [&, val1]() -> string
{
return str1 == std::to_string(val1)
? str1 : str2;
@ -646,6 +646,128 @@ std::for_each(vec.begin(), vec.end(),
});
```
## C++智能指针
### 智能指针基础
<!--rehype:wrap-class=row-span-2-->
```cpp
#include <memory>
// 创建独占所有权的指针
std::unique_ptr<int> p1 = std::make_unique<int>(42);
// 不能复制,只能移动
std::unique_ptr<int> p2 = std::move(p1);
// p1 现在为 nullptr
// 创建共享所有权的指针
std::shared_ptr<int> sp1 = std::make_shared<int>(42);
// 可以复制,引用计数增加
std::shared_ptr<int> sp2 = sp1;
// 获取引用计数
std::cout << sp1.use_count(); // 输出: 2
// 创建弱引用,不增加引用计数
std::weak_ptr<int> wp = sp1;
```
### unique_ptr
```cpp
// 创建方式1使用 make_unique (C++14)
auto p1 = std::make_unique<int>(42);
// 创建方式2直接构造
std::unique_ptr<int> p2(new int(42));
// 访问资源
std::cout << *p1 << std::endl;
*p1 = 100;
// 获取原始指针(不转移所有权)
int* raw = p1.get();
// 释放所有权并返回原始指针
int* released = p1.release();
// p1 现在为 nullptr
// 替换管理的对象
p1.reset(new int(50));
```
### shared_ptr
```cpp
// 创建方式1使用 make_shared
auto sp1 = std::make_shared<int>(42);
// 创建方式2直接构造
std::shared_ptr<int> sp2(new int(42));
// 复制和共享所有权
std::shared_ptr<int> sp3 = sp1;
std::cout << sp1.use_count(); // 输出: 2
// 访问资源
std::cout << *sp1 << std::endl;
*sp1 = 100; // 所有指向该资源的shared_ptr都会看到这个修改
// 重置指针
sp1.reset(); // sp1变为nullptr引用计数减1
```
### weak_ptr
```cpp
std::shared_ptr<int> sp = std::make_shared<int>(42);
std::weak_ptr<int> wp = sp;
// 检查引用对象是否存在
if (auto locked = wp.lock()) {
std::cout << *locked << std::endl; // 输出: 42
} else {
std::cout << "对象已被销毁" << std::endl;
}
// 检查是否过期
bool is_expired = wp.expired(); // false
// 获取引用计数
std::cout << wp.use_count(); // 输出: 1
// 当所有shared_ptr都被销毁时
sp.reset();
if (wp.expired()) {
std::cout << "对象已被销毁" << std::endl;
}
```
### 循环引用问题
```cpp
struct Node {
std::string name;
std::shared_ptr<Node> next;
// 使用weak_ptr避免循环引用
std::weak_ptr<Node> parent;
Node(const std::string& n) : name(n) {}
~Node() { std::cout << "销毁: " << name << std::endl; }
};
// 创建循环引用
void createCycle() {
auto node1 = std::make_shared<Node>("Node1");
auto node2 = std::make_shared<Node>("Node2");
node1->next = node2;
node2->parent = node1; // 使用weak_ptr避免循环引用
// 函数结束时node1和node2会被正确销毁
// 如果parent也是shared_ptr则会造成内存泄漏
}
```
## C++多线程
### 多线程介绍
@ -926,7 +1048,7 @@ int val = result.get();
extern double foo(int val) {}
std::future<double> result =
async(foo, 5);
std::async(foo, 5);
//返回值类型
std::future_status status;
@ -935,7 +1057,7 @@ status = result.wait_for(
std::chrono::seconds(1)
);
// 等待到某一时间点
status = result.wait_for(
status = result.wait_until(
std::chrono::now() +
std::chrono::seconds(1)
);
@ -1108,7 +1230,7 @@ C++ 预处理器
```cpp
#ifdef DEBUG
console.log('hi');
std::cout << "hi" << std::endl;
#elif defined VERBOSE
...
#else

View File

@ -1321,6 +1321,261 @@ var result = students
["Charlie","Damon","David"]
```
事件和委托
----
### 介绍
在 .NET 中,委托支持后期绑定,允许调用方在运行时提供方法的一部分,而不是在创建委托时定义完整算法,从而增强了灵活性和扩展性。
### 多播委托
<!--rehype:wrap-class=col-span-2 row-span-6-->
我们预先提供这些可用的方法
```cs
public void Sub(int x, int y)
{
Console.WriteLine("x-y=" + (x - y));
}
public void Mul(int x, int y)
{
Console.WriteLine("x*y=" + (x * y));
}
```
定义一个委托类型
```cs
public delegate void MyDelegate3(int x, int y);
```
定义一个方法,接收委托作为参数
```cs
public void MyMethod3(int x, int y, MyDelegate3 myDelegate)
{
myDelegate(x, y);
}
```
定义另一个委托类型
```cs
public delegate void MyDelegate4(int x, int y);
```
定义一个方法,接收委托作为参数
```cs
public void MyMethod4(int x, int y, MyDelegate4 myDelegate)
{
myDelegate(x, y);
}
```
定义一个方法,接收委托作为参数
```cs
public void MyMethod5(int x, int y, MyDelegate3 myDelegate, MyDelegate4 myDelegate2)
{
myDelegate(x, y);
myDelegate2(x, y);
}
```
#### 多播委托
```cs
MyDelegate3 myDelegate31 = new MyDelegate3(Sub);
MyDelegate4 myDelegate41 = new MyDelegate4(Mul);
```
调用 MyMethod3 方法,并传入委托作为参数
```cs
MyMethod3(10, 5, myDelegate31);
// output:
// x-y=5
```
调用 MyMethod4 方法,并传入委托作为参数
```cs
MyMethod4(10, 5, myDelegate41);
// output:
// x*y=50
```
调用 MyMethod5 方法,并传入委托作为参数
```cs
MyMethod5(10, 5, myDelegate31, myDelegate41);
// output:
// x-y=5
// x*y=50
```
### 定义委托类型
使用 `delegate` 关键字定义委托
```cs
public delegate void MyDelegate(
int x, string y
);
```
上述委托对应的函数实现应该类似:
```cs
public void MyMethod(int x, string y);
```
### 创建委托实例
```cs
// 创建委托实例
MyDelegate myDelegate = new MyDelegate(
MyMethod
);
```
### 调用委托
```cs
// 调用委托,传入对应类型的参数
myDelegate(10, "Hello");
```
### 委托作为参数
```cs
// 定义另一个委托类型
public delegate int MyDelegate2(
int x, int y
);
// 定义一个方法,接收委托作为参数
public int MyMethod2(
int x, int y, MyDelegate2 myDelegate
)
{
return myDelegate(x, y);
}
// 创建委托实例
MyDelegate2 myDelegate2 = new MyDelegate2(
Add
);
// 调用 MyMethod2 方法,并传入委托作为参数
int result = MyMethod2(
10, 20, myDelegate2
);
```
### Action 委托
Action 委托的变体最多可包含 16 个参数,且返回类型为 `void`
```cs
// 创建一个Action
public Action<int, string> myAction;
// 给Action赋值
myAction = (x, y) => Console.WriteLine(
"x+y=" + (x + y)
);
// 直接调用Action
myAction(10, "Hello");
// 使用 null 合并运算符调用Action
myAction?.Invoke(10, "Hello");
```
### Func 委托
<!--rehype:wrap-class=row-span-2-->
Func 委托的变体可包含最多16个参数返回类型可以是任意类型 T
```cs
// 创建一个Func,最后一个参数是返回类型
public Func<int, int, string> myFunc;
// 给Func赋值
myFunc = (x, y) => "x+y=" + (x + y);
// 调用Func
string result = myFunc(10, 20);
// 使用 null 合并运算符调用Func
string result2 = myFunc?.Invoke(10, 20);
```
事件与委托类似,都是后期绑定机制。实际上,事件是建立在委托基础上的一种语言支持,它是 C# 对委托的封装,提供了更面向对象的编程模型,并实现了观察者模式。
### 事件定义
<!--rehype:wrap-class=col-span-2-->
```cs
// 使用 event 关键字定义事件
public event EventHandler<EventArgs> MyEvent;
```
### 事件订阅
<!--rehype:wrap-class=col-span-2-->
我们实现定义一个方法作为事件处理器,并订阅事件
```cs
public void MyEventHandler(object sender, EventArgs e)
{
// 事件处理逻辑
// ...
}
```
```cs
// 订阅事件
MyEvent += MyEventHandler;
// 取消订阅事件
MyEvent -= MyEventHandler;
```
### 事件触发
```cs
// 触发事件
MyEvent?.Invoke(this, new EventArgs());
```
### 事件参数
<!--rehype:wrap-class=col-span-2-->
```cs
// 定义事件参数
public class MyEventArgs : EventArgs
{
public int Value { get; set; }
}
// 新的Handler
public void MyEventHandler2(object sender, MyEventArgs e)
{
// 事件处理逻辑,这里可以获取到事件参数
Console.WriteLine("事件参数的值:" + e.Value);
}
// 触发事件
// output:
// 事件参数的值10
MyEvent?.Invoke(this, new MyEventArgs { Value = 10 });
```
语法糖
----

View File

@ -156,7 +156,7 @@ div {
```css
#container {
display: grid;
s grid: repeat(2, 60px) / auto-flow 80px;
grid: repeat(2, 60px) / auto-flow 80px;
}
#container > div {
background-color: #8ca0ff;
@ -1977,6 +1977,16 @@ ul > li:not(:last-child)::after {
使列表项看起来像一个真实的逗号分隔列表,使用 `:not()` 伪类,最后一项不会添加逗号
### 表格中数字使用制表数字
```css
.revenue {
font-variant-numeric: tabular-nums;
}
```
表格中一列数字列对其
另见
---------

View File

@ -9,6 +9,8 @@ Dart 备忘清单
### 安装 Dart
<!--rehype:wrap-class=row-span-2-->
> 完整教程请参阅 Dart 中文社区 [https://dart.cn/get-dart/](https://dart.cn/get-dart/)
#### Windows
```bash
@ -88,8 +90,8 @@ double height = 1.85;
// 您还可以将变量声明为 num
// x 可以同时具有 int 和 double 值
num x = 1;
num += 2.5;
print(num); // 打印: 3.5
x += 2.5;
print(x); // 打印: 3.5
String name = "Nicola";
bool isFavourite = true;
@ -130,6 +132,15 @@ import 'dart:math';
import 'package:test/test.dart';
// 导入文件
import 'path/to/my_other_file.dart';
// 指定前缀
import 'package:lib/lib.dart' as lib;
lib.Element element = lib.Element();
// 仅导入 foo
import 'package:lib1/lib1.dart' show foo;
// 不导入 foo
import 'package:lib2/lib2.dart' hide foo;
// 延迟导入,仅在需要时导入
import 'package:greetings/hello.dart' deferred as hello;
```
操作符
@ -184,10 +195,84 @@ print(3 >= 3); // 打印: true - 大于或等于
print(2 <= 3); // 打印: true - 小于或等于
```
### 运算符优先级示例
```dart
// 括号可以提高可读性。
if ((n % i == 0) && (d % i == 0)) ...
// 虽然难以阅读,但等效。
if (n % i == 0 && d % i == 0) ...
```
### 位运算符和移位运算符
操作符 | 含义
:-|-
`&` | 与AND
`\|` | 或OR
`^` | 异或XOR
`~expr` | 一元位补码<br>_(0 变为 11 变为 0)_
`<<` | 左移
`>>` | 右移
`>>>` | 无符号右移
<!--rehype:className=left-align-->
----
```dart
final value = 0x22;
final bitmask = 0x0f;
// 与AND
assert((value & bitmask) == 0x02);
// 非与AND NOT
assert((value & ~bitmask) == 0x20);
// 或OR
assert((value | bitmask) == 0x2f);
// 异或XOR
assert((value ^ bitmask) == 0x2d);
assert((value << 4) == 0x220); // 左移
assert((value >> 4) == 0x02); // 右移
```
### 级联表示法
级联 (.., ?..) 允许您对同一对象进行一系列操作。除了访问实例成员之外,您还可以调用同一对象的实例方法。这通常可以节省您创建临时变量的步骤,并允许您编写更流畅的代码。考虑以下代码:
```dart
var paint = Paint()
..color = Colors.black
..strokeCap = StrokeCap.round
..strokeWidth = 5.0;
```
示例相当于以下代码:
```dart
var paint = Paint();
paint.color = Colors.black;
paint.strokeCap = StrokeCap.round;
paint.strokeWidth = 5.0;
```
`?...`开头可确保不会对该空对象进行任何级联操作。
```dart
querySelector('#confirm') // 获取一个对象
?..text = 'Confirm' // 使用它的成员
..classes.add('important')
..onClick.listen((e) => {
window.alert('Confirmed!')
})
..scrollIntoView();
```
控制流:条件
------
### if 和 else if
<!--rehype:wrap-class=row-span-2-->
```dart
if(age < 18){
@ -200,11 +285,12 @@ if(age < 18){
```
### switch case
<!--rehype:wrap-class=row-span-2-->
```dart
enum Pet {dog, cat}
Pet myPet = Pet.dog;
switch(myPet){
switch(myPet) {
case Pet.dog:
print('My Pet is Dog.');
break;
@ -217,6 +303,25 @@ switch(myPet){
// 打印: My Pet is Dog.
```
### 三元操作符
```dart
int age = 20;
String message = age >= 18 ? "成人" : "儿童";
print("年龄类别: $message");
// 输出: 年龄类别: 成人
```
### 三元操作符嵌套使用
```dart
int x = 10;
int y = 5;
int result = x > y ? x : y > 0 ? y : 0;
print("Result: $result");
// 输出: Result: 10
```
控制流:循环
-----
@ -276,7 +381,7 @@ const constantCities = const ["New York", "Mumbai", "Tokyo"];
```dart
// 映射是关联键和值的对象
var person = Map<String, String>();
// 要初始化地图,请执行以下操作:
// 要初始化映射,请执行以下操作:
person['firstName'] = 'Nicola';
person['lastName'] = 'Tesla';
print(person);
@ -301,7 +406,7 @@ var halogens = {'fluorine', 'chlorine', 'bromine', 'iodine', 'astatine'};
// 创建一个空集
var names = <String>{};
Set<String> names = {}; // 这也有效
//var names = {}; // 创建地图,而不是集合
//var names = {}; // 创建映射,而不是集合
```
函数
@ -737,7 +842,8 @@ Future<String> login() {
// 异步
main() async {
print('Authenticating please wait...');
print(await userName());
String result = await login();
print(result);
}
```
@ -778,8 +884,50 @@ userObject?.userName?.toString()
// 如果 userObject 或 userObject.userName 为 null则前面的代码返回 null 并且从不调用 toString()
```
### 扩展运算符 (...)
```dart
// 将多个值插入到集合中
var list = [1, 2, 3];
var list2 = [0, ...list];
print(list2.length); // 打印: 4
```
### enum
<!--rehype:wrap-class=col-span-2 row-span-2-->
定义enum"enumeration"的缩写)是一种特殊的数据类型,可使变量成为一组预定义的常量。枚举用于定义只能从一小组可能值中选择一个的变量。通过为这些值集提供有意义的名称,枚举有助于提高代码的可读性,减少出错率。
```dart
// 定义枚举类型
enum TrafficLight {
red,
yellow,
green
}
// 根据交通灯状态打印消息的函数
void printTrafficLightMessage(TrafficLight light) {
switch (light) {
case TrafficLight.red:
print('Stop!');
break;
case TrafficLight.yellow:
print('Get ready...');
break;
case TrafficLight.green:
print('Go!');
break;
}
}
void main() {
// 枚举类型的示例用法
TrafficLight currentLight = TrafficLight.green;
// 打印当前交通灯状态的消息
printTrafficLightMessage(currentLight);
}
```
### 级联符号 (..)
<!--rehype:wrap-class=row-span-2-->
```dart
// 允许您对同一对象进行一系列操作
@ -795,15 +943,6 @@ var user = User()
..age = 24;
```
### 扩展运算符 (...)
```dart
// 将多个值插入到集合中
var list = [1, 2, 3];
var list2 = [0, ...list];
print(list2.length); // 打印: 4
```
### 延迟初始化
```dart
@ -812,7 +951,7 @@ late String token;
void main(List<String> args) {
/// print(token);
/// Field 'token' has not been initialized
/// 字段 "token "尚未初始化
/// 在初始化前调用就会报错
token = "tokenContent";
print(token);
@ -823,3 +962,4 @@ void main(List<String> args) {
----
- [Dart 官方文档](https://dart.dev/) _(dart.dev)_
- [Dart 中文社区官方文档](https://dart.cn/) _(dart.cn)_

660
docs/docker-compose.md Normal file
View File

@ -0,0 +1,660 @@
Docker Compose 备忘清单
===
这是 [docker-compose](https://docs.docker.com/compose/) 的快速参考备忘单。你可以在这里找到最常见的 Docker Compose 使用方式。
入门
---
### Docker Compose 是什么?
- `Docker-compsoe` 是一个开源项目,用于定义和运行多容器 `Docker` 应用程序的工具。由 `Docker` 社区维护。
- 通过一个 `YAML` 文件来配置应用程序的服务,以便可以使用一个命令启动、停止和重启整个应用程序。
- [Docker Compose 开源地址](https://github.com/docker/compose)
- [Docker Compose 发行地址](https://github.com/docker/compose/releases) _github.com_
### 基本概念
- **服务 (services):** 一个服务指的是一个容器,即一个应用程序的一个实例。
- **容器 (container):** `Docker` 容器,其中运行着应用程序的一个实例。
- **镜像 (image):** `Docker` 镜像,用于创建容器的模板。
- **Docker-Compose 文件:** 一个 `YAML` 文件,描述了应用程序的各个服务以及它们之间的关系、配置等信息。
### Docker-Compose 文件结构
- `version`: _Docker-Compose_ 文件的版本。
- `services`: 定义了各个服务,每个服务都有自己的配置项,如镜像、端口映射、依赖等。
- `networks`: 定义了应用程序使用的网络,可以自定义网络以控制服务之间的通信。
- `volumes`: 定义了应用程序使用的卷,用于持久化数据或与主机共享文件。
### 安装
<!--rehype:wrap-class=row-span-2-->
对于 Ubuntu 和 Debian运行
```bash
sudo apt-get update
sudo apt-get install docker-compose-plugin
```
对于基于 RPM 的发行版,运行:
```bash
sudo yum update
sudo yum install docker-compose-plugin
```
通过检查版本来验证 Docker Compose 是否正确安装
```sh
docker compose version
# Docker Compose version v2.17.3
docker --version
# Docker version 23.0.5, build bc4487a
docker version
# Client: Docker Engine - Community
# Cloud integration: v1.0.31
# Version: 23.0.5
# API version: 1.42
# <...>
```
### 独立安装 Compose
```sh
curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
```
<!--rehype:className=wrap-text-->
如果命令 `docker-compose` 安装失败,请检查你的路径。你也可以创建一个符号链接,指向 `/usr/bin` 或路径中的任何其他目录。例如
```sh
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
```
<!--rehype:className=wrap-text-->
### 更新 Compose
对于 Ubuntu 和 Debian运行
```sh
sudo apt-get update
sudo apt-get install docker-compose-plugin
```
对于基于 RPM 的发行版,运行:
```sh
sudo yum update
sudo yum install docker-compose-plugin
```
### 卸载 Docker Compose
<!--rehype:wrap-class=col-span-2-->
Ubuntu, Debian:
```sh
sudo apt-get remove docker-compose-plugin
```
基于 RPM 的发行版
```sh
sudo yum remove docker-compose-plugin
```
如果您使用curl安装Compose CLI插件要卸载它请运行
```sh
rm $DOCKER_CONFIG/cli-plugins/docker-compose
```
为所有用户删除,或者,如果您已为所有用户安装 Compose请运行
```sh
rm /usr/local/lib/docker/cli-plugins/docker-compose
```
### 检查 Compose 的安装位置
<!--rehype:wrap-class=col-span-3-->
```sh
docker info --format '{{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}{{.Path}}{{end}}{{end}}'
```
### 常用命令
<!--rehype:wrap-class=col-span-2-->
| docker compose命令 | 说明 | 常见参数说明 |
| ------------------------ | ---------------- | -------------------- |
| `docker compose up` | 启动容器 | `-d` 后台运行容器 |
| `docker compose down` | 停止容器 | `-v` 删除容器和卷 |
| `docker compose logs` | 查看容器日志 | `-f` 跟随日志输出 |
| `docker compose exec` | 进入容器 | `-it` 启动交互式终端 |
| `docker compose pull` | 拉取镜像 | |
| `docker compose build` | 构建镜像 | |
| `docker compose images` | 列出镜像 | |
| `docker compose push` | 推送镜像 | |
| `docker compose config` | 显示配置信息 | |
| `docker compose version` | 查看版本信息 | |
<!--rehype:className=left-align-->
### 常用运维命令
| docker compose命令 | 说明 |
| ------------------------ | ---------------- |
| `docker compose stop` | 停止容器 |
| `docker compose start` | 启动容器 |
| `docker compose rm` | 删除容器 |
| `docker compose restart` | 重启容器 |
| `docker compose run` | 运行一个临时容器 |
| `docker compose ps` | 查看容器状态 |
<!--rehype:className=left-align-->
Docker Compose 配置
---
### 示例配置文件
<!--rehype:wrap-class=col-span-2-->
`docker-compose` 的配置文件是一个 `YAML` 文件,用于定义和运行多容器 Docker 应用程序。通常命名为 `docker-compose.yml`,它使用单一的 YAML 文件来定义多个容器的集合,以及它们之间的依赖关系和服务。以下是一份 `docker-compose.yml` 文件的配置模板,包含了常用配置项和解释:
```yml
name: myapp
version: '3' # 已过时
services: # 定义一个或多个服务
service1: # 服务名称
image: nginx:latest # 使用的 Docker 镜像,这里是 Nginx 的最新版本
# 或者使用构建指令来从 Dockerfile 构建镜像
build:
context: ./path/to/Dockerfile # Dockerfile 所在的目录
dockerfile: Dockerfile-alternative # 可选的 Dockerfile 名称,默认是 Dockerfile
# 容器启动时执行的命令,覆盖默认的命令
command:
- "nginx"
- "-g"
- "daemon off;" # 以数组形式指定,防止 shell 解析
ports: # 容器端口与主机端口映射
- "80:80" # 主机 80 端口映射到容器的 80 端口
volumes: # 数据卷挂载
- ./nginx.conf:/etc/nginx/nginx.conf:ro # 将主机上的 nginx.conf
# 挂载到容器的 /etc/nginx/nginx.conf只读
- ./logs:/var/log/nginx # 将 logs 目录挂载到容器的 /var/log/nginx
environment: # 设置环境变量
- MYSQL_HOST=database # 可以引用其他服务,这里假设有一个名为 database 的服务
- MYSQL_PORT=3306
depends_on: # 服务启动顺序,这里表明 service1 依赖于 database 服务
- database
networks: # 定义网络
- my_network # 参与名为 my_network 的网络
service2: # 另一个服务示例
# ... 类似地定义其他服务
networks: # 定义网络
my_network: # 网络名称
driver: bridge # 网络驱动,通常是 bridge 模式
volumes: # 定义数据卷
nginx_logs: # 卷名称
```
备忘录事项
- 使用 Docker-Compose 可以简化多容器应用程序的部署和管理,但需要注意容器之间的依赖关系和通信。
- 配置文件中的缩进必须使用空格,不能使用制表符。
- 可以使用环境变量来动态设置配置项,如数据库密码。
- 当你修改了 `docker-compose.yml` 文件后,需要重新运行 `docker-compose up` 来使改动生效。
- 使用 `docker-compose build` 仅重建镜像,而不启动容器。
- 使用 `docker-compose restart` 重启容器。
- 记得清理不再需要的容器和镜像,以避免磁盘空间不足。
### 使用环境变量
`docker run -e VARIABLE=VALUE ...` 相同
```yml
web:
environment:
- DEBUG=1
```
您可以选择不设置值并将环境变量从 shell 直接传递到容器。它的工作方式与 `docker run -e VARIABLE ...` 相同:
```yml
web:
environment:
- DEBUG
web:
environment:
- DEBUG=${DEBUG}
```
`env_file` 属性允许您在 Compose 应用程序中使用多个 `.env` 文件。
它的工作方式与 `docker run --env-file=FILE ...` 相同。
```yml
web:
env_file:
- web-variables.env
```
#### 额外的信息
```yml
env_file:
- path: ./default.env
required: true # default
- path: ./override.env
required: false
```
- 如果指定了多个文件,则它们将按顺序进行评估,可以覆盖先前文件中设置的值。
-`.env` 文件中声明的环境变量不能在 Compose 文件中单独再次引用。
- 如果同时使用 `env_file``environment` 属性,则由 `environment` 设置的环境变量优先级更高。
-`env_file` 属性中指定的 `.env` 文件的路径是相对于 compose.yml 文件的位置的。
- `.env` 文件中的值可以通过使用 `docker compose run -e` 命令行来从命令行覆盖。
- 如果使用 `--env-file` 替换了另一个 `.env`,则您的 `.env` 文件可以被另一个 `.env` 文件覆盖。
- 从 Docker Compose 版本 2.24.0 开始,您可以通过使用 `required` 字段将 `.env` 文件设置为可选项。当 `required` 设置为 `false``.env` 文件丢失时Compose 将静默忽略该条目
### image
```yml
image: redis
image: redis:5
image: redis@sha256:0ed5d5928d473745...
image: library/redis
image: docker.io/library/redis
image: my_private.registry:5000/redis
```
### ports 端口
<!--rehype:wrap-class=col-span-2 row-span-2-->
```yml
ports:
# 将容器的端口 3000 映射到主机的随机端口
- "3000"
# 将容器的端口范围从 3000 到 3005 映射到主机的相同端口范围
- "3000-3005"
# 将容器的端口 8000 映射到主机的端口 8000
- "8000:8000"
# 将容器的端口范围从 8080 到 8081 映射到主机的端口范围从 9090 到 9091
- "9090-9091:8080-8081"
# 将容器的端口 22SSH端口映射到主机的端口 49100
- "49100:22"
# 将容器的端口范围从 8000 到 9000 映射到主机的端口 80
- "8000-9000:80"
# 将容器的端口 8001 映射到主机的 127.0.0.1 地址的端口 8001
- "127.0.0.1:8001:8001"
# 将容器的端口范围从 5000 到 5010 映射到主机的 127.0.0.1 地址的相同端口范围
- "127.0.0.1:5000-5010:5000-5010"
# 将容器的 UDP 端口 6060 映射到主机的端口 6060
- "6060:6060/udp"
```
暴露容器端口
### platform 平台
```yml
platform: darwin
platform: windows/amd64
platform: linux/arm64/v8
```
定义了服务容器运行的目标平台。值必须符合 [OCI Image Spec](https://github.com/opencontainers/image-spec/blob/v1.0.2/image-index.md) 使用的约定
### command
<!--rehype:wrap-class=col-span-2-->
会覆盖容器镜像声明的默认命令,例如 Dockerfile 的 CMD。
```yml
command: bundle exec thin -p 3000
```
该值也可以是一个列表,其方式类似于 Dockerfile
```yml
command: [ "bundle", "exec", "thin", "-p", "3000" ]
```
如果该值为 null则使用映像中的默认命令。如果值为 [](空列表)或 ''(空字符串),则忽略图像声明的默认命令,即覆盖为空。
### depends_on
```yml
services:
web:
build: .
depends_on:
- db
- redis
redis:
image: redis
db:
image: postgres
```
服务之间的启动和关闭依赖关系。
### volumes
<!--rehype:wrap-class=col-span-2-->
下面的示例显示了双服务设置,其中数据库的数据目录作为名为 db-data 的卷与另一个服务共享,以便定期备份。
```yml
services:
backend:
image: example/database
volumes:
- db-data:/etc/data
backup:
image: backup-service
volumes:
- db-data:/var/lib/backup/data
volumes:
db-data:
```
db-data 卷安装在 `/var/lib/backup/data``/etc/data` 容器路径中,分别用于备份和后端。如果卷尚不存在,则运行 `docker compose up` 会创建该卷。否则,如果在 Compose 外部手动删除现有卷,则会使用并重新创建现有卷。
#### driver
指定应使用哪个卷驱动程序。如果驱动程序不可用Compose 将返回错误并且不会部署应用程序。
```yml
volumes:
db-data:
driver: foobar
```
#### driver_opts
指定一个选项列表,作为键值对传递给此卷的驱动程序。这些选项取决于驾驶员。
```yml
volumes:
example:
driver_opts:
type: "nfs"
o: "addr=10.40.0.199,nolock,soft,rw"
device: ":/docker/example"
```
#### external
```yml
services:
backend:
image: example/database
volumes:
- db-data:/etc/data
volumes:
db-data:
external: true
```
在示例中Compose 不会尝试创建名为 `{project_name}_db-data` 的卷,而是查找名为 `db-data` 的现有卷,并将其挂载到后端服务的容器中。
#### labels
标签用于将元数据添加到卷中。您可以使用数组或字典。
```yml
volumes:
db-data:
labels:
com.example.description: "Database volume"
com.example.department: "IT/Ops"
com.example.label-with-empty-value: ""
```
```yml
volumes:
db-data:
labels:
- "com.demo.description=Database volume"
- "com.demo.department=IT/Ops"
- "com.demo.label-with-empty-value"
```
#### name
设置卷的自定义名称。名称字段可用于引用包含特殊字符的卷。该名称按原样使用,并且不受堆栈名称的限制。
```yml
volumes:
db-data:
name: "my-app-data"
```
这使得可以将此查找名称作为 Compose 文件的参数,以便卷的模型 ID 被硬编码,但平台上的实际卷 ID 是在部署期间在运行时设置的。例如,如果 `.env` 文件中的 `DATABASE_VOLUME=my_volume_001`
```yml
volumes:
db-data:
name: ${DATABASE_VOLUME}
```
它还可以与外部属性结合使用。这意味着用于在平台上查找实际卷的卷名称与用于在 Compose 文件中引用它的名称分开设置:
```yml
volumes:
db-data:
external:
name: actual-name-of-volume
```
### networks
<!--rehype:wrap-class=row-span-3-->
```yml
services:
some-service:
networks:
- some-network
- other-network
```
#### aliases
声明网络上服务的替代主机名。同一网络上的其他容器可以使用服务名称或别名来连接到服务的容器之一
```yml
services:
some-service:
networks:
some-network:
aliases:
- alias1
- alias3
other-network:
aliases:
- alias2
```
在以下示例中,服务前端能够通过主机名 `backend` 或者 `back-tier` 网络上的数据库来访问 `backend` 服务。服务 `monitoring` 能够在 admin 网络上通过主机名 `backend` 或者 `mysql` 来访问相同的 `backend` 服务。
```yml
services:
frontend:
image: example/webapp
networks:
- front-tier
- back-tier
monitoring:
image: example/monitoring
networks:
- admin
backend:
image: example/backend
networks:
back-tier:
aliases:
- database
admin:
aliases:
- mysql
networks:
front-tier:
back-tier:
admin:
```
#### ipv4_address, ipv6_address
加入网络时为服务容器指定静态IP地址。
```yml
services:
frontend:
image: example/webapp
networks:
front-tier:
ipv4_address: 172.16.238.10
ipv6_address: 2001:3984:3989::10
networks:
front-tier:
ipam:
driver: default
config:
- subnet: "172.16.238.0/24"
- subnet: "2001:3984:3989::/64"
```
#### link_local_ips
指定了链接本地IP的列表。链路本地IP是属于知名子网的特殊IP纯粹由运营商管理通常取决于部署它们的架构。
```yml
services:
app:
image: busybox
command: top
networks:
app_net:
link_local_ips:
- 57.123.22.11
- 57.123.22.13
networks:
app_net:
driver: bridge
```
#### mac_address
设置服务容器连接特定网络时使用的 MAC 地址。
#### priority 优先级
将服务的容器连接到其网络的顺序。如果未指定,默认值为 0。在以下示例中应用服务首先连接到 `app_net_1`,因为它具有最高优先级。然后它连接到 `app_net_3`,然后是 `app_net_2`,后者使用默认优先级值 0。
```yml
services:
app:
image: busybox
command: top
networks:
app_net_1:
priority: 1000
app_net_2:
app_net_3:
priority: 100
networks:
app_net_1:
app_net_2:
app_net_3:
```
### expose
```yml
expose:
- "3000"
- "8000"
- "8080-8085/tcp"
```
定义 Compose 从容器公开的(传入)端口或端口范围。这些端口必须可供链接服务访问,并且不应发布到主机。只能指定内部容器端口。
### links
```yml
web:
links:
- db
- db:database
- redis
```
定义到另一个服务中的容器的网络链接。同时指定服务名称和链接别名 (SERVICE:ALIAS),或者仅指定服务名称。
### pids_limit
```yml
pids_limit: 10
```
调整容器的 PID 限制。设置为 -1 以获取无限 PID。
### devices
```yml
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
- "/dev/sda:/dev/xvda:rwm"
```
定义已创建容器的设备映射列表
```sh
HOST_PATH:CONTAINER_PATH[:CGROUP_PERMISSIONS]
```
### dns
```yml
dns: 8.8.8.8
dns:
- 8.8.8.8
- 9.9.9.9
```
定义在容器网络接口配置上设置的自定义 DNS 服务器。它可以是单个值或列表。
### dns_opt
```yml
dns_opt:
- use-vc
- no-tld-query
```
列出要传递给容器的 DNS 解析器Linux 上的 /etc/resolv.conf 文件)的自定义 DNS 选项。
### dns_search
```yml
dns_search: example.com
dns_search:
- dc1.example.com
- dc2.example.com
```
定义在容器网络接口配置上设置的自定义 DNS 搜索域。它可以是单个值或列表。

View File

@ -163,7 +163,10 @@ $ docker build - < Dockerfile
$ docker build - < context.tar.gz
$ docker build -t eon/nginx-server .
$ docker build -f myOtherDockerfile .
$ docker build --build-arg https_proxy=127.0.0.1:8088 # 使用http代理构建
$ curl example.com/remote/Dockerfile | docker build -f - .
$ docker save -o <保存路径>/myimage.tar myimage:latest # 导出
$ docker load -i <路径>/myimage.tar # 导入
```
### 删除 \<none> 镜像
@ -916,7 +919,7 @@ if010/dameng
### 人大金仓
```bash
docker run -idt -p 5432:54321 --restart=always \
docker run -idt -p 54321:54321 --restart=always \
--name Kingbase --privileged=true \
-e DB_MODE=oracle \
-e NEED_START=yes \
@ -934,7 +937,7 @@ if010/kingbase:v009r001c001b0025 /usr/sbin/init
-- | --
:-- | --
`-itd` | 以后台方式启动容器,保持 STDIN 打开
`-p 5432:54321` | 将主机的 5432 端口映射到容器的 5432 端口,访问数据库
`-p 54321:54321` | 将主机的 54321 端口映射到容器的 54321 端口,访问数据库
`--name Kingbase` | 给容器指定名称为 "Kingbase"
`--restart=always` | 容器退出时,总是重新启动容器
<!--rehype:className=auto-wrap left-align-->

View File

@ -985,6 +985,7 @@ Github emoji 图标标记
--------
- [Emoji searcher](https://emoji.muan.co/) _(muan.co)_
- [Share Emojis-With Your 🥺Fiends With An Great Way And Unique✅ |copy & download|](https://emoji-share.com/) _(emoji-share.com)_
- [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)_

450
docs/erlang.md Normal file
View File

@ -0,0 +1,450 @@
Erlang 备忘清单
===
[Erlang](https://www.erlang.org/) 是一种用于构建并发、分布式和容错系统的编程语言。以下是一些常用的命令和操作。
入门
---
### 启动 Erlang Shell
```shell
erl
```
### 编译代码
<!--rehype:wrap-class=row-span-2-->
```shell
# 在 Erlang Shell 中编译
c(module).
# 在命令行中编译
erlc module.erl
```
### 运行代码
<!--rehype:wrap-class=row-span-2-->
```shell
# 在 Erlang Shell 中运行
module:function().
# 从命令行运行
erl -noshell -s module function -s init stop
```
### 退出 Erlang Shell
```shell
q().
```
代码结构
---
### 模块定义
```erlang
-module(module_name).
-export([function_name/arity, ...]).
function_name(Args) ->
% Function body.
Result.
```
### 导出函数
```erlang
-export([function1/0, function2/1]).
```
### 注释
```erlang
% 单行注释
% 这是一个注释
```
### 变量
```erlang
VarName = Value. % 变量名必须以大写字母开头
Age = 25.
Name = "Alice".
```
数据类型
---
### 原子
```erlang
atom. % 例子atom, 'Atom with spaces'
```
### 数字
```erlang
123. % 整数
3.14. % 浮点数
```
### 布尔值
```erlang
true.
false.
```
### 字符串
```erlang
"Hello, World!".
```
### 元组
```erlang
{ok, "Success"}.
```
### 列表
```erlang
[1, 2, 3].
[H|T] = [1, 2, 3]. % H = 1, T = [2, 3]
```
### 字典 (Map)
```erlang
#{key1 => value1, key2 => value2}.
```
控制结构
---
### 条件语句
```erlang
if
Condition1 -> Expression1;
Condition2 -> Expression2;
true -> DefaultExpression
end.
```
### case 表达式
```erlang
case Expression of
Pattern1 -> Expression1;
Pattern2 -> Expression2;
_ -> DefaultExpression
end.
```
### 函数定义
```erlang
% 无参函数
my_function() ->
ok.
% 有参函数
add(A, B) ->
A + B.
```
列表操作
---
### 列表生成
```erlang
% 生成 1 到 10 的列表
[ X || X <- lists:seq(1, 10)].
% 生成 1 到 10 中的偶数
[ X || X <- lists:seq(1, 10), X rem 2 == 0].
```
并发
---
### 启动进程
```erlang
spawn(Module, Function, Args).
% 示例
Pid = spawn(fun() -> io:format("Hello from process~n") end).
```
### 发送消息
```erlang
Pid ! Message.
% 示例
Pid ! {hello, self()}.
```
### 接收消息
```erlang
receive
Pattern1 -> Expression1;
Pattern2 -> Expression2;
after Timeout -> TimeoutExpression
end.
```
### 模式匹配
```erlang
{ok, Value} = {ok, 42}.
```
常用内置函数 (BIFs)
---
### 列表操作
```erlang
lists:append(List1, List2).
lists:map(Function, List).
lists:filter(Function, List).
lists:foldl(Function, Acc, List).
```
### 元组操作
```erlang
element(N, Tuple).
setelement(N, Tuple, Value).
tuple_size(Tuple).
```
### 字符串操作
```erlang
string:len(String).
string:concat(String1, String2).
string:tokens(String, Delimiters).
```
### 文件操作
```erlang
file:read_file(Filename).
file:write_file(Filename, Data).
file:delete(Filename).
```
### 列表操作
```erlang
lists:map(fun(X) -> X * 2 end, [1, 2, 3]).
lists:filter(fun(X) -> X rem 2 == 0 end, [1, 2, 3, 4]).
```
### 字符串操作
```erlang
string:len("Hello").
string:upper("hello").
```
### 文件操作
```erlang
{ok, File} = file:open("test.txt", [write]).
file:write(File, "Hello, file!").
file:close(File).
```
### 示例:简单的服务器
```erlang
-module(server).
-export([start/0, loop/0]).
start() ->
spawn(fun loop/0).
loop() ->
receive
{echo, Msg} ->
io:format("Echo: ~p~n", [Msg]),
loop();
stop ->
io:format("Server stopping~n"),
ok;
_ ->
io:format("Unknown message~n"),
loop()
end.
```
并发编程
---
### 创建进程
```erlang
Pid = spawn(Module, Function, Args).
```
### 发送消息
```erlang
Pid ! Message.
```
### 接收消息
```erlang
receive
Pattern1 -> Actions1;
Pattern2 -> Actions2;
...
end.
```
### 链接进程
```erlang
link(Pid).
unlink(Pid).
```
### 监控进程
```erlang
MonitorRef = erlang:monitor(process, Pid).
erlang:demonitor(MonitorRef).
```
错误处理
---
### 捕获异常
```erlang
try Expression of
Pattern -> Result
catch
Class:Reason -> Handler
end.
```
### 常见异常类型
- `throw`
- `error`
- `exit`
### 错误处理
```erlang
try Expression of
Pattern -> Result
catch
Type:Reason -> ErrorHandlingExpression
end.
```
分布式编程
---
### 启动分布式节点
```shell
erl -name nodename@hostname -setcookie Cookie
```
### 连接节点
```erlang
net_adm:ping(Node).
```
### 发送消息到远程节点
```erlang
{remote_process, 'remote_node@host'} ! Message.
```
OTP 框架
---
### 定义 GenServer
```erlang
-module(my_gen_server).
-behaviour(gen_server).
-export([start_link/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
init([]) ->
{ok, #state{}}.
handle_call(Request, From, State) ->
{reply, Reply, State}.
handle_cast(Msg, State) ->
{noreply, State}.
handle_info(Info, State) ->
{noreply, State}.
terminate(Reason, State) ->
ok.
code_change(OldVsn, State, Extra) ->
{ok, State}.
```
### 使用 GenServer
```erlang
gen_server:start_link({local, Name}, Module, Args, Options).
gen_server:call(ServerRef, Request).
gen_server:cast(ServerRef, Msg).
```
测试
---
### 编写 EUnit 测试
```erlang
-module(module_name_tests).
-include_lib("eunit/include/eunit.hrl").
simple_test() ->
?assertEqual(Expected, Actual).
complex_test_() ->
[
{"Test case 1", ?_assertEqual(Expected1, Actual1)},
{"Test case 2", ?_assertEqual(Expected2, Actual2)}
].
```
### 运行 EUnit 测试
```shell
# 在命令行中运行
erl -eval "eunit:test(module_name)" -s init stop
```
另见
---
- [Erlang 官方文档](https://www.erlang.org/docs)
- [Erlang 编程书籍](https://learnyousomeerlang.com/content)

View File

@ -117,6 +117,7 @@ $ ffmpeg -i movie.webm movie.mp4
`-vol` | 以 256 的倍数更改音频音量,其中 256 = 100%(正常)音量。例如 512 = 200%
`-newaudio` | 将新的音频流添加到当前输出流
`-alang code` | 设置当前音频流的 ISO 639 语言代码(3 个字母)
`-ac nTract` | 指定立体声通道数n个声道。例如 nTract = 2 即2个声道
视频编辑
---

View File

@ -8,6 +8,8 @@ Flutter 备忘清单
### macOS 操作系统上安装和配置
> 完整教程请参阅 Flutter 中文社区的 [安装和环境配置](https://docs.flutter.cn/get-started/install)
```bash
$ sudo softwareupdate --install-rosetta --agree-to-license
```
@ -18,15 +20,15 @@ $ sudo softwareupdate --install-rosetta --agree-to-license
#### 获取 Flutter SDK
- 安装包来获取最新的 stable Flutter SDK
- Intel [`flutter_macos_3.3.8-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_3.3.8-stable.zip)
- Apple 芯片 [`flutter_macos_arm64_3.3.8-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.3.8-stable.zip)
- Intel [`flutter_macos_3.22.2-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_3.22.2-stable.zip)
- Apple 芯片 [`flutter_macos_arm64_3.22.2-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.22.2-stable.zip)
想要获取到其他版本的安装包,请参阅 [SDK 版本列表](https://flutter.cn/docs/development/tools/sdk/releases) 页面
想要获取到其他版本的安装包,请参阅 [SDK 版本列表](https://docs.flutter.cn/release/archive) 页面
- 将文件解压到目标路径, 比如:
```bash
$ cd ~/development
$ unzip ~/Downloads/flutter_macos_3.3.8-stable.zip
$ unzip ~/Downloads/flutter_macos_3.22.2-stable.zip
```
<!--rehype:className=wrap-text-->
- 配置 `flutter` 的 PATH 环境变量:
@ -39,10 +41,13 @@ $ sudo softwareupdate --install-rosetta --agree-to-license
<!--rehype:className=style-timeline-->
### Windows 操作系统上安装和配置
<!--rehype:wrap-class=col-span-2-->
> 完整教程请参阅 Flutter 中文社区的 [安装和环境配置](https://docs.flutter.cn/get-started/install)
- 点击下方的安装包,获取 stable 发行通道的 Flutter SDK 最新版本:
- [flutter_windows_3.3.8-stable.zip](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/windows/flutter_windows_3.3.8-stable.zip)
- 要查看其他发行通道和以往的版本,请参阅 [SDK 版本列表](https://flutter.cn/docs/development/tools/sdk/releases) 页面
- [flutter_windows_3.22.2-stable.zip](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/windows/flutter_windows_3.22.2-stable.zip)
- 要查看其他发行通道和以往的版本,请参阅 [SDK 版本列表](https://docs.flutter.cn/release/archive) 页面
- 将压缩包解压,然后把其中的 `flutter` 目录整个放在你想放置 `Flutter SDK` 的路径中(例如 `C:\src\flutter`
- 更新 `path` 环境变量,在开始菜单的搜索功能键入`「env」`,然后选择 `编辑系统环境变量`。在 **`用户变量`** 一栏中,检查是否有 **`Path`** 这个条目:
- 如果存在这个条目,以 `;` 分隔已有的内容,加入 `flutter\bin` 目录的完整路径。
@ -779,7 +784,8 @@ ListView.separated(
```
### GridView
<!--rehype:wrap-class=col-span-2-->
<!--rehype:wrap-class=col-span-2 row-span-2-->
`GridView`可将元素显示为二维网格状的列表组件,并支持主轴方向滚动。
使用GridView() 构造函数需要传入gridDelegate和children。Flutter中已经提供了两种实现方式分别是:
@ -889,9 +895,377 @@ PageView.builder(
),
```
Flutter 动画组件
---
### 1.隐式动画
在动画组件内直接配置curve和duration属性
#### AnimatedContainer
使用AnimatedContainer组件配置curve曲线过渡和duration过渡时间
```dart
class HomeState extends StatefulWidget{
const HomeState({Key? key}) : super(key:key);
@override
State<HomeState> createState()=>_HomeState();
}
class _HomeState extends State<HomeState>{
bool press = false; //设置动画触发的条件
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: (){
setState(() {
press = true; //点击FloatingActionButton进行动画效果
});
}
,child: const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body: Center(
child: AnimatedContainer(
curve: Curves.ease, //曲线
duration: const Duration(seconds: 1), //延时
width: press ? 200 : 300,
height: 200,
color:Colors.yellow,
transform: press ? Matrix4.translationValues(0, 0, 0) :
Matrix4.translationValues(100, 100, 0)
),
)
)
);
}
}
```
#### AnimatedPadding
通过配置padding值的改变引起组件的移动动画效果,同样支持curve和duration的配置
```dart
class _HomeState extends State<HomeState>{
bool press = false;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: (){
setState(() {
press = true;
});
}
,child: const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body: Center(
child: AnimatedPadding(
padding: EdgeInsets.fromLTRB(10, press ? 10 : 400, 0, 0), //配置边距值
curve: Curves.ease, //曲线
duration: const Duration(seconds: 1), //延时
child: Container(
width: 200,
height: 200,
color:Colors.yellow,
),
),
)
)
);
}
}
```
#### AnimatedAlign
通过配置alignment值的改变引起组件的对齐动画效果,同样支持curve和duration的配置
```dart
class _HomeState extends State<HomeState>{
bool press = false;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: (){
setState(() {
press = true;
});
}
,child: const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body: Center(
child: AnimatedAlign(
alignment: press ? Alignment.center : Alignment.topCenter,
curve: Curves.ease, //曲线
duration: const Duration(seconds: 1), //延时
child: Container(
width: 200,
height: 200,
color:Colors.yellow,
),
),
)
)
);
}
}
```
#### AnimatedOpacity
通过配置opacity值的改变引起组件的透明度变化动画效果,同样支持curve和duration的配置
```dart
class _HomeState extends State<HomeState>{
bool press = false;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: (){
setState(() {
press = true;
});
}
,child: const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body: Center(
child: AnimatedOpacity(
opacity: press ? 1 : 0.1,
curve: Curves.ease, //曲线
duration: const Duration(seconds: 1), //延时
child: Container(
width: 200,
height: 200,
color:Colors.yellow,
),
),
)
)
);
}
}
```
#### AnimatedPositioned
通过配置top,left,right,bottom值的改变引起组件的距离变化动画效果,同样支持curve和duration的配置
```dart
class _HomeState extends State<HomeState>{
bool press = false;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: (){
setState(() {
press = true;
});
}
,child: const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body:Stack(
children: [
AnimatedPositioned(
top: press ? 0 : 100,
left:press ? 0 : 100,
curve: Curves.ease, //曲线
duration: const Duration(seconds: 1), //延时
child: Container(
width: 200,
height: 200,
color:Colors.yellow,
),
),
],
)
)
);
}
}
```
### 2.显示动画
<!--rehype:wrap-class=col-span-2-->
使用显示动画时,定义 `AnimationController`,并在组件中使用 `SingleTickerProviderStateMixin`
#### RotationTransition
`RotationTransition` 实现旋转动画,`turns``AnimationController`。在 `initState` 中设置 `vsync``duration`,使用 `..repeat()` 实现动画循环。
```dart
class _Boxed extends State<Boxed> with SingleTickerProviderStateMixin{
late AnimationController _controller;
@override
void initState() {
super.initState();
_controller = AnimationController(
vsync: this,
duration: const Duration(seconds: 1)
)..repeat(); // 让程序和手机的刷新频率统一
}
@override
Widget build(BuildContext context) {
return SizedBox(
height: 100,
width: 100,
child: RotationTransition(turns: _controller,
child: const FlutterLogo(size: 60),
)
);
}
}
```
#### AnimationController
```dart
class _HomeState extends State<HomeState> with SingleTickerProviderStateMixin {
late AnimationController _controller;
@override
void initState() {
super.initState();
// 让程序和手机的刷新频率统一
_controller = AnimationController(vsync: this, duration: const Duration(seconds: 1));
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: () {
_controller.repeat(); //重复播放
},child:const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body: Center(
child: Column(
children: [
RotationTransition(
turns: _controller,
child: const FlutterLogo(size: 60),
),
ElevatedButton(onPressed: (){
_controller.forward(); // 👈 播放一次
}, child:const Icon(Icons.refresh)),
ElevatedButton(onPressed: (){
_controller.reverse(); // 👈 倒序播放
}, child:const Icon(Icons.refresh)),
ElevatedButton(onPressed: (){
_controller.stop(); // 👈 停止
}, child:const Icon(Icons.refresh)),
ElevatedButton(onPressed: (){
_controller.reset(); // 👈 重置
}, child:const Icon(Icons.refresh)),
]
)
)
)
);
}
}
```
#### FadeTransition
`FadeTransition` 实现透明度变化,`opacity``AnimationController`。可以通过 `reverse()` 实现从实体逐渐变透明。
```dart
class _HomeState extends State<HomeState> with SingleTickerProviderStateMixin {
late AnimationController _controller;
@override
void initState() {
super.initState();
//让程序和手机的刷新频率统一
_controller = AnimationController(vsync: this, duration: const Duration(seconds: 1));
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: (){
_controller.repeat(); //重复播放
},child:const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body: Center(
child: FadeTransition(opacity: _controller,
child: const FlutterLogo(size: 60,),
)
)
)
);
}
}
```
也可以通过 lowerBound 和 upperBound 来配置 controller 的最低和最高值
#### ScaleTransition
`ScaleTransition` 实现缩放动画,`scale``AnimationController`,可以通过 `reverse()` 实现从大到小的动画效果。
```dart
class _HomeState extends State<HomeState> with SingleTickerProviderStateMixin {
late AnimationController _controller;
@override
void initState() {
super.initState();
// 让程序和手机的刷新频率统一
_controller = AnimationController(vsync: this, duration: const Duration(seconds: 1));
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton:FloatingActionButton(onPressed: (){
_controller.repeat(); //重复播放
},child:const Icon(Icons.add),) ,
appBar: AppBar(
title: const Text("测试"),
),
body: Center(
child: ScaleTransition(scale: _controller,
child: const FlutterLogo(size: 60,),
)
)
)
);
}
}
```
另见
---
- [Dart 备忘清单](./dart.md) _(jaywcjlove.github.io)_
- [flutter 官网](https://flutter.dev) _(flutter.dev)_
- [flutter 中文社区官网](https://flutter.cn) _(flutter.cn)_
- [flutter 中文开发者社区](https://flutterchina.club/) _(flutterchina.club)_

View File

@ -167,6 +167,12 @@ $ git checkout -b new_branch
$ git branch -d my_branch
```
删除本地存在远程不存在的分支
```shell
$ git remote prune origin
```
将分支 `A` 合并到分支 `B`
```shell
@ -564,6 +570,7 @@ $ git log Branch1 ^Branch2
```
### git 迁移
<!--rehype:wrap-class=col-span-2-->
- 从原地址克隆一份裸版本库
@ -1129,6 +1136,7 @@ Host github.com
<!--rehype:className=wrap-text-->
### Fork仓库同步上游仓库
<!--rehype:wrap-class=col-span-2-->
- 设置上游仓库
@ -1279,6 +1287,55 @@ Conventional Commmits
| `test:` | 添加测试代码或修正已有的测试 |
<!--rehype:className=left-align-->
patch 补丁的使用
----
### 简单创建
```bash
$ git diff commit_id > my.patch
```
### 简单应用
- **检查**补丁
```bash
# 检查下这个补丁能否被正常应用
$ git apply --check path/to/my.patch
```
- **使用**补丁
```
# 检查通过使用该补丁
$ git apply < path/to/my.patch
```
- 若有冲突则**解决**
```
# 检查不通过可以自动合入patch不冲突的代码同时保留冲突部分
$ git apply --reject path/to/my.patch
```
<!--rehype:className=style-timeline-->
### Email patch 方式
```bash
# 创建指定 commit sha1 id 之前的 n 次提交补丁
$ git format-patch commit_id -n
# 创建 300f59991f22826c8478f0c019387c4ca815b085 这个提交的patch
$ git format-patch commit_id -1
# 提取当前分支最上面的3次提交生成补丁
$ git format-patch -3
# 发送者可使用 git-send-email 发送 git format-patch 的结果给接收者
# 接收者保存邮件到文件 email.txt然后应用补丁创建一个提交会自动包含作者的信息
$ git am < email.txt
```
另见
---

View File

@ -574,6 +574,7 @@ jobs:
```yml
- run: npm publish --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
```
@ -857,7 +858,7 @@ steps:
<!--rehype:className=style-list-->
### 在 Github 中创建 Docker 镜像
<!--rehype:wrap-class=row-span-3-->
<!--rehype:wrap-class=row-span-2 col-span-2-->
```yml
- name: Set up Docker Buildx
@ -887,8 +888,19 @@ steps:
tags: ghcr.io/jaywcjlove/reference:${{steps.changelog.outputs.version}}
```
### 生成贡献者头像列表
```yml
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
id: contributors
with:
output: dist/CONTRIBUTORS.svg
avatarSize: 42
```
### 在 Docker Hub 中创建 Docker 镜像
<!--rehype:wrap-class=row-span-3-->
<!--rehype:wrap-class=row-span-3 col-span-2-->
```yml
- name: Set up Docker Buildx
@ -926,28 +938,68 @@ steps:
node-version: 16
```
### 生成贡献者头像列表
```yml
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
id: contributors
with:
output: dist/CONTRIBUTORS.svg
avatarSize: 42
```
### 忽略失败
```yml
- run: npm publish
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
```
当 `npm` 推送包失败不影响整个流程,可用于自动发包
### 安装 yarn
```yml
- name: Setup Yarn
uses: threeal/setup-yarn-action@v2.0.0
with:
cache: false
version: 1.22.21
```
### 传递环境变量
<!--rehype:wrap-class=col-span-2-->
在 `ci.yml` 上保存环境变量
```yml
- name: Save commit message to environment variable
run: echo "COMMIT_MESSAGE=${{ github.event.head_commit.message }}" >> $GITHUB_ENV
```
在 `tag.yml` 上获取环境变量
```yml
- name: Read commit message
run: |
echo "Commit: ${{ github.event.workflow_run.head_commit.message }}"
```
### 触发下一个工作流
在 `tag.yml` 上添加判断 `tag` 创建成功触发 `tag-creation-success` 的工作流
```yml
- name: Trigger next workflow if successful
if: steps.check_success.outputs.success == 'true'
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d '{"event_type": "tag-creation-success"}' \
https://api.github.com/repos/${{ github.repository }}/dispatches
```
在 `success.yml` 上监听
```yml
on:
repository_dispatch:
types: [tag-creation-success]
```
GitLab CI/CD 迁移到 GitHub Actions
---

255
docs/github-cli.md Normal file
View File

@ -0,0 +1,255 @@
Github CLI
===
GitHub CLI 的快速参考,这是一个开源命令行工具,可在终端上启用 GitHub 功能。
入门
---
### 安装
<!--rehype:wrap-class=col-span-2-->
#### Windows
<!--rehype:style=text-align: left;-->
| 工具 | 安装 | 升级 |
| :----- | :--------------------------- | :--------------------------- |
| WinGet | `winget install --id Github.cli` | `winget upgrade --id GitHub.cli` |
| Scoop | `scoop install gh` | `scoop update gh` |
| Choco | `choco install gh` | `choco upgrade gh` |
<!--rehype:className=show-header left-align-->
#### Mac OS
<!--rehype:style=text-align: left;-->
| 工具 | 安装 | 升级 |
| :------- | :-------------------- | :------------------------------------------ |
| Brew | `brew install gh` | `brew upgrade gh` |
| MacPorts | `sudo port install gh`| `sudo port selfupdate && sudo port upgrade gh` |
<!--rehype:className=show-header left-align-->
#### Linux
<!--rehype:style=text-align: left;-->
请参见 [安装说明](https://github.com/cli/cli/blob/trunk/docs/install_linux.md) 以获取其他 Linux 发行版的信息。安装脚本:
```bash
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
```
### 基本用法
#### 帮助和文档
<!--rehype:style=text-align: left;-->
显示命令选项:
| 命令 | 描述 |
| :-------------------- | :------------------------------------------------------------------------------------------------------------- |
| `gh help [command]` | 帮助提供应用程序中任何命令的帮助。只需键入 `gh help [命令路径]` 以获取完整详细信息。 |
<!--rehype:className=style-list-arrow-->
#### 认证
<!--rehype:style=text-align: left;-->
| 命令 | 描述 |
| :-------------------- | :-------------------------------------------------------- |
| `gh auth login` | 默认通过基于网页的浏览器进行身份验证 |
| `gh auth logout` | 移除主机的身份验证配置 |
| `gh auth refresh` | 扩展或修复存储凭据的权限范围 |
| `gh auth setup-git` | 配置 Git 使用 GitHub CLI 作为凭据助手 |
| `gh auth status` | 验证并显示有关您身份验证状态的信息 |
| `gh auth token` | 打印 `gh` 配置使用的身份验证令牌 |
<!--rehype:className=style-list-arrow-->
使用 GitHub 令牌:
```shell
$ gh auth --with-token < token.txt
```
### 仓库管理
<!--rehype:wrap-class=col-span-2-->
#### 常规
<!--rehype:style=text-align: left;-->
| 命令 | 描述 |
| :------------------------ | :------------------------------------------ |
| `gh repo create` | 创建一个新的 GitHub 仓库 |
| `gh repo list [target]` | 列出某个用户或组织拥有的仓库 |
<!--rehype:className=code-nowrap left-align-->
#### 目标
<!--rehype:style=text-align: left;-->
| 命令 | 描述 |
| :--------------------------- | :-------------------------------------------------------- |
| `gh repo archive [repo]` | 存档一个 GitHub 仓库 |
| `gh repo clone [dir]` | 在本地克隆一个 GitHub 仓库 |
| `gh repo delete [repo]` | 删除一个 GitHub 仓库 |
| `gh repo deploy-key` | 管理仓库中的部署密钥 |
| `gh repo edit [repo]` | 编辑仓库设置 |
| `gh repo fork [repo]` | 创建一个仓库的分叉 |
| `gh repo rename [name]` | 重命名一个 GitHub 仓库 |
| `gh repo set-default [repo]` | 设置默认的远程仓库 |
| `gh repo sync [dest-repo]` | 从源仓库同步到目标仓库 |
| `gh repo view [repo]` | 显示一个 GitHub 仓库的描述和 README |
<!--rehype:className=code-nowrap left-align-->
### 问题
#### 搜索问题
<!--rehype:style=text-align: left;-->
| 命令 | 描述 |
| :------------------------- | :------------------------------- |
| `gh search issues [query]` | 在 GitHub 上搜索问题 |
#### 示例
<!--rehype:style=text-align: left;-->
搜索匹配关键词 "readme" 和 "typo" 的问题
```shell
$ gh search issues readme typo
```
搜索匹配短语 "broken feature" 的问题
```shell
$ gh search issues "broken feature"
```
搜索 cli 组织中的问题和拉取请求
```shell
$ gh search issues --include-prs --owner=cli
```
搜索分配给自己的开放问题
```shell
$ gh search issues --assignee=@me --state=open
```
搜索评论数超过 100 的问题
```shell
$ gh search issues --comments=">100"
```
搜索没有标签 "bug" 的问题
```shell
$ gh search issues -- -label:bug
```
### 拉取请求
**拉取请求操作**
| 命令 | 描述 |
| :---------------- | :----------------------------------------- |
| `gh pr create` | 在 GitHub 上创建拉取请求 |
| `gh pr list` | 列出 GitHub 仓库中的拉取请求 |
| `gh pr status` | 显示相关拉取请求的状态 |
**示例**
```shell
$ gh pr status
```
示例输出:
```
Current branch
#12 Remove the test feature [user:patch-2]
- All checks failing - Review required
Created by you
You have no open pull requests
Requesting a code review from you
#13 Fix tests [branch]
- 3/4 checks failing - Review required
#15 New feature [branch]
- Checks passing - Approved
```
### GitHub Actions
<!--rehype:wrap-class=col-span-2-->
**常规操作**
| 命令 | 描述 |
| :----------------------- | :--------------------------------------------------------------------------- |
| `gh workflow disable` | 禁用工作流,防止其运行或在列出工作流时显示 |
| `gh workflow enable` | 启用工作流,允许其运行并在列出工作流时显示 |
| `gh workflow list` | 列出工作流文件,默认隐藏禁用的工作流 |
| `gh workflow run` | 为给定的工作流创建一个 `workflow_dispatch` 事件 |
| `gh workflow view` | 查看工作流的摘要 |
**运行操作**
| 命令 | 描述 |
| :----------------------- | :----------------------------------------------------------- |
| `gh run cancel` | 取消一个工作流运行 |
| `gh run delete` | 删除一个工作流运行 |
| `gh run download` | 下载由 GitHub Actions 工作流运行生成的工件 |
| `gh run list` | 列出最近的工作流运行 |
| `gh run rerun` | 重新运行整个运行、仅失败的作业或运行中的特定作业 |
| `gh run view` | 查看工作流运行的摘要 |
| `gh run watch` | 观看一个运行直到其完成,显示其进度 |
### 别名
**常规别名设置**
| 命令 | 描述 |
| :----------------------- | :--------------------------------------------------------- |
| `gh alias delete` | 删除设置的别名 |
| `gh alias import` | 从 YAML 文件的内容中导入别名 |
| `gh alias list` | 打印出所有已配置的别名 |
| `gh alias set` | 定义一个单词,当调用时会展开为完整的 `gh` 命令 |
<!--rehype:className=style-list-->
### 发布
**常规操作**
| 命令 | 描述 |
| :----------------------- | :----------------------------------------- |
| `gh release create` | 为一个仓库创建新的 GitHub 发布 |
| `gh release list` | 列出一个仓库中的发布 |
<!--rehype:className=code-nowrap-->
**目标命令**
| 命令 | 描述 |
| :------------------------ | :-------------------------------------- |
| `gh release delete` | 删除一个发布 |
| `gh release delete-asset` | 从一个发布中删除一个资产 |
| `gh release download` | 从 GitHub 发布中下载资产 |
| `gh release edit` | 编辑一个发布 |
| `gh release upload` | 上传资产文件到一个 GitHub 发布 |
| `gh release view` | 查看有关一个 GitHub 发布的信息 |
<!--rehype:className=code-nowrap-->
### 配置
**目标设置**
| 命令 | 描述 |
| :------------------------ | :--------------------------------------------- |
| `gh config clear-cache` | 清除 CLI 缓存 |
| `gh config get` | 打印给定配置键的值 |
| `gh config list` | 打印配置键及其值的列表 |
| `gh config set` | 用给定键的值更新配置 |
<!--rehype:className=style-list-->

View File

@ -3,12 +3,12 @@ Github Copilot 备忘清单
这是开始使用 [Github Copilot](https://code.visualstudio.com/docs/editor/github-copilot) 的快速参考指南
一、准备工作
入门
----
### 1、账号注册
> 需要先拥有一个Github账号并订阅Copilot。
需要先拥有一个Github账号并订阅Copilot。
事项 | 说明
:-|-
@ -18,7 +18,7 @@ Github 账号 | [注册地址](https://github.com/signup)
### 2、安装Vscode插件
<!--rehype:wrap-class=col-span-1 row-span-1-->
> 在扩展商店中搜索安装下面插件
在扩展商店中搜索安装下面插件
插件名称 | 功能
:-|-
@ -44,22 +44,23 @@ Copilot Enterprise| 39美元/人/月 | Business 特性 + 私有代码库的个
<!--rehype:wrap-class=col-span-1 row-span-1-->
|名称 | 描述 |
|-|-|
Inline Suggestions| 在编辑器中紧邻光标所在位置显示建议
Completions Panel| 在编辑器中展示完整的建议列表
Inline Chat| 在编辑器中紧邻光标所在位置发起对话
Editor Chat| 在编辑器中打开完整的对话界面
Silde Chat| 在编辑器的侧边栏打开对话界面
Quick Chat| 在顶部唤起对话界面
`Inline Suggestions` | 在编辑器中紧邻光标所在位置显示建议
`Completions Panel` | 在编辑器中展示完整的建议列表
`Inline Chat` | 在编辑器中紧邻光标所在位置发起对话
`Editor Chat` | 在编辑器中打开完整的对话界面
`Silde Chat` | 在编辑器的侧边栏打开对话界面
`Quick Chat` | 在顶部唤起对话界面
<!--rehype:className=left-align-->
二、提示技巧
提示技巧
----
### 提示之禅
<!--rehype:wrap-class=col-span-1 row-span-1-->
> 与 `copilot` 之间的关系,就作家插画师的关系。
> 你只有尽可能全面、干练、清晰描述你的故事(即 `上下文`)。
> `copilot` 才能根据你的故事画出精美的插画 (即 `代码` )。
- 你的关系`copilot` 的关系,就作家插画师的关系。
- 为了让 `copilot` 能够绘制出精美的插画(即代码),你需要尽可能全面、干练、清晰描述你的故事(即上下文)。
<!--rehype:className=style-round-->
### 提示技巧
<!--rehype:wrap-class=col-span-1 row-span-1-->
@ -69,9 +70,9 @@ Quick Chat| 在顶部唤起对话界面
### 实战教程
- [Youtube GitHub Copilot Series](https://www.youtube.com/playlist?list=PLj6YeMhvp2S5_hvBl2SE-7YCHYlLQ0bPt)
- [Pragmatic techniques to get the most out of GitHub Copilot](https://www.youtube.com/watch?v=CwAzIpc4AnA)
- [How I used GitHub Copilot to build a browser extension](https://github.blog/2023-05-12-how-i-used-github-copilot-to-build-a-browser-extension/)
- [Youtube GitHub Copilot 系列](https://www.youtube.com/playlist?list=PLj6YeMhvp2S5_hvBl2SE-7YCHYlLQ0bPt)
- [实用技巧:充分利用 GitHub Copilot](https://www.youtube.com/watch?v=CwAzIpc4AnA)
- [我如何使用 GitHub Copilot 构建浏览器扩展](https://github.blog/2023-05-12-how-i-used-github-copilot-to-build-a-browser-extension/)
### 上下文信息的种类
<!--rehype:wrap-class=col-span-2 row-span-1-->
@ -86,13 +87,13 @@ Quick Chat| 在顶部唤起对话界面
### 上下文:文件
> Copilot会查看编辑器中当前和紧邻打开的文件以分析上下文并提供适当的建议。
Copilot会查看编辑器中当前和紧邻打开的文件以分析上下文并提供适当的建议。
---
> - 1、避免打开过多的文件以便Copilot能够更好地理解你的代码。
> - 2、打开的文件尽量相关且有共性。
> - 3、如果是新项目可以打开一些模版代码、数据文件以及参考文档等相关示例文件。以便Copilot能够更好地理解你的期望。等已经开发了一些代码后这些示例文件就可以删除了。
- 1、避免打开过多的文件以便Copilot能够更好地理解你的代码。
- 2、打开的文件尽量相关且有共性。
- 3、如果是新项目可以打开一些模版代码、数据文件以及参考文档等相关示例文件。以便Copilot能够更好地理解你的期望。等已经开发了一些代码后这些示例文件就可以删除了。
### 上下文: 注释: 顶部注释
@ -275,7 +276,7 @@ dailogs = [
...
```
三、快捷键
快捷键
----
<!--rehype:body-class=cols-2-->
@ -287,6 +288,7 @@ dailogs = [
<!--rehype:wrap-class=col-span-2 row-span-1-->
#### Copilot 中 Inline Suggestions 相关命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -300,6 +302,7 @@ dailogs = [
<!--rehype:className=show-header wrap-text left-align-->
#### Copilot 中 Completions Panel 相关命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -310,6 +313,7 @@ dailogs = [
<!--rehype:className=show-header wrap-text left-align-->
#### Copilot 中 其他命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -324,6 +328,7 @@ dailogs = [
<!--rehype:wrap-class=col-span-2 row-span-1-->
#### Copilot Chat 中 Chat 相关命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -334,6 +339,7 @@ dailogs = [
<!--rehype:className=show-header wrap-text left-align-->
#### Copilot Chat 中 Inline Chat 相关命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -345,6 +351,7 @@ dailogs = [
<!--rehype:className=show-header wrap-text left-align-->
#### Copilot Chat 中 Quick Chat 相关命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -353,6 +360,7 @@ dailogs = [
<!--rehype:className=show-header wrap-text left-align-->
#### Copilot Chat 中 Editor Chat 相关命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -360,6 +368,7 @@ dailogs = [
<!--rehype:className=show-header wrap-text left-align-->
#### Copilot Chat 其他命令
<!--rehype:style=text-align: left;-->
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|-|:-|:-|:-|
@ -368,10 +377,10 @@ dailogs = [
`github.copilot.ghpr.applySuggestion`|为Github Pull Request提供代码建议|-|-
<!--rehype:className=show-header wrap-text left-align-->
四、Copilot Chat 的 Slash Commands 使用技巧
Copilot Chat 的 Slash Commands 使用技巧
----
> 在聊天对话框中可以通过`/`开头的命令来与Copilot Chat进行交互。
在聊天对话框中可以通过`/`开头的命令来与Copilot Chat进行交互。
### Slash Commands 示例
<!--rehype:wrap-class=col-span-1 row-span-1-->
@ -393,9 +402,9 @@ dailogs = [
@vscode /api 请解释 inlineChat.start 的作用
@workspace /explain def helloworld():...
```
在每一行代码末尾添加注释进行解释
```
#### Agent
@ -420,7 +429,7 @@ dailogs = [
---
> 通过命令 `github.copilot.interactiveEditor.generate` 触发
通过命令 "github.copilot.interactiveEditor.generate" 触发
|命令 |说明 |
|- |:-|
@ -430,32 +439,34 @@ dailogs = [
> 当然也可以直接选中区域然后在inline chat中输入指令执行 copilot会对选中区域进行指令操作
|常用指令|
| - |
|在每一行代码末尾添加注释进行解释|
|使代码满足PEP484要求|
<!--rehype:className=show-header wrap-text left-align-->
#### 常用指令
- 在每一行代码末尾添加注释进行解释
- 使代码满足PEP484要求
<!--rehype:className=style-round-->
### Silde Chat 的 Slash Commands
<!--rehype:wrap-class=col-span-1 row-span-2-->
> 通过命令 `workbench.action.chat.openInSidebar` 触发 `chat` 后使用
> 或点击侧边栏上的Copilot聊天按钮
> 在Chat输入框中还允许指定Agent(即环境)
- 通过命令 `workbench.action.chat.openInSidebar` 触发 `chat` 后使用
- 或点击侧边栏上的Copilot聊天按钮
- 在Chat输入框中还允许指定Agent(即环境)
<!--rehype:className=style-round-->
#### Slash Commands
|命令 |说明 |
|- |:-|
/api |回答vscode扩展插件开发的问题
/explain |对选中的代码进行解释
/fix |修复此选中的代码
/new |创建新项目workspace
/newNotebook |创建新的Jupyter Notebook
/terminal |解释命令行里的命令
/tests |为选中的代码生成单元测试
/help |帮助说明
/clear |清除会话
`/api` |回答vscode扩展插件开发的问题
`/explain` |对选中的代码进行解释
`/fix` |修复此选中的代码
`/new` |创建新项目workspace
`/newNotebook` |创建新的Jupyter Notebook
`/terminal` |解释命令行里的命令
`/tests` |为选中的代码生成单元测试
`/help` |帮助说明
`/clear` |清除会话
<!--rehype:className=left-align-->
### `/terminal`特有的变量, 以`#`号开头
@ -471,13 +482,12 @@ dailogs = [
- Quick Chat 与 Chat 的 Slash Commands相同
- Editor Chat 与 Chat 的 Slash Commands相同
<!--rehype:className=style-round-->
五、参数设置
参数设置
----
打开vscode 命令面板, 输入`Preferences:Open Settings` 打开配置文件在文件模式下配置相关参数.
完整参数说明可以查看 `copilot``copilot chat` 两个[插件目录](https://code.visualstudio.com/docs/editor/extension-marketplace#_where-are-extensions-installed)下的 `package.json` 文件获知。
打开 VSCode 命令面板输入 `Preferences: Open Settings` 打开配置文件在文件模式下,您可以配置相关参数。要获取完整的参数说明,请查看 `copilot``copilot chat` 两个插件目录下的 `package.json` 文件,具体位置可以参考 [VSCode 扩展市场](https://code.visualstudio.com/docs/editor/extension-marketplace#_where-are-extensions-installed)。
### 完整配置参考
@ -532,49 +542,59 @@ dailogs = [
### 参数说明
<!--rehype:wrap-class=col-span-2 row-span-1-->
#### 代理参数
<!--rehype:style=text-align: left;-->
|设置参数 |值类型|说明 |
|:--|:--|:--|
`"http.proxy"`| string |配置网络代理地址
<!--rehype:className=left-align-->
#### Copilot Chat 参数
<!--rehype:style=text-align: left;-->
|设置参数 |值类型|说明 |
|:--|:--|:--|
`"github.copilot.chat.localeOverride"`| string | 设置Copilot本地语言
`"github.copilot.chat.welcomeMessage"`| string |Copilot Chat 是否显示欢迎语<br>`first`: 仅第一次启动时, `always`: 总是, `never`: 从不
<!--rehype:className=left-align-->
#### Copilot 基本参数
<!--rehype:style=text-align: left;-->
|设置参数 |值类型|说明 |
|:--|:--|:--|
`"editor.inlineSuggest.enabled"`| boolean |启用内联建议
`"github.copilot.editor.iterativeFixing"`| boolean| 允许 Copilot 提供迭代修复建议
`"github.copilot.editor.enableAutoCompletions"`| boolean |允许 Copilot 提供自动补全
`"github.copilot.editor.enableCodeActions"`| boolean|允许 Copilot 代码操作建议,这些操作可能包括重构代码、优化代码结构、修复错误等
| `"editor.inlineSuggest.enabled"` | boolean | 启用内联建议 |
| `"github.copilot.editor.iterativeFixing"` | boolean | 允许 Copilot 提供迭代修复建议 |
| `"github.copilot.editor.enableAutoCompletions"` | boolean | 允许 Copilot 提供自动补全 |
| `"github.copilot.editor.enableCodeActions"` | boolean | 允许 Copilot 提供代码操作建议包括重构优化代码结构、修复错误等 |
<!--rehype:className=left-align-->
#### 设置 Copilot 生效的文件类型
<!--rehype:style=text-align: left;-->
|设置参数 |值类型|说明 |
|:--|:--|:--|
`"github.copilot.enable"`| json |请将 `"*": true` 放到末尾 <br>[语言](https://code.visualstudio.com/docs/languages/identifiers)后设置 `false` 表示禁用copilot, 设置 `true` 表示启用
<!--rehype:className=left-align-->
#### Copilot 高级参数
<!--rehype:style=text-align: left;-->
> github.copilot.advanced 可以控制模型参数,最终影响到代码生成. 其值为json
`github.copilot.advanced` 可以控制模型参数,最终影响到代码生成其值为json
|设置参数 |值类型|说明 |
|:--|:--|:--|
`"length"`| integer | 生成代码字数, 默认为 `500`
`"top_p"`| number | 控制模型候选范围,默认值为 `1`范围为`0.0~1.0`
`"temperature"`| string | 控制模型创造性,默认值为 `""`,值越大越不可预测,范围为`0.0~1.0`
`"inlineSuggestCount"`| integer | 内联提示的个数, 默认为`3`
`"listCount"`| integer | 控制`Completions Panel`中建议个数,默认为 `10`
`"stops"`| json | 控制模型代码生成时停止标志,可按[语言](https://code.visualstudio.com/docs/languages/identifiers)控制
`"indentationMode"`| json | 指定[语言](https://code.visualstudio.com/docs/languages/identifiers)是否用该语言的缩模式,由此可能会与stops冲突,比如采用`\{\}`缩近时,设置该参数时需要综合考虑
`"debug.showScores"`| boolean | 在代码建议列表中显示每个建议的分数
<!--rehype:className=wrap-text -->
| 设置参数 | 值类型 | 说明 |
|----------|----------|----------|
| `"length"` | 整数 integer | 生成代码字数默认为 `500` |
| `"top_p"` | 数字 number | 控制模型候选范围,默认值为 `1`,范围为 `0.0~1.0` |
| `"temperature"` | 字符串 string | 控制模型创造性,默认值为,值越大越不可预测,范围为 `0.0~1.0` |
| `"inlineSuggestCount"` | 整数 integer | 内联提示的个数默认为 `3` |
| `"listCount"` | 整数 integer | `Completions Panel` 中建议个数,默认为 `10` |
| `"stops"` | JSON | 控制模型代码生成时停止标志,可按[语言](https://code.visualstudio.com/docs/languages/identifiers)控制 |
| `"indentationMode"` | JSON | 指定[语言](https://code.visualstudio.com/docs/languages/identifiers)是否使用该语言的缩模式,可能与 stops 冲突 |
| `"debug.showScores"` | 布尔值 boolean | 在代码建议列表中显示每个建议的分数 |
<!--rehype:className=left-align-->
END... ENJOY YOURSELF
----

814
docs/glances.md Normal file
View File

@ -0,0 +1,814 @@
Glances 备忘清单
===
这是开始使用 [Glances](https://glances.readthedocs.io/en/latest/) 系统监控工具的快速参考备忘单,可以帮助用户监视系统的各种性能指标
入门
----
### 功能特点
<!--rehype:wrap-class=row-span-2-->
#### 跨平台支持
- `Glances` 支持多种操作系统,包括 Linux、Windows、macOS 和 FreeBSD。
#### 多种输出方式
- `命令行界面CLI`:通过终端查看系统监控数据。
- `Web 界面`:通过浏览器访问并查看系统性能指标。
- `API 输出`:可以将数据通过 REST API 或者 MQTT 传输到其他系统或服务。
#### 详细的系统监控
- `CPU`:实时显示 CPU 的使用率、每个核心的负载情况。
- `内存`:显示总内存、已用内存、缓存和交换分区的使用情况。
- `磁盘 I/O`:显示磁盘的读写速度和 I/O 操作数。
- `网络带宽`:显示网络接口的上传和下载速度。
- `文件系统`:显示各个挂载点的使用情况。
- `传感器`:显示系统温度、风扇速度等传感器数据(需要支持的硬件和驱动)。
#### 扩展功能
- `插件系统`:支持通过插件扩展功能,可以自定义监控指标。
- `导出数据`:支持将监控数据导出为 CSV、JSON 等格式。
- `报警系统`:可以设置报警,当某些指标超过设定阈值时触发通知。
### 安装
#### **通过 pip 安装**
```sh
pip install glances
```
#### **通过包管理器安装**
**Debian/Ubuntu**:
```sh
sudo apt-get install glances
```
**Fedora**:
```sh
sudo dnf install glances
```
**macOS (使用 Homebrew)**:
```sh
brew install glances
```
### 配置文件
Glances 的配置文件位于 `~/.config/glances/glances.conf`。通过编辑这个文件,可以自定义 Glances 的显示和行为。
#### 例子配置文件
```ini
[global]
refresh=2 # 设置刷新间隔(以秒为单位)
[cpu]
enable=true # 显示 CPU 负载平均值
[mem]
enable=true # 显示内存使用情况
[disk]
enable=true # 显示磁盘 I/O 信息
[network]
enable=true # 显示网络带宽使用情况
```
### Web 访问
```sh
# 使用 Glances 的 API
glances -w
# 访问 API
curl http://<your_ip>:61208/api/3/all
```
**使用 Docker 部署 Glances**
```sh
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /glances/conf:/glances/conf:ro \
-v /glances/data:/glances/data:rw \
-p 61208-61209:61208-61209 \
--name glances nicolargo/glances
```
### 使用方法
#### **启动命令行界面**
```sh
glances
```
#### **启动 Web 界面**
```sh
glances -w
```
启动后,通过浏览器访问 `http://<your_ip>:61208` 查看系统监控数据。
#### **启动以特定模式输出**
```sh
glances --export json # JSON 输出
glances --export csv # CSV 输出
```
命令行选项
---
### 命令行选项
:- | :-
:- | :-
`-h`, `--help` | 显示此帮助信息并退出
`-V`, `--version` | 显示程序版本号并退出
`-d`, `--debug` | 启用调试模式
`-C CONF_FILE`, `--config CONF_FILE` | 配置文件的路径
`--modules-list` | 显示模块(插件和导出)列表并退出
`--stdout PLUGINS_STATS` | 显示插件统计信息到标准输出(用逗号分隔的插件/插件属性列表)
<!--rehype:className=style-list-->
### 禁用启用选项
<!--rehype:wrap-class=row-span-2-->
:- | :-
:- | :-
`--disable-plugin PLUGIN` | 禁用插件(用逗号分隔的列表)
`--enable-plugin PLUGIN` | 启用插件(用逗号分隔的列表)
`--disable-process` | 禁用进程模块减少Glances的CPU消耗
`--disable-webui` | 禁用Web界面仅响应RESTful API
`--enable-history` | 启用历史模式
`--disable-bold` | 禁用终端中的粗体模式
`--disable-bg` | 禁用终端中的背景颜色
`--enable-process-extended` | 启用顶级进程的扩展统计
`--disable-check-update` | 禁用在线Glances版本检查
`--disable-autodiscover` | 禁用自动发现功能
`--light`, `--enable-light` | Curses UI的轻量模式仅启用顶部菜单
`-q`, `--quiet` | 不显示 curses 界面
<!--rehype:className=style-list-->
### SNMP
:- | :-
:- | :-
`--snmp-community SNMP_COMMUNITY` | SNMP社区
`--snmp-port SNMP_PORT` | SNMP端口
`--snmp-version SNMP_VERSION` | SNMP版本1, 2c 或 3
`--snmp-user SNMP_USER` | SNMP用户名仅适用于SNMPv3
`--snmp-auth SNMP_AUTH` | SNMP认证密钥仅适用于SNMPv3
`--snmp-force` | 强制SNMP模式
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`--export EXPORT`| 启用导出模块(用逗号分隔的列表)
`--export-csv-file EXPORT_CSV_FILE` | CSV导出文件路径
`--export-json-file EXPORT_JSON_FILE`| JSON导出文件路径
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-0`, `--disable-irix` | 任务的CPU使用率将按CPU总数进行划分
`-1`, `--percpu` | 以每个CPU模式启动Glances
`-2`, `--disable-left-sidebar` | 禁用网络、磁盘I/O、文件系统和传感器模块
`-3`, `--disable-quicklook` | 禁用快速查看模块
`-4`, `--full-quicklook` | 仅启用快速查看和负载模块
`-5`, `--disable-top` | 禁用顶部菜单快速查看、CPU、内存、交换区和负载
`-6`, `--meangpu` | 以平均GPU模式启动Glances
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-c CLIENT`, `--client CLIENT` | 通过IPv4/IPv6地址、主机名或主机名:端口连接到Glances服务器
`-s`, `--server` | 以服务器模式运行Glances
`--browser` | 启动客户端浏览器(服务器列表)
`-p PORT`, `--port PORT` | 定义客户端/服务器TCP端口 \[默认61209]
`-B BIND_ADDRESS`, `--bind BIND_ADDRESS` | 将服务器绑定到给定的IPv4/IPv6地址或主机名
`--username` | 定义客户端/服务器用户名
`--password` | 定义客户端/服务器密码
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-t TIME`, `--time TIME` | 设置刷新时间(秒)\[默认3秒]
`-w`, `--webserver` | 以Web服务器模式运行Glances需要bottle库
`--cached-time CACHED_TIME` | 设置服务器缓存时间 \[默认1秒]
`--open-web-browser` | 尝试在默认的 Web 浏览器中打开Web界面
`-f PROCESS_FILTER`, `--process-filter PROCESS_FILTER` | 设置进程过滤模式(正则表达式)
`--process-short-name` | 强制使用进程名称的短名称
`--hide-kernel-threads` | 在进程列表中隐藏内核线程Windows不可用
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-b`, `--byte` | 以每秒字节数显示网络速率
`--diskio-show-ramfs` | 在 DiskIO 插件中显示RAM文件系统
`--diskio-iops` | 在 DiskIO 插件中显示每秒I/O操作数
`--fahrenheit` | 以华氏度显示温度(默认是摄氏度)
`--fs-free-space` | 显示文件系统的可用空间而非已用空间
`--theme-white` | 优化显示颜色以适应白色背景
<!--rehype:className=style-list-->
键盘快捷键
---
### 快捷键
| 快捷键 | 功能 |
|--------|-----------------------------|
| `ENTER` | 设置进程过滤器 |
| `a` | 自动排序进程列表 |
| `A` | 启用/禁用应用程序监控进程 |
| `b` | 在网络I/O中切换比特/秒或字节/秒 |
| `B` | 查看每秒磁盘I/O计数器 |
| `c` | 按CPU使用率排序进程 |
| `C` | 启用/禁用云统计 |
| `d` | 显示/隐藏磁盘I/O统计 |
| `D` | 启用/禁用Docker统计 |
| `e` | 启用/禁用顶级扩展统计 |
| `E` | 清除当前进程过滤器 |
| `f` | 显示/隐藏文件系统和文件夹监控统计 |
| `F` | 在文件系统使用和可用空间之间切换 |
| `g` | 为当前历史生成图表 |
| `G` | 启用/禁用GPU统计 |
| `h` | 显示/隐藏帮助屏幕 |
| `i` | 按I/O速率排序进程 |
| `I` | 显示/隐藏IP模块 |
| `+` | 增加选定进程的nice值/降低优先级(需要权限)- 仅在独立模式下 |
| `-` | 减少选定进程的nice值/提高优先级(需要权限)- 仅在独立模式下 |
| `k` | 终止选定进程(需要权限)- 仅在独立模式下 |
<!--rehype:className=shortcuts left-align-->
### 快捷键
| 快捷键 | 功能 |
|--------|-----------------------------|
| `K` | 显示/隐藏TCP连接 |
| `l` | 显示/隐藏日志消息 |
| `m` | 按内存使用率排序进程 |
| `M` | 重置进程摘要的最小/最大值 |
| `n` | 显示/隐藏网络统计 |
| `N` | 显示/隐藏当前时间 |
| `p` | 按名称排序进程 |
| `P` | 启用/禁用端口统计 |
| `q\|ESC\|CTRL-C` | 退出当前Glances会话 |
| `Q` | 显示/隐藏IRQ模块 |
| `r` | 重置历史记录 |
| `R` | 显示/隐藏RAID插件 |
| `s` | 显示/隐藏传感器统计 |
| `S` | 启用/禁用微小曲线图 |
| `t` | 按CPU时间排序进程TIME+ |
| `T` | 以组合方式查看网络I/O |
| `u` | 按用户排序进程 |
| `U` | 查看累积网络I/O |
| `w` | 删除已完成的警告日志消息 |
| `W` | 显示/隐藏Wifi模块 |
| `x` | 删除已完成的警告和严重日志消息 |
| `z` | 显示/隐藏进程统计 |
<!--rehype:className=shortcuts left-align-->
### 快捷键
| 快捷键 | 功能 |
|--------|-----------------------------|
| `0` | 启用/禁用Irix/Solaris模式。任务的CPU使用率将按CPU总数进行划分 |
| `1` | 在全局CPU和每个CPU统计之间切换 |
| `2` | 启用/禁用左侧边栏 |
| `3` | 启用/禁用快速查看模块 |
| `4` | 启用/禁用除快速查看和负载模块外的所有模块 |
| `5` | 启用/禁用顶部菜单快速查看、CPU、内存、交换区和负载 |
| `6` | 启用/禁用平均GPU模式 |
| `9` | 在黑白主题之间切换UI主题 |
| `/` | 在进程命令行或命令名称之间切换 |
| `F5` | 刷新curses用户界面的统计数据 |
| `LEFT` | 向左导航进程排序 |
| `RIGHT` | 向右导航进程排序 |
| `UP` | 在进程列表中向上 |
| `DOWN` | 在进程列表中向下。在Glances客户端浏览器中通过`--browser`命令行参数访问): |
| `ENTER` | 运行选定的服务器 |
| `UP` | 在服务器列表中向上 |
| `DOWN` | 在服务器列表中向下 |
| `q\|ESC` | 退出Glances |
<!--rehype:className=shortcuts left-align-->
配置
---
### 位置
<!--rehype:wrap-class=col-span-2-->
您可以将自己的 `glances.conf` 文件放在以下位置:
:-- | -- | --
:-- | -- | --
`Linux`, `SunOS` | ~/.config/glances/, /etc/glances/, /usr/share/docs/glances/ |
`*BSD` |~/.config/glances/, /usr/local/etc/glances/, /usr/share/docs/glances/ |
`macOS` | ~/Library/Application Support/glances/, /usr/local/etc/glances/, /usr/share/docs/glances/ |
`Windows` | %APPDATA%\glances\glances.conf |
---
- 在 Windows XP 上,%APPDATA% 为:`C:\Documents and Settings\<USERNAME>\Application Data`
- 在 Windows Vista 及更高版本上:`C:\Users\<用户名>\AppData\Roaming`
### 语法
```ini
[global]
# 刷新率(默认为至少 2 秒)
# 可以通过 -t <sec> 选项覆盖
# 也可以在每个插件部分覆盖它
refresh=2
# Glances 是否应该检查 PyPI 上是否有更新的版本?
check_update=false
# 历史大小(最大值数)
# 默认值为288001天每3秒1分
history_size=28800
```
### CPU 插件的示例
```ini
[cpu]
disable=False
refresh=3
user_careful=50
user_warning=70
user_critical=90
iowait_careful=50
iowait_warning=70
iowait_critical=90
system_careful=50
system_warning=70
system_critical=90
steal_careful=50
steal_warning=70
steal_critical=90
```
### InfluxDB 导出模块
```ini
[influxdb]
# 配置 --export influxdb 选项
# https://influxdb.com/
host=localhost
port=8086
user=root
password=root
db=glances
prefix=localhost
#tags=foo:bar,spam:eggs
```
### Nginx AMP
```ini
[amp_nginx]
# 应启用 Nginx 状态页面
# https://easyengine.io/tutorials/nginx/status-page/
enable=true
regex=\/usr\/sbin\/nginx
refresh=60
one_line=false
status_url=http://localhost/nginx_status
```
<!--rehype:className=wrap-text-->
导出统计服务
---
### CSV
```sh
$ glances --export csv \
--export-csv-file /tmp/glances.csv \
--quiet
```
可以将统计数据导出到 CSV 文件
### JSON
```sh
$ glances --export json \
--export-json-file /tmp/glances.json
```
可以将统计信息导出到 JSON 文件
### Cassandra
<!--rehype:wrap-class=row-span-2-->
您可以将统计数据导出到 Cassandra 或 Scylla 服务器
```ini
[cassandra]
host=localhost
port=9042
protocol_version=3
keyspace=glances
replication_factor=2
table=localhost
```
并运行 Glances
```sh
$ glances --export cassandra
```
数据模型如下:
```sql
CREATE TABLE <table> (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time))
```
### Graph
<!--rehype:wrap-class=col-span-2-->
```ini
[graph]
# --export graph 选项的配置
# 设置创建图形(.svg 文件)的路径
# 可以通过 --graph-path 命令行选项覆盖
path=/tmp
# 可以通过设置自动生成图表
# generate_every 为一个非零值,对应于之间的秒数
# 两代。将其设置为 0 以禁用图形自动生成。
generate_every=60
# 请参阅 Pygal lib 文档中的以下配置键定义
# http://pygal.org/en/stable/documentation/index.html
width=800
height=600
style=DarkStyle
```
并运行 Glances
```sh
$ glances --export graph \
--export-graph-path /tmp
```
### CouchDB
您可以将统计数据导出到 CouchDB 服务器
```ini
[mongodb]
host=localhost
port=27017
db=glances
user=root
password=example
```
并运行 Glances
```sh
$ glances --export mongodb
```
### InfluxDB
<!--rehype:wrap-class=col-span-2 row-span-4-->
您可以将统计数据导出到 InfluxDB 服务器(时间序列服务器)
测量 | 字段 | 标签
:-- | -- | --
cpu | user system iowait… | hostname
network | read_bytes write_bytes time_since_update… | hostname disk_name
diskio | rx tx time_since_update… | hostname interface_name
docker | cpu_percent memory_usage… | hostname name
gpu | proc mem temperature… | hostname gpu_id
<!--rehype:className=show-header-->
#### InfluxDB (最高版本 1.7.x
```ini
[influxdb]
host=localhost
port=8086
protocol=http
user=root
password=root
db=glances
# 所有测量名称都会添加前缀
# Ex: prefix=foo
# => foo.cpu
# => foo.mem
# 您还可以使用动态值
#prefix=foo
# 将为所有测量添加以下标签
# 您还可以使用动态值
# 注意:主机名始终作为标签添加
#tags=foo:bar,spam:eggs,domain:`domainname`
```
并运行 Glances
```sh
$ glances --export influxdb
```
#### InfluxDB v2来自 InfluxDB v1.8.x/Flux 和 InfluxDB v2.x
```ini
[influxdb2]
host=localhost
port=8086
protocol=http
org=nicolargo
bucket=glances
token=EjFUTWe8U-MIseEAkaVIgVnej_TrUpDy==
# 设置两个导出之间的间隔(以秒为单位)
# 如果时间间隔设置为 0
# 则使用 Glances 刷新时间(默认行为)
#interval=0
# 将为所有测量名称添加前缀
# Ex: prefix=foo
# => foo.cpu
# => foo.mem
# 您还可以使用动态值
#prefix=foo
# 将为所有测量添加以下标签
# 您还可以使用动态值.
# 注意:主机名始终作为标签添加
#tags=foo:bar,spam:eggs,domain:`domainname`
```
并运行 Glances
```sh
$ glances --export influxdb2
```
### Elasticsearch
可以将统计数据导出到 Elasticsearch 服务器
```ini
[elasticsearch]
host=localhost
port=9200
index=glances
```
并运行 Glances
```sh
$ glances --export elasticsearch
```
### MQTT
您可以将统计信息导出到 `MQTT` 服务器
```ini
[mqtt]
host=localhost
port=883
tls=true
user=glances
password=glances
topic=glances
topic_structure=per-metric
```
并运行 Glances
```sh
$ glances --export mqtt
```
### MongoDB
```ini
[couchdb]
host=localhost
port=
user=root
password=example
db=glances
```
并运行 Glances
```sh
$ glances --export couchdb
```
### OpenTSDB
```ini
[opentsdb]
host=localhost
port=4242
prefix=glances
tags=foo:bar,spam:eggs
```
并运行 Glances
```sh
$ glances --export opentsdb
```
### Kafka
<!--rehype:wrap-class=col-span-2 row-span-3-->
您可以将统计信息导出到 Kafka 服务器
```ini
[kafka]
host=localhost
port=9092
topic=glances
#compression=gzip
# Tags will be added for all events
#tags=foo:bar,spam:eggs
# You can also use dynamic values
#tags=hostname:`hostname -f`
```
并运行 Glances
```sh
$ glances --export kafka
```
内存插件的记录示例:
```py
ConsumerRecord(topic=u'glances', partition=0, offset=1305, timestamp=1490460592248, timestamp_type=0, key='mem', value=u'{"available": 2094710784, "used": 5777428480, "cached": 2513543168, "mem_careful": 50.0, "percent": 73.4, "free": 2094710784, "mem_critical": 90.0, "inactive": 2361626624, "shared": 475504640, "history_size": 28800.0, "mem_warning": 70.0, "total": 7872139264, "active": 4834361344, "buffers": 160112640}', checksum=214895201, serialized_key_size=3, serialized_value_size=303)
```
<!--rehype:className=wrap-text-->
使用 Kafka Glances 插件的 Python 代码示例:
```py
from kafka import KafkaConsumer
import json
consumer = KafkaConsumer('glances', value_deserializer=json.loads)
for s in consumer:
print(s)
```
### Prometheus
```ini
[prometheus]
host=localhost
port=9091
prefix=glances
labels=src:glances
```
并运行 Glances
```sh
$ glances --export prometheus
```
### RabbitMQ
```ini
[rabbitmq]
host=localhost
port=5672
user=glances
password=glances
queue=glances_queue
#protocol=amqps
```
并运行 Glances
```sh
$ glances --export rabbitmq
```
### RESTful
<!--rehype:wrap-class=row-span-2-->
```ini
[restful]
# --export-restful 选项的配置
# 例如,导出到 http://localhost:6789/
host=localhost
port=6789
protocol=http
path=/
```
URL语法
```
http://localhost:6789/
| | | |
| | | path
| | port
| host
protocol
```
并运行 Glances
```sh
$ glances --export restful
```
### ZeroMQ
<!--rehype:wrap-class=row-span-2-->
```ini
[zeromq]
host=127.0.0.1
port=5678
prefix=G
```
并运行 Glances
```sh
$ glances --export zeromq
```
以下是订阅 Glances 统计数据的简单 Python 客户端:
```py
import json
import zmq
context = zmq.Context()
subscriber = context.socket(zmq.SUB)
subscriber.setsockopt(zmq.SUBSCRIBE, 'G')
subscriber.connect("tcp://127.0.0.1:5678")
while True:
_, plugin, data_raw = subscriber.recv_multipart()
data = json.loads(data_raw)
print('{} => {}'.format(plugin, data))
subscriber.close()
context.term()
```
### Riemann
```ini
[riemann]
host=localhost
port=5555
```
并运行 Glances
```sh
$ glances --export riemann
```
### StatsD
```ini
[statsd]
host=localhost
port=8125
prefix=glances
```
并运行 Glances
```sh
$ glances --export statsd
```
另见
----
- [Glances 官方文档](https://nicolargo.github.io/glances/) _nicolargo.github.io_

View File

@ -279,13 +279,26 @@ u := uint(i)
s := string(i)
```
#### 如何获取int字符串
#### 字符串与其他类型的相互转换
```go
i := 90
// 需要导入“strconv”
s := strconv.Itoa(i)
fmt.Println(s) // Outputs: 90
// 字符串转其他类型
str := "90"
// 整数类型
i, err := strconv.Atoi(str)
if err != nil {
fmt.Println("转换错误:", err)
} else {
fmt.Println(i)
}
// 浮点类型
f, err := strconv.ParseFloat(str, 64)
// []byte 类型
bytes := []byte(str)
// 其他类型转字符串
str = strconv.Itoa(i)
str = strconv.FormatFloat(f, 'f', 2, 64)
str = string(bytes[:])
```
Golang 字符串
@ -838,6 +851,54 @@ ch <- 3
参见:[缓冲通道](https://tour.golang.org/concurrency/3)
### Context
<!--rehype:wrap-class=col-span-2 row-span-2-->
```go
package main
import (
"context"
"fmt"
"time"
)
func main() {
// 创建根 context
ctx := context.Background() // 空 context通常作为根 context
todo := context.TODO() // 当不确定使用哪个 context 时使用
// 创建带取消功能的 context
ctx, cancel := context.WithCancel(context.Background())
defer cancel() // 确保所有路径都调用取消函数
// 创建带超时的 context
ctx, cancel = context.WithTimeout(context.Background(), 100*time.Millisecond)
defer cancel()
// 创建带截止时间的 context
deadline := time.Now().Add(200 * time.Millisecond)
ctx, cancel = context.WithDeadline(context.Background(), deadline)
defer cancel()
// 创建带值的 context
ctx = context.WithValue(context.Background(), "key", "value")
// 从 context 获取值
value := ctx.Value("key")
fmt.Println(value)
// 检查 context 是否已取消
select {
case <-ctx.Done():
fmt.Println("Context canceled:", ctx.Err())
default:
fmt.Println("Context still valid")
}
}
```
Golang 错误控制
--------

1025
docs/hook.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -242,10 +242,12 @@ sb.append("!");
### 比较
```java
String s1 = new String("QuickRef");
String s1 = "QuickRef";
String s2 = new String("QuickRef");
s1 == s2 // false
s1.equals(s2) // true
s1 == s2 // false
s1.equals(s2) // true
// intern 方法获得字符串常量池中的惟一引用
s1 == s2.intern() // true
"AB".equalsIgnoreCase("ab") // true
```
@ -310,7 +312,7 @@ int[] a3 = new int[]{1, 2, 3};
int[] a4 = new int[3];
a4[0] = 1;
a4[2] = 2;
a4[3] = 3;
a4[3] = 3; // 会出现索引越界异常
```
### 修改 Modify
@ -347,16 +349,16 @@ for (int a: arr) {
### 二维数组 Multidimensional Arrays
```java
int[][] matrix = { {1, 2, 3}, {4, 5} };
int[][] matrix = {{1, 2, 3}, {4, 5}, {6}};
int x = matrix[1][0]; // 4
// [[1, 2, 3], [4, 5]]
Arrays.deepToString(matrix)
for (int i = 0; i < a.length; ++i) {
for(int j = 0; j < a[i].length; ++j) {
System.out.println(a[i][j]);
}
System.out.Println(Arrays.deepToString(matrix));
// 输出: [[1, 2, 3], [4, 5], [6]]
for (int i = 0; i < matrix.length; ++i) {
for(int j = 0; j < matrix[i].length; ++j) {
System.out.println(matrix[i][j]);
}
}
// 输出: 1 2 3 4 5 6 7
// 输出: 1 2 3 4 5 6
```
### 排序 Sort
@ -561,7 +563,7 @@ do {
// 输出: 01234
```
### 继续声明
### 继续语句
```java
for (int i = 0; i < 5; i++) {
@ -570,7 +572,7 @@ for (int i = 0; i < 5; i++) {
}
System.out.print(i);
}
// 输出: 01245
// 输出: 0124
```
### 中断语句
@ -1344,7 +1346,7 @@ Consumer<String> test = System.out::println;
```java
Comparator<Integer> comparator = Math::max;
int result = comparator.compare(1, 2);
int result = comparator.compare(1, 2);
// 返回 2
```
@ -1353,7 +1355,7 @@ int result = comparator.compare(1, 2);
```java
String str = "HELLO";
String lowerCase = str::toLowerCase;
String lowerCase = str::toLowerCase;
// 返回 "hello"
```
@ -1362,7 +1364,7 @@ String lowerCase = str::toLowerCase;
```java
Supplier<String> supplier = String::new;
String str = supplier.get();
String str = supplier.get();
// 返回一个空字符串
```
@ -1372,7 +1374,7 @@ String str = supplier.get();
Function<Integer, String[]> function = String[]::new;
String[] array = function.apply(5);
String[] array = function.apply(5);
// 返回 5 个空字符串的数组
```
<!--rehype:className=wrap-text-->
@ -1382,7 +1384,7 @@ String[] array = function.apply(5);
```java
String someStr = "HELLO";
String lowerCase = someStr::toLowerCase;
String lowerCase = someStr::toLowerCase;
// 返回 "hello"
```
@ -1391,7 +1393,7 @@ String lowerCase = someStr::toLowerCase;
```java
SomeClass someObject = new SomeClass();
int result = someObject::staticMethod;
int result = someObject::staticMethod;
// 调用静态方法
```
@ -1558,6 +1560,118 @@ int frequency = Collections
.frequency(list, 2); // frequency = 2
```
操纵数据库
----
### JDBC
```java
String url = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC";
String user = "root";
String password = "123456";
String sql = "SELECT 1 as a, '2' as b";
String preparedSql = "SELECT * FROM t_user WHERE id = ?";
Connection conn = null;
Statement sm = null;
ResultSet rs = null;
try {
// 1.注册驱动
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException e) {
// 驱动找不到
throw new RuntimeException(e);
}
// 2.建立连接
try (Connection connection = DriverManager.getConnection(url, user, password)) {
conn = connection;
// 3.创建Statement对象
try (Statement statement = connection.createStatement()) {
sm = statement;
// 4.执行SQL语句
try (ResultSet resultSet = statement.executeQuery(sql)) {
rs = resultSet;
// 5.处理结果集
while (resultSet.next()) {
// 按照列名取值
System.out.println(resultSet.getLong("a"));
// 按照索引取值
System.out.println(resultSet.getString(2));
}
}
}
// 3.创建PreparedStatement对象
try (PreparedStatement preparedStatement = connection.prepareStatement(preparedSql)) {
sm = preparedStatement;
preparedStatement.setLong(1, 1_000L);
// 4.执行SQL语句
try (ResultSet resultSet = preparedStatement.executeQuery()) {
rs = resultSet;
// 5.处理结果集
while (resultSet.next()) {
System.out.println(resultSet.getLong("id"));
System.out.println(resultSet.getString(2));
}
}
}
} catch (SQLException e) {
// 数据库异常
throw new RuntimeException(e);
} finally {
// 6.关闭资源
// 上面的try块里已经自动关闭否则JDK 7以前按照以下顺序关闭
// 先打开的后关闭,后打开的先关闭
if (null != rs) {
try {
rs.close();
} catch (SQLException ignored) {
}
}
if (null != sm) {
try {
sm.close();
} catch (SQLException ignored) {
}
}
if (null != conn) {
try {
conn.close();
} catch (SQLException ignored) {
}
}
// 也可以直接工具类, 注意顺序
IOUtils.close(rs);
IOUtils.close(sm);
IOUtils.close(conn);
}
```
### JDBC注册驱动
```java
Class.forName("com.mysql.cj.jdbc.Driver");
DriverManager.registerDriver(new org.postgresql.Driver());
// 支持多个同时注册
System.setProperty("jdbc.drivers", "com.mysql.cj.jdbc.Driver:org.postgresql.Driver");
```
另见
---

View File

@ -27,8 +27,8 @@ JSON 备忘清单
"salary": 70000,
"married": true,
"children": [
{"name": "Tom", "age": 9, "gender":"M"},
{"name": "Ava", "age": 7, "gender":"F"}
{"name": "Tom", "age": 9},
{"name": "Ava", "age": 7}
]
}
```
@ -66,7 +66,7 @@ JSON 备忘清单
{
"url": "https://jaywcjlove.github.io",
"msg" : "Hi,\n\"Quick Reference\"",
"intro": "Share quick reference and cheat sheet for developers."
"intro": "为开发人员分享快速参考和备忘单"
}
```
@ -198,6 +198,124 @@ Have to be delimited by double quotes
}
```
JSON 5
----
### Objects
对象键可以是 ECMAScript 5.1 [IdentifierName](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6)
```json
{
width: 1920,
height: 1080,
}
```
数组可以有一个尾随逗号
```json
[
1,
true,
'three',
]
```
### 允许单行和多行注释
```js
{
// 一行注释
"name": "Kenny"
}
```
多行注释
```js
{
/* 这是一个
多行注释 */
"name": "Kenny"
}
```
### 允许附加空白字符
代码点 | 描述
:-- | ---
`U+0009` | 水平制表符
`U+000A` | 换行符
`U+000B` | 垂直制表符
`U+000C` | 换页符
`U+000D` | 回车符
`U+0020` | 空格
`U+00A0` | 不间断空格
`U+2028` | 行分隔符
`U+2029` | 段落分隔符
`U+FEFF` | 字节顺序标记
Unicode Zs 类别 | 空格分隔符 Unicode 类别中的任何其他字符
<!--rehype:className=left-align-->
### 数字
数字可能有前导或尾随小数点
```json
{
integer: 123,
withFractionPart: 123.456,
onlyFractionPart: .456,
withExponent: 123e-456,
}
```
数字可以是十六进制
```json
{
positiveHex: 0xdecaf,
negativeHex: -0xC0FFEE,
}
```
数字可以是正无穷大、负无穷大和 NaN。
```json
{
positiveInfinity: Infinity,
negativeInfinity: -Infinity,
notANumber: NaN,
}
```
数字可以以明确的加号开头
### 字符串
<!--rehype:wrap-class=col-span-2-->
```js
'Lorem ipsum dolor sit amet, \
consectetur adipiscing elit.'
```
以下是代表相同的意思
```js
'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
```
```json
'\A\C\/\D\C'
```
以下是代表相同的意思
```json
'AC/DC'
```
在 JavaScript 中访问 JSON
----

149
docs/jupyter.md Normal file
View File

@ -0,0 +1,149 @@
Jupyter 备忘清单
===
Jupyter 备忘清单是 [Jupyter](http://jupyter.org) 编程工具的单页参考表
入门
----
### Jupyter 简介
Jupyter/ˈdʒuːpɪtər/是一个非营利组织致力于为多种编程语言的交互式计算开发开源软件、开放标准和服务。Jupyter 于 2014 年由 Fernando Pérez 从 `IPython` 衍生出来支持几十种编程语言的执行环境。Jupyter 项目主要开发并支持 `Jupyter Notebook`.ipynb 文件格式)、`JupyterHub``JupyterLab` 等交互式计算产品。
### 安装 Jupyter
安装 Jupyter 可以通过 pip 或 conda 来完成。
`pip install jupyter` or `conda install jupyter`
mamba 安装
`mamba install -c conda-forge jupyterlab`
### 启动 Jupyter Notebook
在命令行中输入
`jupyter notebook`
`jupyter lab` (如果使用 `Jupyter Lab`)来启动服务。
### 创建新的 Notebook
<!--rehype:wrap-class=col-span-2-->
- 打开浏览器,访问本地服务器地址(通常是 <http://localhost:8888/tree> or <http://localhost:8888/lab/tree>
- 右击文件夹,选择 `New` -> `Python 3` (或你安装的其他内核)。
- 保存 `Notebook`
- 使用菜单栏中的 `File` -> `Save and Checkpoint` 或者按快捷键 Ctrl+S (Cmd+S on Mac)。
### 关闭 Notebook
使用菜单栏中的 `File` -> `Close and Halt`
Jupyter Notebook 快捷键
---
### 命令模式 (按键 Esc 开启)
| 按键 | 操作 |
| ----------- | ---------------------------- |
| `Enter` | 转入编辑模式 |
| `Shift` `Enter` | 运行本单元,选中下个单元 |
| `Ctrl` `Enter` | 运行本单元 |
| `Alt` `Enter` | 运行本单元,在其下插入新单元 |
| `y` | 单元转入代码状态 |
| `m` | 单元转入markdown状态 |
| `R` | 单元转入raw状态 |
| `1` | 设定 1 级标题 |
| `2` | 设定 2 级标题 |
| `3` | 设定 3 级标题 |
| `4` | 设定 4 级标题 |
| `5` | 设定 5 级标题 |
| `6` | 设定 6 级标题 |
| `Up` | 选中上方单元 |
| `k` | 选中上方单元 |
| `Down` | 选中下方单元 |
| `j` | 选中下方单元 |
| `Shift` `K` | 扩大选中上方单元 |
| `Shift` `J` | 扩大选中下方单元 |
| `a` | 在上方插入新单元 |
| `b` | 在下方插入新单元 |
| `x` | 剪切选中的单元 |
| `c` | 复制选中的单元 |
| `Shift` `V` | 粘贴到上方单元 |
| `zz` | 恢复删除的最后一个单元 |
| `dd` | 删除选中的单元 |
| `Shift` `M` | 合并选中的单元 |
| `Ctrl` `S` | 文件存盘 |
| `L` | 转换行号 |
| `O` | 转换输出 |
| `Shift` `O` | 转换输出滚动 |
| `Esc` | 关闭页面 |
| `Q` | 关闭页面 |
| `H` | 显示快捷键帮助 |
| `0,0` | 重启Notebook内核 |
| `I,I` | 中断Notebook内核 |
| `Shift` | 忽略 |
| `Shift` `Space` | 向上滚动 |
| `Space` | 向下滚动 |
<!--rehype:className=shortcuts-->
### 编辑模式 ( Enter 键启动)
| 按键 | 操作 |
| ------------------- | ---------------------------- |
| `Tab` | 代码补全或缩进 |
| `Shift` `Tab` | 提示 |
| `Ctrl` `]` | 缩进 |
| `Ctrl` `[` | 解除缩进 |
| `Ctrl` `A` | 全选 |
| `Ctrl` `Z` | 复原 |
| `Ctrl` `Shift` `Z` | 再做 |
| `Ctrl` `Y` | 再做 |
| `Ctrl` `Home` | 跳到单元开头 |
| `Ctrl` `Up` | 跳到单元开头 |
| `Ctrl` `End` | 跳到单元末尾 |
| `Ctrl` `Down` | 跳到单元末尾 |
| `Ctrl` `Left` | 跳到左边一个字首 |
| `Ctrl` `Right` | 跳到右边一个字首 |
| `Ctrl` `Backspace` | 删除前面一个字 |
| `Ctrl` `Delete` | 删除后面一个字 |
| `Esc` | 进入命令模式 |
| `Ctrl` `M` | 进入命令模式 |
| `Shift` `Enter` | 运行本单元,选中下一单元 |
| `Ctrl` `Enter` | 运行本单元 |
| `Alt` `Enter` | 运行本单元,在下面插入一单元 |
| `Ctrl` `Shift` `-` | 分割单元 |
| `Ctrl` `Shift` `Subtract` | 分割单元 |
| `Ctrl` `S` | 文件存盘 |
| `Shift` | 忽略 |
| `Up` | 光标上移或转入上一单元 |
| `Down` | 光标下移或转入下一单元 |
<!--rehype:className=shortcuts-->
高级功能
---
### 魔法命令
`Jupyter Notebook` 支持一系列以 `%``%%`开头的魔法命令,这些命令可以提供特殊功能。例如,`%matplotlib inline` 可以在 `Notebook` 中内嵌绘图;`%%time` 可以测量代码执行时间。
调用 `python` 文件,可以使用 `%run` 命令来调用 `python` 文件。例如,`%run my_script.py` 可以运行当前目录下名为 `my_script.py` 的 python 文件。
### 环境管理
`Jupyter Notebook` 支持使用虚拟环境来隔离不同的项目依赖。你可以使用 `conda``venv``Python 3` 自带的虚拟环境管理工具)来创建和管理虚拟环境,并在 `Notebook` 中选择使用哪个环境。
### 扩展插件
`JupyterLab` 支持通过安装扩展插件来增强功能。你可以通过 `JupyterLab` 的扩展管理器搜索和安装扩展插件,例如代码格式化、主题更改、`Git` 集成等。
Jupyter 资源
---
### 参考资料
- [Jupyter 官方文档](https://docs.jupyter.org/)
- [Jupyter 社区](https://jupyter.org/)
- [Jupyter github](https://github.com/jupyter/jupyter)
- [Jupyterlab github](https://github.com/jupyterlab/jupyterlab)

View File

@ -11,17 +11,18 @@ LaTeX 备忘清单
[LaTeX](https://www.latex-project.org/) 基于 TEX 的排版系统,适用于生成高印刷质量的科技和数学、物理文档。
- [LaTeX 官网](https://www.latex-project.org/) _(latex-project.org)_
- [KaTeX 官网](https://katex.org/) _(katex.org)_
而 [KaTeX](https://katex.org/) 只处理 LaTeX 的数学符号的一个更小的子集,用于 web 上展示
- [KaTeX 官网](https://katex.org/) _(katex.org)_
### 示例
```KaTeX
% \f is defined as #1f(#2) using the macro
f\relax(x) = \int_{-\infty}^\infty
f\hat\xi\,e^{2 \pi i \xi x}
\,d\xi
\,\mathrm{d}\xi
```
---
@ -30,7 +31,7 @@ f\relax(x) = \int_{-\infty}^\infty
% \f is defined as #1f(#2) using the macro
f\relax(x) = \int_{-\infty}^\infty
f\hat\xi\,e^{2 \pi i \xi x}
\,d\xi
\,\mathrm{d}\xi
```
### 行内展示
@ -42,10 +43,10 @@ f\relax(x) = \int_{-\infty}^\infty
基于 KaTeX 在一行展示示例: `KaTeX:\int_0^\infty x^2 dx`
Supported Functions
支持的语法
---
### Accents
### 标注符号
<!--rehype:wrap-class=col-span-2 row-span-2-->
:- | :- | :-
@ -74,7 +75,7 @@ Supported Functions
`KaTeX:\^{a}` <pur>`\^{a}`</pur> | `KaTeX:\u{a}` <pur>`\u{a}`</pur> |
`KaTeX:\r{a}` <pur>`\r{a}`</pur> |
### Delimiter Sizing
### 定界符大小调整
:- | :-
:- | :-
@ -90,7 +91,7 @@ Supported Functions
`\right` | `\bigg` | `\biggl` | `\biggm` | `\biggr`
`\` | `\Bigg` | `\Biggl` | `\Biggm` | `\Biggr`
### 希腊和希伯来字母 Greek and Hebrew letters
### 希腊和希伯来字母
<!--rehype:wrap-class=col-span-3-->
预览 | 方法 | 预览 | 方法 | 预览 | 方法 | 预览| 方法 | 预览 | 方法 | 预览 | 方法
@ -193,7 +194,7 @@ Supported Functions
\sum_{\mathclap{1\le i\le j\le n}} x_{ij}
```
### `KaTex:\LaTeX` math constructs
### `KaTex:\LaTeX` 数学结构
<!--rehype:wrap-class=col-span-3-->
预览 | 方法 | 预览 | 方法 | 预览 | 方法
@ -203,7 +204,7 @@ Supported Functions
| `KaTex:\sqrt{abc}` | <pur>`\sqrt{abc}`</pur> | `KaTex:\widehat{abc}` | <pur>`\widehat{abc}`</pur> | `KaTex:\overbrace{abc}` | <pur>`\overbrace{abc}`</pur> |
| `KaTex:\sqrt[n]{abc}` | <pur>`\sqrt[n]{abc}`</pur> | `KaTex:\widetilde{abc}` | <pur>`\widetilde{abc}`</pur> | `KaTex:\underbrace{abc}` | <pur>`\underbrace{abc}`</pur> |
### 分隔符 Delimiters
### 分隔符
<!--rehype:wrap-class=col-span-3-->
预览 | 方法 | 预览 | 方法 | 预览 | 方法 | 预览| 方法 | 预览 | 方法
@ -547,10 +548,10 @@ Supported Functions
`KaTex:\circledS` | <pur>`\circledS`</pur> | `KaTex:\spadesuit` | <pur>`\spadesuit`</pur> | `KaTex:\spades` | <pur>`\spades`</pur> |
`KaTex:\text{\textcircled a}` | <pur>`\text{\textcircled a}`</pur> | `KaTex:\maltese` | <pur>`\maltese`</pur> | `KaTex:\minuso` | <pur>`\minuso`</pur> |
Environments
环境
---
### Environments 1
### 环境 1
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -569,7 +570,7 @@ Environments
```
<!--rehype:style=flex:1;-->
### Environments 2
### 环境 2
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -587,7 +588,7 @@ Environments
\end{array}
```
### Environments 3
### 环境 3
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -606,7 +607,7 @@ Environments
```
<!--rehype:style=flex:1;-->
### Environments 4
### 环境 4
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -623,7 +624,7 @@ Environments
\end{bmatrix}
```
### Environments 5
### 环境 5
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -642,7 +643,7 @@ Environments
```
<!--rehype:style=flex:1;-->
### Environments 6
### 环境 6
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -661,7 +662,7 @@ Environments
```
<!--rehype:style=flex:1;-->
### Environments 7
### 环境 7
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -678,7 +679,7 @@ Environments
\end{Bmatrix}
```
### Environments 8
### 环境 8
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -702,7 +703,7 @@ Environments
\end{array}
```
### Environments 9
### 环境 9
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -719,7 +720,7 @@ x = \begin{cases}
\end{cases}
```
### Environments 10
### 环境 10
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -736,7 +737,7 @@ x = \begin{cases}
\end{rcases}⇒…
```
### Environments 11
### 环境 11
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -754,7 +755,7 @@ x = \begin{cases}
\end{smallmatrix}
```
### Environments 12
### 环境 12
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -774,7 +775,7 @@ x = \begin{cases}
\end{subarray}}
```
### Environments 13
### 环境 13
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -794,7 +795,7 @@ x = \begin{cases}
\end{equation}
```
### Environments 14
### 环境 14
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -812,7 +813,7 @@ x = \begin{cases}
\end{align}
```
### Environments 15
### 环境 15
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -830,7 +831,7 @@ x = \begin{cases}
\end{gather}
```
### Environments 16
### 环境 16
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -848,7 +849,7 @@ x = \begin{cases}
\end{alignat}
```
### Environments 17
### 环境 17
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
```KaTeX
@ -881,7 +882,7 @@ x = \begin{cases}
`KaTex:\colorbox{aqua}{$F=ma$}` | <pur>`\colorbox{aqua}{$F=ma$}`</pur>
`KaTex:\fcolorbox{red}{aqua}{$F=ma$}` | <pur>`\fcolorbox{red}{aqua}{$F=ma$}`</pur>
### Font 字体
### 字体
<!--rehype:wrap-class=col-span-2-->
:- | :- | :- | :- | :- | :-
@ -892,7 +893,7 @@ x = \begin{cases}
`KaTex:\Large AB` | <pur>`\Large AB`</pur> | `KaTex:\Large AB` | <pur>`\Large AB`</pur> | `KaTex:\scriptsize AB` | <pur>\scriptsize AB</pur>
`KaTex:\large AB` | <pur>`\large AB`</pur> | `KaTex:\large AB` | <pur>`\large AB`</pur> | `KaTex:\tiny AB` | <pur>\tiny AB</pur>
### Style 样式
### 样式
<!--rehype:wrap-class=col-span-3-->
:- | :- | :- | :-

View File

@ -24,6 +24,7 @@ Linux 命令速查表
**`w`** | 显示系统中当前登录的用户
**`whoami`** | 显示您的登录身份
**`finger username`** | 显示有关用户的信息
**`sed -ri 's/.*swap.*/#&/' /etc/fstab && swapoff -a`** | 关闭swap
<!--rehype:className=style-list-->
### 硬件
@ -154,6 +155,9 @@ Linux 命令速查表
**`tar -xf files.tar`** | 解压档案文件"files.tar"
**`tar -zcvf home.tar.gz source-folder`** | 从源文件夹创建压缩的tar存档文件
**`gzip file`** | 压缩扩展名为.gz的文件
**`zip -r compressed.zip folder/`** | 递归压缩目录`folder`为压缩文件`compressed.zip`
**`unzip compressed.zip -d folder/`** | 在目录`folder`下解压文件
**`unzip -v compressed.zip`** | 查看但不解压文件
<!--rehype:className=style-list-->
### 搜索
@ -329,6 +333,24 @@ Linux 命令速查表
`Ctrl`+`N` (Down) | 下一条命令
<!--rehype:className=left-align shortcuts-->
技巧
---
### linux技巧
<!--rehype:wrap-class=row-span-2 col-span-2-->
:--- | :---
:----------------------------------------------| :---
**`du -h / \| sort -rh \| head -20`** | 最大20个文件
**`grep -Ev '^\s*($\|#\|;)' example.conf`** | 查看去掉注释和空行
**`echo <passwd> \| passwd root --stdin`** | 单行改密码
**`find /data/app/tmp -mtime +30 -name "*.flv" -exec rm -Rf {} \;`** | 删除30天前文件
**`for file in $(ls); do sed -i 's/nmg/sz/g' "$file"; done`** | 当前目录修改字符串
**`ssh -NfR remote_port:localhost:local_port user@remote_server`** | ssh代理
**`find . -wholename "*.sh" -exec dos2unix {} \;`** | 修复脚本格式错误
**`rsync -avz /source/ user@remote:/destination/`** | 同步文件和目录到远程服务器,支持压缩和增量传输
<!--rehype:className=left-align shortcuts-->
另见
---

View File

@ -549,8 +549,8 @@ string.lower("STR") -- str
-- 指定替换的字符串个数, 最后一个参数可选,默认是全部替换
string.gsub("aaaa", "a", "b", 3) -- bbba 3
string.gsub("Today is 29/01/2019", "%d%d/%d%d/%d%d%d%d", "good day.")
-- Today is a good day. 1
string.gsub("Today is 29/01/2019", "%d%d/%d%d/%d%d%d%d", "a good day.")
-- Today is a good day.
-- 查找第一个匹配的字符串,第三个参数可以提供开始查找的位置,默认从 1 开始
-- 如果未找到,则返回 nil
@ -652,7 +652,7 @@ local g = math.max(1, 2, 3) -- 3
local h = math.min(1, 2, 3) -- 1
-- 返回参数的平方根
local r = math.sqrt(3) -- 9
local r = math.sqrt(9) -- 3
```
### 工具方法
@ -701,10 +701,10 @@ math.cos(math.pi) -- -1.0
math.tan(math.pi / 4) -- 1.0
-- 反正弦方法(以下皆是以弧度表示)
math.acos(1.0) -- 0.0
math.asin(1.0) -- 1.5707963267949
-- 反余弦方法
math.acos(1.0) -- 1.5707963267949
-- 反正方法
math.acos(1.0) -- 0.0
-- 反正方法
math.atan(1.0) -- 0.78539816339745
-- 角度转换为弧度

235
docs/minio.md Normal file
View File

@ -0,0 +1,235 @@
MinIO 备忘清单
===
这是 MinIO 语法的快速参考备忘单
MinIO 快速参考
----
### 基本概念
- **对象存储**:存储非结构化数据,如图片、视频等。
- **桶Bucket**MinIO中存储对象的容器类似于文件夹。
- **对象Object**:桶中存储的具体数据。
### 安装MinIO
- 从[MinIO官网](https://min.io/download)下载对应平台的MinIO服务器。
- 根据操作系统的指南进行安装。
### 启动MinIO服务
- 运行MinIO服务器通常使用以下命令
```shell
minio server /export/data1 /export/data2 /export/data3 /export/data4
```
- 其中`/export/data1`等是存储数据的路径。
### 访问MinIO
- 使用Web界面访问MinIO通常是`http://127.0.0.1:9000`。
- 使用客户端工具,如`mc`命令行工具。
### minio client 安装
<!--rehype:wrap-class=row-span-2 col-span-2-->
#### windows
下载
```bash
https://dl.min.io/client/mc/release/windows-amd64/mc.exe
\path\to\mc.exe --help
```
#### mac
安装
```bash
brew install minio/stable/mc
mc --help
```
#### linux
```sh
curl https://dl.min.io/client/mc/release/linux-amd64/mc \
--create-dirs \
-o $HOME/minio-binaries/mc
chmod +x $HOME/minio-binaries/mc
export PATH=$PATH:$HOME/minio-binaries/
```
版本比较多,请去官网查找安装步骤
### mc 连接服务操作
列出所有别名
```bash
mc alias list
```
添加服务别名
```bash
mc alias set myminio https://myminio.example.net minioadminuser minioadminpassword
```
删除服务别名
```bash
mc alias rm myminio
```
### mc 桶操作
创建桶
```sh
mc mb myminio/mybucket
```
删除桶
```sh
mc rb myminio/mybucket
```
设置桶策略
```sh
mc policy set download myminio/mybucket
```
设置桶生命周期
```sh
mc ilm import myminio/mybucket
```
### mc 文件操作
<!--rehype:wrap-class=row-span-2-->
列出文件
```sh
mc ls myminio/mybucket
```
上传文件
```sh
mc cp /path/to/file myminio/mybucket/file
```
下载文件
```sh
mc cp myminio/mybucket/file /path/to/destination
```
删除文件
```sh
mc rm myminio/mybucket/file
```
移动文件
```sh
mc mv myminio/mybucket/file myminio/mybucket/newfile
```
拷贝文件
```sh
mc cp myminio/mybucket/file myminio/mybucket/newfile
```
查找文件
```sh
mc find myminio/mydata --name "*.jpg"
```
### mc 文件夹操作
<!--rehype:wrap-class=row-span-2-->
列出文件夹
```sh
mc ls myminio/mybucket/folder
```
创建文件夹
```sh
mc mb myminio/mybucket/folder
```
删除文件夹
```sh
mc rb myminio/mybucket/folder
```
移动文件夹
```sh
mc mv myminio/mybucket/folder myminio/mybucket/newfolder
```
拷贝文件夹
```sh
mc cp myminio/mybucket/folder myminio/mybucket/newfolder
```
删除文件夹中的所有文件
```sh
mc rm --recursive myminio/mybucket/folder
```
列出文件夹中的所有文件
```sh
mc ls --recursive myminio/mybucket/folder
```
列出文件夹中的所有文件,包括子文件夹
```sh
mc ls --recursive --include-folders myminio/mybucket/folder
```
### mc 其他操作
列出所有桶
```sh
mc ls myminio
```
显示帮助信息
```sh
mc help
```
版本信息
```sh
mc version
```
另见
---
- [MinIO官方文档](https://min.io/docs/minio/kubernetes/upstream/) _(min.io)_
- [MinIO github 源码](https://github.com/minio/minio) _(github.com)_

View File

@ -115,6 +115,17 @@ mysqldump -u user -p db_name --no-data=true --add-drop-table=false > db.sql
mysql -u user -p db_name < db.sql
```
### 错误处理 Error Handling
| 语句 | 描述 |
| :----------------------- | :----------------------------- |
| `SHOW ERRORS;` | 显示最近的错误信息 |
| `SHOW WARNINGS;` | 显示最近的警告信息 |
| `SHOW COUNT(*) ERRORS;` | 返回最近语句的错误数量 |
| `SHOW COUNT(*) WARNINGS;`| 返回最近语句的警告数量 |
| `EXPLAIN` | 分析 SQL 查询的执行计划,排查问题 |
| `SHOW ENGINE INNODB STATUS;` | 显示 InnoDB 引擎状态,包括死锁等错误信息 |
MySQL 示例
------
@ -167,10 +178,11 @@ ALTER TABLE t DROP constraint;
ALTER TABLE t1 RENAME TO t2;
```
将列c1重命名为c2
将列 c1 重命名为 c2
```sql
ALTER TABLE t1 RENAME c1 TO c2 ;
ALTER TABLE t1 CHANGE c1 c2 datatype;
ALTER TABLE table_name RENAME COLUMN c1 TO c2;
```
将列c1的数据类型改为datatype
@ -612,6 +624,7 @@ MySQL 数据类型
| `COUNT()` | 计算行数可选择性地忽略NULL值 |
| `MAX()` | 找出一列的最大值 |
| `MIN()` | 找出一列的最小值 |
| `GROUP_CONCAT()` | 将一组值连接成单一字符串,可指定分隔符,常用于分组。|
### 数学函数

View File

@ -892,6 +892,89 @@ location = /robots.txt {
}
```
### 获取请求ip
<!--rehype:wrap-class=col-span-3-->
```nginx
server {
listen 80;
server_name xxx.top;
location / {
access_log /data/logs/nginx/json_ip.log json;
proxy_set_header Host $http_host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9999;
}
}
server {
listen 9999;
location / {
access_log off;
default_type application/json;
return 200 "{\"ip\":\"$http_X_Real_Ip\"}";
}
}
```
### 判断请求参数
<!--rehype:wrap-class=col-span-3-->
```nginx
# 判断多个参数示例
set $flagts 0;
if ( $arg_aaa ~ "^aaa" ) {
set $flagts "${flagts}1";
}
if ( $arg_bbb ~ "^bbb" ) {
set $flagts "${flagts}1";
}
if ( $flagts = "011" ) {
return 200;
}
```
### 流量镜像配置
<!--rehype:wrap-class=col-span-3-->
```nginx
server {
listen 80;
server_name 192.168.1.1;
location = /mirror1 {
internal;
#### address1 ####
proxy_set_header Host mirror1.com;
proxy_pass http://127.0.0.1:8008/api/service/list;
}
location = /mirror2 {
internal;
#### address2 ####
proxy_set_header Host mirror2.com;
proxy_pass http://127.0.0.1:8009/api/service/list;
}
# 只转发这个接口
location /api/service/list {
access_log /data/logs/nginx/json_test_to_mirror.log json;
mirror /mirror1;
mirror /mirror2;
proxy_pass http://127.0.0.1:8007;
}
location / {
access_log /data/logs/nginx/json_test.log json;
proxy_pass http://192.168.1.1:8007;
}
}
```
另见
---

View File

@ -314,6 +314,7 @@ $ npx create-react-app my-app --template typescript
`~/.npmrc` | 每个用户的配置文件
`$PREFIX/etc/npmrc` | 全局配置文件
`/path/to/npm/npmrc` | npm 内置配置文件
<!--rehype:className=left-align-->
### 配置内容
@ -336,6 +337,7 @@ $ npx create-react-app my-app --template typescript
`cnpm` | <https://r.cnpmjs.org/>
`taobao` | <https://registry.npmmirror.com/>
`npmMirror` | <https://skimdb.npmjs.com/registry/>
<!--rehype:className=left-align-->
### `.npmignore`

376
docs/pinia.md Normal file
View File

@ -0,0 +1,376 @@
Pinia 备忘清单
===
这是一份 [`Pinia`](https://pinia.vuejs.org/) 状态管理库的备忘单,列出了 Pinia 的常用命令和操作。
入门
---
### 安装 Pinia
```bash
npm install pinia
# or
yarn add pinia
# or
pnpm add pinia
```
### 定义 Store
<!--rehype:wrap-class=col-span-2 row-span-2-->
创建一个 store 文件(例如 `src/stores/counter.js`),并定义 `store`
```javascript
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', {
state: () => ({
count: 0
}),
actions: {
increment() {
this.count++
}
},
getters: {
doubleCount: (state) => state.count * 2
}
})
```
### 创建 Pinia 实例
```javascript
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
app.mount('#app')
```
在你的 [Vue](./vue.md) 应用中创建一个 Pinia 实例并将其传递给 [Vue](./vue.md)
### 热重载 Store
使用 Vite 时,你可以启用热重载功能:
```javascript
if (import.meta.hot) {
import.meta.hot.accept(acceptHMRUpdate(useCounterStore, import.meta.hot))
}
```
### 使用 Store
<!--rehype:wrap-class=row-span-2-->
在组件中使用 `store`
```javascript
<template>
<div>
<p>Count: {{ counterStore.count }}</p>
<p>Double Count: {{ counterStore.doubleCount }}</p>
<button @click="counterStore.increment">Increment</button>
</div>
</template>
<script>
import { useCounterStore } from '@/stores/counter'
export default {
setup() {
const counterStore = useCounterStore()
return {
counterStore
}
}
}
</script>
```
### Modules 模式
<!--rehype:wrap-class=row-span-2-->
Pinia 不使用传统的 Vuex 模块模式。相反,推荐使用独立的 store 文件:
```javascript
// src/stores/user.js
import { defineStore } from 'pinia'
export const useUserStore = defineStore('user', {
state: () => ({
name: 'Alice',
age: 25
}),
actions: {
setName(name) {
this.name = name
}
},
getters: {
isAdult: (state) => state.age >= 18
}
})
```
### 使用 Options API
如果你更喜欢 Options API可以这样使用 Pinia
```javascript
<script>
import { defineComponent } from 'vue'
import { useCounterStore } from '@/stores/counter'
export default defineComponent({
setup() {
const counterStore = useCounterStore()
return {
counterStore
}
}
})
</script>
```
高级用法
---
### 使用组合函数
你可以将 store 与组合函数一起使用:
```javascript
// src/composables/useCounter.js
import { useCounterStore } from '@/stores/counter'
export function useCounter() {
const counterStore = useCounterStore()
return {
count: counterStore.count,
doubleCount: counterStore.doubleCount,
increment: counterStore.increment
}
}
```
### 插件
<!--rehype:wrap-class=col-span-2-->
Pinia 支持插件。你可以编写插件来扩展 Pinia 的功能:
```javascript
// src/plugins/piniaPlugin.js
export function piniaPlugin({ store }) {
store.$onAction(({ name, store, args, after, onError }) => {
console.log(`Action ${name} was called with args:`, args)
})
}
// main.js
import { createPinia } from 'pinia'
import { piniaPlugin } from './plugins/piniaPlugin'
const pinia = createPinia()
pinia.use(piniaPlugin)
```
### 持久化状态
<!--rehype:wrap-class=row-span-4 col-span-2-->
#### 1. 安装 `pinia-plugin-persist`
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
```bash
npm pinia-plugin-persist
```
#### 2. 配置 Pinia 和 `pinia-plugin-persist`
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
在你的入口文件中配置 Pinia 和 `pinia-plugin-persist`
**⚠️ Vue 2 项目**
```javascript
import Vue from 'vue'
import vueCompositionApi from '@vue/composition-api'
import { createPinia, PiniaVuePlugin } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
import App from './App.vue'
Vue.use(vueCompositionApi)
Vue.use(PiniaVuePlugin)
const pinia = createPinia()
pinia.use(piniaPersist)
new Vue({
pinia,
render: h => h(App)
}).$mount('#app')
```
**Vue 3 项目:**
```javascript
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
import App from './App.vue'
const pinia = createPinia()
pinia.use(piniaPersist)
createApp(App)
.use(pinia)
.mount('#app')
```
#### 3. 创建 Store 并启用持久化
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
创建一个 Pinia store并启用持久化存储。
```javascript
// stores/userStore.js
import { defineStore } from 'pinia'
export const useUserStore = defineStore('userStore', {
state: () => ({
firstName: 'S',
lastName: 'L',
accessToken: 'xxxxxxxxxxxxx'
}),
actions: {
setToken(value) {
this.accessToken = value
}
},
persist: {
enabled: true,
strategies: [
{
storage: localStorage,
paths: ['accessToken']
}
]
}
})
```
#### 4. 使用 Store
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
在组件中使用创建好的 store。
```javascript
// src/components/SomeComponent.vue
<template>
<div>
<p>{{ userStore.firstName }} {{ userStore.lastName }}</p>
<p>{{ userStore.accessToken }}</p>
</div>
</template>
<script>
import { useUserStore } from '@/stores/userStore'
export default {
setup() {
const userStore = useUserStore()
return { userStore }
}
}
</script>
```
### SSR 支持
Pinia 支持服务端渲染 (SSR)。在你的 SSR 入口文件中创建 Pinia 实例:
```javascript
import { createPinia } from 'pinia'
export function createApp() {
const app = createSSRApp(App)
const pinia = createPinia()
app.use(pinia)
return { app, pinia }
}
```
明白了,让我们来结合 `pinia-plugin-persist` 插件完善 Pinia 备忘清单。
### 使用 Vue Devtools
Pinia 可以与 Vue Devtools 一起使用。确保你安装了最新版本的 Vue Devtools然后你可以在 Devtools 中查看和调试你的 Pinia store。
### 使用异步 Actions
Pinia 支持在 actions 中使用异步代码:
```javascript
// src/stores/todo.js
import { defineStore } from 'pinia'
import axios from 'axios'
export const useTodoStore = defineStore('todo', {
state: () => ({
todos: []
}),
actions: {
async fetchTodos() {
const response = await axios.get('/api/todos')
this.todos = response.data
}
}
})
```
### 测试 Pinia Store
你可以使用 Vue Test Utils 和 Jest 来测试你的 Pinia store
```javascript
// __tests__/counterStore.test.js
import { setActivePinia, createPinia } from 'pinia'
import { useCounterStore } from '@/stores/counter'
describe('Counter Store', () => {
beforeEach(() => {
setActivePinia(createPinia())
})
it('increments the count', () => {
const counterStore = useCounterStore()
expect(counterStore.count).toBe(0)
counterStore.increment()
expect(counterStore.count).toBe(1)
})
it('returns double count', () => {
const counterStore = useCounterStore()
counterStore.count = 2
expect(counterStore.doubleCount).toBe(4)
})
})
```
另见
---
- [Pinia 官方文档](https://pinia.vuejs.org/)
- [Pinia GitHub 仓库](https://github.com/vuejs/pinia)
- [Pinia 快速上手](https://pinia.vuejs.org/getting-started.html)
- [pinia-plugin-persist 官方文档](https://seb-l.github.io/pinia-plugin-persist/basic-usage.html)

279
docs/pnpm.md Normal file
View File

@ -0,0 +1,279 @@
pnpm 备忘清单
===
这是一份 [`pnpm`](https://pnpm.io/) 软件包管理器备忘单,其中列出了 `pnpm` 常用命令使用清单。
入门
---
### pnpm 与 npm 命令比较
<!--rehype:wrap-class=col-span-2 row-span-2-->
npm | pnpm | 说明
:- | :- | :-
`npm install` | `pnpm install` | 安装依赖
`npm init` | `pnpm init` | 创建 `package.json` 文件
`npm install <package>` | `pnpm add <package>` | 安装包
`npm install -g <package>` | `pnpm add -g <package>` | 全局安装包
`npm update` | `pnpm update` | 更新包
`npm cache clean` | `pnpm cache clean` | 清理缓存
参考 [npm](./npm.md) 备忘清单
### pnpm list
```shell
# 列出所有已安装的包
pnpm list
# 列出全局安装的包
pnpm list -g
# 查找过时的包
pnpm outdated
```
### pnpm why
```shell
# 显示为什么安装了某个包
pnpm why <package>
```
### pnpm install
<!--rehype:wrap-class=row-span-3-->
pnpm | 说明
:- | :-
`--no-lockfile` | 不生成 pnpm-lock.yaml 锁定文件
`--force` | 强制覆盖现有的 node_modules
`--frozen-lockfile` | 忽略 pnpm-lock.yaml 中的更改
`--offline` | 离线模式,不尝试从远程仓库安装包
`--shamefully-hoist` | 类似于 npm 的 hoist 行为
`--strict-peer-dependencies` | 严格检查 peer dependencies
<!--rehype:className=style-list-arrow-->
这些选项可用于 `pnpm install`
### pnpm add
<!--rehype:wrap-class=row-span-3-->
pnpm | 说明
:- | :-
`--save` | 将包添加到 dependencies
`--save-dev` | 将包添加到 devDependencies
`--global` | 全局安装包
`--exact` | 安装精确版本号的包
`--shamefully-hoist` | 类似于 npm 的 hoist 行为
`--strict-peer-dependencies` | 严格检查 peer dependencies
<!--rehype:className=style-list-arrow-->
这些选项可用于 `pnpm add`
### pnpm update
```shell
# 更新所有包
pnpm update
# 更新特定包
pnpm update <package>
# 更新到最新版本(包括 major 版本)
pnpm update --latest
```
### pnpm remove
```shell
# 从依赖中删除包
pnpm remove <package>
# 删除全局依赖包
pnpm remove -g create-react-app
# 删除特定版本的依赖包
pnpm remove lodash@4.17.21
```
### pnpm cache
```shell
# 清理 pnpm 缓存
pnpm cache clean
# 查看缓存中所有的包
pnpm cache list
```
示例
---
### 安装包
```bash
# 将包添加到“dependencies”
pnpm add <package>
# 将包添加到“devDependencies”
pnpm add -D <package>
# 将包作为精确版本添加
pnpm add --exact <package>
# 在全局范围内安装包
pnpm add -g <package>
# 安装特定版本的包
pnpm add <package>@<version>
```
### 移除包
```bash
pnpm remove <package>
# 删除多个依赖包
pnpm remove lodash express
# 删除全局依赖包
pnpm remove -g create-react-app
# 删除特定版本的依赖包
pnpm remove lodash@4.17.21
```
### 查看包
```bash
# 列出已安装的包
pnpm list
# 列出顶级安装的包
pnpm list --depth 0
# 列出全局安装的包
pnpm list -g
# 根据模式和深度列出包
pnpm list --pattern "lodash" --depth 1
```
### 清除
```bash
# 清理 node_modules 并删除不必要的文件
pnpm prune
# 检查过时的包
pnpm outdated
```
### 信息
```bash
# 显示关于安装包的原因的信息
pnpm why <package>
```
### 清理缓存
```bash
# 清除 pnpm 的全局缓存
pnpm cache clean
```
此外,您可以指定一个或多个要清理的包。
Monorepo
---
### 创建 Monorepo 工作区
<!--rehype:wrap-class=row-span-3-->
- 创建一个新的 pnpm 工作区:
```bash
pnpm init -w
```
- 将在项目的根目录中创建一个 `pnpm-workspace.yaml` 文件,内容如下:
```yaml
packages:
- 'packages/**'
- 'apps/**'
```
- 在 `pnpm-workspace.yaml` 中定义您的工作区结构:
```yaml
packages:
- 'packages/*'
- 'apps/*'
```
<!--rehype:className=style-timeline-->
### 添加包到 Monorepo 工作区
```bash
pnpm add <package> -w # 在工作区中添加包
```
### 运行脚本
<!--rehype:wrap-class=row-span-2-->
```bash
# 在所有包中运行脚本
pnpm -r run <script>
# 仅在某个包中运行脚本
pnpm --filter <package> run <script>
# 在某个包及其依赖中运行脚本
pnpm --filter <package>... run <script>
```
### 添加工作区范围的依赖
```bash
# 添加依赖到工作区根目录
pnpm add <package> -w
# 添加开发依赖到工作区根目录
pnpm add -D <package> -w
```
### 创建新的包
在 `packages` 目录中创建新的包,例如:
```bash
mkdir packages/new-package
cd packages/new-package
pnpm init
```
### 链接本地包
```bash
# 将本地包链接到当前工作区
pnpm link <local-package-path>
# 链接工作区中的包
pnpm add <local-package-name> --workspace
```
高级用法
---
### 工作区
```bash
# 创建工作区
pnpm init -w
# 在工作区中添加包
pnpm add <package> -w
```
### 链接
```bash
# 链接一个全局包到当前项目
pnpm link <package>
# 链接本地包到全局
pnpm link --global <package>
```
### 运行脚本
```bash
# 运行 package.json 中的脚本
pnpm run <script>
# 运行根目录中的包的脚本
pnpm run -w <script>
```
另见
---
- [pnpm 官方文档网站](https://pnpm.io/)
- [pnpm 常见问题解答](https://pnpm.io/motivation)

316
docs/ports.md Normal file
View File

@ -0,0 +1,316 @@
常用端口 备忘清单
===
这是一份常见端口的对照清单。
端口对照清单
----
### 最常用端口
<!--rehype:wrap-class=col-span-4-->
| 端口号 | 协议 | 使用程序 | 备注/用途 |
| ------ | ---- | -------------- | ------------------------------------------------------------ |
| `1` | TCP | tcpmux | TCP端口服务多路复用 |
| `5` | TCP | rje | 远程作业入口 |
| `7` | TCP | echo | Echo服务 |
| `9` | TCP | discard | 用于连接测试的空服务 |
| `11` | TCP | systat | 用于列举连接了的端口的系统状态 |
| `13` | TCP | daytime | 给请求主机发送日期和时间 |
| `17` | TCP | qotd | 给连接了的主机发送每日格言 |
| `18` | TCP | msp | 消息发送协议 |
| `19` | TCP | chargen | 字符生成服务;发送无止境的字符流 |
| `20` | TCP | ftp-data | FTP数据端口 |
| `21` | TCP | ftp | 文件传输协议FTP端口有时被文件服务协议FSP使用 |
| `22` | TCP | ssh | 安全ShellSSH服务 |
| `23` | TCP | telnet | Telnet服务 |
| `25` | TCP | smtp | 简单邮件传输协议SMTP |
| `37` | TCP | time | 时间协议 |
| `39` | TCP | rlp | 资源定位协议 |
| `42` | TCP | nameserver | 互联网名称服务 |
| `43` | TCP | nicname | WHOIS目录服务 |
| `49` | TCP | tacacs | 用于基于TCP/IP验证和访问的终端访问控制器访问控制系统 |
| `50` | TCP | re-mail-ck | 远程邮件检查协议 |
| `53` | TCP | domain | 域名服务如BIND |
| `63` | TCP | whois++ | WHOIS++被扩展了的WHOIS服务 |
| `67` | TCP | bootps | 引导协议BOOTP服务还被动态主机配置协议DHCP服务使用 |
| `68` | TCP | bootpc | BootstrapBOOTP客户还被动态主机配置协议DHCP客户使用 |
| `69` | TCP | tftp | 小文件传输协议TFTP |
| `70` | TCP | gopher | Gopher互联网文档搜寻和检索 |
| `71` | TCP | netrjs-1 | 远程作业服务 |
| `72` | TCP | netrjs-2 | 远程作业服务 |
| `73` | TCP | netrjs-3 | 远程作业服务 |
| `73` | TCP | netrjs-4 | 远程作业服务 |
| `79` | TCP | finger | 用于用户联系信息的Finger服务 |
| `80` | TCP | http | 用于万维网WWW服务的超文本传输协议HTTP |
| `88` | TCP | kerberos | Kerberos网络验证系统 |
| `95` | TCP | supdup | Telnet协议扩展 |
| `101` | TCP | hostname | SRI-NIC机器上的主机名服务 |
| `102` | TCP | iso-tsap | ISO开发环境ISODE网络应用 |
| `105` | TCP | csnet-ns | 邮箱名称服务器也被CSO名称服务器使用 |
| `107` | TCP | rtelnet | 远程Telnet |
| `109` | TCP | pop2 | 邮局协议版本2 |
| `110` | TCP | pop3 | 邮局协议版本3 |
| `111` | TCP | sunrpc | 用于远程命令执行的远程过程调用RPC协议被网络文件系统NFS使用 |
| `113` | TCP | auth | 验证和身份识别协议 |
| `115` | TCP | sftp | 安全文件传输协议SFTP服务 |
| `117` | TCP | uucp-path | Unix到Unix复制协议UUCP路径服务 |
| `119` | TCP | nntp | 用于USENET讨论系统的网络新闻传输协议NNTP |
| `123` | TCP | ntp | 网络时间协议NTP |
| `137` | TCP | netbios-ns | 在红帽企业Linux中被Samba使用的NETBIOS名称服务 |
| `138` | TCP | netbios-dgm | 在红帽企业Linux中被Samba使用的NETBIOS数据报服务 |
| `139` | TCP | netbios-ssn | 在红帽企业Linux中被Samba使用的NET BIOS会话服务 |
| `143` | TCP | imap | 互联网消息存取协议IMAP |
| `161` | TCP | snmp | 简单网络管理协议SNMP |
| `162` | TCP | snmptrap | SNMP的陷阱 |
| `163` | TCP | cmip-man | 通用管理信息协议CMIP |
| `164` | TCP | cmip-agent | 通用管理信息协议CMIP |
| `174` | TCP | mailq | MAILQ |
| `177` | TCP | xdmcp | X显示管理器控制协议 |
| `178` | TCP | nextstep | NeXTStep窗口服务器 |
| `179` | TCP | bgp | 边界网络协议 |
| `191` | TCP | prospero | Cliffod Neuman的Prospero服务 |
| `194` | TCP | irc | 互联网中继聊天IRC |
| `199` | TCP | smux | SNMP UNIX多路复用 |
| `201` | TCP | at-rtmp | AppleTalk选路 |
| `202` | TCP | at-nbp | AppleTalk名称绑定 |
| `204` | TCP | at-echo | AppleTalk echo服务 |
| `206` | TCP | at-zis | AppleTalk区块信息 |
| `209` | TCP | qmtp | 快速邮件传输协议QMTP |
| `210` | TCP | z39.50 | NISO Z39.50数据库 |
| `213` | TCP | ipx | 互联网络分组交换协议IPX被Novell Netware环境常用的数据报协议 |
| `220` | TCP | imap3 | 互联网消息存取协议版本3 |
| `245` | TCP | link | LINK |
| `347` | TCP | fatserv | Fatmen服务器 |
| `363` | TCP | rsvp_tunnel | RSVP隧道 |
| `369` | TCP | rpc2portmap | Coda文件系统端口映射器 |
| `370` | TCP | codaauth2 | Coda文件系统验证服务 |
| `372` | TCP | ulistproc | UNIX Listserv |
| `389` | TCP | ldap | 轻型目录存取协议LDAP |
| `427` | TCP | svrloc | 服务位置协议SLP |
| `434` | TCP | mobileip-agent | 可移互联网协议IP代理 |
| `435` | TCP | mobilip-mn | 可移互联网协议IP管理器 |
| `443` | TCP | https | 安全超文本传输协议HTTP |
| `444` | TCP | snpp | 小型网络分页协议 |
| `445` | TCP | microsoft-ds | 通过TCP/IP的服务器消息块SMB |
| `464` | TCP | kpasswd | Kerberos口令和钥匙改换服务 |
| `468` | TCP | photuris | Photuris会话钥匙管理协议 |
| `487` | TCP | saft | 简单不对称文件传输SAFT协议 |
| `488` | TCP | gss-http | 用于HTTP的通用安全服务GSS |
| `496` | TCP | pim-rp-disc | 用于协议独立的多址传播PIM服务的会合点发现RP-DISC |
| `500` | TCP | isakmp | 互联网安全关联和钥匙管理协议ISAKMP |
| `535` | TCP | iiop | 互联网内部对象请求代理协议IIOP |
| `538` | TCP | gdomap | GNUstep分布式对象映射器GDOMAP |
| `546` | TCP | dhcpv6-client | 动态主机配置协议DHCP版本6客户 |
| `547` | TCP | dhcpv6-server | 动态主机配置协议DHCP版本6服务 |
| `554` | TCP | rtsp | 实时流播协议RTSP |
| `563` | TCP | nntps | 通过安全套接字层的网络新闻传输协议NNTPS |
| `565` | TCP | whoami | whoami |
| `587` | TCP | submission | 邮件消息提交代理MSA |
| `610` | TCP | npmp-local | 网络外设管理协议NPMP本地/分布式排队系统DQS |
| `611` | TCP | npmp-gui | 网络外设管理协议NPMPGUI/分布式排队系统DQS |
| `612` | TCP | hmmp-ind | HMMP指示/DQS |
| `631` | TCP | ipp | 互联网打印协议IPP |
| `636` | TCP | ldaps | 通过安全套接字层的轻型目录访问协议LDAPS |
| `674` | TCP | acap | 应用程序配置存取协议ACAP |
| `694` | TCP | ha-cluster | 用于带有高可用性的群集的心跳服务 |
| `749` | TCP | kerberos-adm | Kerberos版本5v5的“kadmin”数据库管理 |
| `750` | TCP | kerberos-iv | Kerberos版本4v4服务 |
| `765` | TCP | webster | 网络词典 |
| `767` | TCP | phonebook | 网络电话簿 |
| `873` | TCP | rsync | rsync文件传输服务 |
| `992` | TCP | telnets | 通过安全套接字层的TelnetTelnetS |
| `993` | TCP | imaps | 通过安全套接字层的互联网消息存取协议IMAPS |
| `994` | TCP | ircs | 通过安全套接字层的互联网中继聊天IRCS |
| `995` | TCP | pop3s | 通过安全套接字层的邮局协议版本3POPS3 |
<!--rehype:className=show-header left-align-->
### UNIX特有的端口
<!--rehype:wrap-class=col-span-4-->
| 端口号 | 协议 | 使用程序 | 备注/用途 |
| ------ | ---- | ------------------------ | ----------------------------------------------------- |
| `512` | TCP | exec | 用于对远程执行的进程进行验证 |
| `512` | UDP | biff[comsat] | 异步邮件客户biff和服务comsat |
| `513` | TCP | login | 远程登录rlogin |
| `513` | UDP | who[whod] | 登录的用户列表 |
| `514` | TCP | shell[cmd] | 不必登录的远程shellrshell和远程复制rcp |
| `514` | UDP | syslog | UNIX系统日志服务 |
| `515` | TCP | printer[spooler] | 打印机lpr假脱机 |
| `517` | UDP | talk | 远程对话服务和客户 |
| `518` | UDP | ntalk | 网络交谈ntalk远程对话服务和客户 |
| `519` | TCP | utime[unixtime] | UNIX时间协议utime |
| `520` | TCP | efs | 扩展文件名服务器EFS |
| `520` | UDP | router[route,routed] | 选路信息协议RIP |
| `521` | TCP | ripng | 用于互联网协议版本6IPv6的选路信息协议 |
| `525` | TCP | timed[timeserver] | 时间守护进程timed |
| `526` | TCP | tempo[newdate] | Tempo |
| `530` | TCP | courier[rpc] | Courier远程过程调用RPC协议 |
| `531` | TCP | conference[chat] | 互联网中继聊天 |
| `532` | TCP | netnews | Netnews |
| `533` | UDP | netwall | 用于紧急广播的Netwall |
| `540` | TCP | uucp[uucpd] | Unix到Unix复制服务 |
| `543` | TCP | klogin | Kerberos版本5v5远程登录 |
| `544` | TCP | kshell | Kerberos版本5v5远程shell |
| `548` | TCP | afpovertcp | 通过传输控制协议TCP的Appletalk文件编制协议AFP |
| `556` | TCP | remotefs[rfs_server,rfs] | Brunhoff的远程文件系统RFS |
<!--rehype:className=show-header left-align-->
### 注册的端口
<!--rehype:wrap-class=col-span-4-->
| 端口号 | 协议 | 使用程序 | 备注/用途 |
| ------ | ------- | ----------------------- | ----------------------------------------------------- |
| `1080` | TCP | socks | SOCKS网络应用程序代理服务 |
| `1236` | TCP | bvcontrol[rmtcfg] | Garcilis Packeten远程配置服务器 |
| `1300` | TCP | h323hostcallsc | H.323电话会议主机电话安全 |
| `1433` | TCP | ms-sql-s | Microsoft SQL服务器 |
| `1434` | TCP | ms-sql-m | Microsoft SQL监视器 |
| `1494` | TCP | ica | Citrix ICA客户 |
| `1512` | TCP | wins | Microsoft Windows互联网名称服务器 |
| `1524` | TCP | ingreslock | Ingres数据库管理系统DBMS锁定服务 |
| `1525` | TCP | prospero-np | 无特权的Prospero |
| `1645` | TCP | datametrics[old-radius] | Datametrics/从前的radius项目 |
| `1646` | TCP | sa-msg-port[oldradacct] | sa-msg-port/从前的radacct项目 |
| `1649` | TCP | kermit | Kermit文件传输和管理服务 |
| `1701` | TCP | l2tp[l2f] | 第2层隧道服务LT2P/第2层转发L2F |
| `1718` | TCP | h323gatedisc | H.323电讯守门装置发现机制 |
| `1719` | TCP | h323gatestat | H.323电讯守门装置状态 |
| `1720` | TCP | h323hostcall | H.323电讯主持电话设置 |
| `1758` | TCP | tftp-mcast | 小文件FTP组播 |
| `1759` | TCP | mtftp | 组播小文件FTPMTFTP |
| `1789` | TCP | hello | Hello路由器通信端口 |
| `1812` | TCP | radius | Radius拨号验证和记帐服务 |
| `1813` | TCP | radius-acct | Radius记帐 |
| `1911` | TCP | mtp | Starlight网络多媒体传输协议MTP |
| `1985` | TCP | hsrp | Cisco热备用路由器协议 |
| `1986` | TCP | licensedaemon | Cisco许可管理守护进程 |
| `1997` | TCP | gdp-port | Cisco网关发现协议GDP |
| `2049` | TCP | nfs[nfsd] | 网络文件系统NFS |
| `2102` | TCP | zephyr-srv | Zephyr通知传输和发送服务器 |
| `2103` | TCP | zephyr-clt | Zephyr serv-hm连接 |
| `2104` | TCP | zephyr-hm | Zephyr主机管理器 |
| `2401` | TCP | cvspserver | 并行版本系统CVS客户/服务器操作 |
| `2430` | TCP/UDP | venus | 用于Coda文件系统codacon端口的Venus缓存管理器 |
| `2431` | TCP/UDP | venus-se | Venus传输控制协议TCP的副作用 |
| `2432` | UDP | codasrv | Coda文件系统服务器端口 |
| `2433` | TCP/UDP | codasrv-se | Coda文件系统TCP/UDP副作用 |
| `2600` | TCP | hpstgmgr[zebrasrv] | HPSTGMGRZebra选路 |
| `2601` | TCP | discp-client[zebra] | discp客户Zebra集成的shell |
| `2602` | TCP | discp-server[ripd] | discp服务器选路信息协议守护进程ripd |
| `2603` | TCP | servicemeter[ripngd] | 服务计量用于IPv6的RIP守护进程 |
| `2604` | TCP | nsc-ccs[ospfd] | NSC CCS开放式短路径优先守护进程ospfd |
| `2605` | TCP | nsc-posa | NSC POSA边界网络协议守护进程bgpd |
| `2606` | TCP | netmon[ospf6d] | Dell Netmon用于IPv6的OSPF守护进程ospf6d |
| `2809` | TCP | corbaloc | 公共对象请求代理体系CORBA命名服务定位器 |
| `3130` | TCP | icpv2 | 互联网缓存协议版本2v2被Squid代理缓存服务器使用 |
| `3306` | TCP | mysql | MySQL数据库服务 |
| `3346` | TCP | trnsprntproxy | Trnsprnt代理 |
| `4011` | TCP | pxe | 执行前环境PXE服务 |
| `4321` | TCP | rwhois | 远程Whoisrwhois服务 |
| `4444` | TCP | krb524 | Kerberos版本5v5到版本4v4门票转换器 |
| `5002` | TCP | rfe | 无射频以太网RFE音频广播系统 |
| `5308` | TCP | cfengine | 配置引擎Cfengine |
| `5999` | TCP | cvsup[CVSup] | CVSup文件传输和更新工具 |
| `6000` | TCP | x11[X] | X窗口系统服务 |
| `7000` | TCP | afs3-fileserver | Andrew文件系统AFS文件服务器 |
| `7001` | TCP | afs3-callback | 用于给缓存管理器回电的AFS端口 |
| `7002` | TCP | afs3-prserver | AFS用户和组群数据库 |
| `7003` | TCP | afs3-vlserver | AFS文件卷位置数据库 |
| `7004` | TCP | afs3-kaserver | AFS Kerberos验证服务 |
| `7005` | TCP | afs3-volser | AFS文件卷管理服务器 |
| `7006` | TCP | afs3-errors | AFS错误解释服务 |
| `7007` | TCP | afs3-bos | AFS基本监查进程 |
| `7008` | TCP | afs3-update | AFS服务器到服务器更新器 |
| `7009` | TCP | afs3-rmtsys | AFS远程缓存管理器服务 |
| `9876` | TCP | sd | 会话指引器 |
| `10080` | TCP | amanda | 高级Maryland自动网络磁盘归档器Amanda备份服务 |
| `11371` | TCP | pgpkeyserver | 良好隐私PGP/GNU隐私卫士GPG公钥服务器 |
| `11720` | TCP | h323callsigalt | H.323调用信号交替 |
| `13720` | TCP | bprd | Veritas NetBackup请求守护进程bprd |
| `13721` | TCP | bpdbm | Veritas NetBackup数据库管理器bpdbm |
| `13722` | TCP | bpjava-msvc | Veritas NetBackup Java/Microsoft Visual C++(MSVC)协议 |
| `13724` | TCP | vnetd | Veritas网络工具 |
| `13782` | TCP | bpcd | Vertias NetBackup |
| `13783` | TCP | vopied | Veritas VOPIED协议 |
| `22273` | TCP | wnn6[wnn4] | 假名/汉字转换系统 |
| `26000` | TCP | quake | Quake以及相关的多人游戏服务器 |
| `26208` | TCP | wnn6-ds | - |
| `33434` | TCP | traceroute | Traceroute网络跟踪工具 |
<!--rehype:className=show-header left-align-->
### 数据报传递协议端口
<!--rehype:wrap-class=col-span-4-->
| 端口号 | 协议 | 使用程序 | 备注/用途 |
| ------ | ---- | -------- | ------------------ |
| `1` | DDP | rtmp | 路由表管理协议 |
| `2` | DDP | nbp | 名称绑定协议 |
| `4` | DDP | echo | AppleTalk Echo协议 |
| `6` | DDP | zip | 区块信息协议 |
<!--rehype:className=show-header left-align-->
### Kerberos工程Athena/MIT端口
<!--rehype:wrap-class=col-span-4-->
| 端口号 | 协议 | 使用程序 | 备注/用途 |
| ------ | ---- | --------------- | ----------------------------------- |
| `751` | TCP | kerberos_master | Kerberos验证 |
| `752` | TCP | passwd_server | Kerberos口令kpasswd服务器 |
| `754` | TCP | krb5_prop | Kerberos v5从属传播 |
| `760` | TCP | krbupdate[kreg] | Kerberos注册 |
| `1109` | TCP | kpop | Kerberos邮局协议KPOP |
| `2053` | TCP | knetd | Kerberos多路分用器 |
| `2105` | TCP | eklogin | Kerberos v5加密的远程登录rlogin |
<!--rehype:className=show-header left-align-->
### 未注册的端口
<!--rehype:wrap-class=col-span-4-->
| 端口号 | 协议 | 使用程序 | 备注/用途 |
| ------ | ---- | ------------------------ | ----------------------------------------------------------- |
| `15` | TCP | netstat | 网络状态netstat |
| `98` | TCP | linuxconf | Linuxconf Linux管理工具 |
| `106` | TCP | poppassd | 邮局协议口令改变守护进程POPPASSD |
| `465` | TCP | smtps | 通过安全套接字层的简单邮件传输协议SMTPS |
| `616` | TCP | gii | 使用网关的(选路守护进程)互动界面 |
| `808` | TCP | omirr[omirrd] | 联机镜像Omirr文件镜像服务 |
| `871` | TCP | supfileserv | 软件升级协议SUP服务器 |
| `901` | TCP | swat | Samba万维网管理工具SWAT |
| `953` | TCP | rndc | Berkeley互联网名称域版本9BIND 9远程名称守护进程配置工具 |
| `1127` | TCP | sufiledbg | 软件升级协议SUP调试 |
| `1178` | TCP | skkserv | 简单假名到汉字SKK日文输入服务器 |
| `1313` | TCP | xtel | 法国Minitel文本信息系统 |
| `1529` | TCP | support[prmsd,gnatsd] | GNATS错误跟踪系统 |
| `2003` | TCP | cfinger | GNU Finger服务 |
| `2150` | TCP | ninstall | 网络安装服务 |
| `2988` | TCP | afbackup | afbackup客户-服务器备份系统 |
| `3128` | TCP | squid | Squid万维网代理缓存 |
| `3455` | TCP | prsvp | RSVP端口 |
| `5432` | TCP | postgres | PostgreSQL数据库 |
| `4557` | TCP | fax | FAX传输服务旧服务 |
| `4559` | TCP | hylafax | HylaFAX客户-服务器协议(新服务) |
| `5232` | TCP | sgi-dgl | SGI分布式图形库 |
| `5354` | TCP | noclog | NOCOL网络操作中心记录守护进程noclogd |
| `5355` | TCP | hostmon | NOCOL网络操作中心主机监视 |
| `5680` | TCP | canna | Canna日文字符输入界面 |
| `6010` | TCP | x11-ssh-offset | 安全ShellSSHX11转发偏移 |
| `6667` | TCP | ircd | 互联网中继聊天守护进程ircd |
| `7100` | TCP | xfs | X字体服务器XFS |
| `7666` | TCP | tircproxy | Tircproxy IRC代理服务 |
| `8008` | TCP | http-alt | 超文本传输协议HTTP的另一选择 |
| `8080` | TCP | webcache | 万维网WWW缓存服务 |
| `8081` | TCP | tproxy | 透明代理 |
| `9100` | TCP | jetdirect[laserjet,hplj] | Hewlett-Packard(HP)JetDirect网络打印服务 |
| `9359` | TCP | mandelspawn[mandelbrot] | 用于X窗口系统的并行Mandelbrot生成程序 |
| `10081` | TCP | kamanda | 使用Kerberos的Amanda备份服务 |
| `10082` | TCP | amandaidx | Amanda备份服务 |
| `10083` | TCP | amidxtape | Amanda备份服务 |
| `20011` | TCP | isdnlog | 综合业务数字网ISDN登录系统 |
| `20012` | TCP | vboxd | ISDN音箱守护进程vboxd |
| `22305` | TCP | wnn4_Kr | kWnn韩文输入系统 |
| `22289` | TCP | wnn4_Cn | cWnn中文输入系统 |
| `22321` | TCP | wnn4_Tw | tWnn中文输入系统台湾 |
| `24554` | TCP | binkp | Binkley TCP/IP Fidonet邮寄程序守护进程 |
| `27374` | TCP | asp | 地址搜索协议 |
| `60177` | TCP | tfido | Ifmail FidoNet兼容邮寄服务 |
| `60179` | TCP | fido | FidoNet电子邮件和新闻网络 |
<!--rehype:className=show-header left-align-->

View File

@ -177,7 +177,7 @@ SELECT table_schema,table_name FROM information_schema.tables ORDER BY table_sch
SELECT * FROM pg_catalog.pg_tables
```
表表架
出表结
```sql
\d <table_name>

418
docs/powershell.md Normal file
View File

@ -0,0 +1,418 @@
PowerShell 备忘清单
===
PowerShell 用于自动化任务和配置管理的常用命令的备忘清单,可帮助系统管理员快速参考常用操作。
常用操作
---
### 辅助命令
<!--rehype:wrap-class=row-span-2-->
**_PowerShell 的命令遵循动词-名词格式_** 一些常见的动词:
| 动词 | 描述 |
| ------- | ------------------------ |
| Get | 用于检索信息 |
| Set | 用于配置或更改设置 |
| New | 用于创建新对象实例 |
| Remove | 用于删除或移除项目 |
| Invoke | 用于执行特定的操作或动作 |
| Start | 用于启动进程或操作 |
| Stop | 用于停止或终止进程或操作 |
| Enable | 用于激活或启用功能 |
| Disable | 用于停用或禁用功能 |
| Test | 用于执行测试或检查 |
| Update | 用于更新或刷新数据或配置 |
列出可用模块
```PowerShell
Get-Module --ListAvailable
```
列出可用的 cmdlet 和函数
```PowerShell
Get-Command -Module ActiveDirectory
```
列出别名及其对应的 cmdlet 名称
```PowerShell
Get-Alias | Select-Object Name, Definition
```
获取帮助
```PowerShell
Get-Help <cmd>
Get-Help <cmd> -Examples
Get-Help -Name Get-Process -Parameter Id
```
**Get-Member:** 显示对象的属性和方法
```PowerShell
Get-Process | Get-Member
```
### 对象操作
<!--rehype:wrap-class=col-span-2-->
**Select-Object:** 选择对象的特定属性或自定义其显示
```PowerShell
Get-Process | Select-Object Name, CPU
```
**Where-Object:** 根据指定条件过滤对象
```PowerShell
Get-Service | Where-Object { $PSItem.Status -eq 'Running' }
#OR
Get-Service | ? { $_.Status -eq 'Running' }
```
**Measure-Object:** 计算对象属性的统计信息,如总和、平均值和计数
```PowerShell
Get-Process | Measure-Object -Property WorkingSet -Sum
```
**ForEach-Object:** 对集合中的每个对象执行操作(注意:以下命令将为当前目录中的文件/文件夹添加前缀)
```PowerShell
Get-ChildItem | ForEach-Object { Rename-Item $_ -NewName "Prefix_$_" }
```
**Sort-Object:** 按指定属性对对象进行排序
```PowerShell
Get-ChildItem | Sort-Object Length -Descending
```
**Format-Table:** 将输出格式化为带有指定列的表格
```PowerShell
Get-Service | Format-Table -AutoSize # ft alias
```
**Format-List:** 将输出格式化为属性和值的列表
```PowerShell
Get-Process | Format-List -Property Name, CPU # fl alias
```
### 文件系统
<!--rehype:wrap-class=col-span-2-->
```PowerShell
New-Item -path file.txt -type 'file' -value 'contents'
New-Item -path file.txt -type 'dir'
Copy-Item <src> -destination <dest>
Move-Item -path <src> -destination <dest>
Remove-Item <file>
Test-Path <path>
Rename-Item -path <path> -newname <newname>
# using .NET Base Class Library
[System.IO.File]::WriteAllText('test.txt', '')
[System.IO.File]::Delete('test.txt')
Get-Content -Path "test.txt"
Get-Process | Out-File -FilePath "processes.txt"# 输出到文件
Get-Process | Export-Csv -Path "processes.csv" # 输出到 CSV
$data = Import-Csv -Path "data.csv" # 从 CSV 导入
```
系统管理
---
### 获取信息
```PowerShell
# 获取 BIOS 信息
Get-CimInstance -ClassName Win32_BIOS
# 获取本地连接的物理磁盘设备信息
Get-CimInstance -ClassName Win32_DiskDrive
# 获取安装的物理内存RAM信息
Get-CimInstance -ClassName Win32_PhysicalMemory
# 获取安装的网络适配器(物理 + 虚拟)信息
Get-CimInstance -ClassName Win32_NetworkAdapter
# 获取安装的图形/显卡GPU信息
Get-CimInstance -ClassName Win32_VideoController
```
### 命名空间 & 类
列出所有类名
```PowerShell
Get-CimClass | Select-Object -ExpandProperty CimClassName
```
<!--rehype:className=wrap-text-->
探索 root\cimv2 命名空间中的各种 WMI 类
```PowerShell
Get-CimClass -Namespace root\cimv2
```
<!--rehype:className=wrap-text-->
探索 root\cimv2 命名空间下的子 WMI 命名空间
```PowerShell
Get-CimInstance -Namespace root -ClassName __NAMESPACE
```
<!--rehype:className=wrap-text-->
### 网络管理
```PowerShell
# 测试与远程主机的网络连接
Test-Connection -ComputerName google.com
# 获取网络适配器信息
Get-NetAdapter
# 获取 IP 地址信息
Get-NetIPAddress
# 获取路由表信息
Get-NetRoute
# 测试远程主机上的端口是否开放
Test-NetConnection google.com -Port 80
```
### 用户和组管理
```PowerShell
# 获取本地用户账户信息
Get-LocalUser
# 创建新的本地用户账户
New-LocalUser -Name NewUser -Password (ConvertTo-SecureString "Password123" -AsPlainText -Force)
# 删除本地用户账户
Remove-LocalUser -Name UserToRemove
# 获取本地组信息
Get-LocalGroup
# 将成员添加到本地组
Add-LocalGroupMember -Group Administrators -Member UserToAdd
```
### 安全性和权限
获取文件/目录的访问控制列表
```PowerShell
Get-Acl C:\Path\To\File.txt
```
设置文件/目录的访问控制列表
```PowerShell
Set-Acl -Path C:\Path\To\File.txt -AclObject $aclObject
```
<!--rehype:className=wrap-text-->
### 注册表管理
```PowerShell
# 获取注册表键值
Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" | Select DisplayName, DisplayVersion
# 设置注册表键值
Set-ItemProperty -Path "HKLM:\Software\MyApp" -Name "SettingName" -Value "NewValue"
# 创建新的注册表键值
New-ItemProperty -Path "HKCU:\Software\MyApp" -Name "NewSetting" -Value "NewValue" -PropertyType String
# 删除注册表键值
Remove-ItemProperty -Path "HKCU:\Software\MyApp" -Name "SettingToRemove"
# 检查注册表键是否存在
Test-Path "HKLM:\Software\MyApp"
```
## 脚本
### 变量
初始化变量,指定或不指定类型:
```PowerShell
$var = 0
[int] $var = 'Trevor' # (抛出异常)
[string] $var = 'Trevor' # (不会抛出异常)
$var.GetType()
# 多重赋值
$a,$b,$c = 'a','b','c'
# 创建数组
$arrayvar = @('va1','va2')
# 创建字典
$dict = @{k1 = 'test'; k2 = 'best'}
```
变量命令
```PowerShell
New-Variable -Name FirstName -Value Trevor
New-Variable FirstName -Value Trevor -Option <ReadOnly/Constant>
Get-Variable
Get-Variable | ? { $PSItem.Options -contains 'constant' }
Get-Variable | ? { $PSItem.Options -contains 'readonly' }
Remove-Variable -Name firstname
# 删除只读变量
Remove-Variable -Name firstname -Force
```
变量类型int32, int64, string, bool
### 运算符
```PowerShell
# 运算符
# (a <op> b)
= , += / -= , ++ / --
-eq / -ne , -lt / -gt , -le / -ge
$FirstName = 'Trevor'
$FirstName -like 'T*'
$true; $false # 布尔值 true/false
# 三元运算符
$FoodToEat = $BaconIsYummy ? 'bacon' : 'beets'
# -notin 或 -in
'Celery' -in @('Bacon', 'Sausage', 'Steak')
# 输出: True
5 -is [int32]
# 正则表达式匹配,可以使用数组
'Trevor' -match '^T\w*'
# 查找多个匹配项
$regex = [regex]'(\w*)'
$regex.Matches('this is test').Value
```
### Structure
#### 输入输出操作
```PowerShell
"This displays a string"
Write-Host "color" -ForegroundColor Red
$age = Read-host "Enter age"
$pwd = Read-host "password" -asSecureString
Clear-Host
```
#### 流控制
```PowerShell
IF(<#Condition#>){
<#Commands#>}ELSEIF(){}ELSE{}
Switch($var){
"val1"{<#Commands#>; break}
"val2"{<#Commands#>; break}
}
For($ct=0;$ct -le 3;$ct++){}
ForEach($var in $arr){}
while($var -ne 0){}
Do{}While()
```
### 函数 / 模块
#### 示例 1
```PowerShell
function funcname{
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[String]$user
)
Write-Host "welcome " $user
return "value"
}
$var = funcname -user pcb
```
#### 示例 2
```PowerShell
function Get-EvenNumbers {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline = $true)]
[int] $Number
)
begin {<#command#>}
process {
if ($Number % 2 -eq 0) {
Write-Output $Number
}
}
end {<#command#>}
}
1..10 | Get-EvenNumbers
```
#### 模块
```PowerShell
# PowerShell 在路径中查找模块
$env:PSModulePath
# 列出系统上安装的所有模块
Get-Module -ListAvailable
# 列出当前会话中导入的模块
Get-Module
Import-Module <moduleName>
Remove-Module <moduleName>
Find-Module -Tag cloud
Find-Module -Name ps*
# 创建一个内存中的 PowerShell 模块
New-Module -Name trevor -ScriptBlock {
function Add($a,$b) { $a + $b } }
```
### 注意
- 在大多数语言中,转义字符是反斜杠 **\\**,而在 PowerShell 中是反引号 **`**
## 参考
- [Microsoft PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/samples/sample-scripts-for-administration?view=powershell-7.3) _(learn.microsoft.com)_
- [cheatsheets](https://cheatsheets.zip/powershell)

View File

@ -1817,7 +1817,7 @@ finally: # 在所有情况下执行
### pyenv & pipenv
<!--rehype:wrap-class=col-span-3-->
pvenv 用于管理python版本pipenv 用于管理项目包版本
pyenv 用于管理python版本pipenv 用于管理项目包版本
#### pyenv
@ -1829,13 +1829,21 @@ curl https://pyenv.run | bash
[更多安装方式](https://github.com/pyenv/pyenv#installation)
```shell
# 查看 pyenv 可以安装的 python 版本列表
pyenv install -l
# 按照 3.10 的前缀显示 python 的最新版本
pyenv latest 3.10
# 安装 python 版本
pyenv install 3.10.12
pyenv install 3.10.14
# 查看已安装的 python 版本
pyenv versions
# 设置 python 版本
pyenv global 3.10.12 # 全局设置
pyenv shell 3.10.12 # 针对当前 shell session
pyenv local 3.10.12 # 针对当前目录
pyenv global 3.10.14 # 全局设置
pyenv shell 3.10.14 # 针对当前 shell session
pyenv local 3.10.14 # 针对当前目录
```
#### pipenv

View File

@ -13,6 +13,7 @@ Pytorch 是一种开源机器学习框架,可加速从研究原型设计到生
- [Pytorch 官方备忘清单](https://pytorch.org/tutorials/beginner/ptcheat.html) _(pytorch.org)_
### 认识 Pytorch
<!--rehype:wrap-class=row-span-2-->
```python
from __future__ import print_function
@ -32,6 +33,7 @@ tensor([
Tensors 张量: 张量的概念类似于Numpy中的ndarray数据结构, 最大的区别在于Tensor可以利用GPU的加速功能.
### 创建一个全零矩阵
<!--rehype:wrap-class=row-span-2-->
```python
x = torch.zeros(5, 3, dtype=torch.long)
@ -95,6 +97,7 @@ tensor([[ 1.6978, -1.6979, 0.3093],
```
### 加法操作(4)
<!--rehype:wrap-class=row-span-2-->
```python
y.add_(x)
@ -118,6 +121,7 @@ tensor([-2.0902, -0.4489, -0.1441, 0.8035, -0.8341])
<!--rehype:className=wrap-text-->
### 张量形状
<!--rehype:wrap-class=row-span-2-->
```python
x = torch.randn(4, 4)
@ -178,13 +182,21 @@ tensor([2., 2., 2., 2., 2.], dtype=torch.float64)
```python
>>> x = torch.rand(1, 2, 1, 28, 1)
>>> x.squeeze().shape # squeeze不加参数默认去除所有为1的维度
# squeeze不加参数默认去除所有为1的维度
>>> x.squeeze().shape
torch.Size([2, 28])
>>> x.squeeze(dim=0).shape # squeeze加参数去除指定为1的维度
# squeeze加参数去除指定为1的维度
>>> x.squeeze(dim=0).shape
torch.Size([2, 1, 28, 1])
>>> x.squeeze(1).shape # squeeze加参数如果不为1则不变
# squeeze加参数如果不为1则不变
>>> x.squeeze(1).shape
torch.Size([1, 2, 1, 28, 1])
>>> torch.squeeze(x,-1).shape # 既可以是函数,也可以是方法
# 既可以是函数,也可以是方法
>>> torch.squeeze(x,-1).shape
torch.Size([1, 2, 1, 28])
```
@ -192,12 +204,59 @@ torch.Size([1, 2, 1, 28])
```python
>>> x = torch.rand(2, 28)
>>> x.unsqueeze(0).shape # unsqueeze必须加参数 _ 2 _ 28 _
torch.Size([1, 2, 28]) # 参数代表在哪里添加维度 0 1 2
>>> torch.unsqueeze(x, -1).shape # 既可以是函数,也可以是方法
# unsqueeze必须加参数 _ 2 _ 28 _
>>> x.unsqueeze(0).shape
# 参数代表在哪里添加维度 0 1 2
torch.Size([1, 2, 28])
# 既可以是函数,也可以是方法
>>> torch.unsqueeze(x, -1).shape
torch.Size([2, 28, 1])
```
Cuda 相关
---
### 检查 Cuda 是否可用
```python
>>> import torch.cuda
>>> torch.cuda.is_available()
>>> True
```
### 列出 GPU 设备
<!--rehype:wrap-class=col-span-2 row-span-2-->
```python
import torch
device_count = torch.cuda.device_count()
print("CUDA 设备")
for i in range(device_count):
device_name = torch.cuda.get_device_name(i)
total_memory = torch.cuda.get_device_properties(i).total_memory / (1024 ** 3)
print(f"├── 设备 {i}: {device_name}, 容量: {total_memory:.2f} GiB")
print("└── (结束)")
```
### 将模型、张量等数据在 GPU 和内存之间进行搬运
```python
import torch
# 将 0 替换为您的 GPU 设备索引或者直接使用 "cuda"
device = f"cuda:0"
# 移动到GPU
tensor_m = torch.tensor([1, 2, 3])
tensor_g = tensor_m.to(device)
model_m = torch.nn.Linear(1, 1)
model_g = model_m.to(device)
# 向后移动
tensor_m = tensor_g.cpu()
model_m = model_g.cpu()
```
导入 Imports
---
@ -206,28 +265,71 @@ torch.Size([2, 28, 1])
```python
# 根包
import torch
# 数据集表示和加载
```
数据集表示和加载
```python
from torch.utils.data import Dataset, DataLoader
```
<!--rehype:className=wrap-text-->
### 神经网络 API
<!--rehype:wrap-class=row-span-2-->
```python
# 计算图
import torch.autograd as autograd
# 计算图中的张量节点
from torch import Tensor
# 神经网络
```
神经网络
```python
import torch.nn as nn
# 层、激活等
import torch.nn.functional as F
# 优化器,例如 梯度下降、ADAM等
import torch.optim as optim
# 混合前端装饰器和跟踪 jit
```
混合前端装饰器和跟踪 jit
```python
from torch.jit import script, trace
```
### ONNX
<!--rehype:wrap-class=row-span-2-->
```python
torch.onnx.export(model, dummy data, xxxx.proto)
# 导出 ONNX 格式
# 使用经过训练的模型模型dummy
# 数据和所需的文件名
```
<!--rehype:className=wrap-text-->
加载 ONNX 模型
```python
model = onnx.load("alexnet.proto")
```
检查模型IT 是否结构良好
```python
onnx.checker.check_model(model)
```
打印一个人类可读的,图的表示
```python
onnx.helper.printable_graph(model.graph)
```
### Torchscript 和 JIT
```python
@ -242,25 +344,8 @@ torch.jit.trace()
装饰器用于指示被跟踪代码中的数据相关控制流
### ONNX
```python
torch.onnx.export(model, dummy data, xxxx.proto)
# 导出 ONNX 格式
# 使用经过训练的模型模型dummy
# 数据和所需的文件名
model = onnx.load("alexnet.proto")
# 加载 ONNX 模型
onnx.checker.check_model(model)
# 检查模型IT 是否结构良好
onnx.helper.printable_graph(model.graph)
# 打印一个人类可读的,图的表示
```
<!--rehype:className=wrap-text-->
### Vision
<!--rehype:wrap-class=col-span-2-->
```python
# 视觉数据集,架构 & 变换

View File

@ -80,9 +80,9 @@ npm run start # 监听 md 文件编译输出 HTML
<!--rehype:class=home-card-->
```
首页导航图标存放在 `scripts/assets` 目录中,如果你的备忘清单定义为 `docs/cron.md`,那么你的图标就定义为 `cron.svg` 存放到 `scripts/assets` 目录中,重新编译首页当行菜单就拥有了图标。
首页导航图标存放在 `/assets` 目录中,如果你的备忘清单定义为 `docs/cron.md`,那么你的图标就定义为 `cron.svg` 存放到 `/assets` 目录中,重新编译首页当行菜单就拥有了图标。
- 图标存放在 [`scripts/assets`](https://github.com/jaywcjlove/reference/blob/main/scripts/assets) 目录中
- 图标存放在 [`/assets`](https://github.com/jaywcjlove/reference/tree/main/assets) 目录中
- 图片名称与清单名称保持一致 `cron.md` -> `cron.svg` (注意大小写)
- SVG 图标尺寸 `<svg height="1em" width="1em"`
- SVG 图标颜色使用继承颜色值 `<svg fill="currentColor"`
@ -197,23 +197,37 @@ license = "支持 HTML 字符串"
```
### 支持更多配置加载
<!--rehype:wrap-class=col-span-2-->
```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
```
- `.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`
<!--rehype:className=cols-3 style-none-->
### 环境变量
@ -390,7 +404,15 @@ export const Student = (
| `快捷键` | 说明 |
<!--rehype:className=shortcuts-->
添加 `<!--rehype:className=shortcuts-->` 样式类,展示快捷键样式。
列添加 `<!--rehype:className=shortcuts-->` 样式类,展示快捷键样式。
| Key | value |
| ---- | ---- |
| 说明 | `快捷键` |
| 说明 | `快捷键` |
<!--rehype:className=shortcuts-last-->
列尾添加 `<!--rehype:className=shortcuts-last-->` 样式类,展示快捷键样式。
### 代码行号
@ -465,7 +487,8 @@ const school = <div>学校</div>;
---- | ----
`<!--rehype:className=wrap-text-->` | 强制`换行`
`<!--rehype:className=show-header-->` | 展示表格`表头`
`<!--rehype:className=shortcuts-->` | `快捷键`样式
`<!--rehype:className=shortcuts-->` | 首列`快捷键`样式
`<!--rehype:className=shortcuts-last-->` | 尾列`快捷键`样式
`<!--rehype:className=auto-wrap-->` | 隐藏表头强制小尺寸`自动换行`
`<!--rehype:className=style-list-arrow-->` | 列表`箭头`样式展示表格
`<!--rehype:className=style-list-->` | `列表`样式展示表格
@ -798,7 +821,7 @@ H2 部分
### Title 6
```
在 `Title 1` 标题添加 `col-span-2` 和 `row-span-2` 占位类,使用 `空格` 间隔。
[#](https://github.com/jaywcjlove/reference/blob/8fad19506946ae84139002ff367e2f2bca9b0696/docs/quickreference.md?plain=1#L774-L775)<!--rehype:target=__blank--> 在 `Title 1` 标题添加 `col-span-2` 和 `row-span-2` 占位类,使用 `空格` 间隔。
表格
---
@ -813,14 +836,14 @@ H2 部分
`%A, %B %e, %Y` | Sunday, June 5, 2013
`%b %e %a` | Jun 5 Sun
#### Time
#### Time (H4)
:- | :-
:- | :-
`%H:%M` | 23:05
`%I:%M %p` | 11:05 PM
标题为 `H4` 的基本表格。
[#](https://github.com/jaywcjlove/reference/blob/8fad19506946ae84139002ff367e2f2bca9b0696/docs/quickreference.md?plain=1#L806-L823)<!--rehype:target=__blank--> 标题为 `H4` 的基本表格。
### 快捷键
@ -833,6 +856,9 @@ H2 部分
`R` | Rectangle
`O` | Oval
`U` | Rounded
<!--rehype:className=shortcuts-->
[#](https://github.com/jaywcjlove/reference/blob/8fad19506946ae84139002ff367e2f2bca9b0696/docs/quickreference.md?plain=1#L827-L836)<!--rehype:target=__blank--> `<!--rehype:className=shortcuts-->`
### 展示标题
@ -843,7 +869,7 @@ H2 部分
`/` | `/html/body/div` | Root
<!--rehype:className=show-header-->
`<!--rehype:className=show-header-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L839-L844)<!--rehype:target=__blank--> `<!--rehype:className=show-header-->`
### 列表样式展示表格
@ -854,7 +880,7 @@ H2 部分
`titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏
<!--rehype:className=style-list-->
`<!--rehype:className=style-list-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L850-L855)<!--rehype:target=__blank--> `<!--rehype:className=style-list-->`
### 列表箭头样式展示表格
@ -865,7 +891,7 @@ H2 部分
`titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏
<!--rehype:className=style-list-arrow-->
`<!--rehype:className=style-list-arrow-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L861-L866)<!--rehype:target=__blank--> `<!--rehype:className=style-list-arrow-->`
### 隐藏表头强制小尺寸自动换行
@ -876,7 +902,7 @@ H2 部分
`titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏
<!--rehype:className=auto-wrap-->
`<!--rehype:className=auto-wrap-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L872-L877)<!--rehype:target=__blank--> `<!--rehype:className=auto-wrap-->`
### 表格末尾列左对齐
<!--rehype:wrap-class=col-span-2-->
@ -887,7 +913,7 @@ H2 部分
`./` | Relative
<!--rehype:className=show-header left-align-->
默认表格末尾列`右对齐`,添加 `<!--rehype:className=left-align-->` 类让其`左对齐`
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L884-L888)<!--rehype:target=__blank--> 默认表格末尾列`右对齐`,添加 `<!--rehype:className=left-align-->` 类让其`左对齐`
### 强制 code 不换行
@ -897,7 +923,7 @@ H2 部分
| `adb reboot bootloader` | Reboots the device into fastboot |
<!--rehype:className=show-header code-nowrap-->
添加 `<!--rehype:className=code-nowrap-->` 注释
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L894-L898)<!--rehype:target=__blank--> 添加 `<!--rehype:className=code-nowrap-->`
列表
---
@ -908,6 +934,8 @@ H2 部分
- Item 2
- Item 3
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L905-L909)<!--rehype:target=__blank-->
### 四列
- Item 1
@ -920,7 +948,7 @@ H2 部分
- Item 8
<!--rehype:className=cols-4-->
`<!--rehype:className=cols-4-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L913-L921)<!--rehype:target=__blank--> `<!--rehype:className=cols-4-->`
### 列表步骤
<!--rehype:wrap-class=row-span-2-->
@ -944,7 +972,7 @@ H2 部分
```
<!--rehype:className=style-timeline-->
`<!--rehype:className=style-timeline-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L928-L945)<!--rehype:target=__blank--> `<!--rehype:className=style-timeline-->`
### 没有标记
@ -959,7 +987,7 @@ H2 部分
- Item 9
<!--rehype:className=cols-3 style-none-->
`<!--rehype:className=cols-3 style-none-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L951-L960)<!--rehype:target=__blank--> `<!--rehype:className=cols-3 style-none-->`
### 圆圈标记
@ -968,7 +996,7 @@ H2 部分
- Item 3
<!--rehype:className=style-round-->
`<!--rehype:className=style-round-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L966-L969)<!--rehype:target=__blank--> `<!--rehype:className=style-round-->`
### 箭头标记
@ -977,7 +1005,7 @@ H2 部分
- Item 3
<!--rehype:className=style-arrow-->
`<!--rehype:className=style-arrow-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L975-L978)<!--rehype:target=__blank--> `<!--rehype:className=style-arrow-->`
H2 部分 - 5列效果展示
---
@ -990,6 +1018,8 @@ H2 部分 - 5列效果展示
...
```
[#示例](https://github.com/jaywcjlove/reference/blob/8ae69f23860c1854a81aeceb81a6cc0bc0998fc4/docs/quickreference.md?plain=1#L1012-L1021)<!--rehype:target=__blank-->
### Two
```
@ -1024,7 +1054,7 @@ H3 部分 - 占位效果展示
...合并两行
```
`<!--rehype:wrap-class=row-span-2-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1020-L1027)<!--rehype:target=__blank--> `<!--rehype:wrap-class=row-span-2-->`
### col-span-2
<!--rehype:wrap-class=col-span-2-->
@ -1033,7 +1063,7 @@ H3 部分 - 占位效果展示
...合并两列
```
`<!--rehype:wrap-class=col-span-2-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1020-L1027)<!--rehype:target=__blank--> `<!--rehype:wrap-class=col-span-2-->`
### 红色标题
<!--rehype:style=background:#e91e63;-->
@ -1042,7 +1072,7 @@ H3 部分 - 占位效果展示
...红色标题配置
```
`<!--rehype:style=background:#e91e63;-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1038-L1043)<!--rehype:target=__blank--> `<!--rehype:style=background:#e91e63;-->`
### 黄色标题
<!--rehype:style=background:#d7a100;-->
@ -1051,18 +1081,16 @@ H3 部分 - 占位效果展示
...黄色标题配置
```
`<!--rehype:style=background:#d7a100;-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1047-L1052)<!--rehype:target=__blank--> `<!--rehype:style=background:#d7a100;-->`
### col-span-3
<!--rehype:wrap-class=col-span-3-->
```
...
```
... [#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1056-L1061)<!--rehype:target=__blank--> 三列合并
### 卡片子项
每个部分可以有以下子项:
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1063-L1077)<!--rehype:target=__blank--> 每个部分可以有以下子项:
#### H4 子标题
@ -1080,13 +1108,15 @@ H3 部分 - 占位效果展示
每个盒子(卡片)都是一个 `H3` 部分。 盒子将包含 `H3` 自身内的所有东西。
这是一个包含段落的基本部分
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1079-L1083)<!--rehype:target=__blank--> 这是一个包含段落的基本部分
### H3 部分背景颜色
<!--rehype:wrap-style=background: #1b5064;-->
<!--rehype:wrap-style=background: #1e7da173;-->
```markdown
注释配置:
`<!--rehype:wrap-style=background: #1b5064;-->`
`<!--rehype:wrap-style=background: #1e7da173;-->`
```
<!--rehype:className=wrap-text -->
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1085-L1087)<!--rehype:target=__blank-->

View File

@ -16,7 +16,7 @@ React 备忘清单
React 是一个用于构建用户界面的 JavaScript 库
- [React 官方文档](https://reactjs.org/) _(reactjs.org)_
- [React 官方文档](https://react.dev) _(react.dev)_
- [Styled Components 备忘清单](./styled-components.md) _(jaywcjlove.github.io)_
- [TypeScript JSX 备忘清单](./typescript.md#jsx) _(jaywcjlove.github.io)_
@ -542,6 +542,150 @@ function CustomButton() {
}
```
Props
---
### Props 的 Spread 运算符
扩展运算符可用于一次传递所有 Props。
```jsx
function Profile(props) {
return <p>{props.name}, {props.age}</p>;
}
const user = { name: "John", age: 25 };
<Profile {...user}/>
```
### 什么是 Props
- Props“properties”的缩写用于将数据从父组件传递到子组件。
- 它们是只读的,不能在子组件内修改。
```jsx
<MyComponent propName="value" />
```
### 将 Pros 传递给组件
您可以通过 JSX 中的属性将 props 从父组件传递到子组件。
```jsx
function ParentComponent() {
return <ChildComponent name="John" age={25} />;
}
function ChildComponent (props) {
return <div>Hello{props.name}. You are {props.age} years old. </div>;
}
```
### 解构 props
props 可以解构以便于访问。
```jsx
function Greeting({ name }) {
return <h1>Hello, {name}!</h1>;
}
```
### 访问功能组件中的 Props
可以使用 props 对象在功能组件中访问 Props。
```jsx
function Greeting(props) {
return <h1>Hello, {props.name}!</h1>;
}
```
### 使用 Pros 进行条件渲染
道具可用于组件内部的条件渲染。
```jsx
function Greeting({ name, isLoggedIn }) {
return isLoggedIn ? <hl>Welcome back, {name}</h1>: <h1>Please log in</h1>;
}
```
### Prop Drilling属性传递
<!--rehype:wrap-class=row-span-2-->
```js
function Parent() {
const name = "John";
return <Child name={name}/>;
}
function Child({ name }) {
return <Grandchild name={name} />
}
function Grandchild({ name }) {
return <p>{name}</p>;
}
```
将属性props在多个组件层级中逐层传递可能会变得繁琐。这种方式称为属性传递prop drilling
### Props 与 State
<!--rehype:wrap-class=row-span-2-->
- `props` 被传递给组件并且是不可变的。
- `State` 是组件的本地状态,可以更改。
```jsx
function ChildComponent({ name }) {
return <h2>Hi,my name is {name}.</h2>;
}
function ParentComponent() {
// State to manage the name value
const name, setName= usestate('John');
const changeName = () => {
setName('Jane');
};
return (
<div>
<ChildComponent name={name}/>
<button onClick={changeName}>
Change Names
</button>
</div>
);
}
```
### 默认 props
```jsx
function Greeting({ name = "Bob" } = 0}) {
return <h1>Hello, {name}!</h1>;
}
// Renders "Hello, Bob!"
< Greeting />
```
您可以为 `props` 设置默认值。
### 使用 prop 处理事件
你可以将事件处理程序作为 props 传递给 handle 用户交互。
```jsx
function Button({ onClick }) {
return < button onClick={onClick}>Click me</button>;
}
function App() {
const handleClick = () => alert("Button clicked!"):
return <Button onClick={handleClick} />;
}
```
JSX
---
@ -1213,7 +1357,7 @@ useEffect(
`componentDidMount()` | 在组件挂载后(插入 DOM 树中)立即调用 [#](https://reactjs.org/docs/react-component.html#componentdidmount)
`UNSAFE_componentWillMount()` | 在挂载之前被调用,建议使用 `constructor()` [#](https://zh-hans.reactjs.org/docs/react-component.html#unsafe_componentwillmount)
在 `constructor()` 上设置初始状态。在 `componentDidMount()` 上添加 DOM 事件处理程序、计时器等),然后在 `componentWillUnmount()` 上删除它们。
在 `constructor()` 上设置初始状态。在 `componentDidMount()` 上添加 DOM 事件处理程序、计时器(等),然后在 `componentWillUnmount()` 上删除它们。
### 卸载

View File

@ -10,12 +10,18 @@ RegEX 备忘清单
这是开始使用正则表达式(Regex)的快速备忘单。
- [Python 中的 Regex](#python-中的正则表达式) _(Quick Reference)_
- [JavaScript 中的 Regex](#javascript-中的正则表达式) _(Quick Reference)_
- [PHP 中的 Regex](#php中的正则表达式) _(Quick Reference)_
- [Java 中的 Regex](#java-中的正则表达式) _(Quick Reference)_
- [MySQL 中的 Regex](#mysql中的正则表达式) _(Quick Reference)_
- [Vim 中的 Regex](./vim#vim-搜索和替换) _(Quick Reference)_
- [Python 中的 Regex](#python-中的正则表达式)
_(速查手册)_
- [JavaScript 中的 Regex](#javascript-中的正则表达式)
_(速查手册)_
- [PHP 中的 Regex](#php中的正则表达式)
_(速查手册)_
- [Java 中的 Regex](#java-中的正则表达式)
_(速查手册)_
- [MySQL 中的 Regex](#mysql中的正则表达式)
_(速查手册)_
- [Vim 中的 Regex](./vim#vim-搜索和替换)
_(速查手册)_
- [在线 Regex 测试器](https://regex101.com/) _(regex101.com)_
- [轻松学习 Regex](https://github.com/ziishaned/learn-regex/blob/master/translations/README-cn.md) _(github.com)_
- [正则表达式实例搜集](https://jaywcjlove.github.io/regexp-example) _(jaywcjlove.github.io)_
@ -32,6 +38,7 @@ RegEX 备忘清单
`[0-9]` | 范围内的数字:`0-9`
`[a-zA-Z]` | 范围内的字符:<br>`a-z``A-Z`
`[a-zA-Z0-9]` | 范围内的字符:<br>`a-z``A-Z``0-9`
<!--rehype:className=left-align-->
### 量词
@ -47,24 +54,27 @@ RegEX 备忘清单
`a*` | 贪心量词
`a*?` | 惰性量词
`a*+` | 占有量词
<!--rehype:className=left-align-->
### 常用元字符
- \^
- \{
- \+
- \<
- \[
- \*
- \)
- \>
- \.
- \(
- \|
- \$
- \\
- \?
<!--rehype:className=cols-3 style-none-->
模式 | 描述
:-|-
`^` | 匹配字符串的开头
`{` | 开始一个数量限定符,指定出现次数
`+` | 匹配前面的元素一次或多次
`<` | 非标准的正则表达式元字符(在 HTML 中常用)
`[` | 开始一个字符类
`*` | 匹配前面的元素零次或多次
`)` | 结束捕获组
`>` | 非标准的正则表达式元字符(在 HTML 中常用)
`.` | 匹配除换行符之外的任意字符
`(` | 开始一个捕获组
`\|` | 在正则表达式模式中作为逻辑或操作
`$` | 匹配字符串的结尾
`\` | 转义元字符,使其具有字面意义
`?` | 匹配前面的元素零次或一次
<!--rehype:className=left-align-->
使用 `\` 转义这些特殊字符
@ -126,6 +136,7 @@ RegEX 备忘清单
`\z` | 字符串的绝对结尾
`\b` | 一个词的边界
`\B` | 非单词边界
<!--rehype:className=left-align-->
### 替代
@ -144,6 +155,7 @@ RegEX 备忘清单
`\U` | 大写转换
`\L` | 小写转换
`\E` | 终止任何转换
<!--rehype:className=left-align-->
### 组构造
@ -160,6 +172,7 @@ RegEX 备忘清单
`(?P<name>...)` | 命名捕获组
`(?imsxXU)` | 内联修饰符
`(?(DEFINE)...)` | 在使用它们之前预定义模式
<!--rehype:className=left-align-->
### 断言
@ -368,6 +381,7 @@ RegEX 备忘清单
:-|-
`(in\|out)put` | 匹配 <yel>input</yel><yel>output</yel>
`\d{5}(-\d{4})?` | 美国邮政编码 _(“+ 4”可选)_
<!--rehype:className=left-align-->
如果组后匹配失败,解析器会尝试每个替代方案。
<br>
@ -395,10 +409,13 @@ RegEX 备忘清单
:-|-
`(?>red\|green\|blue)` | 比非捕获更快
`(?>id\|identity)\b` | 匹配 <yel>id</yel>,但不匹配 <yel>id</yel>entity
<!--rehype:className=left-align-->
"id" 匹配,但 `\b` 在原子组之后失败,
<yel>id</yel> 匹配,但 `\b` 在原子组之后失败,
解析器不会回溯到组以重试“身份”
---
如果替代品重叠,请从长到短命令。
### 零宽度断言 Lookaround(前后预查)
@ -648,7 +665,7 @@ M(?(?=.*?\bher\b)s|r)\.
<!--rehype:className=show-header-->
Python 中的正则表达式
---------------
---
### 入门
@ -662,6 +679,7 @@ import re
<!--rehype:wrap-class=col-span-2 row-span-3-->
#### re.search()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> sentence = 'This is a sample string'
@ -672,6 +690,7 @@ False
```
#### re.findall()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> re.findall(r'\bs?pare?\b', 'par spar apparent spare part pare')
@ -681,6 +700,7 @@ False
```
#### re.finditer()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> m_iter = re.finditer(r'[0-9]+', '45 349 651 593 4 204')
@ -689,6 +709,7 @@ False
```
#### re.split()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> re.split(r'\d+', 'Sample123string42with777numbers')
@ -696,6 +717,7 @@ False
```
#### re.sub()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> ip_lines = "catapults\nconcatenate\ncat"
@ -706,6 +728,7 @@ False
```
#### re.compile()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> pet = re.compile(r'dog')

419
docs/rxjs.md Normal file
View File

@ -0,0 +1,419 @@
RxJS 备忘清单
===
[RxJS](https://rxjs.dev/)Reactive Extensions for JavaScript是一个强大的库用于处理异步事件和数据流。以下是 RxJS 的一些关键概念、操作符和方法的总结。
## 入门
### 安装 RxJS
```bash
npm install rxjs
```
### 清晰
<!--rehype:wrap-class=row-span-2-->
RxJS 的强大之处在于它使用纯函数生成值的能力。这意味着您的代码更不容易出错。通常情况下,您会创建一个不纯的函数,而代码的其他部分可能会弄乱您的状态。
```js
let count = 0;
document.addEventListener('click', () => {
console.log(`Clicked ${++count} times`)
});
```
使用 `RxJS` 可以隔离状态。
```js
import { fromEvent, scan } from 'rxjs';
fromEvent(document, 'click')
.pipe(scan((count) => count + 1, 0))
.subscribe((count) => {
console.log(`Clicked ${count} times`)
});
```
扫描操作符的工作原理与数组的 `reduce` 类似。它接受一个暴露给回调函数的值。回调的返回值将成为下次回调运行时公开的下一个值。
### 流
<!--rehype:wrap-class=row-span-2-->
`RxJS` 拥有一整套运算符,可以帮助您控制事件如何流经您的可观察对象。这是使用纯 JavaScript 每秒最多允许一次点击的方式:
```js
let count = 0;
let rate = 1000;
let lastClick = Date.now() - rate;
document.addEventListener('click', () => {
if (Date.now() - lastClick >= rate) {
console.log(`Clicked ${++count}times`);
lastClick = Date.now();
}
});
```
使用 RxJS
```js
import { fromEvent, throttleTime, scan
} from 'rxjs';
fromEvent(document, 'click')
.pipe(throttleTime(1000),
scan((count) => count + 1, 0)
)
.subscribe((count) => {
console.log(`Clicked ${count} times`)
});
```
### 第一个示例
通常情况下,您需要注册事件监听器。
```js
document.addEventListener('click', () => {
console.log('Clicked!')
});
```
使用 [RxJS](https://rxjs.dev/),您可以创建一个可观察对象。
```js
import { fromEvent } from 'rxjs';
fromEvent(document, 'click')
.subscribe(() => {
console.log('Clicked!')
});
```
### 导入所需的 Observable 和操作符
<!--rehype:wrap-class=col-span-2-->
```javascript
import { Observable, of, from, interval, fromEvent } from 'rxjs';
import { map, filter, switchMap, mergeMap, catchError, debounceTime,
distinctUntilChanged, take, tap, concatMap, delay, retryWhen, scan,
combineLatest, concat, merge, forkJoin, withLatestFrom, startWith, reduce
} from 'rxjs/operators';
```
## 创建 Observable
### of
```javascript
const obs = of(1, 2, 3);
obs.subscribe(console.log);
// 输出: 1 2 3
```
创建一个立即发送指定值并完成的 `Observable`
### from
```javascript
const obs = from([1, 2, 3]);
obs.subscribe(console.log);
// 输出: 1 2 3
```
从 Promise、数组、可迭代对象创建 `Observable`
### interval
```javascript
const obs = interval(1000);
obs.subscribe(console.log);
// 每秒输出一次递增的数字
```
创建一个定时发送递增整数的 `Observable`
### fromEvent
<!--rehype:wrap-class=col-span-2-->
```javascript
const button = document.querySelector('button');
const obs = fromEvent(button, 'click');
obs.subscribe(event => {
console.log('Button clicked!', event)
});
```
从 DOM 事件创建 `Observable`
## 操作符
### map
```javascript
const obs = of(1, 2, 3).pipe(
map(x => x * 2)
);
obs.subscribe(console.log);
// 输出: 2 4 6
```
`Observable` 发出的每个值应用一个函数
### filter
```javascript
const obs = of(1, 2, 3).pipe(
filter(x => x % 2 === 0)
);
obs.subscribe(console.log);
// 输出: 2
```
过滤 `Observable` 发出的值
### switchMap
```javascript
const obs = interval(1000).pipe(
switchMap(() => of('Hello'))
);
obs.subscribe(console.log);
// 每秒输出一次 "Hello"
```
`Observable` 每个值映射成 `Observable` 并订阅,前一个订阅将被取消
### mergeMap
```javascript
const obs = interval(1000).pipe(
mergeMap(() => of('Hello'))
);
obs.subscribe(console.log);
// 每秒输出一次 "Hello"
```
类似 `switchMap`,但允许多个内部 `Observable` 并发执行
### catchError
```javascript
const obs = of(1, 2, 3).pipe(
map(x => {
if (x === 2) throw 'Error!';
return x;
}),
catchError(err => of('发现一个错误:'+err))
);
obs.subscribe(console.log);
// 输出: 1 发现一个错误Error!
```
捕获 `Observable` 链中的错误
### debounceTime
```javascript
const obs = fromEvent(document,'mousemove')
.pipe(debounceTime(300));
obs.subscribe(event => {
console.log('Mouse moved!', event)
});
```
延迟处理,直到源 `Observable` 停止发出数据一定时间
### distinctUntilChanged
```javascript
const obs = of(1, 1, 2, 2, 3, 3).pipe(
distinctUntilChanged()
);
obs.subscribe(console.log);
// 输出: 1 2 3
```
忽略连续重复的值
### take
```javascript
const obs = interval(1000).pipe(
take(3)
);
obs.subscribe(console.log);
// 输出: 0 1 2
```
只发出前 n 个值
## 组合操作符
### combineLatest
```javascript
const obs1 = interval(1000);
const obs2 = of('A', 'B', 'C');
const combined = combineLatest(
[obs1, obs2]
);
combined.subscribe(console.log);
// 每秒输出一次两个 observables 的最新值
```
当两个 `Observable` 都发出新的值时,发出它们的组合
### concat
```javascript
const obs1 = of(1, 2, 3);
const obs2 = of(4, 5, 6);
const combined = concat(obs1, obs2);
combined.subscribe(console.log);
// 输出: 1 2 3 4 5 6
```
按顺序连接多个 `Observable`
### merge
```javascript
const obs1 = interval(1000).pipe(
map(x => 'A' + x)
);
const obs2 = interval(500).pipe(
map(x => 'B' + x)
);
const combined = merge(obs1, obs2);
combined.subscribe(console.log);
// 每秒输出 "A" 和 "B" 开头的递增数字
```
将多个 `Observable` 合并为一个
### forkJoin
```javascript
const obs1 = of(1, 2, 3);
const obs2 = of('A', 'B', 'C');
const combined = forkJoin([obs1, obs2]);
combined.subscribe(console.log);
// 输出: [3, 'C']
```
等待所有 `Observable` 完成,然后发出它们的最后一个值的数组
## 错误处理
### retryWhen
<!--rehype:wrap-class=col-span-2-->
```javascript
const obs = throwError('出了些问题!')
.pipe(
retryWhen(errors =>
errors.pipe(delayWhen(() => interval(1000)))
)
);
obs.subscribe(console.log, console.error);
// 输出: 出了些问题! (每秒重试一次)
```
`Observable` 发出错误时重试
## 实用操作符
### tap
```javascript
const obs = of(1, 2, 3).pipe(
tap(x => console.log(`Before: ${x}`)),
map(x => x * 2),
tap(x => console.log(`After: ${x}`))
);
obs.subscribe();
// 输出: Before: 1, After: 2, Before: 2,
// After: 4, Before: 3, After: 6
```
用于记录、测量或执行副作用操作
### startWith
```javascript
const obs = of(1, 2, 3).pipe(
startWith(0)
);
obs.subscribe(console.log);
// 输出: 0 1 2 3
```
`Observable` 序列前添加值
### scan
```javascript
const obs = of(1, 2, 3).pipe(
scan((acc, value) => acc + value, 0)
);
obs.subscribe(console.log);
// 输出: 1 3 6
```
`Observable` 发出的每个值应用累加器函数
### reduce
<!--rehype:wrap-class=col-span-2-->
```javascript
const obs = of(1, 2, 3).pipe(reduce((acc, value) => acc + value, 0));
obs.subscribe(console.log);
// 输出: 6
```
`Observable` 发出的值进行累加
### delay
```javascript
const obs = of('Hello').pipe(delay(2000));
obs.subscribe(console.log);
// 输出: 'Hello' (延迟2秒)
```
延迟 `Observable` 发出数据的时间
调度器
---
### 调度器说明
调度器Scheduler控制着 RxJS 操作的执行时机。常见的调度器有:
- `asyncScheduler`:异步执行任务
- `queueScheduler`:按队列顺序执行任务
- `animationFrameScheduler`:在浏览器的下一次重绘前执行任务
### 示例
<!--rehype:wrap-class=col-span-2-->
```javascript
const obs = of(1, 2, 3).pipe(observeOn(asyncScheduler));
console.log('Before subscribe');
obs.subscribe(console.log);
console.log('After subscribe');
// 输出: Before subscribe, After subscribe, 1, 2, 3
```
## 另见
- [RxJS 官方文档](https://rxjs.dev/)
- [RxJS 学习资源](https://rxjs.dev/guide/overview)
- [RxJS 操作符参考](https://rxjs.dev/guide/operators)

636
docs/springboot.md Normal file
View File

@ -0,0 +1,636 @@
Spring Boot 备忘清单
===
此快速参考备忘单提供了使用 Spring Boot 的用法
注:开发 springboot 需要要基本的 java 基础和 maven 基础。
入门
---
### 介绍
Spring Boot 是一个用于简化 Spring 应用程序开发的框架。它提供了一种简单的方式来创建、运行和部署 Spring 应用程序,并简化了配置和依赖管理。
### 项目创建与配置
<!--rehype:wrap-class=col-span-2-->
- 使用 [`Spring Initializr`](https://start.spring.io) 创建项目
- 国内可以使用阿里云的 [`Spring Initializr`](https://start.aliyun.com/) 创建项目选择依赖项如Web、JPA、Security和 Spring Boot 版本
- 添加所需的依赖项到 `pom.xml`(Maven) 或 `build.gradle`(Gradle) 文件中
-`src/main/resources` 目录下创建 `application.properties``application.yml` 文件,配置应用程序属性,例如数据库连接信息、端口号等
配置
---
### 配置文件说明
<!--rehype:wrap-class=row-span-2-->
在Spring Boot应用程序中通常使用YAML格式`.yml`文件)来配置应用程序的属性和设置。相比于传统的`.properties`文件YAML格式更加清晰易读并且支持层级结构和列表等复杂数据类型。以下是一些常用的Spring Boot YAML配置字段及其说明
- `server.port`: 配置应用程序的端口号。
- `spring.application.name`: 配置应用程序的名称。
- `spring.datasource.url`: 配置数据库连接的URL。
- `spring.datasource.username`: 配置数据库连接的用户名。
- `spring.datasource.password`: 配置数据库连接的密码。
- `logging.level`: 配置日志记录的级别,如`DEBUG``INFO``WARN``ERROR`等。
- `management.endpoints.web.exposure.include`: 配置哪些管理端点(如`health``info`可以通过Web访问。
- `spring.jpa.hibernate.ddl-auto`: 配置Hibernate的DDL模式`update``create``create-drop`等。
### 1. 应用程序配置
```yaml
spring:
application:
name: my-application
```
`spring.application.name`: 应用程序的名称。在集成服务发现和配置管理时特别有用也会影响Actuator端点的路径。
### 2. 服务器端口配置
```yaml
server:
port: 8080
```
`server.port`: 应用程序监听的HTTP端口号。默认为8080可以根据需要进行配置。
### 3. 数据源配置
<!--rehype:wrap-class=col-span-2-->
```yaml
spring:
datasource:
url: jdbc:mysql://localhost:3306/mydatabase
username: root
password: password
driver-class-name: com.mysql.cj.jdbc.Driver # 这里是 MySQL8.0 版本配置5.0 则是 com.mysql.jdbc.Driver
```
#### 说明
- `spring.datasource.url`: 数据库连接URL。
- `spring.datasource.username``spring.datasource.password`: 数据库的用户名和密码。
- `spring.datasource.driver-class-name`: 数据库驱动类名。
### 4. **JPA 配置**
```yaml
spring:
jpa:
show-sql: true
hibernate:
ddl-auto: update
```
#### 说明
- `spring.jpa.show-sql`: 是否在控制台显示SQL语句。
- `spring.jpa.hibernate.ddl-auto`: Hibernate自动建表策略`update``create``validate`等。
### 5. 日志配置
```yaml
logging:
level:
org.springframework: INFO
com.example: DEBUG
```
#### 说明
- `logging.level`: 日志级别配置,可以针对不同的包或类设置不同的日志级别。
### 6. Spring Security 配置
```yaml
spring:
security:
user:
name: user
password: password
basic:
enabled: true
```
#### 说明
- `spring.security.user.name``spring.security.user.password`: 基本认证的用户名和密码。
- `spring.security.basic.enabled`: 是否启用基本认证。
### 7. Actuator 配置
```yaml
management:
endpoints:
web:
exposure:
include: health, info
```
#### 说明
- `management.endpoints.web.exposure.include`: 暴露给外部的Actuator端点可以设置为`*`来暴露所有端点。
### 8. 多环境配置
```yaml
spring:
profiles:
active: dev
```
#### 说明
- `spring.profiles.active`: 指定当前激活的环境配置文件,可以根据需要选择`dev``prod`等不同的配置文件。
### 9. **自定义属性配置**
```yaml
myapp:
custom:
property: value
```
#### 说明
- 自定义应用程序属性,可以在应用程序中通过`@Value`注解或`Environment`对象访问。
依赖管理
---
### 依赖管理介绍
- 在 Spring Boot 中,依赖管理是非常重要的一部分。
- 它通过简化依赖项的引入和版本管理,大大简化了项目的构建和维护过程。
- Spring Boot采用了 Starter 依赖项的概念,通过提供预配置的依赖项集合来简化项目的初始化和配置。
### Starter 依赖项
<!--rehype:wrap-class=row-span-2 col-span-2-->
Spring Boot 的 Starter 依赖项是预先配置的一组依赖项集合,它们以 `spring-boot-starter-*` 的命名格式提供。这些 Starter 依赖项可以按照功能领域进行分类,例如:
- `spring-boot-starter-web`: 支持构建Web应用程序包括Spring MVC和内嵌的Servlet容器如Tomcat
- `spring-boot-starter-data-jpa`: 支持使用Spring Data JPA访问数据库包括Hibernate和JPA实现。
- `spring-boot-starter-security`: 支持Spring Security用于身份验证和授权。
- `spring-boot-starter-test`: 支持单元测试和集成测试包括JUnit、Mockito等。
- `spring-boot-starter-actuator`: 支持集成Actuator用于监控和管理应用程序。
引入Starter依赖项可以快速添加特定功能Spring Boot会自动配置所需的组件和设置减少手动配置工作量。
### 自动依赖解析和版本管理
<!--rehype:wrap-class=row-span-2-->
Spring Boot的BOMBill of Materials集中管理各个 Starter 依赖项的版本,通过在`pom.xml`Maven`build.gradle`Gradle中引入 BOM可以简化依赖项版本管理。例如在 Maven 项目中:
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.6.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
这样一来,当你在项目中引入 Spring Boot 的 Starter 依赖项时不需要显式声明版本号Maven 会自动使用 BOM 中指定的版本。
### 自定义依赖管理
尽管Spring Boot提供了丰富的Starter依赖项和依赖管理功能但有时你可能需要自定义特定的依赖项或版本。在这种情况下你可以在`pom.xml``build.gradle`中显式声明所需的依赖项而不使用Starter依赖项。
例如在Maven项目中你可以这样声明一个依赖项
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.6.0</version>
</dependency>
```
这样做可以覆盖Spring Boot BOM中指定的版本允许你使用特定版本的依赖项。
### 排除和冲突解决
在实际项目中可能会遇到依赖项之间的冲突或不兼容性问题。Spring Boot允许你通过`<exclusions>`标签来排除Starter依赖项中的某些传递性依赖以解决冲突问题。
例如在Maven项目中排除传递性依赖
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
```
这种排除机制使得你可以更精确地控制项目中依赖项的版本和组合,以避免不必要的冲突。
Spring Boot 核心功能
---
<!--rehype:body-class=cols-2-->
### 依赖注入Dependency Injection
依赖注入是Spring框架的核心概念之一它通过控制反转IoCInversion of Control的方式管理对象之间的依赖关系从而实现松耦合、可测试和可维护的代码结构。Spring Boot通过自动配置的方式支持依赖注入以下是一些关键点
#### 自动装配Auto-configuration
Spring Boot根据类路径中的依赖项自动配置应用程序上下文。这包括自动扫描和注册带有特定注解`@Component``@Service``@Repository`的Bean以及自动解析和注入这些Bean之间的依赖关系。
#### Bean的声明和管理
开发者可以使用`@Autowired`注解在需要依赖注入的地方注入其他BeanSpring Boot会自动解析和注入所需的依赖。例如
```java
@RestController
public class MyContr {
private final MyService myService;
@Autowired
public MyContr(MyService myService) {
this.myService = myService;
}
// Controller methods
}
```
在上面的例子中,`MyController`中的`MyService`依赖通过构造函数注入。
#### 条件化注入
Spring Boot支持根据条件选择性地注入Bean。例如可以使用 `@Conditional` 注解或 `@ConditionalOnProperty` 注解根据特定的条件决定是否创建和注入Bean。
### 面向切面编程Aspect-Oriented Programming
面向切面编程是一种软件开发方法用于分离横切关注点cross-cutting concerns例如日志、事务管理、安全性等以便更好地模块化和管理应用程序。Spring Boot通过整合Spring AOP框架支持面向切面编程以下是相关的说明
#### 切面Aspect
切面是一个模块化的类它包含了横切关注点的逻辑。在Spring Boot中可以使用`@Aspect`注解标记一个类作为切面,并通过`@Before``@After``@Around`等注解定义切面的具体行为。
#### 切点Pointcut
切点定义了在应用程序中哪些位置应用切面逻辑。切点表达式使用`execution`关键字指定要拦截的方法调用。例如:
```java
@Aspect
@Component
public class LoggingAspect {
@Before("execution(* com.example.service.*.*(..))")
public void beforeServiceMethods(JoinPoint joinPoint) {
// Advice logic before service method execution
}
// Other advices (e.g., @After, @Around) can be defined similarly
}
```
#### 通知Advice
通知是在切点处执行的具体逻辑,包括`@Before``@AfterReturning``@AfterThrowing``@Around`等。例如,在上面的例子中,`beforeServiceMethods`方法就是一个`@Before`通知,它在目标方法执行之前执行。
#### 配置和启用
Spring Boot通过自动配置和注解扫描使得使用AOP变得非常简单。通常情况下只需在切面类上加上`@Aspect`注解并确保它被Spring Boot的组件扫描机制扫描到即可。
Web 开发
---
### 1. 创建一个新的 Spring Boot 项目
<!--rehype:wrap-class=row-span-3-->
你可以使用 Spring Initializr 创建一个新的 Spring Boot 项目。访问 [start.spring.io](https://start.spring.io/) 并按照以下配置创建项目:
- **Project**: Maven 或 Gradle选择你的构建工具
- **Language**: Java
- **Spring Boot**: 选择最新的稳定版本
- **Project Metadata**:
- **Group**: com.example或者你喜欢的 Group ID
- **Artifact**: helloworld或者你喜欢的 Artifact ID
- **Dependencies**: 选择 "Spring Web"
点击 "Generate" 下载项目的 zip 文件。
### 2. 将项目导入到你的 IDE 中
解压下载的文件并导入到你喜欢的 IDE 中(如 IntelliJ IDEA、Eclipse 等)。
### 3. 实现 Hello World Controller
<!--rehype:wrap-class=row-span-3-->
在 IDE 中打开你的项目,导航到 `src/main/java/com/example/helloworld`。你会看到一个名为 `HelloworldApplication.java` 的类文件,这是 Spring Boot 应用程序的入口类。
在这个类的同级目录下创建一个新的 Java 类文件,例如 `HelloController.java`,并添加以下内容:
```java
package com.example.helloworld;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/")
public String hello() {
return "Hello, World!";
}
}
```
### 4. 运行应用程序
使用 Maven 或 Gradle 构建项目并启动应用程序。可以通过 IDE 的运行功能或者命令行执行以下命令:
```bash
mvn spring-boot:run
```
或者
```bash
./gradlew bootRun
```
### 5. 访问 Hello World 页面
在浏览器中访问 `http://localhost:8080/`,你应该能够看到显示 "Hello, World!" 的页面。
这样,你就成功创建了一个简单的 Spring Boot Web 应用程序,并实现了一个基本的 "Hello, World!" 示例。
## **数据访问**
### 1.创建过程和 web 项目示例一样
注意:需要选择 jpa 和对应数据库的驱动
### 2. 配置数据库连接
默认情况下Spring Boot 使用 H2 Database 作为内嵌数据库。如果你想使用其他数据库,可以在 `application.properties`(或 `application.yml`)文件中配置数据库连接信息。
例如,使用 H2 Database 的默认配置:
```properties
# application.properties
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=username
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto=update
```
### 5. 创建一个简单的控制器来测试
<!--rehype:wrap-class=row-span-3-->
创建一个简单的控制器 `UserController`,用来处理 HTTP 请求,并操作 `UserRepository` 来访问数据库。
```java
package com.example.userdemo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/users")
public class UserController {
@Autowired
private UserRepository userRepository;
// 获取所有用户
@GetMapping("/")
public List<User> getAllUsers() {
return userRepository.findAll();
}
// 通过 id 获取用户
@GetMapping("/{id}")
public User getUserById(@PathVariable("id") Long id) {
return userRepository.findById(id).orElse(null);
}
// POST 创建新用户
@PostMapping("/")
public User addUser(@RequestBody User user) {
return userRepository.save(user);
}
// PUT 更新用户
@PutMapping("/{id}")
public User updateUser(@PathVariable("id") Long id, @RequestBody User userDetails) {
User user = userRepository.findById(id).orElse(null);
if (user != null) {
user.setUsername(userDetails.getUsername());
user.setAge(userDetails.getAge());
user.setSex(userDetails.getSex());
return userRepository.save(user);
}
return null;
}
// DELETE 删除用户
@DeleteMapping("/{id}")
public void deleteUser(@PathVariable("id") Long id) {
userRepository.deleteById(id);
}
}
```
### 4. 创建 UserRepository 接口
<!--rehype:wrap-class=col-span-2-->
在同样的目录下创建一个接口 `UserRepository`,继承自 `JpaRepository<User, Long>`,这样 Spring Data JPA 将会自动实现一些基本的数据库操作方法。
```java
package com.example.userdemo;
import org.springframework.data.jpa.repository.JpaRepository;
public interface UserRepository extends JpaRepository<User, Long> {
}
```
### 3. 创建实体类 `User`
`src/main/java/com/example/userdemo` 目录下创建一个名为 `User` 的实体类:
```java
package com.example.userdemo;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long userId;
private String username;
private Integer age;
private String sex;
// Constructors, getters, and setters 省略
}
```
### 6. 运行应用程序并测试
使用 Maven 或 Gradle 构建并运行你的应用程序。然后,可以使用 Postman 或浏览器访问以下 API 来测试你的应用程序:
- **GET** `http://localhost:8080/users/`
获取所有用户
- **GET** `http://localhost:8080/users/{id}`
根据用户ID获取用户信息
- **POST** `http://localhost:8080/users/`
添加新用户Body 中包含 JSON 数据)
- **PUT** `http://localhost:8080/users/{id}`
更新用户信息Body 中包含 JSON 数据)
- **DELETE** `http://localhost:8080/users/{id}`
删除用户
测试
---
### 1. 创建一个简单的项目
`src/main/java/com/example/demo` 目录下创建一个名为 `HelloController.java` 的类:
```java
package com.example.demo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/hello")
public String hello() {
return "Hello, World!";
}
}
```
创建过程同 web 项目创建
### 2. 编写测试类
<!--rehype:wrap-class=col-span-2-->
`src/test/java/com/example/demo` 目录下创建一个名为 `HelloControllerTest.java` 的测试类:
```java
package com.example.demo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
@SpringBootTest
@AutoConfigureMockMvc
public class HelloControllerTest {
@Autowired
private MockMvc mockMvc;
@Test
public void helloTest() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.get("/hello"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andExpect(MockMvcResultMatchers.content().string("Hello, World!"))
.andDo(print());
}
}
```
### 3. 解释测试类的关键点
<!--rehype:wrap-class=col-span-2-->
- `@SpringBootTest`: 这个注解告诉 Spring Boot 在测试时启动整个 Spring 应用程序上下文。
- `@AutoConfigureMockMvc`: 这个注解确保在测试中自动配置 MockMvc 实例,用于模拟 HTTP 请求。
- `@Autowired private MockMvc mockMvc`: 注入 MockMvc 实例,用于执行 HTTP 请求并验证响应。
- `@Test public void helloTest()`: 这是一个 JUnit 测试方法,用来测试 `HelloController` 中的 `hello()` 方法。
- `mockMvc.perform(...)`: 执行一个 GET 请求到 `/hello` 接口。
- `andExpect(MockMvcResultMatchers.status().isOk())`: 预期响应的状态码是 200 OK。
- `andExpect(MockMvcResultMatchers.content().string("Hello, World!"))`: 预期响应的内容是 "Hello, World!"。
- `andDo(print())`: 打印请求和响应的详细信息,方便调试。
### 4. 运行测试
运行测试,确保程序正确.
部署与扩展
---
### 1. 打包方式
<!--rehype:wrap-class=col-span-2-->
Spring Boot 应用程序可以打包为以下几种方式之一:
#### 可执行 JAR 文件
- 最常见的方式是将 Spring Boot 应用程序打包成一个可执行的 JAR 文件Java Archive
- JAR 文件中包含了所有的依赖项,可以通过 `java -jar` 命令来运行。
#### WAR 文件
- 如果你需要将 Spring Boot 应用程序部署到外部的 Servlet 容器(如 Tomcat、Jetty 等),你可以将应用程序打包成一个 WAR 文件Web Application Archive
- WAR 文件适合传统的 Java Web 应用程序部署方式。
### 3. 打包过程概述
<!--rehype:wrap-class=row-span-2-->
当你运行 Maven 的构建命令时,它们会执行以下几个主要步骤来打包你的应用程序:
- `依赖项解析和下载`:构建工具会检查你项目中的依赖项,下载缺失的依赖并构建整个依赖树。
- `编译代码`:构建工具会编译你的 Java 代码、资源文件等。
- `运行测试`:通常会执行单元测试和集成测试,确保代码质量和功能正确性。
- `打包应用程序`
- 对于可执行 JAR 文件:构建工具会将编译后的类文件、资源文件和依赖项打包到一个 JAR 文件中。同时,它会生成一个 MANIFEST.MF 文件指定应用程序的入口点main class
- 对于 WAR 文件:构建工具会将编译后的类文件、资源文件和依赖项打包成一个 WAR 文件,包括 WEB-INF 目录和其他必要的内容。
- `输出结果`:构建工具会在指定的目录下生成打包好的 JAR 或 WAR 文件,通常位于 `target` 目录下Maven
<!--rehype:className=style-timeline-->
在你的 Spring Boot 项目中,通常有一个入口类(如 `Application.java` 或者根据你的项目命名)。这个类使用 `@SpringBootApplication` 注解标记,它包含了 `main` 方法用来启动应用程序。
### 2. 打包工具
通常使用以下两种构建工具来打包 Spring Boot 应用程序:
#### **Maven**
- 使用 Maven 的 `mvn package` 命令可以将应用程序打包为 JAR 或 WAR 文件。
-`pom.xml` 文件中Spring Boot 应用程序通常会依赖于 `spring-boot-starter-parent` 父项目,这简化了 Maven 配置和依赖管理。
### 4. 示例
假设你有一个简单的 Spring Boot 应用程序,并且已经配置好了 Maven 或 Gradle。运行以下命令即可进行打包
- **Maven**`mvn clean package`
构建工具会执行以上步骤,生成可执行的 JAR 文件或 WAR 文件,你可以根据需要进行部署和运行。

288
docs/sqlite.md Normal file
View File

@ -0,0 +1,288 @@
SQLite 备忘清单
===
本备忘单旨在快速理解 [SQLite](https://sqlite.com/) 所涉及的主要概念提供了最常用的SQL语句供您参考。
入门
---
### 介绍
SQLite 是一个轻量级的嵌入式关系数据库管理系统,遵循 ACID 原则,广泛用于浏览器、操作系统等应用中,实现本地数据存储。
### 安装
<!--rehype:wrap-class=col-span-2 row-span-2-->
#### windows
- 从 [SQLite](https://www.sqlite.org/download.html) 下载两个压缩文件:`sqlite-tools-win32-*.zip``sqlite-dll-win32-*.zip`
- 创建文件夹 `C:\sqlite`,将这两个压缩文件解压到该文件夹下。
- 解压后,您将看到 3 个文件: `sqlite3.def``sqlite3.dll``sqlite3.exe`
- 将 C:\sqlite 添加到 PATH 环境变量中,以便在命令行中使用 SQLite。
<!--rehype:className=style-timeline-->
#### linux
linux 自带 `sqlite3`,或者通过 `apt-get/yum/brew` 等安装。
#### macOS
`brew install sqlite` 安装
### 连接 SQLite 数据库
SQLite 通常无需复杂配置,当指定的数据库文件不存在时,它会自动创建一个新文件。
```bash
sqlite3 mydatabase.db
```
若数据库文件不存在则会自动创建
数据库操作
---
### 显示数据库名称及对应文件
```shell
sqlite> .databases
main: /home/user/sqlite/database.db r/w
```
### 备份数据库
```shell
sqlite> .backup back
```
### 显示已经设置的值
<!--rehype:wrap-class=row-span-3-->
```shell
sqlite> .show
echo: off
eqp: off
explain: auto
headers: off
mode: list
nullvalue: ""
output: stdout
colseparator: "|"
rowseparator: "\n"
stats: off
width:
filename: api.db
```
### 备份单张表
```shell
sqlite> .dump user
```
### 退出
```shell
sqlite> .exit
```
### 以 sql 的形式 dump 数据库
<!--rehype:wrap-class=col-span-2-->
```shell
sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE api (
id INTEGER PRIMARY KEY AUTOINCREMENT,
host TEXT NOT NULL,
port INTEGER NOT NULL,
path TEXT NOT NULL
);
INSERT INTO api VALUES(1,'example.com',8080,'/api/v1');
```
### 导入与导出数据库
#### 导出数据库
<!--rehype:style=text-align: left;-->
```bash
sqlite3 mydatabase.db .dump > backup.sql
```
#### 导入数据库
<!--rehype:style=text-align: left;-->
```bash
sqlite3 mydatabase.db < backup.sql
```
### 输出模式设置
<!--rehype:wrap-class=col-span-2-->
#### 设置输出模式为 csv
```sh
sqlite> .mode csv
sqlite> select * from api;
id,host,port,path
1,example.com,8080,/api/v1
```
#### 输出为 markdown
```sh
sqlite> select * from api;
| id | host | port | path |
|----|-----------------|------|---------|
| 1 | example.com | 8080 | /api/v1 |
```
支持 ascii box column csv html insert json line list markdown qbox quote table tabs tcl 等类型
数据表操作
---
### 常用表操作
#### 创建表
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```sh
sqlite> create table user(id integer primary key, name text);
```
<!--rehype:className=wrap-text-->
#### 查看所有表
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```sh
sqlite> .tables
```
#### 查看表结构
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```sh
sqlite> .schema user
```
#### 导入文件到表中
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```sh
sqlite> .import user.csv user
```
#### 设置查询显示列名称
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```sh
sqlite> .head on
```
### 常用 SQL
<!--rehype:wrap-class=col-span-2 row-span-2-->
```sql
-- 创建表
create table user(id integer primary key, name text);
-- 删除表
drop table user;
-- 重命名表
alter table user rename to user_new;
-- 插入
-- 单条
insert into user(name) values('test');
-- 多条
insert into user(name) values('test1'),('test2');
-- 查询
select * from user;
-- 去重查询
select distinct name from user;
-- 统计
select count(id) from user;
-- limit
select * from user limit 2;
-- 条件查询
select * from user where id > 1;
-- 模糊查询
select * from user where name like '%test%';
-- group by
select name, count(id) from user group by name;
-- 排序
select * from user order by id desc;
-- 聚合函数
select max(id) from user;
-- 更新
update user set name='test3' where id=1;
-- 删除
delete from user where id=1;
```
### 事务支持
**事务**具有原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)、持久性(Durability)四个标准属性,缩写为 ACID。
```sql
-- 开始事务
begin transaction;
-- 操作
update user set name='test4' where id=1;
-- 回滚
rollback;
-- 提交
commit;
```
### 命令行帮助
<!--rehype:wrap-class=col-span-3-->
|命令|描述|
|:---|:---|
|.backup ?DB? FILE |备份 DB 数据库(默认是 "main")到 FILE 文件。|
|.bail ON\|OFF |发生错误后停止。默认为 OFF。|
|.databases |列出数据库的名称及其所依附的文件。
|.dump ?TABLE? |以 SQL 文本格式转储数据库。如果指定了 TABLE 表,则只转储匹配 LIKE 模式的 TABLE 表。
|.echo ON\|OFF |开启或关闭 echo 命令。
|.exit |退出 SQLite 提示符。
|.explain ON\|OFF |开启或关闭适合于 EXPLAIN 的输出模式。如果没有带参数,则为 EXPLAIN on即开启 EXPLAIN。
|.header(s) ON\|OFF |开启或关闭头部显示。
|.help |显示消息。
|.import FILE TABLE |导入来自 FILE 文件的数据到 TABLE 表中。
|.indices ?TABLE? |显示所有索引的名称。如果指定了 TABLE 表,则只显示匹配 LIKE 模式的 TABLE 表的索引。
|.load FILE ?ENTRY? |加载一个扩展库。
|.log FILE\|off |开启或关闭日志。FILE 文件可以是 stderr标准错误/stdout标准输出
|.nullvalue STRING |在 NULL 值的地方输出 STRING 字符串。
|.output FILENAME |发送输出到 FILENAME 文件。
|.output stdout |发送输出到屏幕。
|.print STRING... |逐字地输出 STRING 字符串。
|.prompt MAIN CONTINUE |替换标准提示符。
|.quit |退出 SQLite 提示符。
|.read FILENAME |执行 FILENAME 文件中的 SQL。
|.schema ?TABLE? |显示 CREATE 语句。如果指定了 TABLE 表,则只显示匹配 LIKE 模式的 TABLE 表。
|.separator STRING |改变输出模式和 .import 所使用的分隔符。
|.show |显示各种设置的当前值。
|.stats ON\|OFF |开启或关闭统计。
|.tables ?PATTERN? |列出匹配 LIKE 模式的表的名称。
|.timeout MS |尝试打开锁定的表 MS 毫秒。
|.width NUM |NUM 为 "column" 模式设置列宽度。
|.timer ON\|OFF |开启或关闭 CPU 定时器。
|.mode MODE | 设置输出模式MODE 可以是下列之一 `:csv` 逗号分隔的值 <br/>column 左对齐的列 <br/>html HTML 的 \<table\> 代码 <br/>insert TABLE 表的 SQL 插入insert语句 <br/>line 每行一个值 <br/>list 由 .separator 字符串分隔的值 <br/>tabs 由 Tab 分隔的值 <br/> tcl TCL 列表元素<br/>
<!--rehype:className=left-align-->
在命令行中通过 `.help` 命令显示帮助文档
另见
--------
- [百科](https://zh.wikipedia.org/wiki/SQLite)
- [SQLite](https://www.sqlite.org/)
- [菜鸟教程](https://www.runoob.com/sqlite/sqlite-tutorial.html)

1103
docs/stylex.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ Swift 备忘清单
```swift
var score = 0 // 变量
let pi = 3.14 // 常
let pi = 3.14 // 常
var greeting = "Hello"
var numberOfToys = 8
@ -169,7 +169,7 @@ numberOfToys += 1
print(numberOfToys) // 打印“9”
```
### 常
### 常量声明
常量用 `let` 声明:
@ -187,7 +187,7 @@ let numberOfToys: Int = 8
let isMorning: Bool = true
```
常量是不可变的。它们的值不能改变:
常量 `let` 一旦设定,在程序运行时就无法改变其值:
```swift
let numberOfToys: Int = 8
@ -195,7 +195,7 @@ numberOfToys += 1
// ❌ 错误numberOfToys 不可变
```
### 计算变量get 和 set
### 计算属性get 和 set
<!--rehype:wrap-class=row-span-3-->
```swift
@ -521,6 +521,10 @@ let zeroToThree = 0...3
// zeroToThree: 0, 1, 2, 3
```
- `a...b` 闭区间 (Closed Range) 包括a和b
- `a..<b` 半开区间 (Half-Open Range) 包括a不包括b
- `...b` 单侧区间 (One-Sided Range) 包括b
### stride() 函数
```swift
@ -577,15 +581,17 @@ for char in "supercalifragilistice" {
// 打印: r
```
`break` 关键字中断当前循环
### 使用下划线
```swift
for _ in 1...3 {
print("Olé")
print("Ole")
}
// 打印: Olé
// 打印: Olé
// 打印: Olé
// 打印: Ole
// 打印: Ole
// 打印: Ole
```
### 遍历指定范围
@ -684,6 +690,16 @@ var snowfall = [2.4, 3.6, 3.4, 1.8, 0.0]
var temp: [Int] = [33, 31, 30, 38, 44]
```
### 用默认值初始化
```swift
var teams = [Int](repeating: 0, count: 3)
print(teams) // 打印: [0, 0, 0]
// 或者Array类型
var sizes = Array<Int>(repeating: 0, count: 3)
print(sizes) // 打印: [0, 0, 0]
```
### .append() 方法和 += 运算符
```swift
@ -1077,7 +1093,7 @@ func convertFracToDec(numerator: Double, denominator: Double) -> Double {
}
let decimal = convertFracToDec(numerator: 1.0, denominator: 2.0)
print(decimal) // Prints: 0.5
print(decimal) // 打印: 0.5
```
### 省略参数标签
@ -1691,6 +1707,22 @@ currentTraffic.reportAccident()
扩展
---
### 什么是扩展
扩展是向现有的类、结构体、枚举或协议类型添加新功能的方法。包括添加新的方法、属性、初始化方法等。
### 为什么要使用扩展
扩展让开发者可以以一种非侵入的方式来增强类型的功能,当我们无法直接修改原始类或结构体时(例如,系统库的类),扩展允许我们在不改变原始源代码的情况下添加新功能。
### 基础语法
```swift
extension SomeType {
// 添加新功能
}
```
### 声明扩展
```swift
@ -1707,6 +1739,34 @@ extension Person: SomeProtocol {
}
```
### 扩展计算属性
```swift
// 扩展可以添加计算属性,不能添加存储属性
extension Double {
var km: Double { self * 1000 }
var m: Double { self }
var cm: Double { self / 100.0 }
var mm: Double { self / 1000.0 }
}
let metric: Double = 30.48.cm
print("1 metric is \(metric.m) meter")
print("1 metric is \(metric.km) kilometer")
```
### 扩展可变实例方法
```swift
extension Double {
mutating func cube() {
self = self * self * self
}
}
var boxCube: Double = 2.0
boxCube.cube()
print(boxCube)
```
### 扩展构造器
<!--rehype:wrap-class=col-span-2-->
@ -1726,19 +1786,50 @@ let frame = CGRect(center: CGPoint(x: 100, y: 100),
print("Origin is \(frame.origin)")
```
### 扩展可变实例方法
### 扩展协议
<!--rehype:wrap-class=row-span-3-->
它的工作方式与抽象类类似,适用于在所有实现某种协议的类中提供某些功能的情况(而不需要从一个公共的基类继承)。
```swift
extension Double {
mutating func cube() {
self = self * self * self
// 定义协议
protocol Drawable {
func draw()
}
// 使用协议扩展为 draw 方法提供默认实现
extension Drawable {
func draw() {
print("绘制形状")
}
}
var boxCube: Double = 2.0
boxCube.cube()
print(boxCube)
// 定义一个符合 Drawable 协议的类 Circle
class Circle: Drawable {
// Circle 可以使用默认的 draw 实现
// 或者覆盖它
}
// 定义另一个符合 Drawable 协议的类 Square
class Square: Drawable {
// 重写 draw 方法以提供自定义实现
func draw() {
print("画一个正方形")
}
}
// 使用示例
let circle = Circle()
circle.draw() // 打印: 绘制形状
let square = Square()
square.draw() // 打印: 画一个正方形
```
你可以使用协议扩展来给协议的任意方法或者计算属性要求提供默认实现。如果遵循类型给这个协议的要求提供了它自己的实现,那么它就会替代扩展中提供的默认实现。
### 扩展方法
<!--rehype:wrap-class=col-span-2-->
@ -1755,21 +1846,6 @@ extension String {
print("Hello World".deletingPrefix("He"))
```
### 扩展计算属性
```swift
// 扩展可以添加计算属性,不能添加存储属性
extension Double {
var km: Double { self * 1000 }
var m: Double { self }
var cm: Double { self / 100.0 }
var mm: Double { self / 1000.0 }
}
let metric: Double = 30.48.cm
print("1 metric is \(metric.m) meter")
print("1 metric is \(metric.km) kilometer")
```
### 扩展存储属性
<!--rehype:wrap-class=col-span-2-->
@ -1789,6 +1865,152 @@ extension UIColor {
}
```
泛型
---
### 什么是泛型
在Swift中泛型是一个允许我们创建可以使用任何数据类型的函数、类、结构和协议的特性。
### 为什么使用泛型
泛型使我们能够编写清晰简洁的代码,并能够与任何数据类型一起工作。通过使用占位符(如 `T`),可以减少引入错误的风险。
### 泛型函数
<!--rehype:wrap-class=row-span-2-->
```swift
// 接受两个类型相同的参数并交换它们
func swapTwoValues<T>(_ a: inout T, _ b: inout T) {
let temp = a
a = b
b = temp
}
var a = 10
var b = 20
swapTwoValues(&a, &b)
print(a) // 打印: 20
print(b) // 打印: 10
var c = "Hello"
var d = "World"
swapTwoValues(&c, &d)
print(c) // 打印: "World"
print(d) // 打印: "Hello"
```
### 基础用法
```swift
func foo<T, U>(a: T, b: U) {
// ...
}
struct Foo<T, U> {
var a: T
// ...
}
```
在这个例子中,`T``U`是一个类型占位符,它表示任何类型,写在尖括号内(如`<T>`
### 泛型结构体
```swift
// 定义一个泛型结构体 Box
// 它有一个名为 value 的泛型属性
struct Box<T> {
var value: T
}
let intBox = Box(value: 10)
let stringBox = Box(value: "Hello")
print(intBox.value) // 打印: 10
print(stringBox.value) // 打印: "Hello"
```
### 泛型约束
有时我们希望限制泛型的类型范围,可以使用泛型约束。比如,限制泛型类型必须是遵循某个协议的类型
```swift
struct Box<T: Numeric> {
var value: T
// 计算 value 的平方函数
func square() -> T {
return value * value
}
}
let intBox = Box(value: 10)
print(intBox.square()) // 输出 100
let floatBox = Box(value: 5.0)
print(floatBox.square()) // 输出 25.0
// 以下代码会报错因为String不遵循Numeric协议
// let stringBox = Box(value: "Hello")
```
### 泛型类型别名
<!--rehype:wrap-class=col-span-2-->
为泛型类型创建别名`typealias`,这样可以给泛型类型起一个更具体的名字,使得代码更加清晰易懂
- 示例1
```swift
// 定义一个泛型类型别名 'IntBox'
typealias IntBox = Box<Int>
// 使用类型别名创建一个存储 Int 类型值的 Box 实例
let intBox = IntBox(value: 42)
print(intBox.value) // 输出 42
```
- 示例2
```swift
// 定义一个泛型类型别名 'StringBox',其中 T 被约束为 String
typealias StringBox<T> = Box<T> where T: StringProtocol
// 使用类型别名创建一个存储 String 类型值的 Box 实例
let stringBox = StringBox(value: "Hello, world!")
print(stringBox.value) // 输出 "Hello, world!"
```
### 泛型协议
```swift
protocol Storage {
associatedtype Item
func store(item: Item)
func retrieve() -> Item?
}
class SimpleStorage<T>: Storage {
private var items: [T] = []
func store(item: T) {
items.append(item)
}
func retrieve() -> T? {
return items.isEmpty ? nil : items.removeLast()
}
}
let intStorage = SimpleStorage<Int>()
intStorage.store(item: 42)
print(intStorage.retrieve() ?? "Empty")
// 打印: 42
```
另见
----

View File

@ -233,23 +233,9 @@ Map(coordinateRegion: $region,
Layout(布局)
----
### Background
将图像用作背景
```swift
Text("Hello World")
.font(.largeTitle)
.background(
Image("hello_world")
.resizable()
.frame(width: 100, height: 100)
)
```
### VStack
垂直线排列其子项的视图
`VStack``垂直` 堆栈布局,用于将子视图垂直排列。默认将子视图从上到下排列
```swift
VStack (alignment: .center, spacing: 20){
@ -259,13 +245,11 @@ VStack (alignment: .center, spacing: 20){
}
```
创建静态可滚动列表。文档 - [VStack](https://developer.apple.com/documentation/swiftui/vstack)
文档 - [VStack](https://developer.apple.com/documentation/swiftui/vstack)
### HStack
将其子级排列在一条水平线上的视图。
创建静态可滚动列表
`HStack``水平` 堆栈布局,用于将子视图水平排列。默认将子视图从左到右排列
```swift
HStack (alignment: .center, spacing: 20){
@ -277,9 +261,22 @@ HStack (alignment: .center, spacing: 20){
文档 - [HStack](https://developer.apple.com/documentation/swiftui/hstack)
### LazyVStack
### ZStack
`iOS 14` 一种视图,将其子级排列在垂直增长的线中,仅在需要时创建项。
`ZStack``层叠` 堆栈布局,用于将子视图重叠在一起。按照添加的顺序从下到上排列子视图,即先添加的视图会在下面,后添加的视图会覆盖在上面
```swift
ZStack {
Text("Hello")
Text("World")
}
```
文档 - [ZStack](https://developer.apple.com/documentation/swiftui/zstack)
### 懒加载 Lazy
`iOS 14.0` 之后新增的视图,仅在需要时才会创建和渲染
```swift
ScrollView {
@ -291,58 +288,30 @@ ScrollView {
}
```
文档 - [LazyVStack](https://developer.apple.com/documentation/swiftui/lazyvstack)
- 懒加载:只有当子视图进入可视区域时,才会被创建和渲染
- 自适应:子视图的宽高可以自适应
- 性能优化:适用于大量子视图或动态内容的场景
<!--rehype:className=style-round-->
### LazyHStack
<!--rehype:wrap-class=col-span-2-->
将子项排列在水平增长的线中的视图,仅在需要时创建项。
```swift
ScrollView(.horizontal) {
LazyHStack(alignment: .center, spacing: 20) {
ForEach(1...100, id: \.self) {
Text("Column \($0)")
}
}
}
```
文档 - [LazyHStack](https://developer.apple.com/documentation/swiftui/lazyhstack)
### ZStack
覆盖其子项的视图,使子项在两个轴上对齐。
```swift
ZStack {
Text("Hello")
.padding(10)
.background(Color.red)
.opacity(0.8)
Text("World")
.padding(20)
.background(Color.red)
.offset(x: 0, y: 40)
}
```
文档 - [ZStack](https://developer.apple.com/documentation/swiftui/zstack)
- 文档 - [LazyVStack](https://developer.apple.com/documentation/swiftui/lazyvstack)
- 文档 - [LazyHStack](https://developer.apple.com/documentation/swiftui/lazyhstack)
### LazyVGrid
<!--rehype:wrap-class=col-span-2-->
容器视图,将其子视图排列在垂直增长的网格中,仅在需要时创建项目
容器视图,将其子视图排列在`垂直`增长的网格中,仅在需要时创建项目
```swift
var columns: [GridItem] = Array(repeating: .init(.fixed(20)), count: 5)
var columns: [GridItem] =
Array(
repeating: .init(.fixed(20)), count: 5
)
ScrollView {
LazyVGrid(columns: columns) {
ForEach((0...100), id: \.self) {
Text("\($0)").background(Color.pink)
}
LazyVGrid(columns: columns) {
ForEach((0...100), id: \.self) {
Text("\($0)").background(Color.pink)
}
}
}
```
@ -350,7 +319,7 @@ ScrollView {
### LazyHGrid
一种容器视图,将其子视图排列在水平增长的网格中,仅在需要时创建项目
容器视图,将其子视图排列在`水平`增长的网格中,仅在需要时创建项目
```swift
var rows: [GridItem] =
@ -360,8 +329,8 @@ var rows: [GridItem] =
ScrollView(.horizontal) {
LazyHGrid(rows: rows, alignment: .top) {
ForEach((0...100), id: \.self) {
Text("\($0)").background(Color.pink)
ForEach((0...100), id: \.self) {
Text("\($0)").background(Color.pink)
}
}
}
@ -397,6 +366,20 @@ HStack {
文档 - [Divider](https://developer.apple.com/documentation/swiftui/divider)
### Background
将图像用作背景
```swift
Text("Hello World")
.font(.largeTitle)
.background(
Image("hello_world")
.resizable()
.frame(width: 100, height: 100)
)
```
Input(输入)
---

View File

@ -15,7 +15,7 @@ Symbol 特殊符号
<!--rehype:className=wrap-text-->
### 特殊符号
<!--rehype:wrap-class=row-span-3-->
<!--rehype:wrap-class=row-span-4-->
#### 国际象棋符号列表视图
@ -87,6 +87,25 @@ Symbol 特殊符号
```
<!--rehype:className=wrap-text&style=font-size: 28px;-->
### 键盘符号
<!--rehype:wrap-class=row-span-2-->
- `⌘` command
- `⌥` otptin
- `⎋` escap
- `⌫` backspace
- `⌦` delete
- `↑` up
- `→` right
- `←` left
- `↓` down
- `⇥` tab
- `⇧` shift
- `⇪` capslock
- `⌃` control
- `⏎` reternkey
<!--rehype:className=cols-2 shortcuts style-none-->
### 爱心符号
```
@ -95,7 +114,7 @@ Symbol 特殊符号
<!--rehype:className=wrap-text&style=font-size: 28px;-->
### 动物符号
<!--rehype:wrap-class=row-span-3-->
<!--rehype:wrap-class=row-span-4-->
```
𓃥 𓃠 𓃰 𓃱 𓃯 𓃭 𓃸 𓃵 𓃗 𓃘 𓃙 𓃟 𓄀 𓄁 𓄂 𓄃 𓃚 𓃛 𓃜 𓃝 𓃞 𓃒 𓃓 𓃔 𓃕 𓃖 𓃡 𓃢 𓃦 𓃩 𓃫 𓃬 𓃮 𓃲 𓃴 𓃶 𓃷 𓃹 𓃻 𓃽 𓃾 𓃿 𓄄 𓄅 𓄆 𓄇 𓆇 𓆈 𓆉 𓆌 𓆏 𓆗 𓆘 𓆙 𓆚 𓆐 𓆑 𓆒 𓆓 𓆔 𓆕 𓆖 𓆊 𓆍 𓆣 𓆤 𓆥 𓆦 𓆧 𓆨 𓆛 𓆜 𓆝 𓆞 𓆟 𓆠 𓆡 𓆢 𓄿 𓅀 𓅁 𓅂 𓅃 𓅄 𓅅 𓅆 𓅇 𓅈 𓅉 𓅊 𓅋 𓅌 𓅍 𓅎 𓅏𓅐 𓅑 𓅒 𓅓 𓅔 𓅕𓅖 𓅗 𓅘 𓅙𓅚 𓅛 𓅜 𓅝 𓅞 𓅟 𓅠 𓅡 𓅢 𓅣 𓅤 𓅥 𓅦 𓅧 𓅨 𓅩 𓅪 𓅫 𓅬 𓅭 𓅮 𓅯 𓅰 𓅱 𓅲 𓅳 𓅴 𓅵 𓅶 𓅷 𓅸 𓅹 𓅺 𓅻 𓅼 𓅽 𓅾 𓅿 𓆀 𓆁 𓆂 𓆃 𓆆
@ -118,13 +137,6 @@ Symbol 特殊符号
```
<!--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-->
@ -134,12 +146,20 @@ Symbol 特殊符号
<!--rehype:className=wrap-text&style=font-size: 28px;-->
### 货币符号
<!--rehype:wrap-class=col-span-3-->
```
$ ¢ € £ ¥ ₩ ₽ ₹ ¤ ₱ ₦ ƒ ₮ ৲ ৳ ₨ ௹ ฿ ៛ ₪ ₫ ₭ ₲ ₴ ₵ ﷼ ≋ ₿ Ł Ð ₳
```
<!--rehype:className=wrap-text&style=font-size: 28px;-->
#### 花卉符号
```
✻ ✼ ✾ ✿ ❀ ❁ ❃ ❇ ❈ ❉ ❊ ✢ ✣ ✤ ✥ ꕥ 𓇬 ⚘ 𓆸 𓆹 𓆼 𓇊 𓇚 𓇕 𓇗 𓋇 𓁙 𓁋 ֍ ֎ 𓆭 𓆰 𓆱 𓇋𓇑 𓇛 𓇟 𓇣꧁ ꧂
```
<!--rehype:className=wrap-text&style=font-size: 28px;-->
图形符号
----

439
docs/time-zones.md Normal file
View File

@ -0,0 +1,439 @@
时区列表 备忘清单
===
全部时区列表帮助用户快速查看和管理世界各地时区的备忘参考清单
全部时区列表
----
### 完整代码
<!--rehype:wrap-class=col-span-3-->
UTC (协调世界时) | 时区 | 国家 | 时区主要城市
---|---|---|---
UTC-11 | Pacific/Midway | United States Minor Outlying Islands |
UTC-11 | Pacific/Niue | Niue | Alofi
UTC-11 | Pacific/Pago_Pago | American Samoa | Pago Pago, Tāfuna, Ta`ū, Taulaga
UTC-10 | America/Adak | United States |
UTC-10 | Pacific/Honolulu | United States | Honolulu, East Honolulu, Pearl City, Hilo, Kailua
UTC-10 | Pacific/Rarotonga | Cook Islands | Avarua
UTC-10 | Pacific/Tahiti | French Polynesia | Faaa, Papeete, Punaauia, Pirae, Mahina
UTC-9:30 | Pacific/Marquesas | French Polynesia | Taiohae
UTC-9 | America/Anchorage | United States | Anchorage, Fairbanks, Eagle River, Badger, Knik-Fairview
UTC-9 | America/Juneau | United States | Juneau
UTC-9 | America/Metlakatla | United States |
UTC-9 | America/Nome | United States |
UTC-9 | America/Sitka | United States | Sitka, Ketchikan
UTC-9 | America/Yakutat | United States |
UTC-9 | Pacific/Gambier | French Polynesia |
UTC-8 | America/Los_Angeles | United States | Los Angeles, San Diego, San Jose, San Francisco, Seattle
UTC-8 | America/Tijuana | Mexico | Tijuana, Mexicali, Ensenada, Rosarito, Tecate
UTC-8 | America/Vancouver | Canada | Vancouver, Surrey, Okanagan, Victoria, Burnaby
UTC-8 | Pacific/Pitcairn | Pitcairn | Adamstown
UTC-7 | America/Boise | United States | Boise, Meridian, Nampa, Idaho Falls, Pocatello
UTC-7 | America/Cambridge_Bay | Canada |
UTC-7 | America/Ciudad_Juarez | Mexico | Ciudad Juárez, Ascensión, Ascención, Puerto Palomas
UTC-7 | America/Creston | Canada | Creston
UTC-7 | America/Dawson | Canada |
UTC-7 | America/Dawson_Creek | Canada | Fort St. John, Dawson Creek
UTC-7 | America/Denver | United States | Denver, El Paso, Albuquerque, Colorado Springs, Aurora
UTC-7 | America/Edmonton | Canada | Calgary, Edmonton, Shaughnessy, Red Deer, Sherwood Park
UTC-7 | America/Fort_Nelson | Canada |
UTC-7 | America/Hermosillo | Mexico | Hermosillo, Ciudad Obregón, Nogales, San Luis Río Colorado, Navojoa
UTC-7 | America/Inuvik | Canada |
UTC-7 | America/Mazatlan | Mexico | Culiacán, Mazatlán, Tepic, Los Mochis, La Paz
UTC-7 | America/Phoenix | United States | Phoenix, Tucson, Mesa, Chandler, Gilbert
UTC-7 | America/Whitehorse | Canada | Whitehorse
UTC-7 | America/Yellowknife | Canada | Yellowknife
UTC-6 | America/Bahia_Banderas | Mexico | Mezcales, San Vicente, Bucerías, Valle de Banderas
UTC-6 | America/Belize | Belize | Belize City, San Ignacio, San Pedro, Orange Walk, Corozal
UTC-6 | America/Chicago | United States | Chicago, Houston, San Antonio, Dallas, Austin
UTC-6 | America/Chihuahua | Mexico | Chihuahua, Ciudad Delicias, Cuauhtémoc, Parral, Nuevo Casas Grandes
UTC-6 | America/Costa_Rica | Costa Rica | San José, Limón, San Francisco, Alajuela, Liberia
UTC-6 | America/El_Salvador | El Salvador | San Salvador, Soyapango, San Miguel, Santa Ana, Mejicanos
UTC-6 | America/Guatemala | Guatemala | Guatemala City, Villa Nueva, Mixco, Cobán, Quetzaltenango
UTC-6 | America/Indiana/Knox | United States |
UTC-6 | America/Indiana/Tell_City | United States | Tell City
UTC-6 | America/Managua | Nicaragua | Managua, León, Masaya, Chinandega, Matagalpa
UTC-6 | America/Matamoros | Mexico | Reynosa, Heroica Matamoros, Nuevo Laredo, Piedras Negras, Ciudad Acuña
UTC-6 | America/Menominee | United States | Menominee, Iron Mountain, Kingsford, Ironwood
UTC-6 | America/Merida | Mexico | Mérida, Campeche, Ciudad del Carmen, Kanasín, Valladolid
UTC-6 | America/Mexico_City | Mexico | Mexico City, Iztapalapa, León de los Aldama, Puebla, Ecatepec de Morelos
UTC-6 | America/Monterrey | Mexico | Monterrey, Torreón, Saltillo, Guadalupe, Victoria de Durango
UTC-6 | America/North_Dakota/Beulah | United States |
UTC-6 | America/North_Dakota/Center | United States |
UTC-6 | America/North_Dakota/New_Salem | United States | Mandan
UTC-6 | America/Ojinaga | Mexico | Manuel Ojinaga, Ojinaga
UTC-6 | America/Rankin_Inlet | Canada |
UTC-6 | America/Regina | Canada | Saskatoon, Regina, Prince Albert, Moose Jaw, North Battleford
UTC-6 | America/Resolute | Canada |
UTC-6 | America/Swift_Current | Canada | Swift Current
UTC-6 | America/Tegucigalpa | Honduras | Tegucigalpa, San Pedro Sula, La Ceiba, Choloma, El Progreso
UTC-6 | America/Winnipeg | Canada | Winnipeg, Brandon, Steinbach, Kenora, Thompson
UTC-6 | Pacific/Easter | Chile | Hanga Roa
UTC-6 | Pacific/Galapagos | Ecuador | Puerto Ayora, Puerto Baquerizo Moreno
UTC-5 | America/Atikokan | Canada |
UTC-5 | America/Bogota | Colombia | Bogotá, Cali, Medellín, Barranquilla, Cartagena
UTC-5 | America/Cancun | Mexico | Cancún, Chetumal, Playa del Carmen, Cozumel, Felipe Carrillo Puerto
UTC-5 | America/Cayman | Cayman Islands | George Town, West Bay, Bodden Town, North Side, East End
UTC-5 | America/Detroit | United States | Detroit, Grand Rapids, Warren, Sterling Heights, Ann Arbor
UTC-5 | America/Eirunepe | Brazil | Eirunepé, Benjamin Constant, Envira
UTC-5 | America/Grand_Turk | Turks and Caicos Islands | Cockburn Town
UTC-5 | America/Guayaquil | Ecuador | Quito, Guayaquil, Cuenca, Santo Domingo de los Colorados, Ambato
UTC-5 | America/Havana | Cuba | Havana, Santiago de Cuba, Camagüey, Holguín, Guantánamo
UTC-5 | America/Indiana/Indianapolis | United States | Indianapolis, Fort Wayne, South Bend, Carmel, Bloomington
UTC-5 | America/Indiana/Marengo | United States |
UTC-5 | America/Indiana/Petersburg | United States |
UTC-5 | America/Indiana/Vevay | United States |
UTC-5 | America/Indiana/Vincennes | United States | Jasper, Washington, Huntingburg
UTC-5 | America/Indiana/Winamac | United States |
UTC-5 | America/Iqaluit | Canada | Iqaluit
UTC-5 | America/Jamaica | Jamaica | Kingston, New Kingston, Spanish Town, Portmore, Montego Bay
UTC-5 | America/Kentucky/Louisville | United States | Louisville, Jeffersonville, New Albany, Jeffersontown, Pleasure Ridge Park
UTC-5 | America/Kentucky/Monticello | United States | Monticello
UTC-5 | America/Lima | Peru | Lima, Callao, Arequipa, Trujillo, Chiclayo
UTC-5 | America/Nassau | Bahamas | Nassau, Lucaya, Freeport, West End, Coopers Town
UTC-5 | America/New_York | United States | New York City, Brooklyn, Queens, Philadelphia, Manhattan
UTC-5 | America/Panama | Panama | Panamá, San Miguelito, Juan Díaz, David, Arraiján
UTC-5 | America/Port-au-Prince | Haiti | Port-au-Prince, Carrefour, Delmas 73, Port-de-Paix, Pétionville
UTC-5 | America/Rio_Branco | Brazil | Rio Branco, Cruzeiro do Sul, Senador Guiomard, Sena Madureira, Tarauacá
UTC-5 | America/Toronto | Canada | Toronto, Montréal, Ottawa, Mississauga, Brampton
UTC-4 | America/Anguilla | Anguilla | The Valley, Blowing Point Village, Sandy Ground Village, The Quarter, Sandy Hill
UTC-4 | America/Antigua | Antigua and Barbuda | Saint Johns, Piggotts, Bolands, Codrington, Parham
UTC-4 | America/Aruba | Aruba | Oranjestad, Tanki Leendert, San Nicolas, Santa Cruz, Paradera
UTC-4 | America/Asuncion | Paraguay | Asunción, Ciudad del Este, San Lorenzo, Capiatá, Lambaré
UTC-4 | America/Barbados | Barbados | Bridgetown, Speightstown, Oistins, Bathsheba, Holetown
UTC-4 | America/Blanc-Sablon | Canada |
UTC-4 | America/Boa_Vista | Brazil | Boa Vista
UTC-4 | America/Campo_Grande | Brazil | Campo Grande, Dourados, Corumbá, Três Lagoas, Ponta Porã
UTC-4 | America/Caracas | Venezuela | Caracas, Maracaibo, Maracay, Valencia, Barquisimeto
UTC-4 | America/Cuiaba | Brazil | Cuiabá, Várzea Grande, Rondonópolis, Sinop, Barra do Garças
UTC-4 | America/Curacao | Curacao | Willemstad, Sint Michiel Liber
UTC-4 | America/Dominica | Dominica | Roseau, Portsmouth, Berekua, Saint Joseph, Wesley
UTC-4 | America/Glace_Bay | Canada | Sydney, Glace Bay, Sydney Mines
UTC-4 | America/Goose_Bay | Canada | Happy Valley-Goose Bay, Labrador City
UTC-4 | America/Grenada | Grenada | Saint George's, Gouyave, Grenville, Victoria, Saint Davids
UTC-4 | America/Guadeloupe | Guadeloupe | Les Abymes, Baie-Mahault, Le Gosier, Petit-Bourg, Sainte-Anne
UTC-4 | America/Guyana | Guyana | Georgetown, Linden, New Amsterdam, Anna Regina, Bartica
UTC-4 | America/Halifax | Canada | Halifax, Dartmouth, Charlottetown, Lower Sackville, Cole Harbour
UTC-4 | America/Kralendijk | Bonaire, Saint Eustatius and Saba | Kralendijk, Oranjestad, The Bottom
UTC-4 | America/La_Paz | Bolivia | La Paz, Santa Cruz de la Sierra, Cochabamba, Sucre, Oruro
UTC-4 | America/Lower_Princes | Sint Maarten | Cul de Sac, Lower Princes Quarter, Koolbaai, Philipsburg
UTC-4 | America/Manaus | Brazil | Manaus, Itacoatiara, Parintins, Manacapuru, Coari
UTC-4 | America/Marigot | Saint Martin | Marigot
UTC-4 | America/Martinique | Martinique | Fort-de-France, Le Lamentin, Le Robert, Sainte-Marie, Le François
UTC-4 | America/Moncton | Canada | Moncton, Saint John, Fredericton, Dieppe, Miramichi
UTC-4 | America/Montserrat | Montserrat | Brades, Saint Peters, Plymouth
UTC-4 | America/Porto_Velho | Brazil | Porto Velho, Ji Paraná, Vilhena, Ariquemes, Cacoal
UTC-4 | America/Port_of_Spain | Trinidad and Tobago | Chaguanas, Mon Repos, San Fernando, Port of Spain, Rio Claro
UTC-4 | America/Puerto_Rico | Puerto Rico | San Juan, Bayamón, Carolina, Ponce, Arecibo
UTC-4 | America/Santiago | Chile | Santiago, Puente Alto, Antofagasta, Viña del Mar, Valparaíso
UTC-4 | America/Santo_Domingo | Dominican Republic | Santo Domingo, Santiago de los Caballeros, Santo Domingo Oeste, Santo Domingo Este, San Pedro de Macorís
UTC-4 | America/St_Barthelemy | Saint Barthelemy | Gustavia
UTC-4 | America/St_Kitts | Saint Kitts and Nevis | Basseterre, Fig Tree, Market Shop, Saint Pauls, Middle Island
UTC-4 | America/St_Lucia | Saint Lucia | Castries, Bisee, Vieux Fort, Micoud, Soufrière
UTC-4 | America/St_Thomas | U.S. Virgin Islands | Saint Croix, Charlotte Amalie, Cruz Bay
UTC-4 | America/St_Vincent | Saint Vincent and the Grenadines | Kingstown, Georgetown, Barrouallie, Port Elizabeth, Chateaubelair
UTC-4 | America/Thule | Greenland |
UTC-4 | America/Tortola | British Virgin Islands | Road Town
UTC-4 | Atlantic/Bermuda | Bermuda | Hamilton
UTC-3:30 | America/St_Johns | Canada | St. John's, Mount Pearl, Corner Brook, Conception Bay South, Grand Falls-Windsor
UTC-3 | America/Araguaina | Brazil | Palmas, Araguaína, Gurupi, Miracema do Tocantins, Taguatinga
UTC-3 | America/Argentina/Buenos_Aires | Argentina | Buenos Aires, Mar del Plata, Bahía Blanca, Merlo, Quilmes
UTC-3 | America/Argentina/Catamarca | Argentina | Catamarca, Comodoro Rivadavia, Trelew, Puerto Madryn, Esquel
UTC-3 | America/Argentina/Cordoba | Argentina | Córdoba, Rosario, Santa Fe, Corrientes, Posadas
UTC-3 | America/Argentina/Jujuy | Argentina | San Salvador de Jujuy, San Pedro de Jujuy, Libertador General San Martín, Palpalá, La Quiaca
UTC-3 | America/Argentina/La_Rioja | Argentina | La Rioja, Chilecito, Arauco, Chamical
UTC-3 | America/Argentina/Mendoza | Argentina | San Rafael, Mendoza, San Martín
UTC-3 | America/Argentina/Rio_Gallegos | Argentina | Río Gallegos, Caleta Olivia, Pico Truncado, Puerto Deseado, Las Heras
UTC-3 | America/Argentina/Salta | Argentina | Salta, Neuquén, Santa Rosa, San Carlos de Bariloche, Cipolletti
UTC-3 | America/Argentina/San_Juan | Argentina | San Juan, Chimbas, Santa Lucía, Pocito, Caucete
UTC-3 | America/Argentina/San_Luis | Argentina | San Luis, Villa Mercedes, La Punta, Merlo, Justo Daract
UTC-3 | America/Argentina/Tucuman | Argentina | San Miguel de Tucumán, Yerba Buena, Tafí Viejo, Alderetes, Aguilares
UTC-3 | America/Argentina/Ushuaia | Argentina | Ushuaia, Río Grande
UTC-3 | America/Bahia | Brazil | Salvador, Feira de Santana, Vitória da Conquista, Itabuna, Camaçari
UTC-3 | America/Belem | Brazil | Belém, Macapá, Ananindeua, Parauapebas, Marabá
UTC-3 | America/Cayenne | French Guiana | Cayenne, Matoury, Saint-Laurent-du-Maroni, Kourou, Rémire-Montjoly
UTC-3 | America/Fortaleza | Brazil | Fortaleza, São Luís, Natal, Teresina, João Pessoa
UTC-3 | America/Maceio | Brazil | Maceió, Aracaju, Arapiraca, Nossa Senhora do Socorro, São Cristóvão
UTC-3 | America/Miquelon | Saint Pierre and Miquelon | Saint-Pierre, Miquelon
UTC-3 | America/Montevideo | Uruguay | Montevideo, Salto, Paysandú, Las Piedras, Rivera
UTC-3 | America/Paramaribo | Suriname | Paramaribo, Lelydorp, Brokopondo, Nieuw Nickerie, Meerzorg
UTC-3 | America/Punta_Arenas | Chile | Punta Arenas, Puerto Natales
UTC-3 | America/Recife | Brazil | Recife, Jaboatão, Jaboatão dos Guararapes, Olinda, Paulista
UTC-3 | America/Santarem | Brazil | Santarém, Altamira, Itaituba, Óbidos, Oriximiná
UTC-3 | America/Sao_Paulo | Brazil | São Paulo, Rio de Janeiro, Belo Horizonte, Brasília, Curitiba
UTC-3 | Antarctica/Palmer | Antarctica |
UTC-3 | Antarctica/Rothera | Antarctica |
UTC-3 | Atlantic/Stanley | Falkland Islands | Stanley
UTC-2 | America/Noronha | Brazil |
UTC-2 | America/Nuuk | Greenland | Nuuk, Sisimiut, Ilulissat, Qaqortoq, Aasiaat
UTC-2 | Atlantic/South_Georgia | South Georgia and the South Sandwich Islands | Grytviken
UTC-1 | America/Scoresbysund | Greenland |
UTC-1 | Atlantic/Azores | Portugal | Ponta Delgada, Lagoa, Angra do Heroísmo, Rosto de Cão, Rabo de Peixe
UTC-1 | Atlantic/Cape_Verde | Cabo Verde | Praia, Mindelo, Espargos, Assomada, Tarrafal
UTC+0 | Africa/Abidjan | Ivory Coast | Abidjan, Abobo, Bouaké, Korhogo, Daloa
UTC+0 | Africa/Accra | Ghana | Kumasi, Accra, Tamale, Takoradi, Sekondi
UTC+0 | Africa/Bamako | Mali | Bamako, Ségou, Sikasso, Mopti, Koutiala
UTC+0 | Africa/Banjul | Gambia | Serekunda, Brikama, Bununka Kunda, Sukuta, Talinding
UTC+0 | Africa/Bissau | Guinea-Bissau | Bissau, Gabú, Bafatá, Canchungo, Bissorã
UTC+0 | Africa/Casablanca | Morocco | Casablanca, Rabat, Fès, Sale, Marrakesh
UTC+0 | Africa/Conakry | Guinea | Conakry, Camayenne, Nzérékoré, Kankan, Manéah
UTC+0 | Africa/Dakar | Senegal | Dakar, Pikine, Touba, Thiès, Thiès Nones
UTC+0 | Africa/El_Aaiun | Western Sahara | Laayoune, Dakhla, Boujdour, Laayoune Plage
UTC+0 | Africa/Freetown | Sierra Leone | Freetown, Bo, Kenema, Koidu, Makeni
UTC+0 | Africa/Lome | Togo | Lomé, Sokodé, Kara, Atakpamé, Kpalimé
UTC+0 | Africa/Monrovia | Liberia | Monrovia, Gbarnga, Buchanan, Kakata, Zwedru
UTC+0 | Africa/Nouakchott | Mauritania | Nouakchott, Nouadhibou, Dar Naim, Néma, Kaédi
UTC+0 | Africa/Ouagadougou | Burkina Faso | Ouagadougou, Bobo-Dioulasso, Koudougou, Saaba, Ouahigouya
UTC+0 | Africa/Sao_Tome | Sao Tome and Principe | São Tomé, Santo António
UTC+0 | America/Danmarkshavn | Greenland |
UTC+0 | Antarctica/Troll | Antarctica |
UTC+0 | Atlantic/Canary | Spain | Las Palmas de Gran Canaria, Santa Cruz de Tenerife, La Laguna, Telde, Arona
UTC+0 | Atlantic/Faroe | Faroe Islands | Tórshavn, Klaksvík, Fuglafjørður, Miðvágur, Tvøroyri
UTC+0 | Atlantic/Madeira | Portugal | Funchal, Câmara de Lobos, São Martinho, Caniço, Machico
UTC+0 | Atlantic/Reykjavik | Iceland | Reykjavík, Kópavogur, Hafnarfjörður, Reykjanesbær, Akureyri
UTC+0 | Atlantic/St_Helena | Saint Helena | Jamestown, Georgetown, Edinburgh of the Seven Seas
UTC+0 | Europe/Dublin | Ireland | Dublin, South Dublin, Cork, Limerick, Galway
UTC+0 | Europe/Guernsey | Guernsey | Saint Peter Port, Saint Sampson, St Martin, St Anne, Saint Saviour
UTC+0 | Europe/Isle_of_Man | Isle of Man | Douglas, Ramsey, Peel, Port Erin, Castletown
UTC+0 | Europe/Jersey | Jersey | Saint Helier, Le Hocq
UTC+0 | Europe/Lisbon | Portugal | Lisbon, Porto, Amadora, Braga, Setúbal
UTC+0 | Europe/London | United Kingdom | London, Birmingham, Liverpool, Glasgow, Sheffield
UTC+1 | Africa/Algiers | Algeria | Algiers, Oran, Constantine, Annaba, Blida
UTC+1 | Africa/Bangui | Central African Republic | Bangui, Bimbo, Bégoua, Carnot, Berbérati
UTC+1 | Africa/Brazzaville | Republic of the Congo | Brazzaville, Pointe-Noire, Dolisie, Nkayi, Kayes
UTC+1 | Africa/Ceuta | Spain | Melilla
UTC+1 | Africa/Douala | Cameroon | Douala, Yaoundé, Bamenda, Bafoussam, Maroua
UTC+1 | Africa/Kinshasa | Democratic Republic of the Congo | Kinshasa, Kikwit, Masina, Mbandaka, Matadi
UTC+1 | Africa/Lagos | Nigeria | Lagos, Kano, Ibadan, Port Harcourt, Benin City
UTC+1 | Africa/Libreville | Gabon | Libreville, Port-Gentil, Franceville, Owendo, Oyem
UTC+1 | Africa/Luanda | Angola | Luanda, Lubango, Huambo, Benguela, Cabinda
UTC+1 | Africa/Malabo | Equatorial Guinea | Bata, Malabo, Ebebiyin, Aconibe, Añisoc
UTC+1 | Africa/Ndjamena | Chad | N'Djamena, Moundou, Abéché, Sarh, Kelo
UTC+1 | Africa/Niamey | Niger | Niamey, Zinder, Maradi, Agadez, Alaghsas
UTC+1 | Africa/Porto-Novo | Benin | Cotonou, Abomey-Calavi, Porto-Novo, Parakou, Godomè
UTC+1 | Africa/Tunis | Tunisia | Tunis, Sfax, Sousse, Kairouan, Bizerte
UTC+1 | Africa/Windhoek | Namibia | Windhoek, Rundu, Walvis Bay, Oshakati, Swakopmund
UTC+1 | Arctic/Longyearbyen | Svalbard and Jan Mayen | Longyearbyen, Olonkinbyen
UTC+1 | Europe/Amsterdam | The Netherlands | Amsterdam, Rotterdam, The Hague, Utrecht, Groningen
UTC+1 | Europe/Andorra | Andorra | Andorra la Vella, les Escaldes, Encamp, Sant Julià de Lòria, la Massana
UTC+1 | Europe/Belgrade | Serbia | Belgrade, Pristina, Niš, Novi Sad, Prizren
UTC+1 | Europe/Berlin | Germany | Berlin, Hamburg, Munich, Köln, Frankfurt am Main
UTC+1 | Europe/Bratislava | Slovakia | Bratislava, Košice, Nitra, Prešov, Žilina
UTC+1 | Europe/Brussels | Belgium | Brussels, Antwerpen, Gent, Charleroi, Liège
UTC+1 | Europe/Budapest | Hungary | Budapest, Debrecen, Szeged, Miskolc, Pécs
UTC+1 | Europe/Copenhagen | Denmark | Copenhagen, Århus, Odense, Aalborg, Frederiksberg
UTC+1 | Europe/Gibraltar | Gibraltar | Gibraltar
UTC+1 | Europe/Ljubljana | Slovenia | Ljubljana, Maribor, Kranj, Celje, Koper
UTC+1 | Europe/Luxembourg | Luxembourg | Luxembourg, Esch-sur-Alzette, Dudelange, Schifflange, Bettembourg
UTC+1 | Europe/Madrid | Spain | Madrid, Barcelona, Valencia, Sevilla, Zaragoza
UTC+1 | Europe/Malta | Malta | San Pawl il-Baħar, Birkirkara, Mosta, Sliema, Qormi
UTC+1 | Europe/Monaco | Monaco | Monaco, Monte-Carlo, La Condamine
UTC+1 | Europe/Oslo | Norway | Oslo, Bergen, Trondheim, Stavanger, Drammen
UTC+1 | Europe/Paris | France | Paris, Marseille, Lyon, Toulouse, Nice
UTC+1 | Europe/Podgorica | Montenegro | Podgorica, Nikšić, Herceg Novi, Pljevlja, Budva
UTC+1 | Europe/Prague | Czechia | Prague, Brno, Ostrava, Pilsen, Liberec
UTC+1 | Europe/Rome | Italy | Rome, Milan, Naples, Turin, Palermo
UTC+1 | Europe/San_Marino | San Marino | Serravalle, Borgo Maggiore, San Marino, Domagnano, Fiorentino
UTC+1 | Europe/Sarajevo | Bosnia and Herzegovina | Sarajevo, Banja Luka, Zenica, Tuzla, Mostar
UTC+1 | Europe/Skopje | North Macedonia | Skopje, Kumanovo, Prilep, Bitola, Čair
UTC+1 | Europe/Stockholm | Sweden | Stockholm, Göteborg, Malmö, Uppsala, Linköping
UTC+1 | Europe/Tirane | Albania | Tirana, Durrës, Elbasan, Vlorë, Shkodër
UTC+1 | Europe/Vaduz | Liechtenstein | Schaan, Vaduz, Triesen, Balzers, Eschen
UTC+1 | Europe/Vatican | Vatican | Vatican City
UTC+1 | Europe/Vienna | Austria | Vienna, Graz, Linz, Favoriten, Donaustadt
UTC+1 | Europe/Warsaw | Poland | Warsaw, Łódź, Kraków, Wrocław, Poznań
UTC+1 | Europe/Zagreb | Croatia | Zagreb, Split, Rijeka, Osijek, Zadar
UTC+1 | Europe/Zurich | Switzerland | Zürich, Genève, Basel, Lausanne, Bern
UTC+2 | Africa/Blantyre | Malawi | Lilongwe, Blantyre, Mzuzu, Zomba, Kasungu
UTC+2 | Africa/Bujumbura | Burundi | Bujumbura, Gitega, Ngozi, Rumonge, Cibitoke
UTC+2 | Africa/Cairo | Egypt | Cairo, Alexandria, Giza, Shubrā al Khaymah, Port Said
UTC+2 | Africa/Gaborone | Botswana | Gaborone, Francistown, Mogoditshane, Maun, Molepolole
UTC+2 | Africa/Harare | Zimbabwe | Harare, Bulawayo, Chitungwiza, Mutare, Gweru
UTC+2 | Africa/Johannesburg | South Africa | Johannesburg, Cape Town, Durban, Soweto, Pretoria
UTC+2 | Africa/Juba | South Sudan | Juba, Winejok, Yei, Malakal, Wau
UTC+2 | Africa/Khartoum | Sudan | Khartoum, Omdurman, Nyala, Port Sudan, Kassala
UTC+2 | Africa/Kigali | Rwanda | Kigali, Gisenyi, Butare, Gitarama, Musanze
UTC+2 | Africa/Lubumbashi | Democratic Republic of the Congo | Lubumbashi, Mbuji-Mayi, Kananga, Kisangani, Bukavu
UTC+2 | Africa/Lusaka | Zambia | Lusaka, Ndola, Kitwe, Chipata, Kabwe
UTC+2 | Africa/Maputo | Mozambique | Maputo, Matola, Nampula, Beira, Chimoio
UTC+2 | Africa/Maseru | Lesotho | Maseru, Maputsoe, Mohale's Hoek, Mafeteng, Hlotse
UTC+2 | Africa/Mbabane | Eswatini | Manzini, Mbabane, Big Bend, Malkerns, Nhlangano
UTC+2 | Africa/Tripoli | Libya | Tripoli, Benghazi, Misratah, Zliten, Al Khums
UTC+2 | Asia/Beirut | Lebanon | Beirut, Ras Bayrūt, Tripoli, Sidon, Tyre
UTC+2 | Asia/Famagusta | Cyprus | Famagusta, Kyrenia, Égkomi, Protaras, Paralímni
UTC+2 | Asia/Gaza | Palestinian Territory | Gaza, Khān Yūnis, Jabālyā, Rafaḩ, Dayr al Balaḩ
UTC+2 | Asia/Hebron | Palestinian Territory | East Jerusalem, Hebron, Nablus, Ţūlkarm, Qalqīlyah
UTC+2 | Asia/Jerusalem | Israel | Jerusalem, Tel Aviv, West Jerusalem, Haifa, Rishon LeTsiyyon
UTC+2 | Asia/Nicosia | Cyprus | Nicosia, Limassol, Larnaca, Stróvolos, Káto Lakatámeia
UTC+2 | Europe/Athens | Greece | Athens, Thessaloníki, Pátra, Piraeus, Lárisa
UTC+2 | Europe/Bucharest | Romania | Bucharest, Sector 3, Iaşi, Sector 6, Sector 2
UTC+2 | Europe/Chisinau | Moldova | Chisinau, Tiraspol, Bălţi, Bender, Rîbniţa
UTC+2 | Europe/Helsinki | Finland | Helsinki, Espoo, Tampere, Oulu, Turku
UTC+2 | Europe/Kaliningrad | Russia | Kaliningrad, Chernyakhovsk, Sovetsk, Baltiysk, Gusev
UTC+2 | Europe/Kyiv | Ukraine | Kyiv, Kharkiv, Odesa, Dnipro, Donetsk
UTC+2 | Europe/Mariehamn | Aland Islands | Mariehamn
UTC+2 | Europe/Riga | Latvia | Riga, Daugavpils, Liepāja, Jelgava, Jūrmala
UTC+2 | Europe/Sofia | Bulgaria | Sofia, Plovdiv, Varna, Burgas, Stara Zagora
UTC+2 | Europe/Tallinn | Estonia | Tallinn, Tartu, Narva, Pärnu, Nõmme
UTC+2 | Europe/Vilnius | Lithuania | Vilnius, Kaunas, Klaipėda, Šiauliai, Panevėžys
UTC+3 | Africa/Addis_Ababa | Ethiopia | Addis Ababa, Jijiga, Gonder, Mek'ele, Nazrēt
UTC+3 | Africa/Asmara | Eritrea | Asmara, Keren, Himora, Massawa, Assab
UTC+3 | Africa/Dar_es_Salaam | Tanzania | Dar es Salaam, Mwanza, Arusha, Mbeya, Morogoro
UTC+3 | Africa/Djibouti | Djibouti | Djibouti, Ali Sabih, Dikhil, Tadjoura, Arta
UTC+3 | Africa/Kampala | Uganda | Kampala, Gulu, Lira, Mbarara, Jinja
UTC+3 | Africa/Mogadishu | Somalia | Mogadishu, Borama, Hargeysa, Berbera, Kismayo
UTC+3 | Africa/Nairobi | Kenya | Nairobi, Kakamega, Mombasa, Nakuru, Ruiru
UTC+3 | Antarctica/Syowa | Antarctica |
UTC+3 | Asia/Aden | Yemen | Sanaa, Aden, Al Ḩudaydah, Taiz, Mukalla
UTC+3 | Asia/Amman | Jordan | Amman, Zarqa, Irbid, Russeifa, Wādī as Sīr
UTC+3 | Asia/Baghdad | Iraq | Baghdad, Al Mawşil al Jadīdah, Al Başrah al Qadīmah, Mosul, Erbil
UTC+3 | Asia/Bahrain | Bahrain | Ar Rifā, Manama, Al Muharraq, Dār Kulayb, Madīnat Ḩamad
UTC+3 | Asia/Damascus | Syria | Aleppo, Damascus, Homs, Latakia, Ar Raqqah
UTC+3 | Asia/Kuwait | Kuwait | Al Aḩmadī, Ḩawallī, As Sālimīyah, Şabāḩ as Sālim, Al Farwānīyah
UTC+3 | Asia/Qatar | Qatar | Doha, Ar Rayyān, Umm Şalāl Muḩammad, Al Wakrah, Al Khawr
UTC+3 | Asia/Riyadh | Saudi Arabia | Jeddah, Riyadh, Mecca, Medina, Dammam
UTC+3 | Europe/Istanbul | Turkey | Istanbul, Ankara, Bursa, İzmir, Gaziantep
UTC+3 | Europe/Kirov | Russia | Kirov, Kirovo-Chepetsk, Vyatskiye Polyany, Slobodskoy, Kotelnich
UTC+3 | Europe/Minsk | Belarus | Minsk, Homyel', Hrodna, Mahilyow, Brest
UTC+3 | Europe/Moscow | Russia | Moscow, Saint Petersburg, Nizhniy Novgorod, Kazan, Rostov-na-Donu
UTC+3 | Europe/Simferopol | Ukraine | Sevastopol, Simferopol, Kerch, Yevpatoriya, Yalta
UTC+3 | Europe/Volgograd | Russia | Volgograd, Volzhsky, Kamyshin, Mikhaylovka, Uryupinsk
UTC+3 | Indian/Antananarivo | Madagascar | Antananarivo, Toamasina, Antsirabe, Mahajanga, Fianarantsoa
UTC+3 | Indian/Comoro | Comoros | Moroni, Moutsamoudou, Fomboni, Tsimbeo, Domoni
UTC+3 | Indian/Mayotte | Mayotte | Mamoudzou, Koungou, Dzaoudzi, Dembeni, Sada
UTC+3:30 | Asia/Tehran | Iran | Tehran, Mashhad, Isfahan, Karaj, Tabriz
UTC+4 | Asia/Baku | Azerbaijan | Baku, Sumqayıt, Ganja, Lankaran, Tovuz
UTC+4 | Asia/Dubai | United Arab Emirates | Dubai, Abu Dhabi, Sharjah, Al Ain City, Ajman City
UTC+4 | Asia/Muscat | Oman | Muscat, Seeb, Bawshar, Ibrī, Şalālah
UTC+4 | Asia/Tbilisi | Georgia | Tbilisi, Batumi, Kutaisi, Rustavi, Sokhumi
UTC+4 | Asia/Yerevan | Armenia | Yerevan, Gyumri, Vanadzor, Vagharshapat, Hrazdan
UTC+4 | Europe/Astrakhan | Russia | Astrakhan, Akhtubinsk, Znamensk, Kharabali, Kamyzyak
UTC+4 | Europe/Samara | Russia | Samara, Tolyatti, Izhevsk, Syzran, Novokuybyshevsk
UTC+4 | Europe/Saratov | Russia | Saratov, Balakovo, Engels, Balashov, Volsk
UTC+4 | Europe/Ulyanovsk | Russia | Ulyanovsk, Dimitrovgrad, Inza, Barysh, Novoulyanovsk
UTC+4 | Indian/Mahe | Seychelles | Victoria, Anse Boileau, Bel Ombre, Beau Vallon, Cascade
UTC+4 | Indian/Mauritius | Mauritius | Port Louis, Vacoas, Beau Bassin-Rose Hill, Curepipe, Quatre Bornes
UTC+4 | Indian/Reunion | Reunion | Saint-Denis, Saint-Paul, Le Tampon, Saint-Pierre, Saint-André
UTC+4:30 | Asia/Kabul | Afghanistan | Kabul, Herāt, Mazār-e Sharīf, Kandahār, Jalālābād
UTC+5 | Antarctica/Mawson | Antarctica |
UTC+5 | Asia/Aqtau | Kazakhstan | Shevchenko, Zhanaozen, Beyneu, Shetpe, Kuryk
UTC+5 | Asia/Aqtobe | Kazakhstan | Aktobe, Kandyagash, Shalqar, Khromtau, Embi
UTC+5 | Asia/Ashgabat | Turkmenistan | Ashgabat, Türkmenabat, Daşoguz, Mary, Balkanabat
UTC+5 | Asia/Atyrau | Kazakhstan | Atyrau, Qulsary, Shalkar, Balykshi, Maqat
UTC+5 | Asia/Dushanbe | Tajikistan | Dushanbe, Isfara, Istaravshan, Kŭlob, Konibodom
UTC+5 | Asia/Karachi | Pakistan | Karachi, Lahore, Faisalabad, Rawalpindi, Multan
UTC+5 | Asia/Oral | Kazakhstan | Oral, Aqsay, Zhanibek, Tasqala, Zhumysker
UTC+5 | Asia/Qyzylorda | Kazakhstan | Kyzylorda, Novokazalinsk, Aral, Shiyeli, Zhangaqorghan
UTC+5 | Asia/Samarkand | Uzbekistan | Samarkand, Nukus, Bukhara, Qarshi, Tirmiz
UTC+5 | Asia/Tashkent | Uzbekistan | Tashkent, Namangan, Andijon, Fergana, Qoqon
UTC+5 | Asia/Yekaterinburg | Russia | Yekaterinburg, Chelyabinsk, Ufa, Perm, Tyumen
UTC+5 | Indian/Kerguelen | French Southern Territories | Port-aux-Français
UTC+5 | Indian/Maldives | Maldives | Male, Fuvahmulah, Hithadhoo, Kulhudhuffushi, Thinadhoo
UTC+5:30 | Asia/Colombo | Sri Lanka | Colombo, Dehiwala-Mount Lavinia, Maharagama, Jaffna, Moratuwa
UTC+5:30 | Asia/Kolkata | India | Mumbai, Delhi, Bengaluru, Hyderābād, Ahmedabad
UTC+5:45 | Asia/Kathmandu | Nepal | Kathmandu, Bharatpur, Pātan, Birgañj, Biratnagar
UTC+6 | Antarctica/Vostok | Antarctica |
UTC+6 | Asia/Almaty | Kazakhstan | Almaty, Shymkent, Karagandy, Taraz, Astana
UTC+6 | Asia/Bishkek | Kyrgyzstan | Bishkek, Osh, Jalal-Abad, Karakol, Tokmok
UTC+6 | Asia/Dhaka | Bangladesh | Dhaka, Chattogram, Khulna, Rangpur, Comilla
UTC+6 | Asia/Omsk | Russia | Omsk, Tara, Kalachinsk, Znamenskoye, Tavricheskoye
UTC+6 | Asia/Qostanay | Kazakhstan | Kostanay, Rudnyy, Baikonur, Zhitikara, Arkalyk
UTC+6 | Asia/Thimphu | Bhutan | Thimphu, Phuntsholing, Tsirang, Punākha, Pemagatshel
UTC+6 | Asia/Urumqi | China | Ürümqi, Shihezi, Korla, Aksu, Kashgar
UTC+6 | Indian/Chagos | British Indian Ocean Territory |
UTC+6:30 | Asia/Yangon | Myanmar | Yangon, Mandalay, Nay Pyi Taw, Mawlamyine, Kyain Seikgyi Township
UTC+6:30 | Indian/Cocos | Cocos Islands | West Island
UTC+7 | Antarctica/Davis | Antarctica |
UTC+7 | Asia/Bangkok | Thailand | Hanoi, Bangkok, Haiphong, Samut Prakan, Huế
UTC+7 | Asia/Barnaul | Russia | Barnaul, Biysk, Rubtsovsk, Gorno-Altaysk, Novoaltaysk
UTC+7 | Asia/Hovd | Mongolia | Ulaangom, Khovd, Ölgii, Altai, Uliastay
UTC+7 | Asia/Ho_Chi_Minh | Vietnam | Ho Chi Minh City, Da Nang, Biên Hòa, Cần Thơ, Thuận An
UTC+7 | Asia/Jakarta | Indonesia | Jakarta, Surabaya, Bekasi, Bandung, Medan
UTC+7 | Asia/Krasnoyarsk | Russia | Krasnoyarsk, Abakan, Norilsk, Achinsk, Kyzyl
UTC+7 | Asia/Novokuznetsk | Russia | Kemerovo, Novokuznetsk, Prokopyevsk, Leninsk-Kuznetsky, Kiselëvsk
UTC+7 | Asia/Novosibirsk | Russia | Novosibirsk, Berdsk, Iskitim, Akademgorodok, Kuybyshev
UTC+7 | Asia/Phnom_Penh | Cambodia | Phnom Penh, Takeo, Siem Reap, Battambang, Paoy Paet
UTC+7 | Asia/Pontianak | Indonesia | Pontianak, Palangkaraya, Singkawang, Sampit, Sungai Raya
UTC+7 | Asia/Tomsk | Russia | Tomsk, Seversk, Strezhevoy, Kolpashevo, Asino
UTC+7 | Asia/Vientiane | Laos | Vientiane, Savannakhet, Pakse, Thakhèk, Luang Prabang
UTC+7 | Indian/Christmas | Christmas Island | Flying Fish Cove
UTC+8 | Asia/Brunei | Brunei | Bandar Seri Begawan, Kuala Belait, Seria, Tutong, Bangar
UTC+8 | Asia/Choibalsan | Mongolia | Baruun-Urt, Choibalsan
UTC+8 | Asia/Hong_Kong | Hong Kong | Hong Kong, Kowloon, Victoria, Tuen Mun, Sha Tin
UTC+8 | Asia/Irkutsk | Russia | Irkutsk, Ulan-Ude, Bratsk, Angarsk, Ust-Ilimsk
UTC+8 | Asia/Kuala_Lumpur | Malaysia | Kuala Lumpur, Petaling Jaya, Klang, Johor Bahru, Ipoh
UTC+8 | Asia/Kuching | Malaysia | Kota Kinabalu, Sandakan, Kuching, Tawau, Miri
UTC+8 | Asia/Macau | Macao | Macau, Taipa
UTC+8 | Asia/Makassar | Indonesia | Makassar, Samarinda, Denpasar, Balikpapan, Banjarmasin
UTC+8 | Asia/Manila | Philippines | Quezon City, Davao, Manila, Caloocan City, Budta
UTC+8 | Asia/Shanghai | China | Shanghai, Beijing, Shenzhen, Guangzhou, Chengdu
UTC+8 | Asia/Singapore | Singapore | Singapore, Jurong Town, Woodlands, Punggol, Kampong Pasir Ris
UTC+8 | Asia/Taipei | Taiwan | Taipei, Kaohsiung, Taichung, Tainan, Banqiao
UTC+8 | Asia/Ulaanbaatar | Mongolia | Ulan Bator, Erdenet, Darhan, Mörön, Bayanhongor
UTC+8 | Australia/Perth | Australia | Perth, Mandurah, Bunbury, Baldivis, Geraldton
UTC+8:45 | Australia/Eucla | Australia |
UTC+9 | Asia/Chita | Russia | Chita, Krasnokamensk, Borzya, Petrovsk-Zabaykalskiy, Aginskoye
UTC+9 | Asia/Dili | Timor Leste | Dili, Maliana, Suai, Likisá, Aileu
UTC+9 | Asia/Jayapura | Indonesia | Jayapura, Ambon, Sorong, Ternate, Manokwari
UTC+9 | Asia/Khandyga | Russia |
UTC+9 | Asia/Pyongyang | North Korea | Pyongyang, Hamhŭng, Nampo, Sunchŏn, Hŭngnam
UTC+9 | Asia/Seoul | South Korea | Seoul, Busan, Incheon, Daegu, Gwangju
UTC+9 | Asia/Tokyo | Japan | Tokyo, Yokohama, Osaka, Nagoya, Sapporo
UTC+9 | Asia/Yakutsk | Russia | Yakutsk, Blagoveshchensk, Belogorsk, Neryungri, Svobodnyy
UTC+9 | Pacific/Palau | Palau | Koror, Koror Town, Kloulklubed, Ulimang, Mengellang
UTC+9:30 | Australia/Adelaide | Australia | Adelaide, Adelaide Hills, Mount Gambier, Morphett Vale, Gawler
UTC+9:30 | Australia/Broken_Hill | Australia | Broken Hill
UTC+9:30 | Australia/Darwin | Australia | Darwin, Alice Springs, Palmerston, Howard Springs
UTC+10 | Antarctica/DumontDUrville | Antarctica |
UTC+10 | Antarctica/Macquarie | Australia |
UTC+10 | Asia/Ust-Nera | Russia |
UTC+10 | Asia/Vladivostok | Russia | Khabarovsk, Vladivostok, Khabarovsk Vtoroy, Komsomolsk-on-Amur, Ussuriysk
UTC+10 | Australia/Brisbane | Australia | Brisbane, Gold Coast, Logan City, Townsville, Cairns
UTC+10 | Australia/Hobart | Australia | Hobart, Launceston, Burnie, Devonport, Sandy Bay
UTC+10 | Australia/Lindeman | Australia |
UTC+10 | Australia/Melbourne | Australia | Melbourne, Geelong, Ballarat, Bendigo, Point Cook
UTC+10 | Australia/Sydney | Australia | Sydney, Canberra, Newcastle, Wollongong, Maitland
UTC+10 | Pacific/Chuuk | Micronesia | Weno, Colonia
UTC+10 | Pacific/Guam | Guam | Dededo Village, Yigo Village, Tamuning, Tamuning-Tumon-Harmon Village, Mangilao Village
UTC+10 | Pacific/Port_Moresby | Papua New Guinea | Port Moresby, Lae, Mount Hagen, Popondetta, Madang
UTC+10 | Pacific/Saipan | Northern Mariana Islands | Saipan, San Jose Village
UTC+10:30 | Australia/Lord_Howe | Australia |
UTC+11 | Antarctica/Casey | Antarctica |
UTC+11 | Asia/Magadan | Russia | Magadan, Ust-Nera, Susuman, Ola
UTC+11 | Asia/Sakhalin | Russia | Yuzhno-Sakhalinsk, Korsakov, Kholmsk, Okha, Nevelsk
UTC+11 | Asia/Srednekolymsk | Russia |
UTC+11 | Pacific/Bougainville | Papua New Guinea | Arawa, Buka
UTC+11 | Pacific/Efate | Vanuatu | Port-Vila, Luganville, Isangel, Sola, Lakatoro
UTC+11 | Pacific/Guadalcanal | Solomon Islands | Honiara, Malango, Auki, Gizo, Kirakira
UTC+11 | Pacific/Kosrae | Micronesia | Tofol
UTC+11 | Pacific/Norfolk | Norfolk Island | Kingston
UTC+11 | Pacific/Noumea | New Caledonia | Nouméa, Mont-Dore, Dumbéa, Païta, Wé
UTC+11 | Pacific/Pohnpei | Micronesia | Kolonia, Kolonia Town, Palikir - National Government Center
UTC+12 | Antarctica/McMurdo | Antarctica |
UTC+12 | Asia/Anadyr | Russia | Anadyr, Bilibino
UTC+12 | Asia/Kamchatka | Russia | Petropavlovsk-Kamchatsky, Yelizovo, Vilyuchinsk, Klyuchi, Milkovo
UTC+12 | Pacific/Auckland | New Zealand | Auckland, Wellington, Christchurch, Manukau City, North Shore
UTC+12 | Pacific/Fiji | Fiji | Nasinu, Suva, Lautoka, Nadi, Labasa
UTC+12 | Pacific/Funafuti | Tuvalu | Funafuti, Savave Village, Tanrake Village, Toga Village, Asau Village
UTC+12 | Pacific/Kwajalein | Marshall Islands | Ebaye, Jabat
UTC+12 | Pacific/Majuro | Marshall Islands | Majuro, Arno, Jabor, Wotje, Mili
UTC+12 | Pacific/Nauru | Nauru | Yaren, Baiti, Anabar, Uaboe, Ijuw
UTC+12 | Pacific/Tarawa | Kiribati | Tarawa, Betio Village, Bikenibeu Village
UTC+12 | Pacific/Wake | United States Minor Outlying Islands |
UTC+12 | Pacific/Wallis | Wallis and Futuna | Mata-Utu, Leava, Alo
UTC+12:45 | Pacific/Chatham | New Zealand | Waitangi
UTC+13 | Pacific/Apia | Samoa | Apia, Asau, Mulifanua, Afega, Leulumoega
UTC+13 | Pacific/Fakaofo | Tokelau | Atafu Village, Nukunonu, Fale old settlement
UTC+13 | Pacific/Kanton | Kiribati |
UTC+13 | Pacific/Tongatapu | Tonga | Nukualofa, Lapaha, Neiafu, Pangai, Ohonua
UTC+14 | Pacific/Kiritimati | Kiribati |
<!--rehype:className=left-align show-header-->
另见
---
<!--rehype:wrap-class=col-span-3-->
- [时区列表](https://help.aliyun.com/zh/maxcompute/user-guide/time-zones) _(aliyun.com)_
- [全部时区列表](https://www.zeitverschiebung.net/cn/all-time-zones.html) _(zeitverschiebung.net)_

View File

@ -1,7 +1,7 @@
Twitter
Twitter(X)
===
Twitter 上的 26 个键盘快捷键和高级搜索参考备忘清单
[Twitter](https://x.com) 上的 26 个键盘快捷键和高级搜索参考备忘清单
键盘快捷键
----

View File

@ -1551,6 +1551,7 @@ type Age2 = Person["age"];
```
### 范型推导出列表字面量
<!--rehype:wrap-class=row-span-2-->
```ts
const a = <T extends string>(t: T) => t;
@ -1559,11 +1560,18 @@ 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的类型用了一个展开运算
这里t的类型用了一个展开运算
```ts
const g =
<T extends string[]>(t: [...T]) => t;
// 类型变成["111", "222"]了
<T extends string[]>(t: [...T]) => t;
```
类型变成["111", "222"]了
```ts
const h = g(["111", "222"]);
```
@ -1580,6 +1588,19 @@ keys.forEach(key => {
});
```
### 保留一段时间字符串常量类型
<!--rehype:wrap-class=col-span-2-->
```ts
type Color = "primary" | "secondary" | string;
```
修改成下面代码,有代码下拉提示
```ts
type Color = "primary" | "secondary" | (string & {});
```
.d.ts 模版
---

View File

@ -53,52 +53,52 @@ G gg H M L k j ▶ print("to")
快捷方式 | 说明
:- | -
`h` \| `j` \| `k` \| `l` | 方向键
`<C-u>` _/_ `<C-d>` | 上/下半页
`<C-b>` _/_ `<C-f>` | 向上/向下翻页
<!--rehype:className=shortcuts-->
方向键 | `h` \| `j` \| `k` \| `l`
上/下半页 | `<C-u>` _/_ `<C-d>`
向上/向下翻页 | `<C-b>` _/_ `<C-f>`
<!--rehype:className=shortcuts-last-->
#### 字(词)
快捷方式 | 说明
:- | -
`b` _/_ `w` | 上一个/下一个单词
`ge` _/_ `e` | 上一个/下一个词尾
<!--rehype:className=shortcuts-->
上一个/下一个单词 | `b` _/_ `w`
上一个/下一个词尾 | `ge` _/_ `e`
<!--rehype:className=shortcuts-last-->
#### 行
快捷方式 | 说明
:- | -
`0` _(zero)_ _/_ `$` | 行的开始/结束
`^` | 行开头 _(非空白)_
<!--rehype:className=shortcuts-->
行的开始/结束 | `0` _(zero)_ _/_ `$`
行开头 _(非空白)_ | `^`
<!--rehype:className=shortcuts-last-->
#### 字符串
快捷方式 | 说明
:- | -
`Fe` _/_ `fe` | 移动到上一个/下一个`e`
`To` _/_ `to` | 在上一个/下一个`o`之前/之后移动
`\|` _/_ `n\|` | 转到第一个/`n`
<!--rehype:className=shortcuts-->
移动到上一个/下一个`e` | `Fe` _/_ `fe`
在上一个/下一个`o`之前/之后移动 | `To` _/_ `to`
转到第一个/`n`列 | `\|` _/_ `n\|`
<!--rehype:className=shortcuts-last-->
#### 文档
快捷方式 | 说明
:- | -
`gg` _/_ `G` | 第一行/最后一行
`:n` \| `nG` | 转到第 `n`
`}` _/_ `{` | 下一个/上一个空行
<!--rehype:className=shortcuts-->
第一行/最后一行 | `gg` _/_ `G`
转到第 `n` | `:n` \| `nG`
下一个/上一个空行 | `}` _/_ `{`
<!--rehype:className=shortcuts-last-->
#### 窗口
快捷方式 | 说明
:- | -
`H` _/_ `M` _/_ `L` | 上/中/下屏幕
`zt` _/_ `zz` _/_ `zb` | 上/中/下这条线
<!--rehype:className=shortcuts-->
上/中/下屏幕 | `H` _/_ `M` _/_ `L`
上/中/下这条线 | `zt` _/_ `zz` _/_ `zb`
<!--rehype:className=shortcuts-last-->
### 插入模式
@ -117,17 +117,17 @@ G gg H M L k j ▶ print("to")
快捷方式 | 说明
:- | -
`:w` | 保存
`:q` | 关闭文件
`:wq` \| `:x` \| `ZZ` | 保存并退出
`:wqa` | 保存并退出所有文件
`:q!` \| `ZQ` | 强制退出
`:qa` | 关闭所有文件
`:qa!` | 强制退出所有文件
`:w` new.txt | 写入`new.txt`
`:sav` new.txt | 保存并编辑`new.txt`
`:w` !sudo tee % | 写入只读文件
<!--rehype:className=shortcuts-->
保存 | `:w`
关闭文件 | `:q`
保存并退出 | `:wq` \| `:x` \| `ZZ`
保存并退出所有文件 | `:wqa`
强制退出 | `:q!` \| `ZQ`
关闭所有文件 | `:qa`
强制退出所有文件 | `:qa!`
写入`new.txt` | `:w` new.txt
保存并编辑`new.txt` | `:sav` new.txt
写入只读文件 | `:w` !sudo tee %
<!--rehype:className=shortcuts-last-->
### 正常模式
@ -368,6 +368,7 @@ Vim 多个文件
`<C-w>` `-` _/_ `+` | 减少/增加高度
`<C-w>` `<` _/_ `>` | 减少/增加宽度
`<C-w>` `\|` | 最大宽度
`<C-w>` `_` | 最大高度
`<C-w>` `=` | 同样高和宽
`<C-w>` `h` _/_ `l` | 转到左/右窗口
`<C-w>` `j` _/_ `k` | 转到上/下窗口

174
docs/vimium.md Normal file
View File

@ -0,0 +1,174 @@
Vimium 备忘清单
===
这是开始使用 [Vimium](https://github.com/philc/vimium) 浏览器扩展的快速参考备忘单,可以帮助用户更高效地浏览网页
入门
----
### 功能特点
#### 键盘导航
- 使用类似 Vim 的快捷键进行网页滚动、打开链接、管理标签页等操作
#### 快捷键自定义
- 用户可根据个人习惯自定义快捷键,提升使用体验
#### 无鼠标操作
- 通过键盘快捷键完成几乎所有浏览器操作,减少对鼠标的依赖,提高效率
### 安装
**Chrome 浏览器**
- [Chrome web store](https://chromewebstore.google.com/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb)
**Edge 浏览器**
- [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/vimium/djmieaghokpkpjfbpelnlkfgfjapaopa)
**Firefox 浏览器**
- [Firefox Add-ons](https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/)
### 快捷键自定义
```json
{
"customKeybindings": {
"scrollUp": "k",
"scrollDown": "j",
"scrollLeft": "h",
"scrollRight": "l",
"reload": "r",
"openLinkInCurrentTab": "f",
"openLinkInNewTab": "F"
}
}
```
键盘快捷键
---
### 基本导航
<!--rehype:wrap-class=row-span-3-->
快捷键 | 功能
:-- | ---
`?` | 显示帮助对话框,列出所有可用按键
`h` | 向左滚动
`j` | 向下滚动
`k` | 向上滚动
`l` | 向右滚动
`gg` | 滚动到页面顶部
`G` | 滚动到页面底部
`d` | 向下滚动半页
`u` | 向上滚动半页
`f` | 在当前标签页中打开链接
`F` | 在新标签页中打开链接
`r` | 重新加载页面
`gs` | 查看页面源代码
`I` | 进入插入模式 -- 所有命令将被忽略,直到你按下 Esc 退出
`yy` | 复制当前网址到剪贴板
`yf` | 复制链接地址到剪贴板
`gf` | 向前切换到下一个框架
`gF` | 聚焦主框架/顶部框架
<!--rehype:className=shortcuts left-align-->
### 导航到新页面
快捷键 | 功能
:-- | ---
`o` | 打开网址、书签或历史记录条目
`O` | 在新标签页中打开网址、书签或历史记录条目
`b` | 打开书签
`B` | 在新标签页中打开书签
<!--rehype:className=shortcuts left-align-->
### 浏览您的历史
快捷键 | 功能
:-- | ---
`H` | 后退到历史记录
`L` | 前进到历史记录
<!--rehype:className=shortcuts left-align-->
### 操作选项卡
<!--rehype:wrap-class=row-span-2-->
快捷键 | 功能
:-- | ---
`J, gT` | 向左切换一个标签页
`K, gt` | 向右切换一个标签页
`g0` | 跳转到第一个标签页</br>使用 ng0 跳转到第 n 个标签页
`g$` | 跳转到最后一个标签页
`^` | 访问上一个访问过的标签页
`t` | 创建新标签页
`yt` | 复制当前标签页
`x` | 关闭当前标签页
`X` | 恢复关闭的标签页(撤销 'x' 命令)
`T` | 搜索打开的标签页
`W` | 将当前标签页移动到新窗口
`<a-p>` | 固定/取消固定当前标签页
<!--rehype:className=shortcuts left-align-->
### 链接操作
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `f` | 打开链接 |
| `F` | 在新标签页中打开链接 |
| `gf` | 打开下一个框架 |
| `gu` | 进入当前URL的父级路径 |
| `gU` | 进入当前URL的根路径 |
<!--rehype:className=shortcuts left-align-->
### 标签页操作
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `J` | 切换到左边的标签页 |
| `K` | 切换到右边的标签页 |
| `t` | 创建新标签页 |
| `x` | 关闭当前标签页 |
| `X` | 恢复最近关闭的标签页 |
| `T` | 搜索打开的标签页 |
<!--rehype:className=shortcuts left-align-->
### 搜索与复制
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `/` | 在页面中搜索 |
| `n` | 下一个搜索结果 |
| `N` | 上一个搜索结果 |
| `yy` | 复制当前页面的URL |
| `yf` | 复制链接 |
<!--rehype:className=shortcuts left-align-->
### 插入模式
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `i` | 进入插入模式 |
| `I` | 进入插入模式(已聚焦元素) |
<!--rehype:className=shortcuts left-align-->
### 开发者工具
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `gi` | 聚焦第一个输入框 |
| `gI` | 聚焦最后一个输入框 |
| `gs` | 查看页面源代码 |
| `gf` | 打开下一个框架 |
| `gF` | 打开所有框架 |
<!--rehype:className=shortcuts left-align-->
另见
----
- [Vimium 官方文档](https://github.com/philc/vimium)

View File

@ -510,15 +510,53 @@ watch(count, function() {
```
<!--rehype:className=wrap-text-->
### 监听多个值
<!--rehype:wrap-class=col-span-2 row-span-2-->
```html
<template>
<h1> {{ count1 }} </h1>
<h1> {{ count2 }} </h1>
<button @click="count1++">count1</button>
<button @click="count2++">count2</button>
</template>
<script setup>
import { watch, ref } from 'vue';
const count1 = ref(0)
const count2 = ref(0)
watch(
// 监听的表达式或函数
() => ({
count1: count1.value,
count2: count2.value
}),
// 回调函数
(newValue, oldValue) => {
// 在这里执行需要的逻辑
console.log('count1 或 count2 变化了:', newValue);
},
// immediate: true 表示在初始渲染时立即执行一次回调函数,以便处理初始的状态。
// deep: true 表示深度监听,即对 newValue 和 oldValue 进行深层比较,而不是简单的引用比较。
{ immediate: true, deep: true }
);
</script>
<style scoped>
</style>
```
### 计算状态
<!--rehype:wrap-class=col-span-2-->
```html
<script setup>
import { ref, computed } from 'vue';
const text = ref('')
// computed 的回调函数里,会根据已有并用到的状态计算出新的状态
// computed 的回调函数里
// 会根据已有并用到的状态计算出新的状态
const capital = computed(function(){
return text.value.toUpperCase();
})
@ -683,6 +721,390 @@ const value = inject(ProvideKey)
<!--rehype:className=wrap-text -->
## 路由
### 1. 路由的基本使用
#### 开启命名空间后组件中读取state数据
方式一:自己直接读取
```javascript
this.$store.state.personAbout.list
```
方式二:借助 mapState 读取:
```js
...mapState('countAbout',[
'sum','school','subject'
]),
```
#### 开启命名空间后组件中读取getters数据
方式一:自己直接读取
```javascript
this.$store.getters[
'personAbout/firstPersonName'
]
```
方式二:借助 mapGetters 读取:
```js
...mapGetters('countAbout',['bigSum'])
```
#### 开启命名空间后组件中调用dispatch
方式一:自己直接 dispatch
```javascript
this.$store.dispatch(
'personAbout/addPersonWang', person
)
```
方式二借助mapActions:
```js
...mapActions('countAbout',{
incrementOdd:'jia0dd',
incrementWait:'jiaWait'
})
```
#### 开启命名空间后组件中调用commit
方式一:自己直接 commit
```javascript
this.$store.commit(
'personAbout/ADD_PERSON', person
)
```
方式二:借助 mapMutations:
```js
...mapMutations('countAbout', {
increment:'JIA',decrement:'JIAN'
}),
```
### 2. 路由的使用
```javascript
import VueRouter from 'vue-router'
// 引入Luyou 组件
import About from '../components/About'
import Home from '../components/Home'
// 创建router实例对象去管理一组一组的路由规则
const router = new VueRouter({
routes: [
path: '/about',
component: About
path: '/home',
component: Home
]
})
// 暴露 router
export default router
```
实现切换active-class可配置高亮样式
```html
<router-link
active-class="active"
to="/about">
About
</router-link>
```
指定展示位置
```html
<router-diew></router-view>
```
几个注意点
- 路由组件通常存放在pages文件夹一般组件通常存放在components文件夹。
- 通过切换,“隐藏”了的路由组件,默认是被销毁掉的,需要的时候再去挂载。
- 每个组件都有自己的$route属性里面存储着自己的路由信息。
- 整个应用只有一个router可以通过组件的srouter 属性获取到。
<!--rehype:className=style-list-arrow-->
### 3.路由的query
```html
<template>
<div>
<ul class="list">
<!-- to的对象写法 -->
<li v-for="item of data" :key="item.id">
<router-link
class="link"
:to="{
path:'/home/message/mes',
query: { id:item.id, title:item.mes }
}"
>{{item.mes}}</router-link>
</li>
</ul>
<hr>
<router-view></router-view>
</div>
</template>
<script>
export default {
name:'HomeChild1',
data() {
return {
data:[
{id:1,mes:"消息1"},
{id:2,mes:"消息2"},
{id:3,mes:"消息3"}
]
}
},
}
</script>
<style scoped>
.list { margin-left:80px; }
.link{
color: orange;
text-decoration: none;
background-color: skyblue;
}
</style>
```
> 接收参数 `{{$route.query.id}}`
#### 跳转路由并携带参数
```html
<li v-for="item of data" :key="item.id">
<router-link
class="link"
:to="`/home/message/mes?id=${item.id}&title=${item.mes}`"
>
{{item.mes}}
</router-link>
</li>
```
### 4. 命名路由
```javascript
routes:[
{ path:'/about', component:AboutBody },
{
path:'/home',
component:HomeBody,
children:[
{ path:'news', component:HomeChild },
{
path:'message',
component:HomeChild1,
//多级路由
children:[
{ name:'richu', path:'mes', component:HomeMessage }
]
}
]
}
]
```
使用
```html
<router-link :to="{
name:'',
path:'/home/message/mes',
query:{ id:item.id,title:item.mes }
}">
```
### 5.params参数的使用
#### 1. 声明接收
```javascript
children:[
{
name:'richu',
path:'mes/:id/:title',
component:HomeMessage
}
]
```
#### 2. 传递
```html
<li v-for="item of data" :key="item.id">
<router-link
class="link"
:to="`/home/message/mes/${item.id}/${item.mes}`"
>{{item.mes}}
</router-link>
</li>
```
#### 3. 接收
```html
<li>编号{{$route.params.id}}</li>
<li>标题{{$route.params.title}}</li>
```
### 6.props的使用
路由的props配置
```js
{
name: 'xiangqing',
path:'detail/:id',
component:Detail
}
```
作用:让路由组件更方便的收到参数
```javascript
//第一种写法props值为对象该对象中所有的key-value的组合最终都会通过props传给Detai1组件
// props:{a:900]
//第二种写法props值为布尔值布尔值为true则把路由收到的所有params参数通过props传给Detai1组件
// props:true
//第三种写法props值为函数该函数返回的对象中每一组key-value都会通过props传给Detail组件
props(route){
return {
id:route.query.id,
title:route.query.title
}
}
```
\<router-link> 的 replace 属性
1. 作用:控制路由跳转时操作浏览器历史记录的模式
2. 浏览器的历史记录有两种写入方式:分别为 push和replace,默认为push
3. 如何开启replace 模式: `push` 是追加历史记录,`replace` 是替换当前记录[路由跳转时候 `<router-link replace>News\</router-link>`]
### 7. 编程式路由导航
作用不借助router-link实现路由跳转让跳转更加灵活
```javascript
this.$router.push({
name:'xiangqing',
params:{
id: xxx,
title: xxx
// 实现路由跳转,让路由跳转更加灵活
}
})
this.$router.replace({
name:'xiangqing',
params:{
id:xxx,
title:xxx
}
})
this.$router.forward();
this.$router.back();
this.$router.go(3);
```
### 8.缓存路由组件
让不展示的路由组件保持挂载,不被销毁,示例:
```html
<keep-alive include="news">
<router-view></router-view>
</keep-alive>
```
- `include` 里面写模块名,用于保存指定的模块
### 9.新生命周期钩子
> 作用:路由组件独有的,用于捕获路由组件的激活状态
- `activated` 路由组件被激活时触发
- `deactivated` 路由组件失活时触发
## 路由守卫
### 1.前置路由守卫
```javascript
route.beforeEach((from,to,next)=>{
if (to.meta.isAuth){
alert("1");
next();
}else{
next();
}
})
```
前置路由
### 2.后置路由守卫
```javascript
route.afterEach((from,to)=>{
console.log(to);
document.title=from.meta.title;
})
```
后置路由
### 3.独享路由守卫
```javascript
{
path:'news',
component:HomeChild,
meta:{title:"新闻"},
beforeEnter: (from,to,next)=>{
}
},
```
独享路由守卫只有前置路由守卫没有后置路由守卫
### 4.组件内路由守卫
通过路由规则,进入该组件时被调用
```javascript
beforeRouteEnter (to, from, next) {
// ...
}
```
通过路由规则,离开组件时被调用
```js
beforeRouteLeave (to, from, next) {
// ...
}
```
Vue 中使用 TypeScript
---
@ -1107,10 +1529,356 @@ declare module 'vue' {
from: Route,
next: () => void
): void
}
}
```
## 性能优化
### 介绍
性能优化是构建高效 Vue 应用的关键。以下是一些特殊的优化策略,结合 Vue 的特性,可以大幅减少渲染开销、提升加载速度和用户体验。这些方法不仅限于单一 API而是从整体架构和开发实践出发提供通用的性能提升思路。
### 条件渲染与缓存结合
通过结合 `v-if` 和 `<KeepAlive>`,可以避免频繁销毁和重建组件,尤其是在切换视图或路由时。搭配 `defineAsyncComponent` 实现懒加载,进一步减少初次加载的开销。
```html
<template>
<div>
<button @click="toggle">Toggle View</button>
<keep-alive>
<component :is="currentView" />
</keep-alive>
</div>
</template>
<script setup>
import { ref, defineAsyncComponent } from 'vue';
const currentView = ref('ViewA');
const toggle = () => {
currentView.value = currentView.value === 'ViewA' ? 'ViewB' : 'ViewA';
};
const ViewA = defineAsyncComponent(() => import('./ViewA.vue'));
const ViewB = defineAsyncComponent(() => import('./ViewB.vue'));
</script>
//<KeepAlive> 缓存动态组件,防止重复创建和销毁。
//defineAsyncComponent 实现组件懒加载,仅在需要时加载模块。
//效果:减少 DOM 操作和组件初始化的性能消耗,特别适合复杂组件切换或路由场景。
```
### 路由前置优化beforeRouteEnter
在路由进入前执行数据预取或条件检查,可以避免不必要的渲染和请求,提升页面加载效率。
```html
<script>
import { defineComponent } from 'vue';
export default defineComponent({
name: 'Profile',
beforeRouteEnter(to, from, next) {
// 模拟数据预取
fetchUserData(to.params.id).then((user) => {
next((vm) => {
vm.user = user; // 将数据传递给组件实例
});
}).catch(() => {
next(false); // 阻止路由进入
});
},
data() {
return {
user: null,
};
},
});
</script>
<template>
<div v-if="user">
<h1>{{ user.name }}</h1>
</div>
</template>
```
### 响应式对象的精简
避免将大型对象直接用 reactive 包裹,而是按需拆分,使用 ref 或 toRef 精细控制响应式范围,减少依赖追踪的开销。
```html
<script setup>
import { ref, toRef, reactive } from 'vue';
const largeData = {
user: { name: 'Alice', age: 25 },
settings: { theme: 'dark', fontSize: 16 },
items: Array(1000).fill({ id: 0, value: 'test' }),
};
// 仅将需要的部分设为响应式
const userName = ref(largeData.user.name);
const settings = reactive(largeData.settings);
const firstItem = toRef(largeData.items[0], 'value');
</script>
<template>
<div>
<input v-model="userName" />
<p>Theme: {{ settings.theme }}</p>
<p>First Item: {{ firstItem }}</p>
</div>
</template>
```
### 计算属性的延迟执行
通过封装计算属性并结合 watchEffect实现按需计算避免不必要的开销。
```html
<script setup>
import { ref, computed, watchEffect } from 'vue';
const items = ref([]);
const filterText = ref('');
const filteredItems = computed(() => {
return items.value.filter((item) => item.includes(filterText.value));
});
watchEffect(() => {
if (filterText.value) {
// 仅在 filterText 不为空时触发计算
filteredItems.value;
}
});
</script>
<template>
<div>
<input v-model="filterText" placeholder="Filter items" />
<ul>
<li v-for="item in filteredItems" :key="item">{{ item }}</li>
</ul>
</div>
</template>
```
### v-memo 缓存子树
v-memo 用于缓存模板子树,仅在依赖项变化时更新,常用于优化列表或静态内容。
```html
<template>
<div v-for="item in items" :key="item.id" v-memo="[item.updated]">
{{ item.name }} - {{ expensiveComputation(item) }}
</div>
</template>
<script setup>
import { ref } from 'vue';
const items = ref([
{ id: 1, name: 'Item 1', updated: false },
{ id: 2, name: 'Item 2', updated: false },
]);
const expensiveComputation = (item) => {
return item.name.toUpperCase(); // 模拟复杂计算
};
</script>
```
### 事件节流与防抖
通过在事件处理中引入节流throttle或防抖debounce减少高频事件的触发频率。
```html
<script setup>
import { ref } from 'vue';
import { debounce } from 'lodash-es';
const searchText = ref('');
const search = debounce((value) => {
console.log('Search:', value); // 模拟搜索请求
}, 300);
const handleInput = (e) => {
searchText.value = e.target.value;
search(searchText.value);
};
</script>
<template>
<input
:value="searchText"
@input="handleInput"
placeholder="Type to search"
/>
</template>
```
### 虚拟列表Virtual Scrolling
对于长列表(如包含数千条数据的列表),可以使用虚拟列表技术,只渲染可视区域内的元素,减少 DOM 节点数量。
```html
<template>
<div class="list-container" ref="list">
<div class="list-viewport" :style="{ height: totalHeight + 'px' }">
<div
class="list-content"
:style="{ transform: `translateY(${scrollTop}px)` }"
>
<div
v-for="item in visibleItems"
:key="item.id"
class="list-item"
>
{{ item.name }}
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, onMounted, onUnmounted } from 'vue';
const items = ref(
Array.from({ length: 10000 }, (_, i) => ({
id: i,
name: `Item ${i}`,
}))
);
const itemHeight = 40; // 每项高度
const viewportHeight = 400; // 视口高度
const totalHeight = computed(() => items.value.length * itemHeight);
const scrollTop = ref(0);
const visibleCount = Math.ceil(viewportHeight / itemHeight) + 2; // 多渲染2项作为缓冲
const visibleItems = computed(() => {
const start = Math.floor(scrollTop.value / itemHeight);
const end = Math.min(start + visibleCount, items.value.length);
return items.value.slice(start, end);
});
const list = ref(null);
const onScroll = () => {
scrollTop.value = list.value.scrollTop;
};
onMounted(() => {
list.value.addEventListener('scroll', onScroll);
});
onUnmounted(() => {
list.value.removeEventListener('scroll', onScroll);
});
</script>
<style>
.list-container {
height: 400px;
overflow-y: auto;
}
.list-item {
height: 40px;
line-height: 40px;
border-bottom: 1px solid #ddd;
}
</style>
```
### 按需加载资源Lazy Loading Resources
通过动态导入Dynamic Import按需加载非关键资源如图片、第三方库可以减少初次加载的开销提升首屏渲染速度。
```html
<template>
<div>
<button @click="loadChart">Load Chart</button>
<div v-if="ChartComponent">
<ChartComponent :data="chartData" />
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
const ChartComponent = ref(null);
const chartData = ref([10, 20, 30, 40]);
const loadChart = async () => {
// 动态导入第三方库(如 Chart.js
const { default: Chart } = await import('chart.js/auto');
// 模拟动态加载的图表组件
ChartComponent.value = {
props: ['data'],
template: `<canvas ref="chart"></canvas>`,
mounted() {
new Chart(this.$refs.chart, {
type: 'bar',
data: {
labels: ['A', 'B', 'C', 'D'],
datasets: [{ data: this.data }],
},
});
},
};
};
</script>
```
### 优化事件监听Event Delegation
通过事件委托Event Delegation将事件监听器绑定到父元素减少直接绑定到每个子元素的事件监听器数量适合动态列表或大量元素场景。
```html
<template>
<div class="item-list" @click="handleItemClick">
<div
v-for="item in items"
:key="item.id"
:data-id="item.id"
class="item"
>
{{ item.name }}
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
const items = ref([
{ id: 1, name: 'Item 1' },
{ id: 2, name: 'Item 2' },
{ id: 3, name: 'Item 3' },
]);
const handleItemClick = (event) => {
const itemId = event.target.dataset.id;
if (itemId) {
console.log(`Clicked item with ID: ${itemId}`);
}
};
</script>
<style>
.item-list {
padding: 10px;
}
.item {
padding: 10px;
border-bottom: 1px solid #ddd;
cursor: pointer;
}
</style>
```
API 参考
---

253
docs/yazi.md Normal file
View File

@ -0,0 +1,253 @@
Yazi 备忘清单
===
这份快速参考备忘单提供了Yazi 快速的终端文件管理的简要概述,以及 Yazi的基本操作
入门
----
### 功能特点
- <code>**跨平台支持**</code>Yazi 支持 Linux、macOS 和 Windows提供一致的跨平台体验
- <code>**轻量高效**</code>:简洁设计,启动和操作快速,资源消耗低
- <code>**插件扩展**</code>:支持插件安装,灵活扩展功能
- <code>**文件操作**</code>:支持复制、剪切、粘贴、删除、重命名等操作,且支持批量和多选功能,提升效率
### 安装
| 系统 | 安装方法 |
| ----- | ----- |
| 使用 Cargo 安装 | `cargo install yazi` |
| Arch Linux | `yay -S yazi` |
| Debian/Ubuntu | 可以使用 `Cargo` 进行安装 |
| macOS (使用 Homebrew) | `brew install yazi` |
| Windows (使用 Carg) | `cargo install yazi` |
| Windows (使用 Scoop) | `scoop install yazi` |
### 使用方法
#### 命令启动 Yazi
```sh
yazi
```
#### 查看 Yazi 的帮助文档
```sh
yazi --help
```
## 常用的快捷键
<!--rehype:body-class=cols-2-->
### 导航
:- | :-
:- | :-
| `h` | 返回上一级目录 |
| `j` | 向下移动选中项 |
| `k` | 向上移动选中项 |
| `l` | 进入选中的目录或打开文件 |
<!--rehype:className=shortcuts-->
### 文件操作
:- | :-
:- | :-
| `y` | 复制选中的文件或目录 |
| `d` | 剪切选中的文件或目录 |
| `p` | 粘贴文件或目录 |
| `x` | 删除选中的文件或目录 |
| `r` | 重命名选中的文件或目录 |
<!--rehype:className=shortcuts-->
### 搜索与过滤
:- | :-
:- | :-
| `/` | 开始搜索模式 |
| `n` | 在搜索模式中跳到下一个匹配项 |
| `N` | 在搜索模式中跳到上一个匹配项 |
<!--rehype:className=shortcuts-->
### 视图操作
:- | :-
:- | :-
| `gg` | 跳到列表的顶部 |
| `G` | 跳到列表的底部 |
| `Ctrl+f` | 向下滚动一页 |
| `Ctrl+b` | 向上滚动一页 |
<!--rehype:className=shortcuts-->
## 自定义配置
### 自定义配置
通过编辑配置文件来自定义 `Yazi`,配置文件通常位于 `$HOME/.config/yazi/xxx.toml`,可修改默认设置如快捷键、主题等。
- `yazi.toml` - 常规配置
- `keymap.toml` - 快捷键绑定
- `theme.toml` - 主题配置
### 配置文件示例yazi.toml
<!--rehype:wrap-class=row-span-2-->
```toml
[general]
# 设置主界面主题为 dark 或 light
theme = "dark"
# 启动时的默认路径
default_path = "~"
# 是否启用自动保存配置
auto_save_config = true
[keybindings]
# 自定义快捷键绑定
quit = "q" # 退出
copy = "y" # 复制文件
paste = "p" # 粘贴文件
delete = "d" # 删除文件
[ui]
# 界面相关配置
preview_enabled = true # 是否启用文件预览
show_hidden_files = true # 显示隐藏文件
columns = 2 # 文件列表列数
[search]
# 搜索行为配置
case_sensitive = false # 搜索是否区分大小写
search_timeout = 30 # 搜索超时时间(秒)
[sorting]
# 排序规则配置
sort_by = "name" # 排序方式: name,size,date
reverse_sort = false # 是否反向排序
[plugins]
# 插件加载配置
enabled_plugins = ["git", "archive"]
```
### keymap.toml 配置示例
<!--rehype:wrap-class=row-span-2-->
```toml
# 全局快捷键配置
[global]
# 全局退出应用程序
quit = "Ctrl+Q"
# 打开文件或目录
open = "Enter"
# 返回上级目录
back = "Backspace"
# 搜索功能触发
search = "/"
# 复制路径
copy_path = "Ctrl+C"
# 窗口控制快捷键
[window]
# 切换窗口
switch_window = "Tab"
# 新建窗口
new_window = "Ctrl+N"
# 关闭窗口
close_window = "Ctrl+W"
# 文件操作快捷键
[file]
# 删除文件
delete_file = "D"
# 重命名文件
rename_file = "R"
# 复制文件
copy_file = "Y"
# 粘贴文件
paste_file = "P"
# 移动文件
move_file = "M"
# 文件选择快捷键
[selection]
# 全选
select_all = "Ctrl+A"
# 取消所有选择
deselect_all = "Ctrl+D"
# 反选
invert_selection = "Ctrl+I"
# 选择当前文件/目录
select_item = "Space"
# 页面导航快捷键
[navigation]
# 向上移动光标
move_up = "K"
# 向下移动光标
move_down = "J"
# 向左切换标签
move_left = "H"
# 向右切换标签
move_right = "L"
# 自定义命令触发键
[custom]
# 触发自定义功能
custom_action_1 = "Ctrl+1"
custom_action_2 = "Ctrl+2"
custom_action_3 = "Ctrl+3"
```
### theme.toml 配置示例
```toml
[general]
# 设置主界面配色方案
background_color = "#1e1e2e" # 背景颜色
foreground_color = "#cdd6f4" # 文本颜色
cursor_color = "#89dceb" # 光标颜色
selection_color = "#585b70" # 选中项背景颜色
highlight_color = "#fab387" # 高亮颜色
# 字体设置
font_family = "FiraCode" # 字体名称
font_size = 14 # 字体大小
[ui]
# 界面边框与间距
border_color = "#45475a" # 边框颜色
padding = 4 # 界面内容的内边距
[file_browser]
# 文件浏览器颜色配置
directory_color = "#89b4fa" # 目录名称颜色
file_color = "#cdd6f4" # 普通文件颜色
symlink_color = "#f5c2e7" # 符号链接颜色
hidden_file_color = "#6c7086" # 隐藏文件颜色
[status_bar]
# 状态栏颜色
background_color = "#313244" # 状态栏背景
foreground_color = "#a6adc8" # 状态栏文字
error_color = "#f38ba8" # 状态栏错误信息
[search]
# 搜索结果配色
match_color = "#a6e3a1" # 搜索结果的匹配高亮
current_match_color = "#fab387" # 当前匹配项的高亮
[progress_bar]
# 进度条的配色
filled_color = "#89dceb" # 已填充部分
empty_color = "#313244" # 未填充部分
```
另见
----
- [Yazi 官方文档](https://yazi-rs.github.io/) _(yazi-rs.github.io)_
- [Yazi Github](https://github.com/sxyazi/yazi) _(github.com)_

Some files were not shown because too many files have changed in this diff Show More