Compare commits

...

131 Commits

Author SHA1 Message Date
0cf390d159 Merge f09e34ad49 into ba05c9d952 2025-01-01 11:23:49 +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
f09e34ad49 longtable added and little changes 2024-05-15 16:49:59 +08:00
8d92c6e073 Add support for multiple columns 2024-05-15 16:47:52 +08:00
65c4fed894 format correct markdown 2024-05-15 16:39:31 +08:00
0ad226479c colour and box for text 2024-05-15 16:34:31 +08:00
0aabf4f9e2 Merge branch 'main' of github.com:SchwarzerYV/reference 2024-05-15 16:28:23 +08:00
0a9251dad6 add overset and underset function 2024-05-15 16:27:49 +08:00
1164edcb8e Merge branch 'jaywcjlove:main' into main 2024-05-15 16:06:09 +08:00
1cebc5add8 draft done 2024-05-15 14:53:21 +08:00
4bfba5a92a Adjusting Margins and Page Size in LaTeX 2024-05-15 14:24:53 +08:00
9feb3f1e6d add table example 2024-05-15 13:31:29 +08:00
f482310851 latex 2024-05-15 12:46:41 +08:00
de73319346 list test 2024-05-15 12:19:26 +08:00
945e403df2 item 2024-05-15 12:15:50 +08:00
448025733c add some font 2024-05-15 11:59:10 +08:00
889d613a6a my part 2024-05-15 11:53:08 +08:00
b836d77449 bf test 2024-05-14 20:15:50 +08:00
43 changed files with 4134 additions and 581 deletions

View File

@ -23,4 +23,6 @@ yarn.lock
# IDEA
*.iml
*.ipr
*.iws
*.iws
*.tex

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

4
.gitignore vendored
View File

@ -22,4 +22,6 @@ yarn.lock
# IDEA
*.iml
*.ipr
*.iws
*.iws
\demo

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,15 +330,15 @@ 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/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></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/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/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/Alex20180512" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/alex-reinfoce" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/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>
@ -347,38 +347,42 @@ jobs:
<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/richuff" title="richuff"><img src="https://avatars.githubusercontent.com/u/162144087?v=4" width="42;" alt="richuff"/></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/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/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></a>
<a href="https://github.com/wsypower" title="魏"><img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt="魏"/></a>
<a href="https://github.com/itldg" title="老大哥"><img src="https://avatars.githubusercontent.com/u/13432299?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/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/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/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/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/mancuoj" title="mancuoj"><img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/></a>
<a href="https://github.com/pangxiaoli" title="pangxiaoli"><img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/></a>
<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/ryanhex53" title="ryanhex53"><img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/></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/catcto" title="小武Alan"><img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="小武Alan"/></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/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/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></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/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/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></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/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></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/greyhao" title="redear_dev"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="redear_dev"/></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/infanx" title="infanx"><img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/></a>
<a href="https://github.com/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></a>
<a href="https://github.com/yanxuplay" title="hupilan"><img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/></a>
<a href="https://github.com/hweining" title="hweining"><img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/></a>
<a href="https://github.com/infanx" title="infanx"><img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/></a>
<a href="https://github.com/auroraslot" title="irony"><img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="irony"/></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/joyfully-W" title="joyfully-W"><img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/></a>
@ -389,7 +393,7 @@ jobs:
<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/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></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/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>
@ -398,21 +402,23 @@ jobs:
<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/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/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></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/rainbowatcher" title="看彩虹的人"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="看彩虹的人"/></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/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="zxx457"><img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/></a>
<a href="https://github.com/zhouhw0306" title="zhouhw0306"><img src="https://avatars.githubusercontent.com/u/82752681?v=4" width="42;" alt="zhouhw0306"/></a>
@ -430,9 +436,9 @@ jobs:
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/></a>
<a href="https://github.com/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/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>
<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/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>
@ -456,17 +462,20 @@ 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/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>
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()"><img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/></a>
<a href="https://github.com/dwgeneral" title="Happy-Engineer"><img src="https://avatars.githubusercontent.com/u/8654993?v=4" width="42;" alt="Happy-Engineer"/></a>
<a href="https://github.com/whb1998a" title="Wafer"><img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="Wafer"/></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/YLee9527" title="Terry Young"><img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/></a>
<a href="https://github.com/TRDSCSH" title="TRDSCSH"><img src="https://avatars.githubusercontent.com/u/125717891?v=4" width="42;" alt="TRDSCSH"/></a>
<a href="https://github.com/Xiwin" title="Xiwin"><img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="Xiwin"/></a>

129
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) 来修复或提供更好的备忘清单,主要面向【中文】用户。以下是一些开源天使提供的备忘清单和快速参考 :)。
## 正在建设中...
@ -47,12 +47,13 @@ Quick Reference
## 编程
[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-->
[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-->
@ -101,6 +102,7 @@ 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-->
@ -108,7 +110,6 @@ Quick Reference
[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);&class=tag&data-lang=Vue-->
@ -145,16 +146,6 @@ Quick Reference
[Bun](./docs/bun.md)<!--rehype:style=background: rgb(157 49 81);-->
<!--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);-->
<!--rehype:class=home-card-->
## 命令
[ADB, Android Debug Bridge](./docs/adb.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=Android&data-info=👆看看还缺点儿什么?-->
@ -169,7 +160,6 @@ 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);-->
@ -186,7 +176,6 @@ 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);-->
@ -196,7 +185,20 @@ Quick Reference
[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++-->
@ -204,13 +206,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-->
@ -220,6 +231,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-->
## 快捷键
@ -253,8 +265,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-->
@ -263,7 +273,7 @@ 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);-->
[ChatGPT](./docs/chatgpt.md)<!--rehype:style=background: rgb(74, 161, 129);&class=tag&data-lang=ai-->
[常见端口对照](./docs/ports.md)<!--rehype:style=background: rgb(16 185 129);-->
<!--rehype:class=home-card-->
## 看到缺少什么了吗?
@ -283,15 +293,15 @@ 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/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></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/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/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/Alex20180512" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/alex-reinfoce" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/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>
@ -300,38 +310,42 @@ Quick Reference
<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/richuff" title="richuff"><img src="https://avatars.githubusercontent.com/u/162144087?v=4" width="42;" alt="richuff"/></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/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/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></a>
<a href="https://github.com/wsypower" title="魏"><img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt="魏"/></a>
<a href="https://github.com/itldg" title="老大哥"><img src="https://avatars.githubusercontent.com/u/13432299?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/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/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/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/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/mancuoj" title="mancuoj"><img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/></a>
<a href="https://github.com/pangxiaoli" title="pangxiaoli"><img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/></a>
<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/ryanhex53" title="ryanhex53"><img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/></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/catcto" title="小武Alan"><img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="小武Alan"/></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/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/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></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/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/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></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/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></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/greyhao" title="redear_dev"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="redear_dev"/></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/infanx" title="infanx"><img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/></a>
<a href="https://github.com/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></a>
<a href="https://github.com/yanxuplay" title="hupilan"><img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/></a>
<a href="https://github.com/hweining" title="hweining"><img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/></a>
<a href="https://github.com/infanx" title="infanx"><img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/></a>
<a href="https://github.com/auroraslot" title="irony"><img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="irony"/></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/joyfully-W" title="joyfully-W"><img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/></a>
@ -342,7 +356,7 @@ Quick Reference
<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/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></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/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>
@ -351,21 +365,23 @@ Quick Reference
<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/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/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></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/rainbowatcher" title="看彩虹的人"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="看彩虹的人"/></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/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="zxx457"><img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/></a>
<a href="https://github.com/zhouhw0306" title="zhouhw0306"><img src="https://avatars.githubusercontent.com/u/82752681?v=4" width="42;" alt="zhouhw0306"/></a>
@ -383,9 +399,9 @@ Quick Reference
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/></a>
<a href="https://github.com/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/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>
<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/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>
@ -409,17 +425,20 @@ 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/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>
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()"><img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/></a>
<a href="https://github.com/dwgeneral" title="Happy-Engineer"><img src="https://avatars.githubusercontent.com/u/8654993?v=4" width="42;" alt="Happy-Engineer"/></a>
<a href="https://github.com/whb1998a" title="Wafer"><img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="Wafer"/></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/YLee9527" title="Terry Young"><img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/></a>
<a href="https://github.com/TRDSCSH" title="TRDSCSH"><img src="https://avatars.githubusercontent.com/u/125717891?v=4" width="42;" alt="TRDSCSH"/></a>
<a href="https://github.com/Xiwin" title="Xiwin"><img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="Xiwin"/></a>
@ -447,7 +466,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-->
[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-->
@ -513,7 +532,7 @@ Quick Reference
[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-->
@ -533,6 +552,16 @@ Quick Reference
[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-->
<!--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 版。

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

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

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

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

375
docs/c.md
View File

@ -54,11 +54,21 @@ int y = 6;
int sum = x + y; // 添加变量相加
// 声明多个变量
int x = 5, y = 6, z = 50;
int a, b, c = 10;
//仅声明变量不初始化
int result;
// 如果未初始化,变量的值是未定义的,使用它会导致错误的结果。
// 此时,变量的值是随机的,因此在使用该变量之前必须进行初始化。
result = result + 10; // 错误:未初始化的变量 result 会导致不可预测的结果
// 部分编译器会输出 Warning警告未初始化的变量可能导致未定义行为。
```
### 常量 Constants
常量在 C 语言中我们一般理解为不能被改变的值,活用常量与符号常量
常量在 C 语言中我们一般理解为不能被改变的值,活用常量与符号常量,可以使代码更加清晰和安全
```c
const int minutesPerHour = 60;
@ -71,13 +81,36 @@ const float PI = 3.14;
const int BIRTHYEAR = 1980;
```
说明与补充:
1. **常量命名规范**:常量通常使用全大写字母,多个单词之间用下划线分隔(例如 BIRTHYEAR、MAX_LENGTH
2. **`#define``const`**
- **`#define`**:宏常量通常在预处理阶段进行替换,不进行类型检查;
- **`const`**:类型安全的常量,编译器可以检查类型,一般更推荐使用 `const`
3. **数组大小**:可以使用 `const` 来定义数组的常量大小,这样编译器会将其作为编译时常量处理
### 注释
```c
// 这是一个注释
printf("Hello World!"); // 这是一个注释
/* 多行注释,上面的代码将打印出 Hello World!
到屏幕上,真是太棒了 */
/*
多行注释:用于注释跨多行的内容
上面的代码将打印出 Hello World! 到屏幕上
注意:多行注释不能嵌套,否则会导致编译错误
*/
```
**注意**:
单行注释`//`可以嵌套,`////////这种注释也是对的`
但行内注释应避免过长,以免影响代码可读性
多行注释不能嵌套,否则会导致编译错误(详见下文 [### Warning 和 Error](#warning-和-error)
```c
/* 这是一个多行注释的开始
/* 这是嵌套的多行注释C语言不支持 */
```
### 打印文本
@ -93,8 +126,9 @@ printf("Value = %f", f);
short a = 0b1010110; // 2 进制数字
int b = 02713; // 8 进制数字
long c = 0X1DAB83; // 16 进制数字
//变量a和c分别为short和long型所以输出必须加上对应的修饰符h和l
// 以 8 进制形输出
// 以 8 进制形输出
printf("a=%ho, b=%o, c=%lo\n", a, b, c);
// 输出 => a=126, b=2713, c=7325603
@ -119,6 +153,7 @@ int b1=56720, b2=9999, b3=20098;
int c1=233, c2=205, c3=1;
int d1=34, d2=0, d3=23;
// %-9d: 十进制输出最少宽度为9左对齐
printf("%-9d %-9d %-9d\n", a1, a2, a3);
printf("%-9d %-9d %-9d\n", b1, b2, b3);
printf("%-9d %-9d %-9d\n", c1, c2, c3);
@ -134,7 +169,29 @@ printf("%-9d %-9d %-9d\n", d1, d2, d3);
34 0 23
```
`%-9d` 中,`d` 表示以 `10` 进制输出,`9` 表示最少占 `9` 个字符的宽度,宽度不足以空格补齐,`-` 表示左对齐
`%-9d` 中,`d` 表示以 `10` 进制输出,`9` 表示最少占 `9` 个字符的宽度,宽度不足以空格补齐,`-` 表示左对齐,如果不使用左对齐则默认右对齐
对于整型数据,假设:
```c
int a = 12345;
printf(%md,a);
```
1. 若 m <= 实际数据的宽度,则按实际情况输出
2. 若 m > 实际数据的宽度,则在实际数据的左边用空格补齐
3. `printf(“%0md”,a);` 则实际的结果不够 m 位的在数据的左边用0补齐
对于浮点型数据,宽度=整数部分的位数+小数点+小数部分的宽度
假设:
```c
float a = 1.2345;
printf(%m.nf,a); //m --整个数据的宽度n--小数位数
```
1. 实际小数位数>n截去小数右边多余的小数截去的第一位要注意四舍五入
2. 实际小数位数< n在小数的最后补0
3. 若m省略则写作%.n 整数部分按照实际输出小数部分按照以上两个规则进行
4. m < n+1自动突破宽度为m的限制按照实际数据进行输出
5. m > n+1整个数据的最左边补空格
### 字符串 Strings
@ -191,14 +248,37 @@ if (time < 10) {
printf("晚上好!");
}
// 输出 -> "晚上好!"
int time = 10;
if (time > 8) {
//再嵌套一个if
if (time < 12) {
printf("中午好!")
}
}
// 输出 -> "中午好!"
```
### 三元运算符
<!--rehype:wrap-class=col-span-2-->
三元运算符(? :)是一种简洁的条件判断方式,常用于根据条件选择表达式的值,由三个部分组成:
- 一个条件表达式
- 条件为真时的结果
- 条件为假时的结果
基本语法:`(condition) ? expression1 : expression2;`
如果`condition`为真,则返回`expression1`否则返回`expression2`
```c
int time = 20;
(time < 18) ? printf("再会!") : printf("晚上好!");
// 输出 -> "晚上好!"
```
三元运算符可以嵌套使用,但嵌套层级太多会导致代码可读性下降,不建议在实际场景使用
```c
int time = 22;
printf((time < 10) ? "早上好!" : (time < 20) ? "再会!" : "晚上好!");
// 输出 -> "晚上好!"
```
### Switch
@ -805,6 +885,68 @@ int main(void) {
}
```
### Warning 和 Error
<!--rehype:wrap-class=row-span-2-->
在 C 语言中警告Warning和错误Error是编译器用于标识代码潜在问题或阻止代码编译的两种机制
**警告**
警告提示代码中可能存在的问题,但不会阻止代码编译。处理警告可以提升代码质量和可移植性。
**常见警告示例**
1. 未使用的变量
`int x; printf("%d",x);`
2. 类型隐式转换(可能导致数据丢失)
`int x = 3.14; //浮点数被隐式转换`
`int a = 2147483647 + 1; //可能溢出`
3. 函数声明与定义不匹配
**错误**
警告提示代码中可能存在的问题,但不会阻止代码编译。处理警告可以提升代码质量和可移植性。
**常见错误示例**
1. 语法错误(如缺少分号)
`int x=1 `
2. 函数定义冲突
```C
void func(int);
void func(double);
```
3. 函数或变量未定义
`y = 10; printf("%d",y);`
4. 头文件缺失或冲突
`#include <unknown.h>`
**使用编译器指令控制警告和错误**:
1. 抑制警告
可以使用编译器选项来关闭特定的警告,例如在 GCC 中:
```GCC
gcc -w file.c # 禁用所有警告
gcc -Wall file.c # 启用所有常见警告
gcc -Werror file.c # 将警告视为错误
```
2. 使用 #pragma 控制警告
在某些编译器中,可以使用`#pragma`指令启用或禁用警告
```C
#include <stdio.h>
#pragma warning(disable : 4996) // 禁用警告(适用于 MSVC 编译器)
int main() {
printf("Hello, world!");
return 0;
}
```
**总结**
| 区别点 | Warning警告 | Error错误 |
|------------------|----------------------------------------|----------------------------------------|
| 严重程度 | 程序可继续编译,但可能存在隐患 | 编译无法完成,必须修复 |
| 编译结果 | 生成可执行文件 | 无法生成可执行文件 |
| 触发原因 | 潜在问题,例如隐式转换或未使用的变量 | 语法或语义错误,例如语法错误或未定义变量 |
| 修复必要性 | 可选择修复,但建议修复以避免潜在问题 | 必须修复才能继续编译 |
| 编译器选项调整 | 可以忽略或转换为错误(如 `-Werror` | 无法调整,必须修复 |
函数
----
@ -1301,6 +1443,229 @@ void main (){
// 文件大小: 18 bytes
```
## C 网络编程
### 网络编程介绍
C使用sockets进行网络通信。包含头文件
- `#include <sys/socket.h>`: 套接字操作,如创建、绑定和监听套接字
- `#include <arpa/inet.h>`: IP 地址转换
- `#include <unistd.h>`: 关闭套接字等
- `#include <netinet/in.h>`: 网络地址结构定义和相关敞亮
### 创建套接字
网络通信的第一步是创建套接字。套接字是网络通信的基础,通过它可以与远程主机进行数据交换。
#### 服务端
```cpp
int server_fd, new_socket; // 定义服务器文件描述符和新连接的套接字
int port = 8080; // 服务器使用的端口号
// 创建套接字文件描述符
// AF_INET 表示使用 IPv4 协议SOCK_STREAM 表示使用 TCP 协议,协议参数通常为 0默认 TCP
if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) {
perror("socket failed");
exit(EXIT_FAILURE);
}
```
#### 客户端
```cpp
int sock = 0; // 客户端的套接字描述符
struct sockaddr_in serv_addr; // 定义服务器地址结构体
// 创建套接字
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
perror("Socket creation failed");
exit(EXIT_FAILURE);
}
```
### 绑定套接字
服务端创建套接字后,需要将其绑定到特定的 IP 地址和端口,以便客户端能够连接。
#### 服务端
```cpp
struct sockaddr_in address; // 定义存储地址信息的结构体
address.sin_family = AF_INET; // 设置地址族为 IPv4
address.sin_addr.s_addr = INADDR_ANY; // 将服务器绑定到所有可用的网络接口(即本机的所有 IP 地址)
address.sin_port = htons(port); // 将端口号转换为网络字节序,大端模式
// 将套接字绑定到指定的地址和端口上
// bind() 将服务器的文件描述符与 IP 地址和端口号进行绑定,以便客户端能够通过该地址和端口访问服务器
if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0) {
perror("bind failed");
exit(EXIT_FAILURE);
}
```
### 监听和接收连接
服务端在绑定套接字之后,需要进入监听状态,以等待客户端的连接请求。
#### 服务端
```cpp
// 开始监听客户端连接
// 监听连接请求
// listen() 函数将套接字设置为被动模式,准备接收来自客户端的连接请求
if (listen(server_fd, 3) < 0) { // 第二个参数 3 表示连接请求的队列大小
perror("listen failed");
exit(EXIT_FAILURE);
}
int addrlen = sizeof(address); // 获取地址结构体的大小
// accept() 函数会阻塞等待客户端的连接请求,一旦连接请求到来,创建一个新的套接字 new_socket 用于数据传输
if ((new_socket = accept(server_fd, (struct sockaddr *)&address, (socklen_t*)&addrlen)) < 0) {
perror("accept failed");
exit(EXIT_FAILURE);
}
```
### 连接到服务端
客户端使用 `connect()` 函数连接到服务器的 IP 地址和端口。
#### 客户端
```cpp
// 设置服务器地址
serv_addr.sin_family = AF_INET; // 设置地址族为 IPv4
serv_addr.sin_port = htons(port); // 将端口号转换为网络字节序
// 将 IP 地址转换为二进制并存储在 serv_addr 结构体中
if (inet_pton(AF_INET, "127.0.0.1", &serv_addr.sin_addr) <= 0) {
perror("Invalid address/ Address not supported");
exit(EXIT_FAILURE);
}
// 连接服务器
// connect() 函数将客户端的套接字与服务器的地址绑定,从而建立连接
if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
perror("Connection Failed");
exit(EXIT_FAILURE);
}
```
### 发送和接收数据
一旦连接建立,服务端和客户端可以通过套接字发送和接收数据。
#### 服务端
```cpp
// 服务端从客户端接收数据
char buffer[1024] = {0}; // 缓冲区,用于存储接收的数据
int valread = read(new_socket, buffer, 1024); // 从客户端读取数据
printf("Client: %s\n", buffer); // 打印接收到的客户端数据
// 服务端发送响应数据给客户端
const char *response = "Hello from server"; // 响应消息
send(new_socket, response, strlen(response), 0); // 发送数据到客户端
printf("Server message sent\n");
```
#### 客户端
```cpp
// 客户端发送数据给服务端
const char *message = "Hello from client"; // 要发送的消息
send(sock, message, strlen(message), 0); // 发送数据到服务端
printf("Client message sent\n");
// 客户端从服务端接收响应数据
char buffer[1024] = {0}; // 缓冲区,用于存储接收到的数据
int valread = read(sock, buffer, 1024); // 读取服务端的响应数据
printf("Server: %s\n", buffer); // 打印接收到的服务端数据
```
### 关闭套接字
完成通信后,双方都应关闭各自的套接字以释放资源。
#### 服务端
```cpp
// 关闭服务端套接字
close(new_socket); // 关闭用于数据传输的客户端套接字
close(server_fd); // 关闭服务器的监听套接字
```
#### 客户端
```cpp
// 关闭客户端套接字
close(sock); // 关闭客户端的套接字
```
## I/O多路复用
### 多路复用介绍
在网络编程中,服务端可以使用 I/O 多路复用 技术,如 `select`、`poll` 或 `epoll`。这些技术允许服务端同时监听多个文件描述符(如套接字),并在其中一个发生事件时进行处理,提升系统效率。包含头文件:
- `#include <sys/select.h>`: 提供 `select`
- `#include <poll.h>`: 提供 `poll`
- `#include <sys/epoll.h>`: 提供`epoll`
### 使用select
```c
fd_set read_fds; // 定义文件描述符集合
FD_ZERO(&read_fds); // 清空集合
FD_SET(server_socket, &read_fds); // 将服务端套接字加入集合
int max_fd = server_socket;
int activity = select(max_fd + 1, &read_fds, NULL, NULL, NULL); // 等待事件发生
if (activity < 0 && errno != EINTR) {
perror("select error");
}
```
### 使用poll
```c
struct pollfd fds[2]; // 定义文件描述符数组
fds[0].fd = server_socket;
fds[0].events = POLLIN; // 监听读事件
int poll_count = poll(fds, 2, -1); // 等待事件
if (poll_count < 0) {
perror("poll error");
}
```
### 使用epoll
```c
int epoll_fd = epoll_create1(0); // 创建 epoll 文件描述符
struct epoll_event event;
event.events = EPOLLIN;
event.data.fd = server_socket;
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, server_socket, &event) == -1) {
perror("epoll_ctl failed");
}
struct epoll_event events[10]; // 事件数组
int event_count = epoll_wait(epoll_fd, events, 10, -1); // 等待事件发生
for (int i = 0; i < event_count; i++) {
if (events[i].data.fd == server_socket) {
// 处理服务端套接字上的事件
}
}
```
杂项
---

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)

View File

@ -1,19 +1,17 @@
ChatGPT
===
ChatGPT是OpenAI开发的人工智能聊天机器人程序利用强化学习训练能够进行复杂的语言任务如文本生成、问答和编程支持
此备忘单列出了来自世界各地的提示和提示,说明如何有效使用 ChatGPT
入门指南
---
### ChatGPT 介绍
ChatGPT全称聊天生成预训练转换器英语Chat Generative Pre-trained Transformer是 OpenAI 开发的人工智能聊天机器人程序于2022年11月推出
ChatGPT 是 OpenAI 于 2022 年发布的 AI 聊天机器人,基于 GPT-3.5、GPT-4 等模型,支持自动生成文本、问答、总结和编程等多种语言处理任务
- 网址: <https://chatgpt.com/>
该程序使用基于GPT-3.5、GPT-4、GPT-4o架构的大型语言模型并以强化学习训练。ChatGPT目前仍以文字方式交互而除了可以用人类自然对话方式来交互还可以用于甚为复杂的语言工作包括自动生成文本、自动问答、自动摘要等多种任务。如在自动文本生成方面ChatGPT可以根据输入的文本自动生成类似的文本剧本、歌曲、企划等在自动问答方面ChatGPT可以根据输入的问题自动生成答案。还有编写和调试计算机程序的能力。
### 国内类似的平台
- [文心一言(百度)](https://yiyan.baidu.com/) _baidu.com_
@ -26,48 +24,53 @@ ChatGPT全称聊天生成预训练转换器英语Chat Generative Pre-tr
### 通用
<!--rehype:wrap-class=row-span-2-->
为你的公司或创意命名
为你的企业或创意命名
```
你能为我的科技初创公司建议一个创意的名字吗?
帮我想一个有吸引力的名字,适合我的面包店生意。
```bash
你能帮我为我的科技创业公司起个有创意的名字吗?
帮我想个朗朗上口的名字给我的面包店。
```
为课程或培训项目创建大纲
```
初学者网页开发课程创建一个大纲。
能为客户服务研讨会制定一个培训计划大纲吗?
```sh
帮我创建一个面向初学者网页开发课程大纲。
能否为客户服务工作坊设计一个培训项目的大纲?
```
特定职位提供面试问题
提供特定职位面试问题
```
```sh
我在面试软件工程师职位,你能给我一些面试问题吗?
请为市场经理角色提供一些常见的面试问题。
请给我一些常见的市场经理面试问题。
```
为商业伙伴、客户或客户提供礼物想法
为商业伙伴、客户或客户提供礼物创意
```
我需要给我的客户准备礼物,你能帮忙吗?
给我的商业伙伴们一些独特的礼物建议?
```sh
我需要一些送给客户的礼物创意,你能帮忙吗?
有什么独特的礼物可以送给我的商业伙伴?
```
名单或电子邮件中随机选择竞赛获奖者
一长串名字或邮箱中随机挑选比赛获奖者
```
我想从100个名字中选择一个获奖者,你可以帮忙吗?
从1000封电子邮件列表中随机选择5个作为赠品竞赛的获奖者可以吗
```sh
我想从100个名字中挑选一位获奖者,你帮忙吗?
能帮我从1000个邮箱中随机挑选5个用于赠品抽奖吗
```
### 编程
<!--rehype:wrap-class=row-span-3-->
解释代码为什么工作
解释代码为什么无法正常工作
```
为什么这段代码不起作用?
```js
为什么这段代码不能运行
var x = 5;
var y = 0;
console.log(x/y);
@ -75,57 +78,95 @@ console.log(x/y);
解释代码的含义
```
这段代码是做什么的?
```js
这段代码的作用是什么
function addNumbers(a, b) {
return a + b;
return a + b;
}
```
指定的语言重写代码
将代码转换为指定的语言
```
把这段代码翻译成Python
```js
把这段代码翻译成 Python:
function addNumbers(a, b) {
return a + b;
return a + b;
}
```
编写整个软件程序
编写完整的软件程序
```
写一个计算给定数阶乘的程序?
如何在JavaScript中发出HTTP请求
```js
写一个计算给定数阶乘的 Python 程序
如何用 JavaScript 发起一个 HTTP 请求
```
生成正则表达式regex
生成正则表达式 (regex)
```
```js
创建一个匹配所有电子邮件地址的正则表达式
生成一个匹配8位密码的正则表达式。
生成一个8位密码的正则表达式
```
为代码库添加注释
```
```js
为这段代码添加注释
function addNumbers(a, b) {
return a + b;
return a + b;
}
```
更改一行代码的CSS
修改代码行的 CSS
```
更新这行代码的CSS将字体颜色更改为蓝色?
<p class="example">Hello, Reference!</p>
```html
更新这行的 CSS 将字体颜色更改为蓝色?
<p class="example">Hello, World!</p>
```
更改一行代码的HTML
修改代码行的 HTML
```html
给这个标题标签添加一个 "header" 类?
<h1>Hello, World!</h1>
```
### 电子表格
帮助创建一个电子表格公式
```
给这个标题标签添加一个"class"为"header"的类
<h1>Hello, Reference!</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-->
提供提高电子表格效率的建议
```
你能给我一些提高电子表格效率的建议吗?
```
### 电子邮件
@ -134,460 +175,441 @@ function addNumbers(a, b) {
创建电子邮件活动
```
发送邀请小弟调调参加周末晚宴的电子邮件
为我们的新客户入职流程创建电子邮件序列
邀请 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-->
从文本中提取电子邮件地址
```
为我从下面的文本中提取所有的电子邮件地址:
Sed sit amet sodales tom@gmail.com, at jack@cheatsheets.zip enim. 18261@outlook.com ut eros
```sh
帮我提取所有的电子邮件地址:
Sed sit amet sodales tom@gmail.com, at jack@gmail.com enim. 18261@outlook.com ut eros
```
<!--rehype:className=wrap-text-->
### 电子表格
帮助创建电子表格公式
```
你能帮我创建一个计算A1到A10单元格求和的公式吗
```
解释公式的含义
```
你能简单解释一下 =SUM(A1:A10) 这个公式的含义吗?
```
为占位符创建虚拟数据
```
你能为我生成一些用作电子表格占位符的虚拟数据吗?
```
帮助创建复杂的宏
```
我需要创建一个宏计算B1到B10单元格的平均值并将结果插入到C1单元格中。你能帮我吗
```
<!--rehype:className=wrap-text-->
提供提高电子表格效率的提示
```
你能给我一些提高电子表格效率的建议吗?
```
### 社交媒体
任何主题提供模板创意
提供任何主题的表情包创意
```
你能给我提供一些关于[主题]的模板创意吗?
你能给我一些关于【狗狗】的表情包创意吗?
```
为任何主题的帖子提供互动关联的想法
提供能提升互动的帖子创意
```
我想创建一个关于[主题]的帖子,能帮我想些创意吗,能吸引我的粉丝参与。
我想一个关于气候变化的帖子,能与我的粉丝产生互动。你能给我一些创意吗?
```
<!--rehype:className=wrap-text-->
生成标签和标题
生成标签和配文
```
我需要一些标签和一段风景日落片的标。你能我生成一些吗?
我需要一些适合风景日落片的标签和配文。你能我生成一些吗?
```
<!--rehype:className=wrap-text-->
提供复建议
提供复建议
```
我刚收到一条询问[主题]项目状态的消息。你能为我建议一条回复吗?
我刚收到一条关于项目状态的消息。你能给我一个回复建议吗?
```
<!--rehype:className=wrap-text-->
### 阅读
总结长文
总结长文
```
你能我总结一下这篇文章吗?[你的文本]
你能我总结一下这篇文章吗?[你的文本]
```
翻译外语
```
你能把这句话翻译成中文吗?[你的文本]
你能把这句话翻译成西班牙语吗?[你的文本]
```
类似于另一本书的书籍推荐
推荐类似的书籍
```
你能推荐一些类似于《饥饿游戏》的书吗?
你能推荐一些《饥饿游戏》类似的书吗?
```
### 设计
为您创建一个AI设计提示
创建 AI 设计提示
```
能帮我生成一个关于新体育品牌logo设计的设计提示吗?
能帮我生成一个为新运动品牌设计标志的提示吗?
```
缩略图建议用于博客或视频
博客或视频的缩略图建议
```
能推荐一些引人的缩略图设计吗,用于我最新的视频,内容是健康饮食
能推荐一些引人注目的缩略图设计,适合我最新关于健康饮食的 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优化的最佳关键词
查找 [主题] 社交媒体优化的最佳关键词
```
- 为[主题]生成一系列相关关键词。
- 识别[主题]内容优化的长尾关键词
- 查找[主题]的最佳表现关键词
- 为[主题]生成一系列 LSI 关键词
- 查找[主题]的低竞争关键词
- 为[主题]关键词创建同义词列表。
- 查找[主题] PPC 广告活动的最佳关键词。
- 查找[主题]语音搜索优化的最佳关键词
- 列出[主题]的最佳关键词用于特色摘要。
- 查找[主题]视频优化的最佳关键词
- 查找[主题]的最佳关键词
- 查找[主题] AMP 优化的最佳关键词
- 查找[主题]社交媒体优化的最佳关键词
<!--rehype:className=style-round-->
更多关于 SEO 的 ChatGPT 提示
```
为 [主题] 创建元描述和标题标签
查找与 [主题] 相关的内部链接
为 [主题] 的博客文章和文章主题生成创意
研究行业特定术语以用于 [主题] 内容
查找权威网站以获取 [主题] 内容的反向链接
创建与 [主题] 相关的XML站点地图示例
研究 [主题] 的最佳元标签
研究 [主题] 内容的最佳内部链接结构
生成关于 [主题] 的常见问题列表
为与 [主题] 相关的图像创建最佳Alt标签列表
创建与 [主题] 相关的子主题列表
查找发布与 [主题] 相关内容的最佳时间
研究与 [主题] 相关的最佳外部链接策略
查找用于 [主题] SEO 的最受欢迎工具
创建与 [主题] 相关的潜在影响者列表
研究与 [主题] 相关的最佳Schema标记
查找 [主题] 内容的最佳标题标签
创建与 [主题] 相关的潜在链接建设机会列表
研究与 [主题] 反向链接相关的最佳锚文本
创建与 [主题] 相关的潜在客座博客机会列表
研究与 [主题] 相关的最佳本地SEO策略
研究用于 [主题] 网站性能的最佳分析工具
创建与 [主题] 相关的潜在合作伙伴列表
研究用于 [主题] 移动优化的最佳策略
研究用于 [主题] 电子商务优化的最佳策略。提供关键词群集
创建与 [主题] 相关的潜在联盟营销机会列表
什么是与 [主题] 相关的最佳联盟营销网站
什么是 [主题] 国际SEO的最佳策略
创建与 [主题] 相关的潜在播客或播客客座机会列表
查找与 [主题] 相关的热门内容主题
研究用于 [主题] SEO 的最佳策略并提供可操作步骤
创建与 [主题] 相关的潜在视频系列或网络研讨会想法列表
研究与 [主题] 相关的竞争策略
查找与 [主题] 相关的规范标签示例
为 [主题] 制定一个示例关键词列表,以定位多个地理位置
生成针对 [主题] 客户购买漏斗不同阶段的关键词想法
识别与 [主题] 相关的行业标签
```
- 为[主题]创建元描述和标题标签。
- 查找与[主题]相关的内部链接机会。
- 为[主题]生成博客文章和主题创意。
- 研究[主题]内容中使用的行业术语。
- 查找权威网站以获取与[主题]内容相关的反向链接。
- 创建与[主题]相关的 XML 网站地图示例。
- 研究[主题]的最佳元标签。
- 研究[主题]内容的最佳内部链接结构。
- 生成与[主题]相关的常见问题列表。
- 为与[主题]相关的图片创建最佳替代文本标签列表
- 为[主题]创建相关子主题列表
- 查找与[主题]相关的内容发布时间的最佳时机。
- 研究与[主题]相关的最佳外部链接策略。
- 查找与[主题] SEO 使用的最流行工具。
- 为[主题]创建潜在影响者列表。
- 研究[主题]的最佳模式标记。
- 查找[主题]内容的最佳标题标签。
- 为[主题]创建潜在的链接建设机会列表。
- 研究[主题]反向链接的最佳锚文本。
- 创建[主题]的潜在客座博客机会列表。
- 研究[主题]的最佳本地 SEO 策略。
- 研究[主题]网站性能的最佳分析工具。
- 为[主题]创建潜在合作伙伴关系列表。
- 研究[主题]的最佳移动优化策略。
- 研究[主题]的最佳电子商务优化策略,并提供关键词聚类。
- 创建[主题]的潜在联盟营销机会列表
- [主题]的最佳联盟营销网站有哪些?
- [主题]的最佳国际 SEO 策略是什么
- 创建与[主题]相关的潜在播客或播客嘉宾机会列表。
- 研究[主题]的最佳 Google 我的商家优化策略。
- 查找与[主题]相关的热门内容主题
- 研究[主题]的最佳 SEO 策略并提供可操作步骤
- 创建与[主题]相关的潜在视频系列或网络研讨会创意列表
- 研究与[主题]相关的竞争对手策略
- 查找与[主题]相关的规范标签示例
- 为[主题]创建一个面向多个地理位置的示例关键词列表。
- 生成针对不同客户购买漏斗阶段的[主题]关键词创意。
- 识别与[主题]相关的行业标签
<!--rehype:className=style-round-->
### 写作/博客
<!--rehype:wrap-class=row-span-2-->
的创意写作项目创建标题
的创意写作项目创建标题
```
短篇小说集的标题:[你的文章]
我短篇小说集的标题:[你的文章]
```
创建大纲
```
一篇关于运动的论文大纲。
关于锻炼的论文大纲。
```
生成内容创意
```
关于[主题]博客的创意?
可持续时尚博客的创意?
```
总结提供的任何文本
总结提供的任何文本
```
总结这篇关于可再生能源的文章?[你的文章]
总结一下这篇关于可再生能源的文章?[你的文章]
```
撰写完整的博客文章
创建完整的博客文章
```
关于财务规划的博客文章?
关于[财务规划]的博客文章?
```
扩展句子、段落或长文本选择
扩展句子、段落或长文本
```
扩展这句关于爵士音乐的话?[你的句子]
扩展关于爵士音乐的这句话?[你的句子]
```
改变写作语气
改变你的写作语气
```
将这份报告的语气改为对话式?[你的文章]
将这份报告的语气改为对话式?[你的报告]
```
校对或编辑的写作
校对或编辑的写作
```
校对这篇文章?[你的文章]
```
使用标题格式化文本(非常适合博客文章)
用标题格式化文本(适合博客文章)
```
为我的博客文章格式化标题?[你的文章]
为我的博客文章格式化标题?[你的帖子]
```
检查任何文本的偏见
```
检查这篇文章是否偏见?[你的文章]
检查这篇文章是否存在偏见?[你的文章]
```
检测任何文本的抄袭
```
检测这篇论文是否有抄袭[你的论文]
检测这篇论文的抄袭情况[你的论文]
```
为您提供域名
提供域名
```
为我的【园艺博客】提供一个域名?
我[园艺博客]的域名?
```
### 撰写商业内容
撰写或重新撰写您的产品描述
```
请帮我为最新的商品撰写一个新的引人注目的产品描述。
```
撰写或重新撰写申诉信
```
请帮助重新撰写我的申诉信,使其更具说服力。
```
撰写或重新撰写供应商联络邮件
```
能帮我写一封有效的电子邮件,以联系潜在供应商吗?
```
帮助您找到可以打包销售的商品
```
请推荐一些适合我们客户的商品组合。
```
组织产品和定价数据
```
能帮我将产品和定价信息整理成一个整洁易管理的电子表格吗?
```
<!--rehype:className=wrap-text-->
### 教师/课程创建者
将事实或统计数据列表转换为多选测验
将事实或统计数据转换为多项选择题
```
能将这份关于世界历史事实列表转成多选测验吗?[你的列表]
```sh
你能把这份关于世界历史事实列表转成多项选择题吗?[你的列表]
```
<!--rehype:className=wrap-text-->
特定主题的作业创意
```
我需要一些有关[主题]的历史作业创意。你能建议一些吗?
我需要一些关于美国独立战争的历史作业创意。你能建议一些吗?
```
<!--rehype:className=wrap-text-->
根据学生名单创建分组
从学生列表中创建分组
```
班上有30名学生名单。你能帮忙将他们分成6人一组小组项目吗?
我有一份30名学生名单。你能他们分成6人一组进行小组项目吗?
```
<!--rehype:className=wrap-text-->
基于考试成绩创建曲线
根据考试成绩创建曲线
```
我需要根据他们的考试成绩为我的班级创建一个分曲线。能帮忙吗?
我需要根据学生的考试成绩创建一个分曲线。能帮忙吗?
```
<!--rehype:className=wrap-text-->
评分作业
```
能为这篇历史论文分并提供改进意见吗?
你能给这篇历史论文分并提供改进建议吗?
```
### 视频
### YouTube
剧本中创建时间戳
文字稿中创建时间戳
```
能为这播客剧本创建时间戳吗?[视频地址]
```
将视频转换为带格式的博客文章
```
能将这个关于烹饪的视频转换为带有标题和项目符号的博客文章吗?[视频链接]
能为这播客节目的文字稿创建时间戳吗?[你的文字稿]
```
<!--rehype:className=wrap-text-->
提出视频大纲或剧本
将 YouTube 视频转换为带格式的博客文章
```
我需要一个关于冥想益处的视频大纲。你能帮忙吗?
```
回复评论
```
能为我的视频上的这条负面评论写一个有思想的礼貌回复吗?
你能把这段关于烹饪的 YouTube 视频转成带有标题和项目符号的博客文章吗?[视频链接]
```
<!--rehype:className=wrap-text-->
为您的缩略图提供创意
想出视频大纲或脚本
```
我需要一关于"DIY家居装"的创意
我需要一关于冥想好处的视频大纲。你能帮忙吗
```
创建对评论的回复
```
你能写一个周到且礼貌的回复,回应我 YouTube 视频上的这条负面评论吗?
```
<!--rehype:className=wrap-text-->
给你缩略图创意
```
我需要一些关于“DIY 家居装饰”视频的缩略图创意。你能建议一些吗?
```
<!--rehype:className=wrap-text-->
分析你的脚本或文字稿并告诉你语气
```
你能分析这段关于环境问题的视频脚本,并告诉我语气是什么吗?[你的脚本]
```
<!--rehype:className=wrap-text-->
任何主题的视频创意
```
我想制作一系列关于时尚的视频。你能给我建议一些单集的创意吗?
```
<!--rehype:className=wrap-text-->
### 研究
帮助研究2021年前发生的任何事情
帮助研究2021年前发生的任何事情
```
以简单的术语解释量子计算
有没有关于10岁生日的创意想法
如何在JavaScript中发起HTTP请求
可以告诉我导致火山喷发的事件吗?
可以告诉我关于印刷机发明的信息吗?
可以总结一下奥林匹克运动会的历史吗?
可以给我关于文艺复兴的相关信息吗?
我对拜占庭帝国的历史很感兴趣。你能帮我了解更多吗?
等等...
```
- 用简单的术语解释量子计算。
- 有什么创意适合10岁生日派对的吗
- 我如何在 JavaScript 中发出 HTTP 请求
- 你能告诉我美国内战前的事件吗
- 你能告诉我印刷机的发明吗?
- 你能研究一下奥林匹克运动会的历史吗?
- 你能给我关于法国大革命的信息吗?
- 我对拜占庭帝国的历史感兴趣。你能帮我了解更多吗?
- 等等...
<!--rehype:className=style-round-->
## 参考资料

View File

@ -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

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

@ -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

@ -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

@ -41,6 +41,7 @@ $ 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)
@ -783,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中已经提供了两种实现方式分别是:
@ -893,6 +895,373 @@ 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,),
)
)
)
);
}
}
```
另见
---

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
----

View File

@ -1344,7 +1344,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 +1353,7 @@ int result = comparator.compare(1, 2);
```java
String str = "HELLO";
String lowerCase = str::toLowerCase;
String lowerCase = str::toLowerCase;
// 返回 "hello"
```
@ -1362,7 +1362,7 @@ String lowerCase = str::toLowerCase;
```java
Supplier<String> supplier = String::new;
String str = supplier.get();
String str = supplier.get();
// 返回一个空字符串
```
@ -1372,7 +1372,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 +1382,7 @@ String[] array = function.apply(5);
```java
String someStr = "HELLO";
String lowerCase = someStr::toLowerCase;
String lowerCase = someStr::toLowerCase;
// 返回 "hello"
```
@ -1391,7 +1391,7 @@ String lowerCase = someStr::toLowerCase;
```java
SomeClass someObject = new SomeClass();
int result = someObject::staticMethod;
int result = someObject::staticMethod;
// 调用静态方法
```
@ -1558,6 +1558,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

@ -72,7 +72,7 @@ Supported Functions
``KaTeX:\\\`{a}`` <pur><code>\\&#96;{a}</code></pur> | `KaTeX:\={a}` <pur>`\={a}`</pur> |
`KaTeX:\"{a}` <pur>`\"{a}`</pur> | `KaTeX:\v{a}` <pur>`\v{a}`</pur> |
`KaTeX:\^{a}` <pur>`\^{a}`</pur> | `KaTeX:\u{a}` <pur>`\u{a}`</pur> |
`KaTeX:\r{a}` <pur>`\r{a}`</pur> |
`KaTeX:\r{a}` <pur>`\r{a}`</pur>
### Delimiter Sizing
@ -156,6 +156,7 @@ Supported Functions
`KaTex:\sout{abc}` | <pur>`\sout{abc}`</pur> | `KaTex:\boxed{\pi=\frac c d}` | <pur>`\boxed{\pi=\frac c d}`</pur>
`KaTex:\$a_{\angl n}` _<red>MD语法冲突</red>_ | <pur>`$a_{\angl n}`</pur> | `KaTex:a_\angln` | <pur>`a_\angln`</pur>
`KaTex:\phase{-78^\circ}` | <pur>`\phase{-78^\circ}`</pur>
`KaTex:\overset{a}{B}` | <pur>`\overset{a}{B}`</pur> | `KaTex:\underset{a}{B}` | <pur>`\underset{a}{B}`</pur>
<pur>\tag{hi} x+y^{2x}</pur>
@ -202,6 +203,7 @@ Supported Functions
| `KaTex:f'` | <pur>`f'`</pur> | `KaTex:\underline{abc}` | <pur>`\underline{abc}`</pur> | `KaTex:\overleftarrow{abc}` | <pur>`\overleftarrow{abc}`</pur> |
| `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> |
|`KaTex:\frac{d^n y}{d x^n}`| <pur>`\frac{d^n y}{d x^n}`</pur> | `KaTex:\int_{b}^{a} \,dx` | <pur>`\int_{b}^{a} \,dx`</pur> | `KaTex:\lim_{x \to \infty}` | <pur>`\lim_{x \to \infty}`</pur> |
### 分隔符 Delimiters
<!--rehype:wrap-class=col-span-3-->
@ -891,6 +893,7 @@ x = \begin{cases}
`KaTex:\LARGE AB` | <pur>`\LARGE AB`</pur> | `KaTex:\LARGE AB` | <pur>`\LARGE AB`</pur> | `KaTex:\footnotesize AB` | <pur>\footnotesize AB</pur>
`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>
`KaTex:\mathcal{AB}` | <pur>`\mathcal{AB}`</pur> | `KaTex:\mathak{AB}` | <pur>`\mathak{AB}`</pur> | `KaTex:\mathbb{AB}` | <pur>`\mathbb{AB}`</pur> | `KaTex:\mathsf{AB}` | <pur>`\mathsf{AB}`</pur>
### Style 样式
<!--rehype:wrap-class=col-span-3-->
@ -900,7 +903,165 @@ x = \begin{cases}
`KaTex:\displaystyle\sum_{i=1}^n` | <pur>\displaystyle\sum_{i=1}^n</pur> | `KaTex:\textstyle\sum_{i=1}^n` | <pur>\textstyle\sum_{i=1}^n</pur>
`KaTex:\scriptstyle x` | <pur>\scriptstyle x</pur> | `KaTex:\scriptscriptstyle x` | <pur>\scriptscriptstyle x</pur>
`KaTex:\lim\limits_x` | <pur>\lim\limits_x</pur> | `KaTex:\lim\nolimits_x` | <pur>\lim\nolimits_x</pur>
`KaTex:\verb!x^2!` | <pur>\verb!x^2!</pur>
`KaTex:\verb!x^2!` | <pur>\verb!x^2!</pur> | `KaTeX:\mathbf{a}` <pur>`\textbf{a}`</pur> |
`KaTeX:\mathit{a}` <pur>`\textit{a}`</pur> | `KaTeX:\textup{a}` <pur>`\textup{a}`</pur> | `KaTeX:\textsl{a}` <pur>`\textsl{a}`</pur> | `KaTeX:\textsc{a}` <pur>`\textsc{a}`</pur> | `KaTeX:\underline{a}` <pur>`\underline{a}`</pur>
列表,图片,表格表示
---
### 列表
```latex
| - First item |
| - Second item |
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
| 1. First item |
| 2. Second item |
\begin{itemize}
\item First item
\item Second item
\end{itemize}
|First item |
|Second item |
\begin{description}
\item First item
\item Second item
\end{description}
```
### 图片
```latex
% 展示单张图像
\usepackage{graphicx}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{path/to/your/image.jpg}
\caption{Caption for the single figure.}
\label{fig:singlefig}
\end{figure}
% 展示多张图像
\usepackage{graphicx}
\usepackage{subcaption}
\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{path/to/your/image1.jpg}
\caption{First subfigure}
\label{fig:sub1}
\end{subfigure}
\hfill % 在子图之间添加水平间距
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{path/to/your/image2.jpg}
\caption{Second subfigure}
\label{fig:sub2}
\end{subfigure}
\caption{Caption for the entire figure}
\label{fig:mainfig}
\end{figure}
```
### 表格
```latex
\begin{table}[hbpt] % 使用 longtable 包创建可以跨页的表格
\centering % 居中表格
\caption{Example Table}
\label{tab:example}
\begin{tabular}{|c|l|r|} % 对齐列:居中、居左、居右
\hline % 插入一条水平线
\textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\ \hline
Data 1 & Data 2 & Data 3 \\ % 数据
Data 4 & Data 5 & Data 6 \\ \hline
\end{tabular}
\end{table}
```
LaTex排版
----
### 调整页边距和页面类型
```latex
\usepackage[left=3cm, right=3cm, top=2cm, bottom=2cm]{geometry} or \geometry{left=3cm, right=3cm, top=2cm, bottom=2cm}
\usepackage[a4paper]{geometry} % 另有a5paper, b5paper, letterpaper等格式
```
### 页面分割和布局
```latex
\quad | 添加空格
\qquad | 双空格
\vspace{} | 增加纵向间距
\hspace{} | 增加横向间距
\newpage | 开始新的一页
\clearpage | 清除当前页,并处理所有未处理的浮动体
\vfill | 在当前页面的剩余空间中插入垂直空白
```
### 页面页眉和页脚
```latex
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} | 清除所有页眉和页脚字段
\fancyhead[L]{Left header} | 左页眉
\fancyhead[C]{Center header} | 中页眉
\fancyhead[R]{Right header} | 右页眉
\fancyfoot[L]{Left footer} | 左页脚
\fancyfoot[C]{\thepage} | 页脚中央的页码
\fancyfoot[R]{Right footer} | 右页脚
```
其他
----
### bib文献管理
```latex
\cite{example} | 在文本中引用
\bibliographystyle{plain} | 设定引用格式
\bibliography{references} | 假设.bib文件名为 'references.bib'
```
### URL
```latex
\usepackage{hyperref} | 加载 hyperref 包以增强 PDF 文档的交互性,如添加超链接和书签
\href{URL}{text} | 创建一个指向 URL 的超链接
\url{URL} | 显示 URL 并作为链接
```
### 颜色和盒子
```latex
\usepackage{color} | 使用 color 包来给文本添加颜色
\color{color} | 设置文本颜色
\fbox{content} | 在内容周围创建一个边框
```
### 多栏布局
```latex
\usepackage{multicol} | 使用 multicol 包创建多栏文本
\begin{multicols}{num} ... \end{multicols} | 开始一个多栏环境,其中 num 指定列数
\onecolumn | 文档从当前位置开始变为单列格式
\twocolumn | 文档从当前位置开始变为双列格式
```
另见
----

View File

@ -24,6 +24,7 @@ Linux 命令速查表
**`w`** | 显示系统中当前登录的用户
**`whoami`** | 显示您的登录身份
**`finger username`** | 显示有关用户的信息
**`sed -ri 's/.*swap.*/#&/' /etc/fstab && swapoff -a`** | 关闭swap
<!--rehype:className=style-list-->
### 硬件
@ -332,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

@ -167,10 +167,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

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;
}
}
```
另见
---

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

@ -404,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-->` 样式类,展示快捷键样式。
### 代码行号
@ -479,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-->` | `列表`样式展示表格
@ -1009,7 +1018,7 @@ H2 部分 - 5列效果展示
...
```
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L986-L991)<!--rehype:target=__blank-->
[#示例](https://github.com/jaywcjlove/reference/blob/8ae69f23860c1854a81aeceb81a6cc0bc0998fc4/docs/quickreference.md?plain=1#L1012-L1021)<!--rehype:target=__blank-->
### Two

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

@ -65,7 +65,7 @@ spring:
url: jdbc:mysql://localhost:3306/mydatabase
username: root
password: password
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name: com.mysql.cj.jdbc.Driver # 这里是 MySQL8.0 版本配置5.0 则是 com.mysql.jdbc.Driver
```
#### 说明

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)

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;-->
图形符号
----

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` | 转到上/下窗口

View File

@ -721,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
---

5
icons/favicon.svg Normal file
View File

@ -0,0 +1,5 @@
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" height="180" width="180">
<path d="m21.66 10.44-.98 4.18c-.84 3.61-2.5 5.07-5.62 4.77-.5-.04-1.04-.13-1.62-.27l-1.68-.4c-4.17-.99-5.46-3.05-4.48-7.23l.98-4.19c.2-.85.44-1.59.74-2.2 1.17-2.42 3.16-3.07 6.5-2.28l1.67.39c4.19.98 5.47 3.05 4.49 7.23Z" fill="#c9d1d9"></path>
<path d="M15.06 19.39c-.62.42-1.4.77-2.35 1.08l-1.58.52c-3.97 1.28-6.06.21-7.35-3.76L2.5 13.28c-1.28-3.97-.22-6.07 3.75-7.35l1.58-.52c.41-.13.8-.24 1.17-.31-.3.61-.54 1.35-.74 2.2l-.98 4.19c-.98 4.18.31 6.24 4.48 7.23l1.68.4c.58.14 1.12.23 1.62.27Zm2.43-8.88c-.06 0-.12-.01-.19-.02l-4.85-1.23a.75.75 0 0 1 .37-1.45l4.85 1.23a.748.748 0 0 1-.18 1.47Z" fill="#228e6c"></path>
<path d="M14.56 13.89c-.06 0-.12-.01-.19-.02l-2.91-.74a.75.75 0 0 1 .37-1.45l2.91.74c.4.1.64.51.54.91-.08.34-.38.56-.72.56Z" fill="#228e6c"></path>
</svg>

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
icons/touch-icon-ipad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
icons/touch-icon-iphone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -31,7 +31,7 @@
"husky": "^9.0.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"refs-cli": "^1.5.1",
"refs-cli": "^1.8.0",
"markdownlint": "^0.33.0",
"markdownlint-cli": "^0.39.0"
},